SomertonParams.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  Copyright (C) 2012-2013 by Andreas Lauser
5 
6  This file is part of the Open Porous Media project (OPM).
7 
8  OPM is free software: you can redistribute it and/or modify
9  it under the terms of the GNU General Public License as published by
10  the Free Software Foundation, either version 2 of the License, or
11  (at your option) any later version.
12 
13  OPM is distributed in the hope that it will be useful,
14  but WITHOUT ANY WARRANTY; without even the implied warranty of
15  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16  GNU General Public License for more details.
17 
18  You should have received a copy of the GNU General Public License
19  along with OPM. If not, see <http://www.gnu.org/licenses/>.
20 */
25 #ifndef OPM_SOMERTON_PARAMS_HPP
26 #define OPM_SOMERTON_PARAMS_HPP
27 
28 #include <cassert>
29 
30 namespace Opm {
31 
36 template <int numPhases, class ScalarT>
38 {
39  // do not copy!
41  {}
42 
43 public:
44  typedef ScalarT Scalar;
45 
47  { }
48 
56  Scalar fullySaturatedLambda(int phaseIdx) const
57  {
58  assert(0 <= phaseIdx && phaseIdx < numPhases);
59 
60  return fullySaturatedLambda_[phaseIdx];
61  }
62 
70  void setFullySaturatedLambda(int phaseIdx, Scalar value)
71  {
72  assert(0 <= phaseIdx && phaseIdx < numPhases);
73  assert(value > 0);
74 
75  fullySaturatedLambda_[phaseIdx] = value;
76  }
77 
82  Scalar vacuumLambda() const
83  {
84  return vacuumLambda_;
85  }
86 
94  void setVacuumLambda(Scalar value)
95  {
96  assert(value > 0);
97 
98  vacuumLambda_ = value;
99  }
100 
101 private:
102  Scalar fullySaturatedLambda_[numPhases];
103  Scalar vacuumLambda_;
104 };
105 
106 } // namespace Opm
107 
108 #endif
SomertonParams()
Definition: SomertonParams.hpp:46
Scalar fullySaturatedLambda(int phaseIdx) const
Return the "fully saturated" heat conductivity of the porous medium [W/m^2 / (K/m)].
Definition: SomertonParams.hpp:56
Definition: Air_Mesitylene.hpp:31
The default implementation of a parameter object for the Somerton heatconduction law.
Definition: SomertonParams.hpp:37
Scalar vacuumLambda() const
Return the heat conductivity of the porous medium at vacuum [W/m^2 / (K/m)].
Definition: SomertonParams.hpp:82
void setFullySaturatedLambda(int phaseIdx, Scalar value)
Set the "fully saturated" heat conductivity of the porous medium [W/m^2 / (K/m)]. ...
Definition: SomertonParams.hpp:70
ScalarT Scalar
Definition: SomertonParams.hpp:44
void setVacuumLambda(Scalar value)
Set the "fully saturated" heat conductivity of the porous medium [W/m^2 / (K/m)]. ...
Definition: SomertonParams.hpp:94