52 const volScalarField::Boundary& tbf =
53 this->T_.boundaryField();
59 if (isA<fixedJumpFvPatchScalarField>(tbf[
patchi]))
61 const fixedJumpFvPatchScalarField& pf =
62 dynamic_cast<const fixedJumpFvPatchScalarField&
>(tbf[
patchi]);
64 hbt[
patchi] = pf.interfaceFieldType();
66 else if (isA<fixedJumpAMIFvPatchScalarField>(tbf[patchi]))
68 const fixedJumpAMIFvPatchScalarField& pf =
69 dynamic_cast<const fixedJumpAMIFvPatchScalarField&
> 74 hbt[
patchi] = pf.interfaceFieldType();
84 const volScalarField::Boundary& tbf =
85 this->T_.boundaryField();
91 if (isA<fixedValueFvPatchScalarField>(tbf[
patchi]))
93 hbt[
patchi] = fixedEnergyFvPatchScalarField::typeName;
97 isA<zeroGradientFvPatchScalarField>(tbf[patchi])
98 || isA<fixedGradientFvPatchScalarField>(tbf[patchi])
101 hbt[
patchi] = gradientEnergyFvPatchScalarField::typeName;
103 else if (isA<mixedFvPatchScalarField>(tbf[patchi]))
105 hbt[
patchi] = mixedEnergyFvPatchScalarField::typeName;
107 else if (isA<fixedJumpFvPatchScalarField>(tbf[patchi]))
111 else if (isA<fixedJumpAMIFvPatchScalarField>(tbf[patchi]))
115 else if (tbf[patchi].
type() ==
"energyRegionCoupledFvPatchScalarField")
117 hbt[
patchi] =
"energyRegionCoupledFvPatchScalarField";
162 const word& phaseName
169 phasePropertyName(
dictName, phaseName),
177 phaseName_(phaseName),
179 p_(lookupOrConstruct(mesh,
"p")),
185 phasePropertyName(
"T"),
198 phasePropertyName(
"thermo:alpha"),
213 dpdt_(lookupOrDefault<Switch>(
"dpdt",
true))
221 const word& phaseName
228 phasePropertyName(
dictName, phaseName),
237 phaseName_(phaseName),
239 p_(lookupOrConstruct(mesh,
"p")),
245 phasePropertyName(
"T"),
258 phasePropertyName(
"thermo:alpha"),
280 const word& phaseName
283 return New<basicThermo>(
mesh, phaseName);
312 iter != thermos.
end();
318 &(iter()->
he().internalField())
337 if (!(
he().
name() == phasePropertyName(a)))
340 <<
"Supported energy type is " << phasePropertyName(a)
341 <<
", thermodynamics package provides " <<
he().
name()
356 he().
name() == phasePropertyName(a)
357 ||
he().
name() == phasePropertyName(b)
362 <<
"Supported energy types are " << phasePropertyName(a)
363 <<
" and " << phasePropertyName(b)
364 <<
", thermodynamics package provides " <<
he().
name()
380 he().
name() == phasePropertyName(a)
381 ||
he().
name() == phasePropertyName(b)
382 ||
he().
name() == phasePropertyName(c)
387 <<
"Supported energy types are " << phasePropertyName(a)
388 <<
", " << phasePropertyName(b)
389 <<
" and " << phasePropertyName(c)
390 <<
", thermodynamics package provides " <<
he().
name()
407 he().
name() == phasePropertyName(a)
408 ||
he().
name() == phasePropertyName(b)
409 ||
he().
name() == phasePropertyName(c)
410 ||
he().
name() == phasePropertyName(d)
415 <<
"Supported energy types are " << phasePropertyName(a)
416 <<
", " << phasePropertyName(b)
417 <<
", " << phasePropertyName(c)
418 <<
" and " << phasePropertyName(d)
419 <<
", thermodynamics package provides " <<
he().
name()
427 const word& thermoName,
438 (endb = thermoName.find(
'<', beg)) != string::npos
439 || (endc = thermoName.find(
',', beg)) != string::npos
442 if (endb == string::npos)
446 else if ((endc = thermoName.find(
',', beg)) != string::npos)
448 end =
min(endb, endc);
457 cmpts[i] = thermoName.substr(beg, end-beg);
458 cmpts[i++].replaceAll(
">",
"");
477 if (beg < thermoName.size())
479 cmpts[i] = thermoName.substr(beg, string::npos);
480 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)
virtual volScalarField & p()
Pressure [Pa].
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.
fileName::Type type(const fileName &, const bool followLink=true)
Return the file type: DIRECTORY or FILE.
List< word > wordList
A List of words.
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.