Thermodynamics: Rationalised the base classes for fluid and solid thermo.

New base class for fluid and solid thermo: veryBasicThermo
Base class for fluid thermo: basicThermo (derived from veryBasicThermo)
Base class for solid thermo: solidThermo (derived from veryBasicThermo)

Note in next commit basicThermo -> fluidThermo, veryBasicThermo -> basicThermo
This commit is contained in:
Henry
2012-08-23 11:39:02 +01:00
parent 65c039f6c7
commit 8f4b56b3c3
111 changed files with 7872 additions and 8362 deletions

View File

@ -6,7 +6,7 @@ EXE_INC = \
-I$(LIB_SRC)/thermophysicalModels/specie/lnInclude \ -I$(LIB_SRC)/thermophysicalModels/specie/lnInclude \
-I$(LIB_SRC)/thermophysicalModels/solid/lnInclude \ -I$(LIB_SRC)/thermophysicalModels/solid/lnInclude \
-I$(LIB_SRC)/thermophysicalModels/basic/lnInclude \ -I$(LIB_SRC)/thermophysicalModels/basic/lnInclude \
-I$(LIB_SRC)/thermophysicalModels/basicSolidThermo/lnInclude \ -I$(LIB_SRC)/thermophysicalModels/solidThermo/lnInclude \
-I$(LIB_SRC)/thermophysicalModels/chemistryModel/lnInclude \ -I$(LIB_SRC)/thermophysicalModels/chemistryModel/lnInclude \
-I$(LIB_SRC)/thermophysicalModels/solidChemistryModel/lnInclude \ -I$(LIB_SRC)/thermophysicalModels/solidChemistryModel/lnInclude \
-I$(LIB_SRC)/combustionModels/lnInclude \ -I$(LIB_SRC)/combustionModels/lnInclude \

View File

@ -10,7 +10,7 @@ EXE_INC = \
-I$(LIB_SRC)/finiteVolume/lnInclude \ -I$(LIB_SRC)/finiteVolume/lnInclude \
-I$(LIB_SRC)/thermophysicalModels/basic/lnInclude \ -I$(LIB_SRC)/thermophysicalModels/basic/lnInclude \
-I$(LIB_SRC)/thermophysicalModels/specie/lnInclude \ -I$(LIB_SRC)/thermophysicalModels/specie/lnInclude \
-I$(LIB_SRC)/thermophysicalModels/basicSolidThermo/lnInclude \ -I$(LIB_SRC)/thermophysicalModels/solidThermo/lnInclude \
-I$(LIB_SRC)/turbulenceModels/compressible/RAS/lnInclude \ -I$(LIB_SRC)/turbulenceModels/compressible/RAS/lnInclude \
-I$(LIB_SRC)/turbulenceModels/compressible/turbulenceModel/lnInclude \ -I$(LIB_SRC)/turbulenceModels/compressible/turbulenceModel/lnInclude \
-I$(LIB_SRC)/turbulenceModels \ -I$(LIB_SRC)/turbulenceModels \
@ -21,7 +21,7 @@ EXE_INC = \
EXE_LIBS = \ EXE_LIBS = \
-lbasicThermophysicalModels \ -lbasicThermophysicalModels \
-lbasicSolidThermo \ -lsolidThermo \
-lspecie \ -lspecie \
-lcompressibleTurbulenceModel \ -lcompressibleTurbulenceModel \
-lcompressibleRASModels \ -lcompressibleRASModels \

View File

@ -8,7 +8,7 @@ EXE_INC = \
-I$(LIB_SRC)/finiteVolume/cfdTools \ -I$(LIB_SRC)/finiteVolume/cfdTools \
-I$(LIB_SRC)/thermophysicalModels/basic/lnInclude \ -I$(LIB_SRC)/thermophysicalModels/basic/lnInclude \
-I$(LIB_SRC)/thermophysicalModels/specie/lnInclude \ -I$(LIB_SRC)/thermophysicalModels/specie/lnInclude \
-I$(LIB_SRC)/thermophysicalModels/basicSolidThermo/lnInclude \ -I$(LIB_SRC)/thermophysicalModels/solidThermo/lnInclude \
-I$(LIB_SRC)/thermophysicalModels/radiationModels/lnInclude \ -I$(LIB_SRC)/thermophysicalModels/radiationModels/lnInclude \
-I$(LIB_SRC)/turbulenceModels \ -I$(LIB_SRC)/turbulenceModels \
-I$(LIB_SRC)/turbulenceModels/compressible/turbulenceModel/lnInclude \ -I$(LIB_SRC)/turbulenceModels/compressible/turbulenceModel/lnInclude \
@ -20,7 +20,7 @@ EXE_INC = \
EXE_LIBS = \ EXE_LIBS = \
-lfiniteVolume \ -lfiniteVolume \
-lbasicThermophysicalModels \ -lbasicThermophysicalModels \
-lbasicSolidThermo \ -lsolidThermo \
-lspecie \ -lspecie \
-lcompressibleTurbulenceModel \ -lcompressibleTurbulenceModel \
-lcompressibleRASModels \ -lcompressibleRASModels \

View File

@ -1,7 +1,7 @@
EXE_LIBS = \ EXE_LIBS = \
-lautoMesh \ -lautoMesh \
-lbarotropicCompressibilityModel \ -lbarotropicCompressibilityModel \
-lbasicSolidThermo \ -lsolidThermo \
-lbasicThermophysicalModels \ -lbasicThermophysicalModels \
-lblockMesh \ -lblockMesh \
-lchemistryModel \ -lchemistryModel \

View File

@ -1,12 +1,12 @@
EXE_INC = \ EXE_INC = \
-I$(LIB_SRC)/thermophysicalModels/basic/lnInclude \ -I$(LIB_SRC)/thermophysicalModels/basic/lnInclude \
-I$(LIB_SRC)/thermophysicalModels/specie/lnInclude \ -I$(LIB_SRC)/thermophysicalModels/specie/lnInclude \
-I$(LIB_SRC)/thermophysicalModels/basicSolidThermo/lnInclude \ -I$(LIB_SRC)/thermophysicalModels/solidThermo/lnInclude \
-I$(LIB_SRC)/finiteVolume/lnInclude -I$(LIB_SRC)/finiteVolume/lnInclude
EXE_LIBS = \ EXE_LIBS = \
-lbasicThermophysicalModels \ -lbasicThermophysicalModels \
-lbasicSolidThermo \ -lsolidThermo \
-lspecie \ -lspecie \
-lfiniteVolume \ -lfiniteVolume \
-lgenericPatchFields -lgenericPatchFields

View File

@ -4,7 +4,7 @@ EXE_INC = \
-I$(LIB_SRC)/thermophysicalModels/specie/lnInclude \ -I$(LIB_SRC)/thermophysicalModels/specie/lnInclude \
-I$(LIB_SRC)/thermophysicalModels/reactionThermo/lnInclude \ -I$(LIB_SRC)/thermophysicalModels/reactionThermo/lnInclude \
-I$(LIB_SRC)/thermophysicalModels/basic/lnInclude \ -I$(LIB_SRC)/thermophysicalModels/basic/lnInclude \
-I$(LIB_SRC)/thermophysicalModels/basicSolidThermo/lnInclude \ -I$(LIB_SRC)/thermophysicalModels/solidThermo/lnInclude \
-I$(LIB_SRC)/finiteVolume/lnInclude -I$(LIB_SRC)/finiteVolume/lnInclude
EXE_LIBS = \ EXE_LIBS = \
@ -15,4 +15,4 @@ EXE_LIBS = \
-lspecie \ -lspecie \
-lsolid \ -lsolid \
-lbasicThermophysicalModels \ -lbasicThermophysicalModels \
-lbasicSolidThermo -lsolidThermo

View File

@ -1,6 +1,6 @@
autoPtr<basicThermo> thermo autoPtr<veryBasicThermo> thermo
( (
basicThermo::New(mesh) veryBasicThermo::New(mesh)
); );
const volScalarField& h = thermo->he(); const volScalarField& h = thermo->he();
@ -22,7 +22,7 @@ autoPtr<volVectorField> UPtr;
autoPtr<surfaceScalarField> phiPtr; autoPtr<surfaceScalarField> phiPtr;
autoPtr<compressible::turbulenceModel> turbulence; autoPtr<compressible::turbulenceModel> turbulence;
if (!isA<solidThermo>(thermo())) if (isA<basicThermo>(thermo()))
{ {
UPtr.reset UPtr.reset
( (
@ -51,6 +51,6 @@ if (!isA<solidThermo>(thermo()))
rho, rho,
U, U,
phiPtr(), phiPtr(),
thermo() refCast<const basicThermo>(thermo())
); );
} }

View File

