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"),
208 dpdt_(lookupOrDefault<Switch>(
"dpdt",
true))
216 const word& phaseName
223 phasePropertyName(
dictName, phaseName),
232 phaseName_(phaseName),
234 p_(lookupOrConstruct(mesh,
"p")),
240 phasePropertyName(
"T"),
253 phasePropertyName(
"thermo:alpha"),
270 const word& phaseName
273 return New<basicThermo>(
mesh, phaseName);
302 iter != thermos.
end();
308 &(iter()->
he().internalField())
327 if (!(
he().
name() == phasePropertyName(a)))
330 <<
"Supported energy type is " << phasePropertyName(a)
331 <<
", thermodynamics package provides " <<
he().
name()
346 he().
name() == phasePropertyName(a)
347 ||
he().
name() == phasePropertyName(b)
352 <<
"Supported energy types are " << phasePropertyName(a)
353 <<
" and " << phasePropertyName(b)
354 <<
", thermodynamics package provides " <<
he().
name()
370 he().
name() == phasePropertyName(a)
371 ||
he().
name() == phasePropertyName(b)
372 ||
he().
name() == phasePropertyName(c)
377 <<
"Supported energy types are " << phasePropertyName(a)
378 <<
", " << phasePropertyName(b)
379 <<
" and " << phasePropertyName(c)
380 <<
", thermodynamics package provides " <<
he().
name()
397 he().
name() == phasePropertyName(a)
398 ||
he().
name() == phasePropertyName(b)
399 ||
he().
name() == phasePropertyName(c)
400 ||
he().
name() == phasePropertyName(d)
405 <<
"Supported energy types are " << phasePropertyName(a)
406 <<
", " << phasePropertyName(b)
407 <<
", " << phasePropertyName(c)
408 <<
" and " << phasePropertyName(d)
409 <<
", thermodynamics package provides " <<
he().
name()
417 const word& thermoName,
428 (endb = thermoName.find(
'<', beg)) != string::npos
429 || (endc = thermoName.find(
',', beg)) != string::npos
432 if (endb == string::npos)
436 else if ((endc = thermoName.find(
',', beg)) != string::npos)
438 end =
min(endb, endc);
447 cmpts[i] = thermoName.substr(beg, end-beg);
448 cmpts[i++].replaceAll(
">",
"");
467 if (beg < thermoName.size())
469 cmpts[i] = thermoName.substr(beg, string::npos);
470 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.
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.
fileType type(const fileName &, const bool checkVariants=true, const bool followLink=true)
Return the file type: directory or file.
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.