This commit is contained in:
Joshua Coles 2023-03-20 00:14:29 +00:00
parent 4f7f018858
commit 0e0617202f
6 changed files with 425 additions and 49 deletions

View File

@ -32,5 +32,4 @@ This then provided sufficient data for us to transition to our new generic frame
\subsection*{Auxiliary Programs}
A number of auxiliary programs were also developed to assist in the running and visualisation of the model. Most notably was the image generation tool which allowed for the model to focus on one thing: modelling DLA, separating out generating visualisations of the system. This was used to generate images such as that shown in Figure \ref{dla-eg} which are both useful for presentation, and visual qualitative assessment of model correctness.
A number of auxiliary programs were also developed to assist in the running and visualisation of the model. Most notably was the image generation tool which allowed for the model to focus on one thing: modelling DLA, separating out generating visualisations of the system. This was used to generate images such as that shown in Figure \ref{dla-eg} which are both useful for presentation, and visual qualitative assessment of model correctness. Additional tools can be found under the tools executable of the rust-codebase.

View File

@ -1,5 +1,5 @@
\singlecolumnabstract{
Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Aenean commodo ligula eget dolor. Aenean massa. Cum sociis natoque penatibus et magnis dis parturient montes, nascetur ridiculus mus. Donec quam felis, ultricies nec, pellentesque eu, pretium quis, sem. Nulla consequat massa quis enim. Donec pede justo, fringilla vel, aliquet nec, vulputate eget, arcu. In enim justo, rhoncus ut, imperdiet a, venenatis vitae, justo. Nullam dictum felis eu pede mollis pretium. Integer tincidunt. Cras dapibus. Vivamus elementum semper nisi. Aenean vulputate eleifend tellus. Aenean leo ligula, porttitor eu, consequat vitae, eleifend ac, enim. Aliquam lorem ante, dapibus in, viverra quis, feugiat a, tellus. Phasellus viverra nulla ut metus varius laoreet. Quisque rutrum. Aenean imperdiet. Etiam ultricies nisi vel augue.
Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Aenean commodo ligula eget dolor. Aenean massa. Cum sociis natoque penatibus et magnis dis parturient montes, nascetur ridiculus mus. Donec quam felis, ultricies nec, pellentesque eu, pretium quis, sem. Nulla consequat massa quis enim. Donec pede justo, fringilla vel, aliquet nec, vulputate eget, arcu. In enim justo, rhoncus ut, imperdiet a, venenatis vitae, justo. Nullam dictum felis eu pede mollis pretium. Integer tincidunt.
}
% TODO Write abstract
@ -14,24 +14,31 @@ Diffusion-limited aggregation (DLA) models processes where the diffusion of smal
% TODO Provide examples
This process gives rise to structures which are fractal in nature (for example see Figure \ref{dla-eg}), ie objects which contain detailed structure at arbitrarily small scales. These objects are associated with a fractal dimension, $\mathrm{fd}$ or $df$. This number relates how measures of the object, such as mass, scale when the object itself is scaled. For non fractal this will be its traditional dimension: if you double the scale of a square, you quadruple its area, $2 ^ 2$; if you double the scale of a sphere, you octuple its volume, $2 ^ 3$. For a DLA aggregate in a 2D embedding space, its "traditional" dimension would be 1, it is not by nature 2D, but due to its fractal dimension it has a higher fractal dimension higher than that.
\begin{figure}[htb]
\includegraphics[width=\columnwidth]{figures/dla-eg}
\caption{A $5000$ particle aggregate on a 2D square grid.}
\label{dla-eg}
\end{figure}
This process gives rise to structures which are fractal in nature (for example see Figure \ref{dla-eg}), ie objects which contain detailed structure at arbitrarily small scales. These objects are associated with a fractal dimension, $\mathrm{fd}$, (occasionally written as $df$ or $d$). This number relates how measures of the object, such as mass, scale when the object itself is scaled. For non fractal this will be its traditional dimension: if you double the scale of a square, you quadruple its area, $2 ^ 2$; if you double the scale of a sphere, you octuple its volume, $2 ^ 3$. For a DLA aggregate in a 2D embedding space, its \enquote{traditional} dimension would be 1, it is not by nature 2D, but due to its fractal dimension it has a higher fractal dimension higher than that. Fractals are often associated with a scale invariance, ie they have the same observables at various scales. This can be observed for DLA aggregates in Figure \ref{scale-comparison} where we have two aggregates of different sizes, scaled as too fill the same physical space.
% TODO We need to clean up the symbol
% TODO Source the fractal dimension
In this paper we will consider a number of alterations the standard DLA process and the affect they have on the fractal dimension of the resulting aggregate. This data will be generated by a number of computational models derived initially from the code provided \cite{IPC} but altered and optimised as needed for the specific modelling problem.
\begin{figure}[t]
\includegraphics[width=\columnwidth]{figures/dla-eg}
\caption{A $5000$ particle aggregate on a 2D square grid.}
\label{dla-eg}
\begin{figure}[htb]
\includegraphics[width=\columnwidth]{figures/scale-comparison.png}
\caption{A $5000$ and $10000$ particle aggregate scaled to fill the same physical space. Note the similar structure and pattern between the two objects.}
\label{scale-comparison}
\end{figure}
% TODO Do I want to show something akin to the comparison image with a 2x2 grid of different sizes?
% TODO Extension, can do we do something akin to renormalisation with that scaling property?
\section*{Discussion}
As mentioned the DLA process models the growth of an aggregate (otherwise known as a cluster) within a medium through which smaller free moving particles can diffuse. These particles move freely until they "stick" to the aggregate adding to its extent. A high level description of the DLA algorithm is given as follows,
As mentioned the DLA process models the growth of an aggregate (otherwise known as a cluster) within a medium through which smaller free moving particles can diffuse. These particles move freely until they \enquote{stick} to the aggregate adding to its extent. A high level description of the DLA algorithm is given as follows,
\begin{enumerate}
\item An initial seed aggregate is placed into the system, without mathematical loss of generality, at the origin. This is normally a single particle.
@ -40,7 +47,7 @@ As mentioned the DLA process models the growth of an aggregate (otherwise known
\item At this point the new particle stops moving and becomes part of the aggregate a new particle is released.
\end{enumerate}
An actual implementation of this system will involve a number of computational parameters and simplification for computational modelling. For example particles are spawned at a consistent radius from the aggregate, $r_{\mathrm{add}}$, rather than existing uniformly throughout the embedding medium. Further it is traditional to define a "kill circle", $r_{\mathrm{kill}}$ past which we consider the particle lost and stop simulating it \cite[p.~27]{sanderDiffusionlimitedAggregationKinetic2000} (this is especially important in $d > 2$ dimensional spaces where random walks are not guaranteed to reoccur \cite{lawlerIntersectionsRandomWalks2013} and could instead tend off to infinity).
An actual implementation of this system will involve a number of computational parameters and simplification for computational modelling. For example particles are spawned at a consistent radius from the aggregate, $r_{\mathrm{add}}$, rather than existing uniformly throughout the embedding medium. Further it is traditional to define a \enquote{kill circle}, $r_{\mathrm{kill}}$ past which we consider the particle lost and stop simulating it \cite[p.~27]{sanderDiffusionlimitedAggregationKinetic2000} (this is especially important in $d > 2$ dimensional spaces where random walks are not guaranteed to reoccur \cite{lawlerIntersectionsRandomWalks2013} and could instead tend off to infinity).
While these are interesting and important to the performant modelling of the system, we aim to choose these such to maximise the fidelity to the original physical system, whilst minimising the computational effort required for simulation. From a modelling perspective however there are a number of interesting orthogonal behaviours within this loose algorithm description which we can vary to potentially provide interesting results.
@ -52,6 +59,8 @@ Another characteristic behaviour of the algorithm is the choice of diffusion mec
Finally we arrive at the final characteristic we will consider: the space that the DLA process takes place within. Traditionally this is done within a 2D orthogonal gridded space, however other gridded systems, such as hexagonal, can be used to explore any effect the spaces \cite[pp.~210-211]{sanderDiffusionlimitedAggregationKinetic2000}.
We will explore a number of these alterations in the report that follows.
\section*{Method}
To this end we designed a generic system such that these different alterations of the traditional DLA model could be written, explored, and composed quickly, whilst generating sufficient data for statistical measurements. This involved separating the various orthogonal behaviours of the DLA algorithm into components which could be combined in a variety of ways enabling a number of distinct models to be exist concurrently within the same codebase.
@ -67,7 +76,11 @@ The code was written such that it is reproducible based on a user provided seed
\subsection*{Fractal Dimension Calculation}
There are two methods of determining the fractal dimension. The first is by noting that the number of particles in an aggregate $N_c$ grows with the maximum radius $r_\mathrm{max}$ as
We will use two methods of determining the fractal dimension of our aggregates. The first is the mass method and the second box-count\cite{smithFractalMethodsResults1996a}.
% TOOD Replace simple method with mass method
For the mass method we note that the number of particles in an aggregate $N_c$ grows with the maximum radius $r_\mathrm{max}$ as
\begin{equation*}
N_c(r_{\mathrm{max}}) = (\alpha r_{\mathrm{max}})^{df} + \beta
@ -81,14 +94,18 @@ N_c(r_{\mathrm{max}}) &= (\alpha r_{\mathrm{max}})^{df} + \beta \\
\log N_c &\approx df \cdot \log\alpha + df \cdot \log r_{\mathrm{max}} \\
\end{align*}
from which we can either perform curve fitting on our data, or by taking $\alpha = 1$ and hence giving us,
from which we can either perform curve fitting on our data.
In addition if we take $\alpha = 1$ as this is an entirely computational model and we can set our length scales without loss of generality we obtain,
\begin{align*}
\log N_c &= df \cdot \log r_{\mathrm{max}} \\
df &= \frac{\log N_c}{\log r_{\mathrm{max}}}
\end{align*}
This gives us a way to determine "instantaneous" fractal dimension.
giving us a way to determine \enquote{instantaneous} fractal dimension at any particular point the modelling process.
% TODO If we don't end up using this, bin this section it is just going to be
A second method for determining the fractal dimension is known as box-count \cite{smithFractalMethodsResults1996a}. This involves placing box-grids of various granularities onto the aggregate and observing the number of boxes which have at least one particle within them. The number of these boxes $N$ should grow as,

357
out.html Normal file

File diff suppressed because one or more lines are too long

View File

@ -11,7 +11,9 @@
\usepackage{geometry} % to change the page dimensions
\geometry{a4paper, left=17.5mm, right=17.5mm, textwidth=85mm,columnsep=5mm, top=32mm}
\setlength{\parskip}{8pt}
\setlength{\parskip}{6pt}
%\setlength{\belowdisplayskip}{0pt} \setlength{\belowdisplayshortskip}{0pt}
%\setlength{\abovedisplayskip}{0pt} \setlength{\abovedisplayshortskip}{0pt}
\usepackage[backend=bibtex, dateabbrev=false]{biblatex}
@ -60,6 +62,7 @@
}
\setlength{\marginparwidth}{1.2cm}
\usepackage{csquotes}
\usepackage{refcount}% http://ctan.org/pkg/refcount
\newcounter{fncntr}
\newcommand{\fnmark}[1]{\refstepcounter{fncntr}\label{#1}\footnotemark[\getrefnumber{#1}]}

View File

@ -8,7 +8,7 @@
% What I wish the title was: Development and Testing of a generalised computational model for efficient diffusion limited aggregation modelling and experimentation.
\title{\textbf{Diffusion Limited Aggregation under Novel Conditions using}}
\title{\textbf{Modelling Diffusion Limited Aggregation under a Variety of Conditions}}
\author{Candidate Number: 24829}
\affil{Department of Physics, University of Bath}
\date{March 21, 2023} % Due Date

View File

@ -14,18 +14,18 @@
\begin{figure}[hbt]
\includegraphics[width=\columnwidth]{figures/nc-fd-convergence.png}
\caption{The converge of the fractal dimension of $20$ runs of the standard DLA model. This uses the the simple calculation method. The first $50$ data points are not included as the data contains to much noise to be meaningfully displayed. Also included in the figure is the value from theory, $1.71 \pm 0.01$ from \cite[Table 1, $\langle D(d = 2)\rangle$]{nicolas-carlockUniversalDimensionalityFunction2019}.}
\caption{The converge of the fractal dimension of $20$ runs of the standard DLA model. This uses the mass method. The first $50$ data points are not included as the data contains to much noise to be meaningfully displayed. Also included in the figure is the value from literature, $1.71 \pm 0.01$ from \cite[Table 1, $\langle D(d = 2)\rangle$]{nicolas-carlockUniversalDimensionalityFunction2019}.}
\label{nc-fd-convergence}
\end{figure}
To start we do $20$ runs, with seeds $1, 2, \dots, 20$, of the standard DLA model using the minimally altered initially provided code. The fractal dimension is calculated using the simple method \todo{do I want to ref this?} and averaged across the $20$ runs. This is shown in Figure \ref{nc-fd-convergence} along with the result from literature, $d = 1.7 \pm 0.6$ \cite[Table 1, $\langle D(d = 2)\rangle$]{nicolas-carlockUniversalDimensionalityFunction2019}.
\todo{Do I need to find a grid value for this I think this might be continuous}
To start we do $20$ runs, with seeds $1, 2, \dots, 20$, of the standard DLA model using the minimally altered initially provided code. The fractal dimension is calculated using the mass method and averaged across the $20$ runs. This is shown in Figure \ref{nc-fd-convergence} along with the result from literature, $d = 1.7 \pm 0.6$ \cite[Table 1, $\langle D(d = 2)\rangle$]{nicolas-carlockUniversalDimensionalityFunction2019}.
Taking an average of the trailing $5000$ readings we come to a value of $d = 1.73$ \todo{errors and rounding}, while this values diverges slightly from the value reported in literature, this result provides a reasonable grounding for our model as being roughly correct and provides a useful point of comparison for future work.
% TODO Errors
Taking an average of the trailing $5000$ readings we come to a value of $fd = 1.73$. As can be seen on the figure this is divergence from the literature (we suspect due to the gridded nature of the embedding space) the result is reasonable and consistent across runs. We consider this, along with the sourcing of the initially provided code, to be sufficient grounding the start of our trust chain.
This also allows us to say with reasonable confidence that we can halt our model around $N_C = 5000$ as a reasonable trade off between computational time and accuracy. This should be verified for particular model variations however.
This also allows us to say with reasonable confidence that we can halt our model around $N_C = 5000$ as a trade off between computational time and accuracy. This should be verified for particular model variations however.
\subsection{Probabilistic Sticking}
\subsection*{Probabilistic Sticking}
\begin{figure}[hbt]
\includegraphics[width=\columnwidth]{figures/eg-across-sp/sp-range.png}
@ -33,58 +33,58 @@ This also allows us to say with reasonable confidence that we can halt our model
\label{sp-dla-comparison}
\end{figure}
As discussed one of the possible alterations of the system is the introduction of a probabilistic component to the sticking behaviour of the DLA system. Here we introduced a probability $p_{stick}$ to the initial grid based sticking behaviour of the particles, with the particle being given this probability to stick at each site (for example, if the particle was adjacent to two cells in the aggregate, then the probabilistic aspect would apply twice).
Comparing the results from different runs we can see in Figure \ref{sp-dla-comparison} the clear thickening of the arms with lower values of $p_{stick}$. This aligns with your observation of the fractal dimension, as seen in Figure \ref{sp-fd}.
\begin{figure}[hbt]
\includegraphics[width=\columnwidth]{figures/sp-fd}
\caption{The fractal dimension for the DLA system on a 2D grid lattice a sticking probability $p_{stick}$. This value was obtained from $100$ runs with different seeds, by computing the value of the fractal dimension using the simple method, taking a mean across the last $100$ measurements on a $2000$ particle cluster.
% TODO These numbers are way too small given the results of Figure 1.
\caption{The fractal dimension for the DLA system on a 2D grid lattice a sticking probability $p_{stick}$. This data was obtained in two batches: in the $p_{stick} \in [0.1, 1]$ range $100$ samples were taken with different seeds with $N_C= 2000$, the fractal dimension being computed by the mass method; for the $p_{stick} \in (0.001, 0.1)$ range a $100$ samples of $N_C = 5000$ clusters were used.
}
\label{sp-fd}
\end{figure}
This was also the case used to ground both the minimally altered code, and our new generic system, to ensure they are functioning correctly. This is discussed in more depth in the Appendix, \nameref{generic-dla}.
The first alteration we shall make to the DLA model is the introduction of a probabilistic component to the sticking behaviour. We parametrise this behaviour by a sticking probability $p_{stick} \in (0, 1]$, with the particle being given this probability to stick at each site (for example, if the particle was adjacent to two cells in the aggregate, then the probabilistic aspect would apply twice).
Comparing first the clusters for different values of $p_{stick}$ we can see in Figure \ref{sp-dla-comparison} a clear thickening of the arms with lower values of $p_{stick}$. This aligns with data for the fractal dimension, as seen in Figure \ref{sp-fd}, with thicker arms bringing the cluster closer to a non-fractal two dimensional object.
In the low $p_{stick}$ domain we record values of $\mathrm{fd} > 2$ which is the embedding domain. This is unexpected and points towards a possible failure of our mass-method fractal dimension calculation. More work and analysis is required to verify these results.
% TODO Conclusion point
As discussed in the Appendix, \nameref{generic-dla}, this also provides the next chain of grounding between the initially provided code, and the new generic framework. Further details can be found in the aforementioned appendix.
\subsection*{Higher Dimensions}
The next alteration to explore is changing the embedding space to be higher dimensional. This is an excellent example of the versatility of the generic DLA framework as for higher dimensions it becomes advantageous to move from an array based grid storage to a k-dimensional tree structure for more efficient storage, while only moving to $O(\log n)$ average performance for searches and inserts\cite{bentleyMultidimensionalBinarySearch1975}.
The next alteration to explore is changing the embedding space to be higher dimensional. Here we use a k-dimensional tree structure to store the aggregate as opposed to an array based grid allowing us to greatly reduce memory consumption ($O(\text{grid\_size}^D) \to O(n)$ where $n$ is the number of particles in the aggregate) whilst retaining a strong access and search time complexity of $O(n \log n)$\cite{bentleyMultidimensionalBinarySearch1975}.
Running with various values of $p_{stick}$ we get the results shown in Figure \ref{sp-fd-2d-3d}.
To start we model two styles of random walk: direct, where only those cells which are directly adjacent to its current location current location are accessible; off-axis, where all the full $3 \times 3 \times 3$ cubic (bar the centre position) are available. The ($N_c, fd$) correspondence is shown in Figure \ref{3d-nc-fd-convergence} where we can see that both walk methods, as expected produce identical results, varying only slightly from a naive implementation in the initially provided codebase included to ensure correct behaviour. These off axis walks do however offer a speed boost as the larger range of motion leads to faster movement within the space.
Modelling the system across the range of $p_{stick}$ we obtain results as shown in Figure \ref{sp-fd-2d-3d}. These show a similar pattern as was seen in the 2D case of Figure \ref{sp-fd}. We note that whilst these lines are similar, they are not parallel showing distinct behaviour.
\begin{figure}
\includegraphics[width=\columnwidth]{figures/3d-nc-fd-convergence}
\caption{TODO}
\label{3d-nc-fd-convergence}
\end{figure}
At this moment we do not have an analytical form for this relation but further work may provide such.
% TODO Conclusion point
\begin{figure}
\includegraphics[width=\columnwidth]{figures/sp-fd-2d-3d}
\caption{TODO}
\caption{A comparison of the fractal dimension of DLA aggregates in 2- and 3-dimensional embedding space. The datasets were obtained by averages of $100$ and $200$ for 2D and 3D respectively, both with data recorded at a increment of $\Delta p_{stick} \approx 0.1$, and an aggregate size of $2000$.}
\label{sp-fd-2d-3d}
\end{figure}
\begin{figure}
\includegraphics[width=\columnwidth]{figures/3d-nc-fd-convergence}
\caption{A comparison of direct and off-axis walks in 3 dimensions, using both the new framework (NF) and the initial provided code (IPC). Note a slight divergence between the NF and IPC lines but a complete agreement between the direct and off-axis walks for the NF. Errors are not displayed as they are to small to be visible on this graph due to the large sample size.} % TODO Verify literature line here and rename it.
\label{3d-nc-fd-convergence}
\end{figure}
% TODO Do I want to do higher dimensions still 4d?
% TODO how am I going to cope with the fact we don't agree with theory?
% TOOD Look at theory to see if I can find a curve for these sp-fd graphs or at the very least note similarities and differences between them. "Given the erroneous behaviour for low sp we are uncertain as to the correctness). Maybe take another crack at boxcount since you've mentioned it and it might be interesting.
\begin{enumerate}
\item The next obvious extension is 3D
\item Try with on axis and off-axis movement
\item See that off-axis has no effect but is quicker as traverses space quicker (I mean also validate this)
\item Now try 3D + SP
\end{enumerate}
% MORE EXTENSIONS
\subsection*{Continuous Space}
%\subsection*{Continuous Space}
%
%\begin{enumerate}
% \item We get a divergence from theory, what happens if we use continuous
%\end{enumerate}
\begin{enumerate}
\item We get a divergence from theory, what happens if we use continuous
\end{enumerate}
\section*{Conclusion}
\subsection*{Hexagonal}
In conclusion, we have validated that the new framework provides consistent behaviour aligned with previous models, whilst allowing for a wider range of behaviours to be easily tested. Future work is required to determine analytic or physical explanations for the data presented. However there are a number of pointers to places of immediate interest and avenues waiting to be explored.
\subsection*{External force onto wall}