This program can generate different types of deterministic fractal aggregates, including several types of named aggregates. The fractal (Hausdorff) dimension of those aggregates is well-known and the size can be controlled by adjusting the “number of iterations” parameter.

## Compilation

A modern C++ compiler is required to build the program. The use of CMake is recommended to generate build files. This program depends on libFractalCommon, which is available at https://github.com/eg0000r-pub/libFractalCommon. In CMakeLists.txt change the line `include_directories("/home/egor/Libraries/include")`

to the path where the libFractalCommon headers are stored and change the line `link_directories("/home/egor/Libraries/bin")`

to the path where libFractalCommon binary is stored. Now in the folder with the sources execute the following commands:

```
mkdir cmake-build
cd cmake-build
cmake -DCMAKE_BUILD_TYPE=Release ..
cmake --build .
```

An executable file named deterministic_aggregates will appear in the cmake-build directory. Run the program with `./deterministic_aggregates`

.

## Usage

When the program is executed, the user will be prompted to enter the number of algorithm iterations, the output file name, and the aggregate type. The number of iterations parameter will affect the number of primary particles in the produced aggregate and can be estimated with the equations provided in the “Aggregates” section of this document. The output file is where the generated aggregate data will be stored. Generated aggregates are stored in ASCII vtk files and the .vtk extension will be appended to the file name is not provided already. The aggregate type parameter determines which aggregate from the “Aggregates” section will be generated.

## Aggregates

### Type A aggregate

Features:

- Fractal dimension
*D*_{f}is log_{3}9=2 - Size
*N*is 9at^{n}*n*iterations - PPs can be represented with spheres of unit radius

### Type B aggregate (3D Vicsek fractal)

Features:

- Fractal dimension
*D*is log_{f}_{3}7≈1.771 - Size
*N*is 7at^{n}*n*iterations - PPs can be represented with spheres of unit radius or cubes of size 2

### Type C aggregate (a.k.a. Menger sponge)

Features:

- Fractal dimension
*D*is log_{f}_{3}20≈2.727 - Size
*N*is 20at^{n+1}*n*iterations - PPs can be represented with spheres of unit radius or cubes of size 2

### Type D aggregate (a.k.a. Sierpinski pyramid)

Features:

- Fractal dimension
*D*is log_{f}_{2}4=2 - Size
*N*is 4at^{n+1}*n*iterations - PPs can be represented with spheres of unit radius

## Pre-exponential factor

Fractal dimension can be derived from any property that is related to distribution of mass in space. One such property is radius of gyration (*R _{g}*) – the root mean square distance of PPs from the center of mass of the aggregate. The center of mass

*r*can be found with:

_{0}where *N* is the number of PPs in the aggregate and *r _{i}* is position of

*i*-th PP.

*R*is then:

_{g}*N* must be proportional to *R _{g}^{Df}*. Let the proportionality constant be

*k*, then:

_{0}Knowing *N*, *D _{f}*, and

*R*for each aggregate type we can readily compute

_{g}*k*. The calculated values are presented in the table below.

_{0}Type | k_{0} |

A | 2.25 |

B | 2.12 |

C | 0.779 |

D | 2.01 |

*R*determined for every aggregate type

_{g}