Opm::DiscreteFractureProblem< TypeTag > Class Template Reference

The base class for the problems of ECFV discretizations which deal with a multi-phase flow through a porous medium. More...

#include <discretefractureproblem.hh>

Inheritance diagram for Opm::DiscreteFractureProblem< TypeTag >:
Inheritance graph

Public Types

using RestrictProlongOperator = EmptyRestrictProlong
 

Public Member Functions

 DiscreteFractureProblem (Simulator &simulator)
 
template<class Context >
void fractureFaceIntrinsicPermeability (DimMatrix &result, const Context &context, unsigned localFaceIdx, unsigned timeIdx) const
 Returns the intrinsic permeability of a face due to a fracture. More...
 
template<class Context >
const DimMatrix & fractureIntrinsicPermeability (const Context &, unsigned, unsigned) const
 Returns the intrinsic permeability tensor $[m^2]$ at a given position due to a fracture. More...
 
template<class Context >
Scalar fracturePorosity (const Context &, unsigned, unsigned) const
 Returns the porosity [] inside fractures for a given control volume. More...
 
template<class Context >
void intersectionIntrinsicPermeability (DimMatrix &result, const Context &context, unsigned intersectionIdx, unsigned timeIdx) const
 Returns the intrinsic permeability of an intersection. More...
 
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...
 
std::string outputDir () const
 Determine the directory for simulation output. More...
 
void finishInit ()
 Called by the Opm::Simulator in order to initialize the problem. More...
 
void prefetch (const Element &) const
 Allows to improve the performance by prefetching all data which is associated with a given element. More...
 
void gridChanged ()
 Handle changes of the grid. More...
 
template<class Context >
void boundary (BoundaryRateVector &, const Context &, unsigned, unsigned) const
 Evaluate the boundary conditions for a boundary segment. More...
 
template<class Context >
void constraints (Constraints &, const Context &, unsigned, unsigned) const
 Evaluate the constraints for a control volume. More...
 
template<class Context >
void source (RateVector &, const Context &, unsigned, unsigned) const
 Evaluate the source term for all phases within a given sub-control-volume. More...
 
template<class Context >
void initial (PrimaryVariables &, const Context &, unsigned, unsigned) const
 Evaluate the initial value for a control volume. More...
 
template<class Context >
Scalar extrusionFactor (const Context &, unsigned, unsigned) const
 Return how much the domain is extruded at a given sub-control volume. More...
 
Scalar extrusionFactor () const
 
void initialSolutionApplied ()
 Callback used by the model to indicate that the initial solution has been determined for all degrees of freedom. More...
 
void beginEpisode ()
 Called at the beginning of an simulation episode. More...
 
void beginTimeStep ()
 Called by the simulator before each time integration. More...
 
void beginIteration ()
 Called by the simulator before each Newton-Raphson iteration. More...
 
void endIteration ()
 Called by the simulator after each Newton-Raphson update. More...
 
void endTimeStep ()
 Called by the simulator after each time integration. More...
 
void endEpisode ()
 Called when the end of an simulation episode is reached. More...
 
void finalize ()
 Called after the simulation has been run sucessfully. More...
 
void timeIntegration ()
 Called by Opm::Simulator in order to do a time integration on the model. More...
 
Scalar minTimeStepSize () const
 Returns the minimum allowable size of a time step. More...
 
unsigned maxTimeIntegrationFailures () const
 Returns the maximum number of subsequent failures for the time integration before giving up. More...
 
bool continueOnConvergenceError () const
 Returns if we should continue with a non-converged solution instead of giving up if we encounter a time step size smaller than the minimum time step size. More...
 
void setNextTimeStepSize (Scalar dt)
 Impose the next time step size to be used externally. More...
 
Scalar nextTimeStepSize () const
 Called by Opm::Simulator whenever a solution for a time step has been computed and the simulation time has been updated. More...
 
bool shouldWriteRestartFile () const
 Returns true if a restart file should be written to disk. More...
 
bool shouldWriteOutput () const
 Returns true if the current solution should be written to disk (i.e. as a VTK file) More...
 
void advanceTimeLevel ()
 Called by the simulator after everything which can be done about the current time step is finished and the model should be prepared to do the next time integration. More...
 
