Base-class for fluid and solid thermodynamic properties. More...
Classes | |
class | implementation |
Public Member Functions | |
TypeName ("basicThermo") | |
Runtime type information. More... | |
declareRunTimeSelectionTable (autoPtr, basicThermo, fvMesh,(const fvMesh &mesh, const word &phaseName),(mesh, phaseName)) | |
Declare run-time constructor selection table. More... | |
virtual | ~basicThermo () |
Destructor. More... | |
virtual const IOdictionary & | properties () const =0 |
Properties dictionary. More... | |
virtual IOdictionary & | properties ()=0 |
Non-const access the properties dictionary. More... | |
virtual const word & | phaseName () const =0 |
Phase name. More... | |
word | phasePropertyName (const word &name) const |
Name of a property for a given phase. More... | |
void | validate (const string &app, const word &) const |
Check that the thermodynamics package is consistent. More... | |
void | validate (const string &app, const word &, const word &) const |
Check that the thermodynamics package is consistent. More... | |
virtual void | correct ()=0 |
Update properties. More... | |
virtual word | thermoName () const =0 |
Name of the thermo physics. More... | |
virtual bool | incompressible () const =0 |
Return true if the equation of state is incompressible. More... | |
virtual bool | isochoric () const =0 |
Return true if the equation of state is isochoric. More... | |
virtual Switch | dpdt () const =0 |
Should the dpdt term be included in the enthalpy equation. More... | |
virtual tmp< volScalarField > | rho () const =0 |
Density [kg/m^3]. More... | |
virtual tmp< scalarField > | rho (const label patchi) const =0 |
Density for patch [kg/m^3]. More... | |
virtual tmp< volScalarField > | rho0 () const =0 |
Old-time density [kg/m^3]. More... | |
virtual volScalarField & | he ()=0 |
Enthalpy/Internal energy [J/kg]. More... | |
virtual const volScalarField & | he () const =0 |
Enthalpy/Internal energy [J/kg]. More... | |
virtual tmp< volScalarField > | he (const volScalarField &p, const volScalarField &T) const =0 |
Enthalpy/Internal energy. More... | |
virtual tmp< scalarField > | he (const scalarField &T, const labelList &cells) const =0 |
Enthalpy/Internal energy for cell-set [J/kg]. More... | |
virtual tmp< scalarField > | he (const scalarField &T, const label patchi) const =0 |
Enthalpy/Internal energy for patch [J/kg]. More... | |
virtual tmp< volScalarField > | hs () const =0 |
Sensible enthalpy [J/kg]. More... | |
virtual tmp< volScalarField > | hs (const volScalarField &p, const volScalarField &T) const =0 |
Sensible enthalpy. More... | |
virtual tmp< scalarField > | hs (const scalarField &T, const labelList &cells) const =0 |
Sensible enthalpy for cell-set [J/kg]. More... | |
virtual tmp< scalarField > | hs (const scalarField &T, const label patchi) const =0 |
Sensible enthalpy for patch [J/kg]. More... | |
virtual tmp< volScalarField > | ha () const =0 |
Absolute enthalpy [J/kg]. More... | |
virtual tmp< volScalarField > | ha (const volScalarField &p, const volScalarField &T) const =0 |
Absolute enthalpy. More... | |
virtual tmp< scalarField > | ha (const scalarField &T, const labelList &cells) const =0 |
Absolute enthalpy for cell-set [J/kg]. More... | |
virtual tmp< scalarField > | ha (const scalarField &T, const label patchi) const =0 |
Absolute enthalpy for patch [J/kg]. More... | |
virtual tmp< volScalarField > | hc () const =0 |
Enthalpy of formation [J/kg]. More... | |
virtual tmp< volScalarField > | THE (const volScalarField &h, const volScalarField &p, const volScalarField &T0) const =0 |
Temperature from enthalpy/internal energy. More... | |
virtual tmp< scalarField > | THE (const scalarField &h, const scalarField &T0, const labelList &cells) const =0 |
Temperature from enthalpy/internal energy for cell-set. More... | |
virtual tmp< scalarField > | THE (const scalarField &h, const scalarField &T0, const label patchi) const =0 |
Temperature from enthalpy/internal energy for patch. More... | |
virtual const volScalarField & | Cp () const =0 |
Heat capacity at constant pressure [J/kg/K]. More... | |
virtual const volScalarField & | Cv () const =0 |
Heat capacity at constant volume [J/kg/K]. More... | |
virtual const volScalarField & | kappa () const =0 |
Thermal conductivity of mixture [W/m/K]. More... | |
virtual const volScalarField & | T () const =0 |
Temperature [K]. More... | |
virtual volScalarField & | T ()=0 |
Temperature [K]. More... | |
virtual tmp< scalarField > | Cp (const scalarField &T, const label patchi) const =0 |
Heat capacity at constant pressure for patch [J/kg/K]. More... | |
virtual tmp< scalarField > | Cv (const scalarField &T, const label patchi) const =0 |
Heat capacity at constant volume for patch [J/kg/K]. More... | |
virtual tmp< volScalarField > | Cpv () const =0 |
Heat capacity at constant pressure/volume [J/kg/K]. More... | |
virtual tmp< scalarField > | Cpv (const scalarField &T, const label patchi) const =0 |
Heat capacity at constant pressure/volume for patch [J/kg/K]. More... | |
virtual tmp< volScalarField > | alphahe () const =0 |
Thermal diffusivity of energy of mixture [kg/m/s]. More... | |
virtual tmp< scalarField > | alphahe (const label patchi) const =0 |
Thermal diffusivity of energy of mixture for patch [kg/m/s]. More... | |
template<class Thermo > | |
Foam::autoPtr< Thermo > | New (const fvMesh &mesh, const word &phaseName) |
Static Public Member Functions | |
static word | phasePropertyName (const word &name, const word &phaseName) |
Name of a property for a given phase. More... | |
static const basicThermo & | lookupThermo (const fvPatchScalarField &pf) |
Lookup the thermo associated with the given patch field. More... | |
static wordList | splitThermoName (const word &thermoName, const int nCmpt) |
Split name of thermo package into a list of the components names. More... | |
static List< Pair< word > > | thermoNameComponents (const word &thermoName) |
Split name of thermo package into a list of named components names. More... | |
template<class Thermo > | |
static autoPtr< Thermo > | New (const fvMesh &, const word &phaseName=word::null) |
Generic New for each of the related thermodynamics packages. More... | |
static autoPtr< basicThermo > | New (const fvMesh &, const word &phaseName=word::null) |
Specialisation of the Generic New for basicThermo. More... | |
Protected Member Functions | |
wordList | heBoundaryTypes () |
Enthalpy/internal energy field boundary types. More... | |
wordList | heBoundaryBaseTypes () |
Enthalpy/internal energy field boundary base types. More... | |
Static Protected Member Functions | |
static volScalarField & | lookupOrConstruct (const fvMesh &mesh, const char *name) |
Lookup and the named field, or construct it as MUST-READ if it is. More... | |
template<class Thermo , class Table > | |
static Table::iterator | lookupCstrIter (const dictionary &thermoTypeDict, Table *tablePtr, const int nCmpt, const char *cmptNames[], const word &thermoTypeName) |
Get the constructor iterator for the given thermo dictionary and. More... | |
template<class Thermo , class Table > | |
static Table::iterator | lookupCstrIter (const dictionary &thermoDict, Table *tablePtr) |
Get the constructor iterator for the given thermo dictionary and. More... | |
Base-class for fluid and solid thermodynamic properties.
The basicThermo class is the pure virtual interface, plus static data and functions, including the selection table. It is default-constructable and holds no non-static data.
The basicThermo::implementation class contains the class data, non-default construction and other implementation details.
This structure allows for arbitrary mixing of the interfaces. Derived levels should implement a similar separation of interface and implementation. All interface classes should be default-constructable, and should be inherited virtually into whatever interfaces are required. Implementation classes should virtually inherit from their corresponding interface class and *not* a lower level implementation class.
In derived levels that are complete enough to act as the base of a thermodynamic instantiation, an additional *::composite sub class should be defined, which (non-virtually) inherits from all the *::implementation classes that it needs. This way, the composite class composes an interface for which diamond patterns are resolved by virtual inheritance, whilst also obtaining a single copy of all the implementation classes it needs to form a complete implementation. The use of virtual inheritance does not result in additional constructor calls propagating further down the hierarchy (into heThermo and similar) because all virtually inherited interface classes are default constructable.
Definition at line 77 of file basicThermo.H.
|
virtual |
Destructor.
Definition at line 334 of file basicThermo.C.
Referenced by basicThermo::phasePropertyName().
|
staticprotected |
Lookup and the named field, or construct it as MUST-READ if it is.
not found, and return a reference
Definition at line 51 of file basicThermo.C.
References IOobject::AUTO_WRITE, basicThermo::lookupThermo(), mesh, IOobject::MUST_READ, Foam::name(), regIOobject::store(), fvMesh::time(), and Time::timeName().
|
staticprotected |
Get the constructor iterator for the given thermo dictionary and.
entries and constructor iterator table
Definition at line 34 of file basicThermoTemplates.C.
References DynamicList< T, SizeInc, SizeMult, SizeDiv >::append(), Foam::exit(), Foam::FatalError, FatalErrorInFunction, forAll, dictionary::lookup(), Foam::nl, Foam::printTable(), List< T >::size(), and thermo.
|
staticprotected |
Get the constructor iterator for the given thermo dictionary and.
constructor iterator table
Definition at line 138 of file basicThermoTemplates.C.
References Foam::endl(), Foam::exit(), Foam::FatalError, FatalErrorInFunction, dictionary::found(), Foam::Info, dictionary::isDict(), dictionary::lookup(), basicThermo::New(), Foam::nl, and dictionary::subDict().
|
protected |
Enthalpy/internal energy field boundary types.
by interrogating the temperature field boundary types
Definition at line 228 of file basicThermo.C.
References forAll, basicThermo::implementation::implementation(), patchi, Foam::T(), Field< Type >::typeName, and GeometricBoundaryField< Type, PatchField, GeoMesh >::types().
|
protected |
Enthalpy/internal energy field boundary base types.
by interrogating the temperature field boundary types
Definition at line 200 of file basicThermo.C.
References forAll, word::null, patchi, UPtrList< T >::size(), and Foam::T().
TypeName | ( | "basicThermo" | ) |
Runtime type information.
declareRunTimeSelectionTable | ( | autoPtr | , |
basicThermo | , | ||
fvMesh | , | ||
(const fvMesh &mesh, const word &phaseName) | , | ||
(mesh, phaseName) | |||
) |
Declare run-time constructor selection table.
Name of a property for a given phase.
Definition at line 150 of file basicThermo.H.
References IOobject::groupName(), basicThermo::lookupThermo(), basicThermo::New(), word::null, basicThermo::phaseName(), basicThermo::properties(), basicThermo::splitThermoName(), basicThermo::thermoName(), basicThermo::thermoNameComponents(), and basicThermo::~basicThermo().
Referenced by combustionModel::New(), basicChemistryModel::New(), and basicThermo::phasePropertyName().
|
static |
Lookup the thermo associated with the given patch field.
Definition at line 83 of file basicThermo.C.
References HashTable< T, Key, Hash >::begin(), fvPatchField< Type >::db(), HashTableCore::end(), objectRegistry::foundObject(), he(), fvPatchField< Type >::internalField(), objectRegistry::lookupClass(), objectRegistry::lookupObject(), and basicThermo::splitThermoName().
Referenced by basicThermo::lookupOrConstruct(), basicThermo::phasePropertyName(), fixedEnergyFvPatchScalarField::updateCoeffs(), energyJumpFvPatchScalarField::updateCoeffs(), energyJumpAMIFvPatchScalarField::updateCoeffs(), gradientEnergyFvPatchScalarField::updateCoeffs(), and mixedEnergyFvPatchScalarField::updateCoeffs().
|
static |
Split name of thermo package into a list of the components names.
Definition at line 119 of file basicThermo.C.
References Foam::min(), and basicThermo::thermoNameComponents().
Referenced by basicThermo::lookupThermo(), and basicThermo::phasePropertyName().
|
static |
Split name of thermo package into a list of named components names.
Definition at line 181 of file basicThermo.C.
Referenced by basicThermo::phasePropertyName(), and basicThermo::splitThermoName().
|
static |
Generic New for each of the related thermodynamics packages.
Referenced by basicThermo::implementation::implementation(), basicThermo::lookupCstrIter(), and basicThermo::phasePropertyName().
|
static |
Specialisation of the Generic New for basicThermo.
Definition at line 323 of file basicThermo.C.
References mesh.
|
pure virtual |
Properties dictionary.
Implemented in basicThermo::implementation.
Referenced by parcelThermo::parcelThermo(), and basicThermo::phasePropertyName().
|
pure virtual |
Non-const access the properties dictionary.
Implemented in basicThermo::implementation.
|
pure virtual |
Phase name.
Implemented in basicThermo::implementation.
Referenced by basicThermo::phasePropertyName().
Name of a property for a given phase.
Definition at line 206 of file basicThermo.H.
References basicThermo::alphahe(), cells, basicThermo::correct(), basicThermo::Cp(), basicThermo::Cpv(), basicThermo::Cv(), basicThermo::dpdt(), Foam::constant::universal::h, basicThermo::ha(), basicThermo::hc(), basicThermo::he(), basicThermo::hs(), basicThermo::incompressible(), basicThermo::isochoric(), basicThermo::kappa(), p, patchi, basicThermo::phaseName(), basicThermo::phasePropertyName(), basicThermo::rho(), basicThermo::rho0(), basicThermo::T(), T0, basicThermo::THE(), basicThermo::thermoName(), and basicThermo::validate().
Check that the thermodynamics package is consistent.
with energy forms supported by the application
Definition at line 345 of file basicThermo.C.
References Foam::exit(), Foam::FatalError, FatalErrorInFunction, he(), and Foam::name().
Referenced by basicThermo::phasePropertyName(), and basicThermo::implementation::~implementation().
Check that the thermodynamics package is consistent.
with energy forms supported by the application
Definition at line 360 of file basicThermo.C.
References Foam::exit(), Foam::FatalError, FatalErrorInFunction, he(), and Foam::name().
|
pure virtual |
Update properties.
Implemented in solidDisplacementThermo, and psiuReactionThermo.
Referenced by radiation::addSup(), Foam::hydrostaticInitialisation(), and basicThermo::phasePropertyName().
|
pure virtual |
Name of the thermo physics.
Implemented in solidDisplacementThermo.
Referenced by basicChemistryModel::New(), and basicThermo::phasePropertyName().
|
pure virtual |
Return true if the equation of state is incompressible.
i.e. rho != f(p)
Implemented in solidDisplacementThermo.
Referenced by basicThermo::phasePropertyName().
|
pure virtual |
Return true if the equation of state is isochoric.
i.e. rho = const
Implemented in solidDisplacementThermo.
Referenced by basicThermo::phasePropertyName().
|
pure virtual |
Should the dpdt term be included in the enthalpy equation.
Implemented in basicThermo::implementation.
Referenced by basicThermo::phasePropertyName().
|
pure virtual |
Density [kg/m^3].
Implemented in solidThermo::implementation, rhoThermo::implementation, psiThermo::implementation, solidDisplacementThermo, psiThermo, rhoThermo, and solidThermo.
Referenced by adsorptionMassFractionFvPatchScalarField::calcPhiYp(), semiPermeableBaffleMassFractionFvPatchScalarField::calcPhiYp(), wallHeatTransferCoeff::execute(), Foam::hydrostaticInitialisation(), and basicThermo::phasePropertyName().
|
pure virtual |
Density for patch [kg/m^3].
Implemented in solidThermo::implementation, rhoThermo::implementation, psiThermo::implementation, solidDisplacementThermo, psiThermo, rhoThermo, and solidThermo.
|
pure virtual |
Old-time density [kg/m^3].
Implemented in solidThermo::implementation, rhoThermo::implementation, psiThermo::implementation, psiThermo, rhoThermo, and solidThermo.
Referenced by basicThermo::phasePropertyName().
|
pure virtual |
Enthalpy/Internal energy [J/kg].
Non-const access allowed for transport equations
Implemented in solidDisplacementThermo.
Referenced by clouds::addSup(), radiation::addSupFields(), buoyancyEnergy::addSupFields(), heatSource::addSupFields(), solidEquilibriumEnergySource::addSupFields(), heatTransfer::addSupFields(), interRegionHeatTransfer::addSupFields(), clouds::addSupFields(), effectivenessHeatExchangerSource::addSupFields(), solidificationMeltingSource::addSupFields(), limitTemperature::constrain(), fixedTemperatureConstraint::constrain(), limitTemperature::constrainedFields(), fixedTemperatureConstraint::constrainedFields(), thermoSingleLayer::correctHforMappedT(), waxSolventEvaporation::correctModel(), solidification::correctModel(), basicThermo::phasePropertyName(), externalCoupledTemperatureMixedFvPatchScalarField::transferData(), fixedEnergyFvPatchScalarField::updateCoeffs(), energyJumpFvPatchScalarField::updateCoeffs(), energyJumpAMIFvPatchScalarField::updateCoeffs(), gradientEnergyFvPatchScalarField::updateCoeffs(), mixedEnergyFvPatchScalarField::updateCoeffs(), specieTransferTemperatureFvPatchScalarField::updateCoeffs(), and alphatJayatillekeWallFunctionFvPatchScalarField::updateCoeffs().
|
pure virtual |
Enthalpy/Internal energy [J/kg].
Implemented in solidDisplacementThermo.
|
pure virtual |
Enthalpy/Internal energy.
for given pressure and temperature [J/kg]
Implemented in solidDisplacementThermo.
|
pure virtual |
Enthalpy/Internal energy for cell-set [J/kg].
Implemented in solidDisplacementThermo.
|
pure virtual |
Enthalpy/Internal energy for patch [J/kg].
Implemented in solidDisplacementThermo.
|
pure virtual |
Sensible enthalpy [J/kg].
Implemented in solidDisplacementThermo.
Referenced by basicThermo::phasePropertyName().
|
pure virtual |
Sensible enthalpy.
for given pressure and temperature [J/kg]
Implemented in solidDisplacementThermo.
|
pure virtual |
Sensible enthalpy for cell-set [J/kg].
Implemented in solidDisplacementThermo.
|
pure virtual |
Sensible enthalpy for patch [J/kg].
Implemented in solidDisplacementThermo.
|
pure virtual |
Absolute enthalpy [J/kg].
Implemented in solidDisplacementThermo.
Referenced by totalEnthalpy::execute(), and basicThermo::phasePropertyName().
|
pure virtual |
Absolute enthalpy.
for given pressure and temperature [J/kg]
Implemented in solidDisplacementThermo.
|
pure virtual |
Absolute enthalpy for cell-set [J/kg].
Implemented in solidDisplacementThermo.
|
pure virtual |
Absolute enthalpy for patch [J/kg].
Implemented in solidDisplacementThermo.
|
pure virtual |
Enthalpy of formation [J/kg].
Implemented in solidDisplacementThermo.
Referenced by basicThermo::phasePropertyName().
|
pure virtual |
Temperature from enthalpy/internal energy.
Implemented in solidDisplacementThermo.
Referenced by basicThermo::phasePropertyName().
|
pure virtual |
Temperature from enthalpy/internal energy for cell-set.
Implemented in solidDisplacementThermo.
|
pure virtual |
Temperature from enthalpy/internal energy for patch.
Implemented in solidDisplacementThermo.
|
pure virtual |
Heat capacity at constant pressure [J/kg/K].
Implemented in solidDisplacementThermo.
Referenced by effectivenessHeatExchangerSource::addSup(), wallHeatTransferCoeff::execute(), NamedEnum< compressibleField, 8 >::names(), basicThermo::phasePropertyName(), mixedUnburntEnthalpyFvPatchScalarField::updateCoeffs(), gradientUnburntEnthalpyFvPatchScalarField::updateCoeffs(), convectiveHeatTransferFvPatchScalarField::updateCoeffs(), alphatFilmWallFunctionFvPatchScalarField::updateCoeffs(), and alphatJayatillekeWallFunctionFvPatchScalarField::updateCoeffs().
|
pure virtual |
Heat capacity at constant volume [J/kg/K].
Implemented in solidDisplacementThermo.
Referenced by basicThermo::phasePropertyName().
|
pure virtual |
Thermal conductivity of mixture [W/m/K].
Implemented in basicThermo::implementation, and solidDisplacementThermo.
Referenced by basicThermo::implementation::dpdt(), temperatureCoupledBase::kappa(), basicThermo::phasePropertyName(), alphatJayatillekeWallFunctionFvPatchScalarField::updateCoeffs(), and alphatFilmWallFunctionFvPatchScalarField::updateCoeffs().
|
pure virtual |
Temperature [K].
Implemented in basicThermo::implementation.
Referenced by ThermoSurfaceFilm< CloudType >::cacheFilmFields(), chemistryModel< ThermoType >::chemistryModel(), Fickian< unityLewisFourier< laminarThermophysicalTransportModel > >::correct(), MaxwellStefan< unityLewisFourier< laminarThermophysicalTransportModel > >::correct(), standardPhaseChange::correctModel(), waxSolventEvaporation::correctModel(), solidification::correctModel(), Fickian< unityLewisFourier< laminarThermophysicalTransportModel > >::divj(), Fickian< unityLewisFourier< laminarThermophysicalTransportModel > >::divq(), MaxwellStefan< unityLewisFourier< laminarThermophysicalTransportModel > >::divq(), basicThermo::implementation::dpdt(), thermoSingleLayer::info(), Fickian< unityLewisFourier< laminarThermophysicalTransportModel > >::j(), laminarFlameSpeed::New(), combustionModel::New(), basicChemistryModel::New(), basicThermo::phasePropertyName(), Fickian< unityLewisFourier< laminarThermophysicalTransportModel > >::q(), thermoSingleLayer::q(), MaxwellStefan< unityLewisFourier< laminarThermophysicalTransportModel > >::q(), temperatureDependentContactAngleForce::theta(), perturbedTemperatureDependentContactAngleForce::theta(), thermoSingleLayer::Ts(), thermoSingleLayer::Tw(), energyJumpFvPatchScalarField::updateCoeffs(), fixedEnergyFvPatchScalarField::updateCoeffs(), energyJumpAMIFvPatchScalarField::updateCoeffs(), gradientEnergyFvPatchScalarField::updateCoeffs(), mixedEnergyFvPatchScalarField::updateCoeffs(), and convectiveHeatTransferFvPatchScalarField::updateCoeffs().
|
pure virtual |
Temperature [K].
Non-const access allowed for transport equations
Implemented in basicThermo::implementation.
|
pure virtual |
Heat capacity at constant pressure for patch [J/kg/K].
Implemented in solidDisplacementThermo.
|
pure virtual |
Heat capacity at constant volume for patch [J/kg/K].
Implemented in solidDisplacementThermo.
|
pure virtual |
Heat capacity at constant pressure/volume [J/kg/K].
Implemented in solidDisplacementThermo.
Referenced by heatTransfer::addSup(), interRegionHeatTransfer::addSup(), ThermoSurfaceFilm< CloudType >::cacheFilmFields(), basicThermo::phasePropertyName(), thermoSingleLayer::q(), radiationModel::Sh(), gradientEnergyFvPatchScalarField::updateCoeffs(), and mixedEnergyFvPatchScalarField::updateCoeffs().
|
pure virtual |
Heat capacity at constant pressure/volume for patch [J/kg/K].
Implemented in solidDisplacementThermo.
|
pure virtual |
Thermal diffusivity of energy of mixture [kg/m/s].
Implemented in solidDisplacementThermo.
Referenced by basicThermo::phasePropertyName(), and externalCoupledTemperatureMixedFvPatchScalarField::transferData().
|
pure virtual |
Thermal diffusivity of energy of mixture for patch [kg/m/s].
Implemented in solidDisplacementThermo.
Foam::autoPtr<Thermo> New | ( | const fvMesh & | mesh, |
const word & | phaseName | ||
) |
Definition at line 241 of file basicThermoTemplates.C.
References mesh.