All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
N2.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-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 \*---------------------------------------------------------------------------*/
25 
26 #include "N2.H"
28 
29 // * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * //
30 
31 namespace Foam
32 {
34  addToRunTimeSelectionTable(liquidProperties, N2,);
35  addToRunTimeSelectionTable(liquidProperties, N2, dictionary);
36 }
37 
38 // * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
39 
41 :
43  (
44  28.014,
45  126.10,
46  3.3944e+6,
47  0.0901,
48  0.292,
49  63.15,
50  1.2517e+4,
51  77.35,
52  0.0,
53  0.0403,
54  9.0819e+3
55  ),
56  rho_(88.8716136, 0.28479, 126.1, 0.2925),
57  pv_(59.826, -1097.6, -8.6689, 0.046346, 1.0),
58  hl_(126.10, 336617.405582923, 1.201, -1.4811, 0.7085, 0.0),
59  Cp_
60  (
61  -1192.26101235097,
62  125.187406296852,
63  -1.66702363104162,
64  0.00759263225530092,
65  0.0,
66  0.0
67  ),
68  h_
69  (
70  -5480656.55276541,
71  -1192.26101235097,
72  62.5937031484258,
73  -0.555674543680541,
74  0.00189815806382523,
75  0.0
76  ),
77  Cpg_(1038.94481330763, 307.52123938031, 1701.6, 3.69351038766331, 909.79),
78  B_
79  (
80  0.00166702363104162,
81  -0.533661740558292,
82  -2182.12322410223,
83  2873563218390.8,
84  -165274505604341.0
85  ),
86  mu_(-32.165, 496.9, 3.9069, -1.08e-21, 10.0),
87  mug_(7.632e-07, 0.58823, 67.75, 0.0),
88  kappa_(0.7259, -0.016728, 0.00016215, -5.7605e-07, 0.0, 0.0),
89  kappag_(0.000351, 0.7652, 25.767, 0.0),
90  sigma_(126.10, 0.02898, 1.2457, 0.0, 0.0, 0.0),
91  D_(147.18, 20.1, 28.014, 28.0) // note: Same as nHeptane
92 {}
93 
94 
96 (
97  const liquidProperties& l,
98  const thermophysicalFunctions::NSRDS5& density,
99  const thermophysicalFunctions::NSRDS1& vapourPressure,
100  const thermophysicalFunctions::NSRDS6& heatOfVapourisation,
101  const thermophysicalFunctions::NSRDS0& heatCapacity,
102  const thermophysicalFunctions::NSRDS0& enthalpy,
103  const thermophysicalFunctions::NSRDS7& idealGasHeatCapacity,
104  const thermophysicalFunctions::NSRDS4& secondVirialCoeff,
105  const thermophysicalFunctions::NSRDS1& dynamicViscosity,
106  const thermophysicalFunctions::NSRDS2& vapourDynamicViscosity,
107  const thermophysicalFunctions::NSRDS0& thermalConductivity,
108  const thermophysicalFunctions::NSRDS2& vapourThermalConductivity,
109  const thermophysicalFunctions::NSRDS6& surfaceTension,
110  const thermophysicalFunctions::APIdiffCoef& vapourDiffusivity
111 )
112 :
113  liquidProperties(l),
114  rho_(density),
115  pv_(vapourPressure),
116  hl_(heatOfVapourisation),
117  Cp_(heatCapacity),
118  h_(enthalpy),
119  Cpg_(idealGasHeatCapacity),
120  B_(secondVirialCoeff),
121  mu_(dynamicViscosity),
122  mug_(vapourDynamicViscosity),
123  kappa_(thermalConductivity),
124  kappag_(vapourThermalConductivity),
125  sigma_(surfaceTension),
126  D_(vapourDiffusivity)
127 {}
128 
129 
131 :
132  N2()
133 {
134  readIfPresent(*this, dict);
135 }
136 
137 
138 // * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
139 
140 void Foam::N2::write(Ostream& os) const
141 {
142  liquidProperties::write(*this, os);
143 }
144 
145 
146 // ************************************************************************* //
dictionary dict
A list of keyword definitions, which are a keyword followed by any number of values (e...
Definition: dictionary.H:158
void readIfPresent(const dictionary &dict)
Read and set the properties present it the given dictionary.
Macros for easy insertion into run-time selection tables.
void write(Ostream &os) const
Write the function coefficients.
Definition: N2.C:140
The thermophysical properties of a liquid.
friend class liquidProperties
Definition: N2.H:81
N2()
Construct null.
Definition: N2.C:40
Liquid N2.
Definition: N2.H:58
An Ostream is an abstract base class for all output systems (streams, files, token lists...
Definition: Ostream.H:54
addToRunTimeSelectionTable(ensightPart, ensightPartCells, istream)
defineTypeNameAndDebug(combustionModel, 0)
const doubleScalar e
Elementary charge.
Definition: doubleScalar.H:105
virtual void write(Ostream &os) const =0
Write the function coefficients.
Namespace for OpenFOAM.