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();
108 typeIOobject<volScalarField> mIo
161 m = m.oldTime() + deltaM;
177 const word& modelType,
188 <<
"Zero-dimensional fvModel applied to a "
205 return mesh().
V()[0];
215 massFlowRate()*m0D_[0]/m()[0]
253 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.
Generic GeometricField class.
static tmp< GeometricField< Type, GeoMesh, PrimitiveField > > New(const word &name, const Internal &, const PtrList< Patch > &, 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...
static word groupName(Name name, const word &group)
dimensionedScalar deltaT() const
Return time step.
const ZoneType & all() const
Return const reference to the all zone.
Named list of cell indices representing a sub-set of the mesh.
A list of keywords followed by any number of values (e.g. words and numbers) or sub-dictionaries.
Mesh data needed to do the Finite Volume discretisation.
const Time & time() const
Return the top-level database.
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 const cellZone & zone() const
Return the cellZone that the source applies to.
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 void mapMesh(const polyMeshMap &)
Update from another mesh using the given map.
virtual dimensionedScalar S() const
Return the source value.
Type & lookupObjectRef(const word &name) const
Lookup and return the object reference of the given Type.
const Type & lookupObject(const word &name) const
Lookup and return the object of the given Type and name.
bool foundObject(const word &name) const
Is the named Type in registry.
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.
const cellZoneList & cellZones() const
Return cell zones.
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.
Foam::fvMesh mesh(Foam::IOobject(regionName, runTime.name(), runTime, Foam::IOobject::MUST_READ), false)
#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)
const dimensionSet dimTime
VolField< scalar > volScalarField
word typedName(Name name)
Return the name of the object within the given type.
word name(const LagrangianState state)
Return a string representation of a Lagrangian state enumeration.
const dimensionSet dimMass
dimensioned< scalar > dimensionedScalar
Dimensioned scalar obtained from generic dimensioned type.
fluidMulticomponentThermo & thermo