@ -61,7 +61,11 @@ Foam::dynamicMotionSolverFvMesh::~dynamicMotionSolverFvMesh()
bool Foam::dynamicMotionSolverFvMesh::update() bool Foam::dynamicMotionSolverFvMesh::update()
{ {
fvMesh::movePoints(motionPtr_->newPoints()); Info<< "Foam::dynamicMotionSolverFvMesh::update() relax" << endl;
fvMesh::movePoints(0.5*(points() + motionPtr_->newPoints()));
//fvMesh::movePoints(motionPtr_->newPoints());
if (foundObject<volVectorField>("U")) if (foundObject<volVectorField>("U"))
{ {

View File

@ -2,7 +2,7 @@ EXE_INC = \
-I$(LIB_SRC)/finiteVolume/lnInclude \ -I$(LIB_SRC)/finiteVolume/lnInclude \
-I$(LIB_SRC)/meshTools/lnInclude \ -I$(LIB_SRC)/meshTools/lnInclude \
-I$(LIB_SRC)/sampling/lnInclude \ -I$(LIB_SRC)/sampling/lnInclude \
-I$(LIB_SRC)/thermophysicalModels/basicSolidThermo/lnInclude \ -I$(LIB_SRC)/thermophysicalModels/solidThermo/lnInclude \
-I$(LIB_SRC)/thermophysicalModels/basic/lnInclude \ -I$(LIB_SRC)/thermophysicalModels/basic/lnInclude \
-I$(LIB_SRC)/thermophysicalModels/specie/lnInclude \ -I$(LIB_SRC)/thermophysicalModels/specie/lnInclude \
-I$(LIB_SRC)/turbulenceModels/compressible/turbulenceModel/lnInclude \ -I$(LIB_SRC)/turbulenceModels/compressible/turbulenceModel/lnInclude \
@ -13,5 +13,5 @@ LIB_LIBS = \
-lfiniteVolume \ -lfiniteVolume \
-lsampling \ -lsampling \
-lmeshTools \ -lmeshTools \
-lbasicSolidThermo \ -lsolidThermo \
-lcompressibleTurbulenceModel -lcompressibleTurbulenceModel

View File

@ -5,7 +5,7 @@ EXE_INC = \
-I$(LIB_SRC)/thermophysicalModels/specie/lnInclude \ -I$(LIB_SRC)/thermophysicalModels/specie/lnInclude \
-I$(LIB_SRC)/thermophysicalModels/solid/lnInclude \ -I$(LIB_SRC)/thermophysicalModels/solid/lnInclude \
-I$(LIB_SRC)/thermophysicalModels/basic/lnInclude \ -I$(LIB_SRC)/thermophysicalModels/basic/lnInclude \
-I$(LIB_SRC)/thermophysicalModels/basicSolidThermo/lnInclude \ -I$(LIB_SRC)/thermophysicalModels/solidThermo/lnInclude \
-I$(LIB_SRC)/thermophysicalModels/solidChemistryModel/lnInclude \ -I$(LIB_SRC)/thermophysicalModels/solidChemistryModel/lnInclude \
-I$(LIB_SRC)/turbulenceModels \ -I$(LIB_SRC)/turbulenceModels \
-I$(LIB_SRC)/turbulenceModels/compressible/turbulenceModel/lnInclude \ -I$(LIB_SRC)/turbulenceModels/compressible/turbulenceModel/lnInclude \

View File

@ -77,7 +77,7 @@ protected:
//- Read control parameters from dictionary //- Read control parameters from dictionary
virtual bool read(const dictionary& dict); virtual bool read(const dictionary& dict);
//- Reset solidChemistryModel and basicSolidThermo pointers //- Reset solidChemistryModel and solidThermo pointers
void constructThermoChemistry(); void constructThermoChemistry();
//- Reference to the solid chemistry model //- Reference to the solid chemistry model

View File

@ -7,7 +7,7 @@ EXE_INC = \
-I$(LIB_SRC)/thermophysicalModels/specie/lnInclude \ -I$(LIB_SRC)/thermophysicalModels/specie/lnInclude \
-I$(LIB_SRC)/thermophysicalModels/basic/lnInclude \ -I$(LIB_SRC)/thermophysicalModels/basic/lnInclude \
-I$(LIB_SRC)/thermophysicalModels/solid/lnInclude \ -I$(LIB_SRC)/thermophysicalModels/solid/lnInclude \
-I$(LIB_SRC)/thermophysicalModels/basicSolidThermo/lnInclude \ -I$(LIB_SRC)/thermophysicalModels/solidThermo/lnInclude \
-I$(LIB_SRC)/thermophysicalModels/solidChemistryModel/lnInclude \ -I$(LIB_SRC)/thermophysicalModels/solidChemistryModel/lnInclude \
-I$(LIB_SRC)/thermophysicalModels/radiationModels/lnInclude \ -I$(LIB_SRC)/thermophysicalModels/radiationModels/lnInclude \
-I$(LIB_SRC)/turbulenceModels \ -I$(LIB_SRC)/turbulenceModels \

View File

@ -1,6 +1,6 @@
EXE_INC = \ EXE_INC = \
-I$(LIB_SRC)/regionModels/regionModel/lnInclude \ -I$(LIB_SRC)/regionModels/regionModel/lnInclude \
-I$(LIB_SRC)/thermophysicalModels/basicSolidThermo/lnInclude \ -I$(LIB_SRC)/thermophysicalModels/solidThermo/lnInclude \
-I$(LIB_SRC)/thermophysicalModels/solid/lnInclude \ -I$(LIB_SRC)/thermophysicalModels/solid/lnInclude \
-I$(LIB_SRC)/finiteVolume/lnInclude \ -I$(LIB_SRC)/finiteVolume/lnInclude \
-I$(LIB_SRC)/meshTools/lnInclude \ -I$(LIB_SRC)/meshTools/lnInclude \
@ -12,7 +12,7 @@ EXE_INC = \
LIB_LIBS = \ LIB_LIBS = \
-lregionModels \ -lregionModels \
-lbasicSolidThermo \ -lsolidThermo \
-lcompressibleTurbulenceModel \ -lcompressibleTurbulenceModel \
-lfiniteVolume \ -lfiniteVolume \
-lmeshTools \ -lmeshTools \

View File

@ -59,7 +59,7 @@ Description
<constIsoSolidTransport <constIsoSolidTransport
<constSolidRad <constSolidRad
<specieThermo <specieThermo
<constSolidThermo<constRho>,sensibleEnthalpy> <hConstThermo<incompressible>,sensibleEnthalpy>
> >
> >
> >

View File

@ -104,7 +104,7 @@ public:
// Thermo properties // Thermo properties
//- Return const reference to the basicSolidThermo //- Return const reference to the solidThermo
virtual const solidThermo& thermo() const; virtual const solidThermo& thermo() const;

View File

@ -4,7 +4,6 @@ makeType=${1:-libso}
set -x set -x
wmake $makeType specie wmake $makeType specie
wmake $makeType solid
wmake $makeType thermophysicalFunctions wmake $makeType thermophysicalFunctions
./properties/Allwmake $* ./properties/Allwmake $*
@ -16,8 +15,8 @@ wmake $makeType barotropicCompressibilityModel
wmake $makeType thermalPorousZone wmake $makeType thermalPorousZone
wmake $makeType SLGThermo wmake $makeType SLGThermo
# Should be combined with solids&solidMixture wmake $makeType solidSpecie
wmake $makeType basicSolidThermo wmake $makeType solidThermo
wmake $makeType solidChemistryModel wmake $makeType solidChemistryModel
wmake $makeType radiationModels wmake $makeType radiationModels

View File

@ -1,6 +1,9 @@
mixtures/basicMixture/basicMixture.C mixtures/basicMixture/basicMixture.C
mixtures/basicMixture/basicMixtures.C mixtures/basicMixture/basicMixtures.C
basicThermo/veryBasicThermo.C
basicThermo/veryBasicThermoNew.C
basicThermo/basicThermo.C basicThermo/basicThermo.C
basicThermo/basicThermoNew.C basicThermo/basicThermoNew.C

View File

@ -24,14 +24,6 @@ License
\*---------------------------------------------------------------------------*/ \*---------------------------------------------------------------------------*/
#include "basicThermo.H" #include "basicThermo.H"
#include "fvMesh.H"
#include "HashTable.H"
#include "zeroGradientFvPatchFields.H"
#include "fixedEnergyFvPatchScalarField.H"
#include "gradientEnergyFvPatchScalarField.H"
#include "mixedEnergyFvPatchScalarField.H"
#include "temperatureJumpFvPatchScalarField.H"
#include "energyJumpFvPatchScalarField.H"
/* * * * * * * * * * * * * * * private static data * * * * * * * * * * * * * */ /* * * * * * * * * * * * * * * private static data * * * * * * * * * * * * * */
@ -46,171 +38,14 @@ namespace Foam
Foam::basicThermo::basicThermo(const fvMesh& mesh) Foam::basicThermo::basicThermo(const fvMesh& mesh)
: :
IOdictionary veryBasicThermo(mesh)
(
IOobject
(
"thermophysicalProperties",
mesh.time().constant(),
mesh,
IOobject::MUST_READ_IF_MODIFIED,
IOobject::NO_WRITE
)
),
p_
(
IOobject
(
"p",
mesh.time().timeName(),
mesh,
IOobject::MUST_READ,
IOobject::AUTO_WRITE
),
mesh
),
psi_
(
IOobject
(
"psi",
mesh.time().timeName(),
mesh,
IOobject::NO_READ,
IOobject::NO_WRITE
),
mesh,
dimensionSet(0, -2, 2, 0, 0)
),
T_
(
IOobject
(
"T",
mesh.time().timeName(),
mesh,
IOobject::MUST_READ,
IOobject::AUTO_WRITE
),
mesh
),
mu_
(
IOobject
(
"mu",
mesh.time().timeName(),
mesh,
IOobject::NO_READ,
IOobject::NO_WRITE
),
mesh,
dimensionSet(1, -1, -1, 0, 0)
),
alpha_
(
IOobject
(
"alpha",
mesh.time().timeName(),
mesh,
IOobject::NO_READ,
IOobject::NO_WRITE
),
mesh,
dimensionSet(1, -1, -1, 0, 0)
)
{} {}
Foam::basicThermo::basicThermo(const fvMesh& mesh, const dictionary& dict) Foam::basicThermo::basicThermo(const fvMesh& mesh, const dictionary& dict)
: :
IOdictionary veryBasicThermo(mesh, dict)
(
IOobject
(
"thermophysicalProperties",
mesh.time().constant(),
mesh,
IOobject::NO_READ,
IOobject::NO_WRITE
),
dict
),
p_
(
IOobject
(
"p",
mesh.time().timeName(),
mesh,
IOobject::MUST_READ,
IOobject::AUTO_WRITE
),
mesh
),
psi_
(
IOobject
(
"psi",
mesh.time().timeName(),
mesh,
IOobject::NO_READ,
IOobject::NO_WRITE
),
mesh,
dimensionSet(0, -2, 2, 0, 0)
),
T_
(
IOobject
(
"T",
mesh.time().timeName(),
mesh,
IOobject::MUST_READ,
IOobject::AUTO_WRITE
),
mesh
),
mu_
(
IOobject
(
"mu",
mesh.time().timeName(),
mesh,
IOobject::NO_READ,
IOobject::NO_WRITE
),
mesh,
dimensionSet(1, -1, -1, 0, 0)
),
alpha_
(
IOobject
(
"alpha",
mesh.time().timeName(),
mesh,
IOobject::NO_READ,
IOobject::NO_WRITE
),
mesh,
dimensionSet(1, -1, -1, 0, 0)
)
{} {}
@ -220,48 +55,4 @@ Foam::basicThermo::~basicThermo()
{} {}
// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
Foam::volScalarField& Foam::basicThermo::p()
{
return p_;
}
const Foam::volScalarField& Foam::basicThermo::p() const
{
return p_;
}
const Foam::volScalarField& Foam::basicThermo::psi() const
{
return psi_;
}
const Foam::volScalarField& Foam::basicThermo::T() const
{
return T_;
}
const Foam::volScalarField& Foam::basicThermo::mu() const
{
return mu_;
}
const Foam::volScalarField& Foam::basicThermo::alpha() const
{
return alpha_;
}
bool Foam::basicThermo::read()
{
return regIOobject::read();
}
// ************************************************************************* // // ************************************************************************* //

View File

@ -36,10 +36,7 @@ SourceFiles
#ifndef basicThermo_H #ifndef basicThermo_H
#define basicThermo_H #define basicThermo_H
#include "volFields.H" #include "veryBasicThermo.H"
#include "typeInfo.H"
#include "IOdictionary.H"
#include "autoPtr.H"
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
@ -52,35 +49,9 @@ namespace Foam
class basicThermo class basicThermo
: :
public IOdictionary public veryBasicThermo
{ {
protected:
// Protected data
// Fields
//- Pressure [Pa]
volScalarField p_;
//- Compressibility [s^2/m^2]
volScalarField psi_;
//- Temperature [K]
volScalarField T_;
//- Laminar dynamic viscosity [kg/m/s]
volScalarField mu_;
//- Laminar thermal diffusuvity [kg/m/s]
volScalarField alpha_;
//- Construct as copy (not implemented)
basicThermo(const basicThermo&);
public: public:
//- Runtime type information //- Runtime type information
@ -115,180 +86,16 @@ public:
// Member functions // Member functions
//- Update properties
virtual void correct() = 0;
// Access to thermodynamic state variables // Access to thermodynamic state variables
//- Pressure [Pa]
// Non-const access allowed for transport equations
virtual volScalarField& p();
//- Pressure [Pa]
virtual const volScalarField& p() const;
//- Density [kg/m^3]
virtual tmp<volScalarField> rho() const = 0;
//- Compressibility [s^2/m^2] //- Compressibility [s^2/m^2]
virtual const volScalarField& psi() const; virtual const volScalarField& psi() const = 0;
//- Enthalpy/Internal energy [J/kg]
// Non-const access allowed for transport equations
virtual volScalarField& he() = 0;
//- Enthalpy/Internal energy [J/kg]
virtual const volScalarField& he() const = 0;
//- Enthalpy/Internal energy for cell-set [J/kg]
virtual tmp<scalarField> he
(
const scalarField& p,
const scalarField& T,
const labelList& cells
) const = 0;
//- Enthalpy/Internal energy for patch [J/kg]
virtual tmp<scalarField> he
(
const scalarField& p,
const scalarField& T,
const label patchi
) const = 0;
//- Chemical enthalpy [J/kg]
virtual tmp<volScalarField> hc() const = 0;
//- Temperature from enthalpy/internal energy for cell-set
virtual tmp<scalarField> THE
(
const scalarField& h,
const scalarField& p,
const scalarField& T0, // starting temperature
const labelList& cells
) const = 0;
//- Temperature from enthalpy/internal energy for patch
virtual tmp<scalarField> THE
(
const scalarField& h,
const scalarField& p,
const scalarField& T0, // starting temperature
const label patchi
) const = 0;
// Fields derived from thermodynamic state variables
//- Temperature [K]
virtual const volScalarField& T() const;
//- Heat capacity at constant pressure [J/kg/K]
virtual tmp<volScalarField> Cp() const = 0;
//- Heat capacity at constant pressure for patch [J/kg/K]
virtual tmp<scalarField> Cp
(
const scalarField& p,
const scalarField& T,
const label patchi
) const = 0;
//- Heat capacity at constant volume [J/kg/K]
virtual tmp<volScalarField> Cv() const = 0;
//- Heat capacity at constant volume for patch [J/kg/K]
virtual tmp<scalarField> Cv
(
const scalarField& p,
const scalarField& T,
const label patchi
) const = 0;
//- gamma = Cp/Cv []
virtual tmp<volScalarField> gamma() const = 0;
//- gamma = Cp/Cv for patch []
virtual tmp<scalarField> gamma
(
const scalarField& p,
const scalarField& T,
const label patchi
) const = 0;
//- Heat capacity at constant pressure/volume [J/kg/K]
virtual tmp<volScalarField> Cpv() const = 0;
//- Heat capacity at constant pressure/volume for patch [J/kg/K]
virtual tmp<scalarField> Cpv
(
const scalarField& p,
const scalarField& T,
const label patchi
) const = 0;
//- Heat capacity ratio []
virtual tmp<volScalarField> CpByCpv() const = 0;
//- Heat capacity ratio for patch []
virtual tmp<scalarField> CpByCpv
(
const scalarField& p,
const scalarField& T,
const label patchi
) const = 0;
// Access to transport state variables // Access to transport state variables
//- Dynamic viscosity of mixture [kg/m/s] //- Dynamic viscosity of mixture [kg/m/s]
virtual const volScalarField& mu() const; virtual const volScalarField& mu() const = 0;
//- Thermal diffusivity for enthalpy of mixture [kg/m/s]
virtual const volScalarField& alpha() const;
// Fields derived from transport state variables
//- Thermal diffusivity for temperature of mixture [J/m/s/K]
virtual tmp<volScalarField> kappa() const = 0;
//- Thermal diffusivity of mixture for patch [J/m/s/K]
virtual tmp<scalarField> kappa
(
const label patchi
) const = 0;
//- Effective thermal diffusivity of mixture [J/m/s/K]
virtual tmp<volScalarField> kappaEff
(
const volScalarField&
) const = 0;
//- Effective thermal diffusivity of mixture for patch [J/m/s/K]
virtual tmp<scalarField> kappaEff
(
const scalarField& alphat,
const label patchi
) const = 0;
//- Effective thermal diffusivity of mixture [J/m/s/K]
virtual tmp<volScalarField> alphaEff
(
const volScalarField& alphat
) const = 0;
//- Effective thermal diffusivity of mixture for patch [J/m/s/K]
virtual tmp<scalarField> alphaEff
(
const scalarField& alphat,
const label patchi
) const = 0;
//- Read thermophysicalProperties dictionary
virtual bool read();
}; };

View File

@ -0,0 +1,196 @@
/*---------------------------------------------------------------------------*\
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 2012 OpenFOAM Foundation
\\/ M anipulation |
-------------------------------------------------------------------------------
License
This file is part of OpenFOAM.
OpenFOAM is free software: you can redistribute it and/or modify it
under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
for more details.
You should have received a copy of the GNU General Public License
along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
\*---------------------------------------------------------------------------*/
#include "veryBasicThermo.H"
/* * * * * * * * * * * * * * * private static data * * * * * * * * * * * * * */
namespace Foam
{
defineTypeNameAndDebug(veryBasicThermo, 0);
defineRunTimeSelectionTable(veryBasicThermo, fvMesh);
}
// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
Foam::veryBasicThermo::veryBasicThermo(const fvMesh& mesh)
:
IOdictionary
(
IOobject
(
"thermophysicalProperties",
mesh.time().constant(),
mesh,
IOobject::MUST_READ_IF_MODIFIED,
IOobject::NO_WRITE
)
),
p_
(
IOobject
(
"p",
mesh.time().timeName(),
mesh,
IOobject::MUST_READ,
IOobject::AUTO_WRITE
),
mesh
),
T_
(
IOobject
(
"T",
mesh.time().timeName(),
mesh,
IOobject::MUST_READ,
IOobject::AUTO_WRITE
),
mesh
),
alpha_
(
IOobject
(
"alpha",
mesh.time().timeName(),
mesh,
IOobject::NO_READ,
IOobject::NO_WRITE
),
mesh,
dimensionSet(1, -1, -1, 0, 0)
)
{}
Foam::veryBasicThermo::veryBasicThermo
(
const fvMesh& mesh,
const dictionary& dict
)
:
IOdictionary
(
IOobject
(
"thermophysicalProperties",
mesh.time().constant(),
mesh,
IOobject::NO_READ,
IOobject::NO_WRITE
),
dict
),
p_
(
IOobject
(
"p",
mesh.time().timeName(),
mesh,
IOobject::MUST_READ,
IOobject::AUTO_WRITE
),
mesh
),
T_
(
IOobject
(
"T",
mesh.time().timeName(),
mesh,
IOobject::MUST_READ,
IOobject::AUTO_WRITE
),
mesh
),
alpha_
(
IOobject
(
"alpha",
mesh.time().timeName(),
mesh,
IOobject::NO_READ,
IOobject::NO_WRITE
),
mesh,
dimensionSet(1, -1, -1, 0, 0)
)
{}
// * * * * * * * * * * * * * * * * Destructor * * * * * * * * * * * * * * * //
Foam::veryBasicThermo::~veryBasicThermo()
{}
// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
Foam::volScalarField& Foam::veryBasicThermo::p()
{
return p_;
}
const Foam::volScalarField& Foam::veryBasicThermo::p() const
{
return p_;
}
const Foam::volScalarField& Foam::veryBasicThermo::T() const
{
return T_;
}
const Foam::volScalarField& Foam::veryBasicThermo::alpha() const
{
return alpha_;
}
bool Foam::veryBasicThermo::read()
{
return regIOobject::read();
}
// ************************************************************************* //

View File

@ -0,0 +1,291 @@
/*---------------------------------------------------------------------------*\
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 2012 OpenFOAM Foundation
\\/ M anipulation |
-------------------------------------------------------------------------------
License
This file is part of OpenFOAM.
OpenFOAM is free software: you can redistribute it and/or modify it
under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
for more details.
You should have received a copy of the GNU General Public License
along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
Class
Foam::veryBasicThermo
Description
Basic thermodynamic properties
SourceFiles
veryBasicThermo.C
veryBasicThermoNew.C
\*---------------------------------------------------------------------------*/
#ifndef veryBasicThermo_H
#define veryBasicThermo_H
#include "volFields.H"
#include "typeInfo.H"
#include "IOdictionary.H"
#include "autoPtr.H"
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
namespace Foam
{
/*---------------------------------------------------------------------------*\
Class veryBasicThermo Declaration
\*---------------------------------------------------------------------------*/
class veryBasicThermo
:
public IOdictionary
{
protected:
// Protected data
// Fields
//- Pressure [Pa]
volScalarField p_;
//- Temperature [K]
volScalarField T_;
//- Laminar thermal diffusuvity [kg/m/s]
volScalarField alpha_;
//- Construct as copy (not implemented)
veryBasicThermo(const veryBasicThermo&);
public:
//- Runtime type information
TypeName("veryBasicThermo");
//- Declare run-time constructor selection table
declareRunTimeSelectionTable
(
autoPtr,
veryBasicThermo,
fvMesh,
(const fvMesh& mesh),
(mesh)
);
// Constructors
//- Construct from mesh
veryBasicThermo(const fvMesh&);
//- Construct from mesh
veryBasicThermo(const fvMesh&, const dictionary&);
//- Selector
static autoPtr<veryBasicThermo> New(const fvMesh&);
//- Destructor
virtual ~veryBasicThermo();
// Member functions
//- Update properties
virtual void correct() = 0;
// Access to thermodynamic state variables
//- Pressure [Pa]
// Non-const access allowed for transport equations
virtual volScalarField& p();
//- Pressure [Pa]
virtual const volScalarField& p() const;
//- Density [kg/m^3]
virtual tmp<volScalarField> rho() const = 0;
//- Enthalpy/Internal energy [J/kg]
// Non-const access allowed for transport equations
virtual volScalarField& he() = 0;
//- Enthalpy/Internal energy [J/kg]
virtual const volScalarField& he() const = 0;
//- Enthalpy/Internal energy for cell-set [J/kg]
virtual tmp<scalarField> he
(
const scalarField& p,
const scalarField& T,
const labelList& cells
) const = 0;
//- Enthalpy/Internal energy for patch [J/kg]
virtual tmp<scalarField> he
(
const scalarField& p,
const scalarField& T,
const label patchi
) const = 0;
//- Chemical enthalpy [J/kg]
virtual tmp<volScalarField> hc() const = 0;
//- Temperature from enthalpy/internal energy for cell-set
virtual tmp<scalarField> THE
(
const scalarField& h,
const scalarField& p,
const scalarField& T0, // starting temperature
const labelList& cells
) const = 0;
//- Temperature from enthalpy/internal energy for patch
virtual tmp<scalarField> THE
(
const scalarField& h,
const scalarField& p,
const scalarField& T0, // starting temperature
const label patchi
) const = 0;
// Fields derived from thermodynamic state variables
//- Temperature [K]
virtual const volScalarField& T() const;
//- Heat capacity at constant pressure [J/kg/K]
virtual tmp<volScalarField> Cp() const = 0;
//- Heat capacity at constant pressure for patch [J/kg/K]
virtual tmp<scalarField> Cp
(
const scalarField& p,
const scalarField& T,
const label patchi
) const = 0;
//- Heat capacity at constant volume [J/kg/K]
virtual tmp<volScalarField> Cv() const = 0;
//- Heat capacity at constant volume for patch [J/kg/K]
virtual tmp<scalarField> Cv
(
const scalarField& p,
const scalarField& T,
const label patchi
) const = 0;
//- gamma = Cp/Cv []
virtual tmp<volScalarField> gamma() const = 0;
//- gamma = Cp/Cv for patch []
virtual tmp<scalarField> gamma
(
const scalarField& p,
const scalarField& T,
const label patchi
) const = 0;
//- Heat capacity at constant pressure/volume [J/kg/K]
virtual tmp<volScalarField> Cpv() const = 0;
//- Heat capacity at constant pressure/volume for patch [J/kg/K]
virtual tmp<scalarField> Cpv
(
const scalarField& p,
const scalarField& T,
const label patchi
) const = 0;
//- Heat capacity ratio []
virtual tmp<volScalarField> CpByCpv() const = 0;
//- Heat capacity ratio for patch []
virtual tmp<scalarField> CpByCpv
(
const scalarField& p,
const scalarField& T,
const label patchi
) const = 0;
// Access to transport state variables
//- Thermal diffusivity for enthalpy of mixture [kg/m/s]
virtual const volScalarField& alpha() const;
// Fields derived from transport state variables
//- Thermal diffusivity for temperature of mixture [J/m/s/K]
virtual tmp<volScalarField> kappa() const = 0;
//- Thermal diffusivity of mixture for patch [J/m/s/K]
virtual tmp<scalarField> kappa
(
const label patchi
) const = 0;
//- Effective thermal diffusivity of mixture [J/m/s/K]
virtual tmp<volScalarField> kappaEff
(
const volScalarField&
) const = 0;
//- Effective thermal diffusivity of mixture for patch [J/m/s/K]
virtual tmp<scalarField> kappaEff
(
const scalarField& alphat,
const label patchi
) const = 0;
//- Effective thermal diffusivity of mixture [J/m/s/K]
virtual tmp<volScalarField> alphaEff
(
const volScalarField& alphat
) const = 0;
//- Effective thermal diffusivity of mixture for patch [J/m/s/K]
virtual tmp<scalarField> alphaEff
(
const scalarField& alphat,
const label patchi
) const = 0;
//- Read thermophysicalProperties dictionary
virtual bool read();
};
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
} // End namespace Foam
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
#endif
// ************************************************************************* //

View File

@ -0,0 +1,71 @@
/*---------------------------------------------------------------------------*\
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 2012 OpenFOAM Foundation
\\/ M anipulation |
-------------------------------------------------------------------------------
License
This file is part of OpenFOAM.
OpenFOAM is free software: you can redistribute it and/or modify it
under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
for more details.
You should have received a copy of the GNU General Public License
along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
\*---------------------------------------------------------------------------*/
#include "veryBasicThermo.H"
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
Foam::autoPtr<Foam::veryBasicThermo> Foam::veryBasicThermo::New
(
const fvMesh& mesh
)
{
// get model name, but do not register the dictionary
// otherwise it is registered in the database twice
const word modelType
(
IOdictionary
(
IOobject
(
"thermophysicalProperties",
mesh.time().constant(),
mesh,
IOobject::MUST_READ_IF_MODIFIED,
IOobject::NO_WRITE,
false
)
).lookup("thermoType")
);
Info<< "Selecting thermodynamics package " << modelType << endl;
fvMeshConstructorTable::iterator cstrIter =
fvMeshConstructorTablePtr_->find(modelType);
if (cstrIter == fvMeshConstructorTablePtr_->end())
{
FatalErrorIn("veryBasicThermo::New(const fvMesh&)")
<< "Unknown veryBasicThermo type " << modelType << nl << nl
<< "Valid veryBasicThermo types are:" << nl
<< fvMeshConstructorTablePtr_->sortedToc() << nl
<< exit(FatalError);
}
return autoPtr<veryBasicThermo>(cstrIter()(mesh));
}
// ************************************************************************* //

View File

@ -26,7 +26,7 @@ License
#include "addToRunTimeSelectionTable.H" #include "addToRunTimeSelectionTable.H"
#include "energyJumpFvPatchScalarField.H" #include "energyJumpFvPatchScalarField.H"
#include "temperatureJumpFvPatchScalarField.H" #include "temperatureJumpFvPatchScalarField.H"
#include "basicThermo.H" #include "veryBasicThermo.H"
// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * // // * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
@ -103,7 +103,7 @@ void Foam::energyJumpFvPatchScalarField::updateCoeffs()
if (this->cyclicPatch().owner()) if (this->cyclicPatch().owner())
{ {
const basicThermo& thermo = db().lookupObject<basicThermo> const veryBasicThermo& thermo = db().lookupObject<veryBasicThermo>
( (
"thermophysicalProperties" "thermophysicalProperties"
); );

View File

@ -25,7 +25,7 @@ License
#include "fvPatchFieldMapper.H" #include "fvPatchFieldMapper.H"
#include "volFields.H" #include "volFields.H"
#include "basicThermo.H" #include "veryBasicThermo.H"
#include "addToRunTimeSelectionTable.H" #include "addToRunTimeSelectionTable.H"
#include "fixedEnergyFvPatchScalarField.H" #include "fixedEnergyFvPatchScalarField.H"
@ -97,7 +97,7 @@ void Foam::fixedEnergyFvPatchScalarField::updateCoeffs()
return; return;
} }
const basicThermo& thermo = db().lookupObject<basicThermo> const veryBasicThermo& thermo = db().lookupObject<veryBasicThermo>
( (
"thermophysicalProperties" "thermophysicalProperties"
); );

View File

@ -27,7 +27,7 @@ License
#include "addToRunTimeSelectionTable.H" #include "addToRunTimeSelectionTable.H"
#include "fvPatchFieldMapper.H" #include "fvPatchFieldMapper.H"
#include "volFields.H" #include "volFields.H"
#include "basicThermo.H" #include "veryBasicThermo.H"
// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * // // * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
@ -97,7 +97,7 @@ void Foam::gradientEnergyFvPatchScalarField::updateCoeffs()
return; return;
} }
const basicThermo& thermo = db().lookupObject<basicThermo> const veryBasicThermo& thermo = db().lookupObject<veryBasicThermo>
( (
"thermophysicalProperties" "thermophysicalProperties"
); );

View File

@ -27,7 +27,7 @@ License
#include "addToRunTimeSelectionTable.H" #include "addToRunTimeSelectionTable.H"
#include "fvPatchFieldMapper.H" #include "fvPatchFieldMapper.H"
#include "volFields.H" #include "volFields.H"
#include "basicThermo.H" #include "veryBasicThermo.H"
// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * // // * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
@ -102,7 +102,7 @@ void Foam::mixedEnergyFvPatchScalarField::updateCoeffs()
return; return;
} }
const basicThermo& thermo = db().lookupObject<basicThermo> const veryBasicThermo& thermo = db().lookupObject<veryBasicThermo>
( (
"thermophysicalProperties" "thermophysicalProperties"
); );

