45 Foam::fv::zeroDimensionalMassSourceBase::calcM0D()
const
47 tmp<volScalarField> tm =
55 HashTable<const basicThermo*> thermos(
mesh().lookupClass<basicThermo>());
59 const basicThermo&
thermo = *thermoIter();
61 tmp<volScalarField> tRho =
thermo.rho();
78 tm.ref().internalFieldRef() +=
rho()*
mesh().
V();
88 if (!mesh().foundObject<volScalarField>(
typedName(
"m0D")))
106 if (!mesh().foundObject<volScalarField>(
typedName(
"m")))
108 typeIOobject<volScalarField> mIo
111 mesh().time().
name(),
138 mesh().time().
name(),
161 m = m.oldTime() + deltaM;
177 const word& modelType,
188 <<
"Zero-dimensional fvModel applied to a "
212 return mesh().V()[0];
222 massFlowRate()*m0D_[0]/m()[0]
260 if (!mesh().foundObject<volScalarField>(
typedName(
"deltaM")))
268 mesh().time().
name(),
#define forAllConstIter(Container, container, iter)
Iterate across all elements in the container object of type.
Macros for easy insertion into run-time selection tables.
Generic GeometricField class.
static tmp< GeometricField< Type, PatchField, GeoMesh > > New(const word &name, const Internal &, const PtrList< PatchField< Type >> &, const HashPtrTable< Source > &=HashPtrTable< Source >())
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.
const fvMesh & mesh() const
Return const access to the mesh database.
const word & phaseName() const
Return the phase name.
Base class for mass source models.
Base class for zero-dimensional mass source models.
virtual bool movePoints()
Update for mesh motion.
virtual scalar V() const
Return the volume of cells that the source applies to.
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.
virtual void topoChange(const polyTopoChangeMap &)
Update topology using the given map.
virtual void distribute(const polyDistributionMap &)
Redistribute or update using the given distribution map.
virtual labelUList cells() const
Return the cells that the source applies to.
virtual void mapMesh(const polyMeshMap &)
Update from another mesh using the given map.
virtual label nCells() const
Return the number of cells that the source applies to.
virtual dimensionedScalar S() const
Return the source value.
const Type & lookupObject(const word &name) const
Lookup and return the object of the given Type and name.
Class containing mesh-to-mesh mapping information after a mesh distribution where we send parts of me...
Class containing mesh-to-mesh mapping information.
label nGeometricD() const
Return the number of valid geometric dimensions in the mesh.
Class containing mesh-to-mesh mapping information after a change in polyMesh topology.
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.
A class representing the concept of 0 used to avoid unnecessary manipulations for objects that are kn...
#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))
defineTypeNameAndDebug(bound, 0)
errorManipArg< error, int > exit(error &err, const int errNo=1)
intWM_LABEL_SIZE_t label
A label is an int32_t or int64_t as specified by the pre-processor macro WM_LABEL_SIZE.
word name(const bool)
Return a word representation of a bool.
const dimensionSet dimTime
VolField< scalar > volScalarField
word typedName(Name name)
Return the name of the object within the given type.
const dimensionSet dimMass
UList< label > labelUList
dimensioned< scalar > dimensionedScalar
Dimensioned scalar obtained from generic dimensioned type.
fluidMulticomponentThermo & thermo