Go to the documentation of this file.
38 namespace porosityModels
48 void Foam::porosityModels::fixedCoeff::apply
66 const label celli =
cells[i];
68 const tensor Cd =
rho*(alphaZones[j] + betaZones[j]*
mag(
U[celli]));
69 const scalar isoCd =
tr(Cd);
71 Udiag[celli] += V[celli]*isoCd;
72 Usource[celli] -= V[celli]*((Cd -
I*isoCd) &
U[celli]);
78 void Foam::porosityModels::fixedCoeff::apply
85 forAll(cellZoneIDs_, zoneI)
94 const label celli =
cells[i];
95 const label j = fieldIndex(i);
107 Foam::porosityModels::fixedCoeff::fixedCoeff
110 const word& modelType,
113 const word& cellZoneName
119 alpha_(cellZoneIDs_.size()),
120 beta_(cellZoneIDs_.size())
135 alphaCoeff.xx() = alphaXYZ_.value().x();
136 alphaCoeff.yy() = alphaXYZ_.value().y();
137 alphaCoeff.zz() = alphaXYZ_.value().z();
141 betaCoeff.xx() = betaXYZ_.value().x();
142 betaCoeff.yy() = betaXYZ_.value().y();
143 betaCoeff.zz() = betaXYZ_.value().z();
147 forAll(cellZoneIDs_, zonei)
149 alpha_[zonei].resize(1);
150 beta_[zonei].resize(1);
152 alpha_[zonei] = csys().transform(alphaCoeff);
153 beta_[zonei] = csys().transform(betaCoeff);
158 forAll(cellZoneIDs_, zonei)
163 mesh_.cellZones()[cellZoneIDs_[zonei]]
166 alpha_[zonei] = csys().transform(cc, alphaCoeff);
167 beta_[zonei] = csys().transform(cc, betaCoeff);
184 const scalar rhoRef = coeffs_.get<scalar>(
"rhoRef");
188 force = Udiag*
U - Usource;
205 coeffs_.readEntry(
"rhoRef",
rho);
227 coeffs_.readEntry(
"rhoRef",
rho);
245 coeffs_.readEntry(
"rhoRef",
rho);
254 dict_.writeEntry(name_,
os);
List< label > labelList
A List of labels.
A templated (3 x 3) tensor of objects of <T> derived from MatrixSpace.
Field< scalar > scalarField
Specialisation of Field<T> for scalar.
A class for handling words, derived from Foam::string.
const dimensionedScalar mu
const dimensionSet dimLength(0, 1, 0, 0, 0, 0, 0)
virtual void calcForce(const volVectorField &U, const volScalarField &rho, const volScalarField &mu, vectorField &force) const
static constexpr const zero Zero
const dimensionedScalar alpha
Field< tensor > tensorField
Specialisation of Field<T> for tensor.
const dimensionSet dimForce
Field< vector > vectorField
Specialisation of Field<T> for vector.
A special matrix type and solver, designed for finite volume solutions of scalar equations.
const dimensionSet dimTime(0, 0, 1, 0, 0, 0, 0)
UIndirectList< point > pointUIndList
A UIndirectList of points.
bool writeData(Ostream &os) const
Generic templated field type.
const cellZoneMesh & cellZones() const noexcept
defineTypeNameAndDebug(powerLawLopesdaCosta, 0)
dimensionedScalar beta("beta", dimless/dimTemperature, laminarTransport)
GeometricField< scalar, fvPatchField, volMesh > volScalarField
void adjustNegativeResistance(dimensionedVector &resist)
virtual void calcTransformModelData()
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.
GeometricField< vector, fvPatchField, volMesh > volVectorField
Top level model for porosity models.
static void apply(bitSet &selection, const Detail::parcelSelection::actionType action, const Predicate &accept, const UList< Type > &list, const AccessOp &aop)
label fieldIndex(const label index) const
dimensioned< typename typeOfMag< Type >::type > mag(const dimensioned< Type > &dt)
virtual void correct(fvVectorMatrix &UEqn) const
A special matrix type and solver, designed for finite volume solutions of scalar equations....
word name(const expressions::valueTypeCode typeCode)
A List with indirect addressing.
dimensionedScalar tr(const dimensionedSphericalTensor &dt)
addToRunTimeSelectionTable(porosityModel, powerLawLopesdaCosta, mesh)
An Ostream is an abstract base class for all output systems (streams, files, token lists,...
Generic GeometricField class.
Tensor< scalar > tensor
Tensor of scalars, i.e. Tensor<scalar>.
static const Identity< scalar > I
const dimensionSet dimless