C3H8.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 "C3H8.H"
28 
29 // * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * //
30 
31 namespace Foam
32 {
33  defineTypeNameAndDebug(C3H8, 0);
34  addToRunTimeSelectionTable(liquidProperties, C3H8,);
35  addToRunTimeSelectionTable(liquidProperties, C3H8, dictionary);
36 }
37 
38 // * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
39 
41 :
43  (
44  44.096,
45  369.83,
46  4.248e+6,
47  0.2, 0.276,
48  85.47,
49  1.685e-4,
50  231.11,
51  0.0,
52  0.1523,
53  1.31e+4
54  ),
55  rho_(60.6628672, 0.27453, 369.83, 0.29359),
56  pv_(59.078, -3492.6, -6.0669, 1.0919e-05, 2.0),
57  hl_(369.83, 662395.682148041, 0.78237, -0.77319, 0.39246, 0.0),
58  Cp_
59  (
60  369.83,
61  9.48470319647089,
62  2576.87772133527,
63  95.3560311677331,
64  -131.535634282099
65  ),
66  h_(0.0, 0.0, 0.0, 0.0, 0.0, 0.0),
67  Cpg_(1177.43105950653, 4364.34143686502, 1626.5, 2648.76632801161, 723.6),
68  B_
69  (
70  0.00255578737300435,
71  -2.24963715529753,
72  -102276.850507983,
73  7.00743831640058e+15,
74  -1.59878447024673e+18
75  ),
76  mu_(-6.9281, 420.76, -0.63276, -1.713e-26, 10.0),
77  mug_(2.4993e-07, 0.68612, 179.34, -8254.6),
78  kappa_(0.26755, -0.00066457, 2.774e-07, 0.0, 0.0, 0.0),
79  kappag_(-1.12, 0.10972, -9834.6, -7535800),
80  sigma_(369.83, 0.05092, 1.2197, 0.0, 0.0, 0.0),
81  D_(147.18, 20.1, 44.096, 28) // note: Same as nHeptane
82 {}
83 
84 
86 (
87  const liquidProperties& l,
88  const NSRDSfunc5& density,
89  const NSRDSfunc1& vapourPressure,
90  const NSRDSfunc6& heatOfVapourisation,
91  const NSRDSfunc14& heatCapacity,
92  const NSRDSfunc0& enthalpy,
93  const NSRDSfunc7& idealGasHeatCapacity,
94  const NSRDSfunc4& secondVirialCoeff,
95  const NSRDSfunc1& dynamicViscosity,
96  const NSRDSfunc2& vapourDynamicViscosity,
97  const NSRDSfunc0& thermalConductivity,
98  const NSRDSfunc2& vapourThermalConductivity,
99  const NSRDSfunc6& surfaceTension,
100  const APIdiffCoefFunc& vapourDiffussivity
101 )
102 :
103  liquidProperties(l),
104  rho_(density),
105  pv_(vapourPressure),
106  hl_(heatOfVapourisation),
107  Cp_(heatCapacity),
108  h_(enthalpy),
109  Cpg_(idealGasHeatCapacity),
110  B_(secondVirialCoeff),
111  mu_(dynamicViscosity),
112  mug_(vapourDynamicViscosity),
113  kappa_(thermalConductivity),
114  kappag_(vapourThermalConductivity),
115  sigma_(surfaceTension),
116  D_(vapourDiffussivity)
117 {}
118 
119 
121 :
122  C3H8()
123 {
124  readIfPresent(*this, dict);
125 }
126 
127 
128 // * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
129 
131 {
132  liquidProperties::writeData(*this, os);
133 }
134 
135 
136 // * * * * * * * * * * * * * * * Ostream Operator * * * * * * * * * * * * * //
137 
139 {
140  l.writeData(os);
141  return os;
142 }
143 
144 
145 // ************************************************************************* //
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
propane
Definition: C3H8.H:58
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.
C3H8()
Construct null.
Definition: C3H8.C:40
friend class liquidProperties
Definition: C3H8.H:81
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)
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.
NSRDS function number 101.
Definition: NSRDSfunc1.H:67
Namespace for OpenFOAM.
void writeData(Ostream &os) const
Write the function coefficients.
Definition: C3H8.C:130