All Classes Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
Ewoms::MultiPhaseBaseProblem< 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 <multiphasebaseproblem.hh>

Inheritance diagram for Ewoms::MultiPhaseBaseProblem< TypeTag >:
Ewoms::FvBaseProblem< TypeTag > Ewoms::BlackOilProblem< TypeTag > Ewoms::DiscreteFractureProblem< TypeTag >

Public Member Functions

 MultiPhaseBaseProblem (Simulator &simulator)
 
template<class Context >
void intersectionIntrinsicPermeability (DimMatrix &result, const Context &context, unsigned intersectionIdx, unsigned timeIdx) const
 Returns the intrinsic permeability of an intersection. More...
 
Problem parameters
template<class Context >
const DimMatrix & intrinsicPermeability (const Context &context OPM_UNUSED, unsigned spaceIdx OPM_UNUSED, unsigned timeIdx OPM_UNUSED) const
 Returns the intrinsic permeability tensor $[m^2]$ at a given position. More...
 
template<class Context >
Scalar porosity (const Context &context OPM_UNUSED, unsigned spaceIdx OPM_UNUSED, unsigned timeIdx OPM_UNUSED) const
 Returns the porosity [] of the porous medium for a given control volume. More...
 
template<class Context >
Scalar heatCapacitySolid (const Context &context OPM_UNUSED, unsigned spaceIdx OPM_UNUSED, unsigned timeIdx OPM_UNUSED) const
 Returns the heat capacity [J/(K m^3)] of the solid phase with no pores in the sub-control volume. More...
 
template<class Context >
const HeatConductionLawParams & heatConductionParams (const Context &context OPM_UNUSED, unsigned spaceIdx OPM_UNUSED, unsigned timeIdx OPM_UNUSED) const
 Returns the parameter object for the heat conductivity law in a sub-control volume. More...
 
template<class Context >
Scalar tortuosity (const Context &context OPM_UNUSED, unsigned spaceIdx OPM_UNUSED, unsigned timeIdx OPM_UNUSED) const
 Define the tortuosity. More...
 
template<class Context >
Scalar dispersivity (const Context &context OPM_UNUSED, unsigned spaceIdx OPM_UNUSED, unsigned timeIdx OPM_UNUSED) const
 Define the dispersivity. More...
 
template<class Context >
const MaterialLawParams & materialLawParams (const Context &context OPM_UNUSED, unsigned spaceIdx OPM_UNUSED, unsigned timeIdx OPM_UNUSED) const
 Returns the material law parameters $\mathrm{[K]}$ within a control volume. More...
 
template<class Context >
Scalar temperature (const Context &context OPM_UNUSED, unsigned spaceIdx OPM_UNUSED, unsigned timeIdx OPM_UNUSED) 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 &context OPM_UNUSED, unsigned spaceIdx OPM_UNUSED, unsigned timeIdx OPM_UNUSED) 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...
 
- Public Member Functions inherited from Ewoms::FvBaseProblem< TypeTag >
 FvBaseProblem (Simulator &simulator)
 
void finishInit ()
 Called by the Ewoms::Simulator in order to initialize the problem. More...
 
void prefetch (const Element &elem OPM_UNUSED) const
 Allows to improve the performance by prefetching all data which is associated with a given element.
 
void gridChanged ()
 Handle changes of the grid.
 
template<class Context >
void boundary (BoundaryRateVector &values OPM_UNUSED, const Context &context OPM_UNUSED, unsigned spaceIdx OPM_UNUSED, unsigned timeIdx OPM_UNUSED) const
 Evaluate the boundary conditions for a boundary segment. More...
 
template<class Context >
void constraints (Constraints &constraints OPM_UNUSED, const Context &context OPM_UNUSED, unsigned spaceIdx OPM_UNUSED, unsigned timeIdx OPM_UNUSED) const
 Evaluate the constraints for a control volume. More...
 
template<class Context >
void source (RateVector &rate OPM_UNUSED, const Context &context OPM_UNUSED, unsigned spaceIdx OPM_UNUSED, unsigned timeIdx OPM_UNUSED) const
 Evaluate the source term for all phases within a given sub-control-volume. More...
 
template<class Context >
void initial (PrimaryVariables &values OPM_UNUSED, const Context &context OPM_UNUSED, unsigned spaceIdx OPM_UNUSED, unsigned timeIdx OPM_UNUSED) const
 Evaluate the initial value for a control volume. More...
 
template<class Context >
Scalar extrusionFactor (const Context &context OPM_UNUSED, unsigned spaceIdx OPM_UNUSED, unsigned timeIdx OPM_UNUSED) 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.
 
void beginEpisode ()
 Called at the beginning of an simulation episode.
 
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 update.
 
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.
 
void timeIntegration ()
 Called by Ewoms::Simulator in order to do a time integration on the model.
 
Scalar nextTimeStepSize ()
 Called by Ewoms::Simulator whenever a solution for a time step has been computed and the simulation time has been updated.
 
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. 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.
 
std::string name () const
 The problem name. More...
 
const GridView & gridView () const
 The GridView which used by the problem.
 
const GlobalPosition & boundingBoxMin () const
 The coordinate of the corner of the GridView's bounding box with the smallest values.
 
const GlobalPosition & boundingBoxMax () const
 The coordinate of the corner of the GridView's bounding box with the largest values.
 
const VertexMapper & vertexMapper () const
 Returns the mapper for vertices to indices.
 
const ElementMapper & elementMapper () const
 Returns the mapper for elements to indices.
 
Simulatorsimulator ()
 Returns Simulator object used by the simulation.
 
const Simulatorsimulator () const
 Returns Simulator object used by the simulation. More...
 
Model & model ()
 Returns numerical model used for the problem.
 
const Model & model () const
 Returns numerical model used for the problem. More...
 
NewtonMethodnewtonMethod ()
 Returns object which implements the Newton method.
 
const NewtonMethodnewtonMethod () const
 Returns object which implements the Newton method.
 
RestrictProlongOperator restrictProlongOperator ()
 return restriction and prolongation operator More...
 
unsigned markForGridAdaptation ()
 Mark grid cells for refinement or coarsening. 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.
 

Static Public Member Functions

static void registerParameters ()
 Register all run-time parameters for the problem and the model.
 
- Static Public Member Functions inherited from Ewoms::FvBaseProblem< TypeTag >
static void registerParameters ()
 Registers all available parameters for the problem and the model.
 

Protected Member Functions

DimMatrix toDimMatrix_ (Scalar val) const
 Converts a Scalar value to an isotropic Tensor. More...
 

Protected Attributes

DimVector gravity_
 

Additional Inherited Members

- Public Types inherited from Ewoms::FvBaseProblem< TypeTag >
typedef EmptyRestrictProlong RestrictProlongOperator
 

Detailed Description

template<class TypeTag>
class Ewoms::MultiPhaseBaseProblem< TypeTag >

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

Constructor & Destructor Documentation

template<class TypeTag >
Ewoms::MultiPhaseBaseProblem< TypeTag >::MultiPhaseBaseProblem ( Simulator simulator)
inline

Member Function Documentation

template<class TypeTag >
template<class Context >
Scalar Ewoms::MultiPhaseBaseProblem< TypeTag >::dispersivity ( const Context &context  OPM_UNUSED,
unsigned spaceIdx  OPM_UNUSED,
unsigned timeIdx  OPM_UNUSED 
) const
inline

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.
template<class TypeTag >
template<class Context >
const DimVector& Ewoms::MultiPhaseBaseProblem< TypeTag >::gravity ( const Context &context  OPM_UNUSED,
unsigned spaceIdx  OPM_UNUSED,
unsigned timeIdx  OPM_UNUSED 
) const
inline

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.
template<class TypeTag >
const DimVector& Ewoms::MultiPhaseBaseProblem< TypeTag >::gravity ( ) const
inline

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 $.

template<class TypeTag >
template<class Context >
Scalar Ewoms::MultiPhaseBaseProblem< TypeTag >::heatCapacitySolid ( const Context &context  OPM_UNUSED,
unsigned spaceIdx  OPM_UNUSED,
unsigned timeIdx  OPM_UNUSED 
) const
inline

Returns the heat capacity [J/(K m^3)] of the solid phase with no pores in the 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.
template<class TypeTag >
template<class Context >
const HeatConductionLawParams& Ewoms::MultiPhaseBaseProblem< TypeTag >::heatConductionParams ( const Context &context  OPM_UNUSED,
unsigned spaceIdx  OPM_UNUSED,
unsigned timeIdx  OPM_UNUSED 
) const
inline

Returns the parameter object for the heat 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.
template<class TypeTag >
template<class Context >
void Ewoms::MultiPhaseBaseProblem< TypeTag >::intersectionIntrinsicPermeability ( DimMatrix &  result,
const Context &  context,
unsigned  intersectionIdx,
unsigned  timeIdx 
) const
inline

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).

template<class TypeTag >
template<class Context >
const DimMatrix& Ewoms::MultiPhaseBaseProblem< TypeTag >::intrinsicPermeability ( const Context &context  OPM_UNUSED,
unsigned spaceIdx  OPM_UNUSED,
unsigned timeIdx  OPM_UNUSED 
) const
inline

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.
template<class TypeTag >
unsigned Ewoms::MultiPhaseBaseProblem< TypeTag >::markForGridAdaptation ( )
inline

Mark grid cells for refinement or coarsening.

Returns
The number of elements marked for refinement or coarsening.
template<class TypeTag >
template<class Context >
const MaterialLawParams& Ewoms::MultiPhaseBaseProblem< TypeTag >::materialLawParams ( const Context &context  OPM_UNUSED,
unsigned spaceIdx  OPM_UNUSED,
unsigned timeIdx  OPM_UNUSED 
) const
inline

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.
template<class TypeTag >
template<class Context >
Scalar Ewoms::MultiPhaseBaseProblem< TypeTag >::porosity ( const Context &context  OPM_UNUSED,
unsigned spaceIdx  OPM_UNUSED,
unsigned timeIdx  OPM_UNUSED 
) const
inline

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.
template<class TypeTag >
template<class Context >
Scalar Ewoms::MultiPhaseBaseProblem< TypeTag >::temperature ( const Context &context  OPM_UNUSED,
unsigned spaceIdx  OPM_UNUSED,
unsigned timeIdx  OPM_UNUSED 
) const
inline

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.
template<class TypeTag >
Scalar Ewoms::MultiPhaseBaseProblem< TypeTag >::temperature ( ) const
inline

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.

template<class TypeTag >
DimMatrix Ewoms::MultiPhaseBaseProblem< TypeTag >::toDimMatrix_ ( Scalar  val) const
inlineprotected

Converts a Scalar value to an isotropic Tensor.

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

* auto permTensor = this->toDimMatrix_(1e-12);
*
Parameters
valThe scalar value which should be expressed as a tensor
template<class TypeTag >
template<class Context >
Scalar Ewoms::MultiPhaseBaseProblem< TypeTag >::tortuosity ( const Context &context  OPM_UNUSED,
unsigned spaceIdx  OPM_UNUSED,
unsigned timeIdx  OPM_UNUSED 
) const
inline

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.

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