Skip to content

Commit

Permalink
src/thermophysicalModels/specie/equationOfState: Added documentation …
Browse files Browse the repository at this point in the history
…with example usage
  • Loading branch information
Henry Weller committed Aug 26, 2021
1 parent 987d590 commit c86c64d
Show file tree
Hide file tree
Showing 11 changed files with 182 additions and 34 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration | Website: https://openfoam.org
\\ / A nd | Copyright (C) 2015-2020 OpenFOAM Foundation
\\ / A nd | Copyright (C) 2015-2021 OpenFOAM Foundation
\\/ M anipulation |
-------------------------------------------------------------------------------
License
Expand Down Expand Up @@ -35,6 +35,24 @@ Description
Coefficient mixing is very inaccurate and not supported,
so this equation of state is not applicable to mixtures.
Usage
\table
Property | Description
rho0 | Reference density
T0 | Reference temperature
beta | Coefficient of thermal expansion
\endtable
Example specification of the Boussinesq equation of state:
\verbatim
equationOfState
{
rho0 1;
T0 300;
beta 3e-03;
}
\endverbatim
SourceFiles
BoussinesqI.H
Boussinesq.C
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration | Website: https://openfoam.org
\\ / A nd | Copyright (C) 2014-2020 OpenFOAM Foundation
\\ / A nd | Copyright (C) 2014-2021 OpenFOAM Foundation
\\/ M anipulation |
-------------------------------------------------------------------------------
License
Expand All @@ -25,7 +25,32 @@ Class
Foam::PengRobinsonGas
Description
PengRobinsonGas gas equation of state.
PengRobinsonGas cubic equation of state for gases
Coefficient mixing is very inaccurate and not supported, so this equation of
state can only be applied to mixtures by using a thermophysical properties
model which mixes specie property value.
Usage
\table
Property | Description
Tc | Critical temperature [K]
Vc | Critical volume [m^3/kmol]
Pc | Critical pressure [Pa]
omega | Acentric factor [-]
\endtable
Example specification of the PengRobinsonGas equation of state for methane:
\verbatim
equationOfState
{
Tc 190.55;
Vc 0.0285;
Pc 4.595e6;
omega 0.0115;
}
\endverbatim
SourceFiles
PengRobinsonGasI.H
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration | Website: https://openfoam.org
\\ / A nd | Copyright (C) 2013-2020 OpenFOAM Foundation
\\ / A nd | Copyright (C) 2013-2021 OpenFOAM Foundation
\\/ M anipulation |
-------------------------------------------------------------------------------
License
Expand All @@ -25,11 +25,37 @@ Class
Foam::adiabaticPerfectFluid
Description
Adiabatic perfect fluid equation of state.
Adiabatic perfect fluid equation of state for liquids:
\verbatim
rho = rho0*pow((p + B)/(p0 + B), 1/gamma)
\endverbatim
Equivalent to the Murnaghan-Tait equation of state with different
coefficient specification.
Coefficient mixing is very inaccurate and not supported,
so this equation of state is not applicable to mixtures.
Usage
\table
Property | Description
rho0 | Reference density
R | Fluid constant
\endtable
Example specification of the adiabaticPerfectFluid equation of state
for LNG:
\verbatim
equationOfState
{
rho0 450;
p0 1e5;
gamma 15.4;
B 50000000
}
\endverbatim
SourceFiles
adiabaticPerfectFluidI.H
adiabaticPerfectFluid.C
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -28,29 +28,29 @@ Description
Incompressible, polynomial form of equation of state, using a polynomial
function for density.
Coefficient mixing is very inaccurate and not supported,
so this equation of state is not applicable to mixtures.
Coefficient mixing is very inaccurate and not supported, so this equation of
state is not applicable to mixtures.
The polynomial expression is evaluated from:
\verbatim
rho = 1000 - 0.05*T + 0.003*sqr(T)
\endverbatim
Usage
\table
Property | Description
rhoCoeffs<8> | Density polynomial coefficients
\endtable
Example of the specification of the equation of state:
Example specification of the icoPolynomial equation of state:
\verbatim
equationOfState
{
rhoCoeffs<8> ( 1000 -0.05 0.003 0 0 0 0 0 );
}
\endverbatim
The polynomial expression is evaluated as so:
\f[
\rho = 1000 - 0.05 T + 0.003 T^2
\f]
SourceFiles
icoPolynomialI.H
icoPolynomial.C
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -34,7 +34,7 @@ Usage
rho | Density vs temperature table
\endtable
Example of the specification of the equation of state:
Example specification of the icoTabulated equation of state:
\verbatim
equationOfState
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -27,7 +27,25 @@ Class
Description
Incompressible gas equation of state using a constant reference pressure in
the perfect gas equation of state rather than the local pressure so that the
density only varies with temperature and composition.
density only varies with temperature:
\verbatim
rho = pRef/(R*T)
\endverbatim
Usage
\table
Property | Description
pRef | Reference pressure
\endtable
Example specification of the incompressiblePerfectGas equation of state:
\verbatim
equationOfState
{
pRef 1e5;
}
\endverbatim
SourceFiles
incompressiblePerfectGasI.H
Expand Down
20 changes: 18 additions & 2 deletions src/thermophysicalModels/specie/equationOfState/linear/linear.H
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration | Website: https://openfoam.org
\\ / A nd | Copyright (C) 2013-2020 OpenFOAM Foundation
\\ / A nd | Copyright (C) 2013-2021 OpenFOAM Foundation
\\/ M anipulation |
-------------------------------------------------------------------------------
License
Expand All @@ -25,7 +25,7 @@ Class
Foam::linear
Description
Linear equation of state with constant compressibility
Linear equation of state with constant compressibility:
\verbatim
rho = rho0 + psi*p
Expand All @@ -34,6 +34,22 @@ Description
Coefficient mixing is very inaccurate and not supported,
so this equation of state is not applicable to mixtures.
Usage
\table
Property | Description
rho0 | Reference density
psi | Constant compressibility
\endtable
Example specification of the linear equation of state:
\verbatim
equationOfState
{
rho0 1000;
psi 1e-5;
}
\endverbatim
SourceFiles
linearI.H
linear.C
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -26,14 +26,34 @@ Class
Description
Simple extension of the perfect gas equation of state to liquids by
the addition of a constant density off-set.
the addition of a constant density off-set:
Coefficient mixing is very inaccurate and not supported,
so this equation of state is not applicable to mixtures.
\verbatim
rho = rho0 + p/(R*T)
\endverbatim
Coefficient mixing is very inaccurate and not supported, so this equation of
state is not applicable to mixtures.
This equation of state is rather inaccurate and has been superseded by
rPolynomial which is much more accurate and supports mixtures.
Usage
\table
Property | Description
rho0 | Reference density
R | Fluid constant
\endtable
Example specification of the perfectFluid equation of state:
\verbatim
equationOfState
{
rho0 1000;
R 100;
}
\endverbatim
SourceFiles
perfectFluidI.H
perfectFluid.C
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -25,7 +25,17 @@ Class
Foam::perfectGas
Description
Perfect gas equation of state.
Perfect gas equation of state:
\verbatim
rho = p/(R*T)
\endverbatim
Usage
The gas constant R used by the perfect gas equation of state is obtained
directly from the specie or mixture molecular weight so there is no need to
provide an equation of \c equationOfState enry in the \c mixture
specification.
SourceFiles
perfectGasI.H
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration | Website: https://openfoam.org
\\ / A nd | Copyright (C) 2019-2020 OpenFOAM Foundation
\\ / A nd | Copyright (C) 2019-2021 OpenFOAM Foundation
\\/ M anipulation |
-------------------------------------------------------------------------------
License
Expand All @@ -27,9 +27,9 @@ Class
Description
Reciprocal polynomial equation of state for liquids and solids
\f[
1/\rho = C_0 + C_1 T + C_2 T^2 - C_3 p - C_4 p T
\f]
\verbatim
1/rho = C0 + C1*T + C2*sqr(T) - C3*p - C4*p*T
\endverbatim
This polynomial for the reciprocal of the density provides a much better fit
than the equivalent polynomial for the density and has the advantage that it
Expand All @@ -42,7 +42,7 @@ Usage
C | Density polynomial coefficients
\endtable
Example of the specification of the equation of state for pure water:
Example specification of the rPolynomial equation of state for pure water:
\verbatim
equationOfState
{
Expand Down
Loading

0 comments on commit c86c64d

Please sign in to comment.