C2H6.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 "C2H6.H"
28 
29 // * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * //
30 
31 namespace Foam
32 {
33  defineTypeNameAndDebug(C2H6, 0);
34  addToRunTimeSelectionTable(liquidProperties, C2H6,);
35  addToRunTimeSelectionTable(liquidProperties, C2H6, dictionary);
36 }
37 
38 // * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
39 
41 :
43  (
44  30.070,
45  305.32,
46  4.872e+6,
47  0.14550,
48  0.279,
49  90.35,
50  1.13,
51  184.55,
52  0.0,
53  0.0995,
54  1.24e+4
55  ),
56  rho_(57.499854, 0.27937, 305.32, 0.29187),
57  pv_(51.857, -2598.7, -5.1283, 1.4913e-05, 2.0),
58  hl_(305.32, 701396.740937812, 0.60646, -0.55492, 0.32799, 0.0),
59  Cp_
60  (
61  305.32,
62  8.02554965861611,
63  2983.63817758563,
64  167.548325566287,
65  -343.93389207094
66  ),
67  h_(0.0, 0.0, 0.0, 0.0, 0.0, 0.0),
68  Cpg_(1341.07083471899, 4463.58496840705, 1655.5, 2435.08480212837, 752.87),
69  B_
70  (
71  0.00269205187894912,
72  -2.05221150648487,
73  -47721.9820419022,
74  2.24808779514466e+15,
75  -3.23910874625873e+17
76  ),
77  mu_(-3.4134, 197.05, -1.2193, -9.2023e-26, 10.0),
78  mug_(2.5906e-07, 0.67988, 98.902, 0.0),
79  kappa_(0.35758, -0.0011458, 6.1866e-07, 0.0, 0.0, 0.0),
80  kappag_(7.3869e-05, 1.1689, 500.73, 0.0),
81  sigma_(305.32, 0.048643, 1.1981, 0.0, 0.0, 0.0),
82  D_(147.18, 20.1, 30.070, 28) // note: Same as nHeptane
83 {}
84 
85 
87 (
88  const liquidProperties& l,
89  const NSRDSfunc5& density,
90  const NSRDSfunc1& vapourPressure,
91  const NSRDSfunc6& heatOfVapourisation,
92  const NSRDSfunc14& heatCapacity,
93  const NSRDSfunc0& enthalpy,
94  const NSRDSfunc7& idealGasHeatCapacity,
95  const NSRDSfunc4& secondVirialCoeff,
96  const NSRDSfunc1& dynamicViscosity,
97  const NSRDSfunc2& vapourDynamicViscosity,
98  const NSRDSfunc0& thermalConductivity,
99  const NSRDSfunc2& vapourThermalConductivity,
100  const NSRDSfunc6& surfaceTension,
101  const APIdiffCoefFunc& vapourDiffussivity
102 )
103 :
104  liquidProperties(l),
105  rho_(density),
106  pv_(vapourPressure),
107  hl_(heatOfVapourisation),
108  Cp_(heatCapacity),
109  h_(enthalpy),
110  Cpg_(idealGasHeatCapacity),
111  B_(secondVirialCoeff),
112  mu_(dynamicViscosity),
113  mug_(vapourDynamicViscosity),
114  kappa_(thermalConductivity),
115  kappag_(vapourThermalConductivity),
116  sigma_(surfaceTension),
117  D_(vapourDiffussivity)
118 {}
119 
120 
122 :
123  C2H6()
124 {
125  readIfPresent(*this, dict);
126 }
127 
128 
129 // * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
130 
132 {
133  liquidProperties::writeData(*this, os);
134 }
135 
136 
137 // * * * * * * * * * * * * * * * Ostream Operator * * * * * * * * * * * * * //
138 
140 {
141  l.writeData(os);
142  return os;
143 }
144 
145 
146 // ************************************************************************* //
dictionary dict
NSRDS function number 114.
Definition: NSRDSfunc14.H:67
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
C2H6()
Construct null.
Definition: C2H6.C:40
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
NSRDS function number 104.
Definition: NSRDSfunc4.H:67
Macros for easy insertion into run-time selection tables.
ethane
Definition: C2H6.H:58
The thermophysical properties of a liquid.
NSRDS function number 105.
Definition: NSRDSfunc5.H:67
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)
friend class liquidProperties
Definition: C2H6.H:81
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.
void writeData(Ostream &os) const
Write the function coefficients.
Definition: C2H6.C:131
NSRDS function number 101.
Definition: NSRDSfunc1.H:67
Namespace for OpenFOAM.