Minor update to match change in eclproblem API.

This commit is contained in:
Atgeirr Flø Rasmussen 2022-07-04 11:40:39 +02:00
parent 75c8f34e3e
commit 7f05fcd7b7
2 changed files with 38 additions and 9 deletions

View File

@ -109,10 +109,20 @@ class BlackOilIntensiveQuantities
using Toolbox = MathToolbox<Evaluation>; using Toolbox = MathToolbox<Evaluation>;
using DimMatrix = Dune::FieldMatrix<Scalar, dimWorld, dimWorld>; using DimMatrix = Dune::FieldMatrix<Scalar, dimWorld, dimWorld>;
using FluxIntensiveQuantities = typename FluxModule::FluxIntensiveQuantities; using FluxIntensiveQuantities = typename FluxModule::FluxIntensiveQuantities;
using FluidState = BlackOilFluidState<Evaluation, FluidSystem, enableTemperature, enableEnergy, compositionSwitchEnabled, enableEvaporation, enableBrine, enableSaltPrecipitation, Indices::numPhases >;
using DiffusionIntensiveQuantities = BlackOilDiffusionIntensiveQuantities<TypeTag, enableDiffusion>; using DiffusionIntensiveQuantities = BlackOilDiffusionIntensiveQuantities<TypeTag, enableDiffusion>;
public: public:
using FluidState = BlackOilFluidState<Evaluation,
FluidSystem,
enableTemperature,
enableEnergy,
compositionSwitchEnabled,
enableEvaporation,
enableBrine,
enableSaltPrecipitation,
Indices::numPhases>;
using Problem = GetPropType<TypeTag, Properties::Problem>;
BlackOilIntensiveQuantities() BlackOilIntensiveQuantities()
{ {
if (compositionSwitchEnabled) { if (compositionSwitchEnabled) {
@ -527,6 +537,12 @@ public:
const Evaluation& porosity() const const Evaluation& porosity() const
{ return porosity_; } { return porosity_; }
/*!
* The pressure-dependent transmissibility multiplier due to rock compressibility.
*/
const Evaluation& rockCompTransMultiplier() const
{ return rockCompTransMultiplier_; }
/*! /*!
* \brief Returns the index of the PVT region used to calculate the thermodynamic * \brief Returns the index of the PVT region used to calculate the thermodynamic
* quantities. * quantities.
@ -578,6 +594,7 @@ private:
FluidState fluidState_; FluidState fluidState_;
Scalar referencePorosity_; Scalar referencePorosity_;
Evaluation porosity_; Evaluation porosity_;
Evaluation rockCompTransMultiplier_;
Evaluation mobility_[numPhases]; Evaluation mobility_[numPhases];
}; };

View File

@ -77,7 +77,6 @@ class BlackOilIntensiveQuantitiesSimple
using Indices = GetPropType<TypeTag, Properties::Indices>; using Indices = GetPropType<TypeTag, Properties::Indices>;
using GridView = GetPropType<TypeTag, Properties::GridView>; using GridView = GetPropType<TypeTag, Properties::GridView>;
using FluxModule = GetPropType<TypeTag, Properties::FluxModule>; using FluxModule = GetPropType<TypeTag, Properties::FluxModule>;
using Problem = GetPropType<TypeTag, Properties::Problem>;
enum { numEq = getPropValue<TypeTag, Properties::NumEq>() }; enum { numEq = getPropValue<TypeTag, Properties::NumEq>() };
enum { enableSolvent = getPropValue<TypeTag, Properties::EnableSolvent>() }; enum { enableSolvent = getPropValue<TypeTag, Properties::EnableSolvent>() };
@ -102,7 +101,6 @@ class BlackOilIntensiveQuantitiesSimple
enum { dimWorld = GridView::dimensionworld }; enum { dimWorld = GridView::dimensionworld };
enum { compositionSwitchIdx = Indices::compositionSwitchIdx }; enum { compositionSwitchIdx = Indices::compositionSwitchIdx };
static const bool compositionSwitchEnabled = Indices::compositionSwitchIdx >= 0; static const bool compositionSwitchEnabled = Indices::compositionSwitchIdx >= 0;
static const bool waterEnabled = Indices::waterEnabled; static const bool waterEnabled = Indices::waterEnabled;
static const bool gasEnabled = Indices::gasEnabled; static const bool gasEnabled = Indices::gasEnabled;
@ -115,7 +113,17 @@ class BlackOilIntensiveQuantitiesSimple
using DiffusionIntensiveQuantities = BlackOilDiffusionIntensiveQuantities<TypeTag, enableDiffusion>; using DiffusionIntensiveQuantities = BlackOilDiffusionIntensiveQuantities<TypeTag, enableDiffusion>;
public: public:
using FluidState = BlackOilFluidState<Evaluation, FluidSystem, enableTemperature, enableEnergy, compositionSwitchEnabled, enableEvaporation, enableBrine, enableSaltPrecipitation, Indices::numPhases >; using FluidState = BlackOilFluidState<Evaluation,
FluidSystem,
enableTemperature,
enableEnergy,
compositionSwitchEnabled,
enableEvaporation,
enableBrine,
enableSaltPrecipitation,
Indices::numPhases>;
using Problem = GetPropType<TypeTag, Properties::Problem>;
BlackOilIntensiveQuantitiesSimple() BlackOilIntensiveQuantitiesSimple()
{ {
if (compositionSwitchEnabled) { if (compositionSwitchEnabled) {
@ -153,8 +161,8 @@ public:
Scalar refPorosity = problem.porosity(globalSpaceIdx, timeIdx); Scalar refPorosity = problem.porosity(globalSpaceIdx, timeIdx);
// Scalar rockCompressibility = problem.rockCompressibility(elemCtx, dofIdx, timeIdx); // Scalar rockCompressibility = problem.rockCompressibility(elemCtx, dofIdx, timeIdx);
// Scalar rockRefPressure = problem.rockReferencePressure(elemCtx, dofIdx, timeIdx); // Scalar rockRefPressure = problem.rockReferencePressure(elemCtx, dofIdx, timeIdx);
Scalar rockCompressibility = problem.rockCompressibility(globalSpaceIdx, timeIdx); Scalar rockCompressibility = problem.rockCompressibility(globalSpaceIdx);
Scalar rockRefPressure = problem.rockReferencePressure(globalSpaceIdx, timeIdx); Scalar rockRefPressure = problem.rockReferencePressure(globalSpaceIdx);
//Scalar rockCompressibility = 0.0;//problem.rockCompressibility(elemCtx, dofIdx, timeIdx); //Scalar rockCompressibility = 0.0;//problem.rockCompressibility(elemCtx, dofIdx, timeIdx);
//Scalar rockRefPressure = 0.0;//problem.rockReferencePressure(elemCtx, dofIdx, timeIdx); //Scalar rockRefPressure = 0.0;//problem.rockReferencePressure(elemCtx, dofIdx, timeIdx);
update_simple(//dofIdx, update_simple(//dofIdx,
@ -522,8 +530,12 @@ public:
const Evaluation& porosity() const const Evaluation& porosity() const
{ return porosity_; } { return porosity_; }
/*!
* The pressure-dependent transmissibility multiplier due to rock compressibility.
*/
const Evaluation& rockCompTransMultiplier() const const Evaluation& rockCompTransMultiplier() const
{ return rockCompTransMultiplier_; } { return rockCompTransMultiplier_; }
/*! /*!
* \brief Returns the index of the PVT region used to calculate the thermodynamic * \brief Returns the index of the PVT region used to calculate the thermodynamic
* quantities. * quantities.