SEC.ColumnSimulation

Contents

SEC.ColumnSimulation#

Stochastic.ColumnSimulation.py

Copyright (c) 2024-2025, Molass Community

get_animation(num_frames=None, interval=100, seed=None, close_plot=True, return_init=False, fig_check=False, blit=False, use_tqdm=True, large_only=False, debug=False, track_statistics=False, track_particle_id=None, num_pores=16)#

Create an animation of particles moving through a column structure.

Parameters:
  • num_frames (int, optional) – The number of frames in the animation. If None, defaults to 400.

  • interval (int, optional) – The delay between frames in milliseconds. Default is 100.

  • seed (int, optional) – The random seed for reproducibility. If None, no seed is set.

  • close_plot (bool, optional) – If True, close the plot after creating the animation to prevent static display. Default is True.

  • return_init (bool, optional) – If True, return after initializing the plot without starting the animation. Default is False.

  • fig_check (bool, optional) – If True, return after creating the figure without starting the animation. Default is False.

  • blit (bool, optional) – If True, use blitting to optimize the animation. Default is False.

  • use_tqdm (bool, optional) – If True, use tqdm to show a progress bar during animation. Default is True.

  • large_only (bool, optional) – If True, only animate the largest particles. Default is False.

  • debug (bool, optional) – If True, enable debug mode with additional output. Default is False.

  • track_statistics (bool, optional) – If True, track adsorption statistics for theoretical verification. Default is False.

  • track_particle_id (int, optional) – If provided, track the full trajectory of this specific particle (0-indexed). Stores position, state, and cumulative adsorbed time at each frame.

  • num_pores (int, optional) – Number of pores per grain (determines sector angle = 2π/num_pores). Default is 16. Use this to test geometric effects on residence time distribution: - More pores → smaller sector angle → more wall collisions → potentially smaller k - Fewer pores → larger sector angle → easier exit access → potentially larger k

Returns:

  • anim (matplotlib.animation.FuncAnimation) – The animation object.

  • stats (dict, optional) – If track_statistics=True or track_particle_id is set, also return statistics dictionary.