32 template<
class ChemistryModelType>
39 writeHeader(
file(),
"Specie reaction rates");
40 volRegion::writeFileHeader(*
this,
file());
41 writeHeaderValue(
file(),
"nSpecie", chemistryModel_.nSpecie());
42 writeHeaderValue(
file(),
"nReaction", chemistryModel_.nReaction());
44 writeCommented(
file(),
"Time");
45 writeTabbed(
file(),
"Reaction");
48 chemistryModel_.thermo().composition().species();
52 writeTabbed(
file(), speciesNames[si]);
61 template<
class ChemistryModelType>
71 volRegion(fvMeshFunctionObject::mesh_, dict),
75 fvMeshFunctionObject::mesh_.lookupObject<ChemistryModelType>
81 resetName(
"specieReactionRates");
87 template<
class ChemistryModelType>
95 template<
class ChemistryModelType>
107 template<
class ChemistryModelType>
114 template<
class ChemistryModelType>
120 const label nReaction = chemistryModel_.nReaction();
123 const scalar V = this->V();
125 for (
label ri=0; ri<nReaction; ri++)
127 if (Pstream::master())
130 file() << token::TAB << ri;
137 chemistryModel_.calculateRR(ri, si)
154 if (Pstream::master())
156 file() << token::TAB << sumVRRi/V;
160 if (Pstream::master())
166 if (Pstream::master())
197 "psiSpecieReactionRates",
222 "rhoSpecieReactionRates",
#define forAll(list, i)
Loop across all elements in list.
intWM_LABEL_SIZE_t label
A label is an int32_t or int64_t as specified by the pre-processor macro WM_LABEL_SIZE.
Basic chemistry model templated on thermodynamics.
A list of keyword definitions, which are a keyword followed by any number of values (e...
virtual bool write()
Write the specie reaction rates.
Ostream & endl(Ostream &os)
Add newline and flush stream.
dimensioned< Type > domainIntegrate(const GeometricField< Type, fvPatchField, volMesh > &vf)
virtual bool execute()
Do nothing.
Abstract base-class for Time/database function objects.
Class to control time during OpenFOAM simulations that is also the top-level objectRegistry.
virtual bool read(const dictionary &)
Read the specieReactionRates data.
Macros for easy insertion into run-time selection tables.
bool isNull(const T &t)
Return true if t is a reference to the nullObject of type T.
Type gSum(const FieldField< Field, Type > &f)
A class for handling words, derived from string.
virtual ~specieReactionRates()
Destructor.
Volume integrate volField creating a volField.
defineTemplateTypeNameAndDebugWithName(GlobalIOField< scalar >, "scalarField", 0)
volScalarField scalarField(fieldObject, mesh)
addToRunTimeSelectionTable(ensightPart, ensightPartCells, istream)
Volume (cell) region selection class.
List< word > wordList
A List of words.
Writes the domain averaged reaction rates for each specie for each reaction into the file <timeDir>/s...
Field with dimensions and associated with geometry type GeoMesh which is used to size the field and a...
const scalar RR
Universal gas constant (default in [J/kmol/K])
Specialization of Foam::functionObject for an Foam::fvMesh, providing a reference to the Foam::fvMesh...
functionObjects::specieReactionRates< BasicChemistryModel< psiReactionThermo > > psiSpecieReactionRates
functionObjects::specieReactionRates< BasicChemistryModel< rhoReactionThermo > > rhoSpecieReactionRates
specieReactionRates(const word &name, const Time &runTime, const dictionary &dict)
Construct from Time and dictionary.
functionObject base class for creating, maintaining and writing log files e.g. integrated of averaged...