fluidsim.base.time_stepping.base

Time stepping (fluidsim.base.time_stepping.base)

Provides:

class fluidsim.base.time_stepping.base.TimeSteppingBase0(sim)[source]

Bases: object

Universal time stepping class used for all solvers.

static _complete_params_with_default(params)[source]

This static method is used to complete the params container.

start(self)[source]

Loop to run the function one_time_step().

If self.USE_T_END is true, run till t >= t_end, otherwise run self.it_end time steps.

prepare_main_loop(self)[source]

Prepare the simulation just before the main loop.

This function is called automatically in main_loop if it hasn’t been called before. It can be used by users for debugging.

During this preparation, the time of the begining of the simulation is set and the outputs are initialized with the initial state.

finalize_main_loop(self)[source]

Finalize the simulation after the main time loop.

  • set the end time

  • finalize the outputs (in particular close the files)

main_loop(self, print_begin=False, save_init_field=False)[source]

The main time loop!

one_time_step(self)[source]

Main time stepping function.

class fluidsim.base.time_stepping.base.TimeSteppingBase(sim)[source]

Bases: fluidsim.base.time_stepping.base.TimeSteppingBase0

is_simul_completed(self)[source]

Checks if simulation time or iteration has reached the end according to parameters specified.

_compute_time_increment_CLF_uxuyuz(self)[source]

Compute the time increment deltat with a CLF condition.

_compute_time_increment_CLF_uxuy(self)[source]

Compute the time increment deltat with a CLF condition.

_compute_time_increment_CLF_uxuyeta(self)[source]

Compute the time increment deltat with a CLF condition.

_compute_time_increment_CLF_ux(self)[source]

Compute the time increment deltat with a CLF condition.

_compute_time_increment_CLF_U(self)[source]

Compute the time increment deltat with a CLF condition.

_compute_dispersion_relation(self)[source]

Compute time increment from a dispersion relation.

Functions

max_abs(arr)

Classes

TimeSteppingBase(sim)

TimeSteppingBase0(sim)

Universal time stepping class used for all solvers.