28 template<
class RhoFieldType>
29 void Foam::porosityModels::DarcyForchheimer::apply
34 const RhoFieldType& rho,
48 const label celli = cells[i];
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,
80 const label celli = cells[i];
82 const tensor D = dZones[j];
85 AU[celli] += mu[celli]*D + (rho[celli]*
mag(U[celli]))*F;
const dimensionedScalar & F
Faraday constant: default SI units: [C/mol].
#define forAll(list, i)
Loop across all elements in list.
intWM_LABEL_SIZE_t label
A label is an int32_t or int64_t as specified by the pre-processor macro WM_LABEL_SIZE.
volVectorField vectorField(fieldObject, mesh)
label fieldIndex(const label index) const
Return label index.
static const Identity< scalar > I
Field< scalar > scalarField
Specialisation of Field<T> for scalar.
const cellZoneMesh & cellZones() const
Return cell zone mesh.
List< label > labelList
A List of labels.
dimensionedScalar tr(const dimensionedSphericalTensor &dt)
volScalarField scalarField(fieldObject, mesh)
const fvMesh & mesh_
Reference to the mesh database.
labelList cellZoneIDs_
Cell zone IDs.
Field< tensor > tensorField
Specialisation of Field<T> for tensor.
dimensioned< scalar > mag(const dimensioned< Type > &)
Field< vector > vectorField
Specialisation of Field<T> for vector.
Tensor< scalar > tensor
Tensor of scalars.