Skip to content

Generates a random set of positions of spheres in a fractal cluster with arbitrary number of particles and fractal dimension

License

Notifications You must be signed in to change notification settings

PabloPalaciosAlonso/Fractal-Cluster

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

30 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Fractal cluster

P. Palacios Alonso 2022.

fc - Generates a random set of positions of spheres in a fractal cluster using the algorithm described in 1 .

In a fractal cluster the number of particles in the cluster and its gyration radius verifies,

$N = k_f \cdot (R_g/a)^{D_f}$ (1)

Where:

  • N = Number of spheres in the cluster.
  • a = Radius of the spheres.
  • Df = Fractal dimension of the cluster.
  • kf = Fractal prefactor of the cluster.
  • $R_g$ = Gyration radius of the cluster $R_g^2 = 1/N \cdot \sum (\mathbf{r_i}-\mathbf{c_m})^2$.

Compile with

$ make

You can test the code after compiling with:

$ cp fc test/fc; chmod +x test.bash; ./test.bash

It will generate some clusters with different number of spheres and then compute the gyration radius of the aggregates as a function of the number of particles composing the cluster, in order to test if relation 1 is verified. If it is verified in a log-log plot the gyration radius a a funtion of the number of particles should be a straigh line with slope $D_f$ and y-intercept equals to $ln(k_f/a^{D_f})$.

You can edit the file test.bash to choose the different paramters.

Usage

./fc [INPUTS]
  • Required inputs
    • -N: Number of the spheres in the cluster.
    • -Radius: Radius of the spheres.
    • -Df: Fractal dimension of the cluster.
    • -kf: Fractal prefactor of the cluster.
  • Optional inputs
    • -filename: Name of a file in which to store the positions of the particles. If no filename is provided the positions are displayed in the comand line.
    • -h: Prints a help message.

Example

./fc -N 5000 -Df 1.8 -kf 1.1 -radius 0.5 -filename fc.out

It will generate a fractal cluster with N = 5000 spheres, fractal dimension Df = 1.8, fractal prefactor kf = 1.1 and radius = 0.5 and store the x y z coordinates of the centers of the spheres in the file fc.out.

Generated cluster visualized with superpunto (https://github.com/RaulPPelaez/superpunto).

Bibliography

[1] A.V.Filippov, M.Zurita and D.E.Rosner. Fractal-like Aggregates: Relation between Morphology and Physical Properties. https://doi.org/10.1006/jcis.2000.7027

About

Generates a random set of positions of spheres in a fractal cluster with arbitrary number of particles and fractal dimension

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published