C8H10.H
Go to the documentation of this file.
1 /*---------------------------------------------------------------------------*\
2  ========= |
3  \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
4  \\ / O peration |
5  \\ / A nd | www.openfoam.com
6  \\/ M anipulation |
7 -------------------------------------------------------------------------------
8  Copyright (C) 2011-2017 OpenFOAM Foundation
9 -------------------------------------------------------------------------------
10 License
11  This file is part of OpenFOAM.
12 
13  OpenFOAM is free software: you can redistribute it and/or modify it
14  under the terms of the GNU General Public License as published by
15  the Free Software Foundation, either version 3 of the License, or
16  (at your option) any later version.
17 
18  OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
19  ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
20  FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
21  for more details.
22 
23  You should have received a copy of the GNU General Public License
24  along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
25 
26 Class
27  Foam::C8H10
28 
29 Description
30  ethylBenzene
31 
32 SourceFiles
33  C8H10.C
34 
35 \*---------------------------------------------------------------------------*/
36 
37 #ifndef C8H10_H
38 #define C8H10_H
39 
40 #include "liquidProperties.H"
41 #include "NSRDSfunc0.H"
42 #include "NSRDSfunc1.H"
43 #include "NSRDSfunc2.H"
44 #include "NSRDSfunc3.H"
45 #include "NSRDSfunc4.H"
46 #include "NSRDSfunc5.H"
47 #include "NSRDSfunc6.H"
48 #include "NSRDSfunc7.H"
49 #include "APIdiffCoefFunc.H"
50 
51 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
52 
53 namespace Foam
54 {
55 
56 /*---------------------------------------------------------------------------*\
57  Class C8H10 Declaration
58 \*---------------------------------------------------------------------------*/
59 
60 class C8H10
61 :
62  public liquidProperties
63 {
64  // Private data
65 
66  NSRDSfunc5 rho_;
67  NSRDSfunc1 pv_;
68  NSRDSfunc6 hl_;
69  NSRDSfunc0 Cp_;
70  NSRDSfunc0 h_;
71  NSRDSfunc7 Cpg_;
72  NSRDSfunc4 B_;
73  NSRDSfunc1 mu_;
74  NSRDSfunc2 mug_;
75  NSRDSfunc0 kappa_;
76  NSRDSfunc2 kappag_;
77  NSRDSfunc6 sigma_;
78  APIdiffCoefFunc D_;
79 
80 
81 public:
82 
83  friend class liquidProperties;
84 
85  //- Runtime type information
86  TypeName("C8H10");
87 
88 
89  // Constructors
90 
91  //- Construct null
92  C8H10();
93 
94  // Construct from components
95  C8H10
96  (
97  const liquidProperties& l,
98  const NSRDSfunc5& density,
99  const NSRDSfunc1& vapourPressure,
100  const NSRDSfunc6& heatOfVapourisation,
101  const NSRDSfunc0& heatCapacity,
102  const NSRDSfunc0& enthalpy,
103  const NSRDSfunc7& idealGasHeatCapacity,
104  const NSRDSfunc4& secondVirialCoeff,
105  const NSRDSfunc1& dynamicViscosity,
106  const NSRDSfunc2& vapourDynamicViscosity,
107  const NSRDSfunc0& thermalConductivity,
108  const NSRDSfunc2& vapourThermalConductivity,
109  const NSRDSfunc6& surfaceTension,
110  const APIdiffCoefFunc& vapourDiffussivity
111  );
112 
113  //- Construct from dictionary
114  C8H10(const dictionary& dict);
115 
116  //- Construct and return clone
117  virtual autoPtr<liquidProperties> clone() const
118  {
120  }
121 
122 
123  // Member Functions
124 
125  //- Liquid density [kg/m^3]
126  inline scalar rho(scalar p, scalar T) const;
127 
128  //- Vapour pressure [Pa]
129  inline scalar pv(scalar p, scalar T) const;
130 
131  //- Heat of vapourisation [J/kg]
132  inline scalar hl(scalar p, scalar T) const;
133 
134  //- Liquid heat capacity [J/(kg K)]
135  inline scalar Cp(scalar p, scalar T) const;
136 
137  //- Liquid Enthalpy [J/(kg)]
138  inline scalar h(scalar p, scalar T) const;
139 
140  //- Ideal gas heat capacity [J/(kg K)]
141  inline scalar Cpg(scalar p, scalar T) const;
142 
143  //- Second Virial Coefficient [m^3/kg]
144  inline scalar B(scalar p, scalar T) const;
145 
146  //- Liquid viscosity [Pa s]
147  inline scalar mu(scalar p, scalar T) const;
148 
149  //- Vapour viscosity [Pa s]
150  inline scalar mug(scalar p, scalar T) const;
151 
152  //- Liquid thermal conductivity [W/(m K)]
153  inline scalar kappa(scalar p, scalar T) const;
154 
155  //- Vapour thermal conductivity [W/(m K)]
156  inline scalar kappag(scalar p, scalar T) const;
157 
158  //- Surface tension [N/m]
159  inline scalar sigma(scalar p, scalar T) const;
160 
161  //- Vapour diffusivity [m2/s]
162  inline scalar D(scalar p, scalar T) const;
163 
164  //- Vapour diffusivity [m2/s] with specified binary pair
165  inline scalar D(scalar p, scalar T, scalar Wb) const;
166 
167 
168  // I-O
169 
170  //- Write the function coefficients
171  void writeData(Ostream& os) const;
172 
173  //- Ostream Operator
174  friend Ostream& operator<<(Ostream& os, const C8H10& l);
175 };
176 
177 
178 Ostream& operator<<(Ostream& os, const C8H10& l);
179 
180 
181 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
182 
183 } // End namespace Foam
184 
185 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
186 
187 #include "C8H10I.H"
188 
189 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
190 
191 #endif
192 
193 // ************************************************************************* //
NSRDSfunc2.H
Foam::C8H10::h
scalar h(scalar p, scalar T) const
Liquid Enthalpy [J/(kg)].
Definition: C8H10I.H:52
p
volScalarField & p
Definition: createFieldRefs.H:8
Foam::C8H10::B
scalar B(scalar p, scalar T) const
Second Virial Coefficient [m^3/kg].
Definition: C8H10I.H:64
NSRDSfunc0.H
Foam::C8H10::mu
scalar mu(scalar p, scalar T) const
Liquid viscosity [Pa s].
Definition: C8H10I.H:70
NSRDSfunc3.H
Foam::C8H10::mug
scalar mug(scalar p, scalar T) const
Vapour viscosity [Pa s].
Definition: C8H10I.H:76
Foam::C8H10::rho
scalar rho(scalar p, scalar T) const
Liquid density [kg/m^3].
Definition: C8H10I.H:28
NSRDSfunc6.H
NSRDSfunc4.H
NSRDSfunc7.H
Foam::C8H10::clone
virtual autoPtr< liquidProperties > clone() const
Construct and return clone.
Definition: C8H10.H:116
Foam::C8H10::kappag
scalar kappag(scalar p, scalar T) const
Vapour thermal conductivity [W/(m K)].
Definition: C8H10I.H:88
NSRDSfunc5.H
Foam::NSRDSfunc0
NSRDS function number 100.
Definition: NSRDSfunc0.H:69
Foam::C8H10::Cp
scalar Cp(scalar p, scalar T) const
Liquid heat capacity [J/(kg K)].
Definition: C8H10I.H:46
Foam::C8H10::writeData
void writeData(Ostream &os) const
Write the function coefficients.
Definition: C8H10.C:142
Foam::C8H10::pv
scalar pv(scalar p, scalar T) const
Vapour pressure [Pa].
Definition: C8H10I.H:34
Foam::C8H10::operator<<
friend Ostream & operator<<(Ostream &os, const C8H10 &l)
Ostream Operator.
Foam::NSRDSfunc7
NSRDS-AICHE function number 107.
Definition: NSRDSfunc7.H:69
Foam::operator<<
Ostream & operator<<(Ostream &, const boundaryPatch &p)
Write boundaryPatch as dictionary entries (without surrounding braces)
Definition: boundaryPatch.C:83
Foam::NSRDSfunc4
NSRDS function number 104.
Definition: NSRDSfunc4.H:69
Foam::liquidProperties
The thermophysical properties of a liquid.
Definition: liquidProperties.H:51
Foam::C8H10::Cpg
scalar Cpg(scalar p, scalar T) const
Ideal gas heat capacity [J/(kg K)].
Definition: C8H10I.H:58
Foam::C8H10::hl
scalar hl(scalar p, scalar T) const
Heat of vapourisation [J/kg].
Definition: C8H10I.H:40
Foam::T
void T(FieldField< Field, Type > &f1, const FieldField< Field, Type > &f2)
Definition: FieldFieldFunctions.C:58
APIdiffCoefFunc.H
Foam::APIdiffCoefFunc
API function for vapour mass diffusivity.
Definition: APIdiffCoefFunc.H:53
C8H10I.H
dict
dictionary dict
Definition: searchingEngine.H:14
Foam::dictionary
A list of keyword definitions, which are a keyword followed by a number of values (eg,...
Definition: dictionary.H:123
os
OBJstream os(runTime.globalPath()/outputName)
Foam::NSRDSfunc1
NSRDS function number 101.
Definition: NSRDSfunc1.H:69
Foam
Namespace for OpenFOAM.
Definition: atmBoundaryLayer.C:33
Foam::C8H10::sigma
scalar sigma(scalar p, scalar T) const
Surface tension [N/m].
Definition: C8H10I.H:94
liquidProperties.H
Foam::autoPtr
Pointer management similar to std::unique_ptr, with some additional methods and type checking.
Definition: HashPtrTable.H:53
Foam::C8H10
ethylBenzene
Definition: C8H10.H:59
NSRDSfunc1.H
Foam::NSRDSfunc5
NSRDS function number 105.
Definition: NSRDSfunc5.H:69
Foam::NSRDSfunc2
NSRDS function number 102.
Definition: NSRDSfunc2.H:69
Foam::C8H10::C8H10
C8H10()
Construct null.
Definition: C8H10.C:42
Foam::Ostream
An Ostream is an abstract base class for all output systems (streams, files, token lists,...
Definition: Ostream.H:56
Foam::C8H10::kappa
scalar kappa(scalar p, scalar T) const
Liquid thermal conductivity [W/(m K)].
Definition: C8H10I.H:82
Foam::NSRDSfunc6
NSRDS function number 106.
Definition: NSRDSfunc6.H:69
Foam::C8H10::D
scalar D(scalar p, scalar T) const
Vapour diffusivity [m2/s].
Definition: C8H10I.H:100
Foam::C8H10::TypeName
TypeName("C8H10")
Runtime type information.