View File

@ -27,7 +27,7 @@ License
#include "addToRunTimeSelectionTable.H" #include "addToRunTimeSelectionTable.H"
#include "fvPatchFieldMapper.H" #include "fvPatchFieldMapper.H"
#include "volFields.H" #include "volFields.H"
#include "basicThermo.H" #include "veryBasicThermo.H"
// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * // // * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
@ -149,7 +149,7 @@ void Foam::wallHeatTransferFvPatchScalarField::updateCoeffs()
return; return;
} }
const basicThermo& thermo = db().lookupObject<basicThermo> const veryBasicThermo& thermo = db().lookupObject<veryBasicThermo>
( (
"thermophysicalProperties" "thermophysicalProperties"
); );

View File

@ -38,7 +38,35 @@ namespace Foam
Foam::psiThermo::psiThermo(const fvMesh& mesh) Foam::psiThermo::psiThermo(const fvMesh& mesh)
: :
basicThermo(mesh) basicThermo(mesh),
psi_
(
IOobject
(
"psi",
mesh.time().timeName(),
mesh,
IOobject::NO_READ,
IOobject::NO_WRITE
),
mesh,
dimensionSet(0, -2, 2, 0, 0)
),
mu_
(
IOobject
(
"mu",
mesh.time().timeName(),
mesh,
IOobject::NO_READ,
IOobject::NO_WRITE
),
mesh,
dimensionSet(1, -1, -1, 0, 0)
)
{} {}
@ -48,4 +76,24 @@ Foam::psiThermo::~psiThermo()
{} {}
// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
Foam::tmp<Foam::volScalarField> Foam::psiThermo::rho() const
{
return p_*psi();
}
const Foam::volScalarField& Foam::psiThermo::psi() const
{
return psi_;
}
const Foam::volScalarField& Foam::psiThermo::mu() const
{
return mu_;
}
// ************************************************************************* // // ************************************************************************* //

