mirror of
https://develop.openfoam.com/Development/openfoam.git
synced 2025-11-28 03:28:01 +00:00
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:
@ -6,7 +6,7 @@ EXE_INC = \
|
||||
-I$(LIB_SRC)/thermophysicalModels/specie/lnInclude \
|
||||
-I$(LIB_SRC)/thermophysicalModels/solid/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/solidChemistryModel/lnInclude \
|
||||
-I$(LIB_SRC)/combustionModels/lnInclude \
|
||||
|
||||
@ -10,7 +10,7 @@ EXE_INC = \
|
||||
-I$(LIB_SRC)/finiteVolume/lnInclude \
|
||||
-I$(LIB_SRC)/thermophysicalModels/basic/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/turbulenceModel/lnInclude \
|
||||
-I$(LIB_SRC)/turbulenceModels \
|
||||
@ -21,7 +21,7 @@ EXE_INC = \
|
||||
|
||||
EXE_LIBS = \
|
||||
-lbasicThermophysicalModels \
|
||||
-lbasicSolidThermo \
|
||||
-lsolidThermo \
|
||||
-lspecie \
|
||||
-lcompressibleTurbulenceModel \
|
||||
-lcompressibleRASModels \
|
||||
|
||||
@ -8,7 +8,7 @@ EXE_INC = \
|
||||
-I$(LIB_SRC)/finiteVolume/cfdTools \
|
||||
-I$(LIB_SRC)/thermophysicalModels/basic/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)/turbulenceModels \
|
||||
-I$(LIB_SRC)/turbulenceModels/compressible/turbulenceModel/lnInclude \
|
||||
@ -20,7 +20,7 @@ EXE_INC = \
|
||||
EXE_LIBS = \
|
||||
-lfiniteVolume \
|
||||
-lbasicThermophysicalModels \
|
||||
-lbasicSolidThermo \
|
||||
-lsolidThermo \
|
||||
-lspecie \
|
||||
-lcompressibleTurbulenceModel \
|
||||
-lcompressibleRASModels \
|
||||
|
||||
@ -1,7 +1,7 @@
|
||||
EXE_LIBS = \
|
||||
-lautoMesh \
|
||||
-lbarotropicCompressibilityModel \
|
||||
-lbasicSolidThermo \
|
||||
-lsolidThermo \
|
||||
-lbasicThermophysicalModels \
|
||||
-lblockMesh \
|
||||
-lchemistryModel \
|
||||
|
||||
@ -1,12 +1,12 @@
|
||||
EXE_INC = \
|
||||
-I$(LIB_SRC)/thermophysicalModels/basic/lnInclude \
|
||||
-I$(LIB_SRC)/thermophysicalModels/specie/lnInclude \
|
||||
-I$(LIB_SRC)/thermophysicalModels/basicSolidThermo/lnInclude \
|
||||
-I$(LIB_SRC)/thermophysicalModels/solidThermo/lnInclude \
|
||||
-I$(LIB_SRC)/finiteVolume/lnInclude
|
||||
|
||||
EXE_LIBS = \
|
||||
-lbasicThermophysicalModels \
|
||||
-lbasicSolidThermo \
|
||||
-lsolidThermo \
|
||||
-lspecie \
|
||||
-lfiniteVolume \
|
||||
-lgenericPatchFields
|
||||
|
||||
@ -4,7 +4,7 @@ EXE_INC = \
|
||||
-I$(LIB_SRC)/thermophysicalModels/specie/lnInclude \
|
||||
-I$(LIB_SRC)/thermophysicalModels/reactionThermo/lnInclude \
|
||||
-I$(LIB_SRC)/thermophysicalModels/basic/lnInclude \
|
||||
-I$(LIB_SRC)/thermophysicalModels/basicSolidThermo/lnInclude \
|
||||
-I$(LIB_SRC)/thermophysicalModels/solidThermo/lnInclude \
|
||||
-I$(LIB_SRC)/finiteVolume/lnInclude
|
||||
|
||||
EXE_LIBS = \
|
||||
@ -15,4 +15,4 @@ EXE_LIBS = \
|
||||
-lspecie \
|
||||
-lsolid \
|
||||
-lbasicThermophysicalModels \
|
||||
-lbasicSolidThermo
|
||||
-lsolidThermo
|
||||
|
||||
@ -1,6 +1,6 @@
|
||||
autoPtr<basicThermo> thermo
|
||||
autoPtr<veryBasicThermo> thermo
|
||||
(
|
||||
basicThermo::New(mesh)
|
||||
veryBasicThermo::New(mesh)
|
||||
);
|
||||
|
||||
const volScalarField& h = thermo->he();
|
||||
@ -22,7 +22,7 @@ autoPtr<volVectorField> UPtr;
|
||||
autoPtr<surfaceScalarField> phiPtr;
|
||||
autoPtr<compressible::turbulenceModel> turbulence;
|
||||
|
||||
if (!isA<solidThermo>(thermo()))
|
||||
if (isA<basicThermo>(thermo()))
|
||||
{
|
||||
UPtr.reset
|
||||
(
|
||||
@ -51,6 +51,6 @@ if (!isA<solidThermo>(thermo()))
|
||||
rho,
|
||||
U,
|
||||
phiPtr(),
|
||||
thermo()
|
||||
refCast<const basicThermo>(thermo())
|
||||
);
|
||||
}
|
||||
|
||||
@ -61,7 +61,11 @@ Foam::dynamicMotionSolverFvMesh::~dynamicMotionSolverFvMesh()
|
||||
|
||||
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"))
|
||||
{
|
||||
|
||||
@ -2,7 +2,7 @@ EXE_INC = \
|
||||
-I$(LIB_SRC)/finiteVolume/lnInclude \
|
||||
-I$(LIB_SRC)/meshTools/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/specie/lnInclude \
|
||||
-I$(LIB_SRC)/turbulenceModels/compressible/turbulenceModel/lnInclude \
|
||||
@ -13,5 +13,5 @@ LIB_LIBS = \
|
||||
-lfiniteVolume \
|
||||
-lsampling \
|
||||
-lmeshTools \
|
||||
-lbasicSolidThermo \
|
||||
-lsolidThermo \
|
||||
-lcompressibleTurbulenceModel
|
||||
|
||||
@ -5,7 +5,7 @@ EXE_INC = \
|
||||
-I$(LIB_SRC)/thermophysicalModels/specie/lnInclude \
|
||||
-I$(LIB_SRC)/thermophysicalModels/solid/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)/turbulenceModels \
|
||||
-I$(LIB_SRC)/turbulenceModels/compressible/turbulenceModel/lnInclude \
|
||||
|
||||
@ -77,7 +77,7 @@ protected:
|
||||
//- Read control parameters from dictionary
|
||||
virtual bool read(const dictionary& dict);
|
||||
|
||||
//- Reset solidChemistryModel and basicSolidThermo pointers
|
||||
//- Reset solidChemistryModel and solidThermo pointers
|
||||
void constructThermoChemistry();
|
||||
|
||||
//- Reference to the solid chemistry model
|
||||
|
||||
@ -7,7 +7,7 @@ EXE_INC = \
|
||||
-I$(LIB_SRC)/thermophysicalModels/specie/lnInclude \
|
||||
-I$(LIB_SRC)/thermophysicalModels/basic/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/radiationModels/lnInclude \
|
||||
-I$(LIB_SRC)/turbulenceModels \
|
||||
|
||||
@ -1,6 +1,6 @@
|
||||
EXE_INC = \
|
||||
-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)/finiteVolume/lnInclude \
|
||||
-I$(LIB_SRC)/meshTools/lnInclude \
|
||||
@ -12,7 +12,7 @@ EXE_INC = \
|
||||
|
||||
LIB_LIBS = \
|
||||
-lregionModels \
|
||||
-lbasicSolidThermo \
|
||||
-lsolidThermo \
|
||||
-lcompressibleTurbulenceModel \
|
||||
-lfiniteVolume \
|
||||
-lmeshTools \
|
||||
|
||||
@ -59,7 +59,7 @@ Description
|
||||
<constIsoSolidTransport
|
||||
<constSolidRad
|
||||
<specieThermo
|
||||
<constSolidThermo<constRho>,sensibleEnthalpy>
|
||||
<hConstThermo<incompressible>,sensibleEnthalpy>
|
||||
>
|
||||
>
|
||||
>
|
||||
|
||||
@ -104,7 +104,7 @@ public:
|
||||
|
||||
// Thermo properties
|
||||
|
||||
//- Return const reference to the basicSolidThermo
|
||||
//- Return const reference to the solidThermo
|
||||
virtual const solidThermo& thermo() const;
|
||||
|
||||
|
||||
|
||||
@ -4,7 +4,6 @@ makeType=${1:-libso}
|
||||
set -x
|
||||
|
||||
wmake $makeType specie
|
||||
wmake $makeType solid
|
||||
wmake $makeType thermophysicalFunctions
|
||||
./properties/Allwmake $*
|
||||
|
||||
@ -16,8 +15,8 @@ wmake $makeType barotropicCompressibilityModel
|
||||
wmake $makeType thermalPorousZone
|
||||
wmake $makeType SLGThermo
|
||||
|
||||
# Should be combined with solids&solidMixture
|
||||
wmake $makeType basicSolidThermo
|
||||
wmake $makeType solidSpecie
|
||||
wmake $makeType solidThermo
|
||||
wmake $makeType solidChemistryModel
|
||||
|
||||
wmake $makeType radiationModels
|
||||
|
||||
@ -1,6 +1,9 @@
|
||||
mixtures/basicMixture/basicMixture.C
|
||||
mixtures/basicMixture/basicMixtures.C
|
||||
|
||||
basicThermo/veryBasicThermo.C
|
||||
basicThermo/veryBasicThermoNew.C
|
||||
|
||||
basicThermo/basicThermo.C
|
||||
basicThermo/basicThermoNew.C
|
||||
|
||||
|
||||
@ -24,14 +24,6 @@ License
|
||||
\*---------------------------------------------------------------------------*/
|
||||
|
||||
#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 * * * * * * * * * * * * * */
|
||||
|
||||
@ -46,171 +38,14 @@ namespace Foam
|
||||
|
||||
Foam::basicThermo::basicThermo(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
|
||||
),
|
||||
|
||||
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)
|
||||
)
|
||||
veryBasicThermo(mesh)
|
||||
{}
|
||||
|
||||
|
||||
|
||||
Foam::basicThermo::basicThermo(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
|
||||
),
|
||||
|
||||
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)
|
||||
)
|
||||
veryBasicThermo(mesh, dict)
|
||||
{}
|
||||
|
||||
|
||||
@ -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();
|
||||
}
|
||||
|
||||
|
||||
// ************************************************************************* //
|
||||
|
||||
@ -36,10 +36,7 @@ SourceFiles
|
||||
#ifndef basicThermo_H
|
||||
#define basicThermo_H
|
||||
|
||||
#include "volFields.H"
|
||||
#include "typeInfo.H"
|
||||
#include "IOdictionary.H"
|
||||
#include "autoPtr.H"
|
||||
#include "veryBasicThermo.H"
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
@ -52,35 +49,9 @@ namespace Foam
|
||||
|
||||
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:
|
||||
|
||||
//- Runtime type information
|
||||
@ -115,180 +86,16 @@ public:
|
||||
|
||||
// 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;
|
||||
|
||||
//- Compressibility [s^2/m^2]
|
||||
virtual const volScalarField& psi() const;
|
||||
|
||||
//- 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;
|
||||
virtual const volScalarField& psi() const = 0;
|
||||
|
||||
|
||||
// Access to transport state variables
|
||||
|
||||
//- Dynamic viscosity of mixture [kg/m/s]
|
||||
virtual const volScalarField& mu() const;
|
||||
|
||||
//- 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();
|
||||
virtual const volScalarField& mu() const = 0;
|
||||
};
|
||||
|
||||
|
||||
|
||||
196
src/thermophysicalModels/basic/basicThermo/veryBasicThermo.C
Normal file
196
src/thermophysicalModels/basic/basicThermo/veryBasicThermo.C
Normal 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();
|
||||
}
|
||||
|
||||
|
||||
// ************************************************************************* //
|
||||
291
src/thermophysicalModels/basic/basicThermo/veryBasicThermo.H
Normal file
291
src/thermophysicalModels/basic/basicThermo/veryBasicThermo.H
Normal 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
|
||||
|
||||
// ************************************************************************* //
|
||||
@ -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));
|
||||
}
|
||||
|
||||
|
||||
// ************************************************************************* //
|
||||
@ -26,7 +26,7 @@ License
|
||||
#include "addToRunTimeSelectionTable.H"
|
||||
#include "energyJumpFvPatchScalarField.H"
|
||||
#include "temperatureJumpFvPatchScalarField.H"
|
||||
#include "basicThermo.H"
|
||||
#include "veryBasicThermo.H"
|
||||
|
||||
// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
|
||||
|
||||
@ -103,7 +103,7 @@ void Foam::energyJumpFvPatchScalarField::updateCoeffs()
|
||||
|
||||
if (this->cyclicPatch().owner())
|
||||
{
|
||||
const basicThermo& thermo = db().lookupObject<basicThermo>
|
||||
const veryBasicThermo& thermo = db().lookupObject<veryBasicThermo>
|
||||
(
|
||||
"thermophysicalProperties"
|
||||
);
|
||||
|
||||
@ -25,7 +25,7 @@ License
|
||||
|
||||
#include "fvPatchFieldMapper.H"
|
||||
#include "volFields.H"
|
||||
#include "basicThermo.H"
|
||||
#include "veryBasicThermo.H"
|
||||
#include "addToRunTimeSelectionTable.H"
|
||||
#include "fixedEnergyFvPatchScalarField.H"
|
||||
|
||||
@ -97,7 +97,7 @@ void Foam::fixedEnergyFvPatchScalarField::updateCoeffs()
|
||||
return;
|
||||
}
|
||||
|
||||
const basicThermo& thermo = db().lookupObject<basicThermo>
|
||||
const veryBasicThermo& thermo = db().lookupObject<veryBasicThermo>
|
||||
(
|
||||
"thermophysicalProperties"
|
||||
);
|
||||
|
||||
@ -27,7 +27,7 @@ License
|
||||
#include "addToRunTimeSelectionTable.H"
|
||||
#include "fvPatchFieldMapper.H"
|
||||
#include "volFields.H"
|
||||
#include "basicThermo.H"
|
||||
#include "veryBasicThermo.H"
|
||||
|
||||
// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
|
||||
|
||||
@ -97,7 +97,7 @@ void Foam::gradientEnergyFvPatchScalarField::updateCoeffs()
|
||||
return;
|
||||
}
|
||||
|
||||
const basicThermo& thermo = db().lookupObject<basicThermo>
|
||||
const veryBasicThermo& thermo = db().lookupObject<veryBasicThermo>
|
||||
(
|
||||
"thermophysicalProperties"
|
||||
);
|
||||
|
||||
@ -27,7 +27,7 @@ License
|
||||
#include "addToRunTimeSelectionTable.H"
|
||||
#include "fvPatchFieldMapper.H"
|
||||
#include "volFields.H"
|
||||
#include "basicThermo.H"
|
||||
#include "veryBasicThermo.H"
|
||||
|
||||
|
||||
// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
|
||||
@ -102,7 +102,7 @@ void Foam::mixedEnergyFvPatchScalarField::updateCoeffs()
|
||||
return;
|
||||
}
|
||||
|
||||
const basicThermo& thermo = db().lookupObject<basicThermo>
|
||||
const veryBasicThermo& thermo = db().lookupObject<veryBasicThermo>
|
||||
(
|
||||
"thermophysicalProperties"
|
||||
);
|
||||
|
||||
@ -27,7 +27,7 @@ License
|
||||
#include "addToRunTimeSelectionTable.H"
|
||||
#include "fvPatchFieldMapper.H"
|
||||
#include "volFields.H"
|
||||
#include "basicThermo.H"
|
||||
#include "veryBasicThermo.H"
|
||||
|
||||
// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
|
||||
|
||||
@ -149,7 +149,7 @@ void Foam::wallHeatTransferFvPatchScalarField::updateCoeffs()
|
||||
return;
|
||||
}
|
||||
|
||||
const basicThermo& thermo = db().lookupObject<basicThermo>
|
||||
const veryBasicThermo& thermo = db().lookupObject<veryBasicThermo>
|
||||
(
|
||||
"thermophysicalProperties"
|
||||
);
|
||||
|
||||
@ -38,7 +38,35 @@ namespace Foam
|
||||
|
||||
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_;
|
||||
}
|
||||
|
||||
|
||||
// ************************************************************************* //
|
||||
|
||||
@ -55,6 +55,15 @@ class psiThermo
|
||||
|
||||
protected:
|
||||
|
||||
// Protected data
|
||||
|
||||
//- Compressibility [s^2/m^2]
|
||||
volScalarField psi_;
|
||||
|
||||
//- Dynamic viscosity [kg/m/s]
|
||||
volScalarField mu_;
|
||||
|
||||
|
||||
// Protected Member Functions
|
||||
|
||||
//- Construct as copy (not implemented)
|
||||
@ -97,10 +106,16 @@ public:
|
||||
// Fields derived from thermodynamic state variables
|
||||
|
||||
//- Density [kg/m^3] - uses current value of pressure
|
||||
virtual tmp<volScalarField> rho() const
|
||||
{
|
||||
return p_*psi();
|
||||
}
|
||||
virtual tmp<volScalarField> rho() const;
|
||||
|
||||
//- 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;
|
||||
};
|
||||
|
||||
|
||||
|
||||
@ -51,6 +51,34 @@ Foam::rhoThermo::rhoThermo(const fvMesh& mesh)
|
||||
),
|
||||
mesh,
|
||||
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,
|
||||
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_;
|
||||
}
|
||||
|
||||
|
||||
// ************************************************************************* //
|
||||
|
||||
@ -61,6 +61,12 @@ protected:
|
||||
// Named 'rhoThermo' to avoid (potential) conflict with solver density
|
||||
volScalarField rho_;
|
||||
|
||||
//- Compressibility [s^2/m^2]
|
||||
volScalarField psi_;
|
||||
|
||||
//- Dynamic viscosity [kg/m/s]
|
||||
volScalarField mu_;
|
||||
|
||||
|
||||
// Protected Member Functions
|
||||
|
||||
@ -111,6 +117,15 @@ public:
|
||||
|
||||
//- Return non-const access to the local density field [kg/m^3]
|
||||
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;
|
||||
};
|
||||
|
||||
|
||||
|
||||
@ -3,7 +3,7 @@ EXE_INC = \
|
||||
-I$(LIB_SRC)/meshTools/lnInclude \
|
||||
-I$(LIB_SRC)/thermophysicalModels/basic/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/properties/liquidProperties/lnInclude \
|
||||
-I$(LIB_SRC)/thermophysicalModels/properties/liquidMixtureProperties/lnInclude \
|
||||
@ -16,7 +16,7 @@ LIB_LIBS = \
|
||||
-lfiniteVolume \
|
||||
-lbasicThermophysicalModels \
|
||||
-lspecie \
|
||||
-lbasicSolidThermo \
|
||||
-lsolidThermo \
|
||||
-lmeshTools \
|
||||
-lSLGThermo \
|
||||
-lsolidMixtureProperties \
|
||||
|
||||
@ -29,7 +29,7 @@ Description
|
||||
dictionary or calculated by the solidThermo:
|
||||
|
||||
- 'lookup' : lookup volScalarField with name
|
||||
- 'solidThermo' : use basicSolidThermo emissivity()
|
||||
- 'solidThermo' : use solidThermo emissivity()
|
||||
|
||||
SourceFiles
|
||||
radiationCoupledBase.C
|
||||
|
||||
@ -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;
|
||||
}
|
||||
|
||||
|
||||
// ************************************************************************* //
|
||||
@ -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
|
||||
|
||||
// ************************************************************************* //
|
||||
@ -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_
|
||||
);
|
||||
}
|
||||
|
||||
// ************************************************************************* //
|
||||
@ -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;
|
||||
}
|
||||
|
||||
|
||||
// ************************************************************************* //
|
||||
@ -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
|
||||
|
||||
// ************************************************************************* //
|
||||
@ -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_
|
||||
);
|
||||
}
|
||||
|
||||
// ************************************************************************* //
|
||||
@ -4,8 +4,8 @@ EXE_INC = \
|
||||
-I$(LIB_SRC)/ODE/lnInclude \
|
||||
-I$(LIB_SRC)/thermophysicalModels/chemistryModel/lnInclude \
|
||||
-I$(LIB_SRC)/thermophysicalModels/basic/lnInclude \
|
||||
-I$(LIB_SRC)/thermophysicalModels/solid/lnInclude \
|
||||
-I$(LIB_SRC)/thermophysicalModels/basicSolidThermo/lnInclude \
|
||||
-I$(LIB_SRC)/thermophysicalModels/solidSpecie/lnInclude \
|
||||
-I$(LIB_SRC)/thermophysicalModels/solidThermo/lnInclude \
|
||||
-I$(LIB_SRC)/thermophysicalModels/reactionThermo/lnInclude
|
||||
|
||||
|
||||
|
||||
@ -45,7 +45,7 @@ namespace Foam
|
||||
(
|
||||
ODESolidChemistryModel,
|
||||
solidChemistryModel,
|
||||
constSolidThermoPhysics,
|
||||
hConstSolidThermoPhysics,
|
||||
gasThermoPhysics
|
||||
);
|
||||
|
||||
@ -53,7 +53,7 @@ namespace Foam
|
||||
(
|
||||
ODESolidChemistryModel,
|
||||
solidChemistryModel,
|
||||
expoSolidThermoPhysics,
|
||||
hExponentialSolidThermoPhysics,
|
||||
gasThermoPhysics
|
||||
);
|
||||
}
|
||||
|
||||
@ -39,7 +39,7 @@ License
|
||||
namespace Foam
|
||||
{
|
||||
typedef ODESolidChemistryModel
|
||||
<solidChemistryModel, constSolidThermoPhysics, gasThermoPhysics>
|
||||
<solidChemistryModel, hConstSolidThermoPhysics, gasThermoPhysics>
|
||||
solidODEChemistryConstThermo;
|
||||
|
||||
makeChemistrySolver(solidODEChemistryConstThermo)
|
||||
@ -49,12 +49,12 @@ namespace Foam
|
||||
ode,
|
||||
ODESolidChemistryModel,
|
||||
solidChemistryModel,
|
||||
constSolidThermoPhysics,
|
||||
hConstSolidThermoPhysics,
|
||||
gasThermoPhysics
|
||||
)
|
||||
|
||||
typedef ODESolidChemistryModel
|
||||
<solidChemistryModel, expoSolidThermoPhysics, gasThermoPhysics>
|
||||
<solidChemistryModel, hExponentialSolidThermoPhysics, gasThermoPhysics>
|
||||
solidODEChemistryExpThermo;
|
||||
|
||||
makeChemistrySolver(solidODEChemistryExpThermo)
|
||||
@ -64,7 +64,7 @@ namespace Foam
|
||||
ode,
|
||||
ODESolidChemistryModel,
|
||||
solidChemistryModel,
|
||||
expoSolidThermoPhysics,
|
||||
hExponentialSolidThermoPhysics,
|
||||
gasThermoPhysics
|
||||
)
|
||||
}
|
||||
|
||||
@ -1,8 +1,4 @@
|
||||
rhoType/const/constRho.C
|
||||
|
||||
reaction/Reactions/solidReaction/solidReaction.C
|
||||
|
||||
reaction/reactions/makeSolidReactionThermoReactions.C
|
||||
|
||||
|
||||
LIB = $(FOAM_LIBBIN)/libsolid
|
||||
LIB = $(FOAM_LIBBIN)/libsolidSpecie
|
||||
@ -32,10 +32,10 @@ Description
|
||||
#ifndef solidThermoPhysicsTypes_H
|
||||
#define solidThermoPhysicsTypes_H
|
||||
|
||||
#include "constRho.H"
|
||||
#include "incompressible.H"
|
||||
|
||||
#include "constSolidThermo.H"
|
||||
#include "exponentialSolidThermo.H"
|
||||
#include "hConstThermo.H"
|
||||
#include "hExponentialThermo.H"
|
||||
|
||||
#include "constIsoSolidTransport.H"
|
||||
#include "constAnIsoSolidTransport.H"
|
||||
@ -57,15 +57,15 @@ namespace Foam
|
||||
<
|
||||
specieThermo
|
||||
<
|
||||
constSolidThermo
|
||||
hConstThermo
|
||||
<
|
||||
constRho
|
||||
incompressible
|
||||
>,
|
||||
sensibleEnthalpy
|
||||
>
|
||||
>
|
||||
>
|
||||
constSolidThermoPhysics;
|
||||
hConstSolidThermoPhysics;
|
||||
|
||||
typedef
|
||||
exponentialSolidTransport
|
||||
@ -74,15 +74,15 @@ namespace Foam
|
||||
<
|
||||
specieThermo
|
||||
<
|
||||
exponentialSolidThermo
|
||||
hExponentialThermo
|
||||
<
|
||||
constRho
|
||||
incompressible
|
||||
>,
|
||||
sensibleEnthalpy
|
||||
>
|
||||
>
|
||||
>
|
||||
expoSolidThermoPhysics;
|
||||
hExponentialSolidThermoPhysics;
|
||||
}
|
||||
|
||||
|
||||
@ -7,4 +7,4 @@ solidReactionThermo/solidReactionThermo.C
|
||||
solidReactionThermo/solidReactionThermoNew.C
|
||||
heSolidThermo/heSolidThermos.C
|
||||
|
||||
LIB = $(FOAM_LIBBIN)/libbasicSolidThermo
|
||||
LIB = $(FOAM_LIBBIN)/libsolidThermo
|
||||
@ -3,11 +3,11 @@ EXE_INC = \
|
||||
-I$(LIB_SRC)/finiteVolume/lnInclude \
|
||||
-I$(LIB_SRC)/thermophysicalModels/basic/lnInclude \
|
||||
-I$(LIB_SRC)/thermophysicalModels/specie/lnInclude \
|
||||
-I$(LIB_SRC)/thermophysicalModels/solid/lnInclude
|
||||
-I$(LIB_SRC)/thermophysicalModels/solidSpecie/lnInclude
|
||||
|
||||
LIB_LIBS = \
|
||||
-lmeshTools \
|
||||
-lfiniteVolume \
|
||||
-lspecie \
|
||||
-lsolid \
|
||||
-lsolidSpecie \
|
||||
-lbasicThermophysicalModels
|
||||
@ -26,10 +26,10 @@ License
|
||||
|
||||
#include "makeSolidThermo.H"
|
||||
|
||||
#include "constRho.H"
|
||||
#include "incompressible.H"
|
||||
|
||||
#include "constSolidThermo.H"
|
||||
#include "exponentialSolidThermo.H"
|
||||
#include "hConstThermo.H"
|
||||
#include "hExponentialThermo.H"
|
||||
|
||||
#include "constIsoSolidTransport.H"
|
||||
#include "constAnIsoSolidTransport.H"
|
||||
@ -66,8 +66,8 @@ makeSolidThermo
|
||||
constIsoSolidTransport,
|
||||
constSolidRad,
|
||||
sensibleEnthalpy,
|
||||
constSolidThermo,
|
||||
constRho
|
||||
hConstThermo,
|
||||
incompressible
|
||||
);
|
||||
|
||||
makeSolidThermo
|
||||
@ -78,8 +78,8 @@ makeSolidThermo
|
||||
constAnIsoSolidTransport,
|
||||
constSolidRad,
|
||||
sensibleEnthalpy,
|
||||
constSolidThermo,
|
||||
constRho
|
||||
hConstThermo,
|
||||
incompressible
|
||||
);
|
||||
|
||||
makeSolidThermo
|
||||
@ -90,8 +90,8 @@ makeSolidThermo
|
||||
exponentialSolidTransport,
|
||||
constSolidRad,
|
||||
sensibleEnthalpy,
|
||||
exponentialSolidThermo,
|
||||
constRho
|
||||
hExponentialThermo,
|
||||
incompressible
|
||||
);
|
||||
|
||||
makeSolidThermo
|
||||
@ -102,11 +102,10 @@ makeSolidThermo
|
||||
constIsoSolidTransport,
|
||||
constSolidRad,
|
||||
sensibleEnthalpy,
|
||||
constSolidThermo,
|
||||
constRho
|
||||
hConstThermo,
|
||||
incompressible
|
||||
);
|
||||
|
||||
// Reacting solid thermo
|
||||
makeSolidThermo
|
||||
(
|
||||
solidReactionThermo,
|
||||
@ -115,14 +114,10 @@ makeSolidThermo
|
||||
constIsoSolidTransport,
|
||||
constSolidRad,
|
||||
sensibleEnthalpy,
|
||||
constSolidThermo,
|
||||
constRho
|
||||
hConstThermo,
|
||||
incompressible
|
||||
);
|
||||
|
||||
/* * * * * * * * * * * * * * Internal-energy-based * * * * * * * * * * * * * */
|
||||
/*
|
||||
|
||||
*/
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
@ -26,15 +26,14 @@ Description
|
||||
|
||||
\*---------------------------------------------------------------------------*/
|
||||
|
||||
|
||||
#include "basicMixture.H"
|
||||
#include "makeBasicMixture.H"
|
||||
|
||||
|
||||
#include "constRho.H"
|
||||
#include "incompressible.H"
|
||||
|
||||
#include "constSolidThermo.H"
|
||||
#include "exponentialSolidThermo.H"
|
||||
#include "hConstThermo.H"
|
||||
#include "hExponentialThermo.H"
|
||||
|
||||
#include "constIsoSolidTransport.H"
|
||||
#include "constAnIsoSolidTransport.H"
|
||||
@ -64,8 +63,8 @@ makeBasicMixture
|
||||
pureSolidMixture,
|
||||
constIsoSolidTransport,
|
||||
sensibleEnthalpy,
|
||||
constSolidThermo,
|
||||
constRho
|
||||
hConstThermo,
|
||||
incompressible
|
||||
);
|
||||
|
||||
makeBasicMixture
|
||||
@ -73,8 +72,8 @@ makeBasicMixture
|
||||
pureSolidMixture,
|
||||
constAnIsoSolidTransport,
|
||||
sensibleEnthalpy,
|
||||
constSolidThermo,
|
||||
constRho
|
||||
hConstThermo,
|
||||
incompressible
|
||||
);
|
||||
|
||||
makeBasicMixture
|
||||
@ -82,8 +81,8 @@ makeBasicMixture
|
||||
pureSolidMixture,
|
||||
exponentialSolidTransport,
|
||||
sensibleEnthalpy,
|
||||
exponentialSolidThermo,
|
||||
constRho
|
||||
hExponentialThermo,
|
||||
incompressible
|
||||
);
|
||||
|
||||
makeBasicMixture
|
||||
@ -91,8 +90,8 @@ makeBasicMixture
|
||||
multiComponentSolidMixture,
|
||||
constIsoSolidTransport,
|
||||
sensibleEnthalpy,
|
||||
constSolidThermo,
|
||||
constRho
|
||||
hConstThermo,
|
||||
incompressible
|
||||
);
|
||||
|
||||
makeBasicMixture
|
||||
@ -100,126 +99,10 @@ makeBasicMixture
|
||||
reactingSolidMixture,
|
||||
constIsoSolidTransport,
|
||||
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,
|
||||
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
|
||||
);
|
||||
*/
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
@ -35,7 +35,6 @@ SourceFiles
|
||||
#ifndef solidReactionThermo_H
|
||||
#define solidReactionThermo_H
|
||||
|
||||
#include "rhoThermo.H"
|
||||
#include "basicSolidMixture.H"
|
||||
#include "solidThermo.H"
|
||||
#include "autoPtr.H"
|
||||
@ -33,7 +33,7 @@ Description
|
||||
#define makesolidThermo_H
|
||||
|
||||
#include "addToRunTimeSelectionTable.H"
|
||||
#include "basicThermo.H"
|
||||
#include "veryBasicThermo.H"
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
namespace Foam
|
||||
@ -131,7 +131,7 @@ addToRunTimeSelectionTable \
|
||||
); \
|
||||
addToRunTimeSelectionTable \
|
||||
( \
|
||||
basicThermo, \
|
||||
veryBasicThermo, \
|
||||
Cthermo##Mixture##Transport##Radiation##Type##Thermo##Rho##BaseThermo, \
|
||||
fvMesh \
|
||||
); \
|
||||
@ -25,8 +25,7 @@ License
|
||||
|
||||
#include "solidThermo.H"
|
||||
#include "fvMesh.H"
|
||||
#include "volFields.H"
|
||||
#include "HashTable.H"
|
||||
|
||||
|
||||
/* * * * * * * * * * * * * * * private static data * * * * * * * * * * * * * */
|
||||
|
||||
@ -42,7 +41,20 @@ namespace Foam
|
||||
|
||||
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
|
||||
)
|
||||
:
|
||||
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 * * * * * * * * * * * * * //
|
||||
|
||||
Foam::tmp<Foam::volScalarField> Foam::solidThermo::rho() const
|
||||
{
|
||||
return rho_;
|
||||
}
|
||||
|
||||
|
||||
Foam::volScalarField& Foam::solidThermo::rho()
|
||||
{
|
||||
return rho_;
|
||||
}
|
||||
|
||||
|
||||
bool Foam::solidThermo::read()
|
||||
{
|
||||
return regIOobject::read();
|
||||
@ -41,7 +41,8 @@ SourceFiles
|
||||
#include "IOdictionary.H"
|
||||
#include "autoPtr.H"
|
||||
#include "basicSolidMixture.H"
|
||||
#include "rhoThermo.H"
|
||||
#include "veryBasicThermo.H"
|
||||
#include "autoPtr.H"
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
@ -54,9 +55,18 @@ namespace Foam
|
||||
|
||||
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:
|
||||
|
||||
//- Runtime type information
|
||||
@ -107,8 +117,13 @@ public:
|
||||
|
||||
// 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]
|
||||
virtual tmp<volVectorField> Kappa() const = 0;
|
||||
@ -2,7 +2,7 @@
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration |
|
||||
\\ / A nd | Copyright (C) 2011 OpenFOAM Foundation
|
||||
\\ / A nd | Copyright (C) 2012 OpenFOAM Foundation
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
@ -23,18 +23,18 @@ License
|
||||
|
||||
\*---------------------------------------------------------------------------*/
|
||||
|
||||
#include "exponentialSolidThermo.H"
|
||||
#include "hExponentialThermo.H"
|
||||
#include "IOstreams.H"
|
||||
|
||||
// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
|
||||
|
||||
template<class rhoType>
|
||||
Foam::exponentialSolidThermo<rhoType>::exponentialSolidThermo
|
||||
template<class equationOfState>
|
||||
Foam::hExponentialThermo<equationOfState>::hExponentialThermo
|
||||
(
|
||||
const dictionary& dict
|
||||
)
|
||||
:
|
||||
rhoType(dict),
|
||||
equationOfState(dict),
|
||||
c0_(readScalar(dict.subDict("thermodynamics").lookup("C0"))),
|
||||
n0_(readScalar(dict.subDict("thermodynamics").lookup("n0"))),
|
||||
Tref_(readScalar(dict.subDict("thermodynamics").lookup("Tref"))),
|
||||
@ -44,14 +44,14 @@ Foam::exponentialSolidThermo<rhoType>::exponentialSolidThermo
|
||||
|
||||
// * * * * * * * * * * * * * * * Ostream Operator * * * * * * * * * * * * * //
|
||||
|
||||
template<class rhoType>
|
||||
template<class equationOfState>
|
||||
Foam::Ostream& Foam::operator<<
|
||||
(
|
||||
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_
|
||||
<< tab << et.n0_
|
||||
<< tab << et.Tref_
|
||||
@ -63,7 +63,7 @@ Foam::Ostream& Foam::operator<<
|
||||
|
||||
os.check
|
||||
(
|
||||
"operator<<(Ostream& os, const exponentialSolidThermo<rhoType>& et)"
|
||||
"operator<<(Ostream& os, const hExponentialThermo<equationOfState>& et)"
|
||||
);
|
||||
|
||||
return os;
|
||||
@ -2,7 +2,7 @@
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration |
|
||||
\\ / A nd | Copyright (C) 2011 OpenFOAM Foundation
|
||||
\\ / A nd | Copyright (C) 2012 OpenFOAM Foundation
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
@ -22,19 +22,20 @@ License
|
||||
along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
Class
|
||||
Foam::exponentialSolidThermo
|
||||
Foam::hExponentialThermo
|
||||
|
||||
Description
|
||||
Exponential thermodynamics package for solids templated into the rhoType.
|
||||
Exponential properties thermodynamics package
|
||||
templated into the equationOfState.
|
||||
|
||||
SourceFiles
|
||||
exponentialSolidThermoI.H
|
||||
exponentialSolidThermo.C
|
||||
hExponentialThermoI.H
|
||||
hExponentialThermo.C
|
||||
|
||||
\*---------------------------------------------------------------------------*/
|
||||
|
||||
#ifndef exponentialSolidThermo_H
|
||||
#define exponentialSolidThermo_H
|
||||
#ifndef hExponentialThermo_H
|
||||
#define hExponentialThermo_H
|
||||
|
||||
#include "scalar.H"
|
||||
#include "dictionary.H"
|
||||
@ -45,32 +46,32 @@ SourceFiles
|
||||
namespace Foam
|
||||
{
|
||||
|
||||
template<class rhoType> class exponentialSolidThermo;
|
||||
template<class equationOfState> class hExponentialThermo;
|
||||
|
||||
template<class rhoType>
|
||||
inline exponentialSolidThermo<rhoType> operator*
|
||||
template<class equationOfState>
|
||||
inline hExponentialThermo<equationOfState> operator*
|
||||
(
|
||||
const scalar,
|
||||
const exponentialSolidThermo<rhoType>&
|
||||
const hExponentialThermo<equationOfState>&
|
||||
);
|
||||
|
||||
|
||||
template<class rhoType>
|
||||
template<class equationOfState>
|
||||
Ostream& operator<<
|
||||
(
|
||||
Ostream&,
|
||||
const exponentialSolidThermo<rhoType>&
|
||||
const hExponentialThermo<equationOfState>&
|
||||
);
|
||||
|
||||
|
||||
/*---------------------------------------------------------------------------*\
|
||||
Class exponentialSolidThermo Declaration
|
||||
Class hExponentialThermo Declaration
|
||||
\*---------------------------------------------------------------------------*/
|
||||
|
||||
template<class rhoType>
|
||||
class exponentialSolidThermo
|
||||
template<class equationOfState>
|
||||
class hExponentialThermo
|
||||
:
|
||||
public rhoType
|
||||
public equationOfState
|
||||
{
|
||||
|
||||
// Private data
|
||||
@ -95,9 +96,9 @@ public:
|
||||
// Constructors
|
||||
|
||||
//- Construct from components
|
||||
inline exponentialSolidThermo
|
||||
inline hExponentialThermo
|
||||
(
|
||||
const rhoType& st,
|
||||
const equationOfState& st,
|
||||
const scalar c0,
|
||||
const scalar n0,
|
||||
const scalar Tref,
|
||||
@ -105,13 +106,13 @@ public:
|
||||
);
|
||||
|
||||
//- Construct from dictionary
|
||||
exponentialSolidThermo(const dictionary&);
|
||||
hExponentialThermo(const dictionary&);
|
||||
|
||||
//- Construct as a named copy
|
||||
inline exponentialSolidThermo
|
||||
inline hExponentialThermo
|
||||
(
|
||||
const word&,
|
||||
const exponentialSolidThermo&
|
||||
const hExponentialThermo&
|
||||
);
|
||||
|
||||
|
||||
@ -141,30 +142,30 @@ public:
|
||||
|
||||
// Member operators
|
||||
|
||||
inline exponentialSolidThermo& operator=
|
||||
inline hExponentialThermo& operator=
|
||||
(
|
||||
const exponentialSolidThermo&
|
||||
const hExponentialThermo&
|
||||
);
|
||||
inline void operator+=(const exponentialSolidThermo&);
|
||||
inline void operator-=(const exponentialSolidThermo&);
|
||||
inline void operator+=(const hExponentialThermo&);
|
||||
inline void operator-=(const hExponentialThermo&);
|
||||
|
||||
|
||||
// Friend operators
|
||||
|
||||
|
||||
friend exponentialSolidThermo operator* <rhoType>
|
||||
friend hExponentialThermo operator* <equationOfState>
|
||||
(
|
||||
const scalar,
|
||||
const exponentialSolidThermo&
|
||||
const hExponentialThermo&
|
||||
);
|
||||
|
||||
|
||||
// Ostream Operator
|
||||
|
||||
friend Ostream& operator<< <rhoType>
|
||||
friend Ostream& operator<< <equationOfState>
|
||||
(
|
||||
Ostream&,
|
||||
const exponentialSolidThermo&
|
||||
const hExponentialThermo&
|
||||
);
|
||||
};
|
||||
|
||||
@ -177,8 +178,8 @@ public:
|
||||
|
||||
|
||||
#ifdef NoRepository
|
||||
# include "exponentialSolidThermoI.H"
|
||||
# include "exponentialSolidThermo.C"
|
||||
# include "hExponentialThermoI.H"
|
||||
# include "hExponentialThermo.C"
|
||||
#endif
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
@ -2,7 +2,7 @@
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration |
|
||||
\\ / A nd | Copyright (C) 2011 OpenFOAM Foundation
|
||||
\\ / A nd | Copyright (C) 2012 OpenFOAM Foundation
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
@ -23,20 +23,23 @@ License
|
||||
|
||||
\*---------------------------------------------------------------------------*/
|
||||
|
||||
#include "exponentialSolidThermo.H"
|
||||
#include "hExponentialThermo.H"
|
||||
#include "specie.H"
|
||||
|
||||
// * * * * * * * * * * * * * Private Member Functions * * * * * * * * * * * //
|
||||
|
||||
template<class rhoType>
|
||||
inline void Foam::exponentialSolidThermo<rhoType>::checkT(const scalar T) const
|
||||
template<class equationOfState>
|
||||
inline void Foam::hExponentialThermo<equationOfState>::checkT
|
||||
(
|
||||
const scalar T
|
||||
) const
|
||||
{
|
||||
if (T < 0.0)
|
||||
{
|
||||
FatalErrorIn
|
||||
(
|
||||
"exponentialSolidThermo<rhoType>::checkT(const scalar T) const"
|
||||
) << "attempt to use exponentialSolidThermo<rhoType>"
|
||||
"hExponentialThermo<equationOfState>::checkT(const scalar T) const"
|
||||
) << "attempt to use hExponentialThermo<equationOfState>"
|
||||
" out of temperature range "
|
||||
<< T
|
||||
<< abort(FatalError);
|
||||
@ -44,8 +47,8 @@ inline void Foam::exponentialSolidThermo<rhoType>::checkT(const scalar T) const
|
||||
}
|
||||
|
||||
|
||||
template<class rhoType>
|
||||
inline Foam::scalar Foam::exponentialSolidThermo<rhoType>::integrateCp
|
||||
template<class equationOfState>
|
||||
inline Foam::scalar Foam::hExponentialThermo<equationOfState>::integrateCp
|
||||
(
|
||||
const scalar T
|
||||
) const
|
||||
@ -60,14 +63,14 @@ inline Foam::scalar Foam::exponentialSolidThermo<rhoType>::integrateCp
|
||||
|
||||
// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
|
||||
|
||||
template<class rhoType>
|
||||
inline Foam::exponentialSolidThermo<rhoType>::exponentialSolidThermo
|
||||
template<class equationOfState>
|
||||
inline Foam::hExponentialThermo<equationOfState>::hExponentialThermo
|
||||
(
|
||||
const word& name,
|
||||
const exponentialSolidThermo& jt
|
||||
const hExponentialThermo& jt
|
||||
)
|
||||
:
|
||||
rhoType(name, jt),
|
||||
equationOfState(name, jt),
|
||||
c0_(jt.c0_),
|
||||
n0_(jt.n0_),
|
||||
Tref_(jt.Tref_),
|
||||
@ -75,17 +78,17 @@ inline Foam::exponentialSolidThermo<rhoType>::exponentialSolidThermo
|
||||
{}
|
||||
|
||||
|
||||
template<class rhoType>
|
||||
inline Foam::exponentialSolidThermo<rhoType>::exponentialSolidThermo
|
||||
template<class equationOfState>
|
||||
inline Foam::hExponentialThermo<equationOfState>::hExponentialThermo
|
||||
(
|
||||
const rhoType& st,
|
||||
const equationOfState& st,
|
||||
const scalar c0,
|
||||
const scalar n0,
|
||||
const scalar Tref,
|
||||
const scalar Hf
|
||||
)
|
||||
:
|
||||
rhoType(st),
|
||||
equationOfState(st),
|
||||
c0_(c0),
|
||||
n0_(n0),
|
||||
Tref_(Tref),
|
||||
@ -95,8 +98,8 @@ inline Foam::exponentialSolidThermo<rhoType>::exponentialSolidThermo
|
||||
|
||||
// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
|
||||
|
||||
template<class rhoType>
|
||||
inline Foam::scalar Foam::exponentialSolidThermo<rhoType>::limit
|
||||
template<class equationOfState>
|
||||
inline Foam::scalar Foam::hExponentialThermo<equationOfState>::limit
|
||||
(
|
||||
const scalar T
|
||||
) const
|
||||
@ -105,8 +108,8 @@ inline Foam::scalar Foam::exponentialSolidThermo<rhoType>::limit
|
||||
}
|
||||
|
||||
|
||||
template<class rhoType>
|
||||
inline Foam::scalar Foam::exponentialSolidThermo<rhoType>::cp
|
||||
template<class equationOfState>
|
||||
inline Foam::scalar Foam::hExponentialThermo<equationOfState>::cp
|
||||
(
|
||||
const scalar p, const scalar T
|
||||
) const
|
||||
@ -115,8 +118,8 @@ inline Foam::scalar Foam::exponentialSolidThermo<rhoType>::cp
|
||||
}
|
||||
|
||||
|
||||
template<class rhoType>
|
||||
inline Foam::scalar Foam::exponentialSolidThermo<rhoType>::ha
|
||||
template<class equationOfState>
|
||||
inline Foam::scalar Foam::hExponentialThermo<equationOfState>::ha
|
||||
(
|
||||
const scalar p, const scalar T
|
||||
) const
|
||||
@ -130,8 +133,8 @@ inline Foam::scalar Foam::exponentialSolidThermo<rhoType>::ha
|
||||
}
|
||||
|
||||
|
||||
template<class rhoType>
|
||||
inline Foam::scalar Foam::exponentialSolidThermo<rhoType>::hs
|
||||
template<class equationOfState>
|
||||
inline Foam::scalar Foam::hExponentialThermo<equationOfState>::hs
|
||||
(
|
||||
const scalar p, const scalar T
|
||||
) const
|
||||
@ -141,22 +144,22 @@ inline Foam::scalar Foam::exponentialSolidThermo<rhoType>::hs
|
||||
}
|
||||
|
||||
|
||||
template<class rhoType>
|
||||
inline Foam::scalar Foam::exponentialSolidThermo<rhoType>::hc() const
|
||||
template<class equationOfState>
|
||||
inline Foam::scalar Foam::hExponentialThermo<equationOfState>::hc() const
|
||||
{
|
||||
return Hf_*this->W();
|
||||
}
|
||||
|
||||
|
||||
template<class rhoType>
|
||||
inline Foam::scalar Foam::exponentialSolidThermo<rhoType>::s
|
||||
template<class equationOfState>
|
||||
inline Foam::scalar Foam::hExponentialThermo<equationOfState>::s
|
||||
(
|
||||
const scalar p, const scalar T
|
||||
) const
|
||||
{
|
||||
notImplemented
|
||||
(
|
||||
"scalar exponentialSolidThermo<rhoType>::"
|
||||
"scalar hExponentialThermo<equationOfState>::"
|
||||
"s(const scalar p, const scalar T) const"
|
||||
);
|
||||
return T;
|
||||
@ -165,14 +168,14 @@ inline Foam::scalar Foam::exponentialSolidThermo<rhoType>::s
|
||||
// * * * * * * * * * * * * * * * Member Operators * * * * * * * * * * * * * //
|
||||
|
||||
|
||||
template<class rhoType>
|
||||
inline Foam::exponentialSolidThermo<rhoType>&
|
||||
Foam::exponentialSolidThermo<rhoType>::operator=
|
||||
template<class equationOfState>
|
||||
inline Foam::hExponentialThermo<equationOfState>&
|
||||
Foam::hExponentialThermo<equationOfState>::operator=
|
||||
(
|
||||
const exponentialSolidThermo<rhoType>& ct
|
||||
const hExponentialThermo<equationOfState>& ct
|
||||
)
|
||||
{
|
||||
rhoType::operator=(ct);
|
||||
equationOfState::operator=(ct);
|
||||
|
||||
Hf_ = ct.Hf_;
|
||||
c0_ = ct.c0_;
|
||||
@ -183,15 +186,15 @@ Foam::exponentialSolidThermo<rhoType>::operator=
|
||||
}
|
||||
|
||||
|
||||
template<class rhoType>
|
||||
inline void Foam::exponentialSolidThermo<rhoType>::operator+=
|
||||
template<class equationOfState>
|
||||
inline void Foam::hExponentialThermo<equationOfState>::operator+=
|
||||
(
|
||||
const exponentialSolidThermo<rhoType>& ct
|
||||
const hExponentialThermo<equationOfState>& ct
|
||||
)
|
||||
{
|
||||
scalar molr1 = this->nMoles();
|
||||
|
||||
rhoType::operator+=(ct);
|
||||
equationOfState::operator+=(ct);
|
||||
|
||||
molr1 /= this->nMoles();
|
||||
scalar molr2 = ct.nMoles()/this->nMoles();
|
||||
@ -203,15 +206,15 @@ inline void Foam::exponentialSolidThermo<rhoType>::operator+=
|
||||
}
|
||||
|
||||
|
||||
template<class rhoType>
|
||||
inline void Foam::exponentialSolidThermo<rhoType>::operator-=
|
||||
template<class equationOfState>
|
||||
inline void Foam::hExponentialThermo<equationOfState>::operator-=
|
||||
(
|
||||
const exponentialSolidThermo<rhoType>& ct
|
||||
const hExponentialThermo<equationOfState>& ct
|
||||
)
|
||||
{
|
||||
scalar molr1 = this->nMoles();
|
||||
|
||||
rhoType::operator-=(ct);
|
||||
equationOfState::operator-=(ct);
|
||||
|
||||
molr1 /= this->nMoles();
|
||||
scalar molr2 = ct.nMoles()/this->nMoles();
|
||||
@ -225,16 +228,16 @@ inline void Foam::exponentialSolidThermo<rhoType>::operator-=
|
||||
|
||||
// * * * * * * * * * * * * * * * Friend Operators * * * * * * * * * * * * * //
|
||||
|
||||
template<class rhoType>
|
||||
inline Foam::exponentialSolidThermo<rhoType> Foam::operator*
|
||||
template<class equationOfState>
|
||||
inline Foam::hExponentialThermo<equationOfState> Foam::operator*
|
||||
(
|
||||
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.c0_,
|
||||
ct.n0_,
|
||||
@ -242,4 +245,5 @@ inline Foam::exponentialSolidThermo<rhoType> Foam::operator*
|
||||
);
|
||||
}
|
||||
|
||||
|
||||
// ************************************************************************* //
|
||||
@ -1,7 +1,7 @@
|
||||
EXE_INC = \
|
||||
-I$(LIB_SRC)/turbulenceModels \
|
||||
-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)/meshTools/lnInclude \
|
||||
|
||||
|
||||
@ -4,11 +4,11 @@ EXE_INC = \
|
||||
-I$(LIB_SRC)/turbulenceModels \
|
||||
-I$(LIB_SRC)/thermophysicalModels/basic/lnInclude \
|
||||
-I$(LIB_SRC)/thermophysicalModels/specie/lnInclude \
|
||||
-I$(LIB_SRC)/thermophysicalModels/basicSolidThermo/lnInclude \
|
||||
-I$(LIB_SRC)/thermophysicalModels/solid/lnInclude
|
||||
-I$(LIB_SRC)/thermophysicalModels/solidThermo/lnInclude \
|
||||
-I$(LIB_SRC)/thermophysicalModels/solidSpecie/lnInclude
|
||||
|
||||
LIB_LIBS = \
|
||||
-lbasicSolidThermo \
|
||||
-lsolidThermo \
|
||||
-lbasicThermophysicalModels \
|
||||
-lspecie \
|
||||
-lfiniteVolume \
|
||||
|
||||
@ -33,7 +33,7 @@ Description
|
||||
- 'lookup' : lookup volScalarField (or volSymmTensorField) with name
|
||||
- 'basicThermo' : use basicThermo and default compressible::turbulenceModel
|
||||
to calculate kappa
|
||||
- 'solidThermo' : use basicSolidThermo kappa()
|
||||
- 'solidThermo' : use solidThermo kappa()
|
||||
- 'directionalSolidThermo' directionalKappa()
|
||||
|
||||
SourceFiles
|
||||
|
||||
@ -81,7 +81,7 @@ class temperatureThermoBaffle1DFvPatchScalarField
|
||||
transportDict_(dict.subDict("transport")),
|
||||
radiationDict_(dict.subDict("radiation")),
|
||||
thermoDict_(dict.subDict("thermodynamics")),
|
||||
densityDict_(dict.subDict("density"))
|
||||
densityDict_(dict.subDict("equationOfState"))
|
||||
{}
|
||||
|
||||
|
||||
|
||||
@ -39,7 +39,7 @@ namespace compressible
|
||||
defineTemplateTypeNameAndDebugWithName
|
||||
(
|
||||
constSolid_temperatureThermoBaffle1DFvPatchScalarField,
|
||||
"compressible::temperatureThermoBaffle1D<constSolidThermoPhysics>",
|
||||
"compressible::temperatureThermoBaffle1D<hConstSolidThermoPhysics>",
|
||||
0
|
||||
);
|
||||
|
||||
@ -52,7 +52,7 @@ addToPatchFieldRunTimeSelection
|
||||
defineTemplateTypeNameAndDebugWithName
|
||||
(
|
||||
expoSolid_temperatureThermoBaffle1DFvPatchScalarField,
|
||||
"compressible::temperatureThermoBaffle1D<expoSolidThermoPhysics>",
|
||||
"compressible::temperatureThermoBaffle1D<hExponentialSolidThermoPhysics>",
|
||||
0
|
||||
);
|
||||
|
||||
|
||||
@ -40,12 +40,12 @@ namespace compressible
|
||||
|
||||
typedef temperatureThermoBaffle1DFvPatchScalarField
|
||||
<
|
||||
constSolidThermoPhysics
|
||||
hConstSolidThermoPhysics
|
||||
>constSolid_temperatureThermoBaffle1DFvPatchScalarField;
|
||||
|
||||
typedef temperatureThermoBaffle1DFvPatchScalarField
|
||||
<
|
||||
expoSolidThermoPhysics
|
||||
hExponentialSolidThermoPhysics
|
||||
>expoSolid_temperatureThermoBaffle1DFvPatchScalarField;
|
||||
|
||||
|
||||
|
||||
@ -53,7 +53,7 @@ Description
|
||||
- 'lookup' : lookup volScalarField (or volSymmTensorField) with name
|
||||
- 'basicThermo' : use basicThermo and compressible::RASmodel to calculate
|
||||
kappa
|
||||
- 'solidThermo' : use basicSolidThermo kappa()
|
||||
- 'solidThermo' : use solidThermo kappa()
|
||||
- 'directionalSolidThermo' directionalKappa()
|
||||
|
||||
Note: runs in parallel with arbitrary decomposition. Uses mapped
|
||||
|
||||
@ -49,7 +49,7 @@ Description
|
||||
kappa:
|
||||
- 'lookup' : lookup volScalarField (or volSymmTensorField) with name
|
||||
- 'basicThermo' : use basicThermo and compressible::RASmodel to calculate K
|
||||
- 'solidThermo' : use basicSolidThermo kappa()
|
||||
- 'solidThermo' : use solidThermo kappa()
|
||||
- 'directionalSolidThermo' directionalKappa()
|
||||
|
||||
Note: runs in parallel with arbitrary decomposition. Uses mapped
|
||||
|
||||
0
tutorials/combustion/chemFoam/nc7h16/validation/createGraph
Normal file → Executable file
0
tutorials/combustion/chemFoam/nc7h16/validation/createGraph
Normal file → Executable file
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user