53 int main(
int argc,
char *argv[])
63 IFstream propertiesFile(propertiesFileName);
66 if (!propertiesFile.good())
69 <<
"Cannot read file " << propertiesFileName
76 scalar
p(properties.lookup<scalar>(
"P"));
77 scalar
T0(properties.lookup<scalar>(
"T0"));
78 mixture rMix(properties.lookup(
"reactants"));
79 mixture pMix(properties.lookup(
"products"));
82 Info<<
nl <<
"Reading thermodynamic data dictionary" <<
endl;
87 IFstream thermoDataFile(thermoDataFileName);
90 if (!thermoDataFile.good())
93 <<
"Cannot read file " << thermoDataFileName
103 thermoData.subDict(rMix[0].name())
106 thermo reactants(rMix[0].volFrac()*reactant0.rho(
p,
T0)*reactant0);
108 for (
label i=1; i<rMix.size(); i++)
113 thermoData.subDict(rMix[i].name())
115 reactants += rMix[i].volFrac()*reactanti.rho(
p,
T0)*reactanti;
121 thermoData.subDict(pMix[0].name())
123 thermo products(pMix[0].volFrac()*product0.rho(
p,
T0)*product0);
125 for (
label i=1; i<pMix.size(); i++)
130 thermoData.subDict(pMix[i].name())
132 products += pMix[i].volFrac()*producti.rho(
p,
T0)*producti;
135 Info<<
"Adiabatic flame temperature of mixture " << rMix.name() <<
" = "
136 << products.Tha(reactants.ha(
p,
T0),
p, 1000.0) <<
" K" <<
endl;
Functions used by OpenFOAM that are specific to POSIX compliant operating systems and need to be repl...
Thermodynamics mapping class to expose the absolute enthalpy functions.
Extract command arguments and options from the supplied argc and argv parameters.
static SLList< string > validArgs
A list of valid (mandatory) arguments.
A list of keywords followed by any number of values (e.g. words and numbers) or sub-dictionaries.
A class for handling file names.
Basic thermodynamics type based on the use of fitting functions for cp, h, s obtained from the templa...
#define FatalErrorInFunction
Report an error message using Foam::FatalError.
Functions to search 'etc' directories for configuration files etc.
int main(int argc, char *argv[])
intWM_LABEL_SIZE_t label
A label is an int32_t or int64_t as specified by the pre-processor macro WM_LABEL_SIZE.
Ostream & endl(Ostream &os)
Add newline and flush stream.
errorManip< error > abort(error &err)
fileName findEtcFile(const fileName &, bool mandatory=false)
Search for a file using findEtcFiles.
word name(const LagrangianState state)
Return a string representation of a Lagrangian state enumeration.
Foam::argList args(argc, argv)
fluidMulticomponentThermo & thermo