Skip to content

Commit 121c484

Browse files
committed
Add LOX properties
1 parent 3dce17d commit 121c484

4 files changed

Lines changed: 375 additions & 0 deletions

File tree

  • src/thermophysicalModels/thermophysicalProperties

src/thermophysicalModels/thermophysicalProperties/Make/files

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -51,6 +51,7 @@ $(workDir)/liquidProperties/MB/MB.C
5151
$(workDir)/liquidProperties/CH4N2O/CH4N2O.C
5252
$(workDir)/liquidProperties/nC3H8O/nC3H8O.C
5353
$(workDir)/liquidProperties/iC3H8O/iC3H8O.C
54+
liquidProperties/O2/O2.C
5455

5556

5657
solidProperties/solidProperties/solidProperties.C
Lines changed: 113 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,113 @@
1+
#include "O2.H"
2+
#include "addToRunTimeSelectionTable.H"
3+
4+
5+
namespace Foam
6+
{
7+
defineTypeNameAndDebug(O2, 0);
8+
addToRunTimeSelectionTable(liquidProperties, O2,);
9+
addToRunTimeSelectionTable(liquidProperties, O2, dictionary);
10+
}
11+
12+
13+
Foam::O2::O2()
14+
:
15+
liquidProperties
16+
(
17+
0.031999,
18+
154.5994,
19+
5.0464e+6,
20+
0.07495,
21+
0.294248,
22+
54.361,
23+
146.28,
24+
90.188,
25+
-1,
26+
0.0222,
27+
14710.24
28+
),
29+
30+
pv_(2.68794635e+01, -9.58794777e+02, -1.05052914e+00, -6.90048355e-05, 1.21846002e-02),
31+
32+
rho_(1.14632554e+02, 2.75655615e-01, 154.5994, 2.77505361e-01),
33+
34+
hl_(154.5994, 2.89780460e+05, 6.00000000e-01, -7.05482356e-01, 4.75635399e-01, 0.0),
35+
36+
Cp_(154.5994, 1.09590080e+01, 1.45625217e+03, 2.33843393e+01, -8.99949070e+01),
37+
38+
h_(-9.68908452e+05, 2.50637084e+04, -5.16097446e+02, 5.55884345e+00, -2.93205446e-02, 6.09448175e-05),
39+
40+
mu_(-2.11200494e+00, 7.62848791e+01, -1.61677107e+00, -7.70004913e-30, 1.31855757e+01),
41+
42+
sigma_(154.5994, 3.83537868e-02, 1.21069008e+00, 4.43081971e-02, -5.45942334e-02, 0.0),
43+
44+
kappa_(-9.19925611e-02, 1.93351101e-02, -4.51801714e-04, 4.79054225e-06, -2.47777620e-08, 5.00382658e-11),
45+
46+
Cpg_(154.5994, 1.36975300e+01, 3.52746624e+02, -6.80059012e+00, -4.86846476e+01),
47+
48+
B_(1.20601567e-02, -6.15471876e-04, 1.22024524e-05, -1.17761704e-07, 5.54479099e-10, -1.02125637e-12),
49+
50+
mug_(-1.76036598e+01, 1.50014787e+01, 1.23492678e+00, 1.17825779e-56, 2.53862523e+01),
51+
52+
kappag_(-9.52797778e-01, 5.36816017e-02, -1.17434164e-03, 1.25352582e-05, -6.52648492e-08, 1.32897143e-10),
53+
54+
D_(16.3, 18.5, 31.999, 28.0)
55+
{}
56+
57+
58+
Foam::O2::O2
59+
(
60+
const liquidProperties& l,
61+
const NSRDSfunc5& density,
62+
const NSRDSfunc1& vapourPressure,
63+
const NSRDSfunc6& heatOfVapourisation,
64+
const NSRDSfunc14& heatCapacity,
65+
const NSRDSfunc0& enthalpy,
66+
const NSRDSfunc14& idealGasHeatCapacity,
67+
const NSRDSfunc0& secondVirialCoeff,
68+
const NSRDSfunc1& dynamicViscosity,
69+
const NSRDSfunc1& vapourDynamicViscosity,
70+
const NSRDSfunc0& thermalConductivity,
71+
const NSRDSfunc0& vapourThermalConductivity,
72+
const NSRDSfunc6& surfaceTension,
73+
const APIdiffCoefFunc& vapourDiffussivity
74+
)
75+
:
76+
liquidProperties(l),
77+
rho_(density),
78+
pv_(vapourPressure),
79+
hl_(heatOfVapourisation),
80+
Cp_(heatCapacity),
81+
h_(enthalpy),
82+
Cpg_(idealGasHeatCapacity),
83+
B_(secondVirialCoeff),
84+
mu_(dynamicViscosity),
85+
mug_(vapourDynamicViscosity),
86+
kappa_(thermalConductivity),
87+
kappag_(vapourThermalConductivity),
88+
sigma_(surfaceTension),
89+
D_(vapourDiffussivity)
90+
{}
91+
92+
93+
Foam::O2::O2(const dictionary& dict)
94+
:
95+
O2()
96+
{
97+
readIfPresent(*this, dict);
98+
}
99+
100+
101+
102+
void Foam::O2::writeData(Ostream& os) const
103+
{
104+
liquidProperties::writeData(*this, os);
105+
}
106+
107+
108+
109+
Foam::Ostream& Foam::operator<<(Ostream& os, const O2& l)
110+
{
111+
l.writeData(os);
112+
return os;
113+
}
Lines changed: 151 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,151 @@
1+
/*---------------------------------------------------------------------------*\
2+
========= |
3+
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
4+
\\ / O peration | Website: https://openfoam.org
5+
\\ / A nd | Copyright (C) 2011-2019 OpenFOAM Foundation
6+
\\/ M anipulation |
7+
-------------------------------------------------------------------------------
8+
License
9+
This file is part of OpenFOAM.
10+
11+
OpenFOAM is free software: you can redistribute it and/or modify it
12+
under the terms of the GNU General Public License as published by
13+
the Free Software Foundation, either version 3 of the License, or
14+
(at your option) any later version.
15+
16+
OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
17+
ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
18+
FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
19+
for more details.
20+
21+
You should have received a copy of the GNU General Public License
22+
along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
23+
24+
Class
25+
Foam::O2
26+
27+
Description
28+
water
29+
30+
SourceFiles
31+
O2.C
32+
33+
\*---------------------------------------------------------------------------*/
34+
35+
#ifndef O2_H
36+
#define O2_H
37+
38+
#include "liquidProperties.H"
39+
#include "NSRDSfunc0.H"
40+
#include "NSRDSfunc1.H"
41+
#include "NSRDSfunc5.H"
42+
#include "NSRDSfunc6.H"
43+
#include "NSRDSfunc14.H"
44+
#include "APIdiffCoefFunc.H"
45+
46+
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
47+
48+
namespace Foam
49+
{
50+
51+
52+
class O2
53+
:
54+
public liquidProperties
55+
{
56+
57+
NSRDSfunc5 rho_;
58+
NSRDSfunc1 pv_;
59+
NSRDSfunc6 hl_;
60+
NSRDSfunc14 Cp_;
61+
NSRDSfunc0 h_;
62+
NSRDSfunc14 Cpg_;
63+
NSRDSfunc0 B_;
64+
NSRDSfunc1 mu_;
65+
NSRDSfunc1 mug_;
66+
NSRDSfunc0 kappa_;
67+
NSRDSfunc0 kappag_;
68+
NSRDSfunc6 sigma_;
69+
APIdiffCoefFunc D_;
70+
71+
72+
public:
73+
74+
friend class liquidProperties;
75+
76+
TypeName("O2");
77+
78+
79+
80+
O2();
81+
82+
O2
83+
(
84+
const liquidProperties& l,
85+
const NSRDSfunc5& density,
86+
const NSRDSfunc1& vapourPressure,
87+
const NSRDSfunc6& heatOfVapourisation,
88+
const NSRDSfunc14& heatCapacity,
89+
const NSRDSfunc0& enthalpy,
90+
const NSRDSfunc14& idealGasHeatCapacity,
91+
const NSRDSfunc0& secondVirialCoeff,
92+
const NSRDSfunc1& dynamicViscosity,
93+
const NSRDSfunc1& vapourDynamicViscosity,
94+
const NSRDSfunc0& thermalConductivity,
95+
const NSRDSfunc0& vapourThermalConductivity,
96+
const NSRDSfunc6& surfaceTension,
97+
const APIdiffCoefFunc& vapourDiffussivity
98+
);
99+
100+
O2(const dictionary& dict);
101+
102+
virtual autoPtr<liquidProperties> clone() const
103+
{
104+
return autoPtr<liquidProperties>(new O2(*this));
105+
}
106+
107+
108+
inline scalar rho(scalar p, scalar T) const;
109+
110+
inline scalar pv(scalar p, scalar T) const;
111+
112+
inline scalar hl(scalar p, scalar T) const;
113+
114+
inline scalar Cp(scalar p, scalar T) const;
115+
116+
inline scalar h(scalar p, scalar T) const;
117+
118+
inline scalar Cpg(scalar p, scalar T) const;
119+
120+
inline scalar B(scalar p, scalar T) const;
121+
122+
inline scalar mu(scalar p, scalar T) const;
123+
124+
inline scalar mug(scalar p, scalar T) const;
125+
126+
inline scalar kappa(scalar p, scalar T) const;
127+
128+
inline scalar kappag(scalar p, scalar T) const;
129+
130+
inline scalar sigma(scalar p, scalar T) const;
131+
132+
inline scalar D(scalar p, scalar T) const;
133+
134+
inline scalar D(scalar p, scalar T, scalar Wb) const;
135+
136+
137+
void writeData(Ostream& os) const;
138+
139+
friend Ostream& operator<<(Ostream& os, const O2& l);
140+
};
141+
142+
Ostream& operator<<(Ostream& os, const O2& l);
143+
144+
}
145+
146+
#include "O2I.H"
147+
148+
149+
#endif
150+
151+
// ************************************************************************* //
Lines changed: 110 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,110 @@
1+
/*---------------------------------------------------------------------------*\
2+
========= |
3+
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
4+
\\ / O peration | Website: https://openfoam.org
5+
\\ / A nd | Copyright (C) 2011-2018 OpenFOAM Foundation
6+
\\/ M anipulation |
7+
-------------------------------------------------------------------------------
8+
License
9+
This file is part of OpenFOAM.
10+
11+
OpenFOAM is free software: you can redistribute it and/or modify it
12+
under the terms of the GNU General Public License as published by
13+
the Free Software Foundation, either version 3 of the License, or
14+
(at your option) any later version.
15+
16+
OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
17+
ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
18+
FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
19+
for more details.
20+
21+
You should have received a copy of the GNU General Public License
22+
along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
23+
24+
\*---------------------------------------------------------------------------*/
25+
26+
inline Foam::scalar Foam::O2::rho(scalar p, scalar T) const
27+
{
28+
return rho_.f(p, T);
29+
}
30+
31+
32+
inline Foam::scalar Foam::O2::pv(scalar p, scalar T) const
33+
{
34+
return pv_.f(p, T);
35+
}
36+
37+
38+
inline Foam::scalar Foam::O2::hl(scalar p, scalar T) const
39+
{
40+
return hl_.f(p, T);
41+
}
42+
43+
44+
inline Foam::scalar Foam::O2::Cp(scalar p, scalar T) const
45+
{
46+
return Cp_.f(p, T);
47+
}
48+
49+
50+
inline Foam::scalar Foam::O2::h(scalar p, scalar T) const
51+
{
52+
return h_.f(p, T);
53+
}
54+
55+
56+
inline Foam::scalar Foam::O2::Cpg(scalar p, scalar T) const
57+
{
58+
return Cpg_.f(p, T);
59+
}
60+
61+
62+
inline Foam::scalar Foam::O2::B(scalar p, scalar T) const
63+
{
64+
return B_.f(p, T);
65+
}
66+
67+
68+
inline Foam::scalar Foam::O2::mu(scalar p, scalar T) const
69+
{
70+
return mu_.f(p, T);
71+
}
72+
73+
74+
inline Foam::scalar Foam::O2::mug(scalar p, scalar T) const
75+
{
76+
return mug_.f(p, T);
77+
}
78+
79+
80+
inline Foam::scalar Foam::O2::kappa(scalar p, scalar T) const
81+
{
82+
return kappa_.f(p, T);
83+
}
84+
85+
86+
inline Foam::scalar Foam::O2::kappag(scalar p, scalar T) const
87+
{
88+
return kappag_.f(p, T);
89+
}
90+
91+
92+
inline Foam::scalar Foam::O2::sigma(scalar p, scalar T) const
93+
{
94+
return sigma_.f(p, T);
95+
}
96+
97+
98+
inline Foam::scalar Foam::O2::D(scalar p, scalar T) const
99+
{
100+
return D_.f(p, T);
101+
}
102+
103+
104+
inline Foam::scalar Foam::O2::D(scalar p, scalar T, scalar Wb) const
105+
{
106+
return D_.f(p, T, Wb);
107+
}
108+
109+
110+
// ************************************************************************* //

0 commit comments

Comments
 (0)