28 template<
class RhoFieldType>
29 void Foam::porosityModels::powerLaw::apply
33 const RhoFieldType& rho,
37 const scalar C0 = C0_;
38 const scalar C1m1b2 = (C1_ - 1.0)/2.0;
46 const label celli = cells[i];
49 V[celli]*rho[celli]*C0*
pow(
magSqr(U[celli]), C1m1b2);
55 template<
class RhoFieldType>
56 void Foam::porosityModels::powerLaw::apply
59 const RhoFieldType& rho,
63 const scalar C0 = C0_;
64 const scalar C1m1b2 = (C1_ - 1.0)/2.0;
72 const label celli = cells[i];
75 AU[celli] +
I*(rho[celli]*C0*
pow(
magSqr(U[celli]), C1m1b2));
#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.
const meshCellZones & cellZones() const
Return cell zones.
volVectorField vectorField(fieldObject, mesh)
static const Identity< scalar > I
List< label > labelList
A List of labels.
dimensioned< scalar > magSqr(const dimensioned< Type > &)
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.
dimensionedScalar pow(const dimensionedScalar &ds, const dimensionedScalar &expt)
Field< vector > vectorField
Specialisation of Field<T> for vector.