Go to the documentation of this file.
35 namespace porosityModels
48 const word& modelType,
51 const word& cellZoneName
57 D_(cellZoneIDs_.size()),
58 F_(cellZoneIDs_.size()),
59 rhoName_(coeffs_.lookupOrDefault<
word>(
"rho",
"rho")),
60 muName_(coeffs_.lookupOrDefault<
word>(
"mu",
"thermo:mu")),
61 nuName_(coeffs_.lookupOrDefault<
word>(
"nu",
"nu"))
63 adjustNegativeResistance(dXYZ_);
64 adjustNegativeResistance(fXYZ_);
66 calcTransformModelData();
80 if (coordSys_.R().uniform())
82 forAll (cellZoneIDs_, zoneI)
88 D_[zoneI][0].
xx() = dXYZ_.value().x();
89 D_[zoneI][0].yy() = dXYZ_.value().y();
90 D_[zoneI][0].zz() = dXYZ_.value().z();
92 D_[zoneI][0] = coordSys_.R().transformTensor(D_[zoneI][0]);
96 F_[zoneI][0].
xx() = 0.5*fXYZ_.value().x();
97 F_[zoneI][0].yy() = 0.5*fXYZ_.value().y();
98 F_[zoneI][0].zz() = 0.5*fXYZ_.value().z();
100 F_[zoneI][0] = coordSys_.R().transformTensor(F_[zoneI][0]);
105 forAll(cellZoneIDs_, zoneI)
109 D_[zoneI].setSize(
cells.size());
110 F_[zoneI].setSize(
cells.size());
115 D_[zoneI][i].
xx() = dXYZ_.value().x();
116 D_[zoneI][i].yy() = dXYZ_.value().y();
117 D_[zoneI][i].zz() = dXYZ_.value().z();
121 F_[zoneI][i].
xx() = 0.5*fXYZ_.value().x();
122 F_[zoneI][i].yy() = 0.5*fXYZ_.value().y();
123 F_[zoneI][i].zz() = 0.5*fXYZ_.value().z();
128 D_[zoneI] =
R.transformTensor(D_[zoneI],
cells);
129 F_[zoneI] =
R.transformTensor(F_[zoneI],
cells);
133 if (debug && mesh_.time().outputTime())
140 mesh_.time().timeName(),
153 mesh_.time().timeName(),
183 apply(Udiag, Usource, V,
rho,
mu,
U);
185 force = Udiag*
U - Usource;
212 apply(Udiag, Usource, V,
rho,
mu,
U);
219 apply(Udiag, Usource, V,
rho,
rho*
nu,
U);
256 apply(Udiag, Usource, V,
rho,
mu,
U);
IOobject defines the attributes of an object for which implicit objectRegistry management is supporte...
static word groupName(Name name, const word &group)
const dimensionSet dimless(0, 0, 0, 0, 0, 0, 0)
A class for handling words, derived from string.
const dimensionedScalar mu
Atomic mass unit.
const dimensionSet dimLength(0, 1, 0, 0, 0, 0, 0)
#define forAll(list, i)
Loop across all elements in list.
A class representing the concept of a GeometricField of 1 used to avoid unnecessary manipulations for...
defineTypeNameAndDebug(DarcyForchheimer, 0)
Ostream & endl(Ostream &os)
Add newline and flush stream.
const dimensionSet dimForce
virtual void calcTransformModelData()
Transform the model data wrt mesh changes.
A special matrix type and solver, designed for finite volume solutions of scalar equations.
virtual ~DarcyForchheimer()
Destructor.
#define R(A, B, C, D, E, F, K, M)
bool writeData(Ostream &os) const
Write.
Pre-declare SubField and related Field type.
virtual Ostream & write(const token &)=0
Write next token to stream.
Abstract base class for coordinate rotation.
tmp< fvVectorMatrix > UEqn(fvm::div(phi, U)+MRF.DDt(U)+turbulence->divDevReff(U)==fvOptions(U))
A list of keyword definitions, which are a keyword followed by any number of values (e....
Macros for easy insertion into run-time selection tables.
Generic dimensioned Type class.
Mesh data needed to do the Finite Volume discretisation.
Ostream & indent(Ostream &os)
Indent stream.
Top level model for porosity models.
virtual void correct(fvVectorMatrix &UEqn) const
Add resistance.
dimensionedSymmTensor sqr(const dimensionedVector &dv)
A 1D array of objects of type <T>, where the size of the vector is known and used for subscript bound...
DarcyForchheimer(const DarcyForchheimer &)
Disallow default bitwise copy construct.
A special matrix type and solver, designed for finite volume solutions of scalar equations....
A List with indirect addressing.
virtual void calcForce(const volVectorField &U, const volScalarField &rho, const volScalarField &mu, vectorField &force) const
Calculate the porosity force.
An Ostream is an abstract base class for all output systems (streams, files, token lists,...
Generic GeometricField class.
addToRunTimeSelectionTable(porosityModel, DarcyForchheimer, mesh)
word name(const complex &)
Return a string representation of a complex.