RD_CLI module

RD_CLI.Ballistic_Deposition(width, height, steps)

Simulate Ballistic Deposition on a substrate. In this simulation, particles stick upon contact with the substrate or a deposited particle.

This is simulation for snowflakes piling.

Parameters
  • width (int) – Width of the substrate.

  • height (int) – Height of the substrate.

  • steps (int) – Number of particles to drop.

Returns

Filename of the output substrate for Ballistic Deposition; A csv file contains the substrate state.

Return type

string

RD_CLI.Envelop(substrate)

Calculate the envelop of a substrate.

This function computes the top envelope of a substrate matrix, indicating the highest particle position at each column.

Parameters

substrate (numpy.ndarray) – The substrate matrix to compute the envelop for.

Returns

Array representing the top envelope of the substrate.

Return type

numpy.ndarray

RD_CLI.Random_Deposition(width, height, steps)

This is a function to simulate Random Deposition on a substrate.

This is simulation for the independent boxes (sand) piling. All columns are independent.

Parameters
  • width (int) – Width of the substrate.

  • height (int) – Height of the substrate.

  • steps (int) – Steps or times to run.

Returns

Filename of the output substrate.

Return type

string

RD_CLI.Random_Deposition_Surface_Relaxation(width, height, steps)

This is a function to simulate Random Deposition on a substrate with the surface relaxation. Particle will seek the lowest left/right neighbors to land.

This is simulation for the independent boxes (sand) piling with surface relaxation.

Parameters
  • width (int) – Width of the substrate.

  • height (int) – Height of the substrate.

  • steps (int) – Steps or times to run.

Returns

Filename of the output substrate.

Return type

string

RD_CLI.interface_width(filename)

Compute and visualize the interface width of a substrate from a given simulation.

This function reads the substrate state from a file, calculates the interface width over time, and generates a log-log plot of the interface width. It also computes the slope of the log-log plot as a function of time.

Parameters

filename (str) – The name of the file containing the substrate data.

Returns

Array containing the interface width calculated at each step; An image file with the same name as the input file, but with a .png extension. The file contains the statistical figures.

Return type

numpy.ndarray

RD_CLI.main()

The main function to simulate different types of surface growth models based on the provided command-line arguments.

This function sets up a command-line interface for simulating Random Deposition, Random Deposition with Surface Relaxation, or Ballistic Decomposition on a substrate. It accepts various parameters like width, height, and number of steps for the simulation. It also provides options for generating a movie of the simulation and calculating interface width.

The function decides the type of simulation based on the arguments passed, performs the simulation, and then proceeds to calculate the interface width. If the movie generation option is selected, it invokes another script to generate the movie.

The script is executed from the command line with various options:

-w, --width

: Width of the substrate (default: 100)

-e, –height : Maximum height of the substrate (default: 60) -s, –steps : Number of particles to drop (default: 5000)

--relax

: Enable surface relaxation (default: False)

--BD

: Enable ballistic decomposition (default: False)

-m, --movie

: Generate an mp4 movie of the simulation (default: False)

  1. A text file representing the substrate state.

  2. Statistical figures, including a log-log plot for the interface width and the estimated slope.

  3. (Optional) An mp4 movie of the simulation process.

By Le Chen (le.chen@auburn.edu, chenle02@gmail.com), 2023-10-22