30 template<
class RhoFieldType>
31 void Foam::porosityModels::DarcyForchheimer::apply
36 const RhoFieldType&
rho,
50 const label celli =
cells[i];
53 mu[celli]*dZones[j] + (
rho[celli]*
mag(
U[celli]))*fZones[j];
55 const scalar isoCd =
tr(Cd);
57 Udiag[celli] += V[celli]*isoCd;
58 Usource[celli] -= V[celli]*((Cd -
I*isoCd) &
U[celli]);
64 template<
class RhoFieldType>
65 void Foam::porosityModels::DarcyForchheimer::apply
68 const RhoFieldType&
rho,
73 forAll(cellZoneIDs_, zoneI)
82 const label celli =
cells[i];
83 const label j = this->fieldIndex(i);
87 AU[celli] +=
mu[celli]*
D + (
rho[celli]*
mag(
U[celli]))*
F;
dimensioned< typename typeOfMag< Type >::type > mag(const dimensioned< Type > &dt)
#define forAll(list, i)
Loop across all elements in list.
label fieldIndex(const label index) const
Return label index.
static const Identity< scalar > I
Field< scalar > scalarField
Specialisation of Field<T> for scalar.
dimensionedScalar tr(const dimensionedSphericalTensor &dt)
volVectorField F(fluid.F())
const fvMesh & mesh_
Reference to the mesh database.
labelList cellZoneIDs_
Cell zone IDs.
const dimensionedScalar mu
Atomic mass unit.
Field< tensor > tensorField
Specialisation of Field<T> for tensor.
const cellZoneMesh & cellZones() const noexcept
Return cell zone mesh.
Field< vector > vectorField
Specialisation of Field<T> for vector.
const dimensionedScalar & D
List< label > labelList
A List of labels.