CH4N2O.C
Go to the documentation of this file.
1 /*---------------------------------------------------------------------------*\
2  ========= |
3  \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
4  \\ / O peration |
5  \\ / A nd | Copyright (C) 2011-2017 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 // * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * //
30 
31 namespace Foam
32 {
33  defineTypeNameAndDebug(CH4N2O, 0);
34  addToRunTimeSelectionTable(liquidProperties, CH4N2O,);
35  addToRunTimeSelectionTable(liquidProperties, CH4N2O, dictionary);
36 }
37 
38 // * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
39 
41 :
43  (
44  60.056,
45  705.0,
46  9.050e+6,
47  0.218,
48  0.337,
49  405.85,
50  9.3131e+1,
51  465.0,
52  1.52e-29,
53  0.3449,
54  4.7813e+4
55  ),
56  rho_(1230.006936, 0.0, 0.0, 0.0, 0.0, 0.0),
57  pv_(3015.15611544, -185497.059684, -430.223621983, 0.00017405122622, 2.0),
58  hl_(705.0, 2534249.0, 0.5, 0.0, 0.0, 0.0),
59  Cp_(2006.46063673904, 0.0, 0.0, 0.0, 0.0, 0.0),
60  h_(-6154107.41641135, 2006.46063673904, 0.0, 0.0, 0.0, 0.0),
61  Cpg_(811.875582789397, 2099.04089516451, 1627.3, 1603.63660583455, 724.41),
62  B_
63  (
64  -0.000383641934194752,
65  0.447249234048222,
66  -469062.208605302,
67  5.5628080458239e+18,
68  -2.3040162514986e+21
69  ),
70  mu_(-51.964, 3670.6, 5.7331, -5.3495e-29, 10.0),
71  mug_(2.6986e-06, 0.498, 1257.7, -19570.0),
72  kappa_(-0.4267, 0.0056903, -8.0065e-06, 1.815e-09, 0.0, 0.0),
73  kappag_(6.977e-05, 1.1243, 844.9, -148850.0),
74  sigma_(705.0, 1.0, 0.0, 0.0, 0.0, 0.0), // note: set to constant
75  D_(147.18, 20.1, 60.056, 28.0) // note: Same as nHeptane
76 {}
77 
78 
80 (
81  const liquidProperties& l,
82  const NSRDSfunc0& density,
83  const NSRDSfunc1& vapourPressure,
84  const NSRDSfunc6& heatOfVapourisation,
85  const NSRDSfunc0& heatCapacity,
86  const NSRDSfunc0& enthalpy,
87  const NSRDSfunc7& idealGasHeatCapacity,
88  const NSRDSfunc4& secondVirialCoeff,
89  const NSRDSfunc1& dynamicViscosity,
90  const NSRDSfunc2& vapourDynamicViscosity,
91  const NSRDSfunc0& thermalConductivity,
92  const NSRDSfunc2& vapourThermalConductivity,
93  const NSRDSfunc6& surfaceTension,
94  const APIdiffCoefFunc& vapourDiffussivity
95 )
96 :
98  rho_(density),
99  pv_(vapourPressure),
100  hl_(heatOfVapourisation),
101  Cp_(heatCapacity),
102  h_(enthalpy),
103  Cpg_(idealGasHeatCapacity),
104  B_(secondVirialCoeff),
105  mu_(dynamicViscosity),
106  mug_(vapourDynamicViscosity),
107  kappa_(thermalConductivity),
108  kappag_(vapourThermalConductivity),
109  sigma_(surfaceTension),
110  D_(vapourDiffussivity)
111 {}
112 
113 
115 :
116  CH4N2O()
117 {
118  readIfPresent(*this, dict);
119 }
120 
121 
122 // * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
123 
125 {
126  liquidProperties::writeData(*this, os);
127 }
128 
129 
130 // * * * * * * * * * * * * * * * Ostream Operator * * * * * * * * * * * * * //
131 
133 {
134  l.writeData(os);
135  return os;
136 }
137 
138 
139 // ************************************************************************* //
dictionary dict
const double e
Elementary charge.
Definition: doubleFloat.H:78
A list of keyword definitions, which are a keyword followed by any number of values (e...
Definition: dictionary.H:137
void writeData(Ostream &os) const
Write the function coefficients.
Definition: CH4N2O.C:124
NSRDS function number 102.
Definition: NSRDSfunc2.H:67
void readIfPresent(const dictionary &dict)
Read and set the properties present it the given dictionary.
NSRDS-AICHE function number 107.
Definition: NSRDSfunc7.H:67
friend class liquidProperties
Definition: CH4N2O.H:81
NSRDS function number 104.
Definition: NSRDSfunc4.H:67
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:59
The thermophysical properties of a liquid.
An Ostream is an abstract base class for all output systems (streams, files, token lists...
Definition: Ostream.H:53
addToRunTimeSelectionTable(ensightPart, ensightPartCells, istream)
defineTypeNameAndDebug(combustionModel, 0)
NSRDS function number 100.
Definition: NSRDSfunc0.H:67
NSRDS function number 106.
Definition: NSRDSfunc6.H:67
virtual void writeData(Ostream &os) const =0
Write the function coefficients.
Ostream & operator<<(Ostream &, const ensightPart &)
API function for vapour mass diffusivity.
CH4N2O()
Construct null.
Definition: CH4N2O.C:40
NSRDS function number 101.
Definition: NSRDSfunc1.H:67
Namespace for OpenFOAM.