opm-simulators
Opm::FlowProblemTPSA< TypeTag > Class Template Reference

Problem for Flow-TPSA coupled simulations. More...

#include <FlowProblemTPSA.hpp>

Inheritance diagram for Opm::FlowProblemTPSA< TypeTag >:
Opm::FlowProblemBlackoil< TypeTag > Opm::FlowProblem< TypeTag > Opm::FlowGenericProblem< GetPropType< TypeTag, Properties::GridView >, GetPropType< TypeTag, Properties::FluidSystem > >

Public Types

enum  { dimWorld = GridView::dimensionworld }
 
enum  { enableMech = getPropValue<TypeTag, Properties::EnableMech>() }
 
enum  { historySize = getPropValue<TypeTag, Properties::SolutionHistorySizeTPSA>() }
 
enum  { numEq = getPropValue<TypeTag, Properties::NumEqTPSA>() }
 
enum  { numPhases = FluidSystem::numPhases }
 
enum  { contiRotEqIdx = Indices::contiRotEqIdx }
 
enum  { contiSolidPresEqIdx = Indices::contiSolidPresEqIdx }
 
enum  { solidPres0Idx = Indices::solidPres0Idx }
 
using ParentType = FlowProblemBlackoil< TypeTag >
 
using ElementContext = GetPropType< TypeTag, Properties::ElementContext >
 
using ElementMapper = GetPropType< TypeTag, Properties::ElementMapper >
 
using Evaluation = GetPropType< TypeTag, Properties::EvaluationTPSA >
 
using FluidSystem = GetPropType< TypeTag, Properties::FluidSystem >
 
using GeomechModel = GetPropType< TypeTag, Properties::ModelTPSA >
 
using Grid = GetPropType< TypeTag, Properties::Grid >
 
using GridView = GetPropType< TypeTag, Properties::GridView >
 
using Indices = GetPropType< TypeTag, Properties::IndicesTPSA >
 
using RateVector = GetPropType< TypeTag, Properties::RateVector >
 
using Scalar = GetPropType< TypeTag, Properties::Scalar >
 
using Simulator = GetPropType< TypeTag, Properties::Simulator >
 
using CartesianIndexMapper = Dune::CartesianIndexMapper< Grid >
 
using DimVector = Dune::FieldVector< Scalar, dimWorld >
 
using FaceProperties = FacePropertiesTPSA< Grid, GridView, ElementMapper, CartesianIndexMapper, Scalar >
 
using InitialMaterialState = MaterialStateTPSA< Scalar >
 
using Toolbox = MathToolbox< Evaluation >
 
- Public Types inherited from Opm::FlowProblemBlackoil< TypeTag >
using FlowProblemType = FlowProblem< TypeTag >
 
- Public Types inherited from Opm::FlowGenericProblem< GetPropType< TypeTag, Properties::GridView >, GetPropType< TypeTag, Properties::FluidSystem > >
using Scalar = typename GetPropType< TypeTag, Properties::FluidSystem > ::Scalar
 
using TabulatedTwoDFunction = UniformXTabulated2DFunction< Scalar >
 
using TabulatedFunction = Tabulated1DFunction< Scalar >
 

Public Member Functions

 FlowProblemTPSA (Simulator &simulator)
 Constructor. More...
 
void finishInit ()
 Initialize the problem.
 
void initialSolutionApplied () override
 Set initial solution for the problem. More...
 
void computeAndSetEqWeights_ ()
 Compute weights to rescale the TPSA equations.
 
void beginTimeStep () override
 Called by the simulator before each time integration.
 
std::pair< BCMECHType, Dune::FieldVector< Evaluation, 3 > > mechBoundaryCondition (const unsigned int globalSpaceIdx, const int directionId)
 Organize mechanics boundary conditions. More...
 
void tpsaSource (Dune::FieldVector< Evaluation, numEq > &sourceTerm, unsigned globalSpaceIdx, unsigned timeIdx)
 Set mechanics source term, in particular coupling terms. More...
 
Scalar rockMechPoroChange (unsigned elementIdx, unsigned timeIdx) const
 Pore volume change due to geomechanics. More...
 
Scalar weightAverage (unsigned globalElemIdxIn, unsigned globalElemIdxOut)
 Direct access to average (half-)weight at interface between two elements. More...
 
Scalar weightAverageBoundary (unsigned globalElemIdxIn, unsigned boundaryFaceIdx) const
 Direct access to normal distance at the boundary. More...
 
Scalar weightProduct (unsigned globalElemIdxIn, unsigned globalElemIdxOut) const
 Direct access to product of weights at interface between two elements. More...
 
Scalar normalDistance (unsigned globalElemIdxIn, unsigned globalElemIdxOut) const
 Direct access to normal distance between two elements. More...
 
Scalar normalDistanceBoundary (unsigned globalElemIdxIn, unsigned boundaryFaceIdx) const
 Direct access to normal distance at the boundary. More...
 
DimVector cellFaceNormal (unsigned globalElemIdxIn, unsigned globalElemIdxOut)
 Direct access to face normal between two elements. More...
 
const DimVector & cellFaceNormalBoundary (unsigned globalElemIdxIn, unsigned boundaryFaceIdx) const
 Direct access to face normal at the boundary. More...
 
Scalar shearModulus (unsigned globalElemIdx) const
 Direct access to shear modulus in an element. More...
 
bool laggedScheme () const
 Flow-TPSA lagged coupling scheme activated? More...
 
