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,
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$ .
$ 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
You can edit the file test.bash to choose the different paramters.
./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.
./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).
[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