View File

@ -55,6 +55,15 @@ class psiThermo
protected: protected:
// Protected data
//- Compressibility [s^2/m^2]
volScalarField psi_;
//- Dynamic viscosity [kg/m/s]
volScalarField mu_;
// Protected Member Functions // Protected Member Functions
//- Construct as copy (not implemented) //- Construct as copy (not implemented)
@ -97,10 +106,16 @@ public:
// Fields derived from thermodynamic state variables // Fields derived from thermodynamic state variables
//- Density [kg/m^3] - uses current value of pressure //- Density [kg/m^3] - uses current value of pressure
virtual tmp<volScalarField> rho() const virtual tmp<volScalarField> rho() const;
{
return p_*psi(); //- Compressibility [s^2/m^2]
} virtual const volScalarField& psi() const;
// Access to transport state variables
//- Dynamic viscosity of mixture [kg/m/s]
virtual const volScalarField& mu() const;
}; };

View File

@ -51,6 +51,34 @@ Foam::rhoThermo::rhoThermo(const fvMesh& mesh)
), ),
mesh, mesh,
dimDensity dimDensity
),
psi_
(
IOobject
(
"psi",
mesh.time().timeName(),
mesh,
IOobject::NO_READ,
IOobject::NO_WRITE
),
mesh,
dimensionSet(0, -2, 2, 0, 0)
),
mu_
(
IOobject
(
"mu",
mesh.time().timeName(),
mesh,
IOobject::NO_READ,
IOobject::NO_WRITE
),
mesh,
dimensionSet(1, -1, -1, 0, 0)
) )
{} {}
@ -70,6 +98,34 @@ Foam::rhoThermo::rhoThermo(const fvMesh& mesh, const dictionary& dict)
), ),
mesh, mesh,
dimDensity dimDensity
),
psi_
(
IOobject
(
"psi",
mesh.time().timeName(),
mesh,
IOobject::NO_READ,
IOobject::NO_WRITE
),
mesh,
dimensionSet(0, -2, 2, 0, 0)
),
mu_
(
IOobject
(
"mu",
mesh.time().timeName(),
mesh,
IOobject::NO_READ,
IOobject::NO_WRITE
),
mesh,
dimensionSet(1, -1, -1, 0, 0)
) )
{} {}
@ -94,4 +150,16 @@ Foam::volScalarField& Foam::rhoThermo::rho()
} }
const Foam::volScalarField& Foam::rhoThermo::psi() const
{
return psi_;
}
const Foam::volScalarField& Foam::rhoThermo::mu() const
{
return mu_;
}
// ************************************************************************* // // ************************************************************************* //

View File

@ -61,6 +61,12 @@ protected:
// Named 'rhoThermo' to avoid (potential) conflict with solver density // Named 'rhoThermo' to avoid (potential) conflict with solver density
volScalarField rho_; volScalarField rho_;
//- Compressibility [s^2/m^2]
volScalarField psi_;
//- Dynamic viscosity [kg/m/s]
volScalarField mu_;
// Protected Member Functions // Protected Member Functions
@ -111,6 +117,15 @@ public:
//- Return non-const access to the local density field [kg/m^3] //- Return non-const access to the local density field [kg/m^3]
virtual volScalarField& rho(); virtual volScalarField& rho();
//- Compressibility [s^2/m^2]
virtual const volScalarField& psi() const;
// Access to transport state variables
//- Dynamic viscosity of mixture [kg/m/s]
virtual const volScalarField& mu() const;
}; };

View File

@ -3,7 +3,7 @@ EXE_INC = \
-I$(LIB_SRC)/meshTools/lnInclude \ -I$(LIB_SRC)/meshTools/lnInclude \
-I$(LIB_SRC)/thermophysicalModels/basic/lnInclude \ -I$(LIB_SRC)/thermophysicalModels/basic/lnInclude \
-I$(LIB_SRC)/thermophysicalModels/specie/lnInclude \ -I$(LIB_SRC)/thermophysicalModels/specie/lnInclude \
-I$(LIB_SRC)/thermophysicalModels/basicSolidThermo/lnInclude \ -I$(LIB_SRC)/thermophysicalModels/solidThermo/lnInclude \
-I$(LIB_SRC)/thermophysicalModels/SLGThermo/lnInclude \ -I$(LIB_SRC)/thermophysicalModels/SLGThermo/lnInclude \
-I$(LIB_SRC)/thermophysicalModels/properties/liquidProperties/lnInclude \ -I$(LIB_SRC)/thermophysicalModels/properties/liquidProperties/lnInclude \
-I$(LIB_SRC)/thermophysicalModels/properties/liquidMixtureProperties/lnInclude \ -I$(LIB_SRC)/thermophysicalModels/properties/liquidMixtureProperties/lnInclude \
@ -16,7 +16,7 @@ LIB_LIBS = \
-lfiniteVolume \ -lfiniteVolume \
-lbasicThermophysicalModels \ -lbasicThermophysicalModels \
-lspecie \ -lspecie \
-lbasicSolidThermo \ -lsolidThermo \
-lmeshTools \ -lmeshTools \
-lSLGThermo \ -lSLGThermo \
-lsolidMixtureProperties \ -lsolidMixtureProperties \

View File

@ -29,7 +29,7 @@ Description
dictionary or calculated by the solidThermo: dictionary or calculated by the solidThermo:
- 'lookup' : lookup volScalarField with name - 'lookup' : lookup volScalarField with name
- 'solidThermo' : use basicSolidThermo emissivity() - 'solidThermo' : use solidThermo emissivity()
SourceFiles SourceFiles
radiationCoupledBase.C radiationCoupledBase.C

View File

@ -1,49 +0,0 @@
/*---------------------------------------------------------------------------*\
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 2011 OpenFOAM Foundation
\\/ M anipulation |
-------------------------------------------------------------------------------
License
This file is part of OpenFOAM.
OpenFOAM is free software: you can redistribute it and/or modify it
under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
for more details.
You should have received a copy of the GNU General Public License
along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
\*---------------------------------------------------------------------------*/
#include "constRho.H"
// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
Foam::constRho::constRho(const dictionary& dict)
:
specie(dict),
rho_(readScalar(dict.subDict("density").lookup("rho")))
{}
// * * * * * * * * * * * * * * * Ostream Operator * * * * * * * * * * * * * //
Foam::Ostream& Foam::operator<<(Ostream& os, const constRho& cr)
{
os << static_cast<const specie&>(cr);
os << cr.rho_;
os.check("Ostream& operator<<(Ostream& os, const constRho& cr)");
return os;
}
// ************************************************************************* //

View File

@ -1,136 +0,0 @@
/*---------------------------------------------------------------------------*\
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 2011 OpenFOAM Foundation
\\/ M anipulation |
-------------------------------------------------------------------------------
License
This file is part of OpenFOAM.
OpenFOAM is free software: you can redistribute it and/or modify it
under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
for more details.
You should have received a copy of the GNU General Public License
along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
Class
Foam::constRho
Description
rho constant
SourceFiles
constRhoI.H
constRho.C
\*---------------------------------------------------------------------------*/
#ifndef constRho_H
#define constRho_H
#include "dictionary.H"
#include "specie.H"
#include "autoPtr.H"
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
namespace Foam
{
class constRho;
inline constRho operator*
(
const scalar,
const constRho&
);
/*---------------------------------------------------------------------------*\
Class constRho Declaration
\*---------------------------------------------------------------------------*/
class constRho
:
public specie
{
// Private data
//- Density [kg/m3]
scalar rho_;
public:
// Constructors
//- Construct from dictionary
//constRho(Istream&);
constRho(const dictionary& dict);
//- Construct as named copy
inline constRho(const word&, const constRho&);
//- Construct from components
inline constRho
(
const specie& t,
const scalar rho
);
//- Construct and return a clone
inline autoPtr<constRho> clone() const;
// Selector from dictionary
inline static autoPtr<constRho> New(const dictionary& is);
// Member functions
//- Return density [kg/m3]
inline scalar rho(scalar p, scalar T) const;
// Member operators
inline constRho& operator=(const constRho&);
inline void operator+=(const constRho&);
inline void operator-=(const constRho&);
// Friend operators
friend constRho operator*
(
const scalar,
const constRho&
);
// Ostream Operator
friend Ostream& operator<<(Ostream&, const constRho&);
};
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
} // End namespace Foam
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
#include "constRhoI.H"
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
#endif
// ************************************************************************* //