bool fixedStressScheme () const
 Flow-TPSA fixed-stress coupling scheme activated? More...
 
const GeomechModel & geoMechModel () const
 Get TPSA model. More...
 
GeomechModel & geoMechModel ()
 Get TPSA model. More...
 
std::pair< int, int > fixedStressParameters () const
 Get fixed-stress iteration parameters. More...
 
- Public Member Functions inherited from Opm::FlowProblemBlackoil< TypeTag >
 FlowProblemBlackoil (Simulator &simulator)
 
void beginEpisode () override
 Called by the simulator before an episode begins.
 
void finishInit ()
 Called by the Opm::Simulator in order to initialize the problem. More...
 
void endTimeStep () override
 Called by the simulator after each time integration.
 
void endStepApplyAction ()
 
void endEpisode () override
 Called by the simulator after the end of an episode.
 
void writeReports (const SimulatorTimer &timer)
 
void writeOutput (const bool verbose) override
 Write the requested quantities of the current solution into the output files.
 
void finalizeOutput ()
 
void addToSourceDense (RateVector &rate, unsigned globalDofIdx, unsigned timeIdx) const override
 
template<class LhsEval , class Callback >
LhsEval permFactTransMultiplier (const IntensiveQuantities &intQuants, unsigned elementIdx, Callback &obtain) const
 Calculate the transmissibility multiplier due to porosity reduction.
 
const InitialFluidState & initialFluidState (unsigned globalDofIdx) const
 
std::vector< InitialFluidState > & initialFluidStates ()
 
const std::vector< InitialFluidState > & initialFluidStates () const
 
const EclipseIO & eclIO () const
 
void setSubStepReport (const SimulatorReportSingle &report)
 
void setSimulationReport (const SimulatorReport &report)
 
InitialFluidState boundaryFluidState (unsigned globalDofIdx, const int directionId) const
 
const EclWriterTypeeclWriter () const
 
EclWriterTypeeclWriter ()
 
Scalar maxGasDissolutionFactor (unsigned timeIdx, unsigned globalDofIdx) const
 Returns the maximum value of the gas dissolution factor at the current time for a given degree of freedom.
 
Scalar maxOilVaporizationFactor (unsigned timeIdx, unsigned globalDofIdx) const
 Returns the maximum value of the oil vaporization factor at the current time for a given degree of freedom.
 
bool recycleFirstIterationStorage () const
 Return if the storage term of the first iteration is identical to the storage term for the solution of the previous time step. More...
 
template<class Context >
void initial (PrimaryVariables &values, const Context &context, unsigned spaceIdx, unsigned timeIdx) const
 Evaluate the initial value for a control volume. More...
 
Scalar drsdtcon (unsigned elemIdx, int episodeIdx) const
 
bool drsdtconIsActive (unsigned elemIdx, int episodeIdx) const
 
template<class Context >
void boundary (BoundaryRateVector &values, const Context &context, unsigned spaceIdx, unsigned timeIdx) const
 Evaluate the boundary conditions for a boundary segment. More...
 
void readSolutionFromOutputModule (const int restart_step, bool fip_init)
 Read simulator solution state from the outputmodule (used with restart) More...
 
Scalar thresholdPressure (unsigned elem1Idx, unsigned elem2Idx) const
 
const FlowThresholdPressure< TypeTag > & thresholdPressure () const
 
FlowThresholdPressure< TypeTag > & thresholdPressure ()
 
const ModuleParamsmoduleParams () const
 
template<class Serializer >
void serializeOp (Serializer &serializer)
 
template<class Context >
Scalar porosity (const Context &context, unsigned spaceIdx, unsigned timeIdx) const
 
template<class Context >
unsigned pvtRegionIndex (const Context &context, unsigned spaceIdx, unsigned timeIdx) const
 Returns the index of the relevant region for thermodynmic properties.
 
- Public Member Functions inherited from Opm::FlowProblem< TypeTag >
 FlowProblem (Simulator &simulator)
 
void prefetch (const Element &elem) const
 
template<class Restarter >
void deserialize (Restarter &res)
 This method restores the complete state of the problem and its sub-objects from disk. More...
 
template<class Restarter >
void serialize (Restarter &res)
 This method writes the complete state of the problem and its subobjects to disk. More...
 
int episodeIndex () const
 
void beginIteration ()
 Called by the simulator before each Newton-Raphson iteration.
 
void endIteration ()
 Called by the simulator after each Newton-Raphson iteration.
 
template<class Context >
const DimMatrix & intrinsicPermeability (const Context &context, unsigned spaceIdx, unsigned timeIdx) const
 
const DimMatrix & intrinsicPermeability (unsigned globalElemIdx) const
 This method returns the intrinsic permeability tensor given a global element index. More...
 
template<class Context >
Scalar transmissibility (const Context &context, [[maybe_unused]] unsigned fromDofLocalIdx, unsigned toDofLocalIdx) const
 
Scalar transmissibility (unsigned globalCenterElemIdx, unsigned globalElemIdx) const
 Direct access to the transmissibility between two elements.
 
template<class Context >
Scalar diffusivity (const Context &context, [[maybe_unused]] unsigned fromDofLocalIdx, unsigned toDofLocalIdx) const
 
Scalar diffusivity (const unsigned globalCellIn, const unsigned globalCellOut) const
 give the transmissibility for a face i.e. More...
 
Scalar dispersivity (const unsigned globalCellIn, const unsigned globalCellOut) const
 give the dispersivity for a face i.e. More...
 
Scalar thermalTransmissibilityBoundary (const unsigned globalSpaceIdx, const unsigned boundaryFaceIdx) const
 Direct access to a boundary transmissibility.
 
template<class Context >
Scalar transmissibilityBoundary (const Context &elemCtx, unsigned boundaryFaceIdx) const
 
Scalar transmissibilityBoundary (const unsigned globalSpaceIdx, const unsigned boundaryFaceIdx) const
 Direct access to a boundary transmissibility.
 
Scalar thermalHalfTransmissibility (const unsigned globalSpaceIdxIn, const unsigned globalSpaceIdxOut) const
 
template<class Context >
Scalar thermalHalfTransmissibilityIn (const Context &context, unsigned faceIdx, unsigned timeIdx) const
 
template<class Context >
Scalar thermalHalfTransmissibilityOut (const Context &context, unsigned faceIdx, unsigned timeIdx) const
 
template<class Context >
Scalar thermalHalfTransmissibilityBoundary (const Context &elemCtx, unsigned boundaryFaceIdx) const
 
const Vanguard::TransmissibilityType & eclTransmissibilities () const
 Return a reference to the object that handles the "raw" transmissibilities.
 
const TracerModel & tracerModel () const
 
TracerModel & tracerModel ()
 
TemperatureModel & temperatureModel ()
 
template<class Context >
Scalar porosity (const Context &context, unsigned spaceIdx, unsigned timeIdx) const
 
template<class Context >
Scalar dofCenterDepth (const Context &context, unsigned spaceIdx, unsigned timeIdx) const
 Returns the depth of an degree of freedom [m]. More...
 
Scalar dofCenterDepth (unsigned globalSpaceIdx) const
 Direct indexed acces to the depth of an degree of freedom [m]. More...
 
template<class Context >
Scalar rockCompressibility (const Context &context, unsigned spaceIdx, unsigned timeIdx) const
 
template<class Context >
Scalar rockBiotComp (const Context &context, unsigned spaceIdx, unsigned timeIdx) const
 
template<class Context >
Scalar lame (const Context &context, unsigned spaceIdx, unsigned timeIdx) const
 
template<class Context >
Scalar biotCoeff (const Context &context, unsigned spaceIdx, unsigned timeIdx) const
 
template<class Context >
Scalar rockReferencePressure (const Context &context, unsigned spaceIdx, unsigned timeIdx) const
 
Scalar rockReferencePressure (unsigned globalSpaceIdx) const
 
template<class Context >
const MaterialLawParams & materialLawParams (const Context &context, unsigned spaceIdx, unsigned timeIdx) const
 
const MaterialLawParams & materialLawParams (unsigned globalDofIdx) const
 
const MaterialLawParams & materialLawParams (unsigned globalDofIdx, FaceDir::DirEnum facedir) const
 
template<class Context >
const SolidEnergyLawParams & solidEnergyLawParams (const Context &context, unsigned spaceIdx, unsigned timeIdx) const
 Return the parameters for the energy storage law of the rock.
 
template<class Context >
const ThermalConductionLawParams & thermalConductionLawParams (const Context &context, unsigned spaceIdx, unsigned timeIdx) const
 
std::shared_ptr< const EclMaterialLawManager > materialLawManager () const
 Returns the ECL material law manager. More...
 
template<class FluidState , class ... Args>
void updateRelperms (std::array< Evaluation, numPhases > &mobility, DirectionalMobilityPtr &dirMob, FluidState &fluidState, unsigned globalSpaceIdx) const
 
std::shared_ptr< EclMaterialLawManager > materialLawManager ()
 
template<class Context >
unsigned pvtRegionIndex (const Context &context, unsigned spaceIdx, unsigned timeIdx) const
 Returns the index of the relevant region for thermodynmic properties.
 
template<class Context >
unsigned satnumRegionIndex (const Context &context, unsigned spaceIdx, unsigned timeIdx) const
 Returns the index of the relevant region for thermodynmic properties.
 
template<class Context >
unsigned miscnumRegionIndex (const Context &context, unsigned spaceIdx, unsigned timeIdx) const
 Returns the index of the relevant region for thermodynmic properties.
 
template<class Context >
unsigned plmixnumRegionIndex (const Context &context, unsigned spaceIdx, unsigned timeIdx) const
 Returns the index of the relevant region for thermodynmic properties.
 
template<class Context >
Scalar maxPolymerAdsorption (const Context &context, unsigned spaceIdx, unsigned timeIdx) const
 Returns the max polymer adsorption value.
 
std::string name () const
 The problem name. More...
 
template<class Context >
Scalar temperature (const Context &context, unsigned spaceIdx, unsigned timeIdx) const
 
Scalar temperature (unsigned globalDofIdx, unsigned) const
 
const SolidEnergyLawParams & solidEnergyLawParams (unsigned globalSpaceIdx, unsigned) const
 
const ThermalConductionLawParams & thermalConductionLawParams (unsigned globalSpaceIdx, unsigned) const
 
Scalar maxOilSaturation (unsigned globalDofIdx) const
 Returns an element's historic maximum oil phase saturation that was observed during the simulation. More...
 
void setMaxOilSaturation (unsigned globalDofIdx, Scalar value)
 Sets an element's maximum oil phase saturation observed during the simulation. More...
 
template<class Context >
void source (RateVector &rate, const Context &context, unsigned spaceIdx, unsigned timeIdx) const
 Evaluate the source term for all phases within a given sub-control-volume. More...
 
void source (RateVector &rate, unsigned globalDofIdx, unsigned timeIdx) const
 
const WellModel & wellModel () const
 Returns a reference to the ECL well manager used by the problem. More...
 
WellModel & wellModel ()
 
const AquiferModel & aquiferModel () const
 
AquiferModel & mutableAquiferModel ()
 
bool nonTrivialBoundaryConditions () const
 
Scalar nextTimeStepSize () const
 Propose the size of the next time step to the simulator. More...
 
template<class LhsEval >
LhsEval rockCompPoroMultiplier (const IntensiveQuantities &intQuants, unsigned elementIdx) const
 Calculate the porosity multiplier due to water induced rock compaction. More...
 
template<class LhsEval >
LhsEval rockCompTransMultiplier (const IntensiveQuantities &intQuants, unsigned elementIdx) const
 Calculate the transmissibility multiplier due to water induced rock compaction. More...
 
template<class LhsEval , class Callback >
LhsEval rockCompTransMultiplier (const IntensiveQuantities &intQuants, unsigned elementIdx, Callback &obtain) const
 
template<class LhsEval , class Callback >
LhsEval wellTransMultiplier (const IntensiveQuantities &intQuants, unsigned elementIdx, Callback &obtain) const
 
std::pair< BCType, RateVector > boundaryCondition (const unsigned int globalSpaceIdx, const int directionId) const
 
template<class Serializer >
void serializeOp (Serializer &serializer)
 
const GlobalEqVector & drift () const
 
- Public Member Functions inherited from Opm::FlowGenericProblem< GetPropType< TypeTag, Properties::GridView >, GetPropType< TypeTag, Properties::FluidSystem > >
 FlowGenericProblem (const EclipseState &eclState, const Schedule &schedule, const GetPropType< TypeTag, Properties::GridView > &gridView)
 
Scalar maxWaterSaturation (unsigned globalDofIdx) const
 Returns an element's historic maximum water phase saturation that was observed during the simulation. More...
 
Scalar minOilPressure (unsigned globalDofIdx) const
 Returns an element's historic minimum pressure of the oil phase that was observed during the simulation. More...
 
Scalar overburdenPressure (unsigned elementIdx) const
 Get the pressure of the overburden. More...
 
Scalar referencePorosity (unsigned elementIdx, unsigned timeIdx) const
 Returns the porosity of an element. More...
 
Scalar rockFraction (unsigned elementIdx, unsigned timeIdx) const
 Returns the rockFraction of an element. More...
 
Scalar rockBiotComp (unsigned elementIdx) const
 Returns the rock compressibility of an element due to poroelasticity.
 
Scalar lame (unsigned elementIdx) const
 Direct access to Lame's second parameter in an element.
 
Scalar biotCoeff (unsigned elementIdx) const
 Direct access to Biot coefficient in an element.
 
void setPorosity (Scalar poro, unsigned elementIdx, unsigned timeIdx=0)
 Sets the porosity of an element. More...
 
Scalar solventSaturation (unsigned elemIdx) const
 Returns the initial solvent saturation for a given a cell index.
 
Scalar solventRsw (unsigned elemIdx) const
 Returns the initial solvent dissolved in water for a given a cell index.
 
Scalar polymerConcentration (unsigned elemIdx) const
 Returns the initial polymer concentration for a given a cell index.
 
Scalar polymerMolecularWeight (const unsigned elemIdx) const
 Returns the polymer molecule weight for a given cell index.
 
Scalar microbialConcentration (unsigned elemIdx) const
 Returns the initial microbial concentration for a given a cell index.
 
Scalar oxygenConcentration (unsigned elemIdx) const
 Returns the initial oxygen concentration for a given a cell index.
 
Scalar ureaConcentration (unsigned elemIdx) const
 Returns the initial urea concentration for a given a cell index.
 
Scalar biofilmVolumeFraction (unsigned elemIdx) const
 Returns the initial biofilm volume fraction for a given a cell index.
 
Scalar calciteVolumeFraction (unsigned elemIdx) const
 Returns the initial calcite volume fraction for a given a cell index.
 
unsigned pvtRegionIndex (unsigned elemIdx) const
 Returns the index the relevant PVT region given a cell index.
 
unsigned satnumRegionIndex (unsigned elemIdx) const
 Returns the index the relevant saturation function region given a cell index.
 
unsigned miscnumRegionIndex (unsigned elemIdx) const
 Returns the index the relevant MISC region given a cell index.
 
unsigned plmixnumRegionIndex (unsigned elemIdx) const
 Returns the index the relevant PLMIXNUM (for polymer module) region given a cell index.
 
Scalar maxPolymerAdsorption (unsigned elemIdx) const
 Returns the max polymer adsorption value.
 
Scalar rockCompressibility (unsigned globalSpaceIdx) const
 Direct access to rock compressibility. More...
 
Scalar porosity (unsigned globalSpaceIdx, unsigned timeIdx) const
 Direct indexed access to the porosity. More...
 
bool vapparsActive (int episodeIdx) const
 
int numPressurePointsEquil () const
 
bool operator== (const FlowGenericProblem &rhs) const
 
void serializeOp (Serializer &serializer)
 

Static Public Member Functions

static void registerParameters ()
 Register runtime parameters.
 
- Static Public Member Functions inherited from Opm::FlowProblemBlackoil< TypeTag >
static void registerParameters ()
 Registers all available parameters for the problem and the model. More...
 
- Static Public Member Functions inherited from Opm::FlowProblem< TypeTag >
static void registerParameters ()
 Registers all available parameters for the problem and the model. More...
 
static int handlePositionalParameter (std::function< void(const std::string &, const std::string &)> addKey, std::set< std::string > &seenParams, std::string &errorMsg, int, const char **argv, int paramIdx, int)
 Handles positional command line parameters. More...
 
- Static Public Member Functions inherited from Opm::FlowGenericProblem< GetPropType< TypeTag, Properties::GridView >, GetPropType< TypeTag, Properties::FluidSystem > >
static FlowGenericProblem serializationTestObject (const EclipseState &eclState, const Schedule &schedule, const GetPropType< TypeTag, Properties::GridView > &gridView)
 
static std::string helpPreamble (int, const char **argv)
 
static std::string briefDescription ()
 
static void setBriefDescription (const std::string &msg)
 Specifies the string returned by briefDescription() More...
 

Protected Member Functions

void readInitalConditionsTPSA_ ()
 Read initial conditions and generate material state for TPSA model.
 
- Protected Member Functions inherited from Opm::FlowProblemBlackoil< TypeTag >
void updateExplicitQuantities_ (int episodeIdx, int timeStepSize, const bool first_step_after_restart) override
 
void updateMaxPolymerAdsorption_ ()
 
bool updateMaxPolymerAdsorption_ (unsigned compressedDofIdx, const IntensiveQuantities &iq)
 
void computeAndSetEqWeights_ ()
 
bool updateCompositionChangeLimits_ ()
 
void readEclRestartSolution_ ()
 
void readEquilInitialCondition_ () override
 
void readExplicitInitialCondition_ () override
 
void processRestartSaturations_ (InitialFluidState &elemFluidState, Scalar &solventSaturation)
 
void readInitialCondition_ () override
 
void handleSolventBC (const BCProp::BCFace &bc, RateVector &rate) const override
 
void handlePolymerBC (const BCProp::BCFace &bc, RateVector &rate) const override
 
void handleMicrBC (const BCProp::BCFace &bc, RateVector &rate) const override
 
void handleOxygBC (const BCProp::BCFace &bc, RateVector &rate) const override
 
void handleUreaBC (const BCProp::BCFace &bc, RateVector &rate) const override
 
void updateExplicitQuantities_ (const bool first_step_after_restart)
 
bool satfuncConsistencyRequirementsMet () const
 
- Protected Member Functions inherited from Opm::FlowProblem< TypeTag >
template<class UpdateFunc >
void updateProperty_ (const std::string &failureMsg, UpdateFunc func)
 
bool updateMaxOilSaturation_ ()
 
bool updateMaxOilSaturation_ (unsigned compressedDofIdx, const IntensiveQuantities &iq)
 
bool updateMaxWaterSaturation_ ()
 
bool updateMaxWaterSaturation_ (unsigned compressedDofIdx, const IntensiveQuantities &iq)
 
bool updateMinPressure_ ()
 
bool updateMinPressure_ (unsigned compressedDofIdx, const IntensiveQuantities &iq)
 
std::function< std::vector< double >const FieldPropsManager &, const std::string &)> fieldPropDoubleOnLeafAssigner_ ()
 
template<typename IntType >
std::function< std::vector< IntType >const FieldPropsManager &, const std::string &, bool)> fieldPropIntTypeOnLeafAssigner_ ()
 
void readMaterialParameters_ ()
 
void readThermalParameters_ ()
 
void updateReferencePorosity_ ()
 
void updateRockFraction_ ()
 
bool updateHysteresis_ ()
 
bool updateHysteresis_ (unsigned compressedDofIdx, const IntensiveQuantities &iq)
 
Scalar getRockCompTransMultVal (std::size_t dofIdx) const
 
void updatePffDofData_ ()
 
void readBoundaryConditions_ ()
 
Scalar limitNextTimeStepSize_ (Scalar dtNext) const
 
int refPressurePhaseIdx_ () const
 
void updateRockCompTransMultVal_ ()
 
template<class LhsEval >
LhsEval computeRockCompTransMultiplier_ (const IntensiveQuantities &intQuants, unsigned elementIdx) const
 Calculate the transmissibility multiplier due to water induced rock compaction. More...
 
template<class LhsEval , class Callback >
LhsEval computeRockCompTransMultiplier_ (const IntensiveQuantities &intQuants, unsigned elementIdx, Callback &obtain) const
 
- Protected Member Functions inherited from Opm::FlowGenericProblem< GetPropType< TypeTag, Properties::GridView >, GetPropType< TypeTag, Properties::FluidSystem > >
void initFluidSystem_ ()
 
bool shouldWriteOutput () const
 Always returns true. More...
 
bool shouldWriteRestartFile () const
 Returns true if an eWoms restart file should be written to disk. More...
 
bool beginEpisode_ (bool enableExperiments, int episodeIdx)
 
void beginTimeStep_ (bool enableExperiments, int episodeIdx, int timeStepIndex, Scalar startTime, Scalar time, Scalar timeStepSize, Scalar endTime)
 
void readRockParameters_ (const std::vector< Scalar > &cellCenterDepths, std::function< std::array< int, 3 >(const unsigned)> ijkIndex)
 
void readRockCompactionParameters_ ()
 
void readBlackoilExtentionsInitialConditions_ (std::size_t numDof, bool enableSolvent, bool enablePolymer, bool enablePolymerMolarWeight, bool enableBioeffects, bool enableMICP)
 
