The finite volume discretization of a transport equation. More...
#include <dumux/porousmediumflow/sequential/cellcentered/transport.hh>
The finite volume discretization of a transport equation.
Base class for finite volume (FV) implementations of an explicitly treated transport equation. The class provides a method to calculate the explicit update to get a new solution of the transported quantity:
\[ u_{new} = u_{old} + \Delta t \Delta u_{update} \]
A certain transport equation defined in a implementation of this base class must be splitted into a flux term and a source term. Corresponding functions (getSource()
, getFlux()
and getFluxOnBoundary()
) have to be defined in the implementation.
TypeTag | The Type Tag |
Public Member Functions | |
void | update (const Scalar t, Scalar &dt, TransportSolutionType &updateVec, bool impet=false) |
Calculate the update vector. More... | |
void | updateTransport (const Scalar t, Scalar &dt, TransportSolutionType &updateVec) |
void | getFlux (Scalar &update, const Intersection &intersection, CellData &cellDataI) |
Function which calculates the flux update. More... | |
void | getFluxOnBoundary (Scalar &update, const Intersection &intersection, CellData &cellDataI) |
Function which calculates the boundary flux update. More... | |
void | getSource (Scalar &update, const Element &element, CellData &cellDataI) |
Function which calculates the source update. More... | |
void | initialize () |
Sets the initial solution \( S_0 \). More... | |
void | updateMaterialLaws () |
Updates constitutive relations and stores them in the variable class. More... | |
void | getTransportedQuantity (TransportSolutionType &transportedQuantity) |
Writes the current values of the primary transport variable into the transportedQuantity -vector (comes as function argument) More... | |
template<class DataEntry > | |
bool | inPhysicalRange (DataEntry &entry) |
void | setTransportedQuantity (TransportSolutionType &transportedQuantity) |
Writes the current values of the primary transport variable into the variable container. More... | |
void | updateTransportedQuantity (TransportSolutionType &updateVec) |
Updates the primary transport variable. More... | |
template<class MultiWriter > | |
void | addOutputVtkFields (MultiWriter &writer) |
Adds transport output to the output file. More... | |
void | serializeEntity (std::ostream &outstream, const Element &element) |
Function for serialization of the primary transport variable. More... | |
void | deserializeEntity (std::istream &instream, const Element &element) |
Function for deserialization of the primary transport variable. More... | |
bool | enableLocalTimeStepping () |
FVTransport (Problem &problem) | |
Constructs a FVTransport object. More... | |
Protected Member Functions | |
void | innerUpdate (TransportSolutionType &updateVec) |
|
inline |
Constructs a FVTransport object.
problem | A problem class object |
|
inline |
Adds transport output to the output file.
MultiWriter | Class defining the output writer |
writer | The output writer (usually a VTKMultiWriter object) |
|
inline |
Function for deserialization of the primary transport variable.
Function needed for restart option. Reads the the primary transport variable of a grid element from a restart file.
instream | Stream from the restart file. |
element | Grid element |
|
inline |
void Dumux::FVTransport< TypeTag >::getFlux | ( | Scalar & | update, |
const Intersection & | intersection, | ||
CellData & | cellDataI | ||
) |
Function which calculates the flux update.
Function computes the inter-cell flux term and adds it to the update.
update | The cell update |
intersection | Intersection of two grid elements |
cellDataI | Object containing all model relevant cell data |
void Dumux::FVTransport< TypeTag >::getFluxOnBoundary | ( | Scalar & | update, |
const Intersection & | intersection, | ||
CellData & | cellDataI | ||
) |
Function which calculates the boundary flux update.
Function computes the boundary-flux term and adds it to the update.
update | The cell update |
intersection | Intersection of two grid elements |
cellDataI | Object containing all model relevant cell data |
void Dumux::FVTransport< TypeTag >::getSource | ( | Scalar & | update, |
const Element & | element, | ||
CellData & | cellDataI | ||
) |
Function which calculates the source update.
Function computes the source term and adds it to the update.
update | The cell update |
element | Grid element |
cellDataI | Object containing all model relevant cell data |
void Dumux::FVTransport< TypeTag >::getTransportedQuantity | ( | TransportSolutionType & | transportedQuantity | ) |
Writes the current values of the primary transport variable into the transportedQuantity
-vector (comes as function argument)
transportedQuantity | Vector of the size of global numbers of degrees of freedom of the primary transport variable. |
|
inline |
Sets the initial solution \( S_0 \).
|
protected |
bool Dumux::FVTransport< TypeTag >::inPhysicalRange | ( | DataEntry & | entry | ) |
|
inline |
Function for serialization of the primary transport variable.
Function needed for restart option. Writes the primary transport variable of a grid element to a restart file.
outstream | Stream into the restart file. |
element | Grid element |
void Dumux::FVTransport< TypeTag >::setTransportedQuantity | ( | TransportSolutionType & | transportedQuantity | ) |
Writes the current values of the primary transport variable into the variable container.
transportedQuantity | Vector of the size of global numbers of degrees of freedom of the primary transport variable. |
void Dumux::FVTransport< TypeTag >::update | ( | const Scalar | t, |
Scalar & | dt, | ||
TransportSolutionType & | updateVec, | ||
bool | impet = false |
||
) |
Calculate the update vector.
t | current time |
dt | time step size |
updateVec | vector containing the update values |
impet | variable should be true if an impet algorithm is used and false if the transport part is solved independently |
Additionally to the update vector, the recommended time step size dt is calculated employing a CFL condition.
void Dumux::FVTransport< TypeTag >::updateMaterialLaws | ( | ) |
Updates constitutive relations and stores them in the variable class.
|
inline |
void Dumux::FVTransport< TypeTag >::updateTransportedQuantity | ( | TransportSolutionType & | updateVec | ) |
Updates the primary transport variable.
updateVec | Vector containing the global update. |