diff --git a/examples/problems/co2injectionproblem.hh b/examples/problems/co2injectionproblem.hh index 8a129a273..b496c0edb 100644 --- a/examples/problems/co2injectionproblem.hh +++ b/examples/problems/co2injectionproblem.hh @@ -40,7 +40,8 @@ #include #include #include -#include +#include +#include #include #include #include @@ -131,9 +132,13 @@ private: public: // define the material law parameterized by absolute saturations - typedef Opm::Somerton type; + typedef Opm::SomertonHeatConductionLaw type; }; +// set the heat law for the solid phase +SET_TYPE_PROP(Co2InjectionBaseProblem, SolidEnergyLaw, + Opm::ConstantSolidHeatCapLaw); + // 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 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 - 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 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_; diff --git a/examples/problems/cuvetteproblem.hh b/examples/problems/cuvetteproblem.hh index 3b7f04f69..f60e9f483 100644 --- a/examples/problems/cuvetteproblem.hh +++ b/examples/problems/cuvetteproblem.hh @@ -35,7 +35,7 @@ #include #include #include -#include +#include #include #include #include @@ -104,7 +104,7 @@ private: public: // define the material law parameterized by absolute saturations - typedef Opm::Somerton type; + typedef Opm::SomertonHeatConductionLaw type; }; // The default for the end time of the simulation diff --git a/examples/problems/infiltrationproblem.hh b/examples/problems/infiltrationproblem.hh index 7650b056c..51edb209e 100644 --- a/examples/problems/infiltrationproblem.hh +++ b/examples/problems/infiltrationproblem.hh @@ -34,7 +34,7 @@ #include #include #include -#include +#include #include #include @@ -104,7 +104,7 @@ private: public: // define the material law parameterized by absolute saturations - typedef Opm::Somerton type; + typedef Opm::SomertonHeatConductionLaw type; }; // The default for the end time of the simulation diff --git a/examples/problems/obstacleproblem.hh b/examples/problems/obstacleproblem.hh index 390e74249..c2b384385 100644 --- a/examples/problems/obstacleproblem.hh +++ b/examples/problems/obstacleproblem.hh @@ -37,7 +37,7 @@ #include #include #include -#include +#include #include #include @@ -97,7 +97,7 @@ private: public: // define the material law parameterized by absolute saturations - typedef Opm::Somerton type; + typedef Opm::SomertonHeatConductionLaw type; }; // Enable gravity diff --git a/examples/problems/waterairproblem.hh b/examples/problems/waterairproblem.hh index 15f7679fa..fe26a7d6d 100644 --- a/examples/problems/waterairproblem.hh +++ b/examples/problems/waterairproblem.hh @@ -38,7 +38,8 @@ #include #include #include -#include +#include +#include #include #include @@ -96,9 +97,13 @@ private: public: // define the material law parameterized by absolute saturations - typedef Opm::Somerton type; + typedef Opm::SomertonHeatConductionLaw type; }; +// set the heat law for the solid phase +SET_TYPE_PROP(WaterAirBaseProblem, SolidEnergyLaw, + Opm::ConstantSolidHeatCapLaw); + // 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 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 - 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 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_;