C2H5OH.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 "C2H5OH.H"
28 
29 #include "thermodynamicConstants.H"
30 using namespace Foam::constant::thermodynamic;
31 
32 // * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * //
33 
34 namespace Foam
35 {
36  defineTypeNameAndDebug(C2H5OH, 0);
37  addToRunTimeSelectionTable(liquidProperties, C2H5OH,);
38  addToRunTimeSelectionTable(liquidProperties, C2H5OH, dictionary);
39 }
40 
41 // * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
42 
44 :
46  (
47  typeName,
48  46.069,
49  516.25,
50  6.3835e+6,
51  0.16692,
52  0.248,
53  159.05,
54  7.1775e-5,
55  351.44,
56  5.6372e-30,
57  0.6371,
58  2.6421e+4
59  ),
60  rho_("rho", 70.1308387, 0.26395, 516.25, 0.2367),
61  pv_("pv", 59.796, -6595, -5.0474, 6.3e-07, 2),
62  hl_("hl", 516.25, 958345.091059064, -0.4134, 0.75362, 0.0, 0.0),
63  Cp_
64  (
65  "Cp",
66  2052.57331394213,
67  -0.121990926653498,
68  -0.00714146172046278,
69  5.20523562482363e-05,
70  0.0,
71  0.0
72  ),
73  h_
74  (
75  "h",
76  -6752827.25039109,
77  2052.57331394213,
78  -0.060995463326749,
79  -0.00238048724015426,
80  1.30130890620591e-05,
81  0.0
82  ),
83  Cpg_
84  (
85  "Cpg",
86  909.505307256507,
87  3358.00646855803,
88  1530,
89  2029.56434912848,
90  640
91  ),
92  B_
93  (
94  "B",
95  -0.00358158414552085,
96  3.90718270420456,
97  -1180837.43949293,
98  9.81136990166923e+18,
99  -3.58592545963663e+21
100  ),
101  mu_("mu", 8.049, 776, -3.068, 0.0, 0.0),
102  mug_("mug", 1.0613e-07, 0.8066, 52.7, 0.0),
103  kappa_("kappa", 0.253, -0.000281, 0.0, 0.0, 0.0, 0.0),
104  kappag_("kappag", -3.12, 0.7152, -3550000.0, 0.0),
105  sigma_("sigma", 3.7640e-02, -2.1570e-05, -1.025e-07, 0.0, 0.0, 0.0),
106  D_("D", 147.18, 20.1, 46.069, 28), // note: Same as nHeptane
107  Hf_(h_.value(Tstd))
108 {}
109 
110 
112 (
113  const liquidProperties& l,
114  const Function1s::NSRDS5& density,
115  const Function1s::NSRDS1& vapourPressure,
116  const Function1s::NSRDS6& heatOfVapourisation,
117  const Function1s::NSRDS0& heatCapacity,
118  const Function1s::NSRDS0& enthalpy,
119  const Function1s::NSRDS7& idealGasHeatCapacity,
120  const Function1s::NSRDS4& secondVirialCoeff,
121  const Function1s::NSRDS1& dynamicViscosity,
122  const Function1s::NSRDS2& vapourDynamicViscosity,
123  const Function1s::NSRDS0& thermalConductivity,
124  const Function1s::NSRDS2& vapourThermalConductivity,
125  const Function1s::NSRDS0& surfaceTension,
126  const Function2s::APIdiffCoef& vapourDiffusivity
127 )
128 :
129  liquidProperties(l),
130  rho_(density),
131  pv_(vapourPressure),
132  hl_(heatOfVapourisation),
133  Cp_(heatCapacity),
134  h_(enthalpy),
135  Cpg_(idealGasHeatCapacity),
136  B_(secondVirialCoeff),
137  mu_(dynamicViscosity),
138  mug_(vapourDynamicViscosity),
139  kappa_(thermalConductivity),
140  kappag_(vapourThermalConductivity),
141  sigma_(surfaceTension),
142  D_(vapourDiffusivity),
143  Hf_(h_.value(Tstd))
144 {}
145 
146 
148 :
149  C2H5OH()
150 {
151  readIfPresent(*this, dict);
152 }
153 
154 
155 // * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
156 
158 {
159  liquidProperties::write(*this, os);
160 }
161 
162 
163 // ************************************************************************* //
dictionary dict
NSRDS function number 100.
Definition: NSRDS0.H:69
A list of keyword definitions, which are a keyword followed by any number of values (e...
Definition: dictionary.H:156
const dimensionedScalar Tstd
Standard temperature.
NSRDS function number 105.
Definition: NSRDS5.H:69
void readIfPresent(const dictionary &dict)
Read and set the properties present it the given dictionary.
Thermodynamic scalar constants.
C2H5OH()
Construct null.
Definition: C2H5OH.C:43
Macros for easy insertion into run-time selection tables.
friend class liquidProperties
Definition: C2H5OH.H:84
virtual scalar value(scalar T) const
Evaluate the function and return the result.
Definition: NSRDS0.H:116
const scalar & Tstd
Standard temperature (default in [K])
NSRDS function number 104.
Definition: NSRDS4.H:69
NSRDS function number 102.
Definition: NSRDS2.H:69
The thermophysical properties of a liquid.
NSRDS-AICHE function number 107.
Definition: NSRDS7.H:69
ethanol
Definition: C2H5OH.H:58
An Ostream is an abstract base class for all output systems (streams, files, token lists...
Definition: Ostream.H:54
void write(Ostream &os) const
Write the function coefficients.
Definition: C2H5OH.C:157
addToRunTimeSelectionTable(ensightPart, ensightPartCells, istream)
defineTypeNameAndDebug(combustionModel, 0)
NSRDS function number 101.
Definition: NSRDS1.H:69
const doubleScalar e
Elementary charge.
Definition: doubleScalar.H:105
NSRDS function number 106.
Definition: NSRDS6.H:69
virtual void write(Ostream &os) const =0
Write the function coefficients.
Namespace for OpenFOAM.