C2H6.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-2021 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 #include "thermodynamicConstants.H"
30 using namespace Foam::constant::thermodynamic;
31 
32 // * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * //
33 
34 namespace Foam
35 {
39 }
40 
41 // * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
42 
44 :
46  (
47  typeName,
48  30.070,
49  305.32,
50  4.872e+6,
51  0.14550,
52  0.279,
53  90.35,
54  1.13,
55  184.55,
56  0.0,
57  0.0995,
58  1.24e+4
59  ),
60  rho_("rho", 57.499854, 0.27937, 305.32, 0.29187),
61  pv_("pv", 51.857, -2598.7, -5.1283, 1.4913e-05, 2.0),
62  hl_("hl", 305.32, 701396.740937812, 0.60646, -0.55492, 0.32799, 0.0),
63  Cp_
64  (
65  "Cp",
66  305.32,
67  8.02554965861611,
68  2983.63817758563,
69  167.548325566287,
70  -343.93389207094
71  ),
72  h_("h", 0.0, 0.0, 0.0, 0.0, 0.0, 0.0),
73  Cpg_
74  (
75  "Cpg",
76  1341.07083471899,
77  4463.58496840705,
78  1655.5,
79  2435.08480212837,
80  752.87
81  ),
82  B_
83  (
84  "B",
85  0.00269205187894912,
86  -2.05221150648487,
87  -47721.9820419022,
88  2.24808779514466e+15,
89  -3.23910874625873e+17
90  ),
91  mu_("mu", -3.4134, 197.05, -1.2193, -9.2023e-26, 10.0),
92  mug_("mug", 2.5906e-07, 0.67988, 98.902, 0.0),
93  kappa_("kappa", 0.35758, -0.0011458, 6.1866e-07, 0.0, 0.0, 0.0),
94  kappag_("kappag", 7.3869e-05, 1.1689, 500.73, 0.0),
95  sigma_("sigma", 305.32, 0.048643, 1.1981, 0.0, 0.0, 0.0),
96  D_("D", 147.18, 20.1, 30.070, 28), // note: Same as nHeptane
97  Hf_(h_.value(Tstd))
98 {}
99 
100 
102 (
103  const liquidProperties& l,
104  const Function1s::NSRDS5& density,
105  const Function1s::NSRDS1& vapourPressure,
106  const Function1s::NSRDS6& heatOfVapourisation,
107  const Function1s::NSRDS14& heatCapacity,
108  const Function1s::NSRDS0& enthalpy,
109  const Function1s::NSRDS7& idealGasHeatCapacity,
110  const Function1s::NSRDS4& secondVirialCoeff,
111  const Function1s::NSRDS1& dynamicViscosity,
112  const Function1s::NSRDS2& vapourDynamicViscosity,
113  const Function1s::NSRDS0& thermalConductivity,
114  const Function1s::NSRDS2& vapourThermalConductivity,
115  const Function1s::NSRDS6& surfaceTension,
116  const Function2s::APIdiffCoef& vapourDiffusivity
117 )
118 :
119  liquidProperties(l),
120  rho_(density),
121  pv_(vapourPressure),
122  hl_(heatOfVapourisation),
123  Cp_(heatCapacity),
124  h_(enthalpy),
125  Cpg_(idealGasHeatCapacity),
126  B_(secondVirialCoeff),
127  mu_(dynamicViscosity),
128  mug_(vapourDynamicViscosity),
129  kappa_(thermalConductivity),
130  kappag_(vapourThermalConductivity),
131  sigma_(surfaceTension),
132  D_(vapourDiffusivity),
133  Hf_(h_.value(Tstd))
134 {}
135 
136 
138 :
139  C2H6()
140 {
141  readIfPresent(*this, dict);
142 }
143 
144 
145 // * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
146 
147 void Foam::C2H6::write(Ostream& os) const
148 {
149  liquidProperties::write(*this, os);
150 }
151 
152 
153 // ************************************************************************* //
Macros for easy insertion into run-time selection tables.
ethane
Definition: C2H6.H:61
void write(Ostream &os) const
Write the function coefficients.
Definition: C2H6.C:147
C2H6()
Construct null.
Definition: C2H6.C:43
NSRDS function number 100.
Definition: NSRDS0.H:72
NSRDS function number 114.
Definition: NSRDS14.H:72
NSRDS function number 101.
Definition: NSRDS1.H:72
NSRDS function number 102.
Definition: NSRDS2.H:72
NSRDS function number 104.
Definition: NSRDS4.H:72
NSRDS function number 105.
Definition: NSRDS5.H:72
NSRDS function number 106.
Definition: NSRDS6.H:72
NSRDS-AICHE function number 107.
Definition: NSRDS7.H:72
An Ostream is an abstract base class for all output systems (streams, files, token lists,...
Definition: Ostream.H:57
A list of keyword definitions, which are a keyword followed by any number of values (e....
Definition: dictionary.H:160
The thermophysical properties of a liquid.
virtual void write(Ostream &os) const =0
Write the function coefficients.
void readIfPresent(const dictionary &dict)
Read and set the properties present it the given dictionary.
const dimensionedScalar Tstd
Standard temperature.
Thermodynamic scalar constants.
const scalar & Tstd
Standard temperature (default in [K])
Namespace for OpenFOAM.
defineTypeNameAndDebug(combustionModel, 0)
addToRunTimeSelectionTable(ensightPart, ensightPartCells, istream)
dictionary dict