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-2019 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 // * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * //
30 
31 namespace Foam
32 {
34  addToRunTimeSelectionTable(liquidProperties, MB,);
35  addToRunTimeSelectionTable(liquidProperties, MB, dictionary);
36 }
37 
38 // * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
39 
41 :
43  (
44  102.133,
45  554.5,
46  3.4734e+6,
47  0.34,
48  0.256,
49  187.35,
50  1.0102e-1,
51  375.90,
52  5.7373e-30,
53  0.3807,
54  1.7713e+4
55  ),
56  rho_(76.6099633, 0.257, 554.5, 0.2772),
57  pv_(107.51, -8112.9, -12.77, 9.2919e-06, 2.0),
58  hl_(554.5, 508307.794738233, 0.392, 0.0, 0.0, 0.0),
59  Cp_(1135.77394182096, 2.89818178257762, 0.0, 0.0, 0.0, 0.0),
60  h_(-5255966.14542938, 1135.77394182096, 1.44909089128881, 0.0, 0.0, 0.0),
61  Cpg_(875.329227575808, 2849.22600922327, 1570.0, 2029.70636327142, 678.3),
62  B_
63  (
64  0.00220496803188,
65  -2.42184210783978,
66  -401045.695318849,
67  -2.85079259397061e+17,
68  -3.57377145486767e+19
69  ),
70  mu_(-12.206, 1141.7, 0.15014, 0.0, 0.0),
71  mug_(3.733e-07, 0.6177, 256.5, 0.0),
72  kappa_(0.2298, -0.0003002, 0.0, 0.0, 0.0, 0.0),
73  kappag_(1333.1, 0.9962, 12317000000.0, 0.0),
74  sigma_(554.5, 0.064084, 1.2418, 0.0, 0.0, 0.0),
75  D_(147.18, 20.1, 102.133, 28.0) // note: Same as nHeptane
76 {}
77 
78 
80 (
81  const liquidProperties& l,
82  const thermophysicalFunctions::NSRDS5& density,
83  const thermophysicalFunctions::NSRDS1& vapourPressure,
84  const thermophysicalFunctions::NSRDS6& heatOfVapourisation,
85  const thermophysicalFunctions::NSRDS0& heatCapacity,
86  const thermophysicalFunctions::NSRDS0& enthalpy,
87  const thermophysicalFunctions::NSRDS7& idealGasHeatCapacity,
88  const thermophysicalFunctions::NSRDS4& secondVirialCoeff,
89  const thermophysicalFunctions::NSRDS1& dynamicViscosity,
90  const thermophysicalFunctions::NSRDS2& vapourDynamicViscosity,
91  const thermophysicalFunctions::NSRDS0& thermalConductivity,
92  const thermophysicalFunctions::NSRDS2& vapourThermalConductivity,
93  const thermophysicalFunctions::NSRDS6& surfaceTension,
94  const thermophysicalFunctions::APIdiffCoef& vapourDiffusivity
95 )
96 :
98  rho_(density),
99  pv_(vapourPressure),
100  hl_(heatOfVapourisation),
101  Cp_(heatCapacity),
102  h_(enthalpy),
103  Cpg_(idealGasHeatCapacity),
104  B_(secondVirialCoeff),
105  mu_(dynamicViscosity),
106  mug_(vapourDynamicViscosity),
107  kappa_(thermalConductivity),
108  kappag_(vapourThermalConductivity),
109  sigma_(surfaceTension),
110  D_(vapourDiffusivity)
111 {}
112 
113 
115 :
116  MB()
117 {
118  readIfPresent(*this, dict);
119 }
120 
121 
122 // * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
123 
124 void Foam::MB::write(Ostream& os) const
125 {
126  liquidProperties::write(*this, os);
127 }
128 
129 
130 // ************************************************************************* //
dictionary dict
A list of keyword definitions, which are a keyword followed by any number of values (e...
Definition: dictionary.H:158
void readIfPresent(const dictionary &dict)
Read and set the properties present it the given dictionary.
MB()
Construct null.
Definition: MB.C:40
Macros for easy insertion into run-time selection tables.
void write(Ostream &os) const
Write the function coefficients.
Definition: MB.C:124
The thermophysical properties of a liquid.
friend class liquidProperties
Definition: MB.H:81
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)
const doubleScalar e
Elementary charge.
Definition: doubleScalar.H:105
virtual void write(Ostream &os) const =0
Write the function coefficients.
Namespace for OpenFOAM.