101 iter != thermos.
end();
107 &(iter()->
he().internalField())
122 const word& thermoName,
133 (endb = thermoName.find(
'<', beg)) != string::npos
134 || (endc = thermoName.find(
',', beg)) != string::npos
137 if (endb == string::npos)
141 else if ((endc = thermoName.find(
',', beg)) != string::npos)
143 end =
min(endb, endc);
152 cmpts[i] = thermoName.substr(beg, end-beg);
153 cmpts[i++].replaceAll(
">",
"");
172 if (beg < thermoName.size())
174 cmpts[i] = thermoName.substr(beg, string::npos);
175 cmpts[i].replaceAll(
">",
"");
184 const word& thermoName
187 const wordList components(splitThermoName(thermoName, 5));
191 {
"transport", components[0]},
192 {
"thermo", components[1]},
193 {
"equationOfState", components[2]},
194 {
"specie", components[3]},
195 {
"energy", components[4]}
204 const volScalarField::Boundary& tbf =
T().boundaryField();
210 if (isA<fixedJumpFvPatchScalarField>(tbf[patchi]))
212 const fixedJumpFvPatchScalarField& pf =
213 dynamic_cast<const fixedJumpFvPatchScalarField&
>(tbf[
patchi]);
215 hbt[
patchi] = pf.interfaceFieldType();
217 else if (isA<fixedJumpAMIFvPatchScalarField>(tbf[patchi]))
219 const fixedJumpAMIFvPatchScalarField& pf =
220 dynamic_cast<const fixedJumpAMIFvPatchScalarField&
> 225 hbt[
patchi] = pf.interfaceFieldType();
235 const volScalarField::Boundary& tbf =
T().boundaryField();
241 if (isA<fixedValueFvPatchScalarField>(tbf[patchi]))
243 hbt[
patchi] = fixedEnergyFvPatchScalarField::typeName;
247 isA<zeroGradientFvPatchScalarField>(tbf[patchi])
248 || isA<fixedGradientFvPatchScalarField>(tbf[patchi])
249 || isA<gradientEnergyCalculatedTemperatureFvPatchScalarField>
255 hbt[
patchi] = gradientEnergyFvPatchScalarField::typeName;
259 isA<mixedFvPatchScalarField>(tbf[patchi])
260 || isA<mixedEnergyCalculatedTemperatureFvPatchScalarField>
266 hbt[
patchi] = mixedEnergyFvPatchScalarField::typeName;
268 else if (isA<fixedJumpFvPatchScalarField>(tbf[patchi]))
272 else if (isA<fixedJumpAMIFvPatchScalarField>(tbf[patchi]))
287 const word& phaseName
294 phasePropertyName(
dictName, phaseName),
302 phaseName_(phaseName),
308 phasePropertyName(
"T", phaseName),
321 phasePropertyName(
"thermo:alpha", phaseName),
331 dpdt_(lookupOrDefault<Switch>(
"dpdt",
true))
339 const word& phaseName
346 phasePropertyName(
dictName, phaseName),
355 phaseName_(phaseName),
361 phasePropertyName(
"T", phaseName),
374 phasePropertyName(
"thermo:alpha", phaseName),
391 const word& phaseName
394 return New<basicThermo>(
mesh, phaseName);
416 if (!(
he().
name() == phasePropertyName(a)))
419 <<
"Supported energy type is " << phasePropertyName(a)
420 <<
", thermodynamics package provides " <<
he().name()
435 he().
name() == phasePropertyName(a)
436 ||
he().
name() == phasePropertyName(b)
441 <<
"Supported energy types are " << phasePropertyName(a)
442 <<
" and " << phasePropertyName(b)
443 <<
", thermodynamics package provides " <<
he().name()
virtual ~basicThermo()
Destructor.
implementation(const fvMesh &, const word &phaseName)
Construct from mesh and phase name.
#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.
Base-class for fluid and solid thermodynamic properties.
errorManipArg< error, int > exit(error &err, const int errNo=1)
static iteratorEnd end()
iteratorEnd set to beyond the end of any HashTable
virtual bool read()
Read object.
A list of keyword definitions, which are a keyword followed by any number of values (e...
#define FatalErrorInFunction
Report an error message using Foam::FatalError.
static const char *const typeName
const Boundary & boundaryField() const
Return const-reference to the boundary field.
virtual const volScalarField & alpha() const
Return the thermal diffusivity for enthalpy of mixture [kg/m/s].
bool foundObject(const word &name) const
Is the named Type found?
Abstract base class with a fat-interface to all derived classes covering all possible ways in which t...
static word timeName(const scalar, const int precision=precision_)
Return time name of given scalar time.
const Time & time() const
Return the top-level database.
static autoPtr< Thermo > New(const fvMesh &, const word &phaseName=word::null)
Generic New for each of the related thermodynamics packages.
const Type & lookupObject(const word &name) const
Lookup and return the object of the given Type.
virtual ~implementation()
Destructor.
IOdictionary is derived from dictionary and IOobject to give the dictionary automatic IO functionalit...
An STL-conforming iterator.
Dimension set for the base types.
wordList heBoundaryBaseTypes()
Return the enthalpy/internal energy field boundary base types.
static wordList splitThermoName(const word &thermoName, const int nCmpt)
Split name of thermo package into a list of the components names.
A class for handling words, derived from string.
wordList heBoundaryTypes()
Return the enthalpy/internal energy field boundary types.
virtual const volScalarField & T() const
Temperature [K].
const word & constant() const
Return constant name.
static const word null
An empty word.
iterator begin()
Iterator set to the beginning of the HashTable.
An STL-conforming hash table.
graph_traits< Graph >::vertices_size_type size_type
void store()
Transfer ownership of this object to its registry.
static const word dictName
Name of the thermophysical properties dictionary.
defineRunTimeSelectionTable(reactionRateFlameArea, dictionary)
defineTypeNameAndDebug(combustionModel, 0)
void T(FieldField< Field, Type > &f1, const FieldField< Field, Type > &f2)
dimensioned< Type > min(const dimensioned< Type > &, const dimensioned< Type > &)
word name(const complex &)
Return a string representation of a complex.
List< word > wordList
A List of words.
dimensioned< scalar > dimensionedScalar
Dimensioned scalar obtained from generic dimensioned type.
Mesh data needed to do the Finite Volume discretisation.
const objectRegistry & db() const
Return local objectRegistry.
static const basicThermo & lookupThermo(const fvPatchScalarField &pf)
Lookup the thermo associated with the given patch field.
An auto-pointer similar to the STL auto_ptr but with automatic casting to a reference to the type and...
virtual bool read()
Read thermophysical properties dictionary.
void validate(const string &app, const word &) const
Check that the thermodynamics package is consistent.
IOobject defines the attributes of an object for which implicit objectRegistry management is supporte...
HashTable< const Type * > lookupClass(const bool strict=false) const
Lookup and return all objects of the given Type.
static List< Pair< word > > thermoNameComponents(const word &thermoName)
Split name of thermo package into a list of named components names.
const word dictName("noiseDict")
static volScalarField & lookupOrConstruct(const fvMesh &mesh, const char *name)
Lookup and the named field, or construct it as MUST-READ if it is.
const DimensionedField< Type, volMesh > & internalField() const
Return dimensioned internal field reference.