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()[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()[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()[source]

Finalize the simulation after the main time loop.

  • set the end time

  • finalize the outputs (in particular close the files)

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

The main time loop!

one_time_step()[source]

Main time stepping function.

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

Bases: TimeSteppingBase0

is_simul_completed()[source]

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

_compute_time_increment_CLF_uxuyuz()[source]

Compute the time increment deltat with a CLF condition.

_compute_time_increment_CLF_uxuy()[source]

Compute the time increment deltat with a CLF condition.

_compute_time_increment_CLF_uxuyeta()[source]

Compute the time increment deltat with a CLF condition.

_compute_time_increment_CLF_ux()[source]

Compute the time increment deltat with a CLF condition.

_compute_time_increment_CLF_U()[source]

Compute the time increment deltat with a CLF condition.

_compute_dispersion_relation()[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.