thermophysicalModels/specie/thermo: Added documentation with examples

This commit is contained in:
Henry Weller
2021-08-30 14:31:41 +01:00
parent 61174d8fa8
commit b3e02df01a
8 changed files with 177 additions and 55 deletions

View File

@ -2,7 +2,7 @@
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration | Website: https://openfoam.org
\\ / A nd | Copyright (C) 2011-2020 OpenFOAM Foundation
\\ / A nd | Copyright (C) 2011-2021 OpenFOAM Foundation
\\/ M anipulation |
-------------------------------------------------------------------------------
License
@ -25,8 +25,30 @@ Class
Foam::eConstThermo
Description
Constant properties thermodynamics package templated on an equation of
state
Internal energy based thermodynamics package using a constant heat capacity
at constant volume:
\verbatim
e = Cv*(T - Tref) + Esref
\endverbatim
Usage
\table
Property | Description
Cv | Constant Heat capacity at constant volume [J/kmol/K]
Tref | Reference temperature [K] (defaults to 0)
Esref | Reference sensible internal energy [J/kg] (defaults to 0)
Hf | Heat of formation [J/kg]
\endtable
Example specification of eConstThermo for air:
\verbatim
thermodynamics
{
Cv 724;
Hf 0;
}
\endverbatim
SourceFiles
eConstThermoI.H

View File

@ -2,7 +2,7 @@
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration | Website: https://openfoam.org
\\ / A nd | Copyright (C) 2020 OpenFOAM Foundation
\\ / A nd | Copyright (C) 2020-2021 OpenFOAM Foundation
\\/ M anipulation |
-------------------------------------------------------------------------------
License
@ -29,7 +29,6 @@ Description
data for heat capacity vs temperature.
Usage
\table
Property | Description
Hf | Heat of formation

View File

@ -2,7 +2,7 @@
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration | Website: https://openfoam.org
\\ / A nd | Copyright (C) 2020 OpenFOAM Foundation
\\ / A nd | Copyright (C) 2021 OpenFOAM Foundation
\\/ M anipulation |
-------------------------------------------------------------------------------
License
@ -25,13 +25,18 @@ Class
Foam::ePolynomialThermo
Description
Thermodynamics package templated on the equation of state, using polynomial
functions for \c cv, \c e and \c s.
Internal energy based thermodynamics package using a polynomial function
of temperature for the constant heat capacity at constant volume:
Polynomials for \c e and \c s derived from \c cv.
\verbatim
Cv = a0 + a1*T + a2*sqr(T) + a3*pow3(T) + a4*pow4(T)
+ a5*pow(T, 5) + a6*pow(T, 6) + a7*pow(T, 7)
\endverbatim
The polynomial function is templated on the order of the polynomial which
defaults to 8.
Usage
\table
Property | Description
Hf | Heat of formation
@ -45,19 +50,13 @@ Usage
{
Hf 0;
Sf 0;
CvCoeffs<8> ( 1000 -0.05 0.003 0 0 0 0 0 );
CvCoeffs<8> (1000 -0.05 0.003 0 0 0 0 0);
}
\endverbatim
The polynomial expression is evaluated as so:
\f[
Cv = 1000 - 0.05 T + 0.003 T^2
\f]
Note
- Specific heat at constant volume polynomial coefficients evaluate to an
expression in [J/kg/K].
Specific heat at constant volume polynomial coefficients evaluate to an
expression in [J/kg/K].
SourceFiles
ePolynomialThermoI.H

View File

@ -2,7 +2,7 @@
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration | Website: https://openfoam.org
\\ / A nd | Copyright (C) 2020 OpenFOAM Foundation
\\ / A nd | Copyright (C) 2021 OpenFOAM Foundation
\\/ M anipulation |
-------------------------------------------------------------------------------
License
@ -25,14 +25,33 @@ Class
Foam::ePowerThermo
Description
Power-function based thermodynamics package templated on EquationOfState.
Internal energy based thermodynamics package using a power function of
temperature for the constant heat capacity at constant volume which is
particularly suitable for solids at low temperatures:
In this thermodynamics package the heat capacity is a simple power of
temperature:
\verbatim
Cv = c0*pow(T/Tref, n0)
\endverbatim
Cv(T) = c0*(T/Tref)^n0;
Usage
\table
Property | Description
c0 | Reference heat capacity at constant volume [J/kmol/K]
n0 | Exponent of the power function
Tref | Reference temperature [K]
Hf | Heat of formation [J/kg]
\endtable
which is particularly suitable for solids.
Example specification of ePowerThermo:
\verbatim
thermodynamics
{
c0 230;
Tref 470;
n0 3;
Hf 0;
}
\endverbatim
SourceFiles
ePowerThermoI.H

View File