void updatePvtnum_ ()
 
void updateSatnum_ ()
 
void updateMiscnum_ ()
 
void updatePlmixnum_ ()
 
std::function< unsigned(unsigned)> lookupIdxOnLevelZeroAssigner_ ()
 

Additional Inherited Members

- Protected Types inherited from Opm::FlowProblem< TypeTag >
enum  { dim = GridView::dimension }
 
enum  { dimWorld = GridView::dimensionworld }
 
enum  { numEq = getPropValue<TypeTag, Properties::NumEq>() }
 
enum  { numPhases = FluidSystem::numPhases }
 
enum  { numComponents = FluidSystem::numComponents }
 
enum  { enableBioeffects = getPropValue<TypeTag, Properties::EnableBioeffects>() }
 
enum  { enableBrine = getPropValue<TypeTag, Properties::EnableBrine>() }
 
enum  { enableConvectiveMixing = getPropValue<TypeTag, Properties::EnableConvectiveMixing>() }
 
enum  { enableDiffusion = getPropValue<TypeTag, Properties::EnableDiffusion>() }
 
enum  { enableDispersion = getPropValue<TypeTag, Properties::EnableDispersion>() }
 
enum  { enableFullyImplicitThermal = getPropValue<TypeTag, Properties::EnergyModuleType>() == EnergyModules::FullyImplicitThermal }
 
enum  { enableExperiments = getPropValue<TypeTag, Properties::EnableExperiments>() }
 
enum  { enableExtbo = getPropValue<TypeTag, Properties::EnableExtbo>() }
 
enum  { enableFoam = getPropValue<TypeTag, Properties::EnableFoam>() }
 
enum  { enableMICP = Indices::enableMICP }
 
enum  { enablePolymer = getPropValue<TypeTag, Properties::EnablePolymer>() }
 
enum  { enablePolymerMolarWeight = getPropValue<TypeTag, Properties::EnablePolymerMW>() }
 
enum  { enableSaltPrecipitation = getPropValue<TypeTag, Properties::EnableSaltPrecipitation>() }
 
enum  { enableSolvent = getPropValue<TypeTag, Properties::EnableSolvent>() }
 
enum  { enableThermalFluxBoundaries = getPropValue<TypeTag, Properties::EnableThermalFluxBoundaries>() }
 
enum  { gasPhaseIdx = FluidSystem::gasPhaseIdx }
 
enum  { oilPhaseIdx = FluidSystem::oilPhaseIdx }
 
enum  { waterPhaseIdx = FluidSystem::waterPhaseIdx }
 
enum  { gasCompIdx = FluidSystem::gasCompIdx }
 
enum  { oilCompIdx = FluidSystem::oilCompIdx }
 
enum  { waterCompIdx = FluidSystem::waterCompIdx }
 
using BaseType = FlowGenericProblem< GetPropType< TypeTag, Properties::GridView >, GetPropType< TypeTag, Properties::FluidSystem > >
 
using ParentType = GetPropType< TypeTag, Properties::BaseProblem >
 
using Implementation = GetPropType< TypeTag, Properties::Problem >
 
using Scalar = GetPropType< TypeTag, Properties::Scalar >
 
using GridView = GetPropType< TypeTag, Properties::GridView >
 
using Stencil = GetPropType< TypeTag, Properties::Stencil >
 
using FluidSystem = GetPropType< TypeTag, Properties::FluidSystem >
 
using GlobalEqVector = GetPropType< TypeTag, Properties::GlobalEqVector >
 
using EqVector = GetPropType< TypeTag, Properties::EqVector >
 
using Vanguard = GetPropType< TypeTag, Properties::Vanguard >
 
using Indices = GetPropType< TypeTag, Properties::Indices >
 
using PrimaryVariables = GetPropType< TypeTag, Properties::PrimaryVariables >
 
using RateVector = GetPropType< TypeTag, Properties::RateVector >
 
using Simulator = GetPropType< TypeTag, Properties::Simulator >
 
using Element = typename GridView::template Codim< 0 >::Entity
 
using ElementContext = GetPropType< TypeTag, Properties::ElementContext >
 
using EclMaterialLawManager = typename GetProp< TypeTag, Properties::MaterialLaw >::EclMaterialLawManager
 
using EclThermalLawManager = typename GetProp< TypeTag, Properties::SolidEnergyLaw >::EclThermalLawManager
 
using MaterialLawParams = typename EclMaterialLawManager::MaterialLawParams
 
using SolidEnergyLawParams = typename EclThermalLawManager::SolidEnergyLawParams
 
using ThermalConductionLawParams = typename EclThermalLawManager::ThermalConductionLawParams
 
using MaterialLaw = GetPropType< TypeTag, Properties::MaterialLaw >
 
using DofMapper = GetPropType< TypeTag, Properties::DofMapper >
 
using Evaluation = GetPropType< TypeTag, Properties::Evaluation >
 
using IntensiveQuantities = GetPropType< TypeTag, Properties::IntensiveQuantities >
 
using WellModel = GetPropType< TypeTag, Properties::WellModel >
 
using AquiferModel = GetPropType< TypeTag, Properties::AquiferModel >
 
using Toolbox = MathToolbox< Evaluation >
 
using DimMatrix = Dune::FieldMatrix< Scalar, dimWorld, dimWorld >
 
using TemperatureModel = GetPropType< TypeTag, Properties::TemperatureModel >
 
using TracerModel = GetPropType< TypeTag, Properties::TracerModel >
 
