HarmonicFriction#
- class fridom.nonhydro.modules.closures.diffusion.HarmonicFriction(ah: float | ScalarField, av: float | ScalarField)[source]#
Bases:
HarmonicDiffusionHarmonic 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
Horizontal harmonic friction coefficient.
- avfloat | fr.ScalarField
Vertical harmonic friction coefficient.
- __init__(ah: float | ScalarField, av: float | ScalarField) None[source]#
Methods
__init__(ah, av)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
The horizontal diffusion coefficient.
The vertical diffusion coefficient.
diff_moduleThe differentiation module to be used by this module.
diffusion_coefficientsA list of diffusion coefficients.
field_flagsA list of field flags that indicate which fields should be diffused.
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.
Examples using
fridom.nonhydro.modules.closures.HarmonicFriction#- name = 'Harmonic Friction'#
- property ah: float | ScalarField#
The horizontal diffusion coefficient.
- property av: float | ScalarField#
The vertical diffusion coefficient.