std::string name () const
 The problem name. More...
 
const GridView & gridView () const
 The GridView which used by the problem. More...
 
const GlobalPosition & boundingBoxMin () const
 The coordinate of the corner of the GridView's bounding box with the smallest values. More...
 
const GlobalPosition & boundingBoxMax () const
 The coordinate of the corner of the GridView's bounding box with the largest values. More...
 
const VertexMapper & vertexMapper () const
 Returns the mapper for vertices to indices. More...
 
const ElementMapper & elementMapper () const
 Returns the mapper for elements to indices. More...
 
Simulator & simulator ()
 Returns Simulator object used by the simulation. More...
 
const Simulator & simulator () const
 Returns Simulator object used by the simulation. More...
 
Model & model ()
 Returns numerical model used for the problem. More...
 
const Model & model () const
 Returns numerical model used for the problem. More...
 
NewtonMethod & newtonMethod ()
 Returns object which implements the Newton method. More...
 
const NewtonMethod & newtonMethod () const
 Returns object which implements the Newton method. More...
 
RestrictProlongOperator restrictProlongOperator ()
 return restriction and prolongation operator More...
 
template<class Restarter >
void serialize (Restarter &res)
 This method writes the complete state of the problem to the harddisk. More...
 
template<class Restarter >
void deserialize (Restarter &res)
 This method restores the complete state of the problem from disk. More...
 
void writeOutput (bool verbose=true)
 Write the relevant secondary variables of the current solution into an VTK output file. More...
 
VtkMultiWriterdefaultVtkWriter () const
 Method to retrieve the VTK writer which should be used to write the default ouput after each time step to disk. More...
 

Static Public Member Functions

static void registerParameters ()
 Register all run-time parameters for the problem and the model. More...
 
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. More...
 
static std::string briefDescription ()
 Returns a human readable description of the problem for the help message. More...
 
static int handlePositionalParameter (std::set< std::string > &, std::string &errorMsg, int, const char **argv, int paramIdx, int)
 Handles positional command line parameters. More...
 

Protected Attributes

Scalar nextTimeStepSize_
 

Problem parameters

template<class Context >
const DimMatrix & intrinsicPermeability (const Context &, unsigned, unsigned) const
 Returns the intrinsic permeability tensor $[m^2]$ at a given position. More...
 
template<class Context >
Scalar porosity (const Context &, unsigned, unsigned) const
 Returns the porosity [] of the porous medium for a given control volume. More...
 
template<class Context >
const SolidEnergyLawParams & solidEnergyParams (const Context &, unsigned, unsigned) const
 Returns the parameter object for the energy storage law of the solid in a sub-control volume. More...
 
template<class Context >
const ThermalConductionLawParams & thermalConductionParams (const Context &, unsigned, unsigned) const
 Returns the parameter object for the thermal conductivity law in a sub-control volume. More...
 
template<class Context >
Scalar tortuosity (const Context &, unsigned, unsigned) const
 Define the tortuosity. More...
 
template<class Context >
Scalar dispersivity (const Context &, unsigned, unsigned) const
 Define the dispersivity. More...
 
template<class Context >
const MaterialLawParams & materialLawParams (const Context &, unsigned, unsigned) const
 Returns the material law parameters $\mathrm{[K]}$ within a control volume. More...
 
template<class FluidState >
void updateRelperms (std::array< Evaluation, numPhases > &mobility, DirectionalMobilityPtr &dirMob, FluidState &fluidState, unsigned globalSpaceIdx) const
 
template<class Context >
Scalar temperature (const Context &, unsigned, unsigned) const
 Returns the temperature $\mathrm{[K]}$ within a control volume. More...
 
Scalar temperature () const
 Returns the temperature $\mathrm{[K]}$ for an isothermal problem. More...
 
template<class Context >
const DimVector & gravity (const Context &, unsigned, unsigned) const
 Returns the acceleration due to gravity $\mathrm{[m/s^2]}$. More...
 
const DimVector & gravity () const
 Returns the acceleration due to gravity $\mathrm{[m/s^2]}$. More...
 
unsigned markForGridAdaptation ()
 Mark grid cells for refinement or coarsening. More...
 
