Base class for all compositional 2-phase problems which use an impet algorithm. More...
#include <dumux/porousmediumflow/2p2c/sequential/problem.hh>
Base class for all compositional 2-phase problems which use an impet algorithm.
Extends IMPESProblem2P by the compositional the boundary formulation and initial conditions. These can be specified via a feed mass fractions \( Z^k \) or a saturation, specified by the appropriate flag.
Public Member Functions | |
IMPETProblem2P2C (TimeManager &timeManager, Grid &grid) | |
The standard constructor. More... | |
IMPETProblem2P2C (TimeManager &timeManager, Grid &grid, const GridView &gridView) | |
IMPETProblem2P2C (TimeManager &timeManager, Grid &grid, SpatialParams &spatialParams) | |
The constructor for given spatialParams. More... | |
void | preTimeStep () |
Called by TimeManager just before the time integration. More... | |
void | postTimeStep () |
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... | |
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 | timeIntegration () |
Called by TimeManager in order to do a time integration on the model. 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... | |
Problem parameters | |
Scalar | temperature (const Element &element) const |
Returns the temperature within the domain. More... | |
Scalar | temperatureAtPos (const GlobalPosition &globalPos) const |
Returns the temperature within the domain. More... | |
Scalar | referencePressure (const Element &element) const |
Returns the reference pressure for evaluation of constitutive relations. More... | |
Scalar | referencePressureAtPos (const GlobalPosition &globalPos) const |
Returns the reference pressure for evaluation of constitutive relations. More... | |
const GravityVector & | gravity () const |
Returns the acceleration due to gravity. More... | |
SpatialParams & | spatialParams () |
Returns the spatial parameters object. More... | |
const SpatialParams & | spatialParams () const |
Returns the spatial parameters object. 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... | |
Problem parameters | |
Scalar | initSat (const Element &element) const |
Saturation initial condition (dimensionless) More... | |
Scalar | initSatAtPos (const GlobalPosition &globalPos) const |
Saturation initial condition (dimensionless) at given position. More... | |
Scalar | initConcentration (const Element &element) const |
Concentration initial condition (dimensionless) More... | |
Scalar | initConcentrationAtPos (const GlobalPosition &globalPos) const |
Concentration initial condition (dimensionless) More... | |
void | setZero (GetPropType< TypeTag, Properties::PrimaryVariables > &values, const int equation=-1) const |
Sets entries of the primary variable vector to zero. 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... | |
VtkMultiWriter & | resultWriter () |
Returns the applied VTK-writer for the output. More... | |
VtkMultiWriter & | resultWriter () const |
Returns the applied VTK-writer for the output. More... | |
|
inline |
The standard constructor.
timeManager | The time manager |
grid | The grid |
|
inline |
|
inline |
The constructor for given spatialParams.
This constructor uses a predefined SpatialParams object that was created (e.g. in the problem) and does not create one in the base class.
timeManager | The time manager |
grid | The grid |
spatialParams | SpatialParams instantiation |
|
inlineinherited |
|
inlineinherited |
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.
|
inlineinherited |
The coordinate of the corner of the GridView's bounding box with the largest values.
|
inlineinherited |
The coordinate of the corner of the GridView's bounding box with the smallest values.
|
inlineinherited |
Specifies which kind of boundary condition should be used for which equation on a given boundary segment.
bcTypes | The boundary types for the conservation equations |
intersection | The intersection for which the boundary type is set |
|
inlineinherited |
Specifies which kind of boundary condition should be used for which equation on a given boundary segment.
bcTypes | The boundary types for the conservation equations |
globalPos | The position of the center of the boundary intersection |
|
inlineinherited |
Evaluate the boundary conditions for a dirichlet control volume.
values | The dirichlet values for the primary variables |
intersection | The boundary intersection |
For this method, the values parameter stores primary variables.
|
inlineinherited |
Evaluate the boundary conditions for a dirichlet control volume.
values | The dirichlet values for the primary variables |
globalPos | The position of the center of the boundary intersection |
For this method, the values parameter stores primary variables.
|
inlineinherited |
Returns the mapper for elements to indices.
|
inlineinherited |
Called when the end of an simulation episode is reached.
|
inlineinherited |
Returns the acceleration due to gravity.
If the EnableGravity
property is true, this means \(\boldsymbol{g} = ( 0,\dots,\ -9.81)^T \), else \(\boldsymbol{g} = ( 0,\dots, 0)^T \)
|
inlineinherited |
Returns the current grid which used by the problem.
|
inlineinherited |
Returns adaptivity model used for the problem.
|
inlineinherited |
The GridView which used by the problem.
|
inlineinherited |
Called by the TimeManager in order to initialize the problem.
|
inline |
Concentration initial condition (dimensionless)
The problem is initialized with a feed mass fraction: Mass of component 1 per total mass \(\mathrm{[-]}\). This directly enters the flash calucalation.
element | The element. |
|
inline |
Concentration initial condition (dimensionless)
Has to be provided if initConcentration() is not used in the specific problem.
globalPos | The global position. |
|
inlineinherited |
Evaluate the initial value for a control volume.
values | The initial values for the primary variables |
element | The element |
For this method, the values parameter stores primary variables.
|
inlineinherited |
Evaluate the initial value for a control volume.
values | The dirichlet values for the primary variables |
globalPos | The 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.
|
inline |
Saturation initial condition (dimensionless)
The problem is initialized with the following saturation. Both phases are assumed to contain an equilibrium concentration of the correspondingly other component.
element | The element. |
|
inline |
Saturation initial condition (dimensionless) at given position.
Has to be provided if initSat() is not used in the specific problem.
globalPos | The global position. |
|
inlineinherited |
Returns the maximum allowed time step size [s].
By default this the time step size is unrestricted.
|
inlineinherited |
Returns numerical model used for the problem.
|
inlineinherited |
Returns numerical model used for the problem.
|
inlineinherited |
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.
|
inlineinherited |
Evaluate the boundary conditions for a neumann boundary segment.
values | The neumann values for the conservation equations [kg / (m^2 *s )] |
intersection | The boundary intersection |
For this method, the values parameter stores the mass flux in normal direction of each phase. Negative values mean influx.
|
inlineinherited |
Evaluate the boundary conditions for a neumann boundary segment.
values | The neumann values for the conservation equations [kg / (m^2 *s )] |
globalPos | The 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.
|
inlineinherited |
Called by TimeManager whenever a solution for a timestep has been computed and the simulation time has been updated.
|
inlineinherited |
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.
|
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.
In compositional/compressible models, the secondary variables should be updated for output and the next time step via updateMaterialLaws. The boolean indicates that it is a call from postTimeStep().
|
inlineinherited |
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() .
|
inlineinherited |
Returns the pressure model used for the problem.
|
inlineinherited |
Returns the pressure model used for the problem.
|
inline |
Called by TimeManager just before the time integration.
In compositional/compressible models, the secondary variables should be updated after each time step. Hence, another update is only necessary if the grid is adapted.
|
inlineinherited |
Returns the reference pressure for evaluation of constitutive relations.
element | The element |
|
inlineinherited |
Returns the reference pressure for evaluation of constitutive relations.
globalPos | The position of the center of an element |
|
inlineinherited |
This method restores the complete state of the problem from disk.
It is the inverse of the serialize() method.
tRestart | Restart time |
|
inlineprotectedinherited |
Returns the applied VTK-writer for the output.
|
inlineprotectedinherited |
Returns the applied VTK-writer for the output.
|
inlineinherited |
|
inlineinherited |
Specifies the grid from outside the problem.
grid | The grid used by the problem. |
|
inlineinherited |
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.
newName | The problem's name |
|
inlineinherited |
Sets the interval for Output.
The default is 1 -> Output every time step
|
inlineinherited |
Sets a time interval for Output.
The default is 0.0 -> Output determined by output number interval (setOutputInterval(int)
)
|
inlineinherited |
Sets the current time step size [seconds].
|
inlineprotected |
Sets entries of the primary variable vector to zero.
|
inlineinherited |
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.
|
inlineinherited |
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.
|
inlineinherited |
Evaluate the source term.
values | The source and sink values for the conservation equations |
element | The 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.
|
inlineinherited |
Evaluate the source term for all phases within a given sub-control-volume.
values | The source and sink values for the conservation equations |
globalPos | The 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.
|
inlineinherited |
Returns the spatial parameters object.
|
inlineinherited |
Returns the spatial parameters object.
|
inlineinherited |
Returns the temperature within the domain.
element | The element |
|
inlineinherited |
Returns the temperature within the domain.
globalPos | The position of the center of an element |
|
inlineinherited |
Called by TimeManager in order to do a time integration on the model.
|
inlineinherited |
Returns TimeManager object used by the simulation.
|
inlineinherited |
Returns TimeManager object used by the simulation.
|
inlineinherited |
Returns the current time step size [seconds].
|
inlineinherited |
Returns transport model used for the problem.
|
inlineinherited |
Returns transport model used for the problem.
|
inlineinherited |
Returns variables container.
This provides access to the important variables that are used in the simulation process, such as pressure, saturation etc.
|
inlineinherited |
Returns variables container. ()
This provides access to the important variables that are used in the simulation process, such as pressure, saturation etc. ()
|
inlineinherited |
Returns the mapper for vertices to indices.
|
inlineinherited |
Returns the vtk output verbosity level.
Level is set by property or input file.
|
inlineinherited |
Write the fields current solution into an VTK output file.