View File

@ -1,118 +0,0 @@
/*---------------------------------------------------------------------------*\
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 2011 OpenFOAM Foundation
\\/ M anipulation |
-------------------------------------------------------------------------------
License
This file is part of OpenFOAM.
OpenFOAM is free software: you can redistribute it and/or modify it
under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
for more details.
You should have received a copy of the GNU General Public License
along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
\*---------------------------------------------------------------------------*/
#include "constRho.H"
// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
inline Foam::constRho::constRho(const word& name, const constRho& pg)
:
specie(name, pg),
rho_(pg.rho_)
{}
inline Foam::constRho::constRho(const specie& t, const scalar rho)
:
specie(t),
rho_(rho)
{}
inline Foam::autoPtr<Foam::constRho> Foam::constRho::clone() const
{
return autoPtr<constRho>(new constRho(*this));
}
inline Foam::autoPtr<Foam::constRho> Foam::constRho::New(const dictionary& is)
{
return autoPtr<constRho>(new constRho(is));
}
// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
inline Foam::scalar Foam::constRho::rho(scalar, scalar) const
{
return rho_;
}
// * * * * * * * * * * * * * * * Member Operators * * * * * * * * * * * * * //
inline Foam::constRho& Foam::constRho::operator=(const constRho& ct)
{
specie::operator=(ct);
rho_ = ct.rho_;
return *this;
}
inline void Foam::constRho::operator+=(const constRho& ct)
{
scalar molr1 = this->nMoles();
specie::operator+=(ct);
molr1 /= this->nMoles();
scalar molr2 = ct.nMoles()/this->nMoles();
rho_ = molr1*rho_ + molr2*ct.rho_;
}
inline void Foam::constRho::operator-=(const constRho& ct)
{
scalar molr1 = this->nMoles();
specie::operator-=(ct);
molr1 /= this->nMoles();
scalar molr2 = ct.nMoles()/this->nMoles();
rho_ = molr1*rho_ - molr2*ct.rho_;
}
// * * * * * * * * * * * * * * * Friend Operators * * * * * * * * * * * * * //
inline Foam::constRho Foam::operator*
(
const scalar s,
const constRho& ct
)
{
return constRho
(
s*static_cast<const specie&>(ct),
ct.rho_
);
}
// ************************************************************************* //

View File

@ -1,61 +0,0 @@
/*---------------------------------------------------------------------------*\
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 2011 OpenFOAM Foundation
\\/ M anipulation |
-------------------------------------------------------------------------------
License
This file is part of OpenFOAM.
OpenFOAM is free software: you can redistribute it and/or modify it
under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
for more details.
You should have received a copy of the GNU General Public License
along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
\*---------------------------------------------------------------------------*/
#include "constSolidThermo.H"
#include "IOstreams.H"
// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
template<class rhoType>
Foam::constSolidThermo<rhoType>::constSolidThermo
(
const dictionary& dict
)
:
rhoType(dict),
Cp_(readScalar(dict.subDict("thermodynamics").lookup("Cp"))),
Hf_(readScalar(dict.subDict("thermodynamics").lookup("Hf")))
{}
// * * * * * * * * * * * * * * * Ostream Operator * * * * * * * * * * * * * //
template<class rhoType>
Foam::Ostream& Foam::operator<<
(
Ostream& os,
const constSolidThermo<rhoType>& ct
)
{
os << static_cast<const rhoType&>(ct) << tab
<< ct.Cp_ << tab << ct.Hf_;
os.check("Ostream& operator<<(Ostream& os, const constSolidThermo& ct)");
return os;
}
// ************************************************************************* //

View File

@ -1,194 +0,0 @@
/*---------------------------------------------------------------------------*\
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 2011 OpenFOAM Foundation
\\/ M anipulation |
-------------------------------------------------------------------------------
License
This file is part of OpenFOAM.
OpenFOAM is free software: you can redistribute it and/or modify it
under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
for more details.
You should have received a copy of the GNU General Public License
along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
Class
Foam::constSolidThermo
Description
Constant properties thermodynamics package for solids
SourceFiles
constSolidThermoI.H
constSolidThermo.C
\*---------------------------------------------------------------------------*/
#ifndef constSolidThermo_H
#define constSolidThermo_H
#include "specie.H"
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
namespace Foam
{
template<class rhoType> class constSolidThermo;
template<class rhoType>
inline constSolidThermo<rhoType> operator*
(
const scalar,
const constSolidThermo<rhoType>&
);
/*
template<class rhoType>
inline constSolidThermo<rhoType> operator+
(
const constSolidThermo<rhoType>&,
const constSolidThermo<rhoType>&
);
template<class rhoType>
inline constSolidThermo<rhoType> operator-
(
const constSolidThermo<rhoType>&,
const constSolidThermo<rhoType>&
);
template<class rhoType>
inline constSolidThermo<rhoType> operator==
(
const constSolidThermo<rhoType>&,
const constSolidThermo<rhoType>&
);
*/
template<class rhoType>
Ostream& operator<<
(
Ostream&,
const constSolidThermo<rhoType>&
);
/*---------------------------------------------------------------------------*\
Class constSolidThermo Declaration
\*---------------------------------------------------------------------------*/
template<class rhoType>
class constSolidThermo
:
public rhoType
{
// Private data
scalar Cp_;
scalar Hf_;
// Private Member Functions
//- Construct from components
inline constSolidThermo
(
const rhoType& st,
const scalar Cp,
const scalar hf
);
public:
// Constructors
//- Construct from dictionary
constSolidThermo(const dictionary&);
//- Construct as named copy
inline constSolidThermo(const word&, const constSolidThermo&);
//- Construct and return a clone
inline autoPtr<constSolidThermo> clone() const;
//- Selector from Istream
inline static autoPtr<constSolidThermo> New(dictionary& is);
// Member Functions
//- Limit the temperature to be in the range Tlow_ to Thigh_
inline scalar limit(const scalar T) const;
// Fundamental properties
//- Heat capacity at constant pressure [J/(kmol K)]
inline scalar cp(const scalar p, const scalar T) const;
//- Absolute enthalpy [J/kmol]
inline scalar ha(const scalar p, const scalar T) const;
//- Sensible enthalpy [J/kmol]
inline scalar hs(const scalar p, const scalar T) const;
//- Chemical enthalpy [J/kmol]
inline scalar hc() const;
//- Entropy [J/(kmol K)]
inline scalar s(const scalar p, const scalar T) const;
// Member operators
inline constSolidThermo& operator=(const constSolidThermo&);
inline void operator+=(const constSolidThermo&);
inline void operator-=(const constSolidThermo&);
// Friend operators
friend constSolidThermo operator* <rhoType>
(
const scalar,
const constSolidThermo&
);
// IOstream Operators
friend Ostream& operator<< <rhoType>
(
Ostream&,
const constSolidThermo&
);
};
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
} // End namespace Foam
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
#ifdef NoRepository
# include "constSolidThermoI.H"
# include "constSolidThermo.C"
#endif
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
#endif
// ************************************************************************* //

View File

@ -1,214 +0,0 @@
/*---------------------------------------------------------------------------*\
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 2011 OpenFOAM Foundation
\\/ M anipulation |
-------------------------------------------------------------------------------
License
This file is part of OpenFOAM.
OpenFOAM is free software: you can redistribute it and/or modify it
under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
for more details.
You should have received a copy of the GNU General Public License
along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
\*---------------------------------------------------------------------------*/
// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
template<class rhoType>
inline Foam::constSolidThermo<rhoType>::constSolidThermo
(
const word& name,
const constSolidThermo& ct
)
:
rhoType(name, ct),
Cp_(ct.Cp_),
Hf_(ct.Hf_)
{}
template<class rhoType>
inline Foam::constSolidThermo<rhoType>::constSolidThermo
(
const rhoType& st,
const scalar Cp,
const scalar hf
)
:
rhoType(st),
Cp_(Cp),
Hf_(hf)
{}
template<class rhoType>
inline Foam::autoPtr<Foam::constSolidThermo<rhoType> >
Foam::constSolidThermo<rhoType>::clone() const
{
return autoPtr<constSolidThermo<rhoType> >
(
new constSolidThermo<rhoType>(*this)
);
}
template<class rhoType>
inline Foam::autoPtr<Foam::constSolidThermo<rhoType> >
Foam::constSolidThermo<rhoType>::New(dictionary& is)
{
return autoPtr<constSolidThermo<rhoType> >
(
new constSolidThermo<rhoType>(is)
);
}
// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
template<class rhoType>
inline Foam::scalar Foam::constSolidThermo<rhoType>::limit
(
const scalar T
) const
{
return T;
}
template<class rhoType>
inline Foam::scalar Foam::constSolidThermo<rhoType>::cp
(
const scalar, const scalar
) const
{
return Cp_*this->W();
}
template<class rhoType>
inline Foam::scalar Foam::constSolidThermo<rhoType>::ha
(
const scalar p, const scalar T
) const
{
scalar hOffset = Cp_*(specie::Tstd);
return (Cp_*T + Hf_ - hOffset)*this->W();
}
template<class rhoType>
inline Foam::scalar Foam::constSolidThermo<rhoType>::hs
(
const scalar p, const scalar T
) const
{
scalar hOffset = Cp_*(specie::Tstd);
return (Cp_*T - hOffset)*this->W();
}
template<class rhoType>
inline Foam::scalar Foam::constSolidThermo<rhoType>::hc() const
{
return Hf_*this->W();
}
template<class rhoType>
inline Foam::scalar Foam::constSolidThermo<rhoType>::s
(
const scalar p, const scalar T
) const
{
notImplemented
(
"scalar constSolidThermo<rhoType>::"
"s(const scalar p, const scalar T) const"
);
return T;
}
// * * * * * * * * * * * * * * * Member Operators * * * * * * * * * * * * * //
template<class rhoType>
inline Foam::constSolidThermo<rhoType>&
Foam::constSolidThermo<rhoType>::operator=
(
const constSolidThermo<rhoType>& ct
)
{
rhoType::operator=(ct);
Hf_ = ct.Hf_;
Cp_ = ct.Cp_;
return *this;
}
template<class rhoType>
inline void Foam::constSolidThermo<rhoType>::operator+=
(
const constSolidThermo<rhoType>& ct
)
{
scalar molr1 = this->nMoles();
rhoType::operator+=(ct);
molr1 /= this->nMoles();
scalar molr2 = ct.nMoles()/this->nMoles();
Cp_ = molr1*Cp_ + molr2*ct.Cp_;
Hf_ = molr1*Hf_ + molr2*ct.Hf_;
}
template<class rhoType>
inline void Foam::constSolidThermo<rhoType>::operator-=
(
const constSolidThermo<rhoType>& ct
)
{
scalar molr1 = this->nMoles();
rhoType::operator-=(ct);
molr1 /= this->nMoles();
scalar molr2 = ct.nMoles()/this->nMoles();
Cp_ = molr1*Cp_ - molr2*ct.Cp_;
Hf_ = molr1*Hf_ - molr2*ct.Hf_;
}
// * * * * * * * * * * * * * * * Friend Operators * * * * * * * * * * * * * //
template<class rhoType>
inline Foam::constSolidThermo<rhoType> Foam::operator*
(
const scalar s,
const constSolidThermo<rhoType>& ct
)
{
return constSolidThermo<rhoType>
(
s*static_cast<const rhoType&>(ct),
ct.Cp_,
ct.Hf_
);
}
// ************************************************************************* //

View File

@ -4,8 +4,8 @@ EXE_INC = \
-I$(LIB_SRC)/ODE/lnInclude \ -I$(LIB_SRC)/ODE/lnInclude \
-I$(LIB_SRC)/thermophysicalModels/chemistryModel/lnInclude \ -I$(LIB_SRC)/thermophysicalModels/chemistryModel/lnInclude \
-I$(LIB_SRC)/thermophysicalModels/basic/lnInclude \ -I$(LIB_SRC)/thermophysicalModels/basic/lnInclude \
-I$(LIB_SRC)/thermophysicalModels/solid/lnInclude \ -I$(LIB_SRC)/thermophysicalModels/solidSpecie/lnInclude \
-I$(LIB_SRC)/thermophysicalModels/basicSolidThermo/lnInclude \ -I$(LIB_SRC)/thermophysicalModels/solidThermo/lnInclude \
-I$(LIB_SRC)/thermophysicalModels/reactionThermo/lnInclude -I$(LIB_SRC)/thermophysicalModels/reactionThermo/lnInclude

View File