DimVector gravity_
 
DimMatrix toDimMatrix_ (Scalar val) const
 Converts a Scalar value to an isotropic Tensor. More...
 

Detailed Description

template<class TypeTag>
class Opm::DiscreteFractureProblem< TypeTag >

The base class for the problems of ECFV discretizations which deal with a multi-phase flow through a porous medium.

Member Typedef Documentation

◆ RestrictProlongOperator

template<class TypeTag >
using Opm::FvBaseProblem< TypeTag >::RestrictProlongOperator = EmptyRestrictProlong
inherited

Constructor & Destructor Documentation

◆ DiscreteFractureProblem()

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

Member Function Documentation

◆ advanceTimeLevel()

template<class TypeTag >
void Opm::FvBaseProblem< TypeTag >::advanceTimeLevel ( )
inlineinherited

Called by the simulator after everything which can be done about the current time step is finished and the model should be prepared to do the next time integration.

References Opm::FvBaseProblem< TypeTag >::model().

◆ beginEpisode()

template<class TypeTag >
void Opm::FvBaseProblem< TypeTag >::beginEpisode ( )
inlineinherited

Called at the beginning of an simulation episode.

◆ beginIteration()

template<class TypeTag >
void Opm::FvBaseProblem< TypeTag >::beginIteration ( )
inlineinherited

Called by the simulator before each Newton-Raphson iteration.

◆ beginTimeStep()

template<class TypeTag >
void Opm::FvBaseProblem< TypeTag >::beginTimeStep ( )
inlineinherited

Called by the simulator before each time integration.

◆ boundary()

template<class TypeTag >
template<class Context >
void Opm::FvBaseProblem< TypeTag >::boundary ( BoundaryRateVector &  ,
const Context &  ,
unsigned  ,
unsigned   
) const
inlineinherited

Evaluate the boundary conditions for a boundary segment.

Parameters
valuesStores the fluxes over the boundary segment.
contextThe object representing the execution context from which this method is called.
spaceIdxThe local index of the spatial entity which represents the boundary segment.
timeIdxThe index used for the time discretization

◆ boundingBoxMax()

template<class TypeTag >
const GlobalPosition & Opm::FvBaseProblem< TypeTag >::boundingBoxMax ( ) const
inlineinherited

The coordinate of the corner of the GridView's bounding box with the largest values.

◆ boundingBoxMin()

template<class TypeTag >
const GlobalPosition & Opm::FvBaseProblem< TypeTag >::boundingBoxMin ( ) const
inlineinherited

The coordinate of the corner of the GridView's bounding box with the smallest values.

◆ briefDescription()

template<class TypeTag >
static std::string Opm::FvBaseProblem< TypeTag >::briefDescription ( )
inlinestaticinherited

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.

◆ constraints()

template<class TypeTag >
template<class Context >
void Opm::FvBaseProblem< TypeTag >::constraints ( Constraints &  ,
const Context &  ,
unsigned  ,
unsigned   
) const
inlineinherited

Evaluate the constraints for a control volume.

Parameters
constraintsStores the values of the primary variables at a given spatial and temporal location.
contextThe object representing the execution context from which this method is called.
spaceIdxThe local index of the spatial entity which represents the boundary segment.
timeIdxThe index used for the time discretization

◆ continueOnConvergenceError()

template<class TypeTag >
bool Opm::FvBaseProblem< TypeTag >::continueOnConvergenceError ( ) const
inlineinherited

Returns if we should continue with a non-converged solution instead of giving up if we encounter a time step size smaller than the minimum time step size.

Referenced by Opm::FvBaseProblem< TypeTag >::timeIntegration().

◆ defaultVtkWriter()

template<class TypeTag >
VtkMultiWriter & Opm::FvBaseProblem< TypeTag >::defaultVtkWriter ( ) const
inlineinherited

Method to retrieve the VTK writer which should be used to write the default ouput after each time step to disk.

◆ deserialize()

template<class TypeTag >
template<class Restarter >
void Opm::FvBaseProblem< TypeTag >::deserialize ( Restarter &  res)
inlineinherited

This method restores the complete state of the problem from disk.

It is the inverse of the serialize() method.

