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

The finite volume discretization of a transport equation. More...

#include <dumux/porousmediumflow/sequential/cellcentered/transport.hh>

Inheritance diagram for Dumux::FVTransport< TypeTag >:

Description

template<class TypeTag>
class Dumux::FVTransport< TypeTag >

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.

Template Parameters
TypeTagThe 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)
 

Constructor & Destructor Documentation

◆ FVTransport()

template<class TypeTag >
Dumux::FVTransport< TypeTag >::FVTransport ( Problem &  problem)
inline

Constructs a FVTransport object.

Parameters
problemA problem class object

Member Function Documentation

◆ addOutputVtkFields()

template<class TypeTag >
template<class MultiWriter >
void Dumux::FVTransport< TypeTag >::addOutputVtkFields ( MultiWriter &  writer)
inline

Adds transport output to the output file.

Template Parameters
MultiWriterClass defining the output writer
Parameters
writerThe output writer (usually a VTKMultiWriter object)

◆ deserializeEntity()

template<class TypeTag >
void Dumux::FVTransport< TypeTag >::deserializeEntity ( std::istream &  instream,
const Element &  element 
)
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.

Parameters
instreamStream from the restart file.
elementGrid element

◆ enableLocalTimeStepping()

template<class TypeTag >
bool Dumux::FVTransport< TypeTag >::enableLocalTimeStepping ( )
inline

◆ getFlux()

template<class TypeTag >
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.

Parameters
updateThe cell update
intersectionIntersection of two grid elements
cellDataIObject containing all model relevant cell data

◆ getFluxOnBoundary()

template<class TypeTag >
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.

Parameters
updateThe cell update
intersectionIntersection of two grid elements
cellDataIObject containing all model relevant cell data

◆ getSource()

template<class TypeTag >
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.

Parameters
updateThe cell update
elementGrid element
cellDataIObject containing all model relevant cell data

◆ getTransportedQuantity()

template<class TypeTag >
void Dumux::FVTransport< TypeTag >::getTransportedQuantity ( TransportSolutionType &  transportedQuantity)

Writes the current values of the primary transport variable into the transportedQuantity-vector (comes as function argument)

Parameters
transportedQuantityVector of the size of global numbers of degrees of freedom of the primary transport variable.

◆ initialize()

template<class TypeTag >
void Dumux::FVTransport< TypeTag >::initialize ( )
inline

Sets the initial solution \( S_0 \).

◆ innerUpdate()

template<class TypeTag >
void Dumux::FVTransport< TypeTag >::innerUpdate ( TransportSolutionType &  updateVec)
protected

◆ inPhysicalRange()

template<class TypeTag >
template<class DataEntry >
bool Dumux::FVTransport< TypeTag >::inPhysicalRange ( DataEntry &  entry)

◆ serializeEntity()

template<class TypeTag >
void Dumux::FVTransport< TypeTag >::serializeEntity ( std::ostream &  outstream,
const Element &  element 
)
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.

Parameters
outstreamStream into the restart file.
elementGrid element

◆ setTransportedQuantity()

template<class TypeTag >
void Dumux::FVTransport< TypeTag >::setTransportedQuantity ( TransportSolutionType &  transportedQuantity)

Writes the current values of the primary transport variable into the variable container.

Parameters
transportedQuantityVector of the size of global numbers of degrees of freedom of the primary transport variable.

◆ update()

template<class TypeTag >
void Dumux::FVTransport< TypeTag >::update ( const Scalar  t,
Scalar &  dt,
TransportSolutionType &  updateVec,
bool  impet = false 
)

Calculate the update vector.

Parameters
tcurrent time
dttime step size
updateVecvector containing the update values
impetvariable 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.

◆ updateMaterialLaws()

template<class TypeTag >
void Dumux::FVTransport< TypeTag >::updateMaterialLaws ( )

Updates constitutive relations and stores them in the variable class.

◆ updateTransport()

template<class TypeTag >
void Dumux::FVTransport< TypeTag >::updateTransport ( const Scalar  t,
Scalar &  dt,
TransportSolutionType &  updateVec 
)
inline

◆ updateTransportedQuantity()

template<class TypeTag >
void Dumux::FVTransport< TypeTag >::updateTransportedQuantity ( TransportSolutionType &  updateVec)

Updates the primary transport variable.

Parameters
updateVecVector containing the global update.

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