39 namespace porosityModels
52 const word& modelType,
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"))
80 darcyCoeff.
xx() = dXYZ_.value().x();
81 darcyCoeff.
yy() = dXYZ_.value().y();
82 darcyCoeff.
zz() = dXYZ_.value().z();
87 forchCoeff.
xx() = 0.5*fXYZ_.value().x();
88 forchCoeff.
yy() = 0.5*fXYZ_.value().y();
89 forchCoeff.
zz() = 0.5*fXYZ_.value().z();
93 forAll(cellZoneIDs_, zonei)
98 D_[zonei] = csys().transform(darcyCoeff);
99 F_[zonei] = csys().transform(forchCoeff);
104 forAll(cellZoneIDs_, zonei)
109 mesh_.cellZones()[cellZoneIDs_[zonei]]
112 D_[zonei] = csys().transform(cc, darcyCoeff);
113 F_[zonei] = csys().transform(cc, forchCoeff);
118 if (debug && mesh_.time().writeTime())
125 mesh_.time().timeName(),
138 mesh_.time().timeName(),
148 forAll(cellZoneIDs_, zonei)
184 force = Udiag*
U - Usource;
294 dict_.writeEntry(name_,
os);
Macros for easy insertion into run-time selection tables.
#define addToRunTimeSelectionTable(baseType, thisType, argNames)
Add to construction table with typeName as the key.
Defines the attributes of an object for which implicit objectRegistry management is supported,...
static word groupName(StringType base, const word &group)
Create dot-delimited name.group string.
const T & first() const
The first element of the list.
An Ostream is an abstract base class for all output systems (streams, files, token lists,...
virtual void correct()
Solve the turbulence equations and correct the turbulence viscosity.
A List with indirect addressing. Like IndirectList but does not store addressing.
A list of keyword definitions, which are a keyword followed by a number of values (eg,...
Generic dimensioned Type class.
A special matrix type and solver, designed for finite volume solutions of scalar equations....
Mesh data needed to do the Finite Volume discretisation.
A class representing the concept of a GeometricField of 1 used to avoid unnecessary manipulations for...
Top level model for porosity models.
void adjustNegativeResistance(dimensionedVector &resist)
Adjust negative resistance values to be multiplier of max value.
Darcy-Forchheimer law porosity model, given by:
virtual void calcForce(const volVectorField &U, const volScalarField &rho, const volScalarField &mu, vectorField &force) const
Calculate the porosity force.
bool writeData(Ostream &os) const
Write.
virtual void calcTransformModelData()
Transform the model data wrt mesh changes.
virtual bool write(const bool valid=true) const
Write using setting from DB.
A wordRe is a Foam::word, but can contain a regular expression for matching words or strings.
A class for handling words, derived from Foam::string.
#define defineTypeNameAndDebug(Type, DebugSwitch)
Define the typeName and debug information.
const volScalarField & mu
OBJstream os(runTime.globalPath()/outputName)
A special matrix type and solver, designed for finite volume solutions of scalar equations.
const dimensionSet dimless
Dimensionless.
dimensionedSymmTensor sqr(const dimensionedVector &dv)
const dimensionSet dimLength(0, 1, 0, 0, 0, 0, 0)
static void apply(bitSet &selection, const Detail::parcelSelection::actionType action, const Predicate &accept, const UList< Type > &list, const AccessOp &aop)
const dimensionSet dimForce
static constexpr const zero Zero
Global zero (0)
word name(const expressions::valueTypeCode typeCode)
A word representation of a valueTypeCode. Empty for INVALID.
#define forAll(list, i)
Loop across all elements in list.