46 Foam::fv::zeroDimensionalMassSourceBase::calcM0D()
const
48 tmp<volScalarField> tm =
56 HashTable<const basicThermo*> thermos(
mesh().lookupClass<basicThermo>());
60 const basicThermo&
thermo = *thermoIter();
62 tmp<volScalarField> tRho =
thermo.rho();
65 const word phaseName =
thermo.phaseName();
89 if (!mesh().foundObject<volScalarField>(
typedName(
"m0D")))
107 if (!mesh().foundObject<volScalarField>(
typedName(
"m")))
109 typeIOobject<volScalarField> mIo
162 m = m.oldTime() + deltaM;
173 Foam::scalar Foam::fv::zeroDimensionalMassSourceBase::massFlowRate()
const
175 return zeroDimensionalMassFlowRate()*m0D_[0]/m()[0];
179 void Foam::fv::zeroDimensionalMassSource::readCoeffs()
183 zeroDimensionalMassFlowRate_.reset
191 Foam::fv::zeroDimensionalMassSource::zeroDimensionalMassFlowRate()
const
193 return zeroDimensionalMassFlowRate_->value(mesh().time().userTimeValue());
202 const word& modelType,
213 <<
"Zero-dimensional fvModel applied to a "
223 const word& modelType,
229 zeroDimensionalMassFlowRate_()
243 if (!mesh().foundObject<volScalarField>(
typedName(
"deltaM")))
#define forAllConstIter(Container, container, iter)
Iterate across all elements in the container object of type.
Macros for easy insertion into run-time selection tables.
static autoPtr< Function1< Type > > New(const word &name, const dictionary &dict)
Selector.
Generic GeometricField class.
static tmp< GeometricField< Type, PatchField, GeoMesh > > New(const word &name, const Internal &, const PtrList< PatchField< Type >> &)
Return a temporary field constructed from name,.
IOobject defines the attributes of an object for which implicit objectRegistry management is supporte...
const Time & time() const
Return time.
static word groupName(Name name, const word &group)
dimensionedScalar deltaT() const
Return time step.
A list of keyword definitions, which are a keyword followed by any number of values (e....
Mesh data needed to do the Finite Volume discretisation.
const DimensionedField< scalar, volMesh > & V() const
Return cell volumes.
Finite volume model abstract base class.
const fvMesh & mesh() const
Return const access to the mesh database.
virtual bool read(const dictionary &dict)
Read source dictionary.
virtual void correct()
Update the model.
zeroDimensionalMassSourceBase(const word &name, const word &modelType, const fvMesh &mesh, const dictionary &dict)
Construct from explicit source name and mesh.
This fvModel applies a mass source to the continuity equation and to all field equations,...
virtual bool read(const dictionary &dict)
Read source dictionary.
zeroDimensionalMassSource(const word &name, const word &modelType, const fvMesh &mesh, const dictionary &dict)
Construct from explicit source name and mesh.
const Type & lookupObject(const word &name) const
Lookup and return the object of the given Type and name.
label nGeometricD() const
Return the number of valid geometric dimensions in the mesh.
void store()
Transfer ownership of this object to its registry.
A class for managing temporary objects.
A class for handling words, derived from string.
static const word null
An empty word.
#define FatalIOErrorInFunction(ios)
Report an error message using Foam::FatalIOError.
volScalarField alpha(IOobject("alpha", runTime.name(), mesh, IOobject::READ_IF_PRESENT, IOobject::AUTO_WRITE), lambda *max(Ua &U, zeroSensitivity))
addToRunTimeSelectionTable(fvConstraint, bound, dictionary)
defineTypeNameAndDebug(bound, 0)
errorManipArg< error, int > exit(error &err, const int errNo=1)
dimensioned< scalar > dimensionedScalar
Dimensioned scalar obtained from generic dimensioned type.
const dimensionSet dimTime
VolField< scalar > volScalarField
word typedName(Name name)
Return the name of the object within the given type.
const dimensionSet dimMass
word name(const complex &)
Return a string representation of a complex.
fluidMulticomponentThermo & thermo