47 <<
"Cannot have all resistances set to negative, resistance = "
53 maxCmpt =
max(0, maxCmpt);
59 val[cmpt] *= -maxCmpt;
69 if (!coordSys_.R().uniform())
79 Foam::porosityModel::porosityModel
82 const word& modelType,
85 const word& cellZoneName
102 coeffs_(
dict.optionalSubDict(modelType +
"Coeffs")),
105 cellZoneName !=
word::null
107 : dict_.lookup<
word>(
"cellZone")
116 <<
"cannot find porous cellZone " <<
zoneName_
132 if (!mesh_.upToDatePoints(*
this))
134 calcTransformModelData();
137 mesh_.setUpToDatePoints(*
this);
152 this->calcForce(
U,
rho,
mu, tforce.ref());
160 transformModelData();
172 transformModelData();
Generic GeometricField class.
void correctBoundaryConditions()
Correct boundary field.
IOobject defines the attributes of an object for which implicit objectRegistry management is supporte...
An Ostream is an abstract base class for all output systems (streams, files, token lists,...
label findIndex(const word &key) const
Return the index of the given the key or -1 if not found.
static const direction nComponents
Number of components in this vector space.
Base class for other coordinate system specifications.
A list of keyword definitions, which are a keyword followed by any number of values (e....
ITstream & lookup(const word &, bool recursive=false, bool patternMatch=true) const
Find and return an entry data stream.
const dictionary & optionalSubDict(const word &) const
Find and return a sub-dictionary if found.
const Type & value() const
Return const reference to value.
A special matrix type and solver, designed for finite volume solutions of scalar equations....
Mesh data needed to do the Finite Volume discretisation.
const cellZoneList & cellZones() const
Return cell zones.
Top level model for porosity models.
virtual void addResistance(fvVectorMatrix &UEqn)
Add resistance.
const fvMesh & mesh_
Reference to the mesh database.
virtual ~porosityModel()
Destructor.
word zoneName_
Name of cellZone.
virtual bool writeData(Ostream &os) const
Write.
virtual void transformModelData()
Transform the model data wrt mesh changes.
void adjustNegativeResistance(dimensionedVector &resist)
Adjust negative resistance values to be multiplier of max value.
virtual bool read()
Inherit read from regIOobject.
label fieldIndex(const label index) const
Return label index.
regIOobject is an abstract class derived from IOobject to handle automatic object registration with t...
A class for managing temporary objects.
A class for handling words, derived from string.
#define FatalErrorInFunction
Report an error message using Foam::FatalError.
void correct(const RdeltaTType &rDeltaT, const RhoType &rho, volScalarField &psi, const surfaceScalarField &phiCorr, const SpType &Sp, const SuType &Su)
const dimensionedScalar mu
Atomic mass unit.
errorManipArg< error, int > exit(error &err, const int errNo=1)
defineRunTimeSelectionTable(reactionRateFlameArea, dictionary)
intWM_LABEL_SIZE_t label
A label is an int32_t or int64_t as specified by the pre-processor macro WM_LABEL_SIZE.
Ostream & endl(Ostream &os)
Add newline and flush stream.
word name(const bool)
Return a word representation of a bool.
defineTypeNameAndDebug(combustionModel, 0)
tmp< DimensionedField< TypeR, GeoMesh > > New(const tmp< DimensionedField< TypeR, GeoMesh >> &tdf1, const word &name, const dimensionSet &dimensions)
layerAndWeight max(const layerAndWeight &a, const layerAndWeight &b)
Field< vector > vectorField
Specialisation of Field<T> for vector.
void cmptMax(FieldField< Field, typename FieldField< Field, Type >::cmptType > &cf, const FieldField< Field, Type > &f)
fileType type(const fileName &, const bool checkVariants=true, const bool followLink=true)
Return the file type: directory or file.