Go to the documentation of this file.
39 namespace porosityModels
49 Foam::porosityModels::DarcyForchheimer::DarcyForchheimer
52 const word& modelType,
55 const word& cellZoneName
61 D_(cellZoneIDs_.size()),
62 F_(cellZoneIDs_.size()),
63 rhoName_(coeffs_.getOrDefault<
word>(
"rho",
"rho")),
64 muName_(coeffs_.getOrDefault<
word>(
"mu",
"thermo:mu")),
65 nuName_(coeffs_.getOrDefault<
word>(
"nu",
"nu"))
67 adjustNegativeResistance(dXYZ_);
68 adjustNegativeResistance(fXYZ_);
70 calcTransformModelData();
87 forchCoeff.
xx() = 0.5*fXYZ_.
value().
x();
88 forchCoeff.
yy() = 0.5*fXYZ_.
value().
y();
89 forchCoeff.
zz() = 0.5*fXYZ_.
value().
z();
184 force = Udiag*
U - Usource;
294 dict_.writeEntry(name_,
os);
int debug
Static debugging option.
Defines the attributes of an object for which implicit objectRegistry management is supported,...
const Cmpt & x() const
Access to the vector x component.
A class for handling words, derived from Foam::string.
const dimensionedScalar mu
Atomic mass unit.
const dimensionSet dimLength(0, 1, 0, 0, 0, 0, 0)
static constexpr const zero Zero
Global zero (0)
static word timeName(const scalar t, const int precision=precision_)
A class representing the concept of a GeometricField of 1 used to avoid unnecessary manipulations for...
const Type & value() const
Return const reference to value.
labelList cellZoneIDs_
Cell zone IDs.
const dimensionSet dimForce
const Cmpt & z() const
Access to the vector z component.
#define forAll(list, i)
Loop across all elements in list.
virtual void calcTransformModelData()
Transform the model data wrt mesh changes.
A special matrix type and solver, designed for finite volume solutions of scalar equations.
bool writeData(Ostream &os) const
Write.
bool writeTime() const noexcept
True if this is a write time.
const cellZoneMesh & cellZones() const noexcept
Return cell zone mesh.
defineTypeNameAndDebug(powerLawLopesdaCosta, 0)
A list of keyword definitions, which are a keyword followed by a number of values (eg,...
OBJstream os(runTime.globalPath()/outputName)
Macros for easy insertion into run-time selection tables.
Mesh data needed to do the Finite Volume discretisation.
virtual scalar transform(const scalar &input) const
With constant rotation tensor.
Top level model for porosity models.
const Cmpt & y() const
Access to the vector y component.
const vectorField & cellCentres() const
virtual void correct(fvVectorMatrix &UEqn) const
Add resistance.
dimensionedSymmTensor sqr(const dimensionedVector &dv)
static void apply(bitSet &selection, const Detail::parcelSelection::actionType action, const Predicate &accept, const UList< Type > &list, const AccessOp &aop)
const coordinateSystem & csys() const
Local coordinate system.
A special matrix type and solver, designed for finite volume solutions of scalar equations....
word name(const expressions::valueTypeCode typeCode)
A word representation of a valueTypeCode. Empty for INVALID.
const Time & time() const
Return the top-level database.
A List with indirect addressing.
virtual void calcForce(const volVectorField &U, const volScalarField &rho, const volScalarField &mu, vectorField &force) const
Calculate the porosity force.
addToRunTimeSelectionTable(porosityModel, powerLawLopesdaCosta, mesh)
static word groupName(StringType base, const word &group)
Create dot-delimited name.group string.
An Ostream is an abstract base class for all output systems (streams, files, token lists,...
const dimensionSet & dimensions() const
Return const reference to dimensions.
dimensioned< tensor > dimensionedTensor
Dimensioned tensor obtained from generic dimensioned type.
const fvMesh & mesh_
Reference to the mesh database.
const dimensionSet dimless
Dimensionless.