thoroughly rename the thermal laws
this was only partially done so far: the term "heat" should be avoided if possible because it is a somewhat fuzzy concept. Thus, replace it by "energy" and "thermal" where it is not a well established term. ("well established" basically means "heat capacity".)
This commit is contained in:
parent
d2588eac7d
commit
bf3cffa6b4
@ -22,12 +22,12 @@
|
|||||||
*/
|
*/
|
||||||
/*!
|
/*!
|
||||||
* \file
|
* \file
|
||||||
* \copydoc Opm::EclSolidHeatLawMultiplexer
|
* \copydoc Opm::EclSolidEnergyLawMultiplexer
|
||||||
*/
|
*/
|
||||||
#ifndef OPM_ECL_SOLID_HEAT_LAW_MULTIPLEXER_HPP
|
#ifndef OPM_ECL_SOLID_ENERGY_LAW_MULTIPLEXER_HPP
|
||||||
#define OPM_ECL_SOLID_HEAT_LAW_MULTIPLEXER_HPP
|
#define OPM_ECL_SOLID_ENERGY_LAW_MULTIPLEXER_HPP
|
||||||
|
|
||||||
#include "EclSolidHeatLawMultiplexerParams.hpp"
|
#include "EclSolidEnergyLawMultiplexerParams.hpp"
|
||||||
|
|
||||||
#include "EclHeatcrLaw.hpp"
|
#include "EclHeatcrLaw.hpp"
|
||||||
#include "EclSpecrockLaw.hpp"
|
#include "EclSpecrockLaw.hpp"
|
||||||
@ -40,12 +40,12 @@ namespace Opm
|
|||||||
/*!
|
/*!
|
||||||
* \ingroup material
|
* \ingroup material
|
||||||
*
|
*
|
||||||
* \brief Implements the total heat conductivity and rock enthalpy relations used by ECL.
|
* \brief Provides the energy storage relation of rock
|
||||||
*/
|
*/
|
||||||
template <class ScalarT,
|
template <class ScalarT,
|
||||||
class FluidSystem,
|
class FluidSystem,
|
||||||
class ParamsT = EclSolidHeatLawMultiplexerParams<ScalarT>>
|
class ParamsT = EclSolidEnergyLawMultiplexerParams<ScalarT>>
|
||||||
class EclSolidHeatLawMultiplexer
|
class EclSolidEnergyLawMultiplexer
|
||||||
{
|
{
|
||||||
enum { numPhases = FluidSystem::numPhases };
|
enum { numPhases = FluidSystem::numPhases };
|
||||||
|
|
@ -22,10 +22,10 @@
|
|||||||
*/
|
*/
|
||||||
/*!
|
/*!
|
||||||
* \file
|
* \file
|
||||||
* \copydoc Opm::EclSolidHeatLawMultiplexerParams
|
* \copydoc Opm::EclSolidEnergyLawMultiplexerParams
|
||||||
*/
|
*/
|
||||||
#ifndef OPM_ECL_SOLID_HEAT_LAW_MULTIPLEXER_PARAMS_HPP
|
#ifndef OPM_ECL_SOLID_ENERGY_LAW_MULTIPLEXER_PARAMS_HPP
|
||||||
#define OPM_ECL_SOLID_HEAT_LAW_MULTIPLEXER_PARAMS_HPP
|
#define OPM_ECL_SOLID_ENERGY_LAW_MULTIPLEXER_PARAMS_HPP
|
||||||
|
|
||||||
#include "EclHeatcrLawParams.hpp"
|
#include "EclHeatcrLawParams.hpp"
|
||||||
#include "EclSpecrockLawParams.hpp"
|
#include "EclSpecrockLawParams.hpp"
|
||||||
@ -41,7 +41,7 @@ namespace Opm {
|
|||||||
* ECL thermal law.
|
* ECL thermal law.
|
||||||
*/
|
*/
|
||||||
template <class ScalarT>
|
template <class ScalarT>
|
||||||
class EclSolidHeatLawMultiplexerParams : public EnsureFinalized
|
class EclSolidEnergyLawMultiplexerParams : public EnsureFinalized
|
||||||
{
|
{
|
||||||
typedef void* ParamPointerType;
|
typedef void* ParamPointerType;
|
||||||
|
|
||||||
@ -58,12 +58,12 @@ public:
|
|||||||
typedef Opm::EclHeatcrLawParams<ScalarT> HeatcrLawParams;
|
typedef Opm::EclHeatcrLawParams<ScalarT> HeatcrLawParams;
|
||||||
typedef Opm::EclSpecrockLawParams<ScalarT> SpecrockLawParams;
|
typedef Opm::EclSpecrockLawParams<ScalarT> SpecrockLawParams;
|
||||||
|
|
||||||
EclSolidHeatLawMultiplexerParams(const EclSolidHeatLawMultiplexerParams&) = default;
|
EclSolidEnergyLawMultiplexerParams(const EclSolidEnergyLawMultiplexerParams&) = default;
|
||||||
|
|
||||||
EclSolidHeatLawMultiplexerParams()
|
EclSolidEnergyLawMultiplexerParams()
|
||||||
{ solidEnergyApproach_ = undefinedApproach; }
|
{ solidEnergyApproach_ = undefinedApproach; }
|
||||||
|
|
||||||
~EclSolidHeatLawMultiplexerParams()
|
~EclSolidEnergyLawMultiplexerParams()
|
||||||
{ destroy_(); }
|
{ destroy_(); }
|
||||||
|
|
||||||
void setSolidEnergyApproach(SolidEnergyApproach newApproach)
|
void setSolidEnergyApproach(SolidEnergyApproach newApproach)
|
||||||
@ -74,7 +74,7 @@ public:
|
|||||||
switch (solidEnergyApproach()) {
|
switch (solidEnergyApproach()) {
|
||||||
case undefinedApproach:
|
case undefinedApproach:
|
||||||
OPM_THROW(std::logic_error,
|
OPM_THROW(std::logic_error,
|
||||||
"Cannot set the approach for solid heat storage to 'undefined'!");
|
"Cannot set the approach for solid energy storage to 'undefined'!");
|
||||||
|
|
||||||
case heatcrApproach:
|
case heatcrApproach:
|
||||||
realParams_ = new HeatcrLawParams;
|
realParams_ = new HeatcrLawParams;
|
@ -36,9 +36,9 @@ namespace Opm
|
|||||||
/*!
|
/*!
|
||||||
* \ingroup material
|
* \ingroup material
|
||||||
*
|
*
|
||||||
* \brief Implements the total heat conductivity and rock enthalpy relations used by ECL.
|
* \brief Implements the total thermal conductivity and rock enthalpy relations used by ECL.
|
||||||
*
|
*
|
||||||
* This is the heat conduction law based on the THCROCK, THCOIL, THCGAS and THCWATER
|
* This is the thermal conduction law based on the THCROCK, THCOIL, THCGAS and THCWATER
|
||||||
* keywords.
|
* keywords.
|
||||||
*/
|
*/
|
||||||
template <class ScalarT,
|
template <class ScalarT,
|
||||||
@ -50,19 +50,19 @@ public:
|
|||||||
typedef typename Params::Scalar Scalar;
|
typedef typename Params::Scalar Scalar;
|
||||||
|
|
||||||
/*!
|
/*!
|
||||||
* \brief Given a fluid state, return the total heat conductivity [W/m^2 / (K/m)] of the porous
|
* \brief Given a fluid state, return the total thermal conductivity [W/m^2 / (K/m)] of the porous
|
||||||
* medium.
|
* medium.
|
||||||
*/
|
*/
|
||||||
template <class FluidState, class Evaluation = typename FluidState::Scalar>
|
template <class FluidState, class Evaluation = typename FluidState::Scalar>
|
||||||
static Evaluation heatConductivity(const Params& params,
|
static Evaluation thermalConductivity(const Params& params,
|
||||||
const FluidState& fluidState)
|
const FluidState& fluidState)
|
||||||
{
|
{
|
||||||
// The thermal conductivity approach based on the THC* keywords.
|
// The thermal conductivity approach based on the THC* keywords.
|
||||||
|
|
||||||
// let's assume that the porosity of the rock at standard condition is meant
|
// let's assume that the porosity of the rock at standard condition is meant
|
||||||
Scalar poro = params.porosity();
|
Scalar poro = params.porosity();
|
||||||
|
|
||||||
// IMO this approach is very questionable because the total heat conductivity
|
// IMO this approach is very questionable because the total thermal conductivity
|
||||||
// should at least depend on the current solution's phase saturation. Since ECL
|
// should at least depend on the current solution's phase saturation. Since ECL
|
||||||
// is king, let's follow their lead and throw ourselfs down the cliff of obvious
|
// is king, let's follow their lead and throw ourselfs down the cliff of obvious
|
||||||
// incorrectness.
|
// incorrectness.
|
||||||
|
@ -33,7 +33,7 @@ namespace Opm {
|
|||||||
|
|
||||||
/*!
|
/*!
|
||||||
* \brief The default implementation of a parameter object for the
|
* \brief The default implementation of a parameter object for the
|
||||||
* heat conduction law based on the THC* keywords from ECL.
|
* thermal conduction law based on the THC* keywords from ECL.
|
||||||
*/
|
*/
|
||||||
template <class ScalarT>
|
template <class ScalarT>
|
||||||
class EclThcLawParams : public EnsureFinalized
|
class EclThcLawParams : public EnsureFinalized
|
||||||
|
@ -36,7 +36,7 @@ namespace Opm
|
|||||||
/*!
|
/*!
|
||||||
* \ingroup material
|
* \ingroup material
|
||||||
*
|
*
|
||||||
* \brief Implements the total heat conductivity and rock enthalpy relations used by ECL.
|
* \brief Implements the total thermal conductivity relations specified by the ECL THCONR.
|
||||||
*/
|
*/
|
||||||
template <class ScalarT,
|
template <class ScalarT,
|
||||||
class FluidSystem,
|
class FluidSystem,
|
||||||
@ -48,16 +48,16 @@ public:
|
|||||||
typedef typename Params::Scalar Scalar;
|
typedef typename Params::Scalar Scalar;
|
||||||
|
|
||||||
/*!
|
/*!
|
||||||
* \brief Given a fluid state, return the total heat conductivity [W/m^2 / (K/m)] of the porous
|
* \brief Given a fluid state, return the total thermal conductivity [W/m^2 / (K/m)] of the porous
|
||||||
* medium.
|
* medium.
|
||||||
*/
|
*/
|
||||||
template <class FluidState, class Evaluation = typename FluidState::Scalar>
|
template <class FluidState, class Evaluation = typename FluidState::Scalar>
|
||||||
static Evaluation heatConductivity(const Params& params,
|
static Evaluation thermalConductivity(const Params& params,
|
||||||
const FluidState& fluidState)
|
const FluidState& fluidState)
|
||||||
{
|
{
|
||||||
// THCONR + THCONSF approach.
|
// THCONR + THCONSF approach.
|
||||||
Scalar lambdaRef = params.referenceTotalHeatConductivity();
|
Scalar lambdaRef = params.referenceTotalThermalConductivity();
|
||||||
Scalar alpha = params.dTotalHeatConductivity_dSg();
|
Scalar alpha = params.dTotalThermalConductivity_dSg();
|
||||||
|
|
||||||
static constexpr int gasPhaseIdx = FluidSystem::gasPhaseIdx;
|
static constexpr int gasPhaseIdx = FluidSystem::gasPhaseIdx;
|
||||||
const Evaluation& Sg = Opm::decay<Evaluation>(fluidState.saturation(gasPhaseIdx));
|
const Evaluation& Sg = Opm::decay<Evaluation>(fluidState.saturation(gasPhaseIdx));
|
||||||
|
@ -33,7 +33,7 @@ namespace Opm {
|
|||||||
|
|
||||||
/*!
|
/*!
|
||||||
* \brief The default implementation of a parameter object for the
|
* \brief The default implementation of a parameter object for the
|
||||||
* heat conduction law based on the THCONR keyword from ECL.
|
* thermal conduction law based on the THCONR keyword from ECL.
|
||||||
*/
|
*/
|
||||||
template <class ScalarT>
|
template <class ScalarT>
|
||||||
class EclThconrLawParams : public EnsureFinalized
|
class EclThconrLawParams : public EnsureFinalized
|
||||||
@ -47,32 +47,32 @@ public:
|
|||||||
{ }
|
{ }
|
||||||
|
|
||||||
/*!
|
/*!
|
||||||
* \brief Set the total heat conductivity [J/m^2 / (K/m)] of at Sg = 0
|
* \brief Set the total thermal conductivity [J/m^2 / (K/m)] of at Sg = 0
|
||||||
*/
|
*/
|
||||||
void setReferenceTotalHeatConductivity(Scalar value)
|
void setReferenceTotalThermalConductivity(Scalar value)
|
||||||
{ referenceTotalHeatConductivity_ = value; }
|
{ referenceTotalThermalConductivity_ = value; }
|
||||||
|
|
||||||
/*!
|
/*!
|
||||||
* \brief The total heat conductivity [J/m^2 / (K/m)] of at Sg = 0
|
* \brief The total thermal conductivity [J/m^2 / (K/m)] of at Sg = 0
|
||||||
*/
|
*/
|
||||||
Scalar referenceTotalHeatConductivity() const
|
Scalar referenceTotalThermalConductivity() const
|
||||||
{ EnsureFinalized::check(); return referenceTotalHeatConductivity_; }
|
{ EnsureFinalized::check(); return referenceTotalThermalConductivity_; }
|
||||||
|
|
||||||
/*!
|
/*!
|
||||||
* \brief Set the gas saturation dependence of heat conductivity [-]
|
* \brief Set the gas saturation dependence of thermal conductivity [-]
|
||||||
*/
|
*/
|
||||||
void setDTotalHeatConductivity_dSg(Scalar value)
|
void setDTotalThermalConductivity_dSg(Scalar value)
|
||||||
{ dTotalHeatConductivity_dSg_ = value; }
|
{ dTotalThermalConductivity_dSg_ = value; }
|
||||||
|
|
||||||
/*!
|
/*!
|
||||||
* \brief The gas saturation dependence of heat conductivity [-]
|
* \brief The gas saturation dependence of thermal conductivity [-]
|
||||||
*/
|
*/
|
||||||
Scalar dTotalHeatConductivity_dSg() const
|
Scalar dTotalThermalConductivity_dSg() const
|
||||||
{ EnsureFinalized::check(); return dTotalHeatConductivity_dSg_; }
|
{ EnsureFinalized::check(); return dTotalThermalConductivity_dSg_; }
|
||||||
|
|
||||||
private:
|
private:
|
||||||
Scalar referenceTotalHeatConductivity_;
|
Scalar referenceTotalThermalConductivity_;
|
||||||
Scalar dTotalHeatConductivity_dSg_;
|
Scalar dTotalThermalConductivity_dSg_;
|
||||||
};
|
};
|
||||||
|
|
||||||
} // namespace Opm
|
} // namespace Opm
|
||||||
|
@ -22,16 +22,16 @@
|
|||||||
*/
|
*/
|
||||||
/*!
|
/*!
|
||||||
* \file
|
* \file
|
||||||
* \copydoc Opm::EclHeatConductionLawMultiplexer
|
* \copydoc Opm::EclThermalConductionLawMultiplexer
|
||||||
*/
|
*/
|
||||||
#ifndef OPM_ECL_HEAT_CONDUCTION_LAW_MULTIPLEXER_HPP
|
#ifndef OPM_ECL_THERMAL_CONDUCTION_LAW_MULTIPLEXER_HPP
|
||||||
#define OPM_ECL_HEAT_CONDUCTION_LAW_MULTIPLEXER_HPP
|
#define OPM_ECL_THERMAL_CONDUCTION_LAW_MULTIPLEXER_HPP
|
||||||
|
|
||||||
#include "EclHeatConductionLawMultiplexerParams.hpp"
|
#include "EclThermalConductionLawMultiplexerParams.hpp"
|
||||||
|
|
||||||
#include "EclThconrLaw.hpp"
|
#include "EclThconrLaw.hpp"
|
||||||
#include "EclThcLaw.hpp"
|
#include "EclThcLaw.hpp"
|
||||||
#include "NullHeatConductionLaw.hpp"
|
#include "NullThermalConductionLaw.hpp"
|
||||||
|
|
||||||
#include <opm/material/densead/Math.hpp>
|
#include <opm/material/densead/Math.hpp>
|
||||||
|
|
||||||
@ -40,18 +40,18 @@ namespace Opm
|
|||||||
/*!
|
/*!
|
||||||
* \ingroup material
|
* \ingroup material
|
||||||
*
|
*
|
||||||
* \brief Implements the total heat conductivity and rock enthalpy relations used by ECL.
|
* \brief Implements the total thermal conductivity and rock enthalpy relations used by ECL.
|
||||||
*/
|
*/
|
||||||
template <class ScalarT,
|
template <class ScalarT,
|
||||||
class FluidSystem,
|
class FluidSystem,
|
||||||
class ParamsT = EclHeatConductionLawMultiplexerParams<ScalarT>>
|
class ParamsT = EclThermalConductionLawMultiplexerParams<ScalarT>>
|
||||||
class EclHeatConductionLawMultiplexer
|
class EclThermalConductionLawMultiplexer
|
||||||
{
|
{
|
||||||
enum { numPhases = FluidSystem::numPhases };
|
enum { numPhases = FluidSystem::numPhases };
|
||||||
|
|
||||||
typedef Opm::EclThconrLaw<ScalarT, FluidSystem, typename ParamsT::ThconrLawParams> ThconrLaw;
|
typedef Opm::EclThconrLaw<ScalarT, FluidSystem, typename ParamsT::ThconrLawParams> ThconrLaw;
|
||||||
typedef Opm::EclThcLaw<ScalarT, typename ParamsT::ThcLawParams> ThcLaw;
|
typedef Opm::EclThcLaw<ScalarT, typename ParamsT::ThcLawParams> ThcLaw;
|
||||||
typedef Opm::NullHeatConductionLaw<ScalarT> NullLaw;
|
typedef Opm::NullThermalConductionLaw<ScalarT> NullLaw;
|
||||||
|
|
||||||
public:
|
public:
|
||||||
typedef ParamsT Params;
|
typedef ParamsT Params;
|
||||||
@ -61,24 +61,24 @@ public:
|
|||||||
* \brief Given a fluid state, compute the volumetric internal energy of the rock [W/m^3].
|
* \brief Given a fluid state, compute the volumetric internal energy of the rock [W/m^3].
|
||||||
*/
|
*/
|
||||||
template <class FluidState, class Evaluation = typename FluidState::Scalar>
|
template <class FluidState, class Evaluation = typename FluidState::Scalar>
|
||||||
static Evaluation heatConductivity(const Params& params,
|
static Evaluation thermalConductivity(const Params& params,
|
||||||
const FluidState& fluidState)
|
const FluidState& fluidState)
|
||||||
{
|
{
|
||||||
switch (params.heatConductionApproach()) {
|
switch (params.thermalConductionApproach()) {
|
||||||
case Params::thconrApproach:
|
case Params::thconrApproach:
|
||||||
// relevant ECL keywords: THCONR and THCONSF
|
// relevant ECL keywords: THCONR and THCONSF
|
||||||
return ThconrLaw::heatConductivity(params.template getRealParams<Params::thconrApproach>(), fluidState);
|
return ThconrLaw::thermalConductivity(params.template getRealParams<Params::thconrApproach>(), fluidState);
|
||||||
|
|
||||||
case Params::thcApproach:
|
case Params::thcApproach:
|
||||||
// relevant ECL keywords: THCROCK, THCOIL, THCGAS and THCWATER
|
// relevant ECL keywords: THCROCK, THCOIL, THCGAS and THCWATER
|
||||||
return ThcLaw::heatConductivity(params.template getRealParams<Params::thcApproach>(), fluidState);
|
return ThcLaw::thermalConductivity(params.template getRealParams<Params::thcApproach>(), fluidState);
|
||||||
|
|
||||||
case Params::nullApproach:
|
case Params::nullApproach:
|
||||||
// relevant ECL keywords: none or none recognized
|
// relevant ECL keywords: none or none recognized
|
||||||
return NullLaw::heatConductivity(0, fluidState);
|
return NullLaw::thermalConductivity(0, fluidState);
|
||||||
|
|
||||||
default:
|
default:
|
||||||
OPM_THROW(std::logic_error, "Invalid heat conductivity approach: " << params.heatConductionApproach());
|
OPM_THROW(std::logic_error, "Invalid thermal conductivity approach: " << params.thermalConductionApproach());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
};
|
};
|
@ -22,10 +22,10 @@
|
|||||||
*/
|
*/
|
||||||
/*!
|
/*!
|
||||||
* \file
|
* \file
|
||||||
* \copydoc Opm::EclHeatConductivtyLawMultiplexerParams
|
* \copydoc Opm::EclThermalConductionLawMultiplexerParams
|
||||||
*/
|
*/
|
||||||
#ifndef OPM_ECL_HEAT_CONDUCTION_LAW_MULTIPLEXER_PARAMS_HPP
|
#ifndef OPM_ECL_THERMAL_CONDUCTION_LAW_MULTIPLEXER_PARAMS_HPP
|
||||||
#define OPM_ECL_HEAT_CONDUCTION_LAW_MULTIPLEXER_PARAMS_HPP
|
#define OPM_ECL_THERMAL_CONDUCTION_LAW_MULTIPLEXER_PARAMS_HPP
|
||||||
|
|
||||||
#include "EclThconrLawParams.hpp"
|
#include "EclThconrLawParams.hpp"
|
||||||
#include "EclThcLawParams.hpp"
|
#include "EclThcLawParams.hpp"
|
||||||
@ -41,14 +41,14 @@ namespace Opm {
|
|||||||
* ECL thermal law.
|
* ECL thermal law.
|
||||||
*/
|
*/
|
||||||
template <class ScalarT>
|
template <class ScalarT>
|
||||||
class EclHeatConductionLawMultiplexerParams : public EnsureFinalized
|
class EclThermalConductionLawMultiplexerParams : public EnsureFinalized
|
||||||
{
|
{
|
||||||
typedef void* ParamPointerType;
|
typedef void* ParamPointerType;
|
||||||
|
|
||||||
public:
|
public:
|
||||||
typedef ScalarT Scalar;
|
typedef ScalarT Scalar;
|
||||||
|
|
||||||
enum HeatConductionApproach {
|
enum ThermalConductionApproach {
|
||||||
undefinedApproach,
|
undefinedApproach,
|
||||||
thconrApproach, // keywords: THCONR, THCONSF
|
thconrApproach, // keywords: THCONR, THCONSF
|
||||||
thcApproach, // keywords: THCROCK, THCOIL, THCGAS, THCWATER
|
thcApproach, // keywords: THCROCK, THCOIL, THCGAS, THCWATER
|
||||||
@ -58,23 +58,23 @@ public:
|
|||||||
typedef Opm::EclThconrLawParams<ScalarT> ThconrLawParams;
|
typedef Opm::EclThconrLawParams<ScalarT> ThconrLawParams;
|
||||||
typedef Opm::EclThcLawParams<ScalarT> ThcLawParams;
|
typedef Opm::EclThcLawParams<ScalarT> ThcLawParams;
|
||||||
|
|
||||||
EclHeatConductionLawMultiplexerParams(const EclHeatConductionLawMultiplexerParams&) = default;
|
EclThermalConductionLawMultiplexerParams(const EclThermalConductionLawMultiplexerParams&) = default;
|
||||||
|
|
||||||
EclHeatConductionLawMultiplexerParams()
|
EclThermalConductionLawMultiplexerParams()
|
||||||
{ heatConductionApproach_ = undefinedApproach; }
|
{ thermalConductionApproach_ = undefinedApproach; }
|
||||||
|
|
||||||
~EclHeatConductionLawMultiplexerParams()
|
~EclThermalConductionLawMultiplexerParams()
|
||||||
{ destroy_(); }
|
{ destroy_(); }
|
||||||
|
|
||||||
void setHeatConductionApproach(HeatConductionApproach newApproach)
|
void setThermalConductionApproach(ThermalConductionApproach newApproach)
|
||||||
{
|
{
|
||||||
destroy_();
|
destroy_();
|
||||||
|
|
||||||
heatConductionApproach_ = newApproach;
|
thermalConductionApproach_ = newApproach;
|
||||||
switch (heatConductionApproach()) {
|
switch (thermalConductionApproach()) {
|
||||||
case undefinedApproach:
|
case undefinedApproach:
|
||||||
OPM_THROW(std::logic_error,
|
OPM_THROW(std::logic_error,
|
||||||
"Cannot set the approach for heat conduction to 'undefined'!");
|
"Cannot set the approach for thermal conduction to 'undefined'!");
|
||||||
|
|
||||||
case thconrApproach:
|
case thconrApproach:
|
||||||
realParams_ = new ThconrLawParams;
|
realParams_ = new ThconrLawParams;
|
||||||
@ -90,47 +90,47 @@ public:
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
HeatConductionApproach heatConductionApproach() const
|
ThermalConductionApproach thermalConductionApproach() const
|
||||||
{ return heatConductionApproach_; }
|
{ return thermalConductionApproach_; }
|
||||||
|
|
||||||
// get the parameter object for the THCONR case
|
// get the parameter object for the THCONR case
|
||||||
template <HeatConductionApproach approachV>
|
template <ThermalConductionApproach approachV>
|
||||||
typename std::enable_if<approachV == thconrApproach, ThconrLawParams>::type&
|
typename std::enable_if<approachV == thconrApproach, ThconrLawParams>::type&
|
||||||
getRealParams()
|
getRealParams()
|
||||||
{
|
{
|
||||||
assert(heatConductionApproach() == approachV);
|
assert(thermalConductionApproach() == approachV);
|
||||||
return *static_cast<ThconrLawParams*>(realParams_);
|
return *static_cast<ThconrLawParams*>(realParams_);
|
||||||
}
|
}
|
||||||
|
|
||||||
template <HeatConductionApproach approachV>
|
template <ThermalConductionApproach approachV>
|
||||||
typename std::enable_if<approachV == thconrApproach, const ThconrLawParams>::type&
|
typename std::enable_if<approachV == thconrApproach, const ThconrLawParams>::type&
|
||||||
getRealParams() const
|
getRealParams() const
|
||||||
{
|
{
|
||||||
assert(heatConductionApproach() == approachV);
|
assert(thermalConductionApproach() == approachV);
|
||||||
return *static_cast<const ThconrLawParams*>(realParams_);
|
return *static_cast<const ThconrLawParams*>(realParams_);
|
||||||
}
|
}
|
||||||
|
|
||||||
// get the parameter object for the THC* case
|
// get the parameter object for the THC* case
|
||||||
template <HeatConductionApproach approachV>
|
template <ThermalConductionApproach approachV>
|
||||||
typename std::enable_if<approachV == thcApproach, ThcLawParams>::type&
|
typename std::enable_if<approachV == thcApproach, ThcLawParams>::type&
|
||||||
getRealParams()
|
getRealParams()
|
||||||
{
|
{
|
||||||
assert(heatConductionApproach() == approachV);
|
assert(thermalConductionApproach() == approachV);
|
||||||
return *static_cast<ThcLawParams*>(realParams_);
|
return *static_cast<ThcLawParams*>(realParams_);
|
||||||
}
|
}
|
||||||
|
|
||||||
template <HeatConductionApproach approachV>
|
template <ThermalConductionApproach approachV>
|
||||||
typename std::enable_if<approachV == thcApproach, const ThcLawParams>::type&
|
typename std::enable_if<approachV == thcApproach, const ThcLawParams>::type&
|
||||||
getRealParams() const
|
getRealParams() const
|
||||||
{
|
{
|
||||||
assert(heatConductionApproach() == approachV);
|
assert(thermalConductionApproach() == approachV);
|
||||||
return *static_cast<const ThcLawParams*>(realParams_);
|
return *static_cast<const ThcLawParams*>(realParams_);
|
||||||
}
|
}
|
||||||
|
|
||||||
private:
|
private:
|
||||||
void destroy_()
|
void destroy_()
|
||||||
{
|
{
|
||||||
switch (heatConductionApproach()) {
|
switch (thermalConductionApproach()) {
|
||||||
case undefinedApproach:
|
case undefinedApproach:
|
||||||
break;
|
break;
|
||||||
|
|
||||||
@ -146,10 +146,10 @@ private:
|
|||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
heatConductionApproach_ = undefinedApproach;
|
thermalConductionApproach_ = undefinedApproach;
|
||||||
}
|
}
|
||||||
|
|
||||||
HeatConductionApproach heatConductionApproach_;
|
ThermalConductionApproach thermalConductionApproach_;
|
||||||
ParamPointerType realParams_;
|
ParamPointerType realParams_;
|
||||||
};
|
};
|
||||||
|
|
@ -31,11 +31,11 @@
|
|||||||
#ifndef OPM_ECL_THERMAL_LAW_MANAGER_HPP
|
#ifndef OPM_ECL_THERMAL_LAW_MANAGER_HPP
|
||||||
#define OPM_ECL_THERMAL_LAW_MANAGER_HPP
|
#define OPM_ECL_THERMAL_LAW_MANAGER_HPP
|
||||||
|
|
||||||
#include "EclSolidHeatLawMultiplexer.hpp"
|
#include "EclSolidEnergyLawMultiplexer.hpp"
|
||||||
#include "EclSolidHeatLawMultiplexerParams.hpp"
|
#include "EclSolidEnergyLawMultiplexerParams.hpp"
|
||||||
|
|
||||||
#include "EclHeatConductionLawMultiplexer.hpp"
|
#include "EclThermalConductionLawMultiplexer.hpp"
|
||||||
#include "EclHeatConductionLawMultiplexerParams.hpp"
|
#include "EclThermalConductionLawMultiplexerParams.hpp"
|
||||||
|
|
||||||
#include <opm/common/Exceptions.hpp>
|
#include <opm/common/Exceptions.hpp>
|
||||||
#include <opm/common/ErrorMacros.hpp>
|
#include <opm/common/ErrorMacros.hpp>
|
||||||
@ -56,18 +56,18 @@ template <class Scalar, class FluidSystem>
|
|||||||
class EclThermalLawManager
|
class EclThermalLawManager
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
typedef EclSolidHeatLawMultiplexer<Scalar, FluidSystem> SolidHeatLaw;
|
typedef EclSolidEnergyLawMultiplexer<Scalar, FluidSystem> SolidEnergyLaw;
|
||||||
typedef typename SolidHeatLaw::Params SolidHeatLawParams;
|
typedef typename SolidEnergyLaw::Params SolidEnergyLawParams;
|
||||||
typedef typename SolidHeatLawParams::HeatcrLawParams HeatcrLawParams;
|
typedef typename SolidEnergyLawParams::HeatcrLawParams HeatcrLawParams;
|
||||||
typedef typename SolidHeatLawParams::SpecrockLawParams SpecrockLawParams;
|
typedef typename SolidEnergyLawParams::SpecrockLawParams SpecrockLawParams;
|
||||||
|
|
||||||
typedef EclHeatConductionLawMultiplexer<Scalar, FluidSystem> HeatConductionLaw;
|
typedef EclThermalConductionLawMultiplexer<Scalar, FluidSystem> ThermalConductionLaw;
|
||||||
typedef typename HeatConductionLaw::Params HeatConductionLawParams;
|
typedef typename ThermalConductionLaw::Params ThermalConductionLawParams;
|
||||||
|
|
||||||
EclThermalLawManager()
|
EclThermalLawManager()
|
||||||
{
|
{
|
||||||
solidEnergyApproach_ = SolidHeatLawParams::undefinedApproach;
|
solidEnergyApproach_ = SolidEnergyLawParams::undefinedApproach;
|
||||||
heatCondApproach_ = HeatConductionLawParams::undefinedApproach;
|
thermalConductivityApproach_ = ThermalConductionLawParams::undefinedApproach;
|
||||||
}
|
}
|
||||||
|
|
||||||
void initFromDeck(const Opm::Deck& deck,
|
void initFromDeck(const Opm::Deck& deck,
|
||||||
@ -93,23 +93,23 @@ public:
|
|||||||
initNullCond_(deck, eclState, compressedToCartesianElemIdx);
|
initNullCond_(deck, eclState, compressedToCartesianElemIdx);
|
||||||
}
|
}
|
||||||
|
|
||||||
const SolidHeatLawParams& solidHeatLawParams(unsigned elemIdx) const
|
const SolidEnergyLawParams& solidEnergyLawParams(unsigned elemIdx) const
|
||||||
{
|
{
|
||||||
switch (solidEnergyApproach_) {
|
switch (solidEnergyApproach_) {
|
||||||
case SolidHeatLawParams::heatcrApproach:
|
case SolidEnergyLawParams::heatcrApproach:
|
||||||
assert(0 <= elemIdx && elemIdx < solidHeatLawParams_.size());
|
assert(0 <= elemIdx && elemIdx < solidEnergyLawParams_.size());
|
||||||
return solidHeatLawParams_[elemIdx];
|
return solidEnergyLawParams_[elemIdx];
|
||||||
|
|
||||||
case SolidHeatLawParams::specrockApproach:
|
case SolidEnergyLawParams::specrockApproach:
|
||||||
{
|
{
|
||||||
assert(0 <= elemIdx && elemIdx < elemToSatnumIdx_.size());
|
assert(0 <= elemIdx && elemIdx < elemToSatnumIdx_.size());
|
||||||
unsigned satnumIdx = elemToSatnumIdx_[elemIdx];
|
unsigned satnumIdx = elemToSatnumIdx_[elemIdx];
|
||||||
assert(0 <= satnumIdx && satnumIdx < solidHeatLawParams_.size());
|
assert(0 <= satnumIdx && satnumIdx < solidEnergyLawParams_.size());
|
||||||
return solidHeatLawParams_[satnumIdx];
|
return solidEnergyLawParams_[satnumIdx];
|
||||||
}
|
}
|
||||||
|
|
||||||
case SolidHeatLawParams::nullApproach:
|
case SolidEnergyLawParams::nullApproach:
|
||||||
return solidHeatLawParams_[0];
|
return solidEnergyLawParams_[0];
|
||||||
|
|
||||||
default:
|
default:
|
||||||
OPM_THROW(std::runtime_error,
|
OPM_THROW(std::runtime_error,
|
||||||
@ -118,33 +118,33 @@ public:
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
const HeatConductionLawParams& heatConductionLawParams(unsigned elemIdx) const
|
const ThermalConductionLawParams& thermalConductionLawParams(unsigned elemIdx) const
|
||||||
{
|
{
|
||||||
switch (heatCondApproach_) {
|
switch (thermalConductivityApproach_) {
|
||||||
case HeatConductionLawParams::thconrApproach:
|
case ThermalConductionLawParams::thconrApproach:
|
||||||
case HeatConductionLawParams::thcApproach:
|
case ThermalConductionLawParams::thcApproach:
|
||||||
assert(0 <= elemIdx && elemIdx < heatConductionLawParams_.size());
|
assert(0 <= elemIdx && elemIdx < thermalConductionLawParams_.size());
|
||||||
return heatConductionLawParams_[elemIdx];
|
return thermalConductionLawParams_[elemIdx];
|
||||||
|
|
||||||
case HeatConductionLawParams::nullApproach:
|
case ThermalConductionLawParams::nullApproach:
|
||||||
return heatConductionLawParams_[0];
|
return thermalConductionLawParams_[0];
|
||||||
|
|
||||||
default:
|
default:
|
||||||
OPM_THROW(std::runtime_error,
|
OPM_THROW(std::runtime_error,
|
||||||
"Attempting to retrieve heat conduction parameters without "
|
"Attempting to retrieve thermal conduction parameters without "
|
||||||
"a known approach being defined by the deck.");
|
"a known approach being defined by the deck.");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
private:
|
private:
|
||||||
/*!
|
/*!
|
||||||
* \brief Initialize the parameters for the rock heat law using using HEATCR and friends.
|
* \brief Initialize the parameters for the solid energy law using using HEATCR and friends.
|
||||||
*/
|
*/
|
||||||
void initHeatcr_(const Opm::Deck& deck,
|
void initHeatcr_(const Opm::Deck& deck,
|
||||||
const Opm::EclipseState& eclState,
|
const Opm::EclipseState& eclState,
|
||||||
const std::vector<int>& compressedToCartesianElemIdx)
|
const std::vector<int>& compressedToCartesianElemIdx)
|
||||||
{
|
{
|
||||||
solidEnergyApproach_ = SolidHeatLawParams::heatcrApproach;
|
solidEnergyApproach_ = SolidEnergyLawParams::heatcrApproach;
|
||||||
|
|
||||||
const auto& props = eclState.get3DProperties();
|
const auto& props = eclState.get3DProperties();
|
||||||
|
|
||||||
@ -156,15 +156,15 @@ private:
|
|||||||
HeatcrLawParams::setReferenceTemperature(FluidSystem::surfaceTemperature);
|
HeatcrLawParams::setReferenceTemperature(FluidSystem::surfaceTemperature);
|
||||||
|
|
||||||
unsigned numElems = compressedToCartesianElemIdx.size();
|
unsigned numElems = compressedToCartesianElemIdx.size();
|
||||||
solidHeatLawParams_.resize(numElems);
|
solidEnergyLawParams_.resize(numElems);
|
||||||
for (unsigned elemIdx = 0; elemIdx < numElems; ++elemIdx) {
|
for (unsigned elemIdx = 0; elemIdx < numElems; ++elemIdx) {
|
||||||
int cartElemIdx = compressedToCartesianElemIdx[elemIdx];
|
int cartElemIdx = compressedToCartesianElemIdx[elemIdx];
|
||||||
|
|
||||||
auto& elemParam = solidHeatLawParams_[elemIdx];
|
auto& elemParam = solidEnergyLawParams_[elemIdx];
|
||||||
|
|
||||||
elemParam.setSolidEnergyApproach(SolidHeatLawParams::heatcrApproach);
|
elemParam.setSolidEnergyApproach(SolidEnergyLawParams::heatcrApproach);
|
||||||
|
|
||||||
auto& heatcrElemParams = elemParam.template getRealParams<SolidHeatLawParams::heatcrApproach>();
|
auto& heatcrElemParams = elemParam.template getRealParams<SolidEnergyLawParams::heatcrApproach>();
|
||||||
heatcrElemParams.setReferenceRockHeatCapacity(heatcrData[cartElemIdx]);
|
heatcrElemParams.setReferenceRockHeatCapacity(heatcrData[cartElemIdx]);
|
||||||
heatcrElemParams.setDRockHeatCapacity_dT(heatcrtData[cartElemIdx]);
|
heatcrElemParams.setDRockHeatCapacity_dT(heatcrtData[cartElemIdx]);
|
||||||
heatcrElemParams.finalize();
|
heatcrElemParams.finalize();
|
||||||
@ -174,13 +174,13 @@ private:
|
|||||||
}
|
}
|
||||||
|
|
||||||
/*!
|
/*!
|
||||||
* \brief Initialize the parameters for the rock heat law using using SPECROCK and friends.
|
* \brief Initialize the parameters for the solid energy law using using SPECROCK and friends.
|
||||||
*/
|
*/
|
||||||
void initSpecrock_(const Opm::Deck& deck,
|
void initSpecrock_(const Opm::Deck& deck,
|
||||||
const Opm::EclipseState& eclState,
|
const Opm::EclipseState& eclState,
|
||||||
const std::vector<int>& compressedToCartesianElemIdx)
|
const std::vector<int>& compressedToCartesianElemIdx)
|
||||||
{
|
{
|
||||||
solidEnergyApproach_ = SolidHeatLawParams::specrockApproach;
|
solidEnergyApproach_ = SolidEnergyLawParams::specrockApproach;
|
||||||
|
|
||||||
// initialize the element index -> SATNUM index mapping
|
// initialize the element index -> SATNUM index mapping
|
||||||
const auto& props = eclState.get3DProperties();
|
const auto& props = eclState.get3DProperties();
|
||||||
@ -197,15 +197,15 @@ private:
|
|||||||
// internalize the SPECROCK table
|
// internalize the SPECROCK table
|
||||||
unsigned numSatRegions = eclState.runspec().tabdims().getNumSatTables();
|
unsigned numSatRegions = eclState.runspec().tabdims().getNumSatTables();
|
||||||
const auto& tableManager = eclState.getTableManager();
|
const auto& tableManager = eclState.getTableManager();
|
||||||
solidHeatLawParams_.resize(numSatRegions);
|
solidEnergyLawParams_.resize(numSatRegions);
|
||||||
for (unsigned satnumIdx = 0; satnumIdx < numSatRegions; ++satnumIdx) {
|
for (unsigned satnumIdx = 0; satnumIdx < numSatRegions; ++satnumIdx) {
|
||||||
const auto& specrockTable = tableManager.getSpecrockTables()[satnumIdx];
|
const auto& specrockTable = tableManager.getSpecrockTables()[satnumIdx];
|
||||||
|
|
||||||
auto& multiplexerParams = solidHeatLawParams_[satnumIdx];
|
auto& multiplexerParams = solidEnergyLawParams_[satnumIdx];
|
||||||
|
|
||||||
multiplexerParams.setSolidEnergyApproach(SolidHeatLawParams::specrockApproach);
|
multiplexerParams.setSolidEnergyApproach(SolidEnergyLawParams::specrockApproach);
|
||||||
|
|
||||||
auto& specrockParams = multiplexerParams.template getRealParams<SolidHeatLawParams::specrockApproach>();
|
auto& specrockParams = multiplexerParams.template getRealParams<SolidEnergyLawParams::specrockApproach>();
|
||||||
const auto& temperatureColumn = specrockTable.getColumn("TEMPERATURE");
|
const auto& temperatureColumn = specrockTable.getColumn("TEMPERATURE");
|
||||||
const auto& cpRockColumn = specrockTable.getColumn("CP_ROCK");
|
const auto& cpRockColumn = specrockTable.getColumn("CP_ROCK");
|
||||||
specrockParams.setHeatCapacities(temperatureColumn, cpRockColumn);
|
specrockParams.setHeatCapacities(temperatureColumn, cpRockColumn);
|
||||||
@ -216,26 +216,26 @@ private:
|
|||||||
}
|
}
|
||||||
|
|
||||||
/*!
|
/*!
|
||||||
* \brief Set the heat capacity of rock to 0
|
* \brief Specify the solid energy law by setting heat capacity of rock to 0
|
||||||
*/
|
*/
|
||||||
void initNullRockEnergy_(const Opm::Deck& deck,
|
void initNullRockEnergy_(const Opm::Deck& deck,
|
||||||
const Opm::EclipseState& eclState,
|
const Opm::EclipseState& eclState,
|
||||||
const std::vector<int>& compressedToCartesianElemIdx)
|
const std::vector<int>& compressedToCartesianElemIdx)
|
||||||
{
|
{
|
||||||
solidEnergyApproach_ = SolidHeatLawParams::nullApproach;
|
solidEnergyApproach_ = SolidEnergyLawParams::nullApproach;
|
||||||
|
|
||||||
solidHeatLawParams_.resize(1);
|
solidEnergyLawParams_.resize(1);
|
||||||
solidHeatLawParams_[0].finalize();
|
solidEnergyLawParams_[0].finalize();
|
||||||
}
|
}
|
||||||
|
|
||||||
/*!
|
/*!
|
||||||
* \brief Initialize the parameters for the heat conduction law using THCONR and friends.
|
* \brief Initialize the parameters for the thermal conduction law using THCONR and friends.
|
||||||
*/
|
*/
|
||||||
void initThconr_(const Opm::Deck& deck,
|
void initThconr_(const Opm::Deck& deck,
|
||||||
const Opm::EclipseState& eclState,
|
const Opm::EclipseState& eclState,
|
||||||
const std::vector<int>& compressedToCartesianElemIdx)
|
const std::vector<int>& compressedToCartesianElemIdx)
|
||||||
{
|
{
|
||||||
heatCondApproach_ = HeatConductionLawParams::thconrApproach;
|
thermalConductivityApproach_ = ThermalConductionLawParams::thconrApproach;
|
||||||
|
|
||||||
const auto& props = eclState.get3DProperties();
|
const auto& props = eclState.get3DProperties();
|
||||||
|
|
||||||
@ -243,17 +243,17 @@ private:
|
|||||||
const std::vector<double>& thconsfData = props.getDoubleGridProperty("THCONSF").getData();
|
const std::vector<double>& thconsfData = props.getDoubleGridProperty("THCONSF").getData();
|
||||||
|
|
||||||
unsigned numElems = compressedToCartesianElemIdx.size();
|
unsigned numElems = compressedToCartesianElemIdx.size();
|
||||||
heatConductionLawParams_.resize(numElems);
|
thermalConductionLawParams_.resize(numElems);
|
||||||
for (unsigned elemIdx = 0; elemIdx < numElems; ++elemIdx) {
|
for (unsigned elemIdx = 0; elemIdx < numElems; ++elemIdx) {
|
||||||
int cartElemIdx = compressedToCartesianElemIdx[elemIdx];
|
int cartElemIdx = compressedToCartesianElemIdx[elemIdx];
|
||||||
|
|
||||||
auto& elemParams = heatConductionLawParams_[elemIdx];
|
auto& elemParams = thermalConductionLawParams_[elemIdx];
|
||||||
|
|
||||||
elemParams.setHeatConductionApproach(HeatConductionLawParams::thconrApproach);
|
elemParams.setThermalConductionApproach(ThermalConductionLawParams::thconrApproach);
|
||||||
|
|
||||||
auto& thconrElemParams = elemParams.template getRealParams<HeatConductionLawParams::thconrApproach>();
|
auto& thconrElemParams = elemParams.template getRealParams<ThermalConductionLawParams::thconrApproach>();
|
||||||
thconrElemParams.setReferenceTotalHeatConductivity(thconrData[cartElemIdx]);
|
thconrElemParams.setReferenceTotalThermalConductivity(thconrData[cartElemIdx]);
|
||||||
thconrElemParams.setDTotalHeatConductivity_dSg(thconsfData[cartElemIdx]);
|
thconrElemParams.setDTotalThermalConductivity_dSg(thconsfData[cartElemIdx]);
|
||||||
thconrElemParams.finalize();
|
thconrElemParams.finalize();
|
||||||
|
|
||||||
elemParams.finalize();
|
elemParams.finalize();
|
||||||
@ -261,13 +261,13 @@ private:
|
|||||||
}
|
}
|
||||||
|
|
||||||
/*!
|
/*!
|
||||||
* \brief Initialize the parameters for the heat conduction law using THCROCK and friends.
|
* \brief Initialize the parameters for the thermal conduction law using THCROCK and friends.
|
||||||
*/
|
*/
|
||||||
void initThc_(const Opm::Deck& deck,
|
void initThc_(const Opm::Deck& deck,
|
||||||
const Opm::EclipseState& eclState,
|
const Opm::EclipseState& eclState,
|
||||||
const std::vector<int>& compressedToCartesianElemIdx)
|
const std::vector<int>& compressedToCartesianElemIdx)
|
||||||
{
|
{
|
||||||
heatCondApproach_ = HeatConductionLawParams::thcApproach;
|
thermalConductivityApproach_ = ThermalConductionLawParams::thcApproach;
|
||||||
|
|
||||||
const auto& props = eclState.get3DProperties();
|
const auto& props = eclState.get3DProperties();
|
||||||
|
|
||||||
@ -278,15 +278,15 @@ private:
|
|||||||
const std::vector<double>& poroData = props.getDoubleGridProperty("PORO").getData();
|
const std::vector<double>& poroData = props.getDoubleGridProperty("PORO").getData();
|
||||||
|
|
||||||
unsigned numElems = compressedToCartesianElemIdx.size();
|
unsigned numElems = compressedToCartesianElemIdx.size();
|
||||||
heatConductionLawParams_.resize(numElems);
|
thermalConductionLawParams_.resize(numElems);
|
||||||
for (unsigned elemIdx = 0; elemIdx < numElems; ++elemIdx) {
|
for (unsigned elemIdx = 0; elemIdx < numElems; ++elemIdx) {
|
||||||
int cartElemIdx = compressedToCartesianElemIdx[elemIdx];
|
int cartElemIdx = compressedToCartesianElemIdx[elemIdx];
|
||||||
|
|
||||||
auto& elemParams = heatConductionLawParams_[elemIdx];
|
auto& elemParams = thermalConductionLawParams_[elemIdx];
|
||||||
|
|
||||||
elemParams.setHeatConductionApproach(HeatConductionLawParams::thcApproach);
|
elemParams.setThermalConductionApproach(ThermalConductionLawParams::thcApproach);
|
||||||
|
|
||||||
auto& thcElemParams = elemParams.template getRealParams<HeatConductionLawParams::thcApproach>();
|
auto& thcElemParams = elemParams.template getRealParams<ThermalConductionLawParams::thcApproach>();
|
||||||
thcElemParams.setPorosity(poroData[cartElemIdx]);
|
thcElemParams.setPorosity(poroData[cartElemIdx]);
|
||||||
thcElemParams.setThcrock(thcrockData[cartElemIdx]);
|
thcElemParams.setThcrock(thcrockData[cartElemIdx]);
|
||||||
thcElemParams.setThcoil(thcoilData[cartElemIdx]);
|
thcElemParams.setThcoil(thcoilData[cartElemIdx]);
|
||||||
@ -299,26 +299,26 @@ private:
|
|||||||
}
|
}
|
||||||
|
|
||||||
/*!
|
/*!
|
||||||
* \brief Disable heat conductivity
|
* \brief Disable thermal conductivity
|
||||||
*/
|
*/
|
||||||
void initNullCond_(const Opm::Deck& deck,
|
void initNullCond_(const Opm::Deck& deck,
|
||||||
const Opm::EclipseState& eclState,
|
const Opm::EclipseState& eclState,
|
||||||
const std::vector<int>& compressedToCartesianElemIdx)
|
const std::vector<int>& compressedToCartesianElemIdx)
|
||||||
{
|
{
|
||||||
heatCondApproach_ = HeatConductionLawParams::nullApproach;
|
thermalConductivityApproach_ = ThermalConductionLawParams::nullApproach;
|
||||||
|
|
||||||
heatConductionLawParams_.resize(1);
|
thermalConductionLawParams_.resize(1);
|
||||||
heatConductionLawParams_[0].finalize();
|
thermalConductionLawParams_[0].finalize();
|
||||||
}
|
}
|
||||||
|
|
||||||
private:
|
private:
|
||||||
typename HeatConductionLawParams::HeatConductionApproach heatCondApproach_;
|
typename ThermalConductionLawParams::ThermalConductionApproach thermalConductivityApproach_;
|
||||||
typename SolidHeatLawParams::SolidEnergyApproach solidEnergyApproach_;
|
typename SolidEnergyLawParams::SolidEnergyApproach solidEnergyApproach_;
|
||||||
|
|
||||||
std::vector<unsigned> elemToSatnumIdx_;
|
std::vector<unsigned> elemToSatnumIdx_;
|
||||||
|
|
||||||
std::vector<SolidHeatLawParams> solidHeatLawParams_;
|
std::vector<SolidEnergyLawParams> solidEnergyLawParams_;
|
||||||
std::vector<HeatConductionLawParams> heatConductionLawParams_;
|
std::vector<ThermalConductionLawParams> thermalConductionLawParams_;
|
||||||
};
|
};
|
||||||
} // namespace Opm
|
} // namespace Opm
|
||||||
|
|
||||||
|
@ -22,12 +22,12 @@
|
|||||||
*/
|
*/
|
||||||
/*!
|
/*!
|
||||||
* \file
|
* \file
|
||||||
* \copydoc Opm::FluidHeatConduction
|
* \copydoc Opm::FluidThermalConduction
|
||||||
*/
|
*/
|
||||||
#ifndef OPM_FLUID_HEAT_CONDUCTION_LAW_HPP
|
#ifndef OPM_FLUID_THERMAL_CONDUCTION_LAW_HPP
|
||||||
#define OPM_FLUID_HEAT_CONDUCTION_LAW_HPP
|
#define OPM_FLUID_THERMAL_CONDUCTION_LAW_HPP
|
||||||
|
|
||||||
#include "FluidHeatConductionLawParams.hpp"
|
#include "FluidThermalConductionLawParams.hpp"
|
||||||
|
|
||||||
#include <opm/material/common/Spline.hpp>
|
#include <opm/material/common/Spline.hpp>
|
||||||
|
|
||||||
@ -37,25 +37,25 @@ namespace Opm {
|
|||||||
/*!
|
/*!
|
||||||
* \ingroup material
|
* \ingroup material
|
||||||
*
|
*
|
||||||
* \brief Implements a heat conduction law which just takes the conductivity of a given fluid phase.
|
* \brief Implements a thermal conduction law which just takes the conductivity of a given fluid phase.
|
||||||
*/
|
*/
|
||||||
template <class FluidSystem,
|
template <class FluidSystem,
|
||||||
class ScalarT,
|
class ScalarT,
|
||||||
int phaseIdx,
|
int phaseIdx,
|
||||||
class ParamsT = FluidHeatConductionLawParams<ScalarT> >
|
class ParamsT = FluidThermalConductionLawParams<ScalarT> >
|
||||||
class FluidHeatConductionLaw
|
class FluidThermalConductionLaw
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
typedef ParamsT Params;
|
typedef ParamsT Params;
|
||||||
typedef typename Params::Scalar Scalar;
|
typedef typename Params::Scalar Scalar;
|
||||||
|
|
||||||
/*!
|
/*!
|
||||||
* \brief Given a fluid state, return the effective heat conductivity [W/m^2 / (K/m)] of the porous
|
* \brief Given a fluid state, return the effective thermal conductivity [W/m^2 / (K/m)] of the porous
|
||||||
* medium.
|
* medium.
|
||||||
*/
|
*/
|
||||||
template <class FluidState, class Evaluation = typename FluidState::Scalar>
|
template <class FluidState, class Evaluation = typename FluidState::Scalar>
|
||||||
static Evaluation heatConductivity(const Params& params OPM_UNUSED,
|
static Evaluation thermalConductivity(const Params& params OPM_UNUSED,
|
||||||
const FluidState& fluidState)
|
const FluidState& fluidState)
|
||||||
{
|
{
|
||||||
typename FluidSystem::template ParameterCache<Evaluation> paramCache;
|
typename FluidSystem::template ParameterCache<Evaluation> paramCache;
|
||||||
paramCache.updatePhase(fluidState, phaseIdx);
|
paramCache.updatePhase(fluidState, phaseIdx);
|
@ -22,26 +22,26 @@
|
|||||||
*/
|
*/
|
||||||
/*!
|
/*!
|
||||||
* \file
|
* \file
|
||||||
* \copydoc Opm::FluidHeatConductionParams
|
* \copydoc Opm::FluidThermalConductionParams
|
||||||
*/
|
*/
|
||||||
#ifndef OPM_FLUID_HEAT_CONDUCTION_LAW_PARAMS_HPP
|
#ifndef OPM_FLUID_THERMAL_CONDUCTION_LAW_PARAMS_HPP
|
||||||
#define OPM_FLUID_HEAT_CONDUCTION_LAW_PARAMS_HPP
|
#define OPM_FLUID_THERMAL_CONDUCTION_LAW_PARAMS_HPP
|
||||||
|
|
||||||
namespace Opm {
|
namespace Opm {
|
||||||
/*!
|
/*!
|
||||||
* \brief Parameters for the heat conduction law which just takes the conductivity of a given fluid phase.
|
* \brief Parameters for the thermal conduction law which just takes the conductivity of a given fluid phase.
|
||||||
*/
|
*/
|
||||||
template <class ScalarT>
|
template <class ScalarT>
|
||||||
class FluidHeatConductionLawParams
|
class FluidThermalConductionLawParams
|
||||||
{
|
{
|
||||||
// do not copy!
|
// do not copy!
|
||||||
FluidHeatConductionLawParams(const FluidHeatConductionLawParams&)
|
FluidThermalConductionLawParams(const FluidThermalConductionLawParams&)
|
||||||
{}
|
{}
|
||||||
|
|
||||||
public:
|
public:
|
||||||
typedef ScalarT Scalar;
|
typedef ScalarT Scalar;
|
||||||
|
|
||||||
FluidHeatConductionLawParams()
|
FluidThermalConductionLawParams()
|
||||||
{ }
|
{ }
|
||||||
|
|
||||||
};
|
};
|
@ -22,41 +22,41 @@
|
|||||||
*/
|
*/
|
||||||
/*!
|
/*!
|
||||||
* \file
|
* \file
|
||||||
* \copydoc Opm::NullHeatConductionLaw
|
* \copydoc Opm::NullThermalConductionLaw
|
||||||
*/
|
*/
|
||||||
#ifndef OPM_NULL_HEATCONDUCTION_LAW_HPP
|
#ifndef OPM_NULL_THERMAL_CONDUCTION_LAW_HPP
|
||||||
#define OPM_NULL_HEATCONDUCTION_LAW_HPP
|
#define OPM_NULL_THERMAL_CONDUCTION_LAW_HPP
|
||||||
|
|
||||||
#include <opm/common/Unused.hpp>
|
#include <opm/common/Unused.hpp>
|
||||||
#include <opm/common/Exceptions.hpp>
|
#include <opm/common/Exceptions.hpp>
|
||||||
#include <opm/common/ErrorMacros.hpp>
|
#include <opm/common/ErrorMacros.hpp>
|
||||||
|
|
||||||
namespace Opm
|
namespace Opm {
|
||||||
{
|
|
||||||
/*!
|
/*!
|
||||||
* \ingroup material
|
* \ingroup material
|
||||||
*
|
*
|
||||||
* \brief Implements a dummy law for heat conduction to which isothermal models
|
* \brief Implements a dummy law for thermal conduction to which isothermal models
|
||||||
* can fall back to.
|
* can fall back to.
|
||||||
*
|
*
|
||||||
* This law just returns 0 unconditionally.
|
* This law just returns 0 unconditionally.
|
||||||
*/
|
*/
|
||||||
template <class ScalarT>
|
template <class ScalarT>
|
||||||
class NullHeatConductionLaw
|
class NullThermalConductionLaw
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
typedef int Params;
|
typedef int Params;
|
||||||
typedef ScalarT Scalar;
|
typedef ScalarT Scalar;
|
||||||
|
|
||||||
/*!
|
/*!
|
||||||
* \brief Given a fluid state, return the effective heat conductivity [W/m^2 / (K/m)] of the porous
|
* \brief Given a fluid state, return the effective thermal conductivity [W/m^2 / (K/m)] of the porous
|
||||||
* medium.
|
* medium.
|
||||||
*
|
*
|
||||||
* If this method is called an exception is thrown at run time.
|
* If this method is called an exception is thrown at run time.
|
||||||
*/
|
*/
|
||||||
template <class FluidState, class Evaluation = typename FluidState::Scalar>
|
template <class FluidState, class Evaluation = typename FluidState::Scalar>
|
||||||
static Evaluation heatConductivity(const Params& params OPM_UNUSED,
|
static Evaluation thermalConductivity(const Params& params OPM_UNUSED,
|
||||||
const FluidState& fluidState OPM_UNUSED)
|
const FluidState& fluidState OPM_UNUSED)
|
||||||
{ return 0.0; }
|
{ return 0.0; }
|
||||||
};
|
};
|
||||||
} // namespace Opm
|
} // namespace Opm
|
@ -22,12 +22,12 @@
|
|||||||
*/
|
*/
|
||||||
/*!
|
/*!
|
||||||
* \file
|
* \file
|
||||||
* \copydoc Opm::SomertonHeatConductionLaw
|
* \copydoc Opm::SomertonThermalConductionLaw
|
||||||
*/
|
*/
|
||||||
#ifndef OPM_SOMERTON_HEAT_CONDUCTION_LAW_HPP
|
#ifndef OPM_SOMERTON_THERMAL_CONDUCTION_LAW_HPP
|
||||||
#define OPM_SOMERTON_HEAT_CONDUCTION_LAW_HPP
|
#define OPM_SOMERTON_THERMAL_CONDUCTION_LAW_HPP
|
||||||
|
|
||||||
#include "SomertonHeatConductionLawParams.hpp"
|
#include "SomertonThermalConductionLawParams.hpp"
|
||||||
|
|
||||||
#include <opm/material/common/Spline.hpp>
|
#include <opm/material/common/Spline.hpp>
|
||||||
|
|
||||||
@ -36,13 +36,13 @@
|
|||||||
|
|
||||||
#include <algorithm>
|
#include <algorithm>
|
||||||
|
|
||||||
namespace Opm
|
namespace Opm {
|
||||||
{
|
|
||||||
/*!
|
/*!
|
||||||
* \ingroup material
|
* \ingroup material
|
||||||
*
|
*
|
||||||
* \brief Implements the Somerton law of heat conductivity in a
|
* \brief Implements the Somerton law of thermal conductivity in a
|
||||||
* porous medium.
|
* porous medium.
|
||||||
*
|
*
|
||||||
* See:
|
* See:
|
||||||
*
|
*
|
||||||
@ -59,8 +59,8 @@ namespace Opm
|
|||||||
*/
|
*/
|
||||||
template <class FluidSystem,
|
template <class FluidSystem,
|
||||||
class ScalarT,
|
class ScalarT,
|
||||||
class ParamsT = SomertonHeatConductionLawParams<FluidSystem::numPhases, ScalarT> >
|
class ParamsT = SomertonThermalConductionLawParams<FluidSystem::numPhases, ScalarT> >
|
||||||
class SomertonHeatConductionLaw
|
class SomertonThermalConductionLaw
|
||||||
{
|
{
|
||||||
enum { numPhases = FluidSystem::numPhases };
|
enum { numPhases = FluidSystem::numPhases };
|
||||||
|
|
||||||
@ -69,7 +69,7 @@ public:
|
|||||||
typedef typename Params::Scalar Scalar;
|
typedef typename Params::Scalar Scalar;
|
||||||
|
|
||||||
/*!
|
/*!
|
||||||
* \brief Given a fluid state, return the effective heat conductivity [W/m^2 / (K/m)] of the porous
|
* \brief Given a fluid state, return the effective thermal conductivity [W/m^2 / (K/m)] of the porous
|
||||||
* medium.
|
* medium.
|
||||||
*
|
*
|
||||||
* For two phases, the Somerton law is given by:
|
* For two phases, the Somerton law is given by:
|
||||||
@ -80,14 +80,14 @@ public:
|
|||||||
\sqrt{S_n}(\lambda_{ful,n} - \lambda_{vac})
|
\sqrt{S_n}(\lambda_{ful,n} - \lambda_{vac})
|
||||||
\f]
|
\f]
|
||||||
*
|
*
|
||||||
* where \f$\lambda_{vac}\f$ is the heat conductivity of the
|
* where \f$\lambda_{vac}\f$ is the thermal conductivity of the
|
||||||
* porous medium at vacuum, \f$\lambda_{ful,\alpha}\f$ is the heat
|
* porous medium at vacuum, \f$\lambda_{ful,\alpha}\f$ is the thermal
|
||||||
* conductivty of the porous medium if it is fully saturated by
|
* conductivty of the porous medium if it is fully saturated by
|
||||||
* phase \f$\alpha\f$ and \f$S_\alpha\f$ is the saturation of
|
* phase \f$\alpha\f$ and \f$S_\alpha\f$ is the saturation of
|
||||||
* phase \f$\alpha\f$.
|
* phase \f$\alpha\f$.
|
||||||
*/
|
*/
|
||||||
template <class FluidState, class Evaluation = typename FluidState::Scalar>
|
template <class FluidState, class Evaluation = typename FluidState::Scalar>
|
||||||
static Evaluation heatConductivity(const Params& params,
|
static Evaluation thermalConductivity(const Params& params,
|
||||||
const FluidState& fluidState)
|
const FluidState& fluidState)
|
||||||
{
|
{
|
||||||
Valgrind::CheckDefined(params.vacuumLambda());
|
Valgrind::CheckDefined(params.vacuumLambda());
|
@ -22,10 +22,10 @@
|
|||||||
*/
|
*/
|
||||||
/*!
|
/*!
|
||||||
* \file
|
* \file
|
||||||
* \copydoc Opm::SomertonHeatConductionLawParams
|
* \copydoc Opm::SomertonThermalConductionLawParams
|
||||||
*/
|
*/
|
||||||
#ifndef OPM_SOMERTON_HEAT_CONDUCTION_LAW_PARAMS_HPP
|
#ifndef OPM_SOMERTON_THERMAL_CONDUCTION_LAW_PARAMS_HPP
|
||||||
#define OPM_SOMERTON_HEAT_CONDUCTION_LAW_PARAMS_HPP
|
#define OPM_SOMERTON_THERMAL_CONDUCTION_LAW_PARAMS_HPP
|
||||||
|
|
||||||
#include <cassert>
|
#include <cassert>
|
||||||
|
|
||||||
@ -33,23 +33,23 @@ namespace Opm {
|
|||||||
|
|
||||||
/*!
|
/*!
|
||||||
* \brief The default implementation of a parameter object for the
|
* \brief The default implementation of a parameter object for the
|
||||||
* Somerton heat conduction law.
|
* Somerton thermal conduction law.
|
||||||
*/
|
*/
|
||||||
template <unsigned numPhases, class ScalarT>
|
template <unsigned numPhases, class ScalarT>
|
||||||
class SomertonHeatConductionLawParams
|
class SomertonThermalConductionLawParams
|
||||||
{
|
{
|
||||||
// do not copy!
|
// do not copy!
|
||||||
SomertonHeatConductionLawParams(const SomertonHeatConductionLawParams&)
|
SomertonThermalConductionLawParams(const SomertonThermalConductionLawParams&)
|
||||||
{}
|
{}
|
||||||
|
|
||||||
public:
|
public:
|
||||||
typedef ScalarT Scalar;
|
typedef ScalarT Scalar;
|
||||||
|
|
||||||
SomertonHeatConductionLawParams()
|
SomertonThermalConductionLawParams()
|
||||||
{ }
|
{ }
|
||||||
|
|
||||||
/*!
|
/*!
|
||||||
* \brief Return the "fully saturated" heat conductivity of the
|
* \brief Return the "fully saturated" thermal conductivity of the
|
||||||
* porous medium [W/m^2 / (K/m)].
|
* porous medium [W/m^2 / (K/m)].
|
||||||
*
|
*
|
||||||
* In this context "fully saturated" means that the whole pore
|
* In this context "fully saturated" means that the whole pore
|
||||||
@ -63,7 +63,7 @@ public:
|
|||||||
}
|
}
|
||||||
|
|
||||||
/*!
|
/*!
|
||||||
* \brief Set the "fully saturated" heat conductivity of the
|
* \brief Set the "fully saturated" thermal conductivity of the
|
||||||
* porous medium [W/m^2 / (K/m)].
|
* porous medium [W/m^2 / (K/m)].
|
||||||
*
|
*
|
||||||
* In this context "fully saturated" means that the whole pore
|
* In this context "fully saturated" means that the whole pore
|
||||||
@ -78,7 +78,7 @@ public:
|
|||||||
}
|
}
|
||||||
|
|
||||||
/*!
|
/*!
|
||||||
* \brief Return the heat conductivity of the porous medium at
|
* \brief Return the thermal conductivity of the porous medium at
|
||||||
* vacuum [W/m^2 / (K/m)].
|
* vacuum [W/m^2 / (K/m)].
|
||||||
*/
|
*/
|
||||||
Scalar vacuumLambda() const
|
Scalar vacuumLambda() const
|
||||||
@ -87,7 +87,7 @@ public:
|
|||||||
}
|
}
|
||||||
|
|
||||||
/*!
|
/*!
|
||||||
* \brief Set the "fully saturated" heat conductivity of the
|
* \brief Set the "fully saturated" thermal conductivity of the
|
||||||
* porous medium [W/m^2 / (K/m)].
|
* porous medium [W/m^2 / (K/m)].
|
||||||
*
|
*
|
||||||
* In this context "fully saturated" means that the whole pore
|
* In this context "fully saturated" means that the whole pore
|
@ -43,7 +43,7 @@
|
|||||||
#include <opm/material/fluidsystems/H2OAirMesityleneFluidSystem.hpp>
|
#include <opm/material/fluidsystems/H2OAirMesityleneFluidSystem.hpp>
|
||||||
#include <opm/material/fluidsystems/H2OAirXyleneFluidSystem.hpp>
|
#include <opm/material/fluidsystems/H2OAirXyleneFluidSystem.hpp>
|
||||||
|
|
||||||
#include <opm/material/thermal/FluidHeatConductionLaw.hpp>
|
#include <opm/material/thermal/FluidThermalConductionLaw.hpp>
|
||||||
|
|
||||||
// include all fluid states
|
// include all fluid states
|
||||||
#include <opm/material/fluidstates/PressureOverlayFluidState.hpp>
|
#include <opm/material/fluidstates/PressureOverlayFluidState.hpp>
|
||||||
|
Loading…
Reference in New Issue
Block a user