Thermodynamyics: rename basicThermo -> fluidThermo and veryBasicThermo -> basicThermo

This commit is contained in:
Henry
2012-08-23 14:13:13 +01:00
parent 26abc53885
commit 830c0ef382
179 changed files with 770 additions and 770 deletions

View File

@ -1,12 +1,12 @@
mixtures/basicMixture/basicMixture.C
mixtures/basicMixture/basicMixtures.C
basicThermo/veryBasicThermo.C
basicThermo/veryBasicThermoNew.C
basicThermo/basicThermo.C
basicThermo/basicThermoNew.C
fluidThermo/fluidThermo.C
fluidThermo/fluidThermoNew.C
psiThermo/psiThermo/psiThermo.C
psiThermo/psiThermo/psiThermoNew.C
psiThermo/hePsiThermo/hePsiThermos.C
@ -22,4 +22,4 @@ derivedFvPatchFields/energyJump/energyJumpFvPatchScalarField.C
derivedFvPatchFields/wallHeatTransfer/wallHeatTransferFvPatchScalarField.C
LIB = $(FOAM_LIBBIN)/libbasicThermophysicalModels
LIB = $(FOAM_LIBBIN)/libfluidThermophysicalModels

View File

@ -25,6 +25,7 @@ License
#include "basicThermo.H"
/* * * * * * * * * * * * * * * private static data * * * * * * * * * * * * * */
namespace Foam
@ -38,14 +39,119 @@ namespace Foam
Foam::basicThermo::basicThermo(const fvMesh& mesh)
:
veryBasicThermo(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::basicThermo::basicThermo(const fvMesh& mesh, const dictionary& dict)
Foam::basicThermo::basicThermo
(
const fvMesh& mesh,
const dictionary& dict
)
:
veryBasicThermo(mesh, 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)
)
{}
@ -55,4 +161,36 @@ 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::T() const
{
return T_;
}
const Foam::volScalarField& Foam::basicThermo::alpha() const
{
return alpha_;
}
bool Foam::basicThermo::read()
{
return regIOobject::read();
}
// ************************************************************************* //

View File

@ -36,7 +36,10 @@ SourceFiles
#ifndef basicThermo_H
#define basicThermo_H
#include "veryBasicThermo.H"
#include "volFields.H"
#include "typeInfo.H"
#include "IOdictionary.H"
#include "autoPtr.H"
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
@ -49,9 +52,29 @@ namespace Foam
class basicThermo
:
public 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)
basicThermo(const basicThermo&);
public:
//- Runtime type information
@ -86,16 +109,174 @@ public:
// Member functions
//- Update properties
virtual void correct() = 0;
// Access to thermodynamic state variables
//- Compressibility [s^2/m^2]
virtual const volScalarField& psi() const = 0;
//- 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
//- Dynamic viscosity of mixture [kg/m/s]
virtual const volScalarField& mu() const = 0;
//- Thermal diffusivity for enthalpy of mixture [kg/m/s]
virtual const volScalarField& alpha() const;
// Fields derived from transport state variables
//- Thermal diffusivity for temperature of mixture [J/m/s/K]
virtual tmp<volScalarField> kappa() const = 0;
//- Thermal diffusivity of mixture for patch [J/m/s/K]
virtual tmp<scalarField> kappa
(
const label patchi
) const = 0;
//- Effective thermal diffusivity of mixture [J/m/s/K]
virtual tmp<volScalarField> kappaEff
(
const volScalarField&
) const = 0;
//- Effective thermal diffusivity of mixture for patch [J/m/s/K]
virtual tmp<scalarField> kappaEff
(
const scalarField& alphat,
const label patchi
) const = 0;
//- Effective thermal diffusivity of mixture [J/m/s/K]
virtual tmp<volScalarField> alphaEff
(
const volScalarField& alphat
) const = 0;
//- Effective thermal diffusivity of mixture for patch [J/m/s/K]
virtual tmp<scalarField> alphaEff
(
const scalarField& alphat,
const label patchi
) const = 0;
//- Read thermophysicalProperties dictionary
virtual bool read();
};

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

@ -0,0 +1,58 @@
/*---------------------------------------------------------------------------*\
========= |
\\ / 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 "fluidThermo.H"
/* * * * * * * * * * * * * * * private static data * * * * * * * * * * * * * */
namespace Foam
{
defineTypeNameAndDebug(fluidThermo, 0);
defineRunTimeSelectionTable(fluidThermo, fvMesh);
}
// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
Foam::fluidThermo::fluidThermo(const fvMesh& mesh)
:
basicThermo(mesh)
{}
Foam::fluidThermo::fluidThermo(const fvMesh& mesh, const dictionary& dict)
:
basicThermo(mesh, dict)
{}
// * * * * * * * * * * * * * * * * Destructor * * * * * * * * * * * * * * * //
Foam::fluidThermo::~fluidThermo()
{}
// ************************************************************************* //

