34 namespace functionObjects
52 phaseName_(
dict.lookupOrDefault<
word>(
"phase",
word::null)),
76 const word thermoName =
81 <<
"Cannot create mass fractions. Mass fractions already exist "
82 <<
"within the multicomponent thermo model, \"" << thermoName
101 IOobject(
"mTotal", time_.name(), mesh_),
105 bool fromMoleFractions =
false, fromMoles =
false;
136 <<
"Mass fraction field " << YIo.
name()
139 fromMoleFractions = fromMoleFractions || XIo.
headerOk();
140 fromMoles = fromMoles || nIo.
headerOk();
141 if (fromMoleFractions && fromMoles)
144 <<
"Mole fraction fields and moles fields "
145 <<
" both found on disk"
173 Y_[i] == m[i]/mTotal;
#define forAll(list, i)
Loop across all elements in list.
Macros for easy insertion into run-time selection tables.
Generic GeometricField class.
IOobject defines the attributes of an object for which implicit objectRegistry management is supporte...
const word & name() const
Return name.
static word groupName(Name name, const word &group)
A templated 1D list of pointers to objects of type <T>, where the size of the array is known and used...
bool set(const label) const
Is element set.
void transfer(PtrList< T > &)
Transfer the contents of the argument PtrList into this PtrList.
Class to control time during OpenFOAM simulations that is also the top-level objectRegistry.
An auto-pointer similar to the STL auto_ptr but with automatic casting to a reference to the type and...
void clear()
Delete object (if the pointer is valid) and set pointer to.
A list of keywords followed by any number of values (e.g. words and numbers) or sub-dictionaries.
Base-class for multi-component fluid thermodynamic properties.
static autoPtr< fluidMulticomponentThermo > New(const fvMesh &, const word &phaseName=word::null)
Standard selection based on fvMesh.
Abstract base-class for Time/database functionObjects.
Specialisation of Foam::functionObject for an Foam::fvMesh, providing a reference to the Foam::fvMesh...
This function object calculates mass-fraction fields from mole-fraction or moles fields present on di...
virtual ~massFractions()
Destructor.
massFractions(const word &name, const Time &t, const dictionary &dict)
Construct from Time and dictionary.
virtual bool execute()
Calculate the mass-fraction fields.
virtual bool write()
The mass-fraction fields auto-write.
virtual bool read(const dictionary &)
Read the massFractions data.
Templated form of IOobject providing type information for file reading and header type checking.
bool headerOk()
Read header (uses typeGlobalFile to find file) and check.
A class for handling words, derived from string.
#define FatalErrorInFunction
Report an error message using Foam::FatalError.
defineTypeNameAndDebug(fvMeshFunctionObject, 0)
addToRunTimeSelectionTable(functionObject, fvModel, dictionary)
const dimensionSet & dimMoles
errorManipArg< error, int > exit(error &err, const int errNo=1)
const dimensionSet & dimMass
String typeName(const std::type_info &info)
Return the un-mangled name given the standard type info.
scalarList W(const fluidMulticomponentThermo &thermo)
VolField< scalar > volScalarField
word name(const LagrangianState state)
Return a string representation of a Lagrangian state enumeration.
dimensioned< scalar > dimensionedScalar
Dimensioned scalar obtained from generic dimensioned type.
PtrList< volScalarField > & Y
fluidMulticomponentThermo & thermo