thermo: Standardise property names and remove molar functions
All property functions in the low-level templated thermo property implementations and the high-level virtual interfaces have been made consistent. All energies and enthalpies are lower case to denote that they are specific quantities. Molar functions have been removed as these are no longer used anywhere.
This commit is contained in:
@ -2,7 +2,7 @@
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration | Website: https://openfoam.org
|
||||
\\ / A nd | Copyright (C) 2011-2021 OpenFOAM Foundation
|
||||
\\ / A nd | Copyright (C) 2011-2023 OpenFOAM Foundation
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
@ -57,7 +57,7 @@ int main(int argc, char *argv[])
|
||||
|
||||
OFstream plotFile(liquidName + ".dat");
|
||||
|
||||
plotFile << "# p T rho Cp Hs Ha pv hl Cpg mu mug kappa kappag sigma" << nl;
|
||||
plotFile << "# p T rho Cp hs ha pv hl Cpg mu mug kappa kappag sigma" << nl;
|
||||
|
||||
for (label pi = 0; pi < nP; ++ pi)
|
||||
{
|
||||
@ -72,8 +72,8 @@ int main(int argc, char *argv[])
|
||||
<< T << ' '
|
||||
<< liquidPtr->rho(p, T) << ' '
|
||||
<< liquidPtr->Cp(p, T) << ' '
|
||||
<< liquidPtr->Hs(p, T) << ' '
|
||||
<< liquidPtr->Ha(p, T) << ' '
|
||||
<< liquidPtr->hs(p, T) << ' '
|
||||
<< liquidPtr->ha(p, T) << ' '
|
||||
<< liquidPtr->pv(p, T) << ' '
|
||||
<< liquidPtr->hl(p, T) << ' '
|
||||
<< liquidPtr->Cpg(p, T) << ' '
|
||||
|
||||
@ -22,7 +22,7 @@ License
|
||||
along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
Application
|
||||
ThermoMixture
|
||||
Test-thermoMixture
|
||||
|
||||
Description
|
||||
|
||||
@ -33,9 +33,6 @@ Description
|
||||
#include "specie.H"
|
||||
#include "perfectGas.H"
|
||||
#include "hConstThermo.H"
|
||||
#include "sensibleEnthalpy.H"
|
||||
#include "thermo.H"
|
||||
#include "constTransport.H"
|
||||
|
||||
using namespace Foam;
|
||||
|
||||
@ -44,33 +41,41 @@ using namespace Foam;
|
||||
|
||||
int main(int argc, char *argv[])
|
||||
{
|
||||
typedef constTransport
|
||||
<
|
||||
species::thermo
|
||||
<
|
||||
hConstThermo<perfectGas<specie>>,
|
||||
sensibleEnthalpy
|
||||
>
|
||||
> ThermoType;
|
||||
typedef hConstThermo<perfectGas<specie>> ThermoType;
|
||||
|
||||
dictionary dict(IFstream("thermoDict")());
|
||||
|
||||
ThermoType t1("specie1", dict.subDict("specie1"));
|
||||
ThermoType t2("specie2", dict.subDict("specie2"));
|
||||
|
||||
Info<< "Checking Cp of mixture of hConstThermo" << endl;
|
||||
Info<< "Checking Cp of mixture of hConstThermo:" << nl << endl;
|
||||
|
||||
Info<< "W 1, 2, (1 + 2) = " << t1.W() << " " << t2.W() << " "
|
||||
<< (t1 + t2).W() << endl;
|
||||
ThermoType t1Plus2(0.5*t1 + 0.5*t2);
|
||||
|
||||
Info<< "Cp 1, 2, 1 + 2 = " << t1.cp(1, 1) << " " << t2.cp(1, 1) << " "
|
||||
<< (t1 + t2).cp(1, 1) << endl;
|
||||
ThermoType t1PlusEq2(0.5*t1);
|
||||
t1PlusEq2 += 0.5*t2;
|
||||
|
||||
ThermoType t3(t1);
|
||||
t3 += t2;
|
||||
Info<< "Cp (1 += 2) = " << t3.cp(1, 1) << endl;
|
||||
Info<< " W_1/W_2/W_{1+2}/W_{1+=2} = "
|
||||
<< t1.W() << "/"
|
||||
<< t2.W() << "/"
|
||||
<< t1Plus2.W() << "/"
|
||||
<< t1PlusEq2.W()
|
||||
<< " [kg/kmol] " << nl << endl;
|
||||
|
||||
Info<< "\nEnd\n" << endl;
|
||||
Info<< "Cp_1/Cp_2/Cp_{1+2}/Cp_{1+=2} = "
|
||||
<< t1.Cp(1, 1) << "/"
|
||||
<< t2.Cp(1, 1) << "/"
|
||||
<< t1Plus2.Cp(1, 1) << "/"
|
||||
<< t1PlusEq2.Cp(1, 1)
|
||||
<< " [J/kg/K]" << endl
|
||||
<< " = "
|
||||
<< t1.Cp(1, 1)*t1.W() << "/"
|
||||
<< t2.Cp(1, 1)*t2.W() << "/"
|
||||
<< t1Plus2.Cp(1, 1)*t1Plus2.W() << "/"
|
||||
<< t1PlusEq2.Cp(1, 1)*t1PlusEq2.W()
|
||||
<< " [J/kmol/K]" << nl << endl;
|
||||
|
||||
Info<< "End" << nl << endl;
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
@ -11,12 +11,6 @@ specie1
|
||||
Cv 1;
|
||||
Hf 0;
|
||||
}
|
||||
|
||||
transport
|
||||
{
|
||||
mu 1;
|
||||
Pr 1;
|
||||
}
|
||||
}
|
||||
|
||||
specie2
|
||||
@ -32,10 +26,4 @@ specie2
|
||||
Cv 2;
|
||||
Hf 0;
|
||||
}
|
||||
|
||||
transport
|
||||
{
|
||||
mu 1;
|
||||
Pr 1;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user