My Project
Dnapl.hpp
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  This file is part of the Open Porous Media project (OPM).
5 
6  OPM 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 2 of the License, or
9  (at your option) any later version.
10 
11  OPM 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 OPM. If not, see <http://www.gnu.org/licenses/>.
18 
19  Consult the COPYING file in the top-level source directory of this
20  module for the precise wording of the license and the list of
21  copyright holders.
22 */
27 #ifndef OPM_DNAPL_HPP
28 #define OPM_DNAPL_HPP
29 
30 #include "Component.hpp"
31 
34 
36 
37 namespace Opm {
48 template <class Scalar>
49 class DNAPL : public Component<Scalar, DNAPL<Scalar> >
50 {
51 public:
55  static const char* name()
56  { return "DNAPL"; }
57 
61  static bool gasIsIdeal()
62  { return true; }
63 
67  static bool gasIsCompressible()
68  { return true; }
69 
73  static bool liquidIsCompressible()
74  { return false; }
75 
79  static Scalar molarMass()
80  {
81  return 131.39e-3; // [kg/mol]
82  }
83 
90  template <class Evaluation>
91  static Evaluation vaporPressure(const Evaluation& /*T*/)
92  {
93  return 3900; // [Pa] (at 20C)
94  }
95 
102  template <class Evaluation>
103  static Evaluation gasDensity(const Evaluation& temperature, const Evaluation& pressure)
104  {
105  return IdealGas<Scalar>::density(Evaluation(molarMass()),
106  temperature,
107  pressure);
108  }
109 
116  template <class Evaluation>
117  static Evaluation liquidDensity(const Evaluation& /*temperature*/, const Evaluation& /*pressure*/)
118  {
119  return 1460.0; // [kg/m^3]
120  }
121 
128  template <class Evaluation>
129  static Evaluation liquidViscosity(const Evaluation& /*temperature*/, const Evaluation& /*pressure*/)
130  {
131  return 5.7e-4; // [Pa s]
132  }
133 
140  template <class Evaluation>
141  static Evaluation liquidEnthalpy(const Evaluation& temperature, const Evaluation& /*pressure*/)
142  {
143  return 120.0/molarMass() * temperature; // [J/kg]
144  }
145 
153  template <class Evaluation>
154  static Evaluation liquidHeatCapacity(const Evaluation&,
155  const Evaluation&)
156  {
157  return 120.0/molarMass();
158  }
159 
168  template <class Evaluation>
169  static Evaluation liquidThermalConductivity(const Evaluation& /*temperature*/, const Evaluation& /*pressure*/)
170  {
171  return 0.3;
172  }
173 };
174 
175 } // namespace Opm
176 
177 #endif
Abstract base class of a pure chemical species.
Relations valid for an ideal gas.
A traits class which provides basic mathematical functions for arbitrary scalar floating point values...
Provides the OPM_UNUSED macro.
Abstract base class of a pure chemical species.
Definition: Component.hpp:42
A simple implementation of a dense non-aqueous phase liquid (DNAPL).
Definition: Dnapl.hpp:50
static bool liquidIsCompressible()
Returns true iff the liquid phase is assumed to be compressible.
Definition: Dnapl.hpp:73
static Evaluation liquidEnthalpy(const Evaluation &temperature, const Evaluation &)
The enthalpy of pure TCE at a given pressure and temperature .
Definition: Dnapl.hpp:141
static Evaluation liquidViscosity(const Evaluation &, const Evaluation &)
The dynamic viscosity of pure TCE.
Definition: Dnapl.hpp:129
static Evaluation liquidDensity(const Evaluation &, const Evaluation &)
The density of pure TCE at a given pressure and temperature .
Definition: Dnapl.hpp:117
static Evaluation liquidHeatCapacity(const Evaluation &, const Evaluation &)
Specific isobaric heat capacity of pure liquid TCE.
Definition: Dnapl.hpp:154
static Evaluation liquidThermalConductivity(const Evaluation &, const Evaluation &)
Specific heat conductivity of liquid TCE .
Definition: Dnapl.hpp:169
static Evaluation gasDensity(const Evaluation &temperature, const Evaluation &pressure)
The density of steam at a given pressure and temperature .
Definition: Dnapl.hpp:103
static Scalar molarMass()
The molar mass in of TCE.
Definition: Dnapl.hpp:79
static Evaluation vaporPressure(const Evaluation &)
The vapor pressure in of pure TCE at a given temperature.
Definition: Dnapl.hpp:91
static bool gasIsIdeal()
Returns true iff the gas phase is assumed to be ideal.
Definition: Dnapl.hpp:61
static const char * name()
A human readable name for the TCE.
Definition: Dnapl.hpp:55
static bool gasIsCompressible()
Returns true iff the gas phase is assumed to be compressible.
Definition: Dnapl.hpp:67
static Evaluation density(const Evaluation &avgMolarMass, const Evaluation &temperature, const Evaluation &pressure)
The density of the gas in , depending on pressure, temperature and average molar mass of the gas.
Definition: IdealGas.hpp:48