@ -45,7 +45,7 @@ namespace Foam
( (
ODESolidChemistryModel, ODESolidChemistryModel,
solidChemistryModel, solidChemistryModel,
constSolidThermoPhysics, hConstSolidThermoPhysics,
gasThermoPhysics gasThermoPhysics
); );
@ -53,7 +53,7 @@ namespace Foam
( (
ODESolidChemistryModel, ODESolidChemistryModel,
solidChemistryModel, solidChemistryModel,
expoSolidThermoPhysics, hExponentialSolidThermoPhysics,
gasThermoPhysics gasThermoPhysics
); );
} }

View File

@ -39,7 +39,7 @@ License
namespace Foam namespace Foam
{ {
typedef ODESolidChemistryModel typedef ODESolidChemistryModel
<solidChemistryModel, constSolidThermoPhysics, gasThermoPhysics> <solidChemistryModel, hConstSolidThermoPhysics, gasThermoPhysics>
solidODEChemistryConstThermo; solidODEChemistryConstThermo;
makeChemistrySolver(solidODEChemistryConstThermo) makeChemistrySolver(solidODEChemistryConstThermo)
@ -49,12 +49,12 @@ namespace Foam
ode, ode,
ODESolidChemistryModel, ODESolidChemistryModel,
solidChemistryModel, solidChemistryModel,
constSolidThermoPhysics, hConstSolidThermoPhysics,
gasThermoPhysics gasThermoPhysics
) )
typedef ODESolidChemistryModel typedef ODESolidChemistryModel
<solidChemistryModel, expoSolidThermoPhysics, gasThermoPhysics> <solidChemistryModel, hExponentialSolidThermoPhysics, gasThermoPhysics>
solidODEChemistryExpThermo; solidODEChemistryExpThermo;
makeChemistrySolver(solidODEChemistryExpThermo) makeChemistrySolver(solidODEChemistryExpThermo)
@ -64,7 +64,7 @@ namespace Foam
ode, ode,
ODESolidChemistryModel, ODESolidChemistryModel,
solidChemistryModel, solidChemistryModel,
expoSolidThermoPhysics, hExponentialSolidThermoPhysics,
gasThermoPhysics gasThermoPhysics
) )
} }

View File

@ -1,8 +1,4 @@
rhoType/const/constRho.C
reaction/Reactions/solidReaction/solidReaction.C reaction/Reactions/solidReaction/solidReaction.C
reaction/reactions/makeSolidReactionThermoReactions.C reaction/reactions/makeSolidReactionThermoReactions.C
LIB = $(FOAM_LIBBIN)/libsolidSpecie
LIB = $(FOAM_LIBBIN)/libsolid

View File

@ -32,10 +32,10 @@ Description
#ifndef solidThermoPhysicsTypes_H #ifndef solidThermoPhysicsTypes_H
#define solidThermoPhysicsTypes_H #define solidThermoPhysicsTypes_H
#include "constRho.H" #include "incompressible.H"
#include "constSolidThermo.H" #include "hConstThermo.H"
#include "exponentialSolidThermo.H" #include "hExponentialThermo.H"
#include "constIsoSolidTransport.H" #include "constIsoSolidTransport.H"
#include "constAnIsoSolidTransport.H" #include "constAnIsoSolidTransport.H"
@ -57,15 +57,15 @@ namespace Foam
< <
specieThermo specieThermo
< <
constSolidThermo hConstThermo
< <
constRho incompressible
>, >,
sensibleEnthalpy sensibleEnthalpy
> >
> >
> >
constSolidThermoPhysics; hConstSolidThermoPhysics;
typedef typedef
exponentialSolidTransport exponentialSolidTransport
@ -74,15 +74,15 @@ namespace Foam
< <
specieThermo specieThermo
< <
exponentialSolidThermo hExponentialThermo
< <
constRho incompressible
>, >,
sensibleEnthalpy sensibleEnthalpy
> >
> >
> >
expoSolidThermoPhysics; hExponentialSolidThermoPhysics;
} }

View File

@ -7,4 +7,4 @@ solidReactionThermo/solidReactionThermo.C
solidReactionThermo/solidReactionThermoNew.C solidReactionThermo/solidReactionThermoNew.C
heSolidThermo/heSolidThermos.C heSolidThermo/heSolidThermos.C
LIB = $(FOAM_LIBBIN)/libbasicSolidThermo LIB = $(FOAM_LIBBIN)/libsolidThermo

View File

@ -3,11 +3,11 @@ EXE_INC = \
-I$(LIB_SRC)/finiteVolume/lnInclude \ -I$(LIB_SRC)/finiteVolume/lnInclude \
-I$(LIB_SRC)/thermophysicalModels/basic/lnInclude \ -I$(LIB_SRC)/thermophysicalModels/basic/lnInclude \
-I$(LIB_SRC)/thermophysicalModels/specie/lnInclude \ -I$(LIB_SRC)/thermophysicalModels/specie/lnInclude \
-I$(LIB_SRC)/thermophysicalModels/solid/lnInclude -I$(LIB_SRC)/thermophysicalModels/solidSpecie/lnInclude
LIB_LIBS = \ LIB_LIBS = \
-lmeshTools \ -lmeshTools \
-lfiniteVolume \ -lfiniteVolume \
-lspecie \ -lspecie \
-lsolid \ -lsolidSpecie \
-lbasicThermophysicalModels -lbasicThermophysicalModels

View File

@ -26,10 +26,10 @@ License
#include "makeSolidThermo.H" #include "makeSolidThermo.H"
#include "constRho.H" #include "incompressible.H"
#include "constSolidThermo.H" #include "hConstThermo.H"
#include "exponentialSolidThermo.H" #include "hExponentialThermo.H"
#include "constIsoSolidTransport.H" #include "constIsoSolidTransport.H"
#include "constAnIsoSolidTransport.H" #include "constAnIsoSolidTransport.H"
@ -66,8 +66,8 @@ makeSolidThermo
constIsoSolidTransport, constIsoSolidTransport,
constSolidRad, constSolidRad,
sensibleEnthalpy, sensibleEnthalpy,
constSolidThermo, hConstThermo,
constRho incompressible
); );
makeSolidThermo makeSolidThermo
@ -78,8 +78,8 @@ makeSolidThermo
constAnIsoSolidTransport, constAnIsoSolidTransport,
constSolidRad, constSolidRad,
sensibleEnthalpy, sensibleEnthalpy,
constSolidThermo, hConstThermo,
constRho incompressible
); );
makeSolidThermo makeSolidThermo
@ -90,8 +90,8 @@ makeSolidThermo
exponentialSolidTransport, exponentialSolidTransport,
constSolidRad, constSolidRad,
sensibleEnthalpy, sensibleEnthalpy,
exponentialSolidThermo, hExponentialThermo,
constRho incompressible
); );
makeSolidThermo makeSolidThermo
@ -102,11 +102,10 @@ makeSolidThermo
constIsoSolidTransport, constIsoSolidTransport,
constSolidRad, constSolidRad,
sensibleEnthalpy, sensibleEnthalpy,
constSolidThermo, hConstThermo,
constRho incompressible
); );
// Reacting solid thermo
makeSolidThermo makeSolidThermo
( (
solidReactionThermo, solidReactionThermo,
@ -115,14 +114,10 @@ makeSolidThermo
constIsoSolidTransport, constIsoSolidTransport,
constSolidRad, constSolidRad,
sensibleEnthalpy, sensibleEnthalpy,
constSolidThermo, hConstThermo,
constRho incompressible
); );
/* * * * * * * * * * * * * * Internal-energy-based * * * * * * * * * * * * * */
/*
*/
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //

View File

@ -26,15 +26,14 @@ Description
\*---------------------------------------------------------------------------*/ \*---------------------------------------------------------------------------*/
#include "basicMixture.H" #include "basicMixture.H"
#include "makeBasicMixture.H" #include "makeBasicMixture.H"
#include "constRho.H" #include "incompressible.H"
#include "constSolidThermo.H" #include "hConstThermo.H"
#include "exponentialSolidThermo.H" #include "hExponentialThermo.H"
#include "constIsoSolidTransport.H" #include "constIsoSolidTransport.H"
#include "constAnIsoSolidTransport.H" #include "constAnIsoSolidTransport.H"
@ -64,8 +63,8 @@ makeBasicMixture
pureSolidMixture, pureSolidMixture,
constIsoSolidTransport, constIsoSolidTransport,
sensibleEnthalpy, sensibleEnthalpy,
constSolidThermo, hConstThermo,
constRho incompressible
); );
makeBasicMixture makeBasicMixture
@ -73,8 +72,8 @@ makeBasicMixture
pureSolidMixture, pureSolidMixture,
constAnIsoSolidTransport, constAnIsoSolidTransport,
sensibleEnthalpy, sensibleEnthalpy,
constSolidThermo, hConstThermo,
constRho incompressible
); );
makeBasicMixture makeBasicMixture
@ -82,8 +81,8 @@ makeBasicMixture
pureSolidMixture, pureSolidMixture,
exponentialSolidTransport, exponentialSolidTransport,
sensibleEnthalpy, sensibleEnthalpy,
exponentialSolidThermo, hExponentialThermo,
constRho incompressible
); );
makeBasicMixture makeBasicMixture
@ -91,8 +90,8 @@ makeBasicMixture
multiComponentSolidMixture, multiComponentSolidMixture,
constIsoSolidTransport, constIsoSolidTransport,
sensibleEnthalpy, sensibleEnthalpy,
constSolidThermo, hConstThermo,
constRho incompressible
); );
makeBasicMixture makeBasicMixture
@ -100,126 +99,10 @@ makeBasicMixture
reactingSolidMixture, reactingSolidMixture,
constIsoSolidTransport, constIsoSolidTransport,
sensibleEnthalpy, sensibleEnthalpy,
constSolidThermo,
constRho
);
/*
makeBasicMixture
(
pureMixture,
sutherlandTransport,
sensibleInternalEnergy,
eConstThermo,
perfectGas
);
makeBasicMixture
(
pureMixture,
constTransport,
sensibleInternalEnergy,
hConstThermo,
perfectGas
);
makeBasicMixture
(
pureMixture,
sutherlandTransport,
sensibleInternalEnergy,
hConstThermo,
perfectGas
);
makeBasicMixture
(
pureMixture,
sutherlandTransport,
sensibleInternalEnergy,
janafThermo,
perfectGas
);
makeBasicMixture
(
pureMixture,
constTransport,
sensibleEnthalpy,
hConstThermo,
perfectGas
);
makeBasicMixture
(
pureMixture,
sutherlandTransport,
sensibleEnthalpy,
hConstThermo,
perfectGas
);
makeBasicMixture
(
pureMixture,
sutherlandTransport,
sensibleEnthalpy,
janafThermo,
perfectGas
);
makeBasicMixture
(
pureMixture,
constTransport,
sensibleEnthalpy,
hConstThermo, hConstThermo,
incompressible incompressible
); );
makeBasicPolyMixture
(
pureMixture,
3,
sensibleEnthalpy
);
makeBasicPolyMixture
(
pureMixture,
8,
sensibleEnthalpy
);
makeBasicMixture
(
pureMixture,
constTransport,
sensibleEnthalpy,
hConstThermo,
isobaricPerfectGas
);
makeBasicMixture
(
pureMixture,
sutherlandTransport,
sensibleEnthalpy,
hConstThermo,
isobaricPerfectGas
);
makeBasicMixture
(
pureMixture,
sutherlandTransport,
sensibleEnthalpy,
janafThermo,
isobaricPerfectGas
);
*/
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //

View File

@ -35,7 +35,6 @@ SourceFiles
#ifndef solidReactionThermo_H #ifndef solidReactionThermo_H
#define solidReactionThermo_H #define solidReactionThermo_H
#include "rhoThermo.H"
#include "basicSolidMixture.H" #include "basicSolidMixture.H"
#include "solidThermo.H" #include "solidThermo.H"
#include "autoPtr.H" #include "autoPtr.H"

View File

@ -33,7 +33,7 @@ Description
#define makesolidThermo_H #define makesolidThermo_H
#include "addToRunTimeSelectionTable.H" #include "addToRunTimeSelectionTable.H"
#include "basicThermo.H" #include "veryBasicThermo.H"
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
namespace Foam namespace Foam
@ -131,7 +131,7 @@ addToRunTimeSelectionTable \
); \ ); \
addToRunTimeSelectionTable \ addToRunTimeSelectionTable \
( \ ( \
basicThermo, \ veryBasicThermo, \
Cthermo##Mixture##Transport##Radiation##Type##Thermo##Rho##BaseThermo, \ Cthermo##Mixture##Transport##Radiation##Type##Thermo##Rho##BaseThermo, \
fvMesh \ fvMesh \
); \ ); \

