Reaktoro
A unified framework for modeling chemically reactive systems
TransportSolver Class Reference

A class for solving advection-diffusion problem. More...

#include <TransportSolver.hpp>

Public Member Functions

 TransportSolver ()
 Construct a default TransportSolver instance.
 
auto setMesh (const Mesh &mesh) -> void
 Set the mesh for the numerical solution of the transport problem.
 
auto setVelocity (double val) -> void
 Set the velocity for the transport problem. More...
 
auto setDiffusionCoeff (double val) -> void
 Set the diffusion coefficient for the transport problem. More...
 
auto setBoundaryValue (double val) -> void
 Set the value of the variable on the boundary. More...
 
auto setTimeStep (double val) -> void
 Set the time step for the numerical solution of the transport problem.
 
auto mesh () const -> const Mesh &
 Return the mesh.
 
auto initialize () -> void
 Initialize the transport solver before method step is executed. More...
 
auto step (VectorRef u, VectorConstRef q) -> void
 Step the transport solver. More...
 
auto step (VectorRef u) -> void
 Step the transport solver. More...
 

Detailed Description

A class for solving advection-diffusion problem.

Eq: du/dt + v*du/dx = D*du/dx u - amount v - velocity D - diffusion coefficient

Member Function Documentation

◆ setVelocity()

auto setVelocity ( double  val) -> void
inline

Set the velocity for the transport problem.

Parameters
valThe velocity (in m/s)

◆ setDiffusionCoeff()

auto setDiffusionCoeff ( double  val) -> void
inline

Set the diffusion coefficient for the transport problem.

Parameters
valThe diffusion coefficient (in m^2/s)

◆ setBoundaryValue()

auto setBoundaryValue ( double  val) -> void
inline

Set the value of the variable on the boundary.

Parameters
valThe boundary value for the variable (same unit considered for u).

◆ initialize()

auto initialize ( ) -> void

Initialize the transport solver before method step is executed.

Setup coefficient matrix of the diffusion problem and factorize.

◆ step() [1/2]

auto step ( VectorRef  u,
VectorConstRef  q 
) -> void

Step the transport solver.

This method solve one step of the transport solver equation, using an explicit approach for advection and total implicit for diffusion. The amount resulted from the advection it is passed to diffusion problem as a "source".

Parameters
[in,out]uThe solution vector
qThe source rates vector ([same unit considered for u]/m)

◆ step() [2/2]

auto step ( VectorRef  u) -> void

Step the transport solver.

Parameters
[in,out]uThe solution vector

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