mirror of
https://github.com/OPM/opm-simulators.git
synced 2025-02-25 18:55:30 -06:00
adapt to the refactoring of the thermal laws in opm-material
This commit is contained in:
parent
c0f013e25e
commit
db2977b0bf
@ -40,7 +40,8 @@
|
||||
#include <opm/material/fluidmatrixinteractions/RegularizedBrooksCorey.hpp>
|
||||
#include <opm/material/fluidmatrixinteractions/EffToAbsLaw.hpp>
|
||||
#include <opm/material/fluidmatrixinteractions/MaterialTraits.hpp>
|
||||
#include <opm/material/heatconduction/Somerton.hpp>
|
||||
#include <opm/material/thermal/SomertonHeatConductionLaw.hpp>
|
||||
#include <opm/material/thermal/ConstantSolidHeatCapLaw.hpp>
|
||||
#include <opm/material/binarycoefficients/Brine_CO2.hpp>
|
||||
#include <opm/material/common/UniformTabulated2DFunction.hpp>
|
||||
#include <opm/common/Unused.hpp>
|
||||
@ -131,9 +132,13 @@ private:
|
||||
|
||||
public:
|
||||
// define the material law parameterized by absolute saturations
|
||||
typedef Opm::Somerton<FluidSystem, Scalar> type;
|
||||
typedef Opm::SomertonHeatConductionLaw<FluidSystem, Scalar> type;
|
||||
};
|
||||
|
||||
// set the heat law for the solid phase
|
||||
SET_TYPE_PROP(Co2InjectionBaseProblem, SolidEnergyLaw,
|
||||
Opm::ConstantSolidHeatCapLaw<typename GET_PROP_TYPE(TypeTag, Scalar)>);
|
||||
|
||||
// Use the algebraic multi-grid linear solver for this problem
|
||||
SET_TAG_PROP(Co2InjectionBaseProblem, LinearSolverSplice, ParallelAmgLinearSolver);
|
||||
|
||||
@ -217,9 +222,10 @@ class Co2InjectionProblem : public GET_PROP_TYPE(TypeTag, BaseProblem)
|
||||
typedef typename GET_PROP_TYPE(TypeTag, BoundaryRateVector) BoundaryRateVector;
|
||||
typedef typename GET_PROP_TYPE(TypeTag, MaterialLaw) MaterialLaw;
|
||||
typedef typename GET_PROP_TYPE(TypeTag, Simulator) Simulator;
|
||||
typedef typename GET_PROP_TYPE(TypeTag, MaterialLawParams) MaterialLawParams;
|
||||
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, SolidEnergyLawParams) SolidEnergyLawParams;
|
||||
typedef typename HeatConductionLaw::Params HeatConductionLawParams;
|
||||
|
||||
typedef Opm::MathToolbox<Evaluation> Toolbox;
|
||||
@ -292,6 +298,11 @@ public:
|
||||
// parameters for the somerton law of heat conduction
|
||||
computeHeatCondParams_(fineHeatCondParams_, finePorosity_);
|
||||
computeHeatCondParams_(coarseHeatCondParams_, 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();
|
||||
}
|
||||
|
||||
/*!
|
||||
@ -422,25 +433,25 @@ public:
|
||||
}
|
||||
|
||||
/*!
|
||||
* \copydoc FvBaseMultiPhaseProblem::heatCapacitySolid
|
||||
* \brief Return the parameters for the heat storage law of the rock
|
||||
*
|
||||
* 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&
|
||||
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 &
|
||||
heatConductionParams(const Context& context, unsigned spaceIdx, unsigned timeIdx) const
|
||||
heatConductionLawParams(const Context& context,
|
||||
unsigned spaceIdx,
|
||||
unsigned timeIdx) const
|
||||
{
|
||||
const GlobalPosition& pos = context.pos(spaceIdx, timeIdx);
|
||||
if (isFineMaterial_(pos))
|
||||
@ -624,6 +635,7 @@ private:
|
||||
|
||||
HeatConductionLawParams fineHeatCondParams_;
|
||||
HeatConductionLawParams coarseHeatCondParams_;
|
||||
SolidEnergyLawParams solidHeatLawParams_;
|
||||
|
||||
Scalar temperature_;
|
||||
Scalar maxDepth_;
|
||||
|
@ -35,7 +35,7 @@
|
||||
#include <opm/material/fluidsystems/H2OAirMesityleneFluidSystem.hpp>
|
||||
#include <opm/material/fluidmatrixinteractions/ThreePhaseParkerVanGenuchten.hpp>
|
||||
#include <opm/material/fluidmatrixinteractions/LinearMaterial.hpp>
|
||||
#include <opm/material/heatconduction/Somerton.hpp>
|
||||
#include <opm/material/thermal/SomertonHeatConductionLaw.hpp>
|
||||
#include <opm/material/constraintsolvers/MiscibleMultiPhaseComposition.hpp>
|
||||
#include <opm/material/fluidmatrixinteractions/MaterialTraits.hpp>
|
||||
#include <opm/common/Valgrind.hpp>
|
||||
@ -104,7 +104,7 @@ private:
|
||||
|
||||
public:
|
||||
// define the material law parameterized by absolute saturations
|
||||
typedef Opm::Somerton<FluidSystem, Scalar> type;
|
||||
typedef Opm::SomertonHeatConductionLaw<FluidSystem, Scalar> type;
|
||||
};
|
||||
|
||||
// The default for the end time of the simulation
|
||||
|
@ -34,7 +34,7 @@
|
||||
#include <opm/material/fluidmatrixinteractions/ThreePhaseParkerVanGenuchten.hpp>
|
||||
#include <opm/material/fluidmatrixinteractions/MaterialTraits.hpp>
|
||||
#include <opm/material/constraintsolvers/ComputeFromReferencePhase.hpp>
|
||||
#include <opm/material/heatconduction/Somerton.hpp>
|
||||
#include <opm/material/thermal/SomertonHeatConductionLaw.hpp>
|
||||
#include <opm/common/Valgrind.hpp>
|
||||
#include <opm/common/Unused.hpp>
|
||||
|
||||
@ -104,7 +104,7 @@ private:
|
||||
|
||||
public:
|
||||
// define the material law parameterized by absolute saturations
|
||||
typedef Opm::Somerton<FluidSystem, Scalar> type;
|
||||
typedef Opm::SomertonHeatConductionLaw<FluidSystem, Scalar> type;
|
||||
};
|
||||
|
||||
// The default for the end time of the simulation
|
||||
|
@ -37,7 +37,7 @@
|
||||
#include <opm/material/fluidmatrixinteractions/EffToAbsLaw.hpp>
|
||||
#include <opm/material/fluidmatrixinteractions/LinearMaterial.hpp>
|
||||
#include <opm/material/fluidmatrixinteractions/MaterialTraits.hpp>
|
||||
#include <opm/material/heatconduction/Somerton.hpp>
|
||||
#include <opm/material/thermal/SomertonHeatConductionLaw.hpp>
|
||||
#include <opm/common/Unused.hpp>
|
||||
|
||||
#include <dune/grid/yaspgrid.hh>
|
||||
@ -97,7 +97,7 @@ private:
|
||||
|
||||
public:
|
||||
// define the material law parameterized by absolute saturations
|
||||
typedef Opm::Somerton<FluidSystem, Scalar> type;
|
||||
typedef Opm::SomertonHeatConductionLaw<FluidSystem, Scalar> type;
|
||||
};
|
||||
|
||||
// Enable gravity
|
||||
|
@ -38,7 +38,8 @@
|
||||
#include <opm/material/fluidmatrixinteractions/RegularizedBrooksCorey.hpp>
|
||||
#include <opm/material/fluidmatrixinteractions/EffToAbsLaw.hpp>
|
||||
#include <opm/material/fluidmatrixinteractions/MaterialTraits.hpp>
|
||||
#include <opm/material/heatconduction/Somerton.hpp>
|
||||
#include <opm/material/thermal/SomertonHeatConductionLaw.hpp>
|
||||
#include <opm/material/thermal/ConstantSolidHeatCapLaw.hpp>
|
||||
#include <opm/material/constraintsolvers/ComputeFromReferencePhase.hpp>
|
||||
#include <opm/common/Unused.hpp>
|
||||
|
||||
@ -96,9 +97,13 @@ private:
|
||||
|
||||
public:
|
||||
// define the material law parameterized by absolute saturations
|
||||
typedef Opm::Somerton<FluidSystem, Scalar> type;
|
||||
typedef Opm::SomertonHeatConductionLaw<FluidSystem, Scalar> type;
|
||||
};
|
||||
|
||||
// set the heat law for the solid phase
|
||||
SET_TYPE_PROP(WaterAirBaseProblem, SolidEnergyLaw,
|
||||
Opm::ConstantSolidHeatCapLaw<typename GET_PROP_TYPE(TypeTag, Scalar)>);
|
||||
|
||||
// Set the fluid system. in this case, we use the one which describes
|
||||
// air and water
|
||||
SET_TYPE_PROP(WaterAirBaseProblem, FluidSystem,
|
||||
@ -206,8 +211,8 @@ 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, HeatConductionLaw) HeatConductionLaw;
|
||||
typedef typename GET_PROP_TYPE(TypeTag, HeatConductionLawParams) HeatConductionLawParams;
|
||||
typedef typename GET_PROP_TYPE(TypeTag, SolidEnergyLawParams) SolidEnergyLawParams;
|
||||
|
||||
typedef typename GridView::ctype CoordScalar;
|
||||
typedef Dune::FieldVector<CoordScalar, dimWorld> GlobalPosition;
|
||||
@ -263,6 +268,11 @@ public:
|
||||
// parameters for the somerton law of heat conduction
|
||||
computeHeatCondParams_(fineHeatCondParams_, finePorosity_);
|
||||
computeHeatCondParams_(coarseHeatCondParams_, 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();
|
||||
}
|
||||
|
||||
/*!
|
||||
@ -348,26 +358,25 @@ public:
|
||||
}
|
||||
|
||||
/*!
|
||||
* \copydoc FvBaseMultiPhaseProblem::heatCapacitySolid
|
||||
* \brief Return the parameters for the heat storage law of the rock
|
||||
*
|
||||
* 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&
|
||||
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&
|
||||
heatConductionParams(const Context& context, unsigned spaceIdx, unsigned timeIdx) const
|
||||
heatConductionLawParams(const Context& context,
|
||||
unsigned spaceIdx,
|
||||
unsigned timeIdx) const
|
||||
{
|
||||
const GlobalPosition& pos = context.pos(spaceIdx, timeIdx);
|
||||
if (isFineMaterial_(pos))
|
||||
@ -570,6 +579,7 @@ private:
|
||||
|
||||
HeatConductionLawParams fineHeatCondParams_;
|
||||
HeatConductionLawParams coarseHeatCondParams_;
|
||||
SolidEnergyLawParams solidHeatLawParams_;
|
||||
|
||||
Scalar maxDepth_;
|
||||
Scalar eps_;
|
||||
|
Loading…
Reference in New Issue
Block a user