View File

@ -0,0 +1,110 @@
/*---------------------------------------------------------------------------*\
========= |
\\ / 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::fluidThermo
Description
Basic thermodynamic properties
SourceFiles
fluidThermo.C
fluidThermoNew.C
\*---------------------------------------------------------------------------*/
#ifndef fluidThermo_H
#define fluidThermo_H
#include "basicThermo.H"
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
namespace Foam
{
/*---------------------------------------------------------------------------*\
Class fluidThermo Declaration
\*---------------------------------------------------------------------------*/
class fluidThermo
:
public basicThermo
{
public:
//- Runtime type information
TypeName("fluidThermo");
//- Declare run-time constructor selection table
declareRunTimeSelectionTable
(
autoPtr,
fluidThermo,
fvMesh,
(const fvMesh& mesh),
(mesh)
);
// Constructors
//- Construct from mesh
fluidThermo(const fvMesh&);
//- Construct from mesh
fluidThermo(const fvMesh&, const dictionary&);
//- Selector
static autoPtr<fluidThermo> New(const fvMesh&);
//- Destructor
virtual ~fluidThermo();
// Member functions
// Access to thermodynamic state variables
//- Compressibility [s^2/m^2]
virtual const volScalarField& psi() const = 0;
// Access to transport state variables
//- Dynamic viscosity of mixture [kg/m/s]
virtual const volScalarField& mu() const = 0;
};
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
} // End namespace Foam
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
#endif
// ************************************************************************* //

View File

@ -23,11 +23,11 @@ License
\*---------------------------------------------------------------------------*/
#include "veryBasicThermo.H"
#include "fluidThermo.H"
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
Foam::autoPtr<Foam::veryBasicThermo> Foam::veryBasicThermo::New
Foam::autoPtr<Foam::fluidThermo> Foam::fluidThermo::New
(
const fvMesh& mesh
)
@ -57,14 +57,14 @@ Foam::autoPtr<Foam::veryBasicThermo> Foam::veryBasicThermo::New
if (cstrIter == fvMeshConstructorTablePtr_->end())
{
FatalErrorIn("veryBasicThermo::New(const fvMesh&)")
<< "Unknown veryBasicThermo type " << modelType << nl << nl
<< "Valid veryBasicThermo types are:" << nl
FatalErrorIn("fluidThermo::New(const fvMesh&)")
<< "Unknown fluidThermo type " << modelType << nl << nl
<< "Valid fluidThermo types are:" << nl
<< fvMeshConstructorTablePtr_->sortedToc() << nl
<< exit(FatalError);
}
return autoPtr<veryBasicThermo>(cstrIter()(mesh));
return autoPtr<fluidThermo>(cstrIter()(mesh));
}

View File

@ -22,7 +22,7 @@ License
along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
InClass
Foam::basicThermo
Foam::fluidThermo
Description
Macros for creating 'basic' density-based thermo packages
@ -83,7 +83,7 @@ addToRunTimeSelectionTable \
\
addToRunTimeSelectionTable \
( \
basicThermo, \
fluidThermo, \
Cthermo##Mixture##Transport##Type##Thermo##EqnOfState, \
fvMesh \
);
@ -124,7 +124,7 @@ addToRunTimeSelectionTable \
\
addToRunTimeSelectionTable \
( \
basicThermo, \
fluidThermo, \
Cthermo##Mixture##icoPoly##Order##Type##ThermoPhysics, \
fvMesh \
);

View File

@ -38,7 +38,7 @@ namespace Foam
Foam::psiThermo::psiThermo(const fvMesh& mesh)
:
basicThermo(mesh),
fluidThermo(mesh),
psi_
(

View File

@ -36,7 +36,7 @@ SourceFiles
#ifndef psiThermo_H
#define psiThermo_H
#include "basicThermo.H"
#include "fluidThermo.H"
#include "runTimeSelectionTables.H"
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
@ -50,7 +50,7 @@ namespace Foam
class psiThermo
:
public basicThermo
public fluidThermo
{
protected:

View File

@ -38,7 +38,7 @@ namespace Foam
Foam::rhoThermo::rhoThermo(const fvMesh& mesh)
:
basicThermo(mesh),
fluidThermo(mesh),
rho_
(
IOobject
@ -85,7 +85,7 @@ Foam::rhoThermo::rhoThermo(const fvMesh& mesh)
Foam::rhoThermo::rhoThermo(const fvMesh& mesh, const dictionary& dict)
:
basicThermo(mesh, dict),
fluidThermo(mesh, dict),
rho_
(
IOobject

View File

@ -36,7 +36,7 @@ SourceFiles
#ifndef rhoThermo_H
#define rhoThermo_H
#include "basicThermo.H"
#include "fluidThermo.H"
#include "runTimeSelectionTables.H"
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
@ -50,7 +50,7 @@ namespace Foam
class rhoThermo
:
public basicThermo
public fluidThermo
{
protected: