54 const volScalarField::Boundary& tbf =
55 this->T_.boundaryField();
61 if (isA<fixedJumpFvPatchScalarField>(tbf[
patchi]))
63 const fixedJumpFvPatchScalarField& pf =
64 dynamic_cast<const fixedJumpFvPatchScalarField&
>(tbf[
patchi]);
66 hbt[
patchi] = pf.interfaceFieldType();
68 else if (isA<fixedJumpAMIFvPatchScalarField>(tbf[patchi]))
70 const fixedJumpAMIFvPatchScalarField& pf =
71 dynamic_cast<const fixedJumpAMIFvPatchScalarField&
> 76 hbt[
patchi] = pf.interfaceFieldType();
86 const volScalarField::Boundary& tbf =
87 this->T_.boundaryField();
93 if (isA<fixedValueFvPatchScalarField>(tbf[
patchi]))
95 hbt[
patchi] = fixedEnergyFvPatchScalarField::typeName;
99 isA<zeroGradientFvPatchScalarField>(tbf[patchi])
100 || isA<fixedGradientFvPatchScalarField>(tbf[patchi])
101 || isA<gradientEnergyCalculatedTemperatureFvPatchScalarField>
107 hbt[
patchi] = gradientEnergyFvPatchScalarField::typeName;
111 isA<mixedFvPatchScalarField>(tbf[patchi])
112 || isA<mixedEnergyCalculatedTemperatureFvPatchScalarField>
118 hbt[
patchi] = mixedEnergyFvPatchScalarField::typeName;
120 else if (isA<fixedJumpFvPatchScalarField>(tbf[patchi]))
124 else if (isA<fixedJumpAMIFvPatchScalarField>(tbf[patchi]))
171 const word& phaseName
178 phasePropertyName(
dictName, phaseName),
186 phaseName_(phaseName),
192 phasePropertyName(
"T"),
205 phasePropertyName(
"thermo:alpha"),
215 dpdt_(lookupOrDefault<Switch>(
"dpdt",
true))
223 const word& phaseName
230 phasePropertyName(
dictName, phaseName),
239 phaseName_(phaseName),
245 phasePropertyName(
"T"),
258 phasePropertyName(
"thermo:alpha"),
275 const word& phaseName
278 return New<basicThermo>(
mesh, phaseName);
307 iter != thermos.
end();
313 &(iter()->
he().internalField())
332 if (!(
he().
name() == phasePropertyName(a)))
335 <<
"Supported energy type is " << phasePropertyName(a)
336 <<
", thermodynamics package provides " <<
he().
name()
351 he().
name() == phasePropertyName(a)
352 ||
he().
name() == phasePropertyName(b)
357 <<
"Supported energy types are " << phasePropertyName(a)
358 <<
" and " << phasePropertyName(b)
359 <<
", thermodynamics package provides " <<
he().
name()
375 he().
name() == phasePropertyName(a)
376 ||
he().
name() == phasePropertyName(b)
377 ||
he().
name() == phasePropertyName(c)
382 <<
"Supported energy types are " << phasePropertyName(a)
383 <<
", " << phasePropertyName(b)
384 <<
" and " << phasePropertyName(c)
385 <<
", thermodynamics package provides " <<
he().
name()
402 he().
name() == phasePropertyName(a)
403 ||
he().
name() == phasePropertyName(b)
404 ||
he().
name() == phasePropertyName(c)
405 ||
he().
name() == phasePropertyName(d)
410 <<
"Supported energy types are " << phasePropertyName(a)
411 <<
", " << phasePropertyName(b)
412 <<
", " << phasePropertyName(c)
413 <<
" and " << phasePropertyName(d)
414 <<
", thermodynamics package provides " <<
he().
name()
422 const word& thermoName,
433 (endb = thermoName.find(
'<', beg)) != string::npos
434 || (endc = thermoName.find(
',', beg)) != string::npos
437 if (endb == string::npos)
441 else if ((endc = thermoName.find(
',', beg)) != string::npos)
443 end =
min(endb, endc);
452 cmpts[i] = thermoName.substr(beg, end-beg);
453 cmpts[i++].replaceAll(
">",
"");
472 if (beg < thermoName.size())
474 cmpts[i] = thermoName.substr(beg, string::npos);
475 cmpts[i].replaceAll(
">",
"");
virtual ~basicThermo()
Destructor.
#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.
const word & name() const
Return name.
Abstract 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
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...
virtual const volScalarField & T() const
Temperature [K].
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.
IOdictionary is derived from dictionary and IOobject to give the dictionary automatic IO functionalit...
const word dictName() const
Return the local dictionary name (final part of scoped name)
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.
PtrList< solidThermo > thermos(solidRegions.size())
wordList heBoundaryTypes()
Return the enthalpy/internal energy field boundary types.
const word & constant() const
Return constant name.
static const word null
An empty word.
const word dictName("particleTrackDict")
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.
volScalarField & lookupOrConstruct(const fvMesh &mesh, const char *name) const
defineRunTimeSelectionTable(reactionRateFlameArea, dictionary)
static Table::iterator lookupThermo(const dictionary &thermoTypeDict, Table *tablePtr, const int nCmpt, const char *cmptNames[], const word &thermoTypeName)
Generic lookup for thermodynamics package thermoTypeName.
defineTypeNameAndDebug(combustionModel, 0)
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.
basicThermo(const basicThermo &)
Construct as copy (not implemented)
Mesh data needed to do the Finite Volume discretisation.
const objectRegistry & db() const
Return local objectRegistry.
virtual bool read()
Read thermophysical properties dictionary.
An auto-pointer similar to the STL auto_ptr but with automatic casting to a reference to the type and...
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.
const DimensionedField< Type, volMesh > & internalField() const
Return dimensioned internal field reference.