HarmonicFriction#

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

Bases: HarmonicDiffusion

Harmonic friction module.

Description#

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

Parameters#

ahfloat | fr.ScalarField

Harmonic friction coefficient (viscosity).

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

Methods

__init__(ah)

diffuse(z, dz)

diffusion_operator(u)

Apply the harmonic 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.

name = 'Harmonic Friction'#
property ah: float | ScalarField#

The horizontal diffusion coefficient.