IDEA.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 | Copyright (C) 2011 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 Class
25  Foam::IDEA
26 
27 Description
28  The IDEA fuel is constructed by adding 30% alphaMethylNaphthalene
29  with 70% n-decane.
30 
31  The new properties have been calculated by adding the values in these
32  proportions and making a least square fit, using the same NSRDS-eq.
33  so that Y = 0.3*Y_naphthalene + 0.7*Y_decane
34 
35  The valid Temperature range for n-decane is normally 243.51 - 617.70 K
36  and for the naphthalene it is 242.67 - 772.04 K
37  The least square fit was done in the interval 244 - 617 K
38 
39  The critical temperature was taken to be 618.074 K, since this
40  is the 'c'-value in the rho-equation, which corresponds to Tcrit,
41  This value was then used in the fit for the NSRDS6-eq, which uses Tcrit.
42  (important for the latent heat and surface tension)
43 
44  The molecular weights are 142.20 and 142.285 and for the IDEA fuel
45  it is thus 142.26 ( approximately 0.3*142.2 + 0.7*142.285 )
46 
47  Critical pressure was set to the lowest one (n-Decane)
48 
49  Critical volume... also the lowest one (naphthalene) 0.523 m^3/kmol
50 
51  Second Virial Coefficient is n-Decane
52 
53 SourceFiles
54  IDEA.C
55 
56 \*---------------------------------------------------------------------------*/
57 
58 #ifndef IDEA_H
59 #define IDEA_H
60 
61 #include "liquidProperties.H"
62 #include "NSRDSfunc0.H"
63 #include "NSRDSfunc1.H"
64 #include "NSRDSfunc2.H"
65 #include "NSRDSfunc3.H"
66 #include "NSRDSfunc4.H"
67 #include "NSRDSfunc5.H"
68 #include "NSRDSfunc6.H"
69 #include "NSRDSfunc7.H"
70 #include "APIdiffCoefFunc.H"
71 
72 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
73 
74 namespace Foam
75 {
76 
77 /*---------------------------------------------------------------------------*\
78  Class IDEA Declaration
79 \*---------------------------------------------------------------------------*/
80 
81 class IDEA
82 :
83  public liquidProperties
84 {
85  // Private data
86 
100 
101 
102 public:
103 
104  //- Runtime type information
105  TypeName("IDEA");
106 
107 
108  // Constructors
109 
110  //- Construct null
111  IDEA();
112 
113  // Construct from components
114  IDEA
115  (
116  const liquidProperties& l,
117  const NSRDSfunc5& density,
118  const NSRDSfunc1& vapourPressure,
119  const NSRDSfunc6& heatOfVapourisation,
120  const NSRDSfunc0& heatCapacity,
121  const NSRDSfunc0& enthalpy,
122  const NSRDSfunc7& idealGasHeatCapacity,
123  const NSRDSfunc4& secondVirialCoeff,
124  const NSRDSfunc1& dynamicViscosity,
125  const NSRDSfunc2& vapourDynamicViscosity,
126  const NSRDSfunc0& thermalConductivity,
127  const NSRDSfunc2& vapourThermalConductivity,
128  const NSRDSfunc6& surfaceTension,
129  const APIdiffCoefFunc& vapourDiffussivity
130  );
131 
132  //- Construct from Istream
133  IDEA(Istream& is);
134 
135  //- Construct from dictionary
136  IDEA(const dictionary& dict);
137 
138  //- Construct copy
139  IDEA(const IDEA& liq);
140 
141  //- Construct and return clone
142  virtual autoPtr<liquidProperties> clone() const
143  {
144  return autoPtr<liquidProperties>(new IDEA(*this));
145  }
146 
147 
148  // Member Functions
149 
150  //- Liquid density [kg/m^3]
151  inline scalar rho(scalar p, scalar T) const;
152 
153  //- Vapour pressure [Pa]
154  inline scalar pv(scalar p, scalar T) const;
155 
156  //- Heat of vapourisation [J/kg]
157  inline scalar hl(scalar p, scalar T) const;
158 
159  //- Liquid heat capacity [J/(kg K)]
160  inline scalar Cp(scalar p, scalar T) const;
161 
162  //- Liquid Enthalpy [J/(kg)]
163  inline scalar h(scalar p, scalar T) const;
164 
165  //- Ideal gas heat capacity [J/(kg K)]
166  inline scalar Cpg(scalar p, scalar T) const;
167 
168  //- Second Virial Coefficient [m^3/kg]
169  inline scalar B(scalar p, scalar T) const;
170 
171  //- Liquid viscosity [Pa s]
172  inline scalar mu(scalar p, scalar T) const;
173 
174  //- Vapour viscosity [Pa s]
175  inline scalar mug(scalar p, scalar T) const;
176 
177  //- Liquid thermal conductivity [W/(m K)]
178  inline scalar K(scalar p, scalar T) const;
179 
180  //- Vapour thermal conductivity [W/(m K)]
181  inline scalar Kg(scalar p, scalar T) const;
182 
183  //- Surface tension [N/m]
184  inline scalar sigma(scalar p, scalar T) const;
185 
186  //- Vapour diffussivity [m2/s]
187  inline scalar D(scalar p, scalar T) const;
188 
189  //- Vapour diffussivity [m2/s] with specified binary pair
190  inline scalar D(scalar p, scalar T, scalar Wb) const;
191 
192 
193  // I-O
194 
195  //- Write the function coefficients
196  void writeData(Ostream& os) const
197  {
198  liquidProperties::writeData(os); os << nl;
199  rho_.writeData(os); os << nl;
200  pv_.writeData(os); os << nl;
201  hl_.writeData(os); os << nl;
202  Cp_.writeData(os); os << nl;
203  h_.writeData(os); os << nl;
204  Cpg_.writeData(os); os << nl;
205  mu_.writeData(os); os << nl;
206  mug_.writeData(os); os << nl;
207  K_.writeData(os); os << nl;
208  Kg_.writeData(os); os << nl;
209  sigma_.writeData(os); os << nl;
210  D_.writeData(os); os << endl;
211  }
212 
213  //- Ostream Operator
214  friend Ostream& operator<<(Ostream& os, const IDEA& l)
215  {
216  l.writeData(os);
217  return os;
218  }
219 };
220 
221 
222 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
223 
224 } // End namespace Foam
225 
226 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
227 
228 #include "IDEAI.H"
229 
230 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
231 
232 #endif
233 
234 // ************************************************************************* //
Foam::IDEA::TypeName
TypeName("IDEA")
Runtime type information.
NSRDSfunc2.H
IDEAI.H
Foam::NSRDSfunc0::writeData
void writeData(Ostream &os) const
Write the function coefficients.
Definition: NSRDSfunc0.H:112
NSRDSfunc0.H
Foam::IDEA::Cp
scalar Cp(scalar p, scalar T) const
Liquid heat capacity [J/(kg K)].
Definition: IDEAI.H:44
p
p
Definition: pEqn.H:62
NSRDSfunc3.H
NSRDSfunc6.H
Foam::IDEA::rho_
NSRDSfunc5 rho_
Definition: IDEA.H:86
Foam::IDEA::IDEA
IDEA()
Construct null.
Definition: IDEA.C:41
Foam::IDEA::sigma_
NSRDSfunc6 sigma_
Definition: IDEA.H:97
NSRDSfunc4.H
Foam::IDEA::Kg_
NSRDSfunc2 Kg_
Definition: IDEA.H:96
NSRDSfunc7.H
Foam::IDEA::h
scalar h(scalar p, scalar T) const
Liquid Enthalpy [J/(kg)].
Definition: IDEAI.H:50
Foam::IDEA::Cpg
scalar Cpg(scalar p, scalar T) const
Ideal gas heat capacity [J/(kg K)].
Definition: IDEAI.H:56
Foam::IDEA::hl
scalar hl(scalar p, scalar T) const
Heat of vapourisation [J/kg].
Definition: IDEAI.H:38
NSRDSfunc5.H
Foam::NSRDSfunc0
NSRDS function number 100.
Definition: NSRDSfunc0.H:67
Foam::endl
Ostream & endl(Ostream &os)
Add newline and flush stream.
Definition: Ostream.H:251
Foam::liquidProperties::writeData
virtual void writeData(Ostream &os) const
Write the function coefficients.
Definition: liquidProperties.C:357
Foam::IDEA::operator<<
friend Ostream & operator<<(Ostream &os, const IDEA &l)
Ostream Operator.
Definition: IDEA.H:213
Foam::NSRDSfunc7
NSRDS-AICHE function number 107.
Definition: NSRDSfunc7.H:67
Foam::IDEA::Cpg_
NSRDSfunc7 Cpg_
Definition: IDEA.H:91
Foam::IDEA::B_
NSRDSfunc4 B_
Definition: IDEA.H:92
Foam::NSRDSfunc4
NSRDS function number 104.
Definition: NSRDSfunc4.H:67
Foam::liquidProperties
The thermophysical properties of a liquidProperties.
Definition: liquidProperties.H:53
Foam::IDEA::D_
APIdiffCoefFunc D_
Definition: IDEA.H:98
Foam::Istream
An Istream is an abstract base class for all input systems (streams, files, token lists etc)....
Definition: Istream.H:57
Foam::IDEA::mu_
NSRDSfunc1 mu_
Definition: IDEA.H:93
Foam::IDEA
The IDEA fuel is constructed by adding 30% alphaMethylNaphthalene with 70% n-decane.
Definition: IDEA.H:80
Foam::nl
static const char nl
Definition: Ostream.H:260
Foam::IDEA::hl_
NSRDSfunc6 hl_
Definition: IDEA.H:88
Foam::T
void T(FieldField< Field, Type > &f1, const FieldField< Field, Type > &f2)
Definition: FieldFieldFunctions.C:55
Foam::IDEA::K_
NSRDSfunc0 K_
Definition: IDEA.H:95
Foam::IDEA::B
scalar B(scalar p, scalar T) const
Second Virial Coefficient [m^3/kg].
Definition: IDEAI.H:62
APIdiffCoefFunc.H
Foam::IDEA::pv
scalar pv(scalar p, scalar T) const
Vapour pressure [Pa].
Definition: IDEAI.H:32
Foam::APIdiffCoefFunc
API function for vapour mass diffusivity.
Definition: APIdiffCoefFunc.H:51
Foam::IDEA::Cp_
NSRDSfunc0 Cp_
Definition: IDEA.H:89
Foam::NSRDSfunc1::writeData
void writeData(Ostream &os) const
Write the function coefficients.
Definition: NSRDSfunc1.H:111
dict
dictionary dict
Definition: searchingEngine.H:14
Foam::dictionary
A list of keyword definitions, which are a keyword followed by any number of values (e....
Definition: dictionary.H:137
Foam::NSRDSfunc1
NSRDS function number 101.
Definition: NSRDSfunc1.H:67
Foam::APIdiffCoefFunc::writeData
void writeData(Ostream &os) const
Write the function coefficients.
Definition: APIdiffCoefFunc.H:106
Foam
Namespace for OpenFOAM.
Definition: combustionModel.C:30
liquidProperties.H
Foam::IDEA::clone
virtual autoPtr< liquidProperties > clone() const
Construct and return clone.
Definition: IDEA.H:141
Foam::IDEA::h_
NSRDSfunc0 h_
Definition: IDEA.H:90
Foam::autoPtr
An auto-pointer similar to the STL auto_ptr but with automatic casting to a reference to the type and...
Definition: PtrList.H:117
NSRDSfunc1.H
Foam::NSRDSfunc5
NSRDS function number 105.
Definition: NSRDSfunc5.H:67
Foam::NSRDSfunc7::writeData
void writeData(Ostream &os) const
Write the function coefficients.
Definition: NSRDSfunc7.H:111
Foam::IDEA::writeData
void writeData(Ostream &os) const
Write the function coefficients.
Definition: IDEA.H:195
Foam::NSRDSfunc6::writeData
void writeData(Ostream &os) const
Write the function coefficients.
Definition: NSRDSfunc6.H:113
Foam::IDEA::K
scalar K(scalar p, scalar T) const
Liquid thermal conductivity [W/(m K)].
Definition: IDEAI.H:80
Foam::NSRDSfunc2
NSRDS function number 102.
Definition: NSRDSfunc2.H:67
Foam::IDEA::Kg
scalar Kg(scalar p, scalar T) const
Vapour thermal conductivity [W/(m K)].
Definition: IDEAI.H:86
Foam::IDEA::pv_
NSRDSfunc1 pv_
Definition: IDEA.H:87
Foam::IDEA::mug_
NSRDSfunc2 mug_
Definition: IDEA.H:94
Foam::IDEA::D
scalar D(scalar p, scalar T) const
Vapour diffussivity [m2/s].
Definition: IDEAI.H:98
Foam::IDEA::mug
scalar mug(scalar p, scalar T) const
Vapour viscosity [Pa s].
Definition: IDEAI.H:74
Foam::IDEA::sigma
scalar sigma(scalar p, scalar T) const
Surface tension [N/m].
Definition: IDEAI.H:92
Foam::IDEA::rho
scalar rho(scalar p, scalar T) const
Liquid density [kg/m^3].
Definition: IDEAI.H:26
Foam::Ostream
An Ostream is an abstract base class for all output systems (streams, files, token lists,...
Definition: Ostream.H:53
Foam::NSRDSfunc2::writeData
void writeData(Ostream &os) const
Write the function coefficients.
Definition: NSRDSfunc2.H:110
Foam::IDEA::mu
scalar mu(scalar p, scalar T) const
Liquid viscosity [Pa s].
Definition: IDEAI.H:68
Foam::NSRDSfunc5::writeData
void writeData(Ostream &os) const
Write the function coefficients.
Definition: NSRDSfunc5.H:110
Foam::NSRDSfunc6
NSRDS function number 106.
Definition: NSRDSfunc6.H:67