My Project
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
30#if ! HAVE_ECL_INPUT
31#error "Eclipse input support in opm-common is required to use the ECL thermal law manager!"
32#endif
33
36
39
40#include <vector>
41
42namespace Opm {
43
44class EclipseState;
45
52template <class Scalar, class FluidSystem>
54{
55public:
57 using SolidEnergyLawParams = typename SolidEnergyLaw::Params;
58 using HeatcrLawParams = typename SolidEnergyLawParams::HeatcrLawParams;
59 using SpecrockLawParams = typename SolidEnergyLawParams::SpecrockLawParams;
60
62 using ThermalConductionLawParams = typename ThermalConductionLaw::Params;
63
64 void initParamsForElements(const EclipseState& eclState, size_t numElems);
65
66 const SolidEnergyLawParams& solidEnergyLawParams(unsigned elemIdx) const;
67
68 const ThermalConductionLawParams& thermalConductionLawParams(unsigned elemIdx) const;
69
70private:
74 void initHeatcr_(const EclipseState& eclState, size_t numElems);
75
79 void initSpecrock_(const EclipseState& eclState, size_t numElems);
80
84 void initNullRockEnergy_();
85
89 void initThconr_(const EclipseState& eclState, size_t numElems);
90
94 void initThc_(const EclipseState& eclState, size_t numElems);
95
99 void initNullCond_();
100
101private:
102 using ConductionApproach = typename ThermalConductionLawParams::ThermalConductionApproach;
103 ConductionApproach thermalConductivityApproach_ = ThermalConductionLawParams::undefinedApproach;
104 using SolidEnergyApproach = typename SolidEnergyLawParams::SolidEnergyApproach;
105 SolidEnergyApproach solidEnergyApproach_ = SolidEnergyLawParams::undefinedApproach;
106
107 std::vector<unsigned> elemToSatnumIdx_;
108
109 std::vector<SolidEnergyLawParams> solidEnergyLawParams_;
110 std::vector<ThermalConductionLawParams> thermalConductionLawParams_;
111};
112} // namespace Opm
113
114#endif
Provides the energy storage relation of rock.
Definition: EclSolidEnergyLawMultiplexer.hpp:50
Implements the total thermal conductivity and rock enthalpy relations used by ECL.
Definition: EclThermalConductionLawMultiplexer.hpp:50
Provides an simple way to create and manage the thermal law objects for a complete ECL deck.
Definition: EclThermalLawManager.hpp:54
Definition: EclipseState.hpp:55
This class implements a small container which holds the transmissibility mulitpliers for all the face...
Definition: Exceptions.hpp:30