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
96 const bool YdefaultIoExists = YdefaultIo.
headerOk();
105 if (YdefaultIoExists)
110 YdefaultIo.
path(
false)/
"molesToMassFractions:" + YdefaultIo.
name()
118 YdefaultLim.
max(small);
130 if (YdefaultIoExists)
134 YdefaultIo.
path(
false)/
"molesToMassFractions:" + YdefaultIo.
name(),
152 IOobject(
"mTotal", time_.name(), mesh_),
156 bool fromMoleFractions =
false, fromMoles =
false;
187 <<
"Mass fraction field " << YIo.
name()
190 fromMoleFractions = fromMoleFractions || XIo.
headerOk();
191 fromMoles = fromMoles || nIo.
headerOk();
192 if (fromMoleFractions && fromMoles)
195 <<
"Mole fraction fields and moles fields "
196 <<
" both found on disk"
224 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.
void max(const dimensioned< Type > &)
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)
fileName path(const bool global) const
Return complete path including the processor sub-directory.
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 keyword definitions, which are a keyword followed by any number of values (e....
virtual bool cp(const fileName &src, const fileName &dst, const bool followLink=true) const =0
Copy, recursively if necessary, the source to the destination.
virtual bool mv(const fileName &src, const fileName &dst, const bool followLink=false) const =0
Rename src to dst.
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.
virtual bool write(const bool write=true) const
Write using setting from DB.
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.
fileName filePath() const
Return the path for the file for this Type.
A class for handling words, derived from string.
#define FatalErrorInFunction
Report an error message using Foam::FatalError.
defineTypeNameAndDebug(adjustTimeStepToCombustion, 0)
addToRunTimeSelectionTable(functionObject, adjustTimeStepToCombustion, dictionary)
const fileOperation & fileHandler()
Get current file handler.
errorManipArg< error, int > exit(error &err, const int errNo=1)
word name(const bool)
Return a word representation of a bool.
const dimensionSet dimless
scalarList W(const fluidMulticomponentThermo &thermo)
VolField< scalar > volScalarField
const dimensionSet dimMoles
const dimensionSet dimMass
dimensioned< scalar > dimensionedScalar
Dimensioned scalar obtained from generic dimensioned type.
PtrList< volScalarField > & Y
fluidMulticomponentThermo & thermo