35template<
class ChemistryModelType>
42 writeHeader(
os,
"Specie reaction rates");
43 volRegion::writeFileHeader(*
this,
os);
44 writeHeaderValue(
os,
"nSpecie", chemistryModel_.nSpecie());
45 writeHeaderValue(
os,
"nReaction", chemistryModel_.nReaction());
47 writeCommented(
os,
"Time");
48 writeTabbed(
os,
"Reaction");
51 chemistryModel_.thermo().composition().species();
53 for (
const word& speciesName : speciesNames)
55 writeTabbed(
os, speciesName);
64template<
class ChemistryModelType>
90template<
class ChemistryModelType>
102template<
class ChemistryModelType>
109template<
class ChemistryModelType>
112 const label
nSpecie = chemistryModel_.nSpecie();
113 const label nReaction = chemistryModel_.nReaction();
121 for (label ri=0; ri<nReaction; ri++)
123 writeCurrentTime(file());
126 for (label si=0; si<
nSpecie; si++)
130 chemistryModel_.calculateRR(ri, si)
181 "psiSpecieReactionRates",
206 "rhoSpecieReactionRates",
Macros for easy insertion into run-time selection tables.
#define addToRunTimeSelectionTable(baseType, thisType, argNames)
Add to construction table with typeName as the key.
Basic chemistry model templated on thermodynamics.
DimensionedField< scalar, volMesh > Internal
Class to control time during OpenFOAM simulations that is also the top-level objectRegistry.
A list of keyword definitions, which are a keyword followed by a number of values (eg,...
Abstract base-class for Time/database function objects.
Specialization of Foam::functionObject for an Foam::fvMesh, providing a reference to the Foam::fvMesh...
const fvMesh & mesh_
Reference to the fvMesh.
fvMeshFunctionObject(const fvMeshFunctionObject &)=delete
No copy construct.
const ObjectType & lookupObject(const word &fieldName) const
Lookup and return object (eg, a field) from the (sub) objectRegistry.
const objectRegistry & obr_
Reference to the region objectRegistry.
virtual bool read(const dictionary &dict)
Read optional controls.
Writes the domain averaged reaction rates for each specie for each reaction into the file <timeDir>/s...
virtual bool read(const dictionary &dict)
Read the specieReactionRates data.
virtual bool execute()
Do nothing.
virtual bool write()
Write the specie reaction rates.
Volume (cell) region selection class.
bool useAllCells() const noexcept
Use all cells, not the cellIDs.
scalar V() const
Return total volume of the selected region.
volRegion(const fvMesh &mesh, const dictionary &dict)
Construct from fvMesh and dictionary.
bool update()
Update the cached values as required.
const labelList & cellIDs() const
Return the local list of cell IDs.
Base class for writing single files from the function objects.
writeFile(const objectRegistry &obr, const fileName &prefix, const word &name="undefined", const bool writeToFile=true, const string &ext=".dat")
Construct from objectRegistry, prefix, fileName.
virtual OFstream & file()
Return access to the file (if only 1).
virtual void writeCurrentTime(Ostream &os) const
Write the current time to stream.
A class for handling words, derived from Foam::string.
#define defineTemplateTypeNameAndDebugWithName(Type, Name, DebugSwitch)
Define the typeName and debug information, lookup as Name.
OBJstream os(runTime.globalPath()/outputName)
Volume integrate volField creating a volField.
dimensioned< Type > domainIntegrate(const GeometricField< Type, fvPatchField, volMesh > &vf)
List< word > wordList
List of word.
Type gSum(const FieldField< Field, Type > &f)
functionObjects::specieReactionRates< BasicChemistryModel< rhoReactionThermo > > rhoSpecieReactionRates
Field< scalar > scalarField
Specialisation of Field<T> for scalar.
const word GlobalIOList< Tuple2< scalar, vector > >::typeName("scalarVectorTable")
Ostream & endl(Ostream &os)
Add newline and flush stream.
word name(const expressions::valueTypeCode typeCode)
A word representation of a valueTypeCode. Empty for expressions::valueTypeCode::INVALID.
functionObjects::specieReactionRates< BasicChemistryModel< psiReactionThermo > > psiSpecieReactionRates
constexpr char nl
The newline '\n' character (0x0a).