3.2-git
DUNE for Multi-{Phase, Component, Scale, Physics, ...} flow and transport in porous media
heavyoil.hh
Go to the documentation of this file.
1// -*- mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*-
2// vi: set et ts=4 sw=4 sts=4:
3/*****************************************************************************
4 * See the file COPYING for full copying permissions. *
5 * *
6 * This program is free software: you can redistribute it and/or modify *
7 * it under the terms of the GNU General Public License as published by *
8 * the Free Software Foundation, either version 3 of the License, or *
9 * (at your option) any later version. *
10 * *
11 * This program is distributed in the hope that it will be useful, *
12 * but WITHOUT ANY WARRANTY; without even the implied warranty of *
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
14 * GNU General Public License for more details. *
15 * *
16 * You should have received a copy of the GNU General Public License *
17 * along with this program. If not, see <http://www.gnu.org/licenses/>. *
18 *****************************************************************************/
24#ifndef DUMUX_HEAVYOIL_HH
25#define DUMUX_HEAVYOIL_HH
26
29
33
34namespace Dumux {
35namespace Components {
36
43template <class Scalar>
45: public Components::Base<Scalar, HeavyOil<Scalar> >
46, public Components::Liquid<Scalar, HeavyOil<Scalar> >
47, public Components::Gas<Scalar, HeavyOil<Scalar> >
48{
51public:
55 static std::string name()
56 { return "heavyoil"; }
57
61 constexpr static Scalar molarMass()
62 { return .350; }
63
68 { return .400; }
69
74 constexpr static Scalar molecularWeight()
75 { return .350; }
76
80 constexpr static Scalar specificGravity()
81 { return 0.91; }
82
87 {
88 DUNE_THROW(Dune::NotImplemented, "tripleTemperature for heavyoil");
89 }
90
95 {
96 DUNE_THROW(Dune::NotImplemented, "triplePressure for heavyoil");
97 }
98
100 {
101 const Scalar A = 0.83;
102 const Scalar B = 89.9513;
103 const Scalar C = 139.6612;
104 const Scalar D = 3.2033;
105 const Scalar E = 1.0564;
106
107 const Scalar mW = refComponentMolecularWeight() *1000. ; // in [g/mol];
108
109 using std::pow;
110 return A+(B/mW)-(C/pow((mW+D),E));
111 }
112
114 {
115 const Scalar A = -7.4120e-2; //All factors for 1 atm / 101325 pascals [760 mmHg]
116 const Scalar B = -7.5041e-3;
117 const Scalar C = -2.6031;
118 const Scalar D = 9.0180e-2;
119 const Scalar E = -1.0482;
120
121 using std::log;
122 Scalar deltaSpecificGravity = log(refComponentSpecificGravity()/specificGravity());
123 Scalar deltaMolecularWeight = log(refComponentMolecularWeight()/molecularWeight());
124
125 using std::pow;
126 return A*pow(deltaSpecificGravity,2) + B*deltaSpecificGravity + C*pow(deltaMolecularWeight,2) + D*deltaMolecularWeight
127 + E*deltaSpecificGravity*deltaMolecularWeight;
128 }
129
131 {
132 const Scalar A = -6.1294e-2;
133 const Scalar B = -7.0862e-2;
134 const Scalar C = 6.1976e-1;
135 const Scalar D = -5.7090e-2;
136 const Scalar E = -8.4583e-2;
137
138 using std::log;
139 Scalar deltaSpecificGravity = log(refComponentSpecificGravity()/specificGravity());
140 Scalar deltaMolecularWeight = log(refComponentMolecularWeight()/molecularWeight());
141
142 using std::pow;
143 return A*pow(deltaSpecificGravity,2) + B*deltaSpecificGravity + C*pow(deltaMolecularWeight,2) + D*deltaMolecularWeight
144 + E*deltaSpecificGravity*deltaMolecularWeight;
145 }
146
148 {
149 const Scalar A = 1.8270e-1;
150 const Scalar B = -2.4864e-1;
151 const Scalar C = 8.3611;
152 const Scalar D = -2.2389e-1;
153 const Scalar E = 2.6984;
154
155 using std::log;
156 Scalar deltaSpecificGravity = log(refComponentSpecificGravity()/specificGravity());
157 Scalar deltaMolecularWeight = log(refComponentMolecularWeight()/molecularWeight());
158
159 using std::pow;
160 return A*pow(deltaSpecificGravity,2) + B*deltaSpecificGravity + C*pow(deltaMolecularWeight,2) + D*deltaMolecularWeight
161 + E*deltaSpecificGravity*deltaMolecularWeight;
162 }
163
165 {
166 const Scalar A = 477.63; //All factors for 1 atm / 101325 pascals [760 mmHg]
167 const Scalar B = 88.51;
168 const Scalar C = 1007;
169 const Scalar D = 1214.40;
170
171 using std::log;
172 return A*log((1000.*refComponentMolecularWeight() + B)/(1000.*refComponentMolecularWeight()+C)) + D;
173 }
174
176 {
177 const Scalar A = 226.50;
178 const Scalar B = 6.78;
179 const Scalar C = 1.282e6;
180 const Scalar D = 2668;
181
182 using std::log;
183 return A*log((1000.*refComponentMolecularWeight() + B)/(1000.*refComponentMolecularWeight()+C)) + D ;
184 }
185
187 {
188 const Scalar A = 141.20;
189 const Scalar B = 45.66e-2;
190 const Scalar C = 16.59e-3;
191 const Scalar D = 2.19;
192
193 using std::pow;
194 return (A*1000.*molecularWeight())/(pow(B + (C*1000.*molecularWeight()),D)) ;
195 }
196
201 {
202 using std::pow;
204 }
205
210 {
211 using std::pow;
213 }
214
219 {
220 using std::pow;
222 }
223
230 {
231 const Scalar A = 8.25990;
232 const Scalar B = 2830.065;
233 const Scalar C = 42.95101;
234
235 Scalar T = temperature - 273.15;
236
237 using std::pow;
238 return 100*1.334*pow(10.0, (A - (B/(T + C)))); // in [Pa]
239 }
240
242 {
243 const Scalar A = 8.25990;
244 const Scalar B = 2830.065;
245 const Scalar C = 42.95101;
246
247 const Scalar P = pressure;
248
249 using std::log10;
250 return Scalar ((B/(A-log10(P/100*1.334)))-C);
251 }
252
260 const Scalar pressure)
261 {
262 // Gauss quadrature rule:
263 // Interval: [0K; temperature (K)]
264 // Gauss-Legendre-Integration with variable transformation:
265 // \int_a^b f(T) dT \approx (b-a)/2 \sum_i=1^n \alpha_i f( (b-a)/2 x_i + (a+b)/2 )
266 // with: n=2, legendre -> x_i = +/- \sqrt(1/3), \apha_i=1
267 // here: a=273.15K, b=actual temperature in Kelvin
268 // \leadsto h(T) = \int_273.15^T c_p(T) dT
269 // \approx 0.5 (T-273.15) * (cp( 0.5(temperature-273.15)sqrt(1/3) ) + cp(0.5(temperature-273.15)(-1)sqrt(1/3))
270
271 // Enthalpy may have arbitrary reference state, but the empirical/fitted heatCapacity function needs Kelvin as input and is
272 // fit over a certain temperature range. This suggests choosing an interval of integration being in the actual fit range.
273 // I.e. choosing T=273.15K as reference point for liquid enthalpy.
274 using std::sqrt;
275 const Scalar sqrt1over3 = sqrt(1./3.);
276 const Scalar TEval1 = 0.5*(temperature-273.15)* sqrt1over3 + 0.5*(273.15+temperature) ; // evaluation points according to Gauss-Legendre integration
277 const Scalar TEval2 = 0.5*(temperature-273.15)* (-1)* sqrt1over3 + 0.5*(273.15+temperature) ; // evaluation points according to Gauss-Legendre integration
278
279 const Scalar h_n = 0.5 * (temperature-273.15) * ( liquidHeatCapacity(TEval1, pressure) + liquidHeatCapacity(TEval2, pressure) ) ;
280
281 return h_n;
282 }
283
293 const Scalar pressure)
294 {
295 using std::min;
296 using std::max;
297 temperature = min(temperature, criticalTemperature()); // regularization
298 temperature = max(temperature, 0.0); // regularization
299
300 Scalar T_crit = criticalTemperature();
302 Scalar p_crit = criticalPressure();
303
304 // Chen method, eq. 7-11.4 (at boiling)
305 using std::log;
306 const Scalar DH_v_boil = Consts::R * T_crit * Tr1
307 * (3.978 * Tr1 - 3.958 + 1.555*log(p_crit * 1e-5 /*Pa->bar*/ ) )
308 / (1.07 - Tr1); /* [J/mol] */
309
310 /* Variation with temp according to Watson relation eq 7-12.1*/
311 using std::pow;
313 const Scalar n = 0.375;
314 const Scalar DH_vap = DH_v_boil * pow(((1.0 - Tr2)/(1.0 - Tr1)), n);
315
316 return (DH_vap/molarMass()); // we need [J/kg]
317 }
318
319
330 {
332 }
333
341 {
343 }
344
353
361 {
362
363 /* according to Lashanizadegan et al (2008) in Chemical Engineering Communications: */
364 /* Simultaneous Heat and Fluid Flow in Porous Media: Case Study: Steam Injection for Tertiary Oil Recovery */
365 Scalar rhoReference = 906.; // [kg/m^3] at reference pressure and temperature
366 Scalar compressCoeff = 1.e-8; // just a value without justification
367 Scalar expansCoeff = 1.e-7; // also just a value
368 Scalar rho = rhoReference * (1. + (pressure - 1.e5)*compressCoeff) * (1. - (temperature - 293.)*expansCoeff);
369
370 return rho; // [kg/m^3]
371 }
372
382
386 static constexpr bool gasIsCompressible()
387 { return true; }
388
392 static constexpr bool gasIsIdeal()
393 { return true; }
394
398 static constexpr bool liquidIsCompressible()
399 { return true; }
400
408 static Scalar gasViscosity(Scalar temperature, Scalar pressure, bool regularize=true)
409 {
410 using std::min;
411 using std::max;
412 temperature = min(temperature, 500.0); // regularization
413 temperature = max(temperature, 250.0);
414
415 // reduced temperature
417
418 using std::pow;
419 using std::exp;
420 Scalar Fp0 = 1.0;
421 Scalar xi = 0.00474;
422 Scalar eta_xi =
423 Fp0*(0.807*pow(Tr,0.618)
424 - 0.357*exp(-0.449*Tr)
425 + 0.34*exp(-4.058*Tr)
426 + 0.018);
427
428 return eta_xi/xi/1e7; // [Pa s]
429 }
430
440 {
441
442 /* according to Lashanizadegan et al (2008) in Chemical Engineering Communications: */
443 /* Simultaneous Heat and Fluid Flow in Porous Media: Case Study: Steam Injection for Tertiary Oil Recovery */
444
445 //using std::exp;
446 //return 1027919.422*exp(-0.04862*temperature); // [Pa s]
447
448 //according to http://www.ecltechnology.com/subsur/reports/pvt_tgb.pdf [Page 10]
449 Scalar temperatureFahrenheit = (9/5)*(temperature-273.15)+32;
450 Scalar API = 9;
451
452 using std::pow;
453 return ((pow(10,0.10231*pow(API,2)-3.9464*API+46.5037))*(pow(temperatureFahrenheit,-0.04542*pow(API,2)+1.70405*API-19.18)))*0.001;
454
455 }
466 const Scalar pressure)
467 {
468 return 618.; // J/(kg K)
469 }
470
480 {
481 return 0.127;
482 }
483};
484
485} // end namespace Components
486
487} // end namespace Dumux
488
489#endif
Interface for components that have a gas state.
Interface for components that have a liquid state.
A central place for various physical constants occuring in some equations.
Relations valid for an ideal gas.
Definition: adapt.hh:29
std::string temperature() noexcept
I/O name of temperature for equilibrium models.
Definition: name.hh:51
std::string pressure(int phaseIdx) noexcept
I/O name of pressure for multiphase systems.
Definition: name.hh:34
Base class for all components Components provide the thermodynamic relations for the liquid,...
Definition: components/base.hh:59
Scalar Scalar
export the scalar type used by the component
Definition: components/base.hh:63
Interface for components that have a gas state.
Definition: gas.hh:41
Properties of the component heavyoil.
Definition: heavyoil.hh:48
static Scalar liquidViscosity(Scalar temperature, Scalar pressure)
The dynamic viscosity of pure heavyoil.
Definition: heavyoil.hh:439
static constexpr Scalar molarMass()
The molar mass in of heavyoil.
Definition: heavyoil.hh:61
static Scalar vaporPressure(Scalar temperature)
The saturation vapor pressure in of.
Definition: heavyoil.hh:229
static constexpr Scalar refComponentMolecularWeight()
The MolecularWeight in of refComponent.
Definition: heavyoil.hh:67
static Scalar perbutationFactorCriticalTemperature()
Definition: heavyoil.hh:130
static Scalar liquidHeatCapacity(const Scalar temperature, const Scalar pressure)
Specific heat cap of liquid heavyoil .
Definition: heavyoil.hh:465
static constexpr Scalar molecularWeight()
The molar mass in of heavyoil.
Definition: heavyoil.hh:74
static Scalar refComponentCriticalPressure()
Definition: heavyoil.hh:186
static constexpr bool gasIsIdeal()
Returns true if the gas phase is assumed to be ideal.
Definition: heavyoil.hh:392
static Scalar liquidMolarDensity(Scalar temperature, Scalar pressure)
The molar density of pure heavyoil in at a given pressure and temperature.
Definition: heavyoil.hh:380
static Scalar perbutationFactorBoilingTemperature()
Definition: heavyoil.hh:113
static Scalar tripleTemperature()
Returns the temperature at heavyoil's triple point.
Definition: heavyoil.hh:86
static Scalar criticalPressure()
Returns the critical pressure of heavyoil.
Definition: heavyoil.hh:218
static Scalar gasMolarDensity(Scalar temperature, Scalar pressure)
The molar density of pure heavyoil in , depending on pressure and temperature.
Definition: heavyoil.hh:351
static Scalar vaporTemperature(Scalar pressure)
Definition: heavyoil.hh:241
static constexpr bool gasIsCompressible()
Returns true if the gas phase is assumed to be compressible.
Definition: heavyoil.hh:386
static Scalar liquidThermalConductivity(Scalar temperature, Scalar pressure)
Thermal conductivity of heavy oil.
Definition: heavyoil.hh:479
static constexpr Scalar specificGravity()
The Specific Gravity of heavyoil.
Definition: heavyoil.hh:80
static Scalar gasViscosity(Scalar temperature, Scalar pressure, bool regularize=true)
The dynamic viscosity of heavyoil vapor.
Definition: heavyoil.hh:408
static Scalar criticalTemperature()
Returns the critical temperature of heavyoil.
Definition: heavyoil.hh:209
static Scalar gasDensity(Scalar temperature, Scalar pressure)
The (ideal) gas density of heavyoil vapor at a given temperature and pressure .
Definition: heavyoil.hh:340
static Scalar triplePressure()
Returns the pressure at heavyoil's triple point.
Definition: heavyoil.hh:94
static Scalar refComponentCriticalTemperature()
Definition: heavyoil.hh:175
static constexpr bool liquidIsCompressible()
Returns true if the liquid phase is assumed to be compressible.
Definition: heavyoil.hh:398
static Scalar liquidEnthalpy(const Scalar temperature, const Scalar pressure)
Specific enthalpy of liquid heavyoil .
Definition: heavyoil.hh:259
static Scalar refComponentBoilingTemperature()
Definition: heavyoil.hh:164
static std::string name()
A human readable name for heavyoil.
Definition: heavyoil.hh:55
static Scalar perbutationFactorCriticalPressure()
Definition: heavyoil.hh:147
static Scalar refComponentSpecificGravity()
Definition: heavyoil.hh:99
static Scalar heatVap(Scalar temperature, const Scalar pressure)
Latent heat of vaporization for heavyoil .
Definition: heavyoil.hh:292
static Scalar boilingTemperature()
Returns the temperature at heavyoil's boiling point (1 atm)
Definition: heavyoil.hh:200
static Scalar gasEnthalpy(Scalar temperature, Scalar pressure)
Specific enthalpy of heavyoil vapor .
Definition: heavyoil.hh:329
static Scalar liquidDensity(Scalar temperature, Scalar pressure)
The density of pure heavyoil at a given pressure and temperature .
Definition: heavyoil.hh:360
Interface for components that have a liquid state.
Definition: liquid.hh:41
A central place for various physical constants occuring in some equations.
Definition: constants.hh:39
static constexpr Scalar R
The ideal gas constant .
Definition: constants.hh:44
Relations valid for an ideal gas.
Definition: idealgas.hh:37
static constexpr Scalar density(Scalar avgMolarMass, Scalar temperature, Scalar pressure)
The density of the gas in , depending on pressure, temperature and average molar mass of the gas.
Definition: idealgas.hh:49
static constexpr Scalar molarDensity(Scalar temperature, Scalar pressure)
The molar density of the gas , depending on pressure and temperature.
Definition: idealgas.hh:70
Base class for all components Components provide the thermodynamic relations for the liquid,...