Template Parameters
RestarterThe deserializer type
Parameters
resThe deserializer object

References Opm::VtkMultiWriter< GridView, vtkFormat >::deserialize().

◆ dispersivity()

template<class TypeTag >
template<class Context >
Scalar Opm::MultiPhaseBaseProblem< TypeTag >::dispersivity ( const Context &  ,
unsigned  ,
unsigned   
) const
inlineinherited

Define the dispersivity.

Parameters
contextReference to the object which represents the current execution context.
spaceIdxThe local index of spatial entity defined by the context
timeIdxThe index used by the time discretization.

◆ elementMapper()

template<class TypeTag >
const ElementMapper & Opm::FvBaseProblem< TypeTag >::elementMapper ( ) const
inlineinherited

Returns the mapper for elements to indices.

◆ endEpisode()

template<class TypeTag >
void Opm::FvBaseProblem< TypeTag >::endEpisode ( )
inlineinherited

Called when the end of an simulation episode is reached.

Typically, a new episode is started in this method.

References Opm::FvBaseProblem< TypeTag >::simulator().

◆ endIteration()

template<class TypeTag >
void Opm::FvBaseProblem< TypeTag >::endIteration ( )
inlineinherited

Called by the simulator after each Newton-Raphson update.

◆ endTimeStep()

template<class TypeTag >
void Opm::FvBaseProblem< TypeTag >::endTimeStep ( )
inlineinherited

Called by the simulator after each time integration.

This method is intended to do some post processing of the solution. (e.g., some additional output)

◆ extrusionFactor() [1/2]

template<class TypeTag >
Scalar Opm::FvBaseProblem< TypeTag >::extrusionFactor ( ) const
inlineinherited

◆ extrusionFactor() [2/2]

template<class TypeTag >
template<class Context >
Scalar Opm::FvBaseProblem< TypeTag >::extrusionFactor ( const Context &  ,
unsigned  ,
unsigned   
) const
inlineinherited

Return how much the domain is extruded at a given sub-control volume.

This means the factor by which a lower-dimensional (1D or 2D) entity needs to be expanded to get a full dimensional cell. The default is 1.0 which means that 1D problems are actually thought as pipes with a cross section of 1 m^2 and 2D problems are assumed to extend 1 m to the back.

Parameters
contextThe object representing the execution context from which this method is called.
spaceIdxThe local index of the spatial entity which represents the boundary segment.
timeIdxThe index used for the time discretization

◆ finalize()

template<class TypeTag >
void Opm::FvBaseProblem< TypeTag >::finalize ( )
inlineinherited

◆ finishInit()

template<class TypeTag >
void Opm::FvBaseProblem< TypeTag >::finishInit ( )
inlineinherited

Called by the Opm::Simulator in order to initialize the problem.

If you overload this method don't forget to call ParentType::finishInit()

◆ fractureFaceIntrinsicPermeability()

template<class TypeTag >
template<class Context >
void Opm::DiscreteFractureProblem< TypeTag >::fractureFaceIntrinsicPermeability ( DimMatrix &  result,
const Context &  context,
unsigned  localFaceIdx,
unsigned  timeIdx 
) const
inline

Returns the intrinsic permeability of a face due to a fracture.

This method is specific to the finite volume discretizations. If left unspecified, it calls the intrinsicPermeability() methods for the face's interior and exterior finite volume and averages them harmonically. Note that if this function is defined, the intrinsicPermeability() method does not need to be defined by the problem (if a finite-volume discretization is used).

◆ fractureIntrinsicPermeability()

template<class TypeTag >
template<class Context >
const DimMatrix & Opm::DiscreteFractureProblem< TypeTag >::fractureIntrinsicPermeability ( const Context &  ,
unsigned  ,
unsigned   
) const
inline

Returns the intrinsic permeability tensor $[m^2]$ at a given position due to a fracture.

Parameters
contextReference to the object which represents the current execution context.
spaceIdxThe local index of spatial entity defined by the context
timeIdxThe index used by the time discretization.

◆ fracturePorosity()

template<class TypeTag >
template<class Context >
Scalar Opm::DiscreteFractureProblem< TypeTag >::fracturePorosity ( const Context &  ,
unsigned  ,
unsigned   
) const
inline

