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 <cstddef>
37 #include <functional>
38 #include <vector>
39 
40 namespace Opm {
41 
42 class EclipseState;
43 class FieldPropsManager;
44 
51 template <class Scalar, class FluidSystem>
53 {
54 public:
56  using SolidEnergyLawParams = typename SolidEnergyLaw::Params;
57  using HeatcrLawParams = typename SolidEnergyLawParams::HeatcrLawParams;
58  using SpecrockLawParams = typename SolidEnergyLawParams::SpecrockLawParams;
59 
61  using ThermalConductionLawParams = typename ThermalConductionLaw::Params;
62 
63  void initParamsForElements(const EclipseState& eclState, std::size_t numElems,
64  const std::function<std::vector<double>(const FieldPropsManager&, const std::string&)>&
65  fieldPropDoubleOnLeafAssigner,
66  const std::function<std::vector<unsigned int>(const FieldPropsManager&, const std::string&,
67  bool)>& fieldPropIntOnLeafAssigner);
68 
69  const SolidEnergyLawParams& solidEnergyLawParams(unsigned elemIdx) const;
70 
71  const ThermalConductionLawParams& thermalConductionLawParams(unsigned elemIdx) const;
72 
73 private:
77  void initHeatcr_(const EclipseState& eclState, std::size_t numElems,
78  const std::function<std::vector<double>(const FieldPropsManager&, const std::string&)>&
79  fieldPropDoubleOnLeafAssigner);
80 
84  void initSpecrock_(const EclipseState& eclState,
85  const std::function<std::vector<unsigned int>(const FieldPropsManager&, const std::string&, bool)>&
86  fieldPropIntOnLeafAssigner);
87 
91  void initNullRockEnergy_();
92 
96  void initThconr_(const EclipseState& eclState, std::size_t numElems,
97  const std::function<std::vector<double>(const FieldPropsManager&, const std::string&)>&
98  fieldPropsDoubleOnLeafAssigner);
99 
103  void initThc_(const EclipseState& eclState, std::size_t numElems,
104  const std::function<std::vector<double>(const FieldPropsManager&, const std::string&)>&
105  fieldPropsDoubleOnLeafAssigner);
106 
110  void initNullCond_();
111 
112 private:
113  EclThermalConductionApproach thermalConductivityApproach_ = EclThermalConductionApproach::Undefined;
114  EclSolidEnergyApproach solidEnergyApproach_ = EclSolidEnergyApproach::Undefined;
115 
116  std::vector<unsigned> elemToSatnumIdx_;
117 
118  std::vector<SolidEnergyLawParams> solidEnergyLawParams_;
119  std::vector<ThermalConductionLawParams> thermalConductionLawParams_;
120 };
121 } // namespace Opm
122 
123 #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:52