BiharmonicDiffusion#

class fridom.framework.modules.closures.biharmonic_diffusion.BiharmonicDiffusion(field_flags: list[str], diffusion_coefficients: list[float | FieldVariable])[source]#

Bases: HarmonicDiffusion

Biharmonic diffusion module

Description#

Following Griffiies et al. (2000), the biharmonic mixing operator \(\mathcal{B}\) iterates twice over the harmonic mixing operator \(\mathcal{H}\). For a scalar field \(u\) it is given by:

\[\mathcal{B}(u) = - \mathcal{H} \left( \mathcal{H}(u) \right)\]

where we use the biharmonic diffusion coefficient \(\sqrt{|\kappa_i|}\). The index \(i\) refers to the direction of the diffusion.

Parameters#

field_flagslist[str]

A list of strings that indicate which fields should be diffused. For example, if field_flags=[“ENABLE_MIXING”], all fields with the flag “ENABLE_MIXING” will be diffused. For more information on possible flags, see fridom.framework.FieldVariable.

diffusion_coefficientstuple[float | fr.FieldVariable]

A tuple of diffusion coefficients. The length of the tuple must match the number of dimensions of the grid.

__init__(field_flags: list[str], diffusion_coefficients: list[float | FieldVariable])#

Methods

__init__(field_flags, diffusion_coefficients)

diffuse(z, dz)

diffusion_operator(u)

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

disable()

Enabling the module means that it will be executed at each time step.

enable()

Enabling the module means that it will be executed at each time step.

is_enabled()

Return whether the module is enabled or not.

reset()

Stop and start the module.

setup(mset)

Start the module

start()

Start the module

stop()

Stop the module

update(mz)

Update the module

Attributes

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.

mset

The model settings

name

required_halo

Examples using fridom.framework.modules.closures.BiharmonicDiffusion#

Convection and Closures

Convection and Closures

Dancing Eddies

Dancing Eddies

Barotropic Instability

Barotropic Instability
name = 'Biharmonic Diffusion'#
diffusion_operator(u: FieldVariable) FieldVariable[source]#

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

property diffusion_coefficients: list[float | FieldVariable]#

A list of diffusion coefficients.