35 namespace porosityModels
48 const word& modelType,
51 const word& cellZoneName
57 rhoName_(coeffs_.lookupOrDefault<
word>(
"rho",
"rho")),
58 muName_(coeffs_.lookupOrDefault<
word>(
"mu",
"mu")),
59 nuName_(coeffs_.lookupOrDefault<
word>(
"nu",
"nu"))
78 if (coordSys_.R().uniform())
84 D_[0].xx() = dXYZ_.value().x();
85 D_[0].yy() = dXYZ_.value().y();
86 D_[0].zz() = dXYZ_.value().z();
88 D_[0] = coordSys_.R().transform(
Zero, D_[0]);
92 F_[0].xx() = 0.5*fXYZ_.value().x();
93 F_[0].yy() = 0.5*fXYZ_.value().y();
94 F_[0].zz() = 0.5*fXYZ_.value().z();
96 F_[0] = coordSys_.R().transform(
Zero, F_[0]);
102 D_.setSize(
cells.size());
103 F_.setSize(
cells.size());
108 D_[i].xx() = dXYZ_.value().x();
109 D_[i].yy() = dXYZ_.value().y();
110 D_[i].zz() = dXYZ_.value().z();
114 F_[i].xx() = 0.5*fXYZ_.value().x();
115 F_[i].yy() = 0.5*fXYZ_.value().y();
116 F_[i].zz() = 0.5*fXYZ_.value().z();
124 D_ =
R.transform(D_);
125 F_ =
R.transform(F_);
128 if (debug && (mesh_.time().writeTime() || mesh_.time().timeIndex() == 0))
178 apply(Udiag, Usource, V,
rho,
mu,
U);
180 force = Udiag*
U - Usource;
207 apply(Udiag, Usource, V,
rho,
mu,
U);
214 apply(Udiag, Usource, V,
rho,
rho*nu,
U);
#define forAll(list, i)
Loop across all elements in list.
Macros for easy insertion into run-time selection tables.
Generic GeometricField class.
IOobject defines the attributes of an object for which implicit objectRegistry management is supporte...
static word groupName(Name name, const word &group)
An Ostream is an abstract base class for all output systems (streams, files, token lists,...
virtual Ostream & write(const char)=0
Write character.
A List with indirect addressing.
Abstract base class for coordinate rotation.
A list of keyword definitions, which are a keyword followed by any number of values (e....
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 ~DarcyForchheimer()
Destructor.
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 correct(fvVectorMatrix &UEqn) const
Add resistance.
DarcyForchheimer(const word &name, const word &modelType, const fvMesh &mesh, const dictionary &dict, const word &cellZoneName)
virtual void calcTransformModelData()
Transform the model data wrt mesh changes.
virtual bool write(const bool write=true) const
Write using setting from DB.
A class for handling words, derived from string.
A special matrix type and solver, designed for finite volume solutions of scalar equations.
const dimensionedScalar mu
Atomic mass unit.
addToRunTimeSelectionTable(porosityModel, powerLawLopesdaCosta, mesh)
defineTypeNameAndDebug(powerLawLopesdaCosta, 0)
dimensionedSymmTensor sqr(const dimensionedVector &dv)
Ostream & endl(Ostream &os)
Add newline and flush stream.
word name(const bool)
Return a word representation of a bool.
const dimensionSet dimless
const dimensionSet dimLength
const dimensionSet dimForce
word typedName(Name name)
Return the name of the object within the given type.
static scalar R(const scalar a, const scalar x)
Ostream & indent(Ostream &os)
Indent stream.