56 for (
label i=1; i<
Y_.size(); i++)
61 if (
min(Yt).value() == 0 &&
max(Yt).value() == 0)
64 <<
"Sum of specie mass fractions = 0"
68 if (
min(Yt).value() < 0.999)
71 <<
"Min sum of specie mass fractions " <<
min(Yt).value()
76 if (
max(Yt).value() > 1.001)
79 <<
"Max sum of specie mass fractions " <<
max(Yt).value()
100 const bool requiresDefaultSpecie
105 requiresDefaultSpecie &&
species.size()
106 ?
dict.lookupBackwardsCompatible<
word>
108 {
"defaultSpecie",
"inertSpecie"}
123 && defaultSpecieName_ !=
"undefined"
124 && defaultSpeciei_ == -1
128 <<
"default specie " << defaultSpecieName_
129 <<
" not found in available species " <<
species
146 if (header.headerOk())
171 if (!Ydefault_.valid())
207 if (Yset && defaultSpeciei_ != -1)
228 return defaultSpeciei_;
254 if (Ydefault_.valid())
277 if (defaultSpeciei_ != -1)
296 Y()[i].max(scalar(0));
301 Y()[defaultSpeciei_] = scalar(1) - Yt;
302 Y()[defaultSpeciei_].max(scalar(0));
#define forAll(list, i)
Loop across all elements in list.
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)
void size(const label)
Override size to be inconsistent with allocated storage.
static void listCombineGather(const List< commsStruct > &comms, List< T > &Value, const CombineOp &cop, const int tag, const label comm)
static void listCombineScatter(const List< commsStruct > &comms, List< T > &Value, const int tag, const label comm)
Scatter data. Reverse of combineGather.
A templated 1D list of pointers to objects of type <T>, where the size of the array is known and used...
static bool & parRun()
Is this a parallel run?
virtual const fvMesh & mesh() const =0
Return const access to the mesh.
virtual const word & phaseName() const =0
Phase name.
A list of keywords followed by any number of values (e.g. words and numbers) or sub-dictionaries.
const word & name() const
Return const reference to name.
Mesh data needed to do the Finite Volume discretisation.
const Time & time() const
Return the top-level database.
A wordList with hashed indices for faster lookup by name.
virtual ~implementation()
Destructor.
virtual label defaultSpecie() const
The index of the default specie.
virtual void normaliseY()
Normalise the mass fractions by clipping positive and deriving.
virtual void syncSpeciesActive() const
Synchronise the specie active flags.
virtual PtrList< volScalarField > & Y()
Access the mass-fraction fields.
void correctMassFractions(const speciesTable &species)
Scale the mass fractions to sum to 1.
implementation(const dictionary &, const speciesTable &, const fvMesh &, const word &, const bool requiresDefaultSpecie=true)
Construct from dictionary, specie names, mesh and phase name.
PtrList< volScalarField > Y_
Species mass fractions.
Base-class for multi-component thermodynamic properties.
virtual const speciesTable & species() const =0
Return the table of species.
bool solveSpecie(const label speciei) const
Should the given specie be solved for? I.e., is it active and.
virtual const boolList & speciesActive() const =0
Access the specie active flags.
virtual PtrList< volScalarField > & Y()=0
Access the mass-fraction fields.
virtual ~multicomponentThermo()
Destructor.
A class for managing temporary objects.
T & ref() const
Return non-const reference or generate a fatal error.
Templated form of IOobject providing type information for file reading and header type checking.
A class for handling words, derived from string.
#define FatalIOErrorInFunction(ios)
Report an error message using Foam::FatalIOError.
#define FatalErrorInFunction
Report an error message using Foam::FatalError.
const char *const group
Group name for atomic constants.
errorManipArg< error, int > exit(error &err, const int errNo=1)
const dimensionSet & dimless
intWM_LABEL_SIZE_t label
A label is an int32_t or int64_t as specified by the pre-processor macro WM_LABEL_SIZE.
String typeName(const std::type_info &info)
Return the un-mangled name given the standard type info.
VolField< scalar > volScalarField
dimensioned< Type > min(const DimensionedField< Type, GeoMesh, PrimitiveField > &df)
defineTypeNameAndDebug(atmosphericBoundaryLayer, 0)
dimensioned< Type > max(const DimensionedField< Type, GeoMesh, PrimitiveField > &df)
dimensioned< scalar > dimensionedScalar
Dimensioned scalar obtained from generic dimensioned type.