+Before discussing the implementation some assumptions and approximations have to be made. Figure \ref{trim} shows the stopping powers and carbon concentration profile calculated by TRIM \cite{8}. The depth region we are interested in is between $0-300 \, nm$ (furtheron called simulation window), the region between the target surface and the beginning of the continuous amorphous $SiC_x$ layer at the implantation conditions of Figure \ref{xtem}. The nuclear stopping power and the implantation profile can be approximated by a linear function of depth within the simulation window.
+
+The target is devided into $64 \times 64 \times 100$ cells with a side length of $3 \, nmm$. Ech of it has a state (crystalline/amorphous) and keeps the local carbon concentration. The cell is addressed by a position vector $r^{\to}=(x,y,z)$, where $x$, $y$, $z$ are integers.
+
+The probability of amorphization is assumed to be proportional to the nuclear stopping power. A local probability of amorphization at any point in the target is composed of three contributions, the ballistic amorphization, a carbon-induced and a stress-induced amorphization. The ballistic amorphization is proportional to the nuclear stopping power, as mentioned before. The carbon-induced amorphization is a linear function of the local carbon concentration. The stress-induced amorphization is proportional to the compressive stress originating from the amorphous volumes in the vicinity, the stress amplitude decreasing with the square of distance $d=|r^{\to}-r^{\to}|$. Thus the probability of a crystalline volume getting amorphous can be calculated as
+\[
+ p_{c \rightarrow a}(r^{\to}) = p_{b} + p_{c} \times c_{carbon}(r^{\to}) + \sum_{amorphous \, neighbours} \frac{p_{s} \times c_{carbon}(r^{\to})}{d^2}
+\]
+with $p_{b}$, $p_{c}$ and $p_{s}$ being simulation parameters to weight the three different mechanisms of amorphization. The probability $p_{a \rightarrow c}$ of an amorphous volume to turn crystalline should behave contrary to $p_{c \rightarrow a}$ and is thus assumed as $p_{a \rightarrow c} = 1 - p_{c \rightarrow a}$.
+
+The simulation algorithm consists of three parts, the amorphization/recrystallization process, the carbon-incorporation and finally the carbon diffusion.
+
+For the amorphization/recrystallization process, random coordinates are computed to specify the volume which is hit by an implanted carbon ion. The two random numbers corresponding to the $x$ and $y$ coordinates are generated with a uniform probability distribution, $p(x)dx=dx \textrm{, } p(y)dy=dy$. The random number corresponding to the $z$ coordinate is distributed according to the linear approximated nuclear stopping power, $p(z)dz=(a_{el} \times z+b_{el})dz$, where $a_{el}$ and $b_{el}$ are simulation parameters describing the nuclear energy loss. After calculating the local probability of amorphization $p_{c \rightarrow a}$ of that volume, another random number decides, depending on the current state, whether the volume gets amorphous or recrystallized. This step is looped for the average hit per ion in the simulation window, counted by TRIM collision data.
+
+In an analogous manner random coordinates (expect the $z$ coordinate being distributed according the linear approximated implantation profile) are obtained to acquire the volume where the carbon ion gets stock and the local carbon concentration increases.
+
+Finally a standard diffusion algorithm is started, so the supersaturation of carbon in the crystalline volumes can be reduced. This process adds a few simulation parameters, the diffusion velocity, the diffusion rate and a switch whether to do diffusion in $z$-direction or not. Notice that there is no diffusion among crystalline volumes.
+
+\newpage