Returns the porosity [] inside fractures for a given control volume.

Parameters
contextReference to the object which represents the current execution context.
spaceIdxThe local index of spatial entity defined by the context
timeIdxThe index used by the time discretization.

◆ gravity() [1/2]

template<class TypeTag >
const DimVector & Opm::MultiPhaseBaseProblem< TypeTag >::gravity ( ) const
inlineinherited

Returns the acceleration due to gravity $\mathrm{[m/s^2]}$.

This method is used for problems where the gravitational acceleration does not depend on the spatial position. The default behaviour is that if the EnableGravity property is true, $\boldsymbol{g} = ( 0,\dots,\ -9.81)^T $ holds, else $\boldsymbol{g} = ( 0,\dots, 0)^T $.

References Opm::MultiPhaseBaseProblem< TypeTag >::gravity_.

◆ gravity() [2/2]

template<class TypeTag >
template<class Context >
const DimVector & Opm::MultiPhaseBaseProblem< TypeTag >::gravity ( const Context &  ,
unsigned  ,
unsigned   
) const
inlineinherited

Returns the acceleration due to gravity $\mathrm{[m/s^2]}$.

Parameters
contextReference to the object which represents the current execution context.
spaceIdxThe local index of spatial entity defined by the context
timeIdxThe index used by the time discretization.

◆ gridChanged()

template<class TypeTag >
void Opm::FvBaseProblem< TypeTag >::gridChanged ( )
inlineinherited

Handle changes of the grid.

References Opm::VtkMultiWriter< GridView, vtkFormat >::gridChanged().

◆ gridView()

template<class TypeTag >
const GridView & Opm::FvBaseProblem< TypeTag >::gridView ( ) const
inlineinherited

◆ handlePositionalParameter()

template<class TypeTag >
static int Opm::FvBaseProblem< TypeTag >::handlePositionalParameter ( std::set< std::string > &  ,
std::string &  errorMsg,
int  ,
const char **  argv,
int  paramIdx,
int   
)
inlinestaticinherited

Handles positional command line parameters.

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

Parameters
seenParamsThe parameters which have already been seen in the current context
errorMsgIf the positional argument cannot be handled, this is the reason why
argcThe total number of command line parameters
argvThe string value of the command line parameters
paramIdxThe index of the positional parameter in the array of all parameters
posParamIdxThe 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.

◆ helpPreamble()

template<class TypeTag >
static std::string Opm::FvBaseProblem< TypeTag >::helpPreamble ( int  ,
const char **  argv 
)
inlinestaticinherited

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.

◆ initial()

template<class TypeTag >
template<class Context >
void Opm::FvBaseProblem< TypeTag >::initial ( PrimaryVariables &  ,
const Context &  ,
unsigned  ,
unsigned   
) const
inlineinherited

Evaluate the initial value for a control volume.

Parameters
valuesStores the primary variables.
contextThe object representing the execution context from which this method is called.
spaceIdxThe local index of the spatial entity which represents the boundary segment.
timeIdxThe index used for the time discretization

◆ initialSolutionApplied()

template<class TypeTag >
void Opm::FvBaseProblem< TypeTag >::initialSolutionApplied ( )
inlineinherited

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

◆ intersectionIntrinsicPermeability()

template<class TypeTag >
template<class Context >
void Opm::MultiPhaseBaseProblem< TypeTag >::intersectionIntrinsicPermeability ( DimMatrix &  result,
const Context &  context,
unsigned  intersectionIdx,
unsigned  timeIdx 
) const
inlineinherited

Returns the intrinsic permeability of an intersection.

This method is specific to the finite volume discretizations. If left unspecified, it calls the intrinsicPermeability() method for the intersection's interior and exterior finite volumes and averages them harmonically. Note that if this function is defined, the intrinsicPermeability() method does not need to be defined by the problem (if a finite-volume discretization is used).

◆ intrinsicPermeability()

template<class TypeTag >
template<class Context >
const DimMatrix & Opm::MultiPhaseBaseProblem< TypeTag >::intrinsicPermeability ( const Context &  ,
unsigned  ,
unsigned   
) const
inlineinherited

