3.3.0
DUNE for Multi-{Phase, Component, Scale, Physics, ...} flow and transport in porous media
Public Member Functions | List of all members
Dumux::IMPETProblem< TypeTag > Class Template Reference

base class for problems using a sequential implicit-explicit strategy More...

#include <dumux/porousmediumflow/sequential/impetproblem.hh>

Inheritance diagram for Dumux::IMPETProblem< TypeTag >:

Description

template<class TypeTag>
class Dumux::IMPETProblem< TypeTag >

base class for problems using a sequential implicit-explicit strategy

Template Parameters
TypeTagproblem TypeTag
Implementationproblem implementation

Public Member Functions

 IMPETProblem (TimeManager &timeManager, Grid &grid)
 Constructs an object of type IMPETProblemProblem. More...
 
 IMPETProblem (TimeManager &timeManager, Grid &grid, const GridView &gridView)
 
void boundaryTypes (BoundaryTypes &bcTypes, const Intersection &intersection) const
 Specifies which kind of boundary condition should be used for which equation on a given boundary segment. More...
 
void boundaryTypesAtPos (BoundaryTypes &bcTypes, const GlobalPosition &globalPos) const
 Specifies which kind of boundary condition should be used for which equation on a given boundary segment. More...
 
void dirichlet (PrimaryVariables &values, const Intersection &intersection) const
 Evaluate the boundary conditions for a dirichlet control volume. More...
 
void dirichletAtPos (PrimaryVariables &values, const GlobalPosition &globalPos) const
 Evaluate the boundary conditions for a dirichlet control volume. More...
 
void neumann (PrimaryVariables &values, const Intersection &intersection) const
 Evaluate the boundary conditions for a neumann boundary segment. More...
 
void neumannAtPos (PrimaryVariables &values, const GlobalPosition &globalPos) const
 Evaluate the boundary conditions for a neumann boundary segment. More...
 
void source (PrimaryVariables &values, const Element &element) const
 Evaluate the source term. More...
 
void sourceAtPos (PrimaryVariables &values, const GlobalPosition &globalPos) const
 Evaluate the source term for all phases within a given sub-control-volume. More...
 
void initial (PrimaryVariables &values, const Element &element) const
 Evaluate the initial value for a control volume. More...
 
void initialAtPos (PrimaryVariables &values, const GlobalPosition &globalPos) const
 Evaluate the initial value for a control volume. More...
 
void init ()
 Called by the TimeManager in order to initialize the problem. More...
 
void preTimeStep ()
 Called by TimeManager just before the time integration. More...
 
void timeIntegration ()
 Called by TimeManager in order to do a time integration on the model. More...
 
void postTimeStep ()
 Called by TimeManager whenever a solution for a timestep has been computed and the simulation time has been updated. More...
 
void advanceTimeLevel ()
 Called by the time manager 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...
 
Scalar timeStepSize () const
 Returns the current time step size [seconds]. More...
 
void setTimeStepSize (const Scalar dt)
 Sets the current time step size [seconds]. More...
 
Scalar nextTimeStepSize (const Scalar dt)
 Called by TimeManager whenever a solution for a timestep has been computed and the simulation time has been updated. More...
 
Scalar maxTimeStepSize () const
 Returns the maximum allowed time step size [s]. More...
 
bool shouldWriteRestartFile () const
 Returns true if a restart file should be written to disk. More...
 
void setOutputTimeInterval (const Scalar timeInterval)
 Sets a time interval for Output. More...
 
void setOutputInterval (const int interval)
 Sets the interval for Output. More...
 
bool shouldWriteOutput () const
 Returns true if the current solution should be written to disk (i.e. as a VTK file) More...
 
void episodeEnd ()
 Called when the end of an simulation episode is reached. More...
 
const std::string & name () const
 The problem name. More...
 
void setName (std::string newName)
 Set the problem name. More...
 
const GridView & gridView () const
 The GridView which used by the problem. More...
 
Grid & grid ()
 Returns the current grid which used by the problem. More...
 
void setGrid (Grid &grid)
 Specifies the grid from outside the problem. More...
 
GridAdaptModel & gridAdapt ()
 Returns adaptivity model used for the problem. More...
 
void preAdapt ()
 Capability to introduce problem-specific routines at the beginning of the grid adaptation. More...
 
void postAdapt ()
 Capability to introduce problem-specific routines after grid adaptation. 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...
 
const GlobalPosition & bBoxMin () const
 The coordinate of the corner of the GridView's bounding box with the smallest values. More...
 
const GlobalPosition & bBoxMax () const
 The coordinate of the corner of the GridView's bounding box with the largest values. More...
 
Access functions
TimeManager & timeManager ()
 Returns TimeManager object used by the simulation. More...
 
const TimeManager & timeManager () const
 Returns TimeManager object used by the simulation. More...
 
Variables & variables ()
 Returns variables container. More...
 
const Variables & variables () const
 Returns variables container. () More...
 
IMPETModel & model ()
 Returns numerical model used for the problem. More...
 
const IMPETModel & model () const
 Returns numerical model used for the problem. More...
 
PressureModel & pressureModel ()
 Returns the pressure model used for the problem. More...
 
const PressureModel & pressureModel () const
 Returns the pressure model used for the problem. More...
 
TransportModel & transportModel ()
 Returns transport model used for the problem. More...
 
const TransportModel & transportModel () const
 Returns transport model used for the problem. More...
 

Restart mechanism

void serialize ()
 This method writes the complete state of the problem to the harddisk. More...
 
void restart (const double tRestart)
 This method restores the complete state of the problem from disk. More...
 
void addOutputVtkFields ()
 
int vtkOutputLevel () const
 Returns the vtk output verbosity level. More...
 
void writeOutput (bool verbose=true)
 Write the fields current solution into an VTK output file. More...
 
VtkMultiWriterresultWriter ()
 Returns the applied VTK-writer for the output. More...
 
VtkMultiWriterresultWriter () const
 Returns the applied VTK-writer for the output. More...
 

Constructor & Destructor Documentation

◆ IMPETProblem() [1/2]

template<class TypeTag >
Dumux::IMPETProblem< TypeTag >::IMPETProblem ( TimeManager &  timeManager,
Grid &  grid 
)
inline

Constructs an object of type IMPETProblemProblem.

Parameters
timeManagerThe time manager
gridThe grid

◆ IMPETProblem() [2/2]

template<class TypeTag >
Dumux::IMPETProblem< TypeTag >::IMPETProblem ( TimeManager &  timeManager,
Grid &  grid,
const GridView &  gridView 
)
inline

Member Function Documentation

◆ addOutputVtkFields()

template<class TypeTag >
void Dumux::IMPETProblem< TypeTag >::addOutputVtkFields ( )
inline

◆ advanceTimeLevel()

template<class TypeTag >
void Dumux::IMPETProblem< TypeTag >::advanceTimeLevel ( )
inline

Called by the time manager 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.

◆ bBoxMax()

template<class TypeTag >
const GlobalPosition & Dumux::IMPETProblem< TypeTag >::bBoxMax ( ) const
inline

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

◆ bBoxMin()

template<class TypeTag >
const GlobalPosition & Dumux::IMPETProblem< TypeTag >::bBoxMin ( ) const
inline

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

◆ boundaryTypes()

template<class TypeTag >
void Dumux::IMPETProblem< TypeTag >::boundaryTypes ( BoundaryTypes &  bcTypes,
const Intersection &  intersection 
) const
inline

Specifies which kind of boundary condition should be used for which equation on a given boundary segment.

Parameters
bcTypesThe boundary types for the conservation equations
intersectionThe intersection for which the boundary type is set

◆ boundaryTypesAtPos()

template<class TypeTag >
void Dumux::IMPETProblem< TypeTag >::boundaryTypesAtPos ( BoundaryTypes &  bcTypes,
const GlobalPosition &  globalPos 
) const
inline

Specifies which kind of boundary condition should be used for which equation on a given boundary segment.

Parameters
bcTypesThe boundary types for the conservation equations
globalPosThe position of the center of the boundary intersection

◆ dirichlet()

template<class TypeTag >
void Dumux::IMPETProblem< TypeTag >::dirichlet ( PrimaryVariables &  values,
const Intersection &  intersection 
) const
inline

Evaluate the boundary conditions for a dirichlet control volume.

Parameters
valuesThe dirichlet values for the primary variables
intersectionThe boundary intersection

For this method, the values parameter stores primary variables.

◆ dirichletAtPos()

template<class TypeTag >
void Dumux::IMPETProblem< TypeTag >::dirichletAtPos ( PrimaryVariables &  values,
const GlobalPosition &  globalPos 
) const
inline

Evaluate the boundary conditions for a dirichlet control volume.

Parameters
valuesThe dirichlet values for the primary variables
globalPosThe position of the center of the boundary intersection

For this method, the values parameter stores primary variables.

◆ elementMapper()

template<class TypeTag >
const ElementMapper & Dumux::IMPETProblem< TypeTag >::elementMapper ( ) const
inline

Returns the mapper for elements to indices.

◆ episodeEnd()

template<class TypeTag >
void Dumux::IMPETProblem< TypeTag >::episodeEnd ( )
inline

Called when the end of an simulation episode is reached.

◆ grid()

template<class TypeTag >
Grid & Dumux::IMPETProblem< TypeTag >::grid ( )
inline

Returns the current grid which used by the problem.

◆ gridAdapt()

template<class TypeTag >
GridAdaptModel & Dumux::IMPETProblem< TypeTag >::gridAdapt ( )
inline

Returns adaptivity model used for the problem.

◆ gridView()

template<class TypeTag >
const GridView & Dumux::IMPETProblem< TypeTag >::gridView ( ) const
inline

The GridView which used by the problem.

◆ init()

template<class TypeTag >
void Dumux::IMPETProblem< TypeTag >::init ( )
inline

Called by the TimeManager in order to initialize the problem.

◆ initial()

template<class TypeTag >
void Dumux::IMPETProblem< TypeTag >::initial ( PrimaryVariables &  values,
const Element &  element 
) const
inline

Evaluate the initial value for a control volume.

Parameters
valuesThe initial values for the primary variables
elementThe element

For this method, the values parameter stores primary variables.

◆ initialAtPos()

template<class TypeTag >
void Dumux::IMPETProblem< TypeTag >::initialAtPos ( PrimaryVariables &  values,
const GlobalPosition &  globalPos 
) const
inline

Evaluate the initial value for a control volume.

Parameters
valuesThe dirichlet values for the primary variables
globalPosThe position of the center of the finite volume for which the initial values ought to be set (in global coordinates)

For this method, the values parameter stores primary variables.

◆ maxTimeStepSize()

template<class TypeTag >
Scalar Dumux::IMPETProblem< TypeTag >::maxTimeStepSize ( ) const
inline

Returns the maximum allowed time step size [s].

By default this the time step size is unrestricted.

◆ model() [1/2]

template<class TypeTag >
IMPETModel & Dumux::IMPETProblem< TypeTag >::model ( )
inline

Returns numerical model used for the problem.

◆ model() [2/2]

template<class TypeTag >
const IMPETModel & Dumux::IMPETProblem< TypeTag >::model ( ) const
inline

Returns numerical model used for the problem.

◆ name()

template<class TypeTag >
const std::string & Dumux::IMPETProblem< TypeTag >::name ( ) const
inline

The problem name.

This is used as a prefix for files generated by the simulation. It could be either overwritten by the problem files, or simply declared over the setName() function in the application file.

◆ neumann()

template<class TypeTag >
void Dumux::IMPETProblem< TypeTag >::neumann ( PrimaryVariables &  values,
const Intersection &  intersection 
) const
inline

Evaluate the boundary conditions for a neumann boundary segment.

Parameters
valuesThe neumann values for the conservation equations [kg / (m^2 *s )]
intersectionThe boundary intersection

For this method, the values parameter stores the mass flux in normal direction of each phase. Negative values mean influx.

◆ neumannAtPos()

template<class TypeTag >
void Dumux::IMPETProblem< TypeTag >::neumannAtPos ( PrimaryVariables &  values,
const GlobalPosition &  globalPos 
) const
inline

Evaluate the boundary conditions for a neumann boundary segment.

Parameters
valuesThe neumann values for the conservation equations [kg / (m^2 *s )]
globalPosThe position of the center of the boundary intersection

For this method, the values parameter stores the mass flux in normal direction of each phase. Negative values mean influx.

◆ nextTimeStepSize()

template<class TypeTag >
Scalar Dumux::IMPETProblem< TypeTag >::nextTimeStepSize ( const Scalar  dt)
inline

Called by TimeManager whenever a solution for a timestep has been computed and the simulation time has been updated.

◆ postAdapt()

template<class TypeTag >
void Dumux::IMPETProblem< TypeTag >::postAdapt ( )
inline

Capability to introduce problem-specific routines after grid adaptation.

Function is called at the end of the standard grid modification routine, GridAdapt::adaptGrid() , to allow for problem-specific output etc.

◆ postTimeStep()

template<class TypeTag >
void Dumux::IMPETProblem< TypeTag >::postTimeStep ( )
inline

Called by TimeManager whenever a solution for a timestep has been computed and the simulation time has been updated.

This is used to do some janitorial tasks like writing the current solution to disk.

◆ preAdapt()

template<class TypeTag >
void Dumux::IMPETProblem< TypeTag >::preAdapt ( )
inline

Capability to introduce problem-specific routines at the beginning of the grid adaptation.

Function is called at the beginning of the standard grid modification routine, GridAdapt::adaptGrid() .

◆ pressureModel() [1/2]

template<class TypeTag >
PressureModel & Dumux::IMPETProblem< TypeTag >::pressureModel ( )
inline

Returns the pressure model used for the problem.

◆ pressureModel() [2/2]

template<class TypeTag >
const PressureModel & Dumux::IMPETProblem< TypeTag >::pressureModel ( ) const
inline

Returns the pressure model used for the problem.

◆ preTimeStep()

template<class TypeTag >
void Dumux::IMPETProblem< TypeTag >::preTimeStep ( )
inline

Called by TimeManager just before the time integration.

◆ restart()

template<class TypeTag >
void Dumux::IMPETProblem< TypeTag >::restart ( const double  tRestart)
inline

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

It is the inverse of the serialize() method.

Parameters
tRestartRestart time

◆ resultWriter() [1/2]

template<class TypeTag >
VtkMultiWriter & Dumux::IMPETProblem< TypeTag >::resultWriter ( )
inlineprotected

Returns the applied VTK-writer for the output.

◆ resultWriter() [2/2]

template<class TypeTag >
VtkMultiWriter & Dumux::IMPETProblem< TypeTag >::resultWriter ( ) const
inlineprotected

Returns the applied VTK-writer for the output.

◆ serialize()

template<class TypeTag >
void Dumux::IMPETProblem< TypeTag >::serialize ( )
inline

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 .drs. (Dumux ReStart file.) See Restart for details.

◆ setGrid()

template<class TypeTag >
void Dumux::IMPETProblem< TypeTag >::setGrid ( Grid &  grid)
inline

Specifies the grid from outside the problem.

Parameters
gridThe grid used by the problem.

◆ setName()

template<class TypeTag >
void Dumux::IMPETProblem< TypeTag >::setName ( std::string  newName)
inline

Set the problem name.

This function sets the simulation name, which should be called before the application porblem is declared! If not, the default name "sim" will be used.

Parameters
newNameThe problem's name

◆ setOutputInterval()

template<class TypeTag >
void Dumux::IMPETProblem< TypeTag >::setOutputInterval ( const int  interval)
inline

Sets the interval for Output.

The default is 1 -> Output every time step

◆ setOutputTimeInterval()

template<class TypeTag >
void Dumux::IMPETProblem< TypeTag >::setOutputTimeInterval ( const Scalar  timeInterval)
inline

Sets a time interval for Output.

The default is 0.0 -> Output determined by output number interval (setOutputInterval(int))

◆ setTimeStepSize()

template<class TypeTag >
void Dumux::IMPETProblem< TypeTag >::setTimeStepSize ( const Scalar  dt)
inline

Sets the current time step size [seconds].

◆ shouldWriteOutput()

template<class TypeTag >
bool Dumux::IMPETProblem< TypeTag >::shouldWriteOutput ( ) const
inline

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

The default behaviour is to write out every the solution for very time step. This file is intented to be overwritten by the implementation.

◆ shouldWriteRestartFile()

template<class TypeTag >
bool Dumux::IMPETProblem< TypeTag >::shouldWriteRestartFile ( ) const
inline

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

The default behaviour is to write one restart file every 5 time steps. This file is intented to be overwritten by the implementation.

◆ source()

template<class TypeTag >
void Dumux::IMPETProblem< TypeTag >::source ( PrimaryVariables &  values,
const Element &  element 
) const
inline

Evaluate the source term.

Parameters
valuesThe source and sink values for the conservation equations
elementThe element

For this method, the values parameter stores the rate mass generated or annihilate per volume unit. Positive values mean that mass is created, negative ones mean that it vanishes.

◆ sourceAtPos()

template<class TypeTag >
void Dumux::IMPETProblem< TypeTag >::sourceAtPos ( PrimaryVariables &  values,
const GlobalPosition &  globalPos 
) const
inline

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

Parameters
valuesThe source and sink values for the conservation equations
globalPosThe position of the center of the finite volume for which the source term ought to be specified in global coordinates

For this method, the values parameter stores the rate mass generated or annihilate per volume unit. Positive values mean that mass is created, negative ones mean that it vanishes.

◆ timeIntegration()

template<class TypeTag >
void Dumux::IMPETProblem< TypeTag >::timeIntegration ( )
inline

Called by TimeManager in order to do a time integration on the model.

Note
timeStepSize and nextStepSize are references and may be modified by the timeIntegration(). On exit of this function timeStepSize must contain the step size actually used by the time integration for the current steo, and nextStepSize must contain a suggestion for the next time step size.

◆ timeManager() [1/2]

template<class TypeTag >
TimeManager & Dumux::IMPETProblem< TypeTag >::timeManager ( )
inline

Returns TimeManager object used by the simulation.

◆ timeManager() [2/2]

template<class TypeTag >
const TimeManager & Dumux::IMPETProblem< TypeTag >::timeManager ( ) const
inline

Returns TimeManager object used by the simulation.

◆ timeStepSize()

template<class TypeTag >
Scalar Dumux::IMPETProblem< TypeTag >::timeStepSize ( ) const
inline

Returns the current time step size [seconds].

◆ transportModel() [1/2]

template<class TypeTag >
TransportModel & Dumux::IMPETProblem< TypeTag >::transportModel ( )
inline

Returns transport model used for the problem.

◆ transportModel() [2/2]

template<class TypeTag >
const TransportModel & Dumux::IMPETProblem< TypeTag >::transportModel ( ) const
inline

Returns transport model used for the problem.

◆ variables() [1/2]

template<class TypeTag >
Variables & Dumux::IMPETProblem< TypeTag >::variables ( )
inline

Returns variables container.

This provides access to the important variables that are used in the simulation process, such as pressure, saturation etc.

◆ variables() [2/2]

template<class TypeTag >
const Variables & Dumux::IMPETProblem< TypeTag >::variables ( ) const
inline

Returns variables container. ()

This provides access to the important variables that are used in the simulation process, such as pressure, saturation etc. ()

◆ vertexMapper()

template<class TypeTag >
const VertexMapper & Dumux::IMPETProblem< TypeTag >::vertexMapper ( ) const
inline

Returns the mapper for vertices to indices.

◆ vtkOutputLevel()

template<class TypeTag >
int Dumux::IMPETProblem< TypeTag >::vtkOutputLevel ( ) const
inline

Returns the vtk output verbosity level.

Level is set by property or input file.

◆ writeOutput()

template<class TypeTag >
void Dumux::IMPETProblem< TypeTag >::writeOutput ( bool  verbose = true)
inline

Write the fields current solution into an VTK output file.


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