equationOfState: Separated entropy contributions into Sp and Sv
The entropy contribution from the equation of state corrects the integral of the heat capacity divided by temperature for changes in pressure in the case of Cp named Sp or changes in volume in the case of Cv, named Sv. This for enthalpy based thermodynamics Sp is needed and for internal energy Sv is needed.
This commit is contained in:
@ -172,8 +172,11 @@ public:
|
||||
//- Return Cv departure [J/(kg K]
|
||||
inline scalar Cv(scalar p, scalar T) const;
|
||||
|
||||
//- Return entropy [J/kg/K]
|
||||
inline scalar S(const scalar p, const scalar T) const;
|
||||
//- Return entropy correction to the integral of Cp/T [J/kg/K]
|
||||
inline scalar Sp(const scalar p, const scalar T) const;
|
||||
|
||||
//- Return entropy correction to the integral of Cv/T [J/kg/K]
|
||||
inline scalar Sv(const scalar p, const scalar T) const;
|
||||
|
||||
//- Return compressibility [s^2/m^2]
|
||||
inline scalar psi(scalar p, scalar T) const;
|
||||
|
||||
@ -122,7 +122,7 @@ inline Foam::scalar Foam::Boussinesq<Specie>::Cv(scalar p, scalar T) const
|
||||
|
||||
|
||||
template<class Specie>
|
||||
inline Foam::scalar Foam::Boussinesq<Specie>::S
|
||||
inline Foam::scalar Foam::Boussinesq<Specie>::Sp
|
||||
(
|
||||
scalar p,
|
||||
scalar T
|
||||
@ -132,6 +132,18 @@ inline Foam::scalar Foam::Boussinesq<Specie>::S
|
||||
}
|
||||
|
||||
|
||||
template<class Specie>
|
||||
inline Foam::scalar Foam::Boussinesq<Specie>::Sv
|
||||
(
|
||||
scalar p,
|
||||
scalar T
|
||||
) const
|
||||
{
|
||||
NotImplemented;
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
template<class Specie>
|
||||
inline Foam::scalar Foam::Boussinesq<Specie>::psi
|
||||
(
|
||||
|
||||
@ -2,7 +2,7 @@
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration | Website: https://openfoam.org
|
||||
\\ / A nd | Copyright (C) 2014-2019 OpenFOAM Foundation
|
||||
\\ / A nd | Copyright (C) 2014-2020 OpenFOAM Foundation
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
@ -167,8 +167,11 @@ public:
|
||||
//- Return Cv departure [J/(kg K]
|
||||
inline scalar Cv(scalar p, scalar T) const;
|
||||
|
||||
//- Return entropy [J/kg/K]
|
||||
inline scalar S(const scalar p, const scalar T) const;
|
||||
//- Return entropy correction to the integral of Cp/T [J/kg/K]
|
||||
inline scalar Sp(const scalar p, const scalar T) const;
|
||||
|
||||
//- Return entropy correction to the integral of Cv/T [J/kg/K]
|
||||
inline scalar Sv(const scalar p, const scalar T) const;
|
||||
|
||||
//- Return compressibility [s^2/m^2]
|
||||
inline scalar psi(scalar p, scalar T) const;
|
||||
|
||||
@ -2,7 +2,7 @@
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration | Website: https://openfoam.org
|
||||
\\ / A nd | Copyright (C) 2014-2019 OpenFOAM Foundation
|
||||
\\ / A nd | Copyright (C) 2014-2020 OpenFOAM Foundation
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
@ -203,7 +203,7 @@ inline Foam::scalar Foam::PengRobinsonGas<Specie>::Cv(scalar p, scalar T) const
|
||||
|
||||
|
||||
template<class Specie>
|
||||
inline Foam::scalar Foam::PengRobinsonGas<Specie>::S
|
||||
inline Foam::scalar Foam::PengRobinsonGas<Specie>::Sp
|
||||
(
|
||||
scalar p,
|
||||
scalar T
|
||||
@ -229,6 +229,18 @@ inline Foam::scalar Foam::PengRobinsonGas<Specie>::S
|
||||
}
|
||||
|
||||
|
||||
template<class Specie>
|
||||
inline Foam::scalar Foam::PengRobinsonGas<Specie>::Sv
|
||||
(
|
||||
scalar p,
|
||||
scalar T
|
||||
) const
|
||||
{
|
||||
NotImplemented;
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
template<class Specie>
|
||||
inline Foam::scalar Foam::PengRobinsonGas<Specie>::psi
|
||||
(
|
||||
|
||||
@ -2,7 +2,7 @@
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration | Website: https://openfoam.org
|
||||
\\ / A nd | Copyright (C) 2013-2019 OpenFOAM Foundation
|
||||
\\ / A nd | Copyright (C) 2013-2020 OpenFOAM Foundation
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
@ -169,8 +169,11 @@ public:
|
||||
//- Return Cv departure [J/(kg K]
|
||||
inline scalar Cv(scalar p, scalar T) const;
|
||||
|
||||
//- Return entropy [J/kg/K]
|
||||
inline scalar S(const scalar p, const scalar T) const;
|
||||
//- Return entropy correction to the integral of Cp/T [J/kg/K]
|
||||
inline scalar Sp(const scalar p, const scalar T) const;
|
||||
|
||||
//- Return entropy correction to the integral of Cv/T [J/kg/K]
|
||||
inline scalar Sv(const scalar p, const scalar T) const;
|
||||
|
||||
//- Return compressibility [s^2/m^2]
|
||||
inline scalar psi(scalar p, scalar T) const;
|
||||
|
||||
@ -2,7 +2,7 @@
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration | Website: https://openfoam.org
|
||||
\\ / A nd | Copyright (C) 2013-2019 OpenFOAM Foundation
|
||||
\\ / A nd | Copyright (C) 2013-2020 OpenFOAM Foundation
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
@ -147,7 +147,7 @@ inline Foam::scalar Foam::adiabaticPerfectFluid<Specie>::Cv
|
||||
|
||||
|
||||
template<class Specie>
|
||||
inline Foam::scalar Foam::adiabaticPerfectFluid<Specie>::S
|
||||
inline Foam::scalar Foam::adiabaticPerfectFluid<Specie>::Sp
|
||||
(
|
||||
scalar p,
|
||||
scalar T
|
||||
@ -160,6 +160,18 @@ inline Foam::scalar Foam::adiabaticPerfectFluid<Specie>::S
|
||||
}
|
||||
|
||||
|
||||
template<class Specie>
|
||||
inline Foam::scalar Foam::adiabaticPerfectFluid<Specie>::Sv
|
||||
(
|
||||
scalar p,
|
||||
scalar T
|
||||
) const
|
||||
{
|
||||
NotImplemented;
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
template<class Specie>
|
||||
inline Foam::scalar Foam::adiabaticPerfectFluid<Specie>::psi
|
||||
(
|
||||
|
||||
@ -176,8 +176,11 @@ public:
|
||||
//- Return Cv departure [J/(kg K]
|
||||
inline scalar Cv(scalar p, scalar T) const;
|
||||
|
||||
//- Return entropy [J/kg/K]
|
||||
inline scalar S(const scalar p, const scalar T) const;
|
||||
//- Return entropy correction to the integral of Cp/T [J/kg/K]
|
||||
inline scalar Sp(const scalar p, const scalar T) const;
|
||||
|
||||
//- Return entropy correction to the integral of Cv/T [J/kg/K]
|
||||
inline scalar Sv(const scalar p, const scalar T) const;
|
||||
|
||||
//- Return compressibility [s^2/m^2]
|
||||
inline scalar psi(scalar p, scalar T) const;
|
||||
|
||||
@ -2,7 +2,7 @@
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration | Website: https://openfoam.org
|
||||
\\ / A nd | Copyright (C) 2011-2019 OpenFOAM Foundation
|
||||
\\ / A nd | Copyright (C) 2011-2020 OpenFOAM Foundation
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
@ -133,7 +133,18 @@ inline Foam::scalar Foam::icoPolynomial<Specie, PolySize>::Cv
|
||||
|
||||
|
||||
template<class Specie, int PolySize>
|
||||
inline Foam::scalar Foam::icoPolynomial<Specie, PolySize>::S
|
||||
inline Foam::scalar Foam::icoPolynomial<Specie, PolySize>::Sp
|
||||
(
|
||||
scalar p,
|
||||
scalar T
|
||||
) const
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
template<class Specie, int PolySize>
|
||||
inline Foam::scalar Foam::icoPolynomial<Specie, PolySize>::Sv
|
||||
(
|
||||
scalar p,
|
||||
scalar T
|
||||
|
||||
@ -153,8 +153,11 @@ public:
|
||||
//- Return Cv departure [J/(kg K]
|
||||
inline scalar Cv(scalar p, scalar T) const;
|
||||
|
||||
//- Return entropy [J/kg/K]
|
||||
inline scalar S(const scalar p, const scalar T) const;
|
||||
//- Return entropy correction to the integral of Cp/T [J/kg/K]
|
||||
inline scalar Sp(const scalar p, const scalar T) const;
|
||||
|
||||
//- Return entropy correction to the integral of Cv/T [J/kg/K]
|
||||
inline scalar Sv(const scalar p, const scalar T) const;
|
||||
|
||||
//- Return compressibility [s^2/m^2]
|
||||
inline scalar psi(scalar p, scalar T) const;
|
||||
|
||||
@ -133,7 +133,18 @@ inline Foam::scalar Foam::icoTabulated<Specie>::Cv
|
||||
|
||||
|
||||
template<class Specie>
|
||||
inline Foam::scalar Foam::icoTabulated<Specie>::S
|
||||
inline Foam::scalar Foam::icoTabulated<Specie>::Sp
|
||||
(
|
||||
scalar p,
|
||||
scalar T
|
||||
) const
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
template<class Specie>
|
||||
inline Foam::scalar Foam::icoTabulated<Specie>::Sv
|
||||
(
|
||||
scalar p,
|
||||
scalar T
|
||||
|
||||
@ -2,7 +2,7 @@
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration | Website: https://openfoam.org
|
||||
\\ / A nd | Copyright (C) 2012-2019 OpenFOAM Foundation
|
||||
\\ / A nd | Copyright (C) 2012-2020 OpenFOAM Foundation
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
@ -154,8 +154,11 @@ public:
|
||||
//- Return Cv departure [J/(kg K]
|
||||
inline scalar Cv(scalar p, scalar T) const;
|
||||
|
||||
//- Return entropy [J/kg/K]
|
||||
inline scalar S(const scalar p, const scalar T) const;
|
||||
//- Return entropy correction to the integral of Cp/T [J/kg/K]
|
||||
inline scalar Sp(const scalar p, const scalar T) const;
|
||||
|
||||
//- Return entropy correction to the integral of Cv/T [J/kg/K]
|
||||
inline scalar Sv(const scalar p, const scalar T) const;
|
||||
|
||||
//- Return compressibility [s^2/m^2]
|
||||
inline scalar psi(scalar p, scalar T) const;
|
||||
|
||||
@ -2,7 +2,7 @@
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration | Website: https://openfoam.org
|
||||
\\ / A nd | Copyright (C) 2012-2019 OpenFOAM Foundation
|
||||
\\ / A nd | Copyright (C) 2012-2020 OpenFOAM Foundation
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
@ -134,7 +134,18 @@ inline Foam::scalar Foam::incompressiblePerfectGas<Specie>::Cv
|
||||
|
||||
|
||||
template<class Specie>
|
||||
inline Foam::scalar Foam::incompressiblePerfectGas<Specie>::S
|
||||
inline Foam::scalar Foam::incompressiblePerfectGas<Specie>::Sp
|
||||
(
|
||||
scalar p,
|
||||
scalar T
|
||||
) const
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
template<class Specie>
|
||||
inline Foam::scalar Foam::incompressiblePerfectGas<Specie>::Sv
|
||||
(
|
||||
scalar p,
|
||||
scalar T
|
||||
|
||||
@ -2,7 +2,7 @@
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration | Website: https://openfoam.org
|
||||
\\ / A nd | Copyright (C) 2013-2019 OpenFOAM Foundation
|
||||
\\ / A nd | Copyright (C) 2013-2020 OpenFOAM Foundation
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
@ -158,8 +158,11 @@ public:
|
||||
//- Return Cv departure [J/(kg K]
|
||||
inline scalar Cv(scalar p, scalar T) const;
|
||||
|
||||
//- Return entropy [J/kg/K]
|
||||
inline scalar S(const scalar p, const scalar T) const;
|
||||
//- Return entropy correction to the integral of Cp/T [J/kg/K]
|
||||
inline scalar Sp(const scalar p, const scalar T) const;
|
||||
|
||||
//- Return entropy correction to the integral of Cv/T [J/kg/K]
|
||||
inline scalar Sv(const scalar p, const scalar T) const;
|
||||
|
||||
//- Return compressibility [s^2/m^2]
|
||||
inline scalar psi(scalar p, scalar T) const;
|
||||
|
||||
@ -2,7 +2,7 @@
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration | Website: https://openfoam.org
|
||||
\\ / A nd | Copyright (C) 2013-2019 OpenFOAM Foundation
|
||||
\\ / A nd | Copyright (C) 2013-2020 OpenFOAM Foundation
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
@ -115,12 +115,20 @@ inline Foam::scalar Foam::linear<Specie>::Cv(scalar p, scalar T) const
|
||||
|
||||
|
||||
template<class Specie>
|
||||
inline Foam::scalar Foam::linear<Specie>::S(scalar p, scalar T) const
|
||||
inline Foam::scalar Foam::linear<Specie>::Sp(scalar p, scalar T) const
|
||||
{
|
||||
return -log((rho0_ + psi_*p)/(rho0_ + psi_*Pstd))/(T*psi_);
|
||||
}
|
||||
|
||||
|
||||
template<class Specie>
|
||||
inline Foam::scalar Foam::linear<Specie>::Sv(scalar p, scalar T) const
|
||||
{
|
||||
NotImplemented;
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
template<class Specie>
|
||||
inline Foam::scalar Foam::linear<Specie>::psi(scalar p, scalar T) const
|
||||
{
|
||||
|
||||
@ -2,7 +2,7 @@
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration | Website: https://openfoam.org
|
||||
\\ / A nd | Copyright (C) 2012-2019 OpenFOAM Foundation
|
||||
\\ / A nd | Copyright (C) 2012-2020 OpenFOAM Foundation
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
@ -161,8 +161,11 @@ public:
|
||||
//- Return Cv departure [J/(kg K]
|
||||
inline scalar Cv(scalar p, scalar T) const;
|
||||
|
||||
//- Return entropy [J/kg/K]
|
||||
inline scalar S(const scalar p, const scalar T) const;
|
||||
//- Return entropy correction to the integral of Cp/T [J/kg/K]
|
||||
inline scalar Sp(const scalar p, const scalar T) const;
|
||||
|
||||
//- Return entropy correction to the integral of Cv/T [J/kg/K]
|
||||
inline scalar Sv(const scalar p, const scalar T) const;
|
||||
|
||||
//- Return compressibility [s^2/m^2]
|
||||
inline scalar psi(scalar p, scalar T) const;
|
||||
|
||||
@ -2,7 +2,7 @@
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration | Website: https://openfoam.org
|
||||
\\ / A nd | Copyright (C) 2012-2019 OpenFOAM Foundation
|
||||
\\ / A nd | Copyright (C) 2012-2020 OpenFOAM Foundation
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
@ -122,12 +122,20 @@ inline Foam::scalar Foam::perfectFluid<Specie>::Cv(scalar p, scalar T) const
|
||||
|
||||
|
||||
template<class Specie>
|
||||
inline Foam::scalar Foam::perfectFluid<Specie>::S(scalar p, scalar T) const
|
||||
inline Foam::scalar Foam::perfectFluid<Specie>::Sp(scalar p, scalar T) const
|
||||
{
|
||||
return -this->R()*log(p/Pstd);
|
||||
}
|
||||
|
||||
|
||||
template<class Specie>
|
||||
inline Foam::scalar Foam::perfectFluid<Specie>::Sv(scalar p, scalar T) const
|
||||
{
|
||||
NotImplemented;
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
template<class Specie>
|
||||
inline Foam::scalar Foam::perfectFluid<Specie>::psi(scalar p, scalar T) const
|
||||
{
|
||||
|
||||
@ -2,7 +2,7 @@
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration | Website: https://openfoam.org
|
||||
\\ / A nd | Copyright (C) 2011-2019 OpenFOAM Foundation
|
||||
\\ / A nd | Copyright (C) 2011-2020 OpenFOAM Foundation
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
@ -138,8 +138,11 @@ public:
|
||||
//- Return Cv departure [J/(kg K]
|
||||
inline scalar Cv(scalar p, scalar T) const;
|
||||
|
||||
//- Return entropy [J/kg/K]
|
||||
inline scalar S(const scalar p, const scalar T) const;
|
||||
//- Return entropy correction to the integral of Cp/T [J/kg/K]
|
||||
inline scalar Sp(const scalar p, const scalar T) const;
|
||||
|
||||
//- Return entropy correction to the integral of Cv/T [J/kg/K]
|
||||
inline scalar Sv(const scalar p, const scalar T) const;
|
||||
|
||||
//- Return compressibility [s^2/m^2]
|
||||
inline scalar psi(scalar p, scalar T) const;
|
||||
|
||||
@ -2,7 +2,7 @@
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration | Website: https://openfoam.org
|
||||
\\ / A nd | Copyright (C) 2011-2018 OpenFOAM Foundation
|
||||
\\ / A nd | Copyright (C) 2011-2020 OpenFOAM Foundation
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
@ -103,12 +103,20 @@ inline Foam::scalar Foam::perfectGas<Specie>::Cv(scalar p, scalar T) const
|
||||
|
||||
|
||||
template<class Specie>
|
||||
inline Foam::scalar Foam::perfectGas<Specie>::S(scalar p, scalar T) const
|
||||
inline Foam::scalar Foam::perfectGas<Specie>::Sp(scalar p, scalar T) const
|
||||
{
|
||||
return -this->R()*log(p/Pstd);
|
||||
}
|
||||
|
||||
|
||||
template<class Specie>
|
||||
inline Foam::scalar Foam::perfectGas<Specie>::Sv(scalar p, scalar T) const
|
||||
{
|
||||
NotImplemented;
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
template<class Specie>
|
||||
inline Foam::scalar Foam::perfectGas<Specie>::psi(scalar p, scalar T) const
|
||||
{
|
||||
|
||||
@ -2,7 +2,7 @@
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration | Website: https://openfoam.org
|
||||
\\ / A nd | Copyright (C) 2019 OpenFOAM Foundation
|
||||
\\ / A nd | Copyright (C) 2019-2020 OpenFOAM Foundation
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
@ -193,8 +193,11 @@ public:
|
||||
//- Return Cv departure [J/(kg K]
|
||||
inline scalar Cv(scalar p, scalar T) const;
|
||||
|
||||
//- Return entropy [J/kg/K]
|
||||
inline scalar S(const scalar p, const scalar T) const;
|
||||
//- Return entropy correction to the integral of Cp/T [J/kg/K]
|
||||
inline scalar Sp(const scalar p, const scalar T) const;
|
||||
|
||||
//- Return entropy correction to the integral of Cv/T [J/kg/K]
|
||||
inline scalar Sv(const scalar p, const scalar T) const;
|
||||
|
||||
//- Return compressibility [s^2/m^2]
|
||||
inline scalar psi(scalar p, scalar T) const;
|
||||
|
||||
@ -2,7 +2,7 @@
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration | Website: https://openfoam.org
|
||||
\\ / A nd | Copyright (C) 2019 OpenFOAM Foundation
|
||||
\\ / A nd | Copyright (C) 2019-2020 OpenFOAM Foundation
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
@ -110,12 +110,20 @@ inline Foam::scalar Foam::rPolynomial<Specie>::Cv(scalar p, scalar T) const
|
||||
|
||||
|
||||
template<class Specie>
|
||||
inline Foam::scalar Foam::rPolynomial<Specie>::S(scalar p, scalar T) const
|
||||
inline Foam::scalar Foam::rPolynomial<Specie>::Sp(scalar p, scalar T) const
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
template<class Specie>
|
||||
inline Foam::scalar Foam::rPolynomial<Specie>::Sv(scalar p, scalar T) const
|
||||
{
|
||||
NotImplemented
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
template<class Specie>
|
||||
inline Foam::scalar Foam::rPolynomial<Specie>::psi(scalar p, scalar T) const
|
||||
{
|
||||
|
||||
@ -2,7 +2,7 @@
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration | Website: https://openfoam.org
|
||||
\\ / A nd | Copyright (C) 2012-2019 OpenFOAM Foundation
|
||||
\\ / A nd | Copyright (C) 2012-2020 OpenFOAM Foundation
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
@ -140,8 +140,11 @@ public:
|
||||
//- Return Cv departure [J/(kg K]
|
||||
inline scalar Cv(scalar p, scalar T) const;
|
||||
|
||||
//- Return entropy [J/kg/K]
|
||||
inline scalar S(const scalar p, const scalar T) const;
|
||||
//- Return entropy correction to the integral of Cp/T [J/kg/K]
|
||||
inline scalar Sp(const scalar p, const scalar T) const;
|
||||
|
||||
//- Return entropy correction to the integral of Cv/T [J/kg/K]
|
||||
inline scalar Sv(const scalar p, const scalar T) const;
|
||||
|
||||
//- Return compressibility [s^2/m^2]
|
||||
inline scalar psi(scalar p, scalar T) const;
|
||||
|
||||
@ -2,7 +2,7 @@
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration | Website: https://openfoam.org
|
||||
\\ / A nd | Copyright (C) 2012-2019 OpenFOAM Foundation
|
||||
\\ / A nd | Copyright (C) 2012-2020 OpenFOAM Foundation
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
@ -99,7 +99,14 @@ inline Foam::scalar Foam::rhoConst<Specie>::Cv(scalar p, scalar T) const
|
||||
|
||||
|
||||
template<class Specie>
|
||||
inline Foam::scalar Foam::rhoConst<Specie>::S(scalar p, scalar T) const
|
||||
inline Foam::scalar Foam::rhoConst<Specie>::Sp(scalar p, scalar T) const
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
template<class Specie>
|
||||
inline Foam::scalar Foam::rhoConst<Specie>::Sv(scalar p, scalar T) const
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
|
||||
@ -141,8 +141,7 @@ inline Foam::scalar Foam::eConstThermo<EquationOfState>::S
|
||||
const scalar T
|
||||
) const
|
||||
{
|
||||
return Cp(p, T)*log(T/Tstd)
|
||||
+ EquationOfState::S(p, T); // Requires EquationOfState::S for Cv
|
||||
return Cp(p, T)*log(T/Tstd) + EquationOfState::Sv(p, T);
|
||||
}
|
||||
|
||||
|
||||
@ -165,6 +164,7 @@ inline Foam::scalar Foam::eConstThermo<EquationOfState>::dCpdT
|
||||
const scalar T
|
||||
) const
|
||||
{
|
||||
NotImplemented;
|
||||
return 0; // EquationOfState::dCpdT
|
||||
}
|
||||
|
||||
|
||||
@ -125,8 +125,7 @@ inline Foam::scalar Foam::ePolynomialThermo<EquationOfState, PolySize>::S
|
||||
const scalar T
|
||||
) const
|
||||
{
|
||||
return sCoeffs_.value(T)
|
||||
+ EquationOfState::S(p, T); // Requires EquationOfState::S for Cv
|
||||
return sCoeffs_.value(T) + EquationOfState::Sv(p, T);
|
||||
}
|
||||
|
||||
|
||||
@ -149,6 +148,7 @@ inline Foam::scalar Foam::ePolynomialThermo<EquationOfState, PolySize>::dCpdT
|
||||
const scalar T
|
||||
) const
|
||||
{
|
||||
NotImplemented;
|
||||
return CvCoeffs_.derivative(T); // + EquationOfState::dCpdT
|
||||
}
|
||||
|
||||
|
||||
@ -164,7 +164,7 @@ inline Foam::scalar Foam::ePowerThermo<EquationOfState>::S
|
||||
{
|
||||
return
|
||||
c0_*(pow(T, n0_) - pow(Tstd, n0_))/(pow(Tref_, n0_)*n0_)
|
||||
+ EquationOfState::S(p, T); // Requires EquationOfState::S for Cv
|
||||
+ EquationOfState::Sv(p, T);
|
||||
}
|
||||
|
||||
|
||||
@ -188,7 +188,6 @@ inline Foam::scalar Foam::ePowerThermo<EquationOfState>::dCpdT
|
||||
const scalar T
|
||||
) const
|
||||
{
|
||||
// To be implemented
|
||||
NotImplemented;
|
||||
return 0; // + EquationOfState::dCpdT
|
||||
}
|
||||
|
||||
@ -141,7 +141,7 @@ inline Foam::scalar Foam::hConstThermo<EquationOfState>::S
|
||||
const scalar T
|
||||
) const
|
||||
{
|
||||
return Cp_*log(T/Tstd) + EquationOfState::S(p, T);
|
||||
return Cp_*log(T/Tstd) + EquationOfState::Sp(p, T);
|
||||
}
|
||||
|
||||
|
||||
|
||||
@ -125,7 +125,7 @@ inline Foam::scalar Foam::hPolynomialThermo<EquationOfState, PolySize>::S
|
||||
const scalar T
|
||||
) const
|
||||
{
|
||||
return sCoeffs_.value(T) + EquationOfState::S(p, T);
|
||||
return sCoeffs_.value(T) + EquationOfState::Sp(p, T);
|
||||
}
|
||||
|
||||
|
||||
|
||||
@ -164,7 +164,7 @@ inline Foam::scalar Foam::hPowerThermo<EquationOfState>::S
|
||||
{
|
||||
return
|
||||
c0_*(pow(T, n0_) - pow(Tstd, n0_))/(pow(Tref_, n0_)*n0_)
|
||||
+ EquationOfState::S(p, T);
|
||||
+ EquationOfState::Sp(p, T);
|
||||
}
|
||||
|
||||
|
||||
|
||||
@ -101,7 +101,7 @@ inline Foam::scalar Foam::hTabulatedThermo<EquationOfState>::S
|
||||
const scalar T
|
||||
) const
|
||||
{
|
||||
return Cp_.intfByTdT(p, T) + EquationOfState::S(p, T) + Sf_;
|
||||
return Cp_.intfByTdT(p, T) + EquationOfState::Sp(p, T) + Sf_;
|
||||
}
|
||||
|
||||
|
||||
|
||||
@ -233,7 +233,7 @@ inline Foam::scalar Foam::janafThermo<EquationOfState>::S
|
||||
(
|
||||
(((a[4]/4.0*T + a[3]/3.0)*T + a[2]/2.0)*T + a[1])*T + a[0]*log(T)
|
||||
+ a[6]
|
||||
) + EquationOfState::S(p, T);
|
||||
) + EquationOfState::Sp(p, T);
|
||||
}
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user