Returns the intrinsic permeability tensor $[m^2]$ at a given position.

Parameters
contextReference to the object which represents the current execution context.
spaceIdxThe local index of spatial entity defined by the context
timeIdxThe index used by the time discretization.

◆ markForGridAdaptation()

template<class TypeTag >
unsigned Opm::MultiPhaseBaseProblem< TypeTag >::markForGridAdaptation ( )
inlineinherited

Mark grid cells for refinement or coarsening.

Returns
The number of elements marked for refinement or coarsening.

References Opm::FvBaseProblem< TypeTag >::gridView(), and Opm::FvBaseProblem< TypeTag >::simulator().

◆ materialLawParams()

template<class TypeTag >
template<class Context >
const MaterialLawParams & Opm::MultiPhaseBaseProblem< TypeTag >::materialLawParams ( const Context &  ,
unsigned  ,
unsigned   
) const
inlineinherited

Returns the material law parameters $\mathrm{[K]}$ within a control volume.

If you get a compiler error at this method, you set the MaterialLaw property to something different than Opm::NullMaterialLaw. In this case, you have to overload the matererialLaw() method in the derived class!

Parameters
contextReference to the object which represents the current execution context.
spaceIdxThe local index of spatial entity defined by the context
timeIdxThe index used by the time discretization.

◆ maxTimeIntegrationFailures()

template<class TypeTag >
unsigned Opm::FvBaseProblem< TypeTag >::maxTimeIntegrationFailures ( ) const
inlineinherited

Returns the maximum number of subsequent failures for the time integration before giving up.

◆ minTimeStepSize()

template<class TypeTag >
Scalar Opm::FvBaseProblem< TypeTag >::minTimeStepSize ( ) const
inlineinherited

Returns the minimum allowable size of a time step.

Referenced by Opm::FvBaseProblem< TypeTag >::timeIntegration().

◆ model() [1/2]

template<class TypeTag >
Model & Opm::FvBaseProblem< TypeTag >::model ( )
inlineinherited

◆ model() [2/2]

template<class TypeTag >
const Model & Opm::FvBaseProblem< TypeTag >::model ( ) const
inlineinherited

Returns numerical model used for the problem.

◆ name()

template<class TypeTag >
std::string Opm::FvBaseProblem< TypeTag >::name ( ) const
inlineinherited

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.

Referenced by Opm::FvBaseProblem< TypeTag >::FvBaseProblem().

◆ newtonMethod() [1/2]

template<class TypeTag >
NewtonMethod & Opm::FvBaseProblem< TypeTag >::newtonMethod ( )
inlineinherited

Returns object which implements the Newton method.

References Opm::FvBaseProblem< TypeTag >::model().

Referenced by Opm::FvBaseProblem< TypeTag >::nextTimeStepSize().

◆ newtonMethod() [2/2]

template<class TypeTag >
const NewtonMethod & Opm::FvBaseProblem< TypeTag >::newtonMethod ( ) const
inlineinherited

Returns object which implements the Newton method.

References Opm::FvBaseProblem< TypeTag >::model().

◆ nextTimeStepSize()

template<class TypeTag >
Scalar Opm::FvBaseProblem< TypeTag >::nextTimeStepSize ( ) const
inlineinherited

Called by Opm::Simulator whenever a solution for a time step has been computed and the simulation time has been updated.

References Opm::Parameters::Get(), Opm::FvBaseProblem< TypeTag >::newtonMethod(), Opm::FvBaseProblem< TypeTag >::nextTimeStepSize_, and Opm::FvBaseProblem< TypeTag >::simulator().

◆ outputDir()

template<class TypeTag >
std::string Opm::FvBaseProblem< TypeTag >::outputDir ( ) const
inlineinherited

Determine the directory for simulation output.

The actual problem may chose to transform the value of the OutputDir parameter and it can e.g. choose to create the directory on demand if it does not exist. The default behaviour is to just return the OutputDir parameter and to throw an exception if no directory with this name exists.

References Opm::FvBaseProblem< TypeTag >::outputDir().

Referenced by Opm::FvBaseProblem< TypeTag >::FvBaseProblem(), and Opm::FvBaseProblem< TypeTag >::outputDir().

