mirror of
https://github.com/OPM/opm-simulators.git
synced 2025-02-25 18:55:30 -06:00
Merge pull request #264 from andlaus/thermal_renames_and_fixes
consistently rename "heat conduction" to "thermal conduction" and use "solid energy" laws
This commit is contained in:
@@ -40,7 +40,7 @@
|
||||
#include <opm/material/fluidmatrixinteractions/RegularizedBrooksCorey.hpp>
|
||||
#include <opm/material/fluidmatrixinteractions/EffToAbsLaw.hpp>
|
||||
#include <opm/material/fluidmatrixinteractions/MaterialTraits.hpp>
|
||||
#include <opm/material/thermal/SomertonHeatConductionLaw.hpp>
|
||||
#include <opm/material/thermal/SomertonThermalConductionLaw.hpp>
|
||||
#include <opm/material/thermal/ConstantSolidHeatCapLaw.hpp>
|
||||
#include <opm/material/binarycoefficients/Brine_CO2.hpp>
|
||||
#include <opm/material/common/UniformTabulated2DFunction.hpp>
|
||||
@@ -123,8 +123,8 @@ public:
|
||||
typedef Opm::EffToAbsLaw<EffMaterialLaw> type;
|
||||
};
|
||||
|
||||
// Set the heat conduction law
|
||||
SET_PROP(Co2InjectionBaseProblem, HeatConductionLaw)
|
||||
// Set the thermal conduction law
|
||||
SET_PROP(Co2InjectionBaseProblem, ThermalConductionLaw)
|
||||
{
|
||||
private:
|
||||
typedef typename GET_PROP_TYPE(TypeTag, Scalar) Scalar;
|
||||
@@ -132,10 +132,10 @@ private:
|
||||
|
||||
public:
|
||||
// define the material law parameterized by absolute saturations
|
||||
typedef Opm::SomertonHeatConductionLaw<FluidSystem, Scalar> type;
|
||||
typedef Opm::SomertonThermalConductionLaw<FluidSystem, Scalar> type;
|
||||
};
|
||||
|
||||
// set the heat law for the solid phase
|
||||
// set the energy storage law for the solid phase
|
||||
SET_TYPE_PROP(Co2InjectionBaseProblem, SolidEnergyLaw,
|
||||
Opm::ConstantSolidHeatCapLaw<typename GET_PROP_TYPE(TypeTag, Scalar)>);
|
||||
|
||||
@@ -224,9 +224,9 @@ class Co2InjectionProblem : public GET_PROP_TYPE(TypeTag, BaseProblem)
|
||||
typedef typename GET_PROP_TYPE(TypeTag, Simulator) Simulator;
|
||||
typedef typename GET_PROP_TYPE(TypeTag, Model) Model;
|
||||
typedef typename GET_PROP_TYPE(TypeTag, MaterialLawParams) MaterialLawParams;
|
||||
typedef typename GET_PROP_TYPE(TypeTag, HeatConductionLaw) HeatConductionLaw;
|
||||
typedef typename GET_PROP_TYPE(TypeTag, ThermalConductionLaw) ThermalConductionLaw;
|
||||
typedef typename GET_PROP_TYPE(TypeTag, SolidEnergyLawParams) SolidEnergyLawParams;
|
||||
typedef typename HeatConductionLaw::Params HeatConductionLawParams;
|
||||
typedef typename ThermalConductionLaw::Params ThermalConductionLawParams;
|
||||
|
||||
typedef Opm::MathToolbox<Evaluation> Toolbox;
|
||||
typedef typename GridView::ctype CoordScalar;
|
||||
@@ -295,14 +295,14 @@ public:
|
||||
fineMaterialParams_.finalize();
|
||||
coarseMaterialParams_.finalize();
|
||||
|
||||
// parameters for the somerton law of heat conduction
|
||||
computeHeatCondParams_(fineHeatCondParams_, finePorosity_);
|
||||
computeHeatCondParams_(coarseHeatCondParams_, coarsePorosity_);
|
||||
// parameters for the somerton law thermal conduction
|
||||
computeThermalCondParams_(fineThermalCondParams_, finePorosity_);
|
||||
computeThermalCondParams_(coarseThermalCondParams_, coarsePorosity_);
|
||||
|
||||
// assume the volumetric heat capacity of granite
|
||||
solidHeatLawParams_.setSolidHeatCapacity(790.0 // specific heat capacity of granite [J / (kg K)]
|
||||
* 2700.0); // density of granite [kg/m^3]
|
||||
solidHeatLawParams_.finalize();
|
||||
// assume constant heat capacity and granite
|
||||
solidEnergyLawParams_.setSolidHeatCapacity(790.0 // specific heat capacity of granite [J / (kg K)]
|
||||
* 2700.0); // density of granite [kg/m^3]
|
||||
solidEnergyLawParams_.finalize();
|
||||
}
|
||||
|
||||
/*!
|
||||
@@ -439,24 +439,24 @@ public:
|
||||
*/
|
||||
template <class Context>
|
||||
const SolidEnergyLawParams&
|
||||
solidHeatLawParams(const Context& context OPM_UNUSED,
|
||||
unsigned spaceIdx OPM_UNUSED,
|
||||
unsigned timeIdx OPM_UNUSED) const
|
||||
{ return solidHeatLawParams_; }
|
||||
solidEnergyLawParams(const Context& context OPM_UNUSED,
|
||||
unsigned spaceIdx OPM_UNUSED,
|
||||
unsigned timeIdx OPM_UNUSED) const
|
||||
{ return solidEnergyLawParams_; }
|
||||
|
||||
/*!
|
||||
* \copydoc FvBaseMultiPhaseProblem::heatConductionParams
|
||||
* \copydoc FvBaseMultiPhaseProblem::thermalConductionParams
|
||||
*/
|
||||
template <class Context>
|
||||
const HeatConductionLawParams &
|
||||
heatConductionLawParams(const Context& context,
|
||||
const ThermalConductionLawParams &
|
||||
thermalConductionLawParams(const Context& context,
|
||||
unsigned spaceIdx,
|
||||
unsigned timeIdx) const
|
||||
{
|
||||
const GlobalPosition& pos = context.pos(spaceIdx, timeIdx);
|
||||
if (isFineMaterial_(pos))
|
||||
return fineHeatCondParams_;
|
||||
return coarseHeatCondParams_;
|
||||
return fineThermalCondParams_;
|
||||
return coarseThermalCondParams_;
|
||||
}
|
||||
|
||||
//! \}
|
||||
@@ -606,7 +606,7 @@ private:
|
||||
bool inHighTemperatureRegion_(const GlobalPosition& pos) const
|
||||
{ return (pos[0] > 20) && (pos[0] < 30) && (pos[1] > 5) && (pos[1] < 35); }
|
||||
|
||||
void computeHeatCondParams_(HeatConductionLawParams& params, Scalar poro)
|
||||
void computeThermalCondParams_(ThermalConductionLawParams& params, Scalar poro)
|
||||
{
|
||||
Scalar lambdaWater = 0.6;
|
||||
Scalar lambdaGranite = 2.8;
|
||||
@@ -633,9 +633,9 @@ private:
|
||||
MaterialLawParams fineMaterialParams_;
|
||||
MaterialLawParams coarseMaterialParams_;
|
||||
|
||||
HeatConductionLawParams fineHeatCondParams_;
|
||||
HeatConductionLawParams coarseHeatCondParams_;
|
||||
SolidEnergyLawParams solidHeatLawParams_;
|
||||
ThermalConductionLawParams fineThermalCondParams_;
|
||||
ThermalConductionLawParams coarseThermalCondParams_;
|
||||
SolidEnergyLawParams solidEnergyLawParams_;
|
||||
|
||||
Scalar temperature_;
|
||||
Scalar maxDepth_;
|
||||
|
||||
@@ -35,7 +35,8 @@
|
||||
#include <opm/material/fluidsystems/H2OAirMesityleneFluidSystem.hpp>
|
||||
#include <opm/material/fluidmatrixinteractions/ThreePhaseParkerVanGenuchten.hpp>
|
||||
#include <opm/material/fluidmatrixinteractions/LinearMaterial.hpp>
|
||||
#include <opm/material/thermal/SomertonHeatConductionLaw.hpp>
|
||||
#include <opm/material/thermal/ConstantSolidHeatCapLaw.hpp>
|
||||
#include <opm/material/thermal/SomertonThermalConductionLaw.hpp>
|
||||
#include <opm/material/constraintsolvers/MiscibleMultiPhaseComposition.hpp>
|
||||
#include <opm/material/fluidmatrixinteractions/MaterialTraits.hpp>
|
||||
#include <opm/common/Valgrind.hpp>
|
||||
@@ -95,8 +96,12 @@ public:
|
||||
typedef Opm::ThreePhaseParkerVanGenuchten<Traits> type;
|
||||
};
|
||||
|
||||
// Set the heat conduction law
|
||||
SET_PROP(CuvetteBaseProblem, HeatConductionLaw)
|
||||
// set the energy storage law for the solid phase
|
||||
SET_TYPE_PROP(CuvetteBaseProblem, SolidEnergyLaw,
|
||||
Opm::ConstantSolidHeatCapLaw<typename GET_PROP_TYPE(TypeTag, Scalar)>);
|
||||
|
||||
// Set the thermal conduction law
|
||||
SET_PROP(CuvetteBaseProblem, ThermalConductionLaw)
|
||||
{
|
||||
private:
|
||||
typedef typename GET_PROP_TYPE(TypeTag, Scalar) Scalar;
|
||||
@@ -104,7 +109,7 @@ private:
|
||||
|
||||
public:
|
||||
// define the material law parameterized by absolute saturations
|
||||
typedef Opm::SomertonHeatConductionLaw<FluidSystem, Scalar> type;
|
||||
typedef Opm::SomertonThermalConductionLaw<FluidSystem, Scalar> type;
|
||||
};
|
||||
|
||||
// The default for the end time of the simulation
|
||||
@@ -155,8 +160,8 @@ class CuvetteProblem : public GET_PROP_TYPE(TypeTag, BaseProblem)
|
||||
typedef typename GET_PROP_TYPE(TypeTag, GridView) GridView;
|
||||
typedef typename GET_PROP_TYPE(TypeTag, MaterialLaw) MaterialLaw;
|
||||
typedef typename GET_PROP_TYPE(TypeTag, MaterialLawParams) MaterialLawParams;
|
||||
typedef typename GET_PROP_TYPE(TypeTag, HeatConductionLaw) HeatConductionLaw;
|
||||
typedef typename GET_PROP_TYPE(TypeTag, HeatConductionLawParams) HeatConductionLawParams;
|
||||
typedef typename GET_PROP_TYPE(TypeTag, ThermalConductionLawParams) ThermalConductionLawParams;
|
||||
typedef typename GET_PROP_TYPE(TypeTag, SolidEnergyLawParams) SolidEnergyLawParams;
|
||||
typedef typename GET_PROP_TYPE(TypeTag, EqVector) EqVector;
|
||||
typedef typename GET_PROP_TYPE(TypeTag, PrimaryVariables) PrimaryVariables;
|
||||
typedef typename GET_PROP_TYPE(TypeTag, RateVector) RateVector;
|
||||
@@ -264,8 +269,13 @@ public:
|
||||
fineMaterialParams_.finalize();
|
||||
coarseMaterialParams_.finalize();
|
||||
|
||||
// initialize parameters for the heat conduction law
|
||||
computeHeatCondParams_(heatCondParams_, finePorosity_);
|
||||
// initialize parameters for the thermal conduction law
|
||||
computeThermalCondParams_(thermalCondParams_, finePorosity_);
|
||||
|
||||
// assume constant volumetric heat capacity and granite
|
||||
solidEnergyLawParams_.setSolidHeatCapacity(790.0 // specific heat capacity of granite [J / (kg K)]
|
||||
* 2700.0); // density of granite [kg/m^3]
|
||||
solidEnergyLawParams_.finalize();
|
||||
|
||||
initInjectFluidState_();
|
||||
}
|
||||
@@ -365,26 +375,14 @@ public:
|
||||
}
|
||||
|
||||
/*!
|
||||
* \copydoc FvBaseMultiPhaseProblem::heatConductionParams
|
||||
* \copydoc FvBaseMultiPhaseProblem::thermalConductionParams
|
||||
*/
|
||||
template <class Context>
|
||||
const HeatConductionLawParams &
|
||||
heatConductionParams(const Context& context OPM_UNUSED,
|
||||
const ThermalConductionLawParams &
|
||||
thermalConductionParams(const Context& context OPM_UNUSED,
|
||||
unsigned spaceIdx OPM_UNUSED,
|
||||
unsigned timeIdx OPM_UNUSED) const
|
||||
{ return heatCondParams_; }
|
||||
|
||||
/*!
|
||||
* \copydoc FvBaseMultiPhaseProblem::heatCapacitySolid
|
||||
*/
|
||||
template <class Context>
|
||||
Scalar heatCapacitySolid(const Context& context OPM_UNUSED,
|
||||
unsigned spaceIdx OPM_UNUSED,
|
||||
unsigned timeIdx OPM_UNUSED) const
|
||||
{
|
||||
return 850 // specific heat capacity [J / (kg K)]
|
||||
* 2650; // density of sand [kg/m^3]
|
||||
}
|
||||
{ return thermalCondParams_; }
|
||||
|
||||
//! \}
|
||||
|
||||
@@ -563,7 +561,7 @@ private:
|
||||
}
|
||||
}
|
||||
|
||||
void computeHeatCondParams_(HeatConductionLawParams& params, Scalar poro)
|
||||
void computeThermalCondParams_(ThermalConductionLawParams& params, Scalar poro)
|
||||
{
|
||||
Scalar lambdaGranite = 2.8; // [W / (K m)]
|
||||
|
||||
@@ -627,7 +625,8 @@ private:
|
||||
MaterialLawParams fineMaterialParams_;
|
||||
MaterialLawParams coarseMaterialParams_;
|
||||
|
||||
HeatConductionLawParams heatCondParams_;
|
||||
ThermalConductionLawParams thermalCondParams_;
|
||||
SolidEnergyLawParams solidEnergyLawParams_;
|
||||
|
||||
Opm::CompositionalFluidState<Scalar, FluidSystem> injectFluidState_;
|
||||
|
||||
|
||||
@@ -45,7 +45,7 @@
|
||||
#include <opm/material/fluidmatrixinteractions/LinearMaterial.hpp>
|
||||
#include <opm/material/fluidmatrixinteractions/EffToAbsLaw.hpp>
|
||||
#include <opm/material/fluidmatrixinteractions/MaterialTraits.hpp>
|
||||
#include <opm/material/thermal/SomertonHeatConductionLaw.hpp>
|
||||
#include <opm/material/thermal/SomertonThermalConductionLaw.hpp>
|
||||
#include <opm/material/thermal/ConstantSolidHeatCapLaw.hpp>
|
||||
#include <opm/material/fluidsystems/TwoPhaseImmiscibleFluidSystem.hpp>
|
||||
#include <opm/material/components/SimpleH2O.hpp>
|
||||
@@ -127,8 +127,8 @@ public:
|
||||
// Enable the energy equation
|
||||
SET_BOOL_PROP(FractureProblem, EnableEnergy, true);
|
||||
|
||||
// Set the heat conduction law
|
||||
SET_PROP(FractureProblem, HeatConductionLaw)
|
||||
// Set the thermal conduction law
|
||||
SET_PROP(FractureProblem, ThermalConductionLaw)
|
||||
{
|
||||
private:
|
||||
typedef typename GET_PROP_TYPE(TypeTag, Scalar) Scalar;
|
||||
@@ -136,10 +136,10 @@ private:
|
||||
|
||||
public:
|
||||
// define the material law parameterized by absolute saturations
|
||||
typedef Opm::SomertonHeatConductionLaw<FluidSystem, Scalar> type;
|
||||
typedef Opm::SomertonThermalConductionLaw<FluidSystem, Scalar> type;
|
||||
};
|
||||
|
||||
// set the heat law for the solid phase
|
||||
// set the energy storage law for the solid phase
|
||||
SET_TYPE_PROP(FractureProblem, SolidEnergyLaw,
|
||||
Opm::ConstantSolidHeatCapLaw<typename GET_PROP_TYPE(TypeTag, Scalar)>);
|
||||
|
||||
@@ -190,7 +190,7 @@ class FractureProblem : public GET_PROP_TYPE(TypeTag, BaseProblem)
|
||||
typedef typename GET_PROP_TYPE(TypeTag, Scalar) Scalar;
|
||||
typedef typename GET_PROP_TYPE(TypeTag, MaterialLaw) MaterialLaw;
|
||||
typedef typename GET_PROP_TYPE(TypeTag, MaterialLawParams) MaterialLawParams;
|
||||
typedef typename GET_PROP_TYPE(TypeTag, HeatConductionLawParams) HeatConductionLawParams;
|
||||
typedef typename GET_PROP_TYPE(TypeTag, ThermalConductionLawParams) ThermalConductionLawParams;
|
||||
typedef typename GET_PROP_TYPE(TypeTag, SolidEnergyLawParams) SolidEnergyLawParams;
|
||||
typedef typename GET_PROP_TYPE(TypeTag, Model) Model;
|
||||
|
||||
@@ -278,8 +278,8 @@ public:
|
||||
fracturePorosity_ = 0.25;
|
||||
fractureWidth_ = 1e-3; // [m]
|
||||
|
||||
// parameters for the somerton law of heat conduction
|
||||
initThermalParams_(heatCondParams_, matrixPorosity_);
|
||||
// initialize the energy-related parameters
|
||||
initEnergyParams_(thermalConductionParams_, matrixPorosity_);
|
||||
}
|
||||
|
||||
/*!
|
||||
@@ -420,26 +420,26 @@ public:
|
||||
{ return fractureWidth_; }
|
||||
|
||||
/*!
|
||||
* \brief Return the parameters for the heat storage law of the rock
|
||||
* \copydoc FvBaseMultiPhaseProblem::thermalConductionParams
|
||||
*/
|
||||
template <class Context>
|
||||
const ThermalConductionLawParams&
|
||||
thermalConductionLawParams(const Context& context OPM_UNUSED,
|
||||
unsigned spaceIdx OPM_UNUSED,
|
||||
unsigned timeIdx OPM_UNUSED) const
|
||||
{ return thermalConductionParams_; }
|
||||
|
||||
/*!
|
||||
* \brief Return the parameters for the energy storage law of the rock
|
||||
*
|
||||
* In this case, we assume the rock-matrix to be granite.
|
||||
*/
|
||||
template <class Context>
|
||||
const SolidEnergyLawParams&
|
||||
solidHeatLawParams(const Context& context OPM_UNUSED,
|
||||
unsigned spaceIdx OPM_UNUSED,
|
||||
unsigned timeIdx OPM_UNUSED) const
|
||||
{ return solidHeatLawParams_; }
|
||||
|
||||
/*!
|
||||
* \copydoc FvBaseMultiPhaseProblem::heatConductionParams
|
||||
*/
|
||||
template <class Context>
|
||||
const HeatConductionLawParams &
|
||||
heatConductionLawParams(const Context& context OPM_UNUSED,
|
||||
unsigned spaceIdx OPM_UNUSED,
|
||||
unsigned timeIdx OPM_UNUSED) const
|
||||
{ return heatCondParams_; }
|
||||
solidEnergyLawParams(const Context& context OPM_UNUSED,
|
||||
unsigned spaceIdx OPM_UNUSED,
|
||||
unsigned timeIdx OPM_UNUSED) const
|
||||
{ return solidEnergyParams_; }
|
||||
|
||||
// \}
|
||||
|
||||
@@ -581,12 +581,12 @@ private:
|
||||
bool onUpperBoundary_(const GlobalPosition& pos) const
|
||||
{ return pos[1] > this->boundingBoxMax()[1] - eps_; }
|
||||
|
||||
void initThermalParams_(HeatConductionLawParams& params, Scalar poro)
|
||||
void initEnergyParams_(ThermalConductionLawParams& params, Scalar poro)
|
||||
{
|
||||
// assume the volumetric heat capacity of granite
|
||||
solidHeatLawParams_.setSolidHeatCapacity(790.0 // specific heat capacity of granite [J / (kg K)]
|
||||
* 2700.0); // density of granite [kg/m^3]
|
||||
solidHeatLawParams_.finalize();
|
||||
solidEnergyParams_.setSolidHeatCapacity(790.0 // specific heat capacity of granite [J / (kg K)]
|
||||
* 2700.0); // density of granite [kg/m^3]
|
||||
solidEnergyParams_.finalize();
|
||||
|
||||
Scalar lambdaGranite = 2.8; // [W / (K m)]
|
||||
|
||||
@@ -633,8 +633,8 @@ private:
|
||||
MaterialLawParams fractureMaterialParams_;
|
||||
MaterialLawParams matrixMaterialParams_;
|
||||
|
||||
HeatConductionLawParams heatCondParams_;
|
||||
SolidEnergyLawParams solidHeatLawParams_;
|
||||
ThermalConductionLawParams thermalConductionParams_;
|
||||
SolidEnergyLawParams solidEnergyParams_;
|
||||
|
||||
Scalar temperature_;
|
||||
Scalar eps_;
|
||||
|
||||
@@ -34,7 +34,6 @@
|
||||
#include <opm/material/fluidmatrixinteractions/ThreePhaseParkerVanGenuchten.hpp>
|
||||
#include <opm/material/fluidmatrixinteractions/MaterialTraits.hpp>
|
||||
#include <opm/material/constraintsolvers/ComputeFromReferencePhase.hpp>
|
||||
#include <opm/material/thermal/SomertonHeatConductionLaw.hpp>
|
||||
#include <opm/common/Valgrind.hpp>
|
||||
#include <opm/common/Unused.hpp>
|
||||
|
||||
@@ -95,18 +94,6 @@ public:
|
||||
typedef Opm::ThreePhaseParkerVanGenuchten<Traits> type;
|
||||
};
|
||||
|
||||
// Set the heat conduction law
|
||||
SET_PROP(InfiltrationBaseProblem, HeatConductionLaw)
|
||||
{
|
||||
private:
|
||||
typedef typename GET_PROP_TYPE(TypeTag, Scalar) Scalar;
|
||||
typedef typename GET_PROP_TYPE(TypeTag, FluidSystem) FluidSystem;
|
||||
|
||||
public:
|
||||
// define the material law parameterized by absolute saturations
|
||||
typedef Opm::SomertonHeatConductionLaw<FluidSystem, Scalar> type;
|
||||
};
|
||||
|
||||
// The default for the end time of the simulation
|
||||
SET_SCALAR_PROP(InfiltrationBaseProblem, EndTime, 6e3);
|
||||
|
||||
@@ -318,20 +305,6 @@ public:
|
||||
unsigned timeIdx OPM_UNUSED) const
|
||||
{ return materialParams_; }
|
||||
|
||||
/*!
|
||||
* \copydoc FvBaseMultiPhaseProblem::heatCapacitySolid
|
||||
*
|
||||
* In this case, we assume the rock-matrix to be quartz.
|
||||
*/
|
||||
template <class Context>
|
||||
Scalar heatCapacitySolid(const Context& context OPM_UNUSED,
|
||||
unsigned spaceIdx OPM_UNUSED,
|
||||
unsigned timeIdx OPM_UNUSED) const
|
||||
{
|
||||
return 850. // specific heat capacity [J / (kg K)]
|
||||
* 2650.; // density of sand [kg/m^3]
|
||||
}
|
||||
|
||||
//! \}
|
||||
|
||||
/*!
|
||||
|
||||
@@ -37,7 +37,8 @@
|
||||
#include <opm/material/fluidmatrixinteractions/EffToAbsLaw.hpp>
|
||||
#include <opm/material/fluidmatrixinteractions/LinearMaterial.hpp>
|
||||
#include <opm/material/fluidmatrixinteractions/MaterialTraits.hpp>
|
||||
#include <opm/material/thermal/SomertonHeatConductionLaw.hpp>
|
||||
#include <opm/material/thermal/ConstantSolidHeatCapLaw.hpp>
|
||||
#include <opm/material/thermal/SomertonThermalConductionLaw.hpp>
|
||||
#include <opm/common/Unused.hpp>
|
||||
|
||||
#include <dune/grid/yaspgrid.hh>
|
||||
@@ -88,8 +89,8 @@ public:
|
||||
typedef Opm::EffToAbsLaw<EffMaterialLaw> type;
|
||||
};
|
||||
|
||||
// Set the heat conduction law
|
||||
SET_PROP(ObstacleBaseProblem, HeatConductionLaw)
|
||||
// Set the thermal conduction law
|
||||
SET_PROP(ObstacleBaseProblem, ThermalConductionLaw)
|
||||
{
|
||||
private:
|
||||
typedef typename GET_PROP_TYPE(TypeTag, Scalar) Scalar;
|
||||
@@ -97,9 +98,13 @@ private:
|
||||
|
||||
public:
|
||||
// define the material law parameterized by absolute saturations
|
||||
typedef Opm::SomertonHeatConductionLaw<FluidSystem, Scalar> type;
|
||||
typedef Opm::SomertonThermalConductionLaw<FluidSystem, Scalar> type;
|
||||
};
|
||||
|
||||
// set the energy storage law for the solid phase
|
||||
SET_TYPE_PROP(ObstacleBaseProblem, SolidEnergyLaw,
|
||||
Opm::ConstantSolidHeatCapLaw<typename GET_PROP_TYPE(TypeTag, Scalar)>);
|
||||
|
||||
// Enable gravity
|
||||
SET_BOOL_PROP(ObstacleBaseProblem, EnableGravity, true);
|
||||
|
||||
@@ -155,8 +160,8 @@ class ObstacleProblem : public GET_PROP_TYPE(TypeTag, BaseProblem)
|
||||
typedef typename GET_PROP_TYPE(TypeTag, FluidSystem) FluidSystem;
|
||||
typedef typename GET_PROP_TYPE(TypeTag, MaterialLaw) MaterialLaw;
|
||||
typedef typename GET_PROP_TYPE(TypeTag, MaterialLawParams) MaterialLawParams;
|
||||
typedef typename GET_PROP_TYPE(TypeTag, HeatConductionLaw) HeatConductionLaw;
|
||||
typedef typename HeatConductionLaw::Params HeatConductionLawParams;
|
||||
typedef typename GET_PROP_TYPE(TypeTag, ThermalConductionLawParams) ThermalConductionLawParams;
|
||||
typedef typename GET_PROP_TYPE(TypeTag, SolidEnergyLawParams) SolidEnergyLawParams;
|
||||
|
||||
enum {
|
||||
// Grid and world dimension
|
||||
@@ -238,9 +243,14 @@ public:
|
||||
fineMaterialParams_.finalize();
|
||||
coarseMaterialParams_.finalize();
|
||||
|
||||
// parameters for the somerton law of heat conduction
|
||||
computeHeatCondParams_(fineHeatCondParams_, finePorosity_);
|
||||
computeHeatCondParams_(coarseHeatCondParams_, coarsePorosity_);
|
||||
// parameters for the somerton law of thermal conduction
|
||||
computeThermalCondParams_(fineThermalCondParams_, finePorosity_);
|
||||
computeThermalCondParams_(coarseThermalCondParams_, coarsePorosity_);
|
||||
|
||||
// assume constant volumetric heat capacity and granite
|
||||
solidEnergyLawParams_.setSolidHeatCapacity(790.0 // specific heat capacity of granite [J / (kg K)]
|
||||
* 2700.0); // density of granite [kg/m^3]
|
||||
solidEnergyLawParams_.finalize();
|
||||
|
||||
initFluidStates_();
|
||||
}
|
||||
@@ -350,33 +360,30 @@ public:
|
||||
}
|
||||
|
||||
/*!
|
||||
* \copydoc FvBaseMultiPhaseProblem::heatCapacitySolid
|
||||
* \brief Return the parameters for the energy storage law of the rock
|
||||
*
|
||||
* For this problem, we assume that the solid phase of the porous
|
||||
* medium is granite.
|
||||
* In this case, we assume the rock-matrix to be granite.
|
||||
*/
|
||||
template <class Context>
|
||||
Scalar heatCapacitySolid(const Context& context OPM_UNUSED,
|
||||
unsigned spaceIdx OPM_UNUSED,
|
||||
unsigned timeIdx OPM_UNUSED) const
|
||||
{
|
||||
return 790 // specific heat capacity of granite [J / (kg K)]
|
||||
* 2700; // density of granite [kg/m^3]
|
||||
}
|
||||
const SolidEnergyLawParams&
|
||||
solidEnergyLawParams(const Context& context OPM_UNUSED,
|
||||
unsigned spaceIdx OPM_UNUSED,
|
||||
unsigned timeIdx OPM_UNUSED) const
|
||||
{ return solidEnergyLawParams_; }
|
||||
|
||||
/*!
|
||||
* \copydoc FvBaseMultiPhaseProblem::heatConductionParams
|
||||
* \copydoc FvBaseMultiPhaseProblem::thermalConductionParams
|
||||
*/
|
||||
template <class Context>
|
||||
const HeatConductionLawParams &
|
||||
heatConductionParams(const Context& context,
|
||||
const ThermalConductionLawParams &
|
||||
thermalConductionParams(const Context& context,
|
||||
unsigned spaceIdx,
|
||||
unsigned timeIdx) const
|
||||
{
|
||||
const GlobalPosition& pos = context.pos(spaceIdx, timeIdx);
|
||||
if (isFineMaterial_(pos))
|
||||
return fineHeatCondParams_;
|
||||
return coarseHeatCondParams_;
|
||||
return fineThermalCondParams_;
|
||||
return coarseThermalCondParams_;
|
||||
}
|
||||
|
||||
//! \}
|
||||
@@ -530,7 +537,7 @@ private:
|
||||
/*setEnthalpy=*/false);
|
||||
}
|
||||
|
||||
void computeHeatCondParams_(HeatConductionLawParams& params, Scalar poro)
|
||||
void computeThermalCondParams_(ThermalConductionLawParams& params, Scalar poro)
|
||||
{
|
||||
Scalar lambdaWater = 0.6;
|
||||
Scalar lambdaGranite = 2.8;
|
||||
@@ -553,8 +560,9 @@ private:
|
||||
MaterialLawParams fineMaterialParams_;
|
||||
MaterialLawParams coarseMaterialParams_;
|
||||
|
||||
HeatConductionLawParams fineHeatCondParams_;
|
||||
HeatConductionLawParams coarseHeatCondParams_;
|
||||
ThermalConductionLawParams fineThermalCondParams_;
|
||||
ThermalConductionLawParams coarseThermalCondParams_;
|
||||
SolidEnergyLawParams solidEnergyLawParams_;
|
||||
|
||||
Opm::CompositionalFluidState<Scalar, FluidSystem> inletFluidState_;
|
||||
Opm::CompositionalFluidState<Scalar, FluidSystem> outletFluidState_;
|
||||
|
||||
@@ -38,8 +38,8 @@
|
||||
#include <opm/material/fluidmatrixinteractions/RegularizedBrooksCorey.hpp>
|
||||
#include <opm/material/fluidmatrixinteractions/EffToAbsLaw.hpp>
|
||||
#include <opm/material/fluidmatrixinteractions/MaterialTraits.hpp>
|
||||
#include <opm/material/thermal/SomertonHeatConductionLaw.hpp>
|
||||
#include <opm/material/thermal/ConstantSolidHeatCapLaw.hpp>
|
||||
#include <opm/material/thermal/SomertonThermalConductionLaw.hpp>
|
||||
#include <opm/material/constraintsolvers/ComputeFromReferencePhase.hpp>
|
||||
#include <opm/common/Unused.hpp>
|
||||
|
||||
@@ -88,8 +88,8 @@ public:
|
||||
typedef Opm::EffToAbsLaw<EffMaterialLaw> type;
|
||||
};
|
||||
|
||||
// Set the heat conduction law
|
||||
SET_PROP(WaterAirBaseProblem, HeatConductionLaw)
|
||||
// Set the thermal conduction law
|
||||
SET_PROP(WaterAirBaseProblem, ThermalConductionLaw)
|
||||
{
|
||||
private:
|
||||
typedef typename GET_PROP_TYPE(TypeTag, Scalar) Scalar;
|
||||
@@ -97,10 +97,10 @@ private:
|
||||
|
||||
public:
|
||||
// define the material law parameterized by absolute saturations
|
||||
typedef Opm::SomertonHeatConductionLaw<FluidSystem, Scalar> type;
|
||||
typedef Opm::SomertonThermalConductionLaw<FluidSystem, Scalar> type;
|
||||
};
|
||||
|
||||
// set the heat law for the solid phase
|
||||
// set the energy storage law for the solid phase
|
||||
SET_TYPE_PROP(WaterAirBaseProblem, SolidEnergyLaw,
|
||||
Opm::ConstantSolidHeatCapLaw<typename GET_PROP_TYPE(TypeTag, Scalar)>);
|
||||
|
||||
@@ -211,7 +211,7 @@ class WaterAirProblem : public GET_PROP_TYPE(TypeTag, BaseProblem)
|
||||
typedef typename GET_PROP_TYPE(TypeTag, Model) Model;
|
||||
typedef typename GET_PROP_TYPE(TypeTag, MaterialLaw) MaterialLaw;
|
||||
typedef typename GET_PROP_TYPE(TypeTag, MaterialLawParams) MaterialLawParams;
|
||||
typedef typename GET_PROP_TYPE(TypeTag, HeatConductionLawParams) HeatConductionLawParams;
|
||||
typedef typename GET_PROP_TYPE(TypeTag, ThermalConductionLawParams) ThermalConductionLawParams;
|
||||
typedef typename GET_PROP_TYPE(TypeTag, SolidEnergyLawParams) SolidEnergyLawParams;
|
||||
|
||||
typedef typename GridView::ctype CoordScalar;
|
||||
@@ -265,14 +265,14 @@ public:
|
||||
fineMaterialParams_.finalize();
|
||||
coarseMaterialParams_.finalize();
|
||||
|
||||
// parameters for the somerton law of heat conduction
|
||||
computeHeatCondParams_(fineHeatCondParams_, finePorosity_);
|
||||
computeHeatCondParams_(coarseHeatCondParams_, coarsePorosity_);
|
||||
// parameters for the somerton law of thermal conduction
|
||||
computeThermalCondParams_(fineThermalCondParams_, finePorosity_);
|
||||
computeThermalCondParams_(coarseThermalCondParams_, coarsePorosity_);
|
||||
|
||||
// assume the volumetric heat capacity of granite
|
||||
solidHeatLawParams_.setSolidHeatCapacity(790.0 // specific heat capacity of granite [J / (kg K)]
|
||||
* 2700.0); // density of granite [kg/m^3]
|
||||
solidHeatLawParams_.finalize();
|
||||
// assume constant volumetric heat capacity and granite
|
||||
solidEnergyLawParams_.setSolidHeatCapacity(790.0 // specific heat capacity of granite [J / (kg K)]
|
||||
* 2700.0); // density of granite [kg/m^3]
|
||||
solidEnergyLawParams_.finalize();
|
||||
}
|
||||
|
||||
/*!
|
||||
@@ -358,30 +358,30 @@ public:
|
||||
}
|
||||
|
||||
/*!
|
||||
* \brief Return the parameters for the heat storage law of the rock
|
||||
* \brief Return the parameters for the energy storage law of the rock
|
||||
*
|
||||
* In this case, we assume the rock-matrix to be granite.
|
||||
*/
|
||||
template <class Context>
|
||||
const SolidEnergyLawParams&
|
||||
solidHeatLawParams(const Context& context OPM_UNUSED,
|
||||
unsigned spaceIdx OPM_UNUSED,
|
||||
unsigned timeIdx OPM_UNUSED) const
|
||||
{ return solidHeatLawParams_; }
|
||||
solidEnergyLawParams(const Context& context OPM_UNUSED,
|
||||
unsigned spaceIdx OPM_UNUSED,
|
||||
unsigned timeIdx OPM_UNUSED) const
|
||||
{ return solidEnergyLawParams_; }
|
||||
|
||||
/*!
|
||||
* \copydoc FvBaseMultiPhaseProblem::heatConductionParams
|
||||
* \copydoc FvBaseMultiPhaseProblem::thermalConductionParams
|
||||
*/
|
||||
template <class Context>
|
||||
const HeatConductionLawParams&
|
||||
heatConductionLawParams(const Context& context,
|
||||
const ThermalConductionLawParams&
|
||||
thermalConductionLawParams(const Context& context,
|
||||
unsigned spaceIdx,
|
||||
unsigned timeIdx) const
|
||||
{
|
||||
const GlobalPosition& pos = context.pos(spaceIdx, timeIdx);
|
||||
if (isFineMaterial_(pos))
|
||||
return fineHeatCondParams_;
|
||||
return coarseHeatCondParams_;
|
||||
return fineThermalCondParams_;
|
||||
return coarseThermalCondParams_;
|
||||
}
|
||||
|
||||
//! \}
|
||||
@@ -530,7 +530,7 @@ private:
|
||||
CFRP::solve(fs, paramCache, liquidPhaseIdx, /*setViscosity=*/false, /*setEnthalpy=*/true);
|
||||
}
|
||||
|
||||
void computeHeatCondParams_(HeatConductionLawParams& params, Scalar poro)
|
||||
void computeThermalCondParams_(ThermalConductionLawParams& params, Scalar poro)
|
||||
{
|
||||
Scalar lambdaGranite = 2.8; // [W / (K m)]
|
||||
|
||||
@@ -577,9 +577,9 @@ private:
|
||||
MaterialLawParams fineMaterialParams_;
|
||||
MaterialLawParams coarseMaterialParams_;
|
||||
|
||||
HeatConductionLawParams fineHeatCondParams_;
|
||||
HeatConductionLawParams coarseHeatCondParams_;
|
||||
SolidEnergyLawParams solidHeatLawParams_;
|
||||
ThermalConductionLawParams fineThermalCondParams_;
|
||||
ThermalConductionLawParams coarseThermalCondParams_;
|
||||
SolidEnergyLawParams solidEnergyLawParams_;
|
||||
|
||||
Scalar maxDepth_;
|
||||
Scalar eps_;
|
||||
|
||||
Reference in New Issue
Block a user