scalar_transport
The dream.scalar_transport module solves the linear scalar convection–diffusion equation
using Hybridised Discontinuous Galerkin (HDG) or Discontinuous Galerkin (DG) methods in space,
combined with a range of implicit, explicit, and IMEX time integration schemes.
The main entry point is ScalarTransportSolver.
Note
We currently only support a linear formulation.
Solver Architecture
ScalarTransportSolver is composed of three
interchangeable sub-objects selected via solver.fem, solver.riemann_solver, and solver.time.
The finite element method (fem) additionally owns the numerical time integration scheme via its
scheme property, while solver.time controls the outer solution loop (transient, stationary, or
pseudo-time-stepping).
Scalar Transport Equation
A transport equation expresses a conservation principle by describing how a scalar quantity \(u\) evolves in space and time due to the combined effects of convection and diffusion. The governing (linear, scalar) convection–diffusion equation reads
where \(\vec{b}\) is the advecting velocity field (set via
convection_velocity;
its spatial dimension is inferred from the mesh) and \(\kappa \geq 0\) is the scalar diffusivity
(set via diffusion_coefficient).
Setting is_inviscid to True
enforces \(\kappa = 0\), reducing the problem to a pure convection (hyperbolic) equation.
Discretisation
Hybridised Discontinuous Galerkin (HDG)
The HDG method partitions the domain into elements
and introduces an additional skeleton (or trace) unknown \(\hat{u}\) living on the mesh
facets \(\facets\). The global system couples only skeleton unknowns; the element-interior
unknowns are eliminated locally via static condensation. This leads to a significantly
smaller global system compared to standard DG, making HDG attractive for implicit time
integration at low polynomial orders.
The discrete problem finds \((u_h, \hat{u}_h) \in U_h \times \hat{U}_h\) such that
for all \((v, \hat{v}) \in U_h \times \hat{U}_h\). The convective bilinear form is
and the diffusive bilinear form is
Here \(\hat{f}^*\) is the convective numerical flux determined by the
RiemannSolver, and \(\tau\) is the
interior penalty coefficient (see HDG for details).
Discontinuous Galerkin (DG)
The DG method uses element-wise polynomial
spaces without skeleton unknowns. Inter-element communication is handled entirely through
the numerical flux chosen by the Riemann solver. DG is straightforward to use with explicit
time integrators, though implicit solves may be more expensive since no static condensation
is available.
Riemann Solver
The LaxFriedrich Riemann solver defines
the numerical flux at element interfaces as
where \(\lambda = |\vec{b}\cdot\vec{n}|\) is the maximum wave speed and \(u^\pm\) are the one-sided traces from the two neighbouring elements.
Boundary and Initial Conditions
Boundary and initial conditions are attached to the solver via
BoundaryConditions and DomainConditions:
Class |
Description |
|---|---|
Inflow value \(u_\infty\) |
|
|
Periodic coupling across |
|
Initial condition \(u(\cdot, 0) = u_0\) |
Time Integration
The outer solution loop is selected via solver.time (e.g. 'transient', 'stationary'), and
the numerical time integration scheme is chosen via solver.fem.scheme
(see the time module for the full time infrastructure).
Implicit schemes (unconditionally stable — recommended for diffusion-dominated problems or large time steps):
Scheme |
Order |
Key |
|---|---|---|
1 |
|
|
2 |
|
|
2 |
|
|
3 |
|
Explicit schemes (require CFL condition \(\Delta t \leq C\,h / |\vec{b}|\)):
Scheme |
Order |
Key |
|---|---|---|
1 |
|
|
3 |
|
|
4 |
|
API Reference
Scalar transport solver configuration. |
|
Definitions of the spatial discretizations for the scalar transport equation. |
|
Definitions of the temporal discretizations for the scalar transport equation. |
|
Definitions of riemann solvers for a scalar transport equation. |
|
Definitions of boundary/domain conditions for a scalar transport equation. |