◆ porosity()

template<class TypeTag >
template<class Context >
Scalar Opm::MultiPhaseBaseProblem< TypeTag >::porosity ( const Context &  ,
unsigned  ,
unsigned   
) const
inlineinherited

Returns the porosity [] of the porous medium for a given control volume.

Parameters
contextReference to the object which represents the current execution context.
spaceIdxThe local index of spatial entity defined by the context
timeIdxThe index used by the time discretization.

◆ prefetch()

template<class TypeTag >
void Opm::FvBaseProblem< TypeTag >::prefetch ( const Element &  ) const
inlineinherited

Allows to improve the performance by prefetching all data which is associated with a given element.

◆ recycleFirstIterationStorage()

template<class TypeTag >
bool Opm::FvBaseProblem< TypeTag >::recycleFirstIterationStorage ( ) const
inlineinherited

Return if the storage term of the first iteration is identical to the storage term for the solution of the previous time step.

This is only relevant if the storage cache is enabled and is usually the case, i.e., this method only needs to be overwritten in rare corner cases.

◆ registerParameters()

template<class TypeTag >
static void Opm::MultiPhaseBaseProblem< TypeTag >::registerParameters ( )
inlinestaticinherited

Register all run-time parameters for the problem and the model.

◆ restrictProlongOperator()

template<class TypeTag >
RestrictProlongOperator Opm::FvBaseProblem< TypeTag >::restrictProlongOperator ( )
inlineinherited

return restriction and prolongation operator

Note
This method has to be overloaded by the implementation.

◆ serialize()

template<class TypeTag >
template<class Restarter >
void Opm::FvBaseProblem< TypeTag >::serialize ( Restarter &  res)
inlineinherited

This method writes the complete state of the problem to the harddisk.

The file will start with the prefix returned by the name() method, has the current time of the simulation clock in it's name and uses the extension .ers. (Ewoms ReStart file.) See Opm::Restart for details.

Template Parameters
RestarterThe serializer type
Parameters
resThe serializer object

References Opm::VtkMultiWriter< GridView, vtkFormat >::serialize().

◆ setNextTimeStepSize()

template<class TypeTag >
void Opm::FvBaseProblem< TypeTag >::setNextTimeStepSize ( Scalar  dt)
inlineinherited

Impose the next time step size to be used externally.

References Opm::FvBaseProblem< TypeTag >::nextTimeStepSize_.

◆ shouldWriteOutput()

template<class TypeTag >
bool Opm::FvBaseProblem< TypeTag >::shouldWriteOutput ( ) const
inlineinherited

Returns true if the current solution should be written to disk (i.e. as a VTK file)

The default behavior is to write out the solution for every time step. This method is should be overwritten by the implementation if the default behavior is deemed insufficient.

◆ shouldWriteRestartFile()

template<class TypeTag >
bool Opm::FvBaseProblem< TypeTag >::shouldWriteRestartFile ( ) const
inlineinherited

Returns true if a restart file should be written to disk.

The default behavior is to write one restart file every 10 time steps. This method should be overwritten by the implementation if the default behavior is deemed insufficient.

References Opm::FvBaseProblem< TypeTag >::simulator().

◆ simulator() [1/2]

◆ simulator() [2/2]

template<class TypeTag >
const Simulator & Opm::FvBaseProblem< TypeTag >::simulator ( ) const
inlineinherited

Returns Simulator object used by the simulation.

◆ solidEnergyParams()

template<class TypeTag >
template<class Context >
const SolidEnergyLawParams & Opm::MultiPhaseBaseProblem< TypeTag >::solidEnergyParams ( const Context &  ,
unsigned  ,
unsigned   
) const
inlineinherited

Returns the parameter object for the energy storage law of the solid in a sub-control volume.

Parameters
contextReference to the object which represents the current execution context.
spaceIdxThe local index of spatial entity defined by the context
timeIdxThe index used by the time discretization.

◆ source()

template<class TypeTag >
template<class Context >
void Opm::FvBaseProblem< TypeTag >::source ( RateVector &  ,
const Context &  ,
unsigned  ,
unsigned   
) const
inlineinherited

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

