Merge branch 'master' of ssh://git.code.sf.net/p/foam-extend/foam-extend-3.2
[foam-extend-3.2.git] / src / thermophysicalModels / liquids / IDEA / IDEA.C
blob637f5747598071188f78f8e8bec37c7a88040cff
1 /*---------------------------------------------------------------------------*\
2   =========                 |
3   \\      /  F ield         | foam-extend: Open Source CFD
4    \\    /   O peration     | Version:     3.2
5     \\  /    A nd           | Web:         http://www.foam-extend.org
6      \\/     M anipulation  | For copyright notice see file Copyright
7 -------------------------------------------------------------------------------
8 License
9     This file is part of foam-extend.
11     foam-extend is free software: you can redistribute it and/or modify it
12     under the terms of the GNU General Public License as published by the
13     Free Software Foundation, either version 3 of the License, or (at your
14     option) any later version.
16     foam-extend is distributed in the hope that it will be useful, but
17     WITHOUT ANY WARRANTY; without even the implied warranty of
18     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
19     General Public License for more details.
21     You should have received a copy of the GNU General Public License
22     along with foam-extend.  If not, see <http://www.gnu.org/licenses/>.
24 \*---------------------------------------------------------------------------*/
26 #include "IDEA.H"
27 #include "addToRunTimeSelectionTable.H"
29 // * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * //
31 namespace Foam
33     defineTypeNameAndDebug(IDEA, 0);
34     addToRunTimeSelectionTable(liquid, IDEA,);
35     addToRunTimeSelectionTable(liquid, IDEA, Istream);
38 // * * * * * * * * * * * * * * * * Constructors  * * * * * * * * * * * * * * //
40 Foam::IDEA::IDEA()
42     liquid
43     (
44         142.26,
45         618.074,
46         2.11e+6,
47         0.523,
48         0.247,
49         242.67,
50         3.4929e-2,
51         447.3,
52         1.7012e-30,
53         0.3478,
54         1.57e+4
55     ),
56     rho_(152.012105, 3.87150382e-1, 618.073893, 4.00790044e-1),
57     pv_
58     (
59         8.4817774623e+01,
60        -8.6782398353e+03,
61        -9.1277694857,
62         4.6153144498e-06,
63         2.0
64     ),
65     hl_
66     (
67         618.074,
68         2.1671983789e+05,
69        -4.2413153435e+00,
70         1.1656811532e+01,
71        -1.1656446689e+01,
72         4.3667661492
73     ),
74     cp_(1.6604957e+3, -6.250871e-1, 6.1778552e-3, 0.0, 0.0, 0.0),
75     h_(0.0, 0.0, 0.0, 0.0, 0.0, 0.0),
76     cpg_
77     (
78         1.0457515243e+03,
79         3.4410492875e+03,
80         1.5976862298e+03,
81         2.4697705752e+03,
82         7.3699710536e+02
83     ),
84     B_
85     (
86         0.00337351091119935,
87        -4.13606494008504,
88        -534560.916470464,
89        -1.13364022911762e+19,
90         2.80704220402713e+21
91     ),
92     mu_(-6.9645853822e+01, 4.4390635942e+03, 8.4680722718e+00, 0.0, 0.0),
93     mug_(4.2629382158e-08, 8.8144402122e-01, 9.6918097636e+01, 0.0),
94     K_(2.03684e-01, -2.3168e-04, 0.0, 0.0, 0.0, 0.0),
95     Kg_
96     (
97        -5.664925956707e+02,
98         8.896721676320e-01,
99        -2.849783998688e+09,
100         6.914935658053e+05
101     ),
102     sigma_
103     (
104         618.074,
105         8.3846525429e-03,
106        -1.0044759047e+01,
107         2.7261918781e+01,
108        -2.5529134309e+01,
109         8.6488806234
110     ),
111     D_(147.18, 20.1, 142.2, 28.0) // note: Same as nHeptane
115 Foam::IDEA::IDEA
117     const liquid& l,
118     const NSRDSfunc5& density,
119     const NSRDSfunc1& vapourPressure,
120     const NSRDSfunc6& heatOfVapourisation,
121     const NSRDSfunc0& heatCapacity,
122     const NSRDSfunc0& enthalpy,
123     const NSRDSfunc7& idealGasHeatCapacity,
124     const NSRDSfunc4& secondVirialCoeff,
125     const NSRDSfunc1& dynamicViscosity,
126     const NSRDSfunc2& vapourDynamicViscosity,
127     const NSRDSfunc0& thermalConductivity,
128     const NSRDSfunc2& vapourThermalConductivity,
129     const NSRDSfunc6& surfaceTension,
130     const APIdiffCoefFunc& vapourDiffussivity
133     liquid(l),
134     rho_(density),
135     pv_(vapourPressure),
136     hl_(heatOfVapourisation),
137     cp_(heatCapacity),
138     h_(enthalpy),
139     cpg_(idealGasHeatCapacity),
140     B_(secondVirialCoeff),
141     mu_(dynamicViscosity),
142     mug_(vapourDynamicViscosity),
143     K_(thermalConductivity),
144     Kg_(vapourThermalConductivity),
145     sigma_(surfaceTension),
146     D_(vapourDiffussivity)
150 Foam::IDEA::IDEA(Istream& is)
152     liquid(is),
153     rho_(is),
154     pv_(is),
155     hl_(is),
156     cp_(is),
157     h_(is),
158     cpg_(is),
159     B_(is),
160     mu_(is),
161     mug_(is),
162     K_(is),
163     Kg_(is),
164     sigma_(is),
165     D_(is)
169 // ************************************************************************* //