using DirectionalMobilityPtr = Utility::CopyablePtr< DirectionalMobility< TypeTag > >
 
- Protected Types inherited from Opm::FlowGenericProblem< GetPropType< TypeTag, Properties::GridView >, GetPropType< TypeTag, Properties::FluidSystem > >
using Grid = std::remove_cv_t< typename std::remove_reference< decltype(gridView_.grid())>::type >
 
using LookUpData = Opm::LookUpData< Grid, GetPropType< TypeTag, Properties::GridView > >
 
- Protected Attributes inherited from Opm::FlowProblemBlackoil< TypeTag >
FlowThresholdPressure< TypeTag > thresholdPressures_
 
std::vector< InitialFluidState > initialFluidStates_
 
bool enableEclOutput_
 
std::unique_ptr< EclWriterTypeeclWriter_
 
const Scalar smallSaturationTolerance_ = 1.e-6
 
MixingRateControls< FluidSystem > mixControls_
 
ActionHandler< Scalar, IndexTraits > actionHandler_
 
ModuleParams moduleParams_
 
HybridNewton hybridNewton_
 
- Protected Attributes inherited from Opm::FlowProblem< TypeTag >
Vanguard::TransmissibilityType transmissibilities_
 
std::shared_ptr< EclMaterialLawManager > materialLawManager_
 
std::shared_ptr< EclThermalLawManager > thermalLawManager_
 
GlobalEqVector drift_
 
WellModel wellModel_
 
AquiferModel aquiferModel_
 
PffGridVector< GridView, Stencil, PffDofData_, DofMapper > pffDofData_
 
TracerModel tracerModel_
 
TemperatureModel temperatureModel_
 
BCData< int > bcindex_
 
bool nonTrivialBoundaryConditions_ = false
 
bool first_step_ = true
 
- Protected Attributes inherited from Opm::FlowGenericProblem< GetPropType< TypeTag, Properties::GridView >, GetPropType< TypeTag, Properties::FluidSystem > >
const EclipseState & eclState_
 
const Schedule & schedule_
 
const GetPropType< TypeTag, Properties::GridView > & gridView_
 
std::array< std::vector< Scalar >, 2 > referencePorosity_
 
std::array< std::vector< Scalar >, 2 > rockFraction_
 
std::vector< int > pvtnum_
 
std::vector< unsigned short > satnum_
 
std::vector< unsigned short > miscnum_
 
std::vector< unsigned short > plmixnum_
 
std::vector< RockParams > rockParams_
 
std::vector< unsigned short > rockTableIdx_
 
std::vector< TabulatedTwoDFunction > rockCompPoroMultWc_
 
std::vector< TabulatedTwoDFunction > rockCompTransMultWc_
 
std::vector< TabulatedFunction > rockCompPoroMult_
 
std::vector< TabulatedFunction > rockCompTransMult_
 
std::vector< Scalar > rockCompTransMultVal_
 
PolymerSolutionContainer< Scalar > polymer_
 
std::vector< Scalar > maxOilSaturation_
 
std::vector< Scalar > maxWaterSaturation_
 
std::vector< Scalar > minRefPressure_
 
std::vector< Scalar > overburdenPressure_
 
std::vector< Scalar > solventSaturation_
 
std::vector< Scalar > solventRsw_
 
BioeffectsSolutionContainer< Scalar > bioeffects_
 
CO2H2SolutionContainer< Scalar > CO2H2_
 
bool enableTuning_
 
Scalar initialTimeStepSize_
 
Scalar maxTimeStepAfterWellEvent_
 
int numPressurePointsEquil_
 
bool enableDriftCompensation_
 
bool enableDriftCompensationTemp_
 
bool explicitRockCompaction_
 
const LookUpData lookUpData_
 
- Static Protected Attributes inherited from Opm::FlowProblem< TypeTag >
static constexpr EnergyModules energyModuleType = getPropValue<TypeTag, Properties::EnergyModuleType>()
 
- Static Protected Attributes inherited from Opm::FlowGenericProblem< GetPropType< TypeTag, Properties::GridView >, GetPropType< TypeTag, Properties::FluidSystem > >
static std::string briefDescription_
 

Detailed Description

template<class TypeTag>
class Opm::FlowProblemTPSA< TypeTag >

Problem for Flow-TPSA coupled simulations.

Constructor & Destructor Documentation

◆ FlowProblemTPSA()

template<class TypeTag >
Opm::FlowProblemTPSA< TypeTag >::FlowProblemTPSA ( Simulator &  simulator)
inline

Constructor.

Parameters
simulatorReference to simulator object

Member Function Documentation

◆ cellFaceNormal()

template<class TypeTag >
DimVector Opm::FlowProblemTPSA< TypeTag >::cellFaceNormal ( unsigned  globalElemIdxIn,
unsigned  globalElemIdxOut 
)
inline

Direct access to face normal between two elements.

Parameters
globalElemIdxInInside cell index
globalElemIdxOutOutside cell index
Returns
Face normal

◆ cellFaceNormalBoundary()

template<class TypeTag >
const DimVector& Opm::FlowProblemTPSA< TypeTag >::cellFaceNormalBoundary ( unsigned  globalElemIdxIn,
unsigned  boundaryFaceIdx 
) const
inline

Direct access to face normal at the boundary.

Parameters
globalElemIdxInInside cell index
boundaryFaceIdxBoundary (local) face index
Returns
Face normal on boundary

◆ fixedStressParameters()

template<class TypeTag >
std::pair<int, int> Opm::FlowProblemTPSA< TypeTag >::fixedStressParameters ( ) const
inline

Get fixed-stress iteration parameters.

Returns
Pair with min/max fixed-stress iterations

◆ fixedStressScheme()

template<class TypeTag >
bool Opm::FlowProblemTPSA< TypeTag >::fixedStressScheme ( ) const
inline

Flow-TPSA fixed-stress coupling scheme activated?

Returns
Bool indicating fixed-stress coupling

◆ geoMechModel() [1/2]

template<class TypeTag >
const GeomechModel& Opm::FlowProblemTPSA< TypeTag >::geoMechModel ( ) const
inline

Get TPSA model.

Returns
Reference to geomechanics model

◆ geoMechModel() [2/2]

template<class TypeTag >
GeomechModel& Opm::FlowProblemTPSA< TypeTag >::geoMechModel ( )
inline

Get TPSA model.

Returns
Reference to geomechanics model

◆ initialSolutionApplied()

template<class TypeTag >
void Opm::FlowProblemTPSA< TypeTag >::initialSolutionApplied ( )
inlineoverridevirtual

Set initial solution for the problem.

This function is a combination FvBaseDiscretization::applyInitialSolution and FlowProblemBlackoil::initial()

Reimplemented from Opm::FlowProblemBlackoil< TypeTag >.

◆ laggedScheme()

template<class TypeTag >
bool Opm::FlowProblemTPSA< TypeTag >::laggedScheme ( ) const
inline

Flow-TPSA lagged coupling scheme activated?

Returns
Bool indicating lagged coupling

◆ mechBoundaryCondition()

template<class TypeTag >
std::pair<BCMECHType, Dune::FieldVector<Evaluation, 3> > Opm::FlowProblemTPSA< TypeTag >::mechBoundaryCondition ( const unsigned int  globalSpaceIdx,
const int  directionId 
)
inline

Organize mechanics boundary conditions.

Parameters
globalSpaceIdxCell index
directionIdDirection id
Returns
A pair of BCMECHType and displacement vector

Output from this function is used in LocalResidual::computeBoundaryTerm

Note
Only BCMECHTYPE = FREE and NONE implemented. FIXED will/should throw an error when computed in local residual!

◆ normalDistance()

template<class TypeTag >
Scalar Opm::FlowProblemTPSA< TypeTag >::normalDistance ( unsigned  globalElemIdxIn,
unsigned  globalElemIdxOut 
) const
inline

Direct access to normal distance between two elements.

Parameters
globalElemIdxInInside cell index
globalElemIdxOutOutside cell index
Returns
Normal distance

◆ normalDistanceBoundary()

template<class TypeTag >
Scalar Opm::FlowProblemTPSA< TypeTag >::normalDistanceBoundary ( unsigned  globalElemIdxIn,
unsigned  boundaryFaceIdx 
) const
inline

Direct access to normal distance at the boundary.

Parameters
globalElemIdxInInside cell index
boundaryFaceIdxBoundary (local) face index
Returns
Normal distance to boundary

◆ rockMechPoroChange()

template<class TypeTag >
Scalar Opm::FlowProblemTPSA< TypeTag >::rockMechPoroChange ( unsigned  elementIdx,
unsigned  timeIdx 
) const
inline

Pore volume change due to geomechanics.

Parameters
elementIdxCell index
timeIdxTime index
Returns
Pore volume change (dimensionless)
Note
This is the coupling term to Flow

◆ shearModulus()

template<class TypeTag >
Scalar Opm::FlowProblemTPSA< TypeTag >::shearModulus ( unsigned  globalElemIdx) const
inline

Direct access to shear modulus in an element.

Parameters
globalElemIdxCell index
Returns
Shear modulus

◆ tpsaSource()

template<class TypeTag >
void Opm::FlowProblemTPSA< TypeTag >::tpsaSource ( Dune::FieldVector< Evaluation, numEq > &  sourceTerm,
unsigned  globalSpaceIdx,
unsigned  timeIdx 
)
inline

Set mechanics source term, in particular coupling terms.

Parameters
sourceTermSource term vector
globalSpaceIdxCell index
timeIdxTime index

This term requires that intensive quantities are updated!

◆ weightAverage()

template<class TypeTag >
Scalar Opm::FlowProblemTPSA< TypeTag >::weightAverage ( unsigned  globalElemIdxIn,
unsigned  globalElemIdxOut 
)
inline

Direct access to average (half-)weight at interface between two elements.

Parameters
globalElemIdxInInside cell index
globalElemIdxOutOutside cell index
Returns
Weight average

◆ weightAverageBoundary()

template<class TypeTag >
Scalar Opm::FlowProblemTPSA< TypeTag >::weightAverageBoundary ( unsigned  globalElemIdxIn,
unsigned  boundaryFaceIdx 
) const
inline

Direct access to normal distance at the boundary.

Parameters
globalElemIdxInInside cell index
boundaryFaceIdxBoundary (local) face index
Returns
Weight average at boundary

◆ weightProduct()

template<class TypeTag >
Scalar Opm::FlowProblemTPSA< TypeTag >::weightProduct ( unsigned  globalElemIdxIn,
unsigned  globalElemIdxOut 
) const
inline

Direct access to product of weights at interface between two elements.

Parameters
globalElemIdxInInside cell index
globalElemIdxOutOutside cell index
Returns
Weight product

The documentation for this class was generated from the following file: