MB.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 "MB.H"
28 
29 #include "thermodynamicConstants.H"
30 using namespace Foam::constant::thermodynamic;
31 
32 // * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * //
33 
34 namespace Foam
35 {
37  addToRunTimeSelectionTable(liquidProperties, MB,);
38  addToRunTimeSelectionTable(liquidProperties, MB, dictionary);
39 }
40 
41 // * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
42 
44 :
46  (
47  typeName,
48  102.133,
49  554.5,
50  3.4734e+6,
51  0.34,
52  0.256,
53  187.35,
54  1.0102e-1,
55  375.90,
56  5.7373e-30,
57  0.3807,
58  1.7713e+4
59  ),
60  rho_("rho", 76.6099633, 0.257, 554.5, 0.2772),
61  pv_("pv", 107.51, -8112.9, -12.77, 9.2919e-06, 2.0),
62  hl_("hl", 554.5, 508307.794738233, 0.392, 0.0, 0.0, 0.0),
63  Cp_("Cp", 1135.77394182096, 2.89818178257762, 0.0, 0.0, 0.0, 0.0),
64  h_
65  (
66  "h",
67  -5255966.14542938,
68  1135.77394182096,
69  1.44909089128881,
70  0.0,
71  0.0,
72  0.0
73  ),
74  Cpg_
75  (
76  "Cpg",
77  875.329227575808,
78  2849.22600922327,
79  1570.0,
80  2029.70636327142,
81  678.3
82  ),
83  B_
84  (
85  "B",
86  0.00220496803188,
87  -2.42184210783978,
88  -401045.695318849,
89  -2.85079259397061e+17,
90  -3.57377145486767e+19
91  ),
92  mu_("mu", -12.206, 1141.7, 0.15014, 0.0, 0.0),
93  mug_("mug", 3.733e-07, 0.6177, 256.5, 0.0),
94  kappa_("kappa", 0.2298, -0.0003002, 0.0, 0.0, 0.0, 0.0),
95  kappag_("kappag", 1333.1, 0.9962, 12317000000.0, 0.0),
96  sigma_("sigma", 554.5, 0.064084, 1.2418, 0.0, 0.0, 0.0),
97  D_("D", 147.18, 20.1, 102.133, 28.0), // note: Same as nHeptane,
98  Hf_(h_.value(Tstd))
99 {}
100 
101 
103 (
104  const liquidProperties& l,
105  const Function1s::NSRDS5& density,
106  const Function1s::NSRDS1& vapourPressure,
107  const Function1s::NSRDS6& heatOfVapourisation,
108  const Function1s::NSRDS0& heatCapacity,
109  const Function1s::NSRDS0& enthalpy,
110  const Function1s::NSRDS7& idealGasHeatCapacity,
111  const Function1s::NSRDS4& secondVirialCoeff,
112  const Function1s::NSRDS1& dynamicViscosity,
113  const Function1s::NSRDS2& vapourDynamicViscosity,
114  const Function1s::NSRDS0& thermalConductivity,
115  const Function1s::NSRDS2& vapourThermalConductivity,
116  const Function1s::NSRDS6& surfaceTension,
117  const Function2s::APIdiffCoef& vapourDiffusivity
118 )
119 :
120  liquidProperties(l),
121  rho_(density),
122  pv_(vapourPressure),
123  hl_(heatOfVapourisation),
124  Cp_(heatCapacity),
125  h_(enthalpy),
126  Cpg_(idealGasHeatCapacity),
127  B_(secondVirialCoeff),
128  mu_(dynamicViscosity),
129  mug_(vapourDynamicViscosity),
130  kappa_(thermalConductivity),
131  kappag_(vapourThermalConductivity),
132  sigma_(surfaceTension),
133  D_(vapourDiffusivity),
134  Hf_(h_.value(Tstd))
135 {}
136 
137 
139 :
140  MB()
141 {
142  readIfPresent(*this, dict);
143 }
144 
145 
146 // * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
147 
148 void Foam::MB::write(Ostream& os) const
149 {
150  liquidProperties::write(*this, os);
151 }
152 
153 
154 // ************************************************************************* //
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.
MB()
Construct null.
Definition: MB.C:43
Macros for easy insertion into run-time selection tables.
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])
void write(Ostream &os) const
Write the function coefficients.
Definition: MB.C:148
NSRDS function number 104.
Definition: NSRDS4.H:69
NSRDS function number 102.
Definition: NSRDS2.H:69
The thermophysical properties of a liquid.
friend class liquidProperties
Definition: MB.H:84
NSRDS-AICHE function number 107.
Definition: NSRDS7.H:69
Liquid nC3H7COOCH3 or (MB) methyl butyrate (used for biodiesel surrogate)
Definition: MB.H:58
An Ostream is an abstract base class for all output systems (streams, files, token lists...
Definition: Ostream.H:54
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.