SpectralPressureSolver#

class fridom.nonhydro.modules.pressure_solvers.spectral_pressure_solver.SpectralPressureSolver[source]#

Bases: Module

This class solves the pressure field with a spectral solver.

__init__() None#

Methods

__init__()

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

solve_for_pressure(div)

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.

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

name = 'Spectral Pressure Solver'#
setup(mset: ModelSettings) None[source]#

Start the module

Description#

This method is called by the ModelSettings.setup() and sets the ModelSettings as well as the differentiation and interpolation modules.

solve_for_pressure(div: FieldVariable) FieldVariable[source]#
update(mz: ModelState) ModelState[source]#

Update the module

Description#

This method is called by the model at each time step. Child classes should overwrite this method to update the module. Make sure to decorate the method with the @module_method decorator.

Parameters#

mzfr.ModelState

The model state at the current time step.

Returns#

fr.ModelState

The updated model state.

property info: dict#

Return a dictionary with information about the time stepper.

Description#

This method should be overridden by the child class to return a dictionary with information about the time stepper. This information is used to print the time stepper in the __repr__ method.