28 template<
class RhoFieldType>
29 void Foam::porosityModels::DarcyForchheimer::apply
34 const RhoFieldType&
rho,
46 mu[celli]*D_[j] + (
rho[celli]*
mag(
U[celli]))*F_[j];
48 const scalar isoCd =
tr(Cd);
50 Udiag[celli] += V[celli]*isoCd;
51 Usource[celli] -= V[celli]*((Cd -
I*isoCd) &
U[celli]);
56 template<
class RhoFieldType>
57 void Foam::porosityModels::DarcyForchheimer::apply
60 const RhoFieldType&
rho,
70 const label j = this->fieldIndex(i);
74 AU[celli] +=
mu[celli]*
D + (
rho[celli]*
mag(
U[celli]))*
F;
static const Foam::dimensionedScalar D("D", Foam::dimTemperature, 257.14)
#define forAll(list, i)
Loop across all elements in list.
const cellZoneList & cellZones() const
Return cell zones.
const fvMesh & mesh_
Reference to the mesh database.
word zoneName_
Name of cellZone.
label fieldIndex(const label index) const
Return label index.
volScalarField scalarField(fieldObject, mesh)
volVectorField vectorField(fieldObject, mesh)
const dimensionedScalar mu
Atomic mass unit.
const dimensionedScalar F
Faraday constant: default SI units: [C/kmol].
dimensionedScalar tr(const dimensionedSphericalTensor &dt)
List< label > labelList
A List of labels.
intWM_LABEL_SIZE_t label
A label is an int32_t or int64_t as specified by the pre-processor macro WM_LABEL_SIZE.
Tensor< scalar > tensor
Tensor of scalars.
static const Identity< scalar > I
Field< scalar > scalarField
Specialisation of Field<T> for scalar.
dimensioned< scalar > mag(const dimensioned< Type > &)
Field< vector > vectorField
Specialisation of Field<T> for vector.
Field< tensor > tensorField
Specialisation of Field<T> for tensor.