Skip to content

rob10campbell/DLCA

 
 

Repository files navigation

DLCA

A C++ implementation of the diffusion-limited cluster-cluster aggregation (DLCA), an algorithm to generate aerogel structures.

Usage

  1. Simulation Parameters

    • [D] Dimension of the grid.

    • [L] Size of the grid. E.g. L x L for D = 2.

    • [N] Number of particles in the grid.

    • [F] The output file name (without file extension) saved to the filepath "L[L]_phi[volume fraction of spheres to 3 decimals]/[F].csv"

    • [*C] The simulation style, either 0 (cluster based) or 1 (counter based)

    • [*S] The number of snapshots in a cluster-based style simulation

  2. Single run

    • Linux

      # C++11 support required
      cd /path/to/clone
      module load cmake/3.18.1 
      make
      
      cd /path/to/clone
      bin/dlca [D] [L] [N] [F] [*C] [*S]
      
    • results are saved to a LOG file and a CSV files

    • the CSV file contains: iteration number, cluster number, particle label, cluster label, cluster coordinates (x,y,z)

  3. Visualization Parameters

    • [P] The period for snapshots

    • [I] The number of iterations.

    • [M] The marker size of plots.

    • [ELEV] The elevation angle.

    • [AZIM] The azimuthal angle.

  4. Plotting single run (Python, NumPy, and matplotlib required)

    • 2D

      python plot_2d.py [L] [INPUT] [OUTPUT] [M]
      
    • 3D

      python plot_3d.py [L] [INPUT] [OUTPUT] [M] [ELEV] [AZIM]
      
  5. Creating GIF (ImageMagick required)

    • Windows

      create_demo.bat [D] [L] [N] [P] [M]
      
    • Linux

      create_demo.sh [D] [L] [N] [P] [M]
      

GIF demo

Benchmark

Related info

License

This software is licensed under the GNU General Public License.

About

Diffusion-limited cluster-cluster aggregation from Wendong Li

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages

  • C++ 80.5%
  • Python 6.3%
  • Batchfile 4.4%
  • Shell 4.2%
  • MATLAB 3.6%
  • Makefile 1.0%