test problem for the explicit transport model More...
#include <test/porousmediumflow/2p/sequential/test_transportproblem.hh>

test problem for the explicit transport model
A unit "fluid" is injected from the left side into a rectangular 2D domain also this testing fluid. Upper and lower boundary are closed (Neumann = 0), and there is free outflow on the right side.
This test solely applies the 2p transport on a given velocity field, without a pressure field being solved.
To run the simulation execute the following line in shell: ./test_transport -parameterFile ./test_transport.input, where the arguments define the parameter file.
Public Member Functions | |
| TestTransportProblem (TimeManager &timeManager, Grid &grid) | |
| void | init () |
| set initial velocity field -> v_total is assumed to be constant in this test! | |
| 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. | |
| 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. | |
| void | dirichlet (PrimaryVariables &values, const Intersection &intersection) const |
| Evaluate the boundary conditions for a dirichlet control volume. | |
| void | dirichletAtPos (PrimaryVariables &values, const GlobalPosition &globalPos) const |
| Evaluate the boundary conditions for a dirichlet control volume. | |
| void | neumann (PrimaryVariables &values, const Intersection &intersection) const |
| Evaluate the boundary conditions for a neumann boundary segment. | |
| void | neumannAtPos (PrimaryVariables &values, const GlobalPosition &globalPos) const |
| Evaluate the boundary conditions for a neumann boundary segment. | |
| void | source (PrimaryVariables &values, const Element &element) const |
| Evaluate the source term. | |
| void | sourceAtPos (PrimaryVariables &values, const GlobalPosition &globalPos) const |
| Evaluate the source term for all phases within a given sub-control-volume. | |
| void | initial (PrimaryVariables &values, const Element &element) const |
| Evaluate the initial value for a control volume. | |
| void | initialAtPos (PrimaryVariables &values, const GlobalPosition &globalPos) const |
| Evaluate the initial value for a control volume. | |
| void | preTimeStep () |
| Called by TimeManager just before the time integration. | |
| void | postTimeStep () |
| Called by TimeManager whenever a solution for a timestep has been computed and the simulation time has been updated. | |
| 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. | |
| Scalar | maxTimeStepSize () const |
| Returns the user specified maximum time step size. | |
| Scalar | timeStepSize () const |
| Returns the current time step size [seconds]. | |
| void | setTimeStepSize (Scalar dt) |
| Sets the current time step size [seconds]. | |
| Scalar | nextTimeStepSize (Scalar dt) |
| Called by TimeManager whenever a solution for a timestep has been computed and the simulation time has been updated. | |
| void | setOutputTimeInterval (const Scalar timeInterval) |
| Sets a time interval for Output. | |
| void | setOutputInterval (int interval) |
| Sets the interval for Output. | |
| bool | shouldWriteOutput () const |
| Returns true if the current solution should be written to disk (i.e. as a VTK file). | |
| void | addOutputVtkFields () |
| void | writeOutput (bool verbose=true) |
| Write the fields current solution into an VTK output file. | |
| void | episodeEnd () |
| Called when the end of an simulation episode is reached. | |
| void | setName (const std::string &newName) |
| Set the problem name. | |
| const GridView & | gridView () const |
| The GridView which used by the problem. | |
| const VertexMapper & | vertexMapper () const |
| Returns the mapper for vertices to indices. | |
| const ElementMapper & | elementMapper () const |
| Returns the mapper for elements to indices. | |
| const GlobalPosition & | bBoxMin () const |
| The coordinate of the corner of the GridView's bounding box with the smallest values. | |
| const GlobalPosition & | bBoxMax () const |
| The coordinate of the corner of the GridView's bounding box with the largest values. | |
| TimeManager & | timeManager () |
| Returns TimeManager object used by the simulation. | |
| const TimeManager & | timeManager () const |
| Returns TimeManager object used by the simulation. | |
| Variables & | variables () |
| Returns variables object. | |
| const Variables & | variables () const |
| Returns variables object. | |
| Model & | model () |
| Returns numerical model used for the problem. | |
| const Model & | model () const |
| Returns numerical model used for the problem. | |
Problem parameters | |
| Scalar | temperature (const Element &element) const |
| Returns the temperature within the domain. | |
| Scalar | temperatureAtPos (const GlobalPosition &globalPos) const |
| Returns the temperature within the domain. | |
| Scalar | referencePressure (const Element &element) const |
| Returns the reference pressure for evaluation of constitutive relations. | |
| Scalar | referencePressureAtPos (const GlobalPosition &globalPos) const |
| Returns the reference pressure for evaluation of constitutive relations. | |
| const GlobalPosition & | gravity () const |
| Returns the acceleration due to gravity. | |
| SpatialParams & | spatialParams () |
| Returns the spatial parameters object. | |
| const SpatialParams & | spatialParams () const |
| Returns the spatial parameters object. | |
| void | timeIntegration () |
| Time integration of the model. | |
Problem parameters | |
| std::string | name () const |
| The problem name. | |
| bool | shouldWriteRestartFile () const |
| Scalar | temperatureAtPos (const GlobalPosition &globalPos) const |
| Returns the temperature within the domain. | |
| Scalar | referencePressureAtPos (const GlobalPosition &globalPos) const |
| Returns the reference pressure for evaluation of constitutive relations. | |
| void | sourceAtPos (PrimaryVariables &values, const GlobalPosition &globalPos) const |
| void | boundaryTypesAtPos (BoundaryTypes &bcTypes, const GlobalPosition &globalPos) const |
| Returns the type of boundary condition. | |
| void | dirichletAtPos (PrimaryVariables &values, const GlobalPosition &globalPos) const |
| set dirichlet condition (saturation [-]) | |
| void | neumannAtPos (PrimaryVariables &values, const GlobalPosition &globalPos) const |
| set neumann condition for phases (flux, [kg/(m^2 s)]) | |
| void | initialAtPos (PrimaryVariables &values, const GlobalPosition &globalPos) const |
| return initial solution | |
Restart mechanism | |
| void | serialize () |
| This method writes the complete state of the problem to the harddisk. | |
| void | restart (double tRestart) |
| This method restores the complete state of the problem from disk. | |
| VtkMultiWriter & | resultWriter () |
| VtkMultiWriter & | resultWriter () const |
|
inline |
|
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 |
|
inline |
Returns the type of boundary condition.
BC for saturation equation can be dirichlet (saturation), neumann (flux), or outflow.
|
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.
|
inline |
set dirichlet condition (saturation [-])
|
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 |
The GridView which used by the problem.
|
inline |
set initial velocity field -> v_total is assumed to be constant in this test!
|
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 |
return initial solution
|
inlineinherited |
Returns the user specified maximum time step size.
Overload in problem for custom needs.
|
inlineinherited |
Returns numerical model used for the problem.
|
inlineinherited |
Returns numerical model used for the problem.
|
inline |
The problem name.
This is used as a prefix for files generated by the simulation.
|
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.
|
inline |
set neumann condition for phases (flux, [kg/(m^2 s)])
|
inlineinherited |
Called by TimeManager whenever a solution for a timestep has been computed and the simulation time has been updated.
|
inlineinherited |
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.
|
inlineinherited |
Called by TimeManager just before the time integration.
|
inlineinherited |
Returns the reference pressure for evaluation of constitutive relations.
| element | The element |
|
inline |
Returns the reference pressure for evaluation of constitutive relations.
|
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.
|
inlineprotectedinherited |
|
inlineprotectedinherited |
|
inlineinherited |
|
inlineinherited |
Set the problem name.
This function sets the simulation name, which should be called before the application problem is declared! If not, the default name "sim" will be used.
|
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].
|
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.
|
inline |
|
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.
|
inline |
|
inlineinherited |
Returns the spatial parameters object.
|
inlineinherited |
Returns the spatial parameters object.
|
inlineinherited |
Returns the temperature within the domain.
| element | The element |
|
inline |
Returns the temperature within the domain.
This problem assumes a temperature of 10 degrees Celsius.
|
inlineinherited |
Returns the temperature within the domain.
| globalPos | The position of the center of an element |
|
inlineinherited |
Time integration of the model.
Update the transported quantity. By default, an explicit Euler is used
|
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 variables object.
|
inlineinherited |
Returns variables object.
|
inlineinherited |
Returns the mapper for vertices to indices.
|
inlineinherited |
Write the fields current solution into an VTK output file.