View File

@ -25,8 +25,7 @@ License
#include "solidThermo.H" #include "solidThermo.H"
#include "fvMesh.H" #include "fvMesh.H"
#include "volFields.H"
#include "HashTable.H"
/* * * * * * * * * * * * * * * private static data * * * * * * * * * * * * * */ /* * * * * * * * * * * * * * * private static data * * * * * * * * * * * * * */
@ -42,7 +41,20 @@ namespace Foam
Foam::solidThermo::solidThermo(const fvMesh& mesh) Foam::solidThermo::solidThermo(const fvMesh& mesh)
: :
rhoThermo(mesh) veryBasicThermo(mesh),
rho_
(
IOobject
(
"rhoThermo",
mesh.time().timeName(),
mesh,
IOobject::NO_READ,
IOobject::NO_WRITE
),
mesh,
dimDensity
)
{} {}
@ -52,7 +64,20 @@ Foam::solidThermo::solidThermo
const dictionary& dict const dictionary& dict
) )
: :
rhoThermo(mesh, dict) veryBasicThermo(mesh, dict),
rho_
(
IOobject
(
"rhoThermo",
mesh.time().timeName(),
mesh,
IOobject::NO_READ,
IOobject::NO_WRITE
),
mesh,
dimDensity
)
{} {}
@ -64,6 +89,18 @@ Foam::solidThermo::~solidThermo()
// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * // // * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
Foam::tmp<Foam::volScalarField> Foam::solidThermo::rho() const
{
return rho_;
}
Foam::volScalarField& Foam::solidThermo::rho()
{
return rho_;
}
bool Foam::solidThermo::read() bool Foam::solidThermo::read()
{ {
return regIOobject::read(); return regIOobject::read();

View File

@ -41,7 +41,8 @@ SourceFiles
#include "IOdictionary.H" #include "IOdictionary.H"
#include "autoPtr.H" #include "autoPtr.H"
#include "basicSolidMixture.H" #include "basicSolidMixture.H"
#include "rhoThermo.H" #include "veryBasicThermo.H"
#include "autoPtr.H"
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
@ -54,9 +55,18 @@ namespace Foam
class solidThermo class solidThermo
: :
public rhoThermo public veryBasicThermo
{ {
protected:
// Protected data
//- Density field [kg/m^3]
// Named 'rhoThermo' to avoid (potential) conflict with solver density
volScalarField rho_;
public: public:
//- Runtime type information //- Runtime type information
@ -107,8 +117,13 @@ public:
// Member functions // Member functions
// Fields derived from thermodynamic state variables
// Derived thermal properties //- Density [kg/m^3]
virtual tmp<volScalarField> rho() const;
//- Return non-const access to the local density field [kg/m^3]
virtual volScalarField& rho();
//- Thermal conductivity [W/m/K] //- Thermal conductivity [W/m/K]
virtual tmp<volVectorField> Kappa() const = 0; virtual tmp<volVectorField> Kappa() const = 0;

View File

@ -2,7 +2,7 @@
========= | ========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration | \\ / O peration |
\\ / A nd | Copyright (C) 2011 OpenFOAM Foundation \\ / A nd | Copyright (C) 2012 OpenFOAM Foundation
\\/ M anipulation | \\/ M anipulation |
------------------------------------------------------------------------------- -------------------------------------------------------------------------------
License License
@ -23,18 +23,18 @@ License
\*---------------------------------------------------------------------------*/ \*---------------------------------------------------------------------------*/
#include "exponentialSolidThermo.H" #include "hExponentialThermo.H"
#include "IOstreams.H" #include "IOstreams.H"
// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * // // * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
template<class rhoType> template<class equationOfState>
Foam::exponentialSolidThermo<rhoType>::exponentialSolidThermo Foam::hExponentialThermo<equationOfState>::hExponentialThermo
( (
const dictionary& dict const dictionary& dict
) )
: :
rhoType(dict), equationOfState(dict),
c0_(readScalar(dict.subDict("thermodynamics").lookup("C0"))), c0_(readScalar(dict.subDict("thermodynamics").lookup("C0"))),
n0_(readScalar(dict.subDict("thermodynamics").lookup("n0"))), n0_(readScalar(dict.subDict("thermodynamics").lookup("n0"))),
Tref_(readScalar(dict.subDict("thermodynamics").lookup("Tref"))), Tref_(readScalar(dict.subDict("thermodynamics").lookup("Tref"))),
@ -44,14 +44,14 @@ Foam::exponentialSolidThermo<rhoType>::exponentialSolidThermo
// * * * * * * * * * * * * * * * Ostream Operator * * * * * * * * * * * * * // // * * * * * * * * * * * * * * * Ostream Operator * * * * * * * * * * * * * //
template<class rhoType> template<class equationOfState>
Foam::Ostream& Foam::operator<< Foam::Ostream& Foam::operator<<
( (
Ostream& os, Ostream& os,
const exponentialSolidThermo<rhoType>& et const hExponentialThermo<equationOfState>& et
) )
{ {
os << static_cast<const rhoType&>(et) << nl os << static_cast<const equationOfState&>(et) << nl
<< " " << et.c0_ << " " << et.c0_
<< tab << et.n0_ << tab << et.n0_
<< tab << et.Tref_ << tab << et.Tref_
@ -63,7 +63,7 @@ Foam::Ostream& Foam::operator<<
os.check os.check
( (
"operator<<(Ostream& os, const exponentialSolidThermo<rhoType>& et)" "operator<<(Ostream& os, const hExponentialThermo<equationOfState>& et)"
); );
return os; return os;

View File

@ -2,7 +2,7 @@
========= | ========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration | \\ / O peration |
\\ / A nd | Copyright (C) 2011 OpenFOAM Foundation \\ / A nd | Copyright (C) 2012 OpenFOAM Foundation
\\/ M anipulation | \\/ M anipulation |
------------------------------------------------------------------------------- -------------------------------------------------------------------------------
License License
@ -22,19 +22,20 @@ License
along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>. along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
Class Class
Foam::exponentialSolidThermo Foam::hExponentialThermo
Description Description
Exponential thermodynamics package for solids templated into the rhoType. Exponential properties thermodynamics package
templated into the equationOfState.
SourceFiles SourceFiles
exponentialSolidThermoI.H hExponentialThermoI.H
exponentialSolidThermo.C hExponentialThermo.C
\*---------------------------------------------------------------------------*/ \*---------------------------------------------------------------------------*/
#ifndef exponentialSolidThermo_H #ifndef hExponentialThermo_H
#define exponentialSolidThermo_H #define hExponentialThermo_H
#include "scalar.H" #include "scalar.H"
#include "dictionary.H" #include "dictionary.H"
@ -45,32 +46,32 @@ SourceFiles
namespace Foam namespace Foam
{ {
template<class rhoType> class exponentialSolidThermo; template<class equationOfState> class hExponentialThermo;
template<class rhoType> template<class equationOfState>
inline exponentialSolidThermo<rhoType> operator* inline hExponentialThermo<equationOfState> operator*
( (
const scalar, const scalar,
const exponentialSolidThermo<rhoType>& const hExponentialThermo<equationOfState>&
); );
template<class rhoType> template<class equationOfState>
Ostream& operator<< Ostream& operator<<
( (
Ostream&, Ostream&,
const exponentialSolidThermo<rhoType>& const hExponentialThermo<equationOfState>&
); );
/*---------------------------------------------------------------------------*\ /*---------------------------------------------------------------------------*\
Class exponentialSolidThermo Declaration Class hExponentialThermo Declaration
\*---------------------------------------------------------------------------*/ \*---------------------------------------------------------------------------*/
template<class rhoType> template<class equationOfState>
class exponentialSolidThermo class hExponentialThermo
: :
public rhoType public equationOfState
{ {
// Private data // Private data
@ -95,9 +96,9 @@ public:
// Constructors // Constructors
//- Construct from components //- Construct from components
inline exponentialSolidThermo inline hExponentialThermo
( (
const rhoType& st, const equationOfState& st,
const scalar c0, const scalar c0,
const scalar n0, const scalar n0,
const scalar Tref, const scalar Tref,
@ -105,13 +106,13 @@ public:
); );
//- Construct from dictionary //- Construct from dictionary
exponentialSolidThermo(const dictionary&); hExponentialThermo(const dictionary&);
//- Construct as a named copy //- Construct as a named copy
inline exponentialSolidThermo inline hExponentialThermo
( (
const word&, const word&,
const exponentialSolidThermo& const hExponentialThermo&
); );
@ -141,30 +142,30 @@ public:
// Member operators // Member operators
inline exponentialSolidThermo& operator= inline hExponentialThermo& operator=
( (
const exponentialSolidThermo& const hExponentialThermo&
); );
inline void operator+=(const exponentialSolidThermo&); inline void operator+=(const hExponentialThermo&);
inline void operator-=(const exponentialSolidThermo&); inline void operator-=(const hExponentialThermo&);
// Friend operators // Friend operators
friend exponentialSolidThermo operator* <rhoType> friend hExponentialThermo operator* <equationOfState>
( (
const scalar, const scalar,
const exponentialSolidThermo& const hExponentialThermo&
); );
// Ostream Operator // Ostream Operator
friend Ostream& operator<< <rhoType> friend Ostream& operator<< <equationOfState>
( (
Ostream&, Ostream&,
const exponentialSolidThermo& const hExponentialThermo&
); );
}; };
@ -177,8 +178,8 @@ public:
#ifdef NoRepository #ifdef NoRepository
# include "exponentialSolidThermoI.H" # include "hExponentialThermoI.H"
# include "exponentialSolidThermo.C" # include "hExponentialThermo.C"
#endif #endif
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //

View File

@ -2,7 +2,7 @@
========= | ========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration | \\ / O peration |
\\ / A nd | Copyright (C) 2011 OpenFOAM Foundation \\ / A nd | Copyright (C) 2012 OpenFOAM Foundation
\\/ M anipulation | \\/ M anipulation |
------------------------------------------------------------------------------- -------------------------------------------------------------------------------
License License
@ -23,20 +23,23 @@ License
\*---------------------------------------------------------------------------*/ \*---------------------------------------------------------------------------*/
#include "exponentialSolidThermo.H" #include "hExponentialThermo.H"
#include "specie.H" #include "specie.H"
// * * * * * * * * * * * * * Private Member Functions * * * * * * * * * * * // // * * * * * * * * * * * * * Private Member Functions * * * * * * * * * * * //
template<class rhoType> template<class equationOfState>
inline void Foam::exponentialSolidThermo<rhoType>::checkT(const scalar T) const inline void Foam::hExponentialThermo<equationOfState>::checkT
(
const scalar T
) const
{ {
if (T < 0.0) if (T < 0.0)
{ {
FatalErrorIn FatalErrorIn
( (
"exponentialSolidThermo<rhoType>::checkT(const scalar T) const" "hExponentialThermo<equationOfState>::checkT(const scalar T) const"
) << "attempt to use exponentialSolidThermo<rhoType>" ) << "attempt to use hExponentialThermo<equationOfState>"
" out of temperature range " " out of temperature range "
<< T << T
<< abort(FatalError); << abort(FatalError);
@ -44,8 +47,8 @@ inline void Foam::exponentialSolidThermo<rhoType>::checkT(const scalar T) const
} }
template<class rhoType> template<class equationOfState>
inline Foam::scalar Foam::exponentialSolidThermo<rhoType>::integrateCp inline Foam::scalar Foam::hExponentialThermo<equationOfState>::integrateCp
( (
const scalar T const scalar T
) const ) const
@ -60,14 +63,14 @@ inline Foam::scalar Foam::exponentialSolidThermo<rhoType>::integrateCp
// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * // // * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
template<class rhoType> template<class equationOfState>
inline Foam::exponentialSolidThermo<rhoType>::exponentialSolidThermo inline Foam::hExponentialThermo<equationOfState>::hExponentialThermo
( (
const word& name, const word& name,
const exponentialSolidThermo& jt const hExponentialThermo& jt
) )
: :
rhoType(name, jt), equationOfState(name, jt),
c0_(jt.c0_), c0_(jt.c0_),
n0_(jt.n0_), n0_(jt.n0_),
Tref_(jt.Tref_), Tref_(jt.Tref_),
@ -75,17 +78,17 @@ inline Foam::exponentialSolidThermo<rhoType>::exponentialSolidThermo
{} {}
template<class rhoType> template<class equationOfState>
inline Foam::exponentialSolidThermo<rhoType>::exponentialSolidThermo inline Foam::hExponentialThermo<equationOfState>::hExponentialThermo
( (
const rhoType& st, const equationOfState& st,
const scalar c0, const scalar c0,
const scalar n0, const scalar n0,
const scalar Tref, const scalar Tref,
const scalar Hf const scalar Hf
) )
: :
rhoType(st), equationOfState(st),
c0_(c0), c0_(c0),
n0_(n0), n0_(n0),
Tref_(Tref), Tref_(Tref),
@ -95,8 +98,8 @@ inline Foam::exponentialSolidThermo<rhoType>::exponentialSolidThermo
// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * // // * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
template<class rhoType> template<class equationOfState>
inline Foam::scalar Foam::exponentialSolidThermo<rhoType>::limit inline Foam::scalar Foam::hExponentialThermo<equationOfState>::limit
( (
const scalar T const scalar T
) const ) const
@ -105,8 +108,8 @@ inline Foam::scalar Foam::exponentialSolidThermo<rhoType>::limit
} }
template<class rhoType> template<class equationOfState>
inline Foam::scalar Foam::exponentialSolidThermo<rhoType>::cp inline Foam::scalar Foam::hExponentialThermo<equationOfState>::cp
( (
const scalar p, const scalar T const scalar p, const scalar T
) const ) const
@ -115,8 +118,8 @@ inline Foam::scalar Foam::exponentialSolidThermo<rhoType>::cp
} }
template<class rhoType> template<class equationOfState>
inline Foam::scalar Foam::exponentialSolidThermo<rhoType>::ha inline Foam::scalar Foam::hExponentialThermo<equationOfState>::ha
( (
const scalar p, const scalar T const scalar p, const scalar T
) const ) const
@ -130,8 +133,8 @@ inline Foam::scalar Foam::exponentialSolidThermo<rhoType>::ha
} }
template<class rhoType> template<class equationOfState>
inline Foam::scalar Foam::exponentialSolidThermo<rhoType>::hs inline Foam::scalar Foam::hExponentialThermo<equationOfState>::hs
( (
const scalar p, const scalar T const scalar p, const scalar T
) const ) const
@ -141,22 +144,22 @@ inline Foam::scalar Foam::exponentialSolidThermo<rhoType>::hs
} }
template<class rhoType> template<class equationOfState>
inline Foam::scalar Foam::exponentialSolidThermo<rhoType>::hc() const inline Foam::scalar Foam::hExponentialThermo<equationOfState>::hc() const
{ {
return Hf_*this->W(); return Hf_*this->W();
} }
template<class rhoType> template<class equationOfState>
inline Foam::scalar Foam::exponentialSolidThermo<rhoType>::s inline Foam::scalar Foam::hExponentialThermo<equationOfState>::s
( (
const scalar p, const scalar T const scalar p, const scalar T
) const ) const
{ {
notImplemented notImplemented
( (
"scalar exponentialSolidThermo<rhoType>::" "scalar hExponentialThermo<equationOfState>::"
"s(const scalar p, const scalar T) const" "s(const scalar p, const scalar T) const"
); );
return T; return T;
@ -165,14 +168,14 @@ inline Foam::scalar Foam::exponentialSolidThermo<rhoType>::s
// * * * * * * * * * * * * * * * Member Operators * * * * * * * * * * * * * // // * * * * * * * * * * * * * * * Member Operators * * * * * * * * * * * * * //
template<class rhoType> template<class equationOfState>
inline Foam::exponentialSolidThermo<rhoType>& inline Foam::hExponentialThermo<equationOfState>&
Foam::exponentialSolidThermo<rhoType>::operator= Foam::hExponentialThermo<equationOfState>::operator=
( (
const exponentialSolidThermo<rhoType>& ct const hExponentialThermo<equationOfState>& ct
) )
{ {
rhoType::operator=(ct); equationOfState::operator=(ct);
Hf_ = ct.Hf_; Hf_ = ct.Hf_;
c0_ = ct.c0_; c0_ = ct.c0_;
@ -183,15 +186,15 @@ Foam::exponentialSolidThermo<rhoType>::operator=
} }
template<class rhoType> template<class equationOfState>
inline void Foam::exponentialSolidThermo<rhoType>::operator+= inline void Foam::hExponentialThermo<equationOfState>::operator+=
( (
const exponentialSolidThermo<rhoType>& ct const hExponentialThermo<equationOfState>& ct
) )
{ {
scalar molr1 = this->nMoles(); scalar molr1 = this->nMoles();
rhoType::operator+=(ct); equationOfState::operator+=(ct);
molr1 /= this->nMoles(); molr1 /= this->nMoles();
scalar molr2 = ct.nMoles()/this->nMoles(); scalar molr2 = ct.nMoles()/this->nMoles();
@ -203,15 +206,15 @@ inline void Foam::exponentialSolidThermo<rhoType>::operator+=
} }
template<class rhoType> template<class equationOfState>
inline void Foam::exponentialSolidThermo<rhoType>::operator-= inline void Foam::hExponentialThermo<equationOfState>::operator-=
( (
const exponentialSolidThermo<rhoType>& ct const hExponentialThermo<equationOfState>& ct
) )
{ {
scalar molr1 = this->nMoles(); scalar molr1 = this->nMoles();
rhoType::operator-=(ct); equationOfState::operator-=(ct);
molr1 /= this->nMoles(); molr1 /= this->nMoles();
scalar molr2 = ct.nMoles()/this->nMoles(); scalar molr2 = ct.nMoles()/this->nMoles();
@ -225,16 +228,16 @@ inline void Foam::exponentialSolidThermo<rhoType>::operator-=
// * * * * * * * * * * * * * * * Friend Operators * * * * * * * * * * * * * // // * * * * * * * * * * * * * * * Friend Operators * * * * * * * * * * * * * //
template<class rhoType> template<class equationOfState>
inline Foam::exponentialSolidThermo<rhoType> Foam::operator* inline Foam::hExponentialThermo<equationOfState> Foam::operator*
( (
const scalar s, const scalar s,
const exponentialSolidThermo<rhoType>& ct const hExponentialThermo<equationOfState>& ct
) )
{ {
return exponentialSolidThermo<rhoType> return hExponentialThermo<equationOfState>
( (
s*static_cast<const rhoType&>(ct), s*static_cast<const equationOfState&>(ct),
ct.Hf_, ct.Hf_,
ct.c0_, ct.c0_,
ct.n0_, ct.n0_,
@ -242,4 +245,5 @@ inline Foam::exponentialSolidThermo<rhoType> Foam::operator*
); );
} }
// ************************************************************************* // // ************************************************************************* //

View File

@ -1,7 +1,7 @@
EXE_INC = \ EXE_INC = \
-I$(LIB_SRC)/turbulenceModels \ -I$(LIB_SRC)/turbulenceModels \
-I$(LIB_SRC)/thermophysicalModels/basic/lnInclude \ -I$(LIB_SRC)/thermophysicalModels/basic/lnInclude \
-I$(LIB_SRC)/thermophysicalModels/basicSolidThermo/lnInclude \ -I$(LIB_SRC)/thermophysicalModels/solidThermo/lnInclude \
-I$(LIB_SRC)/finiteVolume/lnInclude \ -I$(LIB_SRC)/finiteVolume/lnInclude \
-I$(LIB_SRC)/meshTools/lnInclude \ -I$(LIB_SRC)/meshTools/lnInclude \

View File

@ -4,11 +4,11 @@ EXE_INC = \
-I$(LIB_SRC)/turbulenceModels \ -I$(LIB_SRC)/turbulenceModels \
-I$(LIB_SRC)/thermophysicalModels/basic/lnInclude \ -I$(LIB_SRC)/thermophysicalModels/basic/lnInclude \
-I$(LIB_SRC)/thermophysicalModels/specie/lnInclude \ -I$(LIB_SRC)/thermophysicalModels/specie/lnInclude \
-I$(LIB_SRC)/thermophysicalModels/basicSolidThermo/lnInclude \ -I$(LIB_SRC)/thermophysicalModels/solidThermo/lnInclude \
-I$(LIB_SRC)/thermophysicalModels/solid/lnInclude -I$(LIB_SRC)/thermophysicalModels/solidSpecie/lnInclude
LIB_LIBS = \ LIB_LIBS = \
-lbasicSolidThermo \ -lsolidThermo \
-lbasicThermophysicalModels \ -lbasicThermophysicalModels \
-lspecie \ -lspecie \
-lfiniteVolume \ -lfiniteVolume \

View File

@ -33,7 +33,7 @@ Description
- 'lookup' : lookup volScalarField (or volSymmTensorField) with name - 'lookup' : lookup volScalarField (or volSymmTensorField) with name
- 'basicThermo' : use basicThermo and default compressible::turbulenceModel - 'basicThermo' : use basicThermo and default compressible::turbulenceModel
to calculate kappa to calculate kappa
- 'solidThermo' : use basicSolidThermo kappa() - 'solidThermo' : use solidThermo kappa()
- 'directionalSolidThermo' directionalKappa() - 'directionalSolidThermo' directionalKappa()
SourceFiles SourceFiles

View File

@ -81,7 +81,7 @@ class temperatureThermoBaffle1DFvPatchScalarField
transportDict_(dict.subDict("transport")), transportDict_(dict.subDict("transport")),
radiationDict_(dict.subDict("radiation")), radiationDict_(dict.subDict("radiation")),
thermoDict_(dict.subDict("thermodynamics")), thermoDict_(dict.subDict("thermodynamics")),
densityDict_(dict.subDict("density")) densityDict_(dict.subDict("equationOfState"))
{} {}

View File

@ -39,7 +39,7 @@ namespace compressible
defineTemplateTypeNameAndDebugWithName defineTemplateTypeNameAndDebugWithName
( (
constSolid_temperatureThermoBaffle1DFvPatchScalarField, constSolid_temperatureThermoBaffle1DFvPatchScalarField,
"compressible::temperatureThermoBaffle1D<constSolidThermoPhysics>", "compressible::temperatureThermoBaffle1D<hConstSolidThermoPhysics>",
0 0
); );
@ -52,7 +52,7 @@ addToPatchFieldRunTimeSelection
defineTemplateTypeNameAndDebugWithName defineTemplateTypeNameAndDebugWithName
( (
expoSolid_temperatureThermoBaffle1DFvPatchScalarField, expoSolid_temperatureThermoBaffle1DFvPatchScalarField,
"compressible::temperatureThermoBaffle1D<expoSolidThermoPhysics>", "compressible::temperatureThermoBaffle1D<hExponentialSolidThermoPhysics>",
0 0
); );

View File

@ -40,12 +40,12 @@ namespace compressible
typedef temperatureThermoBaffle1DFvPatchScalarField typedef temperatureThermoBaffle1DFvPatchScalarField
< <
constSolidThermoPhysics hConstSolidThermoPhysics
>constSolid_temperatureThermoBaffle1DFvPatchScalarField; >constSolid_temperatureThermoBaffle1DFvPatchScalarField;
typedef temperatureThermoBaffle1DFvPatchScalarField typedef temperatureThermoBaffle1DFvPatchScalarField
< <
expoSolidThermoPhysics hExponentialSolidThermoPhysics
>expoSolid_temperatureThermoBaffle1DFvPatchScalarField; >expoSolid_temperatureThermoBaffle1DFvPatchScalarField;

View File

@ -53,7 +53,7 @@ Description
- 'lookup' : lookup volScalarField (or volSymmTensorField) with name - 'lookup' : lookup volScalarField (or volSymmTensorField) with name
- 'basicThermo' : use basicThermo and compressible::RASmodel to calculate - 'basicThermo' : use basicThermo and compressible::RASmodel to calculate
kappa kappa
- 'solidThermo' : use basicSolidThermo kappa() - 'solidThermo' : use solidThermo kappa()
- 'directionalSolidThermo' directionalKappa() - 'directionalSolidThermo' directionalKappa()
Note: runs in parallel with arbitrary decomposition. Uses mapped Note: runs in parallel with arbitrary decomposition. Uses mapped

View File

@ -49,7 +49,7 @@ Description
kappa: kappa:
- 'lookup' : lookup volScalarField (or volSymmTensorField) with name - 'lookup' : lookup volScalarField (or volSymmTensorField) with name
- 'basicThermo' : use basicThermo and compressible::RASmodel to calculate K - 'basicThermo' : use basicThermo and compressible::RASmodel to calculate K
- 'solidThermo' : use basicSolidThermo kappa() - 'solidThermo' : use solidThermo kappa()
- 'directionalSolidThermo' directionalKappa() - 'directionalSolidThermo' directionalKappa()
Note: runs in parallel with arbitrary decomposition. Uses mapped Note: runs in parallel with arbitrary decomposition. Uses mapped

View File

Some files were not shown because too many files have changed in this diff Show More