@ -2,7 +2,7 @@
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration | Website: https://openfoam.org
\\ / A nd | Copyright (C) 2011-2020 OpenFOAM Foundation
\\ / A nd | Copyright (C) 2011-2021 OpenFOAM Foundation
\\/ M anipulation |
-------------------------------------------------------------------------------
License
@ -25,8 +25,30 @@ Class
Foam::hConstThermo
Description
Constant properties thermodynamics package
templated into the EquationOfState.
Enthalpy based thermodynamics package using a constant heat capacity
at constant pressure:
\verbatim
h = Cp*(T - Tref) + Hsref
\endverbatim
Usage
\table
Property | Description
Cp | Constant Heat capacity at constant pressure [J/kmol/K]
Tref | Reference temperature [K] (defaults to 0)
Hsref | Reference sensible enthalpy [J/kg] (defaults to 0)
Hf | Heat of formation [J/kg]
\endtable
Example specification of hConstThermo for air:
\verbatim
thermodynamics
{
Cp 1007;
Hf 0;
}
\endverbatim
SourceFiles
hConstThermoI.H
@ -61,7 +83,7 @@ inline hConstThermo<EquationOfState> operator*
);
template<class EquationOfState>
inline hConstThermo<EquationOfState> operator==
inline hConstThermo<EquationOfState> operator====
(
const hConstThermo<EquationOfState>&,
const hConstThermo<EquationOfState>&

View File

@ -2,7 +2,7 @@
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration | Website: https://openfoam.org
\\ / A nd | Copyright (C) 2011-2020 OpenFOAM Foundation
\\ / A nd | Copyright (C) 2011-2021 OpenFOAM Foundation
\\/ M anipulation |
-------------------------------------------------------------------------------
License
@ -25,13 +25,18 @@ Class
Foam::hPolynomialThermo
Description
Thermodynamics package templated on the equation of state, using polynomial
functions for \c cp, \c h and \c s.
Enthalpy based thermodynamics package using a polynomial function
of temperature for the constant heat capacity at constant pressure:
Polynomials for \c h and \c s derived from \c cp.
\verbatim
Cp = a0 + a1*T + a2*sqr(T) + a3*pow3(T) + a4*pow4(T)
+ a5*pow(T, 5) + a6*pow(T, 6) + a7*pow(T, 7)
\endverbatim
The polynomial function is templated on the order of the polynomial which
defaults to 8.
Usage
\table
Property | Description
Hf | Heat of formation
@ -45,19 +50,13 @@ Usage
{
Hf 0;
Sf 0;
CpCoeffs<8> ( 1000 -0.05 0.003 0 0 0 0 0 );
CpCoeffs<8> (1000 -0.05 0.003 0 0 0 0 0);
}
\endverbatim
The polynomial expression is evaluated as so:
\f[
Cp = 1000 - 0.05 T + 0.003 T^2
\f]
Note
- Specific heat at constant pressure polynomial coefficients evaluate to an
expression in [J/kg/K].
Specific heat at constant pressure polynomial coefficients evaluate to an
expression in [J/kg/K].
SourceFiles
hPolynomialThermoI.H

View File

@ -2,7 +2,7 @@
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration | Website: https://openfoam.org
\\ / A nd | Copyright (C) 2012-2020 OpenFOAM Foundation
\\ / A nd | Copyright (C) 2012-2021 OpenFOAM Foundation
\\/ M anipulation |
-------------------------------------------------------------------------------
License
@ -22,17 +22,33 @@ License
along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
Class
Foam::hPowerThermo
Enthalpy based thermodynamics package using a power function of temperature
for the constant heat capacity at constant volume which is particularly
suitable for solids at low temperatures:
Description
Power-function based thermodynamics package templated on EquationOfState.
\verbatim
Cp = c0*pow(T/Tref, n0)
\endverbatim
In this thermodynamics package the heat capacity is a simple power of
temperature:
Usage
\table
Property | Description
c0 | Reference heat capacity at constant pressure [J/kmol/K]
n0 | Exponent of the power function
Tref | Reference temperature [K]
Hf | Heat of formation [J/kg]
\endtable
Cp(T) = c0*(T/Tref)^n0;
which is particularly suitable for solids.
Example specification of hPowerThermo:
\verbatim
thermodynamics
{
c0 230;
Tref 470;
n0 3;
Hf 0;
}
\endverbatim
SourceFiles
hPowerThermoI.H

View File

@ -2,7 +2,7 @@
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration | Website: https://openfoam.org
\\ / A nd | Copyright (C) 2011-2020 OpenFOAM Foundation
\\ / A nd | Copyright (C) 2011-2021 OpenFOAM Foundation
\\/ M anipulation |
-------------------------------------------------------------------------------
License
@ -25,8 +25,54 @@ Class
Foam::janafThermo
Description
JANAF tables based thermodynamics package templated
into the equation of state.
Enthalpy based thermodynamics package using JANAF tables:
\verbatim
Cp = (((a4*T + a3)*T + a2)*T + a1)*T + a0
ha = ((((a4/5*T + a3/4)*T + a2/3)*T + a1/2)*T + a0)*T + a5
\endverbatim
Usage
\table
Property | Description
Tlow | Lower temperature limit [K]
Thigh | Upper temperature limit [K]
Tcommon | Transition temperature from low to high polynomials [K]
lowCpCoeffs | Low temperature range heat capacity coefficients
highCpCoeffs | High temperature range heat capacity coefficients
\endtable
Example specification of janafThermo for air:
\verbatim
thermodynamics
{
Tlow 100;
Thigh 10000;
Tcommon 1000;
lowCpCoeffs
(
3.5309628
-0.0001236595
-5.0299339e-07
2.4352768e-09
-1.4087954e-12
-1046.9637
2.9674391
);
highCpCoeffs
(
2.9525407
0.0013968838
-4.9262577e-07
7.8600091e-11
-4.6074978e-15
-923.93753
5.8718221
);
}
\endverbatim
SourceFiles
janafThermoI.H