opm-common
EclThermalLawManager.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_ECL_THERMAL_LAW_MANAGER_HPP
28 #define OPM_ECL_THERMAL_LAW_MANAGER_HPP
29 
32 
35 
36 #include <functional>
37 #include <vector>
38 
39 namespace Opm {
40 
41 class EclipseState;
42 class FieldPropsManager;
43 
50 template <class Scalar, class FluidSystem>
52 {
53 public:
55  using SolidEnergyLawParams = typename SolidEnergyLaw::Params;
56  using HeatcrLawParams = typename SolidEnergyLawParams::HeatcrLawParams;
57  using SpecrockLawParams = typename SolidEnergyLawParams::SpecrockLawParams;
58 
60  using ThermalConductionLawParams = typename ThermalConductionLaw::Params;
61 
62  void initParamsForElements(const EclipseState& eclState, size_t numElems,
63  const std::function<std::vector<double>(const FieldPropsManager&, const std::string&)>&
64  fieldPropDoubleOnLeafAssigner,
65  const std::function<std::vector<unsigned int>(const FieldPropsManager&, const std::string&,
66  bool)>& fieldPropIntOnLeafAssigner);
67 
68  const SolidEnergyLawParams& solidEnergyLawParams(unsigned elemIdx) const;
69 
70  const ThermalConductionLawParams& thermalConductionLawParams(unsigned elemIdx) const;
71 
72 private:
76  void initHeatcr_(const EclipseState& eclState, size_t numElems,
77  const std::function<std::vector<double>(const FieldPropsManager&, const std::string&)>&
78  fieldPropDoubleOnLeafAssigner);
79 
83  void initSpecrock_(const EclipseState& eclState,
84  const std::function<std::vector<unsigned int>(const FieldPropsManager&, const std::string&, bool)>&
85  fieldPropIntOnLeafAssigner);
86 
90  void initNullRockEnergy_();
91 
95  void initThconr_(const EclipseState& eclState, size_t numElems,
96  const std::function<std::vector<double>(const FieldPropsManager&, const std::string&)>&
97  fieldPropsDoubleOnLeafAssigner);
98 
102  void initThc_(const EclipseState& eclState, size_t numElems,
103  const std::function<std::vector<double>(const FieldPropsManager&, const std::string&)>&
104  fieldPropsDoubleOnLeafAssigner);
105 
109  void initNullCond_();
110 
111 private:
112  EclThermalConductionApproach thermalConductivityApproach_ = EclThermalConductionApproach::Undefined;
113  EclSolidEnergyApproach solidEnergyApproach_ = EclSolidEnergyApproach::Undefined;
114 
115  std::vector<unsigned> elemToSatnumIdx_;
116 
117  std::vector<SolidEnergyLawParams> solidEnergyLawParams_;
118  std::vector<ThermalConductionLawParams> thermalConductionLawParams_;
119 };
120 } // namespace Opm
121 
122 #endif
Definition: FieldPropsManager.hpp:42
This class implements a small container which holds the transmissibility mulitpliers for all the face...
Definition: Exceptions.hpp:30
Implements the total thermal conductivity and rock enthalpy relations used by ECL.
Definition: EclipseState.hpp:66
Implements the total thermal conductivity and rock enthalpy relations used by ECL.
Definition: EclThermalConductionLawMultiplexer.hpp:49
Provides the energy storage relation of rock.
Definition: EclSolidEnergyLawMultiplexer.hpp:49
The default implementation of a parameter object for the ECL thermal law.
Provides the energy storage relation of rock.
The default implementation of a parameter object for the ECL thermal law.
Provides an simple way to create and manage the thermal law objects for a complete ECL deck...
Definition: EclThermalLawManager.hpp:51