CH4N2O.C
Go to the documentation of this file.
1 /*---------------------------------------------------------------------------*\
2  ========= |
3  \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
4  \\ / O peration | Website: https://openfoam.org
5  \\ / A nd | Copyright (C) 2011-2023 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 #include "CH4N2O.H"
28 
29 #include "thermodynamicConstants.H"
30 using namespace Foam::constant::thermodynamic;
31 
32 // * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * //
33 
34 namespace Foam
35 {
39 }
40 
41 // * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
42 
44 :
46  (
47  typeName,
48  60.056,
49  705.0,
50  9.050e+6,
51  0.218,
52  0.337,
53  405.85,
54  9.3131e+1,
55  465.0,
56  1.52e-29,
57  0.3449,
58  4.7813e+4
59  ),
60  rho_("rho", 1230.006936, 0.0, 0.0, 0.0, 0.0, 0.0),
61  pv_
62  (
63  "pv",
64  3015.15611544,
65  -185497.059684,
66  -430.223621983,
67  0.00017405122622,
68  2.0
69  ),
70  hl_("hl", 705.0, 2534249.0, 0.5, 0.0, 0.0, 0.0),
71  Cp_("Cp", 2006.46063673904, 0.0, 0.0, 0.0, 0.0, 0.0),
72  h_("h", -6154107.41641135, 2006.46063673904, 0.0, 0.0, 0.0, 0.0),
73  Cpg_
74  (
75  "Cpg",
76  811.875582789397,
77  2099.04089516451,
78  1627.3,
79  1603.63660583455,
80  724.41
81  ),
82  B_
83  (
84  "B",
85  -0.000383641934194752,
86  0.447249234048222,
87  -469062.208605302,
88  5.5628080458239e+18,
89  -2.3040162514986e+21
90  ),
91  mu_("mu", -51.964, 3670.6, 5.7331, -5.3495e-29, 10.0),
92  mug_("mug", 2.6986e-06, 0.498, 1257.7, -19570.0),
93  kappa_("kappa", -0.4267, 0.0056903, -8.0065e-06, 1.815e-09, 0.0, 0.0),
94  kappag_("kappag", 6.977e-05, 1.1243, 844.9, -148850.0),
95  sigma_("sigma", 705.0, 1.0, 0.0, 0.0, 0.0, 0.0), // note: set to constant
96  D_("D", 147.18, 20.1, 60.056, 28.0), // note: Same as nHeptane
97  hf_(h_.value(Tstd))
98 {}
99 
100 
102 (
103  const liquidProperties& l,
104  const Function1s::NSRDS0& density,
105  const Function1s::NSRDS1& vapourPressure,
106  const Function1s::NSRDS6& heatOfVapourisation,
107  const Function1s::NSRDS0& heatCapacity,
108  const Function1s::NSRDS0& enthalpy,
109  const Function1s::NSRDS7& idealGasHeatCapacity,
110  const Function1s::NSRDS4& secondVirialCoeff,
111  const Function1s::NSRDS1& dynamicViscosity,
112  const Function1s::NSRDS2& vapourDynamicViscosity,
113  const Function1s::NSRDS0& thermalConductivity,
114  const Function1s::NSRDS2& vapourThermalConductivity,
115  const Function1s::NSRDS6& surfaceTension,
116  const Function2s::APIdiffCoef& vapourDiffusivity
117 )
118 :
119  liquidProperties(l),
120  rho_(density),
121  pv_(vapourPressure),
122  hl_(heatOfVapourisation),
123  Cp_(heatCapacity),
124  h_(enthalpy),
125  Cpg_(idealGasHeatCapacity),
126  B_(secondVirialCoeff),
127  mu_(dynamicViscosity),
128  mug_(vapourDynamicViscosity),
129  kappa_(thermalConductivity),
130  kappag_(vapourThermalConductivity),
131  sigma_(surfaceTension),
132  D_(vapourDiffusivity),
133  hf_(h_.value(Tstd))
134 {}
135 
136 
138 :
139  CH4N2O()
140 {
141  readIfPresent(*this, dict);
142 }
143 
144 
145 // * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
146 
148 {
149  liquidProperties::write(*this, os);
150 }
151 
152 
153 // ************************************************************************* //
Macros for easy insertion into run-time selection tables.
urea, note that some of the properties are unavailable in the literature and have been copied from wa...
Definition: CH4N2O.H:62
CH4N2O()
Construct null.
Definition: CH4N2O.C:43
void write(Ostream &os) const
Write the function coefficients.
Definition: CH4N2O.C:147
NSRDS function number 100.
Definition: NSRDS0.H:72
NSRDS function number 101.
Definition: NSRDS1.H:72
NSRDS function number 102.
Definition: NSRDS2.H:72
NSRDS function number 104.
Definition: NSRDS4.H:72
NSRDS function number 106.
Definition: NSRDS6.H:72
NSRDS-AICHE function number 107.
Definition: NSRDS7.H:72
An Ostream is an abstract base class for all output systems (streams, files, token lists,...
Definition: Ostream.H:57
A list of keyword definitions, which are a keyword followed by any number of values (e....
Definition: dictionary.H:162
The thermophysical properties of a liquid.
virtual void write(Ostream &os) const =0
Write the function coefficients.
void readIfPresent(const dictionary &dict)
Read and set the properties present it the given dictionary.
const dimensionedScalar Tstd
Standard temperature.
Thermodynamic scalar constants.
const scalar & Tstd
Standard temperature (default in [K])
Namespace for OpenFOAM.
addToRunTimeSelectionTable(polyPatch, mergedCyclicPolyPatch, word)
defineTypeNameAndDebug(combustionModel, 0)
dictionary dict