Parameters
rateStores the values of the volumetric creation/anihilition rates of the conserved quantities.
contextThe object representing the execution context from which this method is called.
spaceIdxThe local index of the spatial entity which represents the boundary segment.
timeIdxThe index used for the time discretization

◆ temperature() [1/2]

template<class TypeTag >
Scalar Opm::MultiPhaseBaseProblem< TypeTag >::temperature ( ) const
inlineinherited

Returns the temperature $\mathrm{[K]}$ for an isothermal problem.

This is not specific to the discretization. By default it just throws an exception so it must be overloaded by the problem if no energy equation is to be used.

◆ temperature() [2/2]

template<class TypeTag >
template<class Context >
Scalar Opm::MultiPhaseBaseProblem< TypeTag >::temperature ( const Context &  ,
unsigned  ,
unsigned   
) const
inlineinherited

Returns the temperature $\mathrm{[K]}$ within a control volume.

Parameters
contextReference to the object which represents the current execution context.
spaceIdxThe local index of spatial entity defined by the context
timeIdxThe index used by the time discretization.

◆ thermalConductionParams()

template<class TypeTag >
template<class Context >
const ThermalConductionLawParams & Opm::MultiPhaseBaseProblem< TypeTag >::thermalConductionParams ( const Context &  ,
unsigned  ,
unsigned   
) const
inlineinherited

Returns the parameter object for the thermal conductivity law in a sub-control volume.

Parameters
contextReference to the object which represents the current execution context.
spaceIdxThe local index of spatial entity defined by the context
timeIdxThe index used by the time discretization.

◆ timeIntegration()

◆ toDimMatrix_()

template<class TypeTag >
DimMatrix Opm::MultiPhaseBaseProblem< TypeTag >::toDimMatrix_ ( Scalar  val) const
inlineprotectedinherited

Converts a Scalar value to an isotropic Tensor.

This is convenient e.g. for specifying intrinsic permebilities:

auto permTensor = this->toDimMatrix_(1e-12);
DimMatrix toDimMatrix_(Scalar val) const
Converts a Scalar value to an isotropic Tensor.
Definition: multiphasebaseproblem.hh:380
Parameters
valThe scalar value which should be expressed as a tensor

◆ tortuosity()

template<class TypeTag >
template<class Context >
Scalar Opm::MultiPhaseBaseProblem< TypeTag >::tortuosity ( const Context &  ,
unsigned  ,
unsigned   
) const
inlineinherited

Define the tortuosity.

Parameters
contextReference to the object which represents the current execution context.
spaceIdxThe local index of spatial entity defined by the context
timeIdxThe index used by the time discretization.

◆ updateRelperms()

template<class TypeTag >
template<class FluidState >
void Opm::MultiPhaseBaseProblem< TypeTag >::updateRelperms ( std::array< Evaluation, numPhases > &  mobility,
DirectionalMobilityPtr &  dirMob,
FluidState &  fluidState,
unsigned  globalSpaceIdx 
) const
inlineinherited

◆ vertexMapper()

template<class TypeTag >
const VertexMapper & Opm::FvBaseProblem< TypeTag >::vertexMapper ( ) const
inlineinherited

Returns the mapper for vertices to indices.

◆ writeOutput()

template<class TypeTag >
void Opm::FvBaseProblem< TypeTag >::writeOutput ( bool  verbose = true)
inlineinherited

Write the relevant secondary variables of the current solution into an VTK output file.

Parameters
verboseSpecify if a message should be printed whenever a file is written

References Opm::VtkMultiWriter< GridView, vtkFormat >::beginWrite(), Opm::VtkMultiWriter< GridView, vtkFormat >::endWrite(), Opm::FvBaseProblem< TypeTag >::gridView(), Opm::FvBaseProblem< TypeTag >::model(), and Opm::FvBaseProblem< TypeTag >::simulator().

Member Data Documentation

◆ gravity_

template<class TypeTag >
DimVector Opm::MultiPhaseBaseProblem< TypeTag >::gravity_
protectedinherited

◆ nextTimeStepSize_

template<class TypeTag >
Scalar Opm::FvBaseProblem< TypeTag >::nextTimeStepSize_
protectedinherited

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