60int main(
int argc,
char *argv[])
64 "Calculate the equilibrium level of carbon monoxide."
73 Info<<
nl <<
"Reading thermodynamic data IOdictionary" <<
endl;
90 const scalar
T = 3000.0;
93 thermo O2(thermoData.subDict(
"O2")); O2 *= O2.W();
97 thermo H2(thermoData.subDict(
"H2")); H2 *= H2.W();
98 thermo OH(thermoData.subDict(
"OH")); OH *= OH.W();
99 thermo H(thermoData.subDict(
"H"));
H *=
H.W();
100 thermo O(thermoData.subDict(
"O")); O *= O.W();
103 thermo CO2(thermoData.subDict(
"CO2")); CO2 *= CO2.W();
105 thermo CO(thermoData.subDict(
"CO")); CO *= CO.W();
109 EQreactions.emplace_back((CO2 == CO + 0.5*O2));
110 EQreactions.emplace_back((O2 == 2*O));
111 EQreactions.emplace_back((
H2O == H2 + 0.5*O2));
112 EQreactions.emplace_back((
H2O ==
H + OH));
115 for (
const thermo& react : EQreactions)
117 Info<<
"Kc(EQreactions) = " << react.Kc(P,
T) <<
endl;
Istream and Ostream manipulators taking arguments.
Functions used by OpenFOAM that are specific to POSIX compliant operating systems and need to be repl...
IOdictionary is derived from dictionary and IOobject to give the dictionary automatic IO functionalit...
@ NO_REGISTER
Do not request registration (bool: false).
@ NO_WRITE
Ignore writing from objectRegistry::writeObject().
Defines the attributes of an object for which implicit objectRegistry management is supported,...
A dynamically resizable PtrList with allocation management.
Thermodynamics mapping class to expose the absolute enthalpy functions.
static void noFunctionObjects(bool addWithOption=false)
Remove '-noFunctionObjects' option and ignore any occurrences.
static void noParallel()
Remove the parallel options.
static void addNote(const string ¬e)
Add extra notes for the usage information.
Basic thermodynamics type based on the use of fitting functions for cp, h, s obtained from the templa...
scalar W() const
Molecular weight [kg/kmol].
volScalarField H(IOobject("H", runTime.timeName(), mesh.thisDb(), IOobject::NO_READ, IOobject::AUTO_WRITE), mesh, dimensionedScalar(dimLength, Zero))
messageStream Info
Information stream (stdout output on master, null elsewhere).
Ostream & endl(Ostream &os)
Add newline and flush stream.
constexpr char nl
The newline '\n' character (0x0a).