28 template<
class RhoFieldType>
29 void Foam::porosityModels::DarcyForchheimer::apply
34 const RhoFieldType&
rho,
51 mu[celli]*dZones[j] + (
rho[celli]*
mag(
U[celli]))*fZones[j];
53 const scalar isoCd =
tr(Cd);
55 Udiag[celli] += V[celli]*isoCd;
56 Usource[celli] -= V[celli]*((Cd -
I*isoCd) &
U[celli]);
62 template<
class RhoFieldType>
63 void Foam::porosityModels::DarcyForchheimer::apply
66 const RhoFieldType&
rho,
71 forAll(cellZoneIDs_, zoneI)
81 const label j = this->fieldIndex(i);
85 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 meshCellZones & cellZones() const
Return cell zones.
const fvMesh & mesh_
Reference to the mesh database.
labelList cellZoneIDs_
Cell zone IDs.
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/mol].
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.