WENO#

class fridom.nonhydro.modules.advection.weno_advection.WENO(order: int = 5, inter: InterpolationModule = None, weno: InterWENO = None, flux_function: FluxFunctionBase = None)[source]#

Bases: AdvectionBase

Weighted Essentially Non-Oscillatory (WENO) advection scheme.

Description#

This class implements the WENO advection scheme following S. Mishra et al. (2021). It is designed to handle discontinuities and sharp gradients in the solution while maintaining high accuracy.

References#

(weighted) essentially non-oscillatory finite difference schemes for anelastic flows on staggered meshes” Communications in Computational Physics, 2021.

__init__(order: int = 5, inter: InterpolationModule = None, weno: InterWENO = None, flux_function: FluxFunctionBase = None) None[source]#

Methods

__init__([order, inter, weno, flux_function])

advect_state(z, dz)

Advect the state vector.

advection(velocity, quantity)

Advect a quantity using the given velocity field.

disable()

Disable the module.

enable()

Enable the module.

is_enabled()

Whether the module is enabled or not.

reset()

Stop and start the module.

setup(mset[, setup_mode])

Set the module up.

start()

Start the module.

stop()

Stop the module.

update(mz)

Update the model state.

Attributes

background

The background state.

diff_module

The differentiation module to be used by this module.

disable_nonlinear

Whether to disable advection by the state vector itself.

grid

The grid of the model settings.

info

Return a dictionary with information about the time stepper.

interp_module

The interpolation module to be used by this module.

is_setup

Whether the module is set up.

mset

The model settings.

name

required_halo

The required halo size based on the interpolation modules.

scaling

A scaling factor for the nonlinear terms (default: 1.0).

name = 'WENO Advection'#
advect_state(z: State, dz: State) State[source]#

Advect the state vector.

property required_halo: int#

The required halo size based on the interpolation modules.