IDEA.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 | www.openfoam.com
6  \\/ M anipulation |
7 -------------------------------------------------------------------------------
8  Copyright (C) 2011-2017 OpenFOAM Foundation
9 -------------------------------------------------------------------------------
10 License
11  This file is part of OpenFOAM.
12 
13  OpenFOAM is free software: you can redistribute it and/or modify it
14  under the terms of the GNU General Public License as published by
15  the Free Software Foundation, either version 3 of the License, or
16  (at your option) any later version.
17 
18  OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
19  ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
20  FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
21  for more details.
22 
23  You should have received a copy of the GNU General Public License
24  along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
25 
26 \*---------------------------------------------------------------------------*/
27 
28 #include "IDEA.H"
30 
31 // * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * //
32 
33 namespace Foam
34 {
35  defineTypeNameAndDebug(IDEA, 0);
36  addToRunTimeSelectionTable(liquidProperties, IDEA,);
37  addToRunTimeSelectionTable(liquidProperties, IDEA, dictionary);
38 }
39 
40 // * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
41 
43 :
45  (
46  142.26,
47  618.074,
48  2.11e+6,
49  0.523,
50  0.247,
51  242.67,
52  3.4929e-2,
53  447.3,
54  1.7012e-30,
55  0.3478,
56  1.57e+4
57  ),
58  rho_(152.012105, 3.87150382e-1, 618.073893, 4.00790044e-1),
59  pv_
60  (
61  8.4817774623e+01,
62  -8.6782398353e+03,
63  -9.1277694857,
64  4.6153144498e-06,
65  2.0
66  ),
67  hl_
68  (
69  618.074,
70  2.1671983789e+05,
71  -4.2413153435e+00,
72  1.1656811532e+01,
73  -1.1656446689e+01,
74  4.3667661492
75  ),
76  Cp_(1.6604957e+3, -6.250871e-1, 6.1778552e-3, 0.0, 0.0, 0.0),
77  h_(0.0, 0.0, 0.0, 0.0, 0.0, 0.0),
78  Cpg_
79  (
80  1.0457515243e+03,
81  3.4410492875e+03,
82  1.5976862298e+03,
83  2.4697705752e+03,
84  7.3699710536e+02
85  ),
86  B_
87  (
88  0.00337351091119935,
89  -4.13606494008504,
90  -534560.916470464,
91  -1.13364022911762e+19,
92  2.80704220402713e+21
93  ),
94  mu_(-6.9645853822e+01, 4.4390635942e+03, 8.4680722718e+00, 0.0, 0.0),
95  mug_(4.2629382158e-08, 8.8144402122e-01, 9.6918097636e+01, 0.0),
96  kappa_(2.03684e-01, -2.3168e-04, 0.0, 0.0, 0.0, 0.0),
97  kappag_
98  (
99  -5.664925956707e+02,
100  8.896721676320e-01,
101  -2.849783998688e+09,
102  6.914935658053e+05
103  ),
104  sigma_
105  (
106  618.074,
107  8.3846525429e-03,
108  -1.0044759047e+01,
109  2.7261918781e+01,
110  -2.5529134309e+01,
111  8.6488806234
112  ),
113  D_(147.18, 20.1, 142.2, 28.0) // note: Same as nHeptane
114 {}
115 
116 
118 (
119  const liquidProperties& l,
120  const NSRDSfunc5& density,
121  const NSRDSfunc1& vapourPressure,
122  const NSRDSfunc6& heatOfVapourisation,
123  const NSRDSfunc0& heatCapacity,
124  const NSRDSfunc0& enthalpy,
125  const NSRDSfunc7& idealGasHeatCapacity,
126  const NSRDSfunc4& secondVirialCoeff,
127  const NSRDSfunc1& dynamicViscosity,
128  const NSRDSfunc2& vapourDynamicViscosity,
129  const NSRDSfunc0& thermalConductivity,
130  const NSRDSfunc2& vapourThermalConductivity,
131  const NSRDSfunc6& surfaceTension,
132  const APIdiffCoefFunc& vapourDiffussivity
133 )
134 :
135  liquidProperties(l),
136  rho_(density),
137  pv_(vapourPressure),
138  hl_(heatOfVapourisation),
139  Cp_(heatCapacity),
140  h_(enthalpy),
141  Cpg_(idealGasHeatCapacity),
142  B_(secondVirialCoeff),
143  mu_(dynamicViscosity),
144  mug_(vapourDynamicViscosity),
145  kappa_(thermalConductivity),
146  kappag_(vapourThermalConductivity),
147  sigma_(surfaceTension),
148  D_(vapourDiffussivity)
149 {}
150 
151 
153 :
154  IDEA()
155 {
156  readIfPresent(*this, dict);
157 }
158 
159 
160 // * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
161 
163 {
165 }
166 
167 
168 // * * * * * * * * * * * * * * * Ostream Operator * * * * * * * * * * * * * //
169 
171 {
172  l.writeData(os);
173  return os;
174 }
175 
176 
177 // ************************************************************************* //
Foam::addToRunTimeSelectionTable
addToRunTimeSelectionTable(decompositionMethod, kahipDecomp, dictionary)
Foam::IDEA::IDEA
IDEA()
Construct null.
Definition: IDEA.C:42
Foam::liquidProperties::writeData
virtual void writeData(Ostream &os) const =0
Write the function coefficients.
Definition: liquidProperties.C:240
Foam::NSRDSfunc0
NSRDS function number 100.
Definition: NSRDSfunc0.H:69
Foam::NSRDSfunc7
NSRDS-AICHE function number 107.
Definition: NSRDSfunc7.H:69
Foam::operator<<
Ostream & operator<<(Ostream &, const boundaryPatch &p)
Write boundaryPatch as dictionary entries (without surrounding braces)
Definition: boundaryPatch.C:83
Foam::NSRDSfunc4
NSRDS function number 104.
Definition: NSRDSfunc4.H:69
Foam::liquidProperties
The thermophysical properties of a liquid.
Definition: liquidProperties.H:51
Foam::IDEA
The IDEA fuel is constructed by adding 30% alphaMethylNaphthalene with 70% n-decane.
Definition: IDEA.H:82
Foam::APIdiffCoefFunc
API function for vapour mass diffusivity.
Definition: APIdiffCoefFunc.H:53
dict
dictionary dict
Definition: searchingEngine.H:14
Foam::dictionary
A list of keyword definitions, which are a keyword followed by a number of values (eg,...
Definition: dictionary.H:123
os
OBJstream os(runTime.globalPath()/outputName)
addToRunTimeSelectionTable.H
Macros for easy insertion into run-time selection tables.
Foam::NSRDSfunc1
NSRDS function number 101.
Definition: NSRDSfunc1.H:69
Foam
Namespace for OpenFOAM.
Definition: atmBoundaryLayer.C:33
IDEA.H
Foam::liquidProperties::readIfPresent
void readIfPresent(const dictionary &dict)
Read and set the properties present it the given dictionary.
Definition: liquidProperties.C:224
Foam::NSRDSfunc5
NSRDS function number 105.
Definition: NSRDSfunc5.H:69
Foam::IDEA::writeData
void writeData(Ostream &os) const
Write the function coefficients.
Definition: IDEA.C:162
Foam::constant::electromagnetic::e
const dimensionedScalar e
Elementary charge.
Definition: createFields.H:11
Foam::NSRDSfunc2
NSRDS function number 102.
Definition: NSRDSfunc2.H:69
Foam::Ostream
An Ostream is an abstract base class for all output systems (streams, files, token lists,...
Definition: Ostream.H:56
Foam::defineTypeNameAndDebug
defineTypeNameAndDebug(combustionModel, 0)
Foam::NSRDSfunc6
NSRDS function number 106.
Definition: NSRDSfunc6.H:69