CenteredAdvection#
- class fridom.framework.modules.advection.centered_advection.CenteredAdvection[source]#
Bases:
AdvectionBaseCentered advection scheme.
Description#
For the centered advection scheme, we assume that the velocity field is divergence-free. The advection term can then be written as:
\[\mathcal{A}(\boldsymbol{v}, q) = -\boldsymbol{v} \cdot \nabla q = - \nabla \cdot (\boldsymbol{v} q)\]where \(q\) is the quantity to be advected and \(\boldsymbol{v}\) is the velocity field. The flux divergence \(\nabla \cdot (\boldsymbol{v} q)\) is calculated using forward or backward differences. For that the flux is interpolated to the cell faces of the quantity \(q\):
Position of the quantity q ↓ | x | x | x | ↑ Position of the flux Fx- __init__() None#
Methods
__init__()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
backgroundThe background state.
diff_moduleThe differentiation module to be used by this module.
disable_nonlinearWhether to disable advection by the state vector itself.
gridThe grid of the model settings.
infoReturn a dictionary with information about the time stepper.
interp_moduleThe interpolation module to be used by this module.
is_setupWhether the module is set up.
msetThe model settings.
required_haloThe required halo points for this module.
scalingA scaling factor for the nonlinear terms (default: 1.0).
- name = 'Centered Advection'#
- advection(velocity: VectorField, quantity: ScalarField) ScalarField[source]#
Advect a quantity using the given velocity field.
- log_level: str | int | None#