My Project
Loading...
Searching...
No Matches
Opm::FlowGenericProblem< GridView, FluidSystem > Class Template Reference

This problem simulates an input file given in the data format used by the commercial ECLiPSE simulator. More...

#include <FlowGenericProblem.hpp>

Classes

struct  RockParams
 

Public Types

using Scalar = typename FluidSystem::Scalar
 
using TabulatedTwoDFunction = UniformXTabulated2DFunction< Scalar >
 
using TabulatedFunction = Tabulated1DFunction< Scalar >
 

Public Member Functions

 FlowGenericProblem (const EclipseState &eclState, const Schedule &schedule, const GridView &gridView)
 
Scalar maxWaterSaturation (unsigned globalDofIdx) const
 Returns an element's historic maximum water phase saturation that was observed during the simulation.
 
Scalar minOilPressure (unsigned globalDofIdx) const
 Returns an element's historic minimum pressure of the oil phase that was observed during the simulation.
 
Scalar overburdenPressure (unsigned elementIdx) const
 Get the pressure of the overburden.
 
Scalar referencePorosity (unsigned elementIdx, unsigned timeIdx) const
 Returns the porosity of an element.
 
Scalar rockFraction (unsigned elementIdx, unsigned timeIdx) const
 Returns the rockFraction of an element.
 
void setPorosity (Scalar poro, unsigned elementIdx, unsigned timeIdx=0)
 Sets the porosity of an element.
 
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 drsdtcon (unsigned elemIdx, int episodeIdx) const
 Returns the dynamic drsdt convective mixing value.
 
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 biofilmConcentration (unsigned elemIdx) const
 Returns the initial biofilm concentration for a given a cell index.
 
Scalar calciteConcentration (unsigned elemIdx) const
 Returns the initial calcite concentration 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.
 
Scalar rockReferencePressure (unsigned globalSpaceIdx) const
 Direct access to rock reference pressure.
 
Scalar porosity (unsigned globalSpaceIdx, unsigned timeIdx) const
 Direct indexed access to the porosity.
 
bool vapparsActive (int episodeIdx) const
 
int numPressurePointsEquil () const
 
bool operator== (const FlowGenericProblem &rhs) const
 
template<class Serializer >
void serializeOp (Serializer &serializer)
 

Static Public Member Functions

static FlowGenericProblem serializationTestObject (const EclipseState &eclState, const Schedule &schedule, const 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()
 

Protected Types

using Grid = std::remove_cv_t< typename std::remove_reference< decltype(gridView_.grid())>::type >
 
using LookUpData = Opm::LookUpData< Grid, GridView >
 

Protected Member Functions

void initFluidSystem_ ()
 
bool shouldWriteOutput () const
 Always returns true.
 
bool shouldWriteRestartFile () const
 Returns true if an eWoms restart file should be written to disk.
 
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 enableMICP)
 
void updatePvtnum_ ()
 
void updateSatnum_ ()
 
void updateMiscnum_ ()
 
void updatePlmixnum_ ()
 
void updateKrnum_ ()
 
void updateImbnum_ ()
 
std::function< unsigned(unsigned)> lookupIdxOnLevelZeroAssigner_ ()
 

Protected Attributes

const EclipseState & eclState_
 
const Schedule & schedule_
 
const GridView & gridView_
 
std::array< std::vector< Scalar >, 2 > referencePorosity_
 
std::vector< int > pvtnum_
 
std::vector< unsigned short > satnum_
 
std::vector< unsigned short > miscnum_
 
std::vector< unsigned short > plmixnum_
 
std::vector< unsigned short > krnumx_
 
std::vector< unsigned short > krnumy_
 
std::vector< unsigned short > krnumz_
 
std::vector< unsigned short > imbnumx_
 
std::vector< unsigned short > imbnumy_
 
std::vector< unsigned short > imbnumz_
 
std::vector< RockParamsrockParams_
 
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_
 
MICPSolutionContainer< Scalar > micp_
 
MixingRateControls< FluidSystem > mixControls_
 
bool enableTuning_
 
Scalar initialTimeStepSize_
 
Scalar maxTimeStepAfterWellEvent_
 
int numPressurePointsEquil_
 
const LookUpData lookUpData_
 

Static Protected Attributes

static std::string briefDescription_
 

Detailed Description

template<class GridView, class FluidSystem>
class Opm::FlowGenericProblem< GridView, FluidSystem >

This problem simulates an input file given in the data format used by the commercial ECLiPSE simulator.

Member Function Documentation

◆ briefDescription()

template<class GridView , class FluidSystem >
std::string Opm::FlowGenericProblem< GridView, FluidSystem >::briefDescription ( )
static

◆ helpPreamble()

template<class GridView , class FluidSystem >
std::string Opm::FlowGenericProblem< GridView, FluidSystem >::helpPreamble ( int  ,
const char **  argv 
)
static

◆ maxWaterSaturation()

template<class GridView , class FluidSystem >
FlowGenericProblem< GridView, FluidSystem >::Scalar Opm::FlowGenericProblem< GridView, FluidSystem >::maxWaterSaturation ( unsigned  globalDofIdx) const

Returns an element's historic maximum water phase saturation that was observed during the simulation.

In this context, "historic" means the the time before the current timestep began.

This is used for output of the maximum water saturation used as input for water induced rock compation ROCK2D/ROCK2DTR.

◆ minOilPressure()

template<class GridView , class FluidSystem >
FlowGenericProblem< GridView, FluidSystem >::Scalar Opm::FlowGenericProblem< GridView, FluidSystem >::minOilPressure ( unsigned  globalDofIdx) const

Returns an element's historic minimum pressure of the oil phase that was observed during the simulation.

In this context, "historic" means the the time before the current timestep began.

This is used for output of the minimum pressure used as input for the irreversible rock compation option.

◆ overburdenPressure()

template<class GridView , class FluidSystem >
FlowGenericProblem< GridView, FluidSystem >::Scalar Opm::FlowGenericProblem< GridView, FluidSystem >::overburdenPressure ( unsigned  elementIdx) const

Get the pressure of the overburden.

This method is mainly for output.

◆ porosity()

template<class GridView , class FluidSystem >
FlowGenericProblem< GridView, FluidSystem >::Scalar Opm::FlowGenericProblem< GridView, FluidSystem >::porosity ( unsigned  globalSpaceIdx,
unsigned  timeIdx 
) const

Direct indexed access to the porosity.

For the FlowProblem, this method is identical to referencePorosity(). The intensive quantities object may apply various multipliers (e.g. ones which model rock compressibility and water induced rock compaction) to it which depend on the current physical conditions.

◆ referencePorosity()

template<class GridView , class FluidSystem >
Scalar Opm::FlowGenericProblem< GridView, FluidSystem >::referencePorosity ( unsigned  elementIdx,
unsigned  timeIdx 
) const
inline

Returns the porosity of an element.

The reference porosity of an element is the porosity of the medium before modified by the current solution. Note that this method is not part of the generic eWoms problem API because it would bake the assumption that only the elements are the degrees of freedom into the interface.

◆ rockCompressibility()

template<class GridView , class FluidSystem >
FlowGenericProblem< GridView, FluidSystem >::Scalar Opm::FlowGenericProblem< GridView, FluidSystem >::rockCompressibility ( unsigned  globalSpaceIdx) const

Direct access to rock compressibility.

While the above overload could be implemented in terms of this method, that would require always looking up the global space index, which is not always needed.

◆ rockFraction()

template<class GridView , class FluidSystem >
FlowGenericProblem< GridView, FluidSystem >::Scalar Opm::FlowGenericProblem< GridView, FluidSystem >::rockFraction ( unsigned  elementIdx,
unsigned  timeIdx 
) const

Returns the rockFraction of an element.

Usually 1 - porosity, but if pvmult is used to modify porosity we will apply the same multiplier to the rock fraction i.e. pvmult*(1 - porosity) and thus interpret multpv as a volume multiplier. This is to avoid negative rock volume for pvmult*porosity > 1

◆ rockReferencePressure()

template<class GridView , class FluidSystem >
FlowGenericProblem< GridView, FluidSystem >::Scalar Opm::FlowGenericProblem< GridView, FluidSystem >::rockReferencePressure ( unsigned  globalSpaceIdx) const

Direct access to rock reference pressure.

While the above overload could be implemented in terms of this method, that would require always looking up the global space index, which is not always needed.

◆ setBriefDescription()

template<class GridView , class FluidSystem >
static void Opm::FlowGenericProblem< GridView, FluidSystem >::setBriefDescription ( const std::string &  msg)
inlinestatic

Specifies the string returned by briefDescription()

This string appears in the usage message.

◆ shouldWriteOutput()

template<class GridView , class FluidSystem >
bool Opm::FlowGenericProblem< GridView, FluidSystem >::shouldWriteOutput ( ) const
inlineprotected

Always returns true.

The ecl output writer takes care of the rest

◆ shouldWriteRestartFile()

template<class GridView , class FluidSystem >
bool Opm::FlowGenericProblem< GridView, FluidSystem >::shouldWriteRestartFile ( ) const
inlineprotected

Returns true if an eWoms restart file should be written to disk.

The FlowProblem does not write any restart files using the ad-hoc format, only ones using the ECL format.


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