BiharmonicFriction#

class fridom.shallowwater.modules.closures.diffusion.BiharmonicFriction(ah: float | ScalarField)[source]#

Bases: BiharmonicDiffusion

Biharmonic friction module.

Description#

Applies the harmonic diffusion operator \(\mathcal{B}\) (see fridom.framework.modules.closures.BiharmonicDiffusion) to all fields with the flag “ENABLE_FRICTION” (typically the velocity field).

Parameters#

ahfloat | fr.ScalarField

Horizontal friction coefficient.

__init__(ah: float | ScalarField) None[source]#

Methods

__init__(ah)

diffuse(z, dz)

diffusion_operator(u)

Apply the biharmonic diffusion operator on a scalar field \(u\).

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

ah

The horizontal diffusion coefficient.

diff_module

The differentiation module to be used by this module.

diffusion_coefficients

A list of diffusion coefficients.

field_flags

A list of field flags that indicate which fields should be diffused.

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 points for this module.

Examples using fridom.shallowwater.modules.closures.BiharmonicFriction#

Barotropic Instability.

Barotropic Instability.
name = 'Biharmonic Friction'#
property ah: float | ScalarField#

The horizontal diffusion coefficient.