Loading...
Searching...
No Matches
Opm::FlowProblem< TypeTag > Class Template Referenceabstract

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

`#include <FlowProblem.hpp>`

Inheritance diagram for Opm::FlowProblem< TypeTag >:

## Classes

struct | PffDofData_
struct | BCData

## Public Member Functions

| 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.
template<class Restarter>
void | serialize (Restarter &res)
| This method writes the complete state of the problem and its subobjects to disk.
int | episodeIndex () const
virtual void | beginEpisode ()
| Called by the simulator before an episode begins.
virtual void | beginTimeStep ()
| Called by the simulator before each time integration.
void | beginIteration ()
| Called by the simulator before each Newton-Raphson iteration.
void | endIteration ()
| Called by the simulator after each Newton-Raphson iteration.
virtual void | endTimeStep ()
| Called by the simulator after each time integration.
virtual void | endEpisode ()
| Called by the simulator after the end of an episode.
virtual void | writeOutput (bool verbose)
| Write the requested quantities of the current solution into the output files.
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.
template<class Context>
Scalar | transmissibility (const Context &context, 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, unsigned fromDofLocalIdx, unsigned toDofLocalIdx) const
Scalar | diffusivity (const unsigned globalCellIn, const unsigned globalCellOut) const
| give the transmissibility for a face i.e.
Scalar | dispersivity (const unsigned globalCellIn, const unsigned globalCellOut) const
| give the dispersivity for a face i.e.
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 ()
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].
Scalar | dofCenterDepth (unsigned globalSpaceIdx) const
| Direct indexed acces to the depth of an degree of freedom [m].
template<class Context>
Scalar | rockCompressibility (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.
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.
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.
void | setMaxOilSaturation (unsigned globalDofIdx, Scalar value)
| Sets an element's maximum oil phase saturation observed during the simulation.
virtual void | initialSolutionApplied ()
| Callback used by the model to indicate that the initial solution has been determined for all degrees of freedom.
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.
void | source (RateVector &rate, unsigned globalDofIdx, unsigned timeIdx) const
virtual void | addToSourceDense (RateVector &rate, unsigned globalDofIdx, unsigned timeIdx) const =0
const WellModel & | wellModel () const
| Returns a reference to the ECL well manager used by the problem.
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.
template<class LhsEval>
LhsEval | rockCompPoroMultiplier (const IntensiveQuantities &intQuants, unsigned elementIdx) const
| Calculate the porosity multiplier due to water induced rock compaction.
template<class LhsEval>
LhsEval | rockCompTransMultiplier (const IntensiveQuantities &intQuants, unsigned elementIdx) const
| Calculate the transmissibility multiplier due to water induced rock compaction.
template<class LhsEval>
LhsEval | wellTransMultiplier (const IntensiveQuantities &intQuants, unsigned elementIdx) const
| Return the well transmissibility multiplier due to rock changes.
std::pair< BCType, RateVector > | boundaryCondition (const unsigned int globalSpaceIdx, const int directionId) const
template<class Serializer>
void | serializeOp (Serializer &serializer)
bool | shouldWriteOutput () const
| Always returns true.
bool | shouldWriteRestartFile () const
| Returns true if an eWoms restart file should be written to disk.
Scalar | rockCompressibility (unsigned globalSpaceIdx) const
| Direct access to rock compressibility.
Scalar | porosity (unsigned globalSpaceIdx, unsigned timeIdx) const
| Direct indexed access to the porosity.
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.
Public Member Functions inherited from Opm::FlowGenericProblem< GetPropType< TypeTag, Properties::GridView >, GetPropType< TypeTag, Properties::FluidSystem > >
| 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 | 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.
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
void | serializeOp (Serializer &serializer)

## Static Public Member Functions

static void | registerParameters ()
| Registers all available parameters for the problem and the model.
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.
static std::string | briefDescription ()
| Returns a human readable description of the problem for the help message.
static std::string | helpPreamble (int, const char **argv)
| Returns the string that is printed before the list of command line parameters in the help message.
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 GridView &gridView)
static std::string | helpPreamble (int, const char **argv)
| Returns the string that is printed before the list of command line parameters in the help message.
static std::string | briefDescription ()
| Returns a human readable description of the problem for the help message.
static void | setBriefDescription (const std::string &msg)
| Specifies the string returned by briefDescription().

## Protected Types

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 | { enableEnergy = getPropValue<TypeTag, Properties::EnableEnergy>() }
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 | { enableTemperature = getPropValue<TypeTag, Properties::EnableTemperature>() }
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
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 | 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
using | LookUpData

## Protected Member Functions

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_ ()
virtual void | readInitialCondition_ ()
virtual void | readEquilInitialCondition_ ()=0
virtual void | readExplicitInitialCondition_ ()=0
bool | updateHysteresis_ ()
bool | updateHysteresis_ (unsigned compressedDofIdx, const IntensiveQuantities &iq)
Scalar | getRockCompTransMultVal (std::size_t dofIdx) const
void | updatePffDofData_ ()
virtual void | updateExplicitQuantities_ (int episodeIdx, int timeStepSize, bool first_step_after_restart)=0
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.
virtual void | handleSolventBC (const BCProp::BCFace &, RateVector &) const =0
virtual void | handlePolymerBC (const BCProp::BCFace &, RateVector &) const =0
virtual void | handleMicrBC (const BCProp::BCFace &, RateVector &) const =0
virtual void | handleOxygBC (const BCProp::BCFace &, RateVector &) const =0
virtual void | handleUreaBC (const BCProp::BCFace &, RateVector &) const =0
virtual bool | episodeWillBeOver () const
| Whether or not the current episode will end at the end of the current time step.
Protected Member Functions inherited from Opm::FlowGenericProblem< GetPropType< TypeTag, Properties::GridView >, GetPropType< TypeTag, Properties::FluidSystem > >
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 enableBioeffects, bool enableMICP)
void | updatePvtnum_ ()
void | updateSatnum_ ()
void | updateMiscnum_ ()
void | updatePlmixnum_ ()
std::function< unsigned(unsigned)> | lookupIdxOnLevelZeroAssigner_ ()

## Protected Attributes

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_
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 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< 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_
bool | enableTuning_
Scalar | initialTimeStepSize_
Scalar | maxTimeStepAfterWellEvent_
int | numPressurePointsEquil_
bool | enableDriftCompensation_
bool | explicitRockCompaction_
const LookUpData | lookUpData_

## Additional Inherited Members

Public Types inherited from Opm::FlowGenericProblem< GetPropType< TypeTag, Properties::GridView >, GetPropType< TypeTag, Properties::FluidSystem > >
using | Scalar
using | TabulatedTwoDFunction
using | TabulatedFunction
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::FlowProblem< TypeTag >

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

## Member Typedef Documentation

## BaseType

template<class TypeTag>

using Opm::FlowProblem< TypeTag >::BaseType

protected

Initial value:
FlowGenericProblem<GetPropType<TypeTag, Properties::GridView>,
GetPropType<TypeTag, Properties::FluidSystem>>
Opm::GetPropType
typename Properties::Detail::GetPropImpl< TypeTag, Property >::type::type GetPropType
get the type alias defined in the property (equivalent to old macro GET_PROP_TYPE(....
Definition propertysystem.hh:233

## Constructor & Destructor Documentation

## FlowProblem()

template<class TypeTag>

Opm::FlowProblem< TypeTag >::FlowProblem | ( | Simulator & | simulator | ) |

inline explicit

## Member Function Documentation

## beginEpisode()

template<class TypeTag>

virtual void Opm::FlowProblem< TypeTag >::beginEpisode | ( |  | ) |

inline virtual

Called by the simulator before an episode begins.

Reimplemented in Opm::FlowProblemBlackoil< TypeTag >.

## beginTimeStep()

template<class TypeTag>

virtual void Opm::FlowProblem< TypeTag >::beginTimeStep | ( |  | ) |

inline virtual

Called by the simulator before each time integration.

Reimplemented in Opm::FlowProblemBlackoil< TypeTag >.

## briefDescription()

template<class TypeTag>

std::string Opm::FlowGenericProblem< GridView, FluidSystem >::briefDescription | ( |  | ) |

static

Returns a human readable description of the problem for the help message.

The problem description is printed as part of the –help message. It is optional and should not exceed one or two lines of text.

## computeRockCompTransMultiplier_()

template<class TypeTag>
template<class LhsEval>

LhsEval Opm::FlowProblem< TypeTag >::computeRockCompTransMultiplier_ | ( | const IntensiveQuantities & | intQuants,
|  | unsigned | elementIdx ) const

inline protected

Calculate the transmissibility multiplier due to water induced rock compaction.

TODO: The API of this is a bit ad-hoc, it would be better to use context objects.

## deserialize()

template<class TypeTag>
template<class Restarter>

void Opm::FlowProblem< TypeTag >::deserialize | ( | Restarter & | res | ) |

inline

This method restores the complete state of the problem and its sub-objects from disk.

The serialization format used by this method is ad-hoc. It is the inverse of the serialize() method.

Template Parameters

  Restarter | The deserializer type

Parameters

  res | The deserializer object

## diffusivity() [1/2]

template<class TypeTag>
template<class Context>

Scalar Opm::FlowProblem< TypeTag >::diffusivity | ( | const Context & | context,
|  | unsigned | fromDofLocalIdx,
|  | unsigned | toDofLocalIdx ) const

inline

## diffusivity() [2/2]

template<class TypeTag>

Scalar Opm::FlowProblem< TypeTag >::diffusivity | ( | const unsigned | globalCellIn,
|  | const unsigned | globalCellOut ) const

inline

give the transmissibility for a face i.e.

pair. should be symmetric?

## dispersivity()

template<class TypeTag>

Scalar Opm::FlowProblem< TypeTag >::dispersivity | ( | const unsigned | globalCellIn,
|  | const unsigned | globalCellOut ) const

inline

give the dispersivity for a face i.e.

pair.

## dofCenterDepth() [1/2]

template<class TypeTag>
template<class Context>

Scalar Opm::FlowProblem< TypeTag >::dofCenterDepth | ( | const Context & | context,
|  | unsigned | spaceIdx,
|  | unsigned | timeIdx ) const

inline

Returns the depth of an degree of freedom [m].

For ECL problems this is defined as the average of the depth of an element and is thus slightly different from the depth of an element's centroid.

## dofCenterDepth() [2/2]

template<class TypeTag>

Scalar Opm::FlowProblem< TypeTag >::dofCenterDepth | ( | unsigned | globalSpaceIdx | ) | const

inline

Direct indexed acces to the depth of an degree of freedom [m].

For ECL problems this is defined as the average of the depth of an element and is thus slightly different from the depth of an element's centroid.

## endEpisode()

template<class TypeTag>

virtual void Opm::FlowProblem< TypeTag >::endEpisode | ( |  | ) |

inline virtual

Called by the simulator after the end of an episode.

Reimplemented in Opm::FlowProblemBlackoil< TypeTag >.

## endTimeStep()

template<class TypeTag>

virtual void Opm::FlowProblem< TypeTag >::endTimeStep | ( |  | ) |

inline virtual

Called by the simulator after each time integration.

Reimplemented in Opm::FlowProblemBlackoil< TypeTag >, and Opm::FlowProblemComp< TypeTag >.

## handlePositionalParameter()

template<class TypeTag>

int Opm::FlowProblem< TypeTag >::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 | )

inline static

Handles positional command line parameters.

Positional parameters are parameters that are not prefixed by any parameter name.

Parameters

  seenParams | The parameters which have already been seen in the current context
  errorMsg | If the positional argument cannot be handled, this is the reason why
  argc | The total number of command line parameters
  argv | The string value of the command line parameters
  paramIdx | The index of the positional parameter in the array of all parameters
  posParamIdx | The number of the positional parameter encountered so far

Returns
  The number of array entries which ought to be skipped before processing the next regular parameter. If this is less than 1, it indicated that the positional parameter was invalid.

Parameters

  addKey | Callback for adding a key-value pair
  seenParams | Already seen parameters
  errorMsg | Error message
  argv | Command line parameters
  paramIdx | Index of parameter to handle

## helpPreamble()

template<class TypeTag>

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

static

Returns the string that is printed before the list of command line parameters in the help message.

If the returned string is empty, no help message will be generated.

## initialSolutionApplied()

template<class TypeTag>

virtual void Opm::FlowProblem< TypeTag >::initialSolutionApplied | ( |  | ) |

inline virtual

Callback used by the model to indicate that the initial solution has been determined for all degrees of freedom.

Reimplemented in Opm::FlowProblemBlackoil< TypeTag >.

## intrinsicPermeability() [1/2]

template<class TypeTag>
template<class Context>

const DimMatrix & Opm::FlowProblem< TypeTag >::intrinsicPermeability | ( | const Context & | context,
|  | unsigned | spaceIdx,
|  | unsigned | timeIdx ) const

inline

## intrinsicPermeability() [2/2]

template<class TypeTag>

const DimMatrix & Opm::FlowProblem< TypeTag >::intrinsicPermeability | ( | unsigned | globalElemIdx | ) | const

inline

This method returns the intrinsic permeability tensor given a global element index.

Its main (only?) usage is the ECL transmissibility calculation code...

## materialLawManager() [1/2]

template<class TypeTag>

std::shared_ptr< EclMaterialLawManager > Opm::FlowProblem< TypeTag >::materialLawManager | ( |  | ) |

inline

## materialLawManager() [2/2]

template<class TypeTag>

std::shared_ptr< const EclMaterialLawManager > Opm::FlowProblem< TypeTag >::materialLawManager | ( |  | ) | const

inline

Returns the ECL material law manager.

Note that this method is not part of the generic eWoms problem API because it would force all problens use the ECL material laws.

## materialLawParams()

template<class TypeTag>
template<class Context>

const MaterialLawParams & Opm::FlowProblem< TypeTag >::materialLawParams | ( | const Context & | context,
|  | unsigned | spaceIdx,
|  | unsigned | timeIdx ) const

inline

## maxOilSaturation()

template<class TypeTag>

Scalar Opm::FlowProblem< TypeTag >::maxOilSaturation | ( | unsigned | globalDofIdx | ) | const

inline

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

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

This is a bit of a hack from the conceptional point of view, but it is required to match the results of the 'flow' and ECLIPSE 100 simulators.

## name()

template<class TypeTag>

std::string Opm::FlowProblem< TypeTag >::name | ( |  | ) | const

inline

The problem name.

This is used as a prefix for files generated by the simulation. It is highly recommend to overwrite this method in the concrete problem which is simulated.

## nextTimeStepSize()

template<class TypeTag>

Scalar Opm::FlowProblem< TypeTag >::nextTimeStepSize | ( |  | ) | const

inline

Propose the size of the next time step to the simulator.

This method is only called if the Newton solver does converge, the simulator automatically cuts the time step in half without consultating this method again.

## porosity() [1/2]

template<class TypeTag>
template<class Context>

Scalar Opm::FlowProblem< TypeTag >::porosity | ( | const Context & | context,
|  | unsigned | spaceIdx,
|  | unsigned | timeIdx ) const

inline

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.

## porosity() [2/2]

template<class TypeTag>

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.

## registerParameters()

template<class TypeTag>

void Opm::FlowProblem< TypeTag >::registerParameters | ( |  | ) |

inline static

Registers all available parameters for the problem and the model.

## rockCompPoroMultiplier()

template<class TypeTag>
template<class LhsEval>

LhsEval Opm::FlowProblem< TypeTag >::rockCompPoroMultiplier | ( | const IntensiveQuantities & | intQuants,
|  | unsigned | elementIdx ) const

inline

Calculate the porosity multiplier due to water induced rock compaction.

TODO: The API of this is a bit ad-hoc, it would be better to use context objects.

## rockCompressibility() [1/2]

template<class TypeTag>
template<class Context>

Scalar Opm::FlowProblem< TypeTag >::rockCompressibility | ( | const Context & | context,
|  | unsigned | spaceIdx,
|  | unsigned | timeIdx ) const

inline

## rockCompressibility() [2/2]

template<class TypeTag>

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.

## rockCompTransMultiplier()

template<class TypeTag>
template<class LhsEval>

LhsEval Opm::FlowProblem< TypeTag >::rockCompTransMultiplier | ( | const IntensiveQuantities & | intQuants,
|  | unsigned | elementIdx ) const

inline

Calculate the transmissibility multiplier due to water induced rock compaction.

TODO: The API of this is a bit ad-hoc, it would be better to use context objects.

## rockReferencePressure() [1/2]

template<class TypeTag>
template<class Context>

Scalar Opm::FlowProblem< TypeTag >::rockReferencePressure | ( | const Context & | context,
|  | unsigned | spaceIdx,
|  | unsigned | timeIdx ) const

inline

## rockReferencePressure() [2/2]

template<class TypeTag>

Scalar Opm::FlowProblem< TypeTag >::rockReferencePressure | ( | unsigned | globalSpaceIdx | ) | const

inline

## serialize()

template<class TypeTag>
template<class Restarter>

void Opm::FlowProblem< TypeTag >::serialize | ( | Restarter & | res | ) |

inline

This method writes the complete state of the problem and its subobjects to disk.

The file format used here is ad-hoc.

## setMaxOilSaturation()

template<class TypeTag>

void Opm::FlowProblem< TypeTag >::setMaxOilSaturation | ( | unsigned | globalDofIdx,
|  | Scalar | value )

inline

Sets an element's maximum oil phase saturation observed during the simulation.

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

This a hack on top of the maxOilSaturation() hack but it is currently required to do restart externally. i.e. from the flow code.

## shouldWriteOutput()

template<class TypeTag>

bool Opm::FlowGenericProblem< GridView, FluidSystem >::shouldWriteOutput | ( |  | ) | const

inline

Always returns true.

The ecl output writer takes care of the rest

## shouldWriteRestartFile()

template<class TypeTag>

bool Opm::FlowGenericProblem< GridView, FluidSystem >::shouldWriteRestartFile | ( |  | ) | const

inline

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.

## source()

template<class TypeTag>
template<class Context>

void Opm::FlowProblem< TypeTag >::source | ( | RateVector & | rate,
|  | const Context & | context,
|  | unsigned | spaceIdx,
|  | unsigned | timeIdx ) const

inline

Evaluate the source term for all phases within a given sub-control-volume.

Parameters

  rate | Stores the values of the volumetric creation/anihilition rates of the conserved quantities.
  context | The object representing the execution context from which this method is called.
  spaceIdx | The local index of the spatial entity which represents the boundary segment.
  timeIdx | The index used for the time discretization

For this problem, the source term of all components is 0 everywhere.

## temperature()

template<class TypeTag>
template<class Context>

Scalar Opm::FlowProblem< TypeTag >::temperature | ( | const Context & | context,
|  | unsigned | spaceIdx,
|  | unsigned | timeIdx ) const

inline

## thermalConductionLawParams()

template<class TypeTag>
template<class Context>

const ThermalConductionLawParams & Opm::FlowProblem< TypeTag >::thermalConductionLawParams | ( | const Context & | context,
|  | unsigned | spaceIdx,
|  | unsigned | timeIdx ) const

inline

## thermalHalfTransmissibility()

template<class TypeTag>

Scalar Opm::FlowProblem< TypeTag >::thermalHalfTransmissibility | ( | const unsigned | globalSpaceIdxIn,
|  | const unsigned | globalSpaceIdxOut ) const

inline

## thermalHalfTransmissibilityBoundary()

template<class TypeTag>
template<class Context>

Scalar Opm::FlowProblem< TypeTag >::thermalHalfTransmissibilityBoundary | ( | const Context & | elemCtx,
|  | unsigned | boundaryFaceIdx ) const

inline

## thermalHalfTransmissibilityIn()

template<class TypeTag>
template<class Context>

Scalar Opm::FlowProblem< TypeTag >::thermalHalfTransmissibilityIn | ( | const Context & | context,
|  | unsigned | faceIdx,
|  | unsigned | timeIdx ) const

inline

## thermalHalfTransmissibilityOut()

template<class TypeTag>
template<class Context>

Scalar Opm::FlowProblem< TypeTag >::thermalHalfTransmissibilityOut | ( | const Context & | context,
|  | unsigned | faceIdx,
|  | unsigned | timeIdx ) const

inline

## transmissibility()

template<class TypeTag>
template<class Context>

Scalar Opm::FlowProblem< TypeTag >::transmissibility | ( | const Context & | context,
|  | unsigned | fromDofLocalIdx,
|  | unsigned | toDofLocalIdx ) const

inline

## transmissibilityBoundary()

template<class TypeTag>
template<class Context>

Scalar Opm::FlowProblem< TypeTag >::transmissibilityBoundary | ( | const Context & | elemCtx,
|  | unsigned | boundaryFaceIdx ) const

inline

## wellModel()

template<class TypeTag>

const WellModel & Opm::FlowProblem< TypeTag >::wellModel | ( |  | ) | const

inline

Returns a reference to the ECL well manager used by the problem.

This can be used for inspecting wells outside of the problem.

## writeOutput()

template<class TypeTag>

virtual void Opm::FlowProblem< TypeTag >::writeOutput | ( | bool | verbose | ) |

inline virtual

Write the requested quantities of the current solution into the output files.

Reimplemented in Opm::FlowProblemBlackoil< TypeTag >, and Opm::FlowProblemComp< TypeTag >.

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

- opm/simulators/flow/FlowProblem.hpp