30template<
class RhoFieldType>
31void Foam::porosityModels::DarcyForchheimer::apply
36 const RhoFieldType&
rho,
37 const scalarField&
mu,
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]);
64template<
class RhoFieldType>
65void 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;
const fvMesh & mesh_
Reference to the mesh database.
labelList cellZoneIDs_
Cell zone IDs.
label fieldIndex(const label index) const
Return label index.
volVectorField F(fluid.F())
const expr V(m.psi().mesh().V())
dimensionedScalar tr(const dimensionedSphericalTensor &dt)
List< label > labelList
A List of labels.
static const Identity< scalar > I
Field< scalar > scalarField
Specialisation of Field<T> for scalar.
dimensioned< typename typeOfMag< Type >::type > mag(const dimensioned< Type > &dt)
Field< vector > vectorField
Specialisation of Field<T> for vector.
Field< tensor > tensorField
Specialisation of Field<T> for tensor.
const dimensionedScalar & D
#define forAll(list, i)
Loop across all elements in list.