migflow.time_integration
- migflow.time_integration.iterate(fluid, particles, dt, min_nsub=1, contact_tol=1e-08, external_particles_forces=None, fixed_grains=False, after_sub_iter=None, max_nsub=None, check_residual_norm=-1, use_predictor_corrector=True)
 Migflow solver: the solver type depends on the fluid and particles given as arguments.
- Parameters
 fluid – fluid structure
particles – particles structure
dt (
float) – time stepmin_nsub (
int) – minimal nsub for the particles iterationscontact_tol (
float) – tolerance for the contact solverexternal_particles_forces (
Optional[ndarray]) – vector of external forces applied on the particlesfixed_grains (
bool) – boolean variable specifying if the grains are fixed in the fluidafter_sub_iter (
Optional[callable]) – callback to execute once a sub iteration has been mademax_nsub (
Optional[int]) – maximum number of times the time step can be further split if conergence is not reachedcheck_residual_norm (
float) – check if the fluid solver has converged to the specified normuse_predictor_corrector (
bool) – boolean variable specifying if the predictor-corrector scheme is used
- Raises
 ValueError – fluid and particles cannot be both None
ValueError – external_particles_forces must have shape (number of particles,dimension)
- migflow.time_integration.predictor_corrector_iterate(fluid, particles, dt, min_nsub=1, contact_tol=1e-08, external_particles_forces=None, alpha=0.5, after_sub_iter=None, max_nsub=None, check_residual_norm=-1)
 Predictor-corrector scheme to solve fluid and grains.
- Parameters
 fluid – fluid structure
particles – particles structure
dt (
float) – time stepmin_nsub (
int) – minimal nsub for the particles iterationscontact_tol (
float) – tolerance for the contact solverexternal_particles_forces (
Optional[ndarray]) – external forces applied on the particlesalpha (
float) – parametre of the predictor-corrector scheme [alpha*f(n)+(1-alpha)*f(n+1)]after_sub_iter (
Optional[callable]) – callback to execute once a sub iteration has been mademax_split – maximum number of times the time step can be further split if convergence is not reached
check_residual_norm (
float) – check if the fluid solver has converged to the specified norm