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*d²u/dx² u - amount v - velocity D - diffusion coefficient
Member Function Documentation
◆ setVelocity()
|
inline |
Set the velocity for the transport problem.
- Parameters
-
val The velocity (in m/s)
◆ setDiffusionCoeff()
|
inline |
Set the diffusion coefficient for the transport problem.
- Parameters
-
val The diffusion coefficient (in m^2/s)
◆ setBoundaryValue()
|
inline |
Set the value of the variable on the boundary.
- Parameters
-
val The 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] u The solution vector q The source rates vector ([same unit considered for u]/m)
◆ step() [2/2]
auto step | ( | VectorRef | u | ) | -> void |
Step the transport solver.
- Parameters
-
[in,out] u The solution vector
The documentation for this class was generated from the following files:
- Reaktoro/Transport/TransportSolver.hpp
- Reaktoro/Transport/TransportSolver.cpp