Loading...
Searching...
No Matches
EclThermalLawManager.hpp
Go to the documentation of this file.
// -*- mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*-
// vi: set et ts=4 sw=4 sts=4:
/*
This file is part of the Open Porous Media project (OPM).
OPM is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 2 of the License, or
(at your option) any later version.
OPM is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with OPM. If not, see <http://www.gnu.org/licenses/>.
Consult the COPYING file in the top-level source directory of this
module for the precise wording of the license and the list of
copyright holders.
*/
#ifndef OPM_ECL_THERMAL_LAW_MANAGER_HPP
#define OPM_ECL_THERMAL_LAW_MANAGER_HPP
#if ! HAVE_ECL_INPUT
#error "Eclipse input support in opm-common is required to use the ECL thermal law manager!"
#endif
#include "EclSolidEnergyLawMultiplexer.hpp"
#include "EclSolidEnergyLawMultiplexerParams.hpp"
#include "EclThermalConductionLawMultiplexer.hpp"
#include "EclThermalConductionLawMultiplexerParams.hpp"
#include <functional>
#include <vector>
namespace Opm {
class EclipseState;
class FieldPropsManager;
template <class Scalar, class FluidSystem>
class EclThermalLawManager
{
public:
using SolidEnergyLaw = EclSolidEnergyLawMultiplexer<Scalar, FluidSystem>;
using SolidEnergyLawParams = typename SolidEnergyLaw::Params;
using HeatcrLawParams = typename SolidEnergyLawParams::HeatcrLawParams;
using SpecrockLawParams = typename SolidEnergyLawParams::SpecrockLawParams;
using ThermalConductionLaw = EclThermalConductionLawMultiplexer<Scalar, FluidSystem>;
using ThermalConductionLawParams = typename ThermalConductionLaw::Params;
void initParamsForElements(const EclipseState& eclState, size_t numElems,
const std::function<std::vector<double>(const FieldPropsManager&, const std::string&)>&
fieldPropDoubleOnLeafAssigner,
const std::function<std::vector<unsigned int>(const FieldPropsManager&, const std::string&,
bool)>& fieldPropIntOnLeafAssigner);
const SolidEnergyLawParams& solidEnergyLawParams(unsigned elemIdx) const;
const ThermalConductionLawParams& thermalConductionLawParams(unsigned elemIdx) const;
private:
void initHeatcr_(const EclipseState& eclState, size_t numElems,
const std::function<std::vector<double>(const FieldPropsManager&, const std::string&)>&
fieldPropDoubleOnLeafAssigner);
void initSpecrock_(const EclipseState& eclState,
const std::function<std::vector<unsigned int>(const FieldPropsManager&, const std::string&, bool)>&
fieldPropIntOnLeafAssigner);
void initNullRockEnergy_();
void initThconr_(const EclipseState& eclState, size_t numElems,
const std::function<std::vector<double>(const FieldPropsManager&, const std::string&)>&
fieldPropsDoubleOnLeafAssigner);
void initThc_(const EclipseState& eclState, size_t numElems,
const std::function<std::vector<double>(const FieldPropsManager&, const std::string&)>&
fieldPropsDoubleOnLeafAssigner);
void initNullCond_();
private:
EclThermalConductionApproach thermalConductivityApproach_ = EclThermalConductionApproach::Undefined;
EclSolidEnergyApproach solidEnergyApproach_ = EclSolidEnergyApproach::Undefined;
std::vector<unsigned> elemToSatnumIdx_;
std::vector<SolidEnergyLawParams> solidEnergyLawParams_;
std::vector<ThermalConductionLawParams> thermalConductionLawParams_;
};
} // namespace Opm
#endif
EclSolidEnergyLawMultiplexerParams.hpp
The default implementation of a parameter object for the ECL thermal law.
EclSolidEnergyLawMultiplexer.hpp
Provides the energy storage relation of rock.
EclThermalConductionLawMultiplexerParams.hpp
The default implementation of a parameter object for the ECL thermal law.
EclThermalConductionLawMultiplexer.hpp
Implements the total thermal conductivity and rock enthalpy relations used by ECL.
Opm::EclSolidEnergyLawMultiplexer
Provides the energy storage relation of rock.
Definition EclSolidEnergyLawMultiplexer.hpp:50
Opm::EclThermalConductionLawMultiplexer
Implements the total thermal conductivity and rock enthalpy relations used by ECL.
Definition EclThermalConductionLawMultiplexer.hpp:50
Opm::EclThermalLawManager
Provides an simple way to create and manage the thermal law objects for a complete ECL deck.
Definition EclThermalLawManager.hpp:56
Opm::EclipseState
Definition EclipseState.hpp:62
Opm::FieldPropsManager
Definition FieldPropsManager.hpp:42
Opm
This class implements a small container which holds the transmissibility mulitpliers for all the face...
Definition Exceptions.hpp:30