FreeFOAM The Cross-Platform CFD Toolkit
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) 1991-2010 OpenCFD Ltd.
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 <liquids/liquid.H>
71 
72 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
73 
74 namespace Foam
75 {
76 
77 /*---------------------------------------------------------------------------*\
78  Class IDEA Declaration
79 \*---------------------------------------------------------------------------*/
80 
81 class IDEA
82 :
83  public liquid
84 {
85  // Private data
86 
87  NSRDSfunc5 rho_;
88  NSRDSfunc1 pv_;
89  NSRDSfunc6 hl_;
90  NSRDSfunc0 cp_;
91  NSRDSfunc0 h_;
92  NSRDSfunc7 cpg_;
93  NSRDSfunc4 B_;
94  NSRDSfunc1 mu_;
95  NSRDSfunc2 mug_;
96  NSRDSfunc0 K_;
97  NSRDSfunc2 Kg_;
98  NSRDSfunc6 sigma_;
99  APIdiffCoefFunc D_;
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 liquid& 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 
136  // Member Functions
137 
138  //- Liquid density [kg/m^3]
139  inline scalar rho(scalar p, scalar T) const;
140 
141  //- Vapour pressure [Pa]
142  inline scalar pv(scalar p, scalar T) const;
143 
144  //- Heat of vapourisation [J/kg]
145  inline scalar hl(scalar p, scalar T) const;
146 
147  //- Liquid heat capacity [J/(kg K)]
148  inline scalar cp(scalar p, scalar T) const;
149 
150  //- Liquid Enthalpy [J/(kg)]
151  inline scalar h(scalar p, scalar T) const;
152 
153  //- Ideal gas heat capacity [J/(kg K)]
154  inline scalar cpg(scalar p, scalar T) const;
155 
156  //- Second Virial Coefficient [m^3/kg]
157  inline scalar B(scalar p, scalar T) const;
158 
159  //- Liquid viscosity [Pa s]
160  inline scalar mu(scalar p, scalar T) const;
161 
162  //- Vapour viscosity [Pa s]
163  inline scalar mug(scalar p, scalar T) const;
164 
165  //- Liquid thermal conductivity [W/(m K)]
166  inline scalar K(scalar p, scalar T) const;
167 
168  //- Vapour thermal conductivity [W/(m K)]
169  inline scalar Kg(scalar p, scalar T) const;
170 
171  //- Surface tension [N/m]
172  inline scalar sigma(scalar p, scalar T) const;
173 
174  //- Vapour diffussivity [m2/s]
175  inline scalar D(scalar p, scalar T) const;
176 
177  //- Vapour diffussivity [m2/s] with specified binary pair
178  inline scalar D(scalar p, scalar T, scalar Wb) const;
179 
180 
181  // I-O
182 
183  //- Write the function coefficients
184  void writeData(Ostream& os) const
185  {
186  liquid::writeData(os); os << nl;
187  rho_.writeData(os); os << nl;
188  pv_.writeData(os); os << nl;
189  hl_.writeData(os); os << nl;
190  cp_.writeData(os); os << nl;
191  cpg_.writeData(os); os << nl;
192  mu_.writeData(os); os << nl;
193  mug_.writeData(os); os << nl;
194  K_.writeData(os); os << nl;
195  Kg_.writeData(os); os << nl;
196  sigma_.writeData(os); os << nl;
197  D_.writeData(os); os << endl;
198  }
199 
200  //- Ostream Operator
201  friend Ostream& operator<<(Ostream& os, const IDEA& l)
202  {
203  l.writeData(os);
204  return os;
205  }
206 };
207 
208 
209 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
210 
211 } // End namespace Foam
212 
213 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
214 
215 #include "IDEAI.H"
216 
217 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
218 
219 #endif
220 
221 // ************************ vim: set sw=4 sts=4 et: ************************ //