Numerical flux
#
homemade_conslaws.NumericalFlux
— Type.
NumericalFlux()
Dispatch functions
An implementation of NumericalFlux
should provide the following functions:
#
homemade_conslaws.stencil_size
— Function.
stencil_size(::NumericalFlux)
Gives a tuple of the number of left and right cells needed to compute the numerical flux.
Implementations
Lax-Friedrichs flux
#
homemade_conslaws.LaxFriedrichsFlux
— Type.
LaxFriedrichsFlux()
Lax-Friedrichs numerical flux. It is a simple numerical flux that uses the average of the fluxes across the interfaces and adjusts by the maximum allowed wave speed \(\frac{\Dx}{\Dt}\).
Rusanov flux
#
homemade_conslaws.RusanovFlux
— Type.
RusanovFlux()
An approximate Riemann solver that uses the average of the flux accross the interfaces and adjusting using the maximum eigenvalue of the flux function.
Godunov flux
#
homemade_conslaws.GodunovFlux
— Type.
GodunovFlux{Float <: AbstractFloat}(ω::Float)
An exact Riemann solver assuming the flux function has a unique minimum at \(ω\).
Central upwind flux
#
homemade_conslaws.CentralUpwind
— Type.
CentralUpwind()
Used for the shallow water equations. Well-balanced in the absence of dry land. Given by
where \(a^+ = \max(\lambda(Q_L), \lambda(Q_R), 0)\) and \(a^- = \min(\lambda(Q_L), \lambda(Q_R), 0)\) are the maximum and minimum eigenvalues of the Jacobian matrix of the flux function.