35 namespace porosityModels
51 const word& cellZoneName
57 rhoName_(coeffDict.lookupOrDefault<
word>(
"rho",
"rho")),
58 muName_(coeffDict.lookupOrDefault<
word>(
"mu",
"mu")),
59 nuName_(coeffDict.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)
A List with indirect addressing.
Abstract base class for coordinate rotation.
A list of keywords followed by any number of values (e.g. words and numbers) or sub-dictionaries.
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.
virtual void correct(fvVectorMatrix &UEqn) const
Add resistance.
DarcyForchheimer(const word &name, const fvMesh &mesh, const dictionary &dict, const dictionary &coeffDict, 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.
Foam::fvMesh mesh(Foam::IOobject(regionName, runTime.name(), runTime, Foam::IOobject::MUST_READ), false)
A special matrix type and solver, designed for finite volume solutions of scalar equations.
const dimensionedScalar mu
Atomic mass unit.
const dimensionSet dimless
addToRunTimeSelectionTable(porosityModel, powerLawLopesdaCosta, mesh)
defineTypeNameAndDebug(powerLawLopesdaCosta, 0)
const dimensionSet & dimForce
const dimensionSet & dimLength
tmp< DimensionedField< typename outerProduct< Type, Type >::type, GeoMesh, Field >> sqr(const DimensionedField< Type, GeoMesh, PrimitiveField > &df)
word typedName(Name name)
Return the name of the object within the given type.
static scalar R(const scalar a, const scalar x)
word name(const LagrangianState state)
Return a string representation of a Lagrangian state enumeration.