<<

Eindhoven University of Technology

BACHELOR

The mean field limit of active matter in arbitrary dimensions

Grillo, M.

Award date: 2019

Link to publication

Disclaimer This document contains a student thesis (bachelor's or master's), as authored by a student at Eindhoven University of Technology. Student theses are made available in the TU/e repository upon obtaining the required degree. The grade received is not published on the document as presented in the repository. The required complexity or quality of research of student theses may vary by program, and the required minimum study period may vary in duration.

General rights Copyright and moral rights for the publications made accessible in the public portal are retained by the authors and/or other copyright owners and it is a condition of accessing publications that users recognise and abide by the legal requirements associated with these rights.

• Users may download and print one copy of any publication from the public portal for the purpose of private study or research. • You may not further distribute the material or use it for any profit-making activity or commercial gain Eindhoven University of Technology Department of and Computer Science Department of Applied Physics

CASA

The Mean Field Limit of Active Matter in Arbitrary Dimensions

Supervisors Author dr. Oliver Tse, Milo Grillo dr. Liesbeth Janssen, prof. dr. ir. Paul van der Schoot

August 26, 2019 Abstract Particle systems with an interactive potential are widely used to model phenomena in fields such as physics and biology. Particles in these systems may be self-propelled, meaning that their motion is not only determined by the interacting, but also by another internal force. Self-propelled particles are known to self-organise under certain conditions. To understand their behaviour, we introduce the required mathematics to build a widely useable model. This includes a mathematical notion of and differential equations. Based on known equation of physics, a first model is built using a newly introduced adaptive potential based on the Morse potential. The model is shown to be well-posed. All particles in the model interact pairwise. Simulating such a model requires quadratic time, meaning computations will take very long for large systems. To reduce computation time, an ansatz is made about the mean field limit of the system. A simulation of the mean field requires only linear time. Using fixed point arguments, the ansatz is proven to be correct. The first and second model are equipped with several tools to quantify the self-organising behaviour of the particles. Both models are simulated and it was found that in system with more than 480 particles, there was no measurable difference between the models. The computation time of the first model was found to be quadratic, whereas the computation time of the second model was indeed linear. This led to the conclusion that large particle systems should be modeled in the mean field approximation, as it gives accurate results in little computation time. Contents

1 Introduction 1 1.1 Flow of the Report ...... 2 1.2 Notation ...... 2

2 Motility-Induced Phase Separation 4 2.1 Closed System ...... 4 2.2 Liquids and Gasses ...... 4 2.3 Liquid-Gas Phase Separation ...... 5

3 Stochastic Differential Equations 7 3.1 Basics of Measure and Integration Theory ...... 7 3.2 Wiener Process and ...... 10 3.3 Itô and Itô Formula ...... 11 3.4 Existence and Uniqueness ...... 14

4 Active Brownian Particle System 16 4.1 Brownian Particles ...... 16 4.2 System of Equations ...... 17 4.3 Solution of the SDE ...... 19

5 Measures and the Mean Field Limit 23 5.1 Empirical Measure ...... 23 5.2 Mean Field Measure ...... 25 5.3 Passing the limit ...... 29 5.4 Partial Differential Equation ...... 31 5.4.1 Stationary Solutions ...... 33 5.4.2 Free Energy ...... 34

6 Numerical Simulation Set-up 36 6.1 Approximations & Mean Field Simulation ...... 36 6.1.1 Histogram ...... 36 6.1.2 Convolution ...... 37 6.1.3 The Error Function ...... 40 6.2 Interacting Particle Simulation ...... 41 6.3 Analysis ...... 41 6.3.1 DBSCAN ...... 42 6.3.2 Flocking Scan ...... 43 6.3.3 Radial Distribution Function ...... 44

7 Simulation Results 45 7.1 First Reconnaissance ...... 45

i CONTENTS

7.1.1 Two Dimensional ...... 45 7.1.2 Reconnaissance in Other Dimensions ...... 48 7.2 DBSCAN - Radial Distribution Function ...... 48 7.3 Parameters for Clustering ...... 50 7.4 Run Time Improvement ...... 52

8 Conclusions 54

9 Discussion 56 9.1 Goals ...... 56 9.2 Process ...... 56 9.3 Further Research ...... 57

Bibliography 58

A Simulation Source Code 59 A.1 Simulation Set-Up ...... 59 A.2 Mean Field Simulation ...... 60 A.3 Interacting Particle Simulation ...... 60 A.4 Simulation Analysis ...... 62

ii Chapter 1

Introduction

Interactive particle systems are systems where local interacting behaviour determines global properties of the system. Such systems can be made in many fields, ranging from economics and social sciences to physics and chemistry. In different systems, particle may represent different entities. These can be clear physical entities such as humans or bacteria, but also more abstract concepts such as financial stocks. As particles interact with each other, the systems are generally very simple to model. The simplicity allows the system to be very adaptable. [For example, a system with N + 1 ∈ N particles is simply a system with N particles with an additional interacting particle.] Also by choosing the correct interaction, very complex situations can be realistically modeled.[1] Particle behaviour may not be fully deterministically dependent on the interacting, but may partially be dependent on some self-propelling behaviour.[2] Such particles are called active particles. Due to this self-propelling behaviour, systems may show different global behaviour.[3] For example, under certain conditions clusters of particles may form in systems in which particles repel another.[4] This is called motility induced phase separation (MIPS). As a result there are distinct high density and low density regions. In physical systems, clustering may be interpreted as a phase-separation.[3] Although interacting particle systems are very simple to model, the models can take a very long time to be numerically computed. For a particle system with N pairwise interacting par- ticles, models may have to execute a number of computations of the order N 2 per time step. Particularly for high quantity particle systems, this becomes a problem. Fortunately, there are possibilities to solve this. Rather than having particles interact with each other, the particles can interact with the distribution of all particles. Such an interaction is an approximation, which is called a mean field approximation. Under certain conditions, the mean field approximation will become more accurate for a larger number of particles and exact in the limit N → ∞. The computations are now of order N. This makes the approximation particularly interesting for high quantity particle systems. It must be noted that the mean field approximation cannot be used for models in which mi- croscopic observables regarding specific individual particles are of interest. However, mesoscopic observables, such as local density, can still be calculated from the mean field equation. This is often not an issue, as generally, the particles are identical. In such systems, the collective behaviour rather than the individual behaviour is interesting. As interacting particle systems are very prevalent in many areas of the sciences and in busi- ness, a general mean field model can be very useful. Currently, models to describe mean field approximated systems do exist[2], however there does not seem to be any model in which the

1 1.1 Flow of the Report number of dimensions is variable. A mean field model with variable number of dimensions could be widely deployed. Extra dimensions allow for models with a high complexity. In this report, a mean field model with variable dimensions will be presented. The model will be used to write an algorithm for simulation. The sturdiness of the algorithm will be shown by studying the clustering behaviour of interacting particles and MIPS in one, two, three and four dimensions. This will also be studied in the standard interacting particle system model. The results gathered by the models can then be compared. If the results are similar, it is shown that the mean field approximation is likely to be a good approximation to our interacting particle systems. This is a proof of concept of the mean field approximation. Further research may then be conducted to make conclusions regarding the MIPS. The mean field approximation can be interpreted as an infinite particle simulation. Much experimental and numerical research has been done on clustering in finite particle systems in many different circumstances. In order to study the clustering of particles, a specific type of interaction is required. This is attraction-repulsion interaction caused by an interaction potential. Although a specific interac- tion type is chosen, most Theorems and Lemmas are presented and proven for general models. This allows any reader to use those Theorems and Lemmas for other specific models. This report can still be used for systems, which cannot be modeled with an attraction-repulsion potential. However, some Lemmas similar to the Lemmas presented, are left to be proven by the reader.

1.1 Flow of the Report

This report uses some more advanced mathematical tools. These are mainly used in the proofs of the Theorems and Lemmas. The essentials to these tools are explained in chapter 3. This chapter gives the essentials to Measure Theory and . If a reader is unfamiliar with the mathematics, this chapter can be read. If a reader does not feel comfortable with, is not interested in or simply does not have the time to get familiar with the mathematics, it is possible to skip it. This can be done by simply not reading the mathematical proofs. Another possibility is to read only the relevant chapters. Figure 1.1 shows a chart which chapters may be relevant. The blue arrows can be followed to go more in depth to the physics. Similarly, if a reader is solely interested in the mathematics, they can follow the red lines in the chart. The black lines can be followed for just a bit of underlying context. Of course the report can also be read from chapter 1 to chapter 8.

Chapter 2 Section 4.1, 4.2 Chapter 6, 7 Chapter 8, 9

Chapter 1

Chapter 3 Section 4.3 Chapter 5 Section 7.1, 7.4

Figure 1.1: A flow chart showing how different sections and chapters in this report are connected.

1.2 Notation

In much of this report, stochastics are very relevant. To properly discuss stochastics, a probability space is formally required. In this report, an underlying probability space (Ω, F , P)

2 1.2 Notation is assumed. Whenever ω is written, it holds that ω ∈ Ω. The parameter d is the number of spatial dimensions of a system. This must not be confused with the d in dµ, when integrating over a measure. Occasionally, a unit will use d. In these cases, d is again the number of spatial dimensions of a system. For example md is given as a unit. In two dimensional space, this must be read as m2 and is thus a squared meter. In three dimensional space, it must be read as m3 and is thus a cubed meter. Anytime a volume is mentioned, it regards the generalized notion of volume rather than the standard three dimensional notion of volume. A volume in one dimension is length; a volume in two dimensions is surface; a volume in three dimensions is the classic notion of volume etc. On occasion, the abbreviation "iff" is used. This abbreviation means "if and only if". Any Theorem or Lemma without proof will have a reference with proof of the Theorem or Lemma. The proofs given in this report are all conducted by the author.

3 Chapter 2

Motility-Induced Phase Separation

2.1 Closed System

Self-propelled particles are a type of particle which move themselves forward without the need of external forces or interaction with other particles. The direction and amplitude of the velocity of the self-propelled movement can either be predetermined, entirely random or dependent on other outside factors. Examples of such particles include a flock of birds and micro-organisms. They move themselves forward by consuming energy that is outside of the system. This can e.g. be the energy generated via ATP in the process of photosynthesis[5]. In this way, active particles continuously put in new energy into the system. This means that any system with self-propelled particles are non-isolated systems. It is nevertheless possible to trap the particles in a confined or infinite space. By imposing this restriction, a closed system is created. In systems with self-propelling particles, the particles are generally referred to as active matter or active particles. The motile characteristic of the active particles implies that the dynamic of the system is irreversible. In general, the movement of the active particles caused by the motile characteristic, are seemingly random. The direction of the active movement, called the orientation of the particle, and also the Brownian movement due to other factor is non-deterministic. Most active particles do not just move by self-propelling themselves. Often, the particles do adhere to either an external potential, an interacting force between particles or both. Due to the self-propelling motion, active particles can show very different behaviour from the standard non-active particles.

2.2 Liquids and Gasses

On a microscopic scale, liquids and gasses are characterized by molecular behaviour[6]. At reasonably low temperature and pressure, the molecules in gasses behave significantly different compared to molecules in liquids. On the extreme end, there is the ideal gas. In an ideal gas, molecules move at high velocities and have no interaction with each other. As a consequence, no stable structures will form at all. Local densities may be high at some point in time, but this will always be very briefly. In practise, gasses are never ideal. Due to electromagnetic forces, two molecules will repel each other when very close to another. Distances between gas particles are large and there is much free space between two particles. Liquid molecules show more significant interaction. Liquid molecules are tightly packed. Par- ticles are still able to move relative to neighbouring particles, but if a particle in a liquid moves, other particles have to be pushed away. Similarly, when one particle slowly leaves the liquid,

4 2.3 Liquid-Gas Phase Separation it may pull along neighbouring particles. Liquid particles have negligible influence on other particles at significantly large distances. Liquid particles form clusters. These are structures with no clear or regular arrangement. As liquid molecules can move within a cluster, the shape of a cluster is not rigid. In fact, the shape of the clusters are very flexible and, if not confined by strict boundary conditions, will change over time. The characterization of liquids and gasses can be generalised. In the traditional sense, one can speak of liquids or gasses if and only if the relevant particles making up the liquid or gas are molecules. However, this requirement can be omitted for a more general notion of liquids and gasses. In this generalised notion, a group of any entity that can be represented as a particle with a position that evolves over time can form a liquid or a gas.

2.3 Liquid-Gas Phase Separation

Due to the continuous energy dissipation of active particles, an equilibrium cannot occur. However, the system of active matter can show different non-trivial quasi-equilibrium states. This is a state in which the system does not show any significant changes. Consider a system of spherical active interacting particles, with non-interacting orientations. This means that the orientation of one particle does not influence the orientation of any other particle. Such active particles have been observed to undergo liquid-gas phase separation[3], even when the interaction is purely repulsive. The liquid-gas phase separation is a system state with a non-uniform density. At some points, the density is very high and at others the density is significantly lower. The particles in the high density regions barely show movement and behave as liquid state particles. Similarly the particles in the low density regions have very little interaction with other particles and behave like gas state particles. Liquid-gas phase separation does not only occur for molecules, but something very similar can also be seen for many other active particles, such as a flock of birds[8]. In figure 2.1 a life flock of birds can be seen flying at high al- titude. The collection of these birds show two high density regions, one low density region and an empty surrounding. The high density region may be interpreted as a liquid. It is not hard to imagine such a high density region, where birds are all flying very close to each other. Each bird influences the trajectory of all neighbouring birds, very similar as to Figure 2.1: A visualization of how molecules in a liquid act. The low density region of liquid-gas phase separation in a birds can be compared to a gas state. These are all birds flock of birds.[7] Each black dot which fly on their own. Of course these birds are influenced represents a bird. by birds that would come close. The individually flying birds may also be following a nearby big crowd. Birds from the low density region may join a nearby flock and similarly, birds on the edge of the flock may separate. The fact that any particle, including birds, would form a flock, or rather a cluster, can be due to a combination of several general causes. Either there is an external potential driving all particles to a specific point. Another possibility is if there is an interactive potential which balances repulsion and attraction between particles. Such systems are significantly harder to model as each particle is dependent on the location of (all) other particles. In (quasi-)equilibrium, all particles would be packed together and for sufficiently high density, a crystal would be formed. A third cause would be if the particles are all active. As mentioned before, a true equilibrium

5 2.3 Liquid-Gas Phase Separation cannot form in such a system. This is due to the fact active particles continuously dissipate energy into the system. Systems with active particles with a repulsive interactive force in a quasi- equilibrium do show the liquid-gas separation. As this is caused by the activity of the particles, this kind of separation is often referred to as motility-induced phase separation (MIPS). Non- active particles in a similar system would not ever show this kind of behaviour, as the repulsive force between the particles would push the particles outwards and ensure a uniform distribution.

With a sufficiently high density, repulsive active particles do show the non-intuitive phase separation as follows. A small group of particles gets close to each other by chance due to the self-propelling motion they possess. They form a cluster. The repulsive force pushes the particles away from each other. However, the particles’ active velocity may still be pointed towards the centre of the cluster of particles. The active velocity causes the the particles not to be pushed away Local Density from each other. By chance, other particles may approach the cluster of particles from all sides. The first particles are now trapped and are pushed around in all direction. As the repulsive force works in all directions roughly equally on the Figure 2.2: A heat map central particle, these particle experience no repulsive force. visualisation of active particle As a result, the central particle is not pushed out anymore. system undergoing motility Of course there is still the active velocity of the particles, induced phase separation[3]. The which may try to have a particle escape the centre. The red color represents high local edge of the cluster is less stable. Particles from outside the density whereas white represents cluster approaching the edge will be pushed away. Again, due low local density. to the active velocity, the pushing takes some time. During this time, other particles may have too approached the edge, causing the edge particles to be pushed inside. Of course, it is also possible for edge particles to escape the cluster. The longevity of the cluster is all based on the balance of incoming and outgoing particles. Particle system may not show clustering as in figure 2.1. Clustering may also resemble air bubbles in a liquid as can be seen in figure 2.2.

6 Chapter 3

Stochastic Differential Equations

This chapter will mainly serve to introduce well studied concepts and already proven Theo- rems. Much of what is discussed will be used in later chapters for proofs. To properly understand the other chapters, it is crucial to understand the results of this chapter. We begin by giving a short introduction to measure theory, which underlies stochastic and . Then we will define noise mathematically. This definition will then be used to introduce the notion of stochastic differential equations alongside a method to solve such equations. The Itô integral, Itô formula and Itô process will be discussed in detail.

3.1 Basics of Measure and Integration Theory

Given a set Ω, a measure µ assigns a non-negative real number to certain subsets of Ω. This number can be interpreted as length, number of elements or even probability of a subset, depending on the situation. The subsets on which µ can work, are called measureable sets or events and are all elements of F . This F may be for instance the power set of Ω. It must at least hold that F is a σ-algebra, which means that ∅, Ω ∈ F , ∀A ∈ F ⇒ Ω\A ∈ F and ∞ ∀{Ai}i∈N ⊂ F : ∪i=1Ai ∈ F . The space (Ω, F ) is called measureable space. Now we can define measures. Definition 3.1.1. Let (Ω, F ) be a measurable space. A set function µ : F → [0, ∞] on (Ω, F ) is called a measure iff it satisfies the following properties: (i) µ(∅) = 0

(ii) µ is σ-additive, i.e. if Ai, i = 1, 2,... is a sequence of mutually disjoint elements of F , then ∞ ! ∞ [ X µ Ai = µ(Ai) (3.1.1) i=1 i=1

The triplet (Ω, F , µ) is now called a measure space. If we have that µ(Ω) = 1, then µ is called a probability measure and the triplet (Ω, F , µ) is called a probability space. Often P is used to denote probability measures. Besides probability measures, there are some other special types of measures. Let (Ω, F ) be a measurable space. There are the finite measures. These are all measures µ such that µ(Ω) < ∞. All probability measures are also finite measures. Then there are the σ-finite measures µ. These are measures such that there exists a set {Ai}i∈N of A ∈ µ(A ) < ∞ S A = Ω countably many i F with i and i∈N n . It is trivial to see that all finite measures are also σ-finite measures.

7 3.1 Basics of Measure and Integration Theory

Example 3.1.2. An example of a measure is the length measure on R. For any interval [a, b] with b > a, we then have µ([a, b]) = b − a. This measure is called the Lebesgue measure and is often noted as L . The Lebesgue measure is a σ-finite measure. Example 3.1.3. A much known example of a measure is the Dirac measure. Let Ω be a set and x ∈ Ω. Let 2Ω be the power set of Ω. For any A ∈ 2Ω, the dirac measure is then defined as ( 1 if x ∈ A δx(A) := (3.1.2) 0 if x∈ / A

The dirac measure is an example of a probability measure, as for any x ∈ Ω, it holds that δx(Ω) = 1. Measures can be used to define a new and more powerful way to do integration. To define the integral, called the Lebesgue integral, we first have to define simple functions. Definition 3.1.4. A function g :Ω → R is called a simple function iff it can be written as

N X g = aiIAi (3.1.3) i=1 for a positive integer N ∈ N, N disjoint sets A1,...,AN ∈ F , N constants a1, . . . , aN ∈ R and I the characteristic function. PN For a simple, non-negative function g = i=1 aiIAi , we define the Lebesgue integral of g with respect to the measure µ to be N Z X gdµ := aiµ(Ai) (3.1.4) Ω i=1 We can extend this to non-negative measurable functions. Definition 3.1.5 (Measurable functions). Let (Ω, F , µ) be a measure space. A mapping X : m m Ω → R is called an m-dimensional measureable function if for every subset B ∈ B(R ), it holds that the pre-image is a set in F , i.e. X−1(B) ∈ F . If (Ω, F , µ) is a probability space, m m then X is also called a random variable. Here B(R ) is the Borel σ Algebra[9] over R . We know that all continuous functions are measureable. Now let f :Ω → [0, ∞] be a non-negative measurable function. The integral of f over Ω with respect to µ is defined by Z Z  fdµ := sup dµ : g simple, 0 ≤ g ≤ f pointwise (3.1.5) Ω Ω

This definition can now again be extended to include (partially) negative valued functions. To + do this, we will split a function f :Ω → R into a positive and negative part, respectively f and f −. We do this as follows

f +(ω) : = max(f(ω), 0) f −(ω) : = − min(f(ω), 0)

Note that f = f + − f −. Now we define the Lebesgue integral of f with respect to µ by Z Z Z fdµ := f +dµ − f −dµ (3.1.6) Ω Ω Ω This is an intuitive definition of the Lebesgue integral of f, particularly given the following properties of the Lebesgue integral. Proposition 3.1.6. [9] Let f, g be two measurable functions such that the Lebesgue integral w.r.t µ of |f| and |g| is finite. Let λ ∈ R be a constant and let B ∈ F . Then it holds that

8 3.1 Basics of Measure and Integration Theory

(i) (absolute continuity) If B satisfies µ(B) = 0, then Z fdµ = 0 (3.1.7) B

(ii) (monotonicity) If f ≤ g pointwise, then Z Z fdµ ≤ gdµ (3.1.8) Ω Ω

(iii) (homogeneity) Z Z λ fdµ = (λf)dµ (3.1.9) Ω Ω (iv) (additivity) Z Z Z (f + g)dµ = fdµ + gdµ (3.1.10) Ω Ω Ω Example 3.1.7. Let f be a measurable function on Ω. Let x ∈ Ω and δx be the dirac measure. Then Z fdδx = f(x) (3.1.11) Ω

For probability spaces, we can note the Lebesgue integral by an expectation E. So for a probability space (Ω, F , P) and a measurable function f, we write Z E[f] := fdP (3.1.12) Ω The Riemann integral has an equivalent in terms of measure theory. It is constructed by the Lebesgue integral w.r.t. the Lebesgue measure. For nice functions f, it hold that Z Z R fdx = fdL (3.1.13) R where R is the standard Riemann integral and L is the Lebesgue measure. As integration over measures can be difficult to execute, it is nice to relate other measures to the Lebesgue measure. For this we introduce absolute continuity. Definition 3.1.8. Let (Ω, F ) be a measurable space and let µ and ν be two measures on (Ω, F ). If and only if for all A ∈ F it holds that µ(A) = 0 ⇒ ν(A) = 0 (3.1.14) we say that ν is absolutely continuous with respect to µ. We note this by ν << µ. This definition allows us to write the very powerful Theorem Radon-Nikodym Theorem Theorem 3.1.9 (Radon-Nikodym Theorem[9]). Let (Ω, F ) be a measureable space and let µ and ν be two σ-finite measures on (Ω, F ) such that ν << µ holds. Then there exists a µ-integrable dν function called the Radon-Nikodym derivative, denoted by dµ , such that dν ν = µ (3.1.15) dµ This means that for all A ∈ F , it holds that Z dν ν(A) = dµ (3.1.16) A dµ

Now note that the Lebesgue measure is a σ-finite measure. This implies that the Radon- Nikodym Theorem allows us to write any measure that is absolutely continuous w.r.t the Lebesgue measure as a function times the Lebesgue measure.

9 3.2 Wiener Process and White Noise

3.2 Wiener Process and White Noise

Consider a simple mathematical model given by d Xt = b(t, Xt) + σ(t, Xt) · Wt, b, σ, Xt ∈ (3.2.1) dt R where Wt is a random "white noise" term. To properly work with such models, the concept of random variables must be mathematically introduced.

Definition 3.2.1 (Random Variable). Let (Ω, F , P) be a probability space. A mapping X : m m Ω → R is called an m-dimensional random variable if for every subset B ∈ B(R ), it holds that the preimage is a set in F , i.e. X−1(B) ∈ F . Definition 3.2.2 (). A collection {Xt|t ≥ 0} of random variables is called a stochastic process. Stochastic processes can be seen as the evolution of a random variable over time. As the random variable in a stochastic process can change over time, noise can be modeled mathemat- ically. An important type of stochastic variable related to noise in the Martingale.

Definition 3.2.3. Let {Mt|t ≥ 0} be a stochastic process such that ∀t : E[|Mt|] < ∞ and ∀s ≤ t : E[Mt|Ms] = Ms. Then this stochastic process is called a Martingale. In other words, the expectation of a Martingale at time t, given the Martingale at time s ≤ t, is the Martingale at time s. Let us now define a particularly interesting Martingale, known as Wiener Process, which will give a better understanding of white noise.

Definition 3.2.4 (Wiener process/Brownian motion). Let {Bt|t ≥ 0} be a stochastic process. This process is called a Wiener process (also Brownian motion) if the following conditions hold:

(i) B0 = 0 a.s., this means P[B0 = 0] = 1,

(ii) Bt has s.t. Bt − Bs ∼ N (0, t − s) for 0 ≤ s < t,

(iii) The map t 7→ Bt is almost surely continuous everywhere. Remark 3.2.5. By default, Bt is a 1-dimensional random variable. This can be generalized to ˜ 1 n i n-dimensions by considering Bt = (Bt ,...,Bt ), where Bt is a 1-dimensional Wiener Process. Remark 3.2.6. Due to the fact that Bt ∼ N (0, t), the Wiener Process is invariant to time 1 scaling, i.e. let Bt be a Wiener Process, then Yt = a Ba2t is also a Wiener Process for any a > 0. Remark 3.2.7. Anytime Bt is used in this report, it refers to the Wiener process.

The Wiener Process has the nice properties that E[Bt] = 0 and V ar(Bt) = t. This follows directly from the second condition of the definition, because Bt = Bt − B0 ∼ N (0, t). However, the Wiener Process is almost surely never differentiable.

Theorem 3.2.8. Let (Ω, F, P) be a probability space and let {Bt|t ≥ 0} be a Wiener process. Then almost surely, t 7→ Bt is nowhere differentiable w.r.t. t.

Proof. We want to show that any event s.t. t 7→ Bt is differentiable in t0 has a probability of zero. Suppose ∃t0 ∈ [0, 1) s.t. |B − B | lim sup t0+h t0 < ∞ h→0 h

10 3.3 Itô Integral and Itô Formula

i.e. Bt is differentiable in t0. Then due to the boundedness of Bt, there exists a finite M s.t.

|Bt +h − Bt | sup 0 0 ≤ M (3.2.2) h∈(0,1) h

n n n Now fix M. Choose n > 2 and k s.t. t0 ∈ [(k − 1)/2 , k/2 ] and 1 ≤ k ≤ 2 − 3, then by the triangle equality

n |B(k+j)/2n − B(k+j−1)/2n | ≤ |B(k+j)/2n − Bt0 | + |Bt0 − B(k+j−1)/2n | ≤ M(2j + 1)/2 for all j ∈ [1, 2n − k]. We now define the events

n An,k = {|B(k+j)/2n − B(k+j−1)/2n | ≤ M(2j + 1)/2 for j = 1, 2, 3}

Then by the properties of the Wiener process and the standard distribution,

3 Y n P[An,k] = P[|B(k+j)/2n − B(k+j−1)/2n | ≤ M(2j + 1)/2 ] j=1 −n/2 3 −n/2 3 ≤ P[|B1| ≤ 7M2 ] ≤ (7M2 ) .

Now we take the k-union of all events and see

2n−3 n −n/2 3 3 −n/2 P[∪k=1 An,k] ≤ 2 (7M2 ) = (7 ∗ M) ∗ 2

P∞ 2n−3 Note that n=1 P[∪k=1 An,k] < ∞. Thus by the Borel-Cantelli Lemma, we have

2n−3 P[{ω ∈ ∪k=1 An,k for infinitely many n}] = 0

So the probability of a t0 to exist s.t. equation 3.2.2 holds, is zero and thereby t 7→ Bt is a.s. not differentiable in [0, 1). Thus by the time scaling invariance property (remark 3.2.6), t 7→ Bt is a.s. nowhere differentiable.

Let us now again consider the model given in equation 3.2.1, in integral form given by Z t Z t Xt = X0 + b(t, Xt)dt + σ(t, Xt)Wtdt (3.2.3) 0 0

The random "white noise" term Wt can be considered as the time derivative of the Wiener Process B˙ t. This makes sense when considering the properties of Wiener Process. However, the map t 7→ Bt is nowhere differentiable. However, when writing B˙ tdt = dBt, the time derivative of Wiener Process is not used. In differential form, we end up with the equation

dXt = b(t, Xt)dt + σ(t, Xt)dBt (3.2.4) which is known as a Stochastic Differential Equation (SDE). Note however that to solve this, we must integrate a stochastic process over Wiener Process.

3.3 Itô Integral and Itô Formula

To make sense of an integral over the Wiener process, we will define a new integral, called the Itô Integral

11 3.3 Itô Integral and Itô Formula

Definition 3.3.1 (Itô Integral for elementary functions). Let φ be a measurable elementary P 1 1 function, i.e. φ can be written as φ(t, ω) = j ej(ω) [tj ,tj+1](t), with the characteristic R T 2 function and with E[ S φ(t, ω) dt] < ∞. Then the Itô integral is defined by

Z T X φ(t, ω)dBt := ej(ω)[Btj+1 − Btj ] (3.3.1) S j

R T 2 Definition 3.3.2 (Itô Integral). Let f be a measurable function s.t E[ S f(t, ω) dt] < ∞. Let {φn} be a sequence of elementary functions s.t.

Z T  2 E (f(t, ω) − φn(t, ω)) dt → 0, as n → ∞ (3.3.2) S Then the Itô integral of f is given by Z T Z T 2 f(t, ω)dBt(ω) := lim φn(t, ω)dBt(ω), limit in L sense (3.3.3) S n→∞ S

Remark 3.3.3. Note that the such sequences {φn} to satisfy 3.3.2 exists for any given f. Furthermore the limit in 3.3.3 always exists independently of the choice of {φn}. This is discussed in more detail in [2, p21-29]. The Itô integral is linear and has some other nice properties. It satisfies Z T  E fdBt = 0 (3.3.4) 0 and we have Itô isometry: "Z T 2# Z T  2 E fdBt = E f dt (3.3.5) S S

A notion of integration w.r.t. the Wiener process is defined and several properties have been deduced. However, it is currently not easy to solve Itô . What is for example the integral Z t I = BsdBs? (3.3.6) 0 To solve such integrals, an important formula known as the chain rule for stochastic processes, exists. To introduce this, we first define a special type of stochastic processes. Definition 3.3.4 (Itô process). Let {Xt|t ≥ 0} be a stochastic process. This process is an Itô process if it can be written in the form Z t Z t Xt = X0 + b(s, ω)ds + σ(s, ω)dt (3.3.7) 0 0 with σ s.t. Z t  2 P σ(s, ω) ds < ∞ for all t ≥ 0 = 1 (3.3.8) 0 Equation 3.3.7 is often written in the shorter differential form

dXt = bdt + σdBt (3.3.9)

The solution to equation 3.2.1 is an example of an Itô process. We are now ready to introduce the formula.

12 3.3 Itô Integral and Itô Formula

Theorem 3.3.5 (The 1-dimensional Itô formula). Let {Xt|t ∈ [0,T ]} be an Itô process given by

dXt = bdt + σdBt 2 Let φ(t, x) ∈ C ([0, ∞) × R) (i.e. f is twice continuously differentiable on [0, ∞) × R). Then

Yt := φ(t, Xt) is again an Itô process and 2 ∂φ ∂φ 1 ∂ φ 2 dYt = (t, Xt)dt + (t, Xt)dXt + (t, Xt) · (dXt) (3.3.10) ∂t ∂x 2 ∂x2 with dt · dt = dt · dBt = dBt · dt = 0, dBt · dBt = dt (3.3.11)

The Itô formula is inherently different from the ordinary chain rule and it allows us to solve all sorts of integrals. Let us demonstrate this by looking at the integral 3.3.6 Example 3.3.6. We have the integral Z t I = BsdBs 0

From a Riemann integration perspective, one would be tempted to make the substitution x = Bs 1 2 and one would find I = 2 Bt . However, we will see that this is not the full answer. Choose 1 2 Xt = Bt and φ(t, x) = 2 x . This way Xt is an Itô process and f is twice differentiable. Then we have 1 Y = B2 t 2 t and by Itô’s formula find 1 ∂φ ∂φ 1 ∂2φ 1 d( B2) = dY = dt + dB + · (dB )2 = B dB + dt 2 t t ∂t ∂x t 2 ∂x2 t t t 2 and thus 1 1 B dB = d( B2) − dt t t 2 t 2 And therefore Z t Z t Z t 1 2 1 1 2 1 I = BsdBs = d( Bs ) − ds = Bt − t 0 0 2 2 0 2 2

The Itô formula can be generalized to work in multiple dimensions. This can be useful when we have a system in the form  dX1 = b1dt + σ11dB1 + ··· + σ1mdBm  . + .  dXn = bndt + σn1dB1 + ··· + σnmdBm or in matrix form dXt = bdt + σdBt, (3.3.12) which is known as an n-dimensional Itô process. Theorem 3.3.7 (The general Itô formula [2]). Let Xt be an n-dimensional Itô process as in 2 n p 3.3.12. Let φ(t, x) = (φ1(t, x), ··· , φp(t, x)) be a C map from [0, ∞) × R into R . Then the process Yt = φ(t, Xt) is again an Itô process, whose component under number k is given by 2 ∂φk X ∂φk 1 X ∂ φk dYk = (t, Xt)dt + (t, Xt)dXi + (t, Xt)dXidXj (3.3.13) ∂t ∂x 2 ∂x , ∂x i i i,j i j where the convention holds that dBidBj = δijdt, dBidt = dtdBi = dtdt = 0.

13 3.4 Existence and Uniqueness

Besides solving integrals, we can now also define a Wiener process with constraints. Two useful examples of the Wiener process are the Wiener process on the unit-circle and the Wiener process on the m-sphere. Theorem 3.3.8 (Wiener process on the Unit Circle). The process Y = (Y1,Y2) defined by

1 0 −1 dYt = − Ytdt + KYtdBt,K = (3.3.14) 2 1 0 is an Itô process, which could be considered the Wiener process on the unit circle.

Proof. To see why Yt would be confined to the unit circle, is fairly straight forward. Choose Xt = Bt and 2 f(t, x) = (cos x, sin x) ∈ R

Yt = φ(t, Xt) = (cos Bt, sin Bt) is again an Itô process, which satisfies

( 1 dY1 = − sin(Bt)dBt − 2 cos(Bt)dt 1 dY2 = cos(Bt)dBt − 2 sin(Bt)dt From which follows the result.

There is also the Wiener process on the m-sphere. Theorem 3.3.9 (Wiener process on a unit m-sphere [2]). The m-dimensional process Y = (Y1, ··· ,Ym) with m ∈ N, defined by

dYt = b(Yt)dt + σ(Yt)dBt (3.3.15) where   y1 m − 1 b(y) = − ·  .  ∈ m 2  .  R ym and m×m σ = [σij] ∈ R , σi,j(y) = δij − yiyj; 1 ≤ i, j ≤ m is an Itô process, which could be considered the Wiener process on the unit m-sphere. We can write this as m − 1 T dYt = − Yt + (Im − YtY ) · dBt (3.3.16) 2 t T where Im is the m-identity matrix. Note that YtYt is an m×m-matrix. This can also be written as Yt ⊗ Yt. As we see, we need an m-dimensional Wiener process for a Wiener process on an m-sphere. In fact, for any m ≥ 2, the constraint of the sphere allows us to define a Wiener process on the m-sphere with only an m − 1-dimensional Wiener process. This has been done for the special two dimensional case. However, there is no general method to do this in m dimensions. Thus Theorem 3.3.9 is provided.

3.4 Existence and Uniqueness

Suppose we are given an SDE such as equation 3.2.1. How do we know whether a solution exists? For ordinary differential equations (so σ ≡ 0), we know a unique solution exists if b is continuous differentiable.[10, Theorem 2.8.1] It would be nice if a similar Theorem exists for SDEs. It turns out such a Theorem does exist, but before this Theorem is given, we need to

14 3.4 Existence and Uniqueness define what a solution is and what uniqueness means. We start with defining what a solution is. It turns out many possible different definitions exists, which all have somewhat different meanings. We will work with only one, often used, definition, commonly known as the Strong Solution. Definition 3.4.1 (Strong Solution). Given a Wiener process Bt, a strong solution of the stochas- tic differential equation of the form 3.2.4 with initial condition X0 is an Itô process Xt with continuous paths s.t. ∀t ≥ 0 Z t Z t Xt = X0 + b(s, Xs)ds + σ(s, Xs)dBs a.s. (3.4.1) 0 0

With the definition of a solution, we are ready to define what it means for a solution to be unique. Definition 3.4.2 (Uniqueness). Given a stochastic differential equation of the form 3.2.4, which has at least one strong solution Xt. This solution is unique, iff for any other strong solution Yt it holds that ∀t ≥ 0 : Yt = Xt a.s. This definition of uniqueness is a fairly intuitive definition. With a notion of solutions and a notion of uniqueness, we can state the aforemeantioned Theorem. Theorem 3.4.3 (Existence and uniqueness Theorem for stochastic differential equations[2]). n n n n×m Let T > 0 and b(·, ·) : [0,T ] × R 7→ R , σ(·, ·) : [0,T ] × R 7→ R be measurable functions satisfying n |b(t, x)| + |σ(t, x)| ≤ C(1 + |x|); x ∈ R , t ∈ [0,T ] (3.4.2) P for some constant C ∈ R, (where |σ| := |σij|) and s.t.

n |b(t, x) − b(t, y)| + |σ(t, x) − σ(t, y)| ≤ D|x − y|; x, y ∈ R , t ∈ [0,T ] (3.4.3) for some constant D ∈ R (Lipschitz continuity). Let Z be a random variable which is independent (m) of the σ-algebra F∞ generated by {Bs(·), s ≥ 0} and s.t.

2 E[|Z |] < ∞ (3.4.4)

Then the stochastic differential equation

dXt = b(t, Xt)dt + σ(t, Xt)dBt, 0 ≤ t ≤ T,X0 = Z (3.4.5) has a unique t-continous solution Xt(ω) with the property that

Z T  2 E |Xt| dt < ∞ (3.4.6) 0

15 Chapter 4

Active Brownian Particle System

Having a small list of Theorems ready, we are going to discuss the physical phenomenon of Brownian motion and propose a system of equations to model this. We will then try to apply the Theorems to find the existence of a unique solution to the system of equations.

4.1 Brownian Particles

Imagine a system of (spherical) particles. This can be anything from a gas, to a group of emperor penguins. Consider one of these particles in the system. This particle will undergo Brownian motion due to impact with other (nearby) particles in the system. This impact causes a driving force to work on top of all other working forces on the particle. The random force is particularly significant in systems with fewer constraints such as liquids (as opposed to solids). It turns out this force can be accurately described by the Wiener process. The argumentation for this will follow in section 4.2. These particles are known as Wiener particles, or more commonly as Brownian particles. Active particles also have a set velocity in a random direction. Examples of such particles are active emulsions, Janus particles, bacteria and a school of fish.[3] These particles are known as active Brownian particles. The force causing the random velocity is called an active force. This force always corresponds with process of turning (internal) energy into autonomous motion. For example, this energy is chemical energy for a school of fish. Besides the motion caused by the random force, the Brownian particles may also experience deterministic forces. These can be categorised into external and internal forces. External forces are forces caused by some external factor, such as gravity or drag. Internal forces are caused by some interaction between particles within the system. This interaction may be described by a pairwise interaction potential. When the interaction may be described by a pairwise interaction potential, the interactive force is generally repulsive when two particles are close and attractive when two particles are far from another. The internal forces prefer two particles to have a set distance re from another. This distance is called the equilibrium distance, as the repulsive and attractive parts of the interactive force are equal. In other terms, when two particles are at equilibrium distance from another, the interaction potential between said particles is at a minimum. In the example of the group of emperor penguins, this can easily be visualised as follows. When the distance between the penguins is too large, the group loses too much heat, but when they are too close to each other, they lose mobility.

16 4.2 System of Equations

4.2 System of Equations

We are now ready to construct the system of equations for an d dimensional N particle system. We have discussed the different types of forces which act on a single active Brownian particle. By the second law of Newton, we know that the sum of all these forces is equal to the acceleration of the particle i times the mass, with i ∈ N, i ≤ N. With the forces we use in our system, that leaves us with

2 i ∂ Rt m = Fext + Fint + Fdrag + Frandom + Factive (4.2.1) ∂t2

i d Note that the position of particle i, Rt ∈ R is a random variable as there are two random forces. We will now determine the forces explicitly and make some assumptions to further simplify our set of equations. The first force to be discussed is the internal interactive force. As mentioned above, this force must be repulsive for particles close by and attractive for particles far away from each other. Preferably, we have a force, which is continuous w.r.t. the pairwise distance and which shows no singularities. A good and much used force is the force induced by the Morse potential, given by ij ij ij Uint(rt ) = De(exp(−2a(rt − re)) − 2 exp(−a(rt − re)) ij ij i j where the variable rt is the distance between two particles i and j at time t i.e. rt := (|Rt−Rt |), De is the depth of the potential, known as the dissociation energy and a is a parameter which controls the width of the potential. The parameter re can be interpreted as the size of a particle. For reasons which will become clear later, we will use a slight adaption of this potential, given by ij ij 2 2 ij 2 2 Uint(rt ) = Dr exp(−2a((rt ) − re )) − 2Da exp(−a((rt ) − re ) where Dr ≥ 0 is a repulsion factor and Da ≥ 0 is an attraction factor between any two particles. This potential appears to be previously unused. The potential will be referred to as the modified Morse potential. By construction it is clear that this potential is very similar to Morse potential. The depth parameter De is traded for two separate parameters, such that the attraction and repulsion can be managed separately. However, the difference lies primarily in the quadratic terms. Both potentials are plotted in figure 4.1. Here it can be seen that the modified Morse

(a) The Morse potential plotted. (b) The modified Morse potential plotted.

Figure 4.1: Two potentials plotted with parameters Da = Dr = De = re = a = 1 in Wolfram Mathematica. potential is stricter around r = re and nearly negligible from r > re compared to the Morse potential. Note that while the Morse potential look like a harmonic oscillator potential around

17 4.2 System of Equations

2 r = re up to a constant (Uharm(r) = (r − re) ), the modified Morse potential look like an up- 2 scaled harmonic oscillator potential around r = re up to a constant (Uharm(r) = 4(r − re) ).

Of course, it is possible to scale the repulsion or the attraction part of the potential individu- ally. To get an overview of how the two parts behave individually, the parts are plotted in figure 4.2. It is clear that for unit parameters, the repulsion is about one and a half times stronger in the origin, but it also loses its strength much faster than the attraction.

Figure 4.2: The two individual parts of the modified Morse potential plotted with all parameters equal to unity with Da = Dr = De.

Given the pairwise potential Uint, the force by particle j on particle i is given by Fij = ij ∇iUint(rt ) and thus the total interactive force on particle i is given by

1 X ij Fint = ∇iU, U = Uint(r ) (4.2.2) N t j6=i

As the particle is traveling through a medium, there is yet another force working on the particle, namely the drag force. This force will always reduce the velocity of the particle. The drag force is given by i dRt Fdrag = −γ (4.2.3) dt where γ is a parameter known as the drag parameter. The medium does not only cause a drag force, but by random interactions between the particle and the medium, it also causes a random force. This force is a white noise, given by

Frand = αWt, E[Wt] = 0, E[WtW0] = δ(t) (4.2.4)

√where α ∈ R is a constant and δ is the Kronecker delta function. Often α is given by α = 2γkBT . Now the particles are not just have Brownian particles, but the particles are active Brownian particles. This means there is also an force caused by velocity in a random direction. This force is given by Factive = γνYt (4.2.5) d where Yt ∈ R is a unit vector in the direction of the self-propelling component of the velocity of the active particle at time t and ν ∈ R is the Euclidean size of the self-propelling component of the velocity which is set equal for all active particles in this system.

18 4.3 Solution of the SDE

By assuming any external force is negligible compared to the internal force, we can combine equation 4.2.1 to 4.2.5 to find ∂2Ri dRi m t = ∇ U − γ t + γνY i + αW i ∂t2 i dt t t if we further assume that we can neglect inertia, then we can reduce the equation of motion to

i dRt i i γ = ∇iU + γνY + αW (4.2.6) dt t t This equation is a first order differential equation. Similar to the differential equation 3.2.1, there is a white noise term. This means we cannot directly find a solution for 4.2.6. First, we will have to rewrite it such that it can be interpreted as an Itô process. To do this, we first define dN Rt := (R1,...RN ) ∈ R . Now we will write the equation in integral form, which is given by Z t Z t Z t i i 1 i α i Rt = R0 + ∇iU(R)ds + νYt ds + Wsds (4.2.7) 0 γ 0 0 γ

i i i Again we use Wsds = dBs, where Bs is an d-dimensional Wiener process. i We know Yt is a unit vector in a random direction. This can be approached as a Wiener process i on a unit d-sphere. By Theorem 3.3.9, this means Yt is given by d − 1 dY i = − Y i + (I − Y i ⊗ Y i) · dBˆi (4.2.8) t 2 t t t t i with I the d-dimensional identity matrix and with Bt a d-dimensional Wiener process. This means we can write the system of equations as

( i  1 i α i dRt = ∇iU(Rt) + νYt dt + dBt γ γ (4.2.9) i d−1 i i i ˆi dYt = − 2 Yt + (I − Yt ⊗ Yt ) · dBt

1 N dN ˆ ˆ1 ˆN By defining Yt := (Yt ,...,Yt ) ∈ R and Bt = (Bt ,..., Bt ) an dN-dimensional Wiener process, the system of equations can be even further reduced to

(  1  α dRt = ∇U(Rt) + νYt dt + dBt γ γ (4.2.10) dYt = ¯b(Yt)dt +σ ¯(Yt)dBˆt

¯ d−1 1 d−1 N 1 1 with b(Yt) := (− 2 Yt ,..., − 2 Yt ) and with σ¯ defined as diag(¯σ(Yt)) = (I −Yt ⊗Yt ,...,I − N N Yt ⊗ Yt ) and σ¯i,j = 0 for i 6= j.

4.3 Solution of the SDE

Given the system of equations, we want to prove a solution to this system exists. This can be done using Theorem 3.4.3. For this, we would need an SDE in the form dXt = b(t, Xt)dt + 2dN σ(t, Xt)dBt. One would expect to then define Xt = (Rt,Yt) ∈ R and choose the functions b and σ appropriately. Then certain properties for b and σ could be proven. Fortunately, this is i d not entirely necessary. All Yt ∈ R are defined to be independent Wiener processes on the unit i i d-sphere. By Theorem 3.3.9, all Yt are Itô processes and so they exist. The existence of Yt is independent of Rt and thus Yt is fully independent of Rt. Given the fact that Yt exists, we can reduce the system of equations to a compact  1  α dRt = ∇U(Rt) + νYt dt + dBt (4.3.1) γ γ

19 4.3 Solution of the SDE

 1  α We can now define b(t, Xt) = γ ∇U(Rt) + νYt and σ(t, Xt) = γ ·I, with I the identity matrix. Now we are ready to prove a solution of the SDE exists. We do this by proving all conditions of Theorem 3.4.3 individually for our defined b and σ. Lemma 4.3.1. For the defined functions b and σ, it holds that for some constant C ∈ R

|b(t, x)| + |σ(t, x)| ≤ C(1 + |x|) (4.3.2)

dN for all x ∈ R and t ∈ [0,T ]. Pn n Remark 4.3.2. We use the L1 norm, i.e. |x| = i |xi|, ∀x ∈ R . The norm can be chosen n freely as R is finite dimensional and thus all norm are equivalent. The L1 norm is chosen for ease of calculation.

Proof. This proof has two parts. First we will prove |σ(t, x)| to be less or equal to something and we will then prove the same thing for |b(t, x)|. dN Given any t ∈ [0,T ] and x ∈ R , we simply evaluate

α α α |σ(t, x)| = I = |I| =≤ dN γ γ γ

Now we continue for |b(t, x)|, with

1 1 |b(t, x)| = ∇U(x) + νY ≤ ∇U(x) + |νY | γ γ

For the right term, we know that for all i, Yi is a unit vector as it is the Wiener process on a unit sphere. Therefore it holds that |Yi| = 1 and

N X |νY | = |νYi| = νN i=1

For the left term, we need to explicitly know ∇U(x). For this we will approach ∇U(x) as a vector. We chose

ij ij 2 2 ij 2 2 Uint(rt ) = Dr exp(−2a((rt ) − re )) − 2Da exp(−a((rt ) − re ) which gives us

N 1 X ∇ U(x) = ∇ U (x − x ) i N i int i j j6=i N 1 X = 4a · [x − x ] · −D exp (−2a([x − x ]2 − r2)) + D exp (−a([x − x ]2 − r2)) N i j r i j e a i j e j6=i

The term between the rightmost [ ]-brackets is bounded. This can be seen by the fact that ∇iU(x) is differentiable everywhere and that

 2 2 2 2  lim −Dr exp (−2a([xi − xj] − re )) + Da exp (−a([xi − xj] − re )) |xi|→∞  2 2 2 2  = lim −Dr exp (−2a([xi − xj] − re )) + Da exp (−a([xi − xj] − re )) |xj |→∞

= lim −Dr exp (−z) + Da exp (−z) = 0 z→∞

20 4.3 Solution of the SDE

So there is an M > 0, s.t. X X |∇iU(x)| ≤ | M[xi − xj]| ≤ M (|xi| + |xj|) j6=i j6=i N N X X = M(N − 2)|xi| + M |xj| ≤ M(N − 1) |xj| j=1 j=1 = M(N − 1)|x|

α M(N−1) Now choose C = γ + νN + γ . Then it follows M(N − 1) α |b(t, x)| + |σ(t, x)| ≤ |x| + + νN ≤ C(1 + |x|) γ γ

For Theorem 3.4.3 to work, we also require Lipschitz continuity of b and σ in the second argument. Lemma 4.3.3. The defined functions b and σ are Lipschitz continuous in the second argument, i.e. it holds that there is a constant D > 0, s.t.

|b(t, x) − b(t, y)| + |σ(t, x) − σ(t, y)| ≤ D|x − y|;

dN for all x, y ∈ R and t ∈ [0,T ].

dN Proof. Let t ∈ [0,T ] and x, y ∈ R be fixed. As σ is constant, it holds that |σ(t, x)−σ(t, y)| = 0. For b we evaluate

1 1 1 1 |b(t, x) − b(t, y)| = ∇U(x) + νYt − ∇U(x) − νYt = ∇U(x) − ∇U(x) γ γ γ γ

This means that the Lipschitz continuity for ∇U proves the Lemma. To prove the Lipschitz continuity for ∇U, we will look at it as a vector. By the Mean Value Theorem[11][p. 356] for multi-variable functions, we know that

∃c ∈ (0, 1) : |∇U(x) − ∇U(y) ≤ M|(y − x)|

PN with M = i=1 |∇∇iU((1 − c)x + cy)|. We will now prove that M is bounded. We know that

N N N X X X M = |∇∇iU((1 − c)x + cy)| ≤ |∇k∇iU((1 − c)x + cy)| i=1 k=1 i=1

dN For any z ∈ R , it holds that 1 X ∇ ∇ U(z) = ∇ ∇ U (z − z ) k i 2 k i int i j j6=i 1 = ∇ ∇ U (z − z ) 2 k i int i k 2 2 2 2 = 2a[Dr exp (−2a([zi − zk] − re )) − Da exp (−a([zi − xk] − re ))+ 2 2 2 2 2 a[zi − zk] (−4Dr exp (−2a([zi − zk] − re )) + 2Da exp (−a([zi − zk] − re )))]

It is clear to see that lim ∇k∇iU(z) = 0 |zi|→∞

21 4.3 Solution of the SDE

dN which means that there is a D ∈ R, s.t. |∇k∇iU(w)| ≤ D for all w ∈ R . Similarly we find for k = i that 1 X ∇ ∇ U(z) = ∇ ∇ U (z − z ) i i 2 i i int i j j6=i 2 2 2 2 = −2a[Dr exp (−2a([zi − zk] − re )) − Da exp (−a([zi − xk] − re ))+ 2 2 2 2 2 a[zi − zk] (−4Dr exp (−2a([zi − zk] − re )) + 2Da exp (−a([zi − zk] − re )))] which we know to be bounded by D analogously to above. Thus we conclude

N N N N X X X X 2 M ≤ |∇k∇iU((1 − c)x + cy)| ≤ D ≤ N D k=1 i=1 k=1 i=1 which proves the Lemma. Remark 4.3.4. Note that the given Lipschitz continuity arguments works for the modified Morse potential, but the same arguments would not have worked for the Morse potential. We are now able to prove the existence and uniqueness of a solution to our system of equations.  1  α Theorem 4.3.5 (Existence and Uniqueness). Let dRt = γ ∇U(Rt) + νYt dt + γ dBt for 0 ≤ 2 t ≤ T be a stochastic differential equation. Let the initial condition R0 = Z be, s.t. E[|Z| ] < ∞. Then the stochastic differential equation has a t-continuous (strong) solution Rt with the property hR T 2 i that E 0 |Rt| dt

Proof. Define b and σ as above. Now we can write the SDE as dRt = b(t, Rt)dt + σ(t, Xt)dBt. Both b and σ are measureable functions, as they are continuous. From Lemma 4.3.1, Lemma 4.3.3 and Theorem 3.4.3, it follows that the Theorem holds.

22 Chapter 5

Measures and the Mean Field Limit

Now that we have proven that a solution to the SDE exists, we are able to find some properties of our collection of N Brownian particles as a whole. In this chapter we will introduce some concepts of measure theory necessary to understand the rest of the chapter. Then we will investigate the system of equations by considering the Dirac measure of a path (Ri,Y i) on the space of all paths. Furthermore, we will expand the system by taking the limit of N to infinity. This results in a mesoscopic description of the system, called the Mean Field limit. Then we will try to find an appropriate and relevant Partial Differential Equation (PDE) in distribution. Finally we evaluate stationary solutions of this PDE.

5.1 Empirical Measure

Having proven the existence of a solution to the SDE, we now turn to the problem of describing the collection of the Brownian particles as a whole, rather than describing the movement of each individual particle. To do this, we first need to make a clear distinction between several concepts. By Theorem 4.3.5, we have proven for any particle i ∈ N≤N and for all t ∈ [0,T ], the points i i i (Rt,Yt ) =: Xt exist. The collection of points for all possible t, also exists and is by definition i i i i i i i (R ,Y ) := ({(Rt| 0 ≤ t ≤ T }, {(Yt | 0 ≤ t ≤ T }). Now X := (R ,Y ) called the path of particle i. Similarly, X := (X1,...,Xn) = (R1,Y 1,...,RN ,Y N ) is the collection of paths. A subscript t notes the path evaluated at time t, i.e. the point of the particle(s) at time t. Recall that both Ri and Y i are stochastic processes. This means that by definition, there is a probability space (Ω, F , P) on which the stochastic processes and the respective random variables act. For every ω ∈ Ω, we get a new collection of paths. One path for every particle. In layman’s term, every time we roll a dice, we get a new path for every particle. Now we fix ω ∈ Ω. This gives us a collection of paths X. Note that every path Xi is now a continuous i 2d function mapping time to a 2d-dimensional real space, i.e. X ∈ C([0,T ]; R ). We call the 2d space of such functions the path-space or Γ-space and write Γ := C([0,T ]; R ). N 2d Now consider the probability measure µt ∈ P(R ), defined by

N N 1 X µt := δ i (5.1.1) N Xt i=1

1 N where δ is the Dirac measure on Γ. The N term serves as a normalisation factor to ensure µt N is a probability measure for any N ∈ N+. The measure µt is called the empirical measure. For 2d N any set A ∈ B(R ), µt (A) returns the ratio of points of the N particles in A on time t. On first sight, this measure does not seem to be particularly interesting. It would be curious to see how

23 5.1 Empirical Measure the measure behaves as a function of time. The path to this is not straightforward. We begin by N considering integration over the measure µt . Let φ be a fixed twice continuously differentiable 2d function mapping R to R. Why this function must be twice continuously differentiable will become clear later. We evaluate the integral

Z Z N ! N N 1 X 1 X i φdµt = φd δXi = φ(Xt ) (5.1.2) 2d N 2d t N R R i=1 i=1

i So we find the integral is simply equal to the sum of the function φ evaluated at all points Xt . Now it would be in our interest to take the time derivative of this integral. Unfortunately, this i cannot be done directly due to the presence of implicit Wiener process in the definition of Xt . To solve this complication, Itô calculus will serve to be helpful. Similar to the previous chapters, we use differential notation.

mN Proposition 5.1.1. Let Xt ∈ R , m, N ∈ N be an Itô process and a collection of N points, defined for the i-th component by

i ¯ i N i i dXt = b(Xt , µt )dt +σ ¯(Xt ) · dBt (5.1.3)

¯ m m m m m×m i with b: R × P(R ) → R , σ¯ = [¯σij]: R → R , Bt an m-dimensional Wiener Process N 1 PN m 2 m and µ := δ i ∈ P( ). Let φ ∈ C ( , ) be a twice continuously differentiable t N i=1 Xt R R R function. Then   Z  Z m 2 N ¯ N 1 X ∂ φ(x) N d φ(x)dµt =  ∇φ(x) · b(x, µt ) + σ¯rp(x)¯σsp(x)dµt  dt m m 2 ∂x ∂x R R p,r,s=1 r s N 1 X + ∇φ(Xi) · σ¯(Xi) · dBi N t t t i=1

Proof. We evaluate

Z  Z N !! N ! N N 1 X 1 X i 1 X i d φ(x)dµt = d φ(x)d δXi = d φ(Xt ) = dφ(Xt ) m N m t N N R R i=1 i=1 i=1 (5.1.4) By the Itô formula, we know that

m m ∂φ(Xi) X ∂φ(Xi) 1 X ∂2φ(Xi) dφ(Xi) = t dt + t dXi,j + t dXi,rdXi,s t ∂t ∂x t 2 ∂x ∂x t t j=1 j r,s=1 r s

∂ r dXi,j ∈ j where ∂xr is the partial derivative operator to the -th component and t R is the -th i component of dXt . First we evaluate the first term on the right-hand side. By construction of φ, we have ∂φ = 0 (5.1.5) ∂t ∇φ(x) = Pm ∂φ(x) We note that j=1 ∂xj . Now we evaluate the second term on the right-hand side by substituting equation 5.1.3 and see i i i ¯ i N i i i ∇φ(Xt ) · dXt = ∇φ(Xt ) · b(Xt , µt )dt + ∇φ(Xt ) · σ¯(Xt ) · dBt (5.1.6)

24 5.2 Mean Field Measure

i,r ¯r i N Finally we evaluate the last right-hand term. For this, first note that dXt = b (Xt , µt )dt + Pm i,p p=1 σ¯rp(Xt)dBt . Now it is clear to see that m i,r i,s X i i dXt dXt = σ¯rp(Xt )¯σsp(Xt )dt (5.1.7) p=1 ˆi,r ˆi,s i,r i,r where we used dBt · dBt = δrsdt and 0 = dBt dt = dtdBt . By combining equation 5.1.5, 5.1.6 and 5.1.7, we find

 m  1 X ∂2φ dφ(Xi) = ∇φ(Xi) · ¯b(Xi, µN ) + σ¯ (Xi)¯σ (Xi) dt t  t t t 2 ∂x ∂x rp t sp t  p,r,s=1 r s m X i i i + ∇φ(Xt ) · σ¯(Xt ) · dBt k=1 Substitute this into equation 5.1.4 to find   Z  N m 2 i N 1 X i ¯ i N 1 X ∂ φ(Xt ) i i d φdµt = ∇φ(Xt ) · b(Xt , µt ) + σ¯rp(Xt )¯σsp(Xt ) dt m N 2 ∂x ∂x R i=1 p,r,s=1 r s N 1 X + ∇φ(Xi) · σ¯(Xi) · dBi N t t t i=1   Z m 2 ¯ N 1 X ∂ φ(x) N =  ∇φ(x) · b(x, µt ) + σ¯rp(x)¯σsp(x)dµt  dt m 2 ∂x ∂x R p,r,s=1 r s N 1 X + ∇φ(Xi) · σ¯(Xi) · dBi N t t t i=1

Now we note that in the Ri of equation 4.2.9, we can substitute

N N 1 X 1 X Z ∇ U(R ) = ∇ U (Ri−Rj) = ∇ U (Ri−Rj) = ∇ U (Ri−x)dµN (x, y) i t N i int t t N i int t t i int t t j=1,j6=i j=1 R×R (5.1.8) to result in ( i  1 R i N i α i dRt = ∇iUint(Rt − r)dµt (r, y) + νYt dt + dBt γ R×R γ (5.1.9) i d−1 i i i ˆi dYt = − 2 (Yt )dt + (Id − Yt ⊗ Yt )dBt

5.2 Mean Field Measure

The limit of N to infinity of the empirical measure can be seen as the distribution or law of the particles Xi at time t. This limit would still follow equation 5.1.9. Based on this intuition, we can propose a measure, of which we will later prove that is in indeed the limit. Intuitively, 2d we expect the limit µt ∈ P(R ) to take the form  ˆ  1 R ˆ ˆ  α dRt = d d ∇Uint(Rt − x)dµt(x, y) + νYs dt + dBt  γ R ×R γ ˆ d−1 ˆ ˆ ˆ ˆ (5.2.1) dYt = − 2 Ytdt + (Id − Yt ⊗ Yt)dBt  µt = Law(Rˆt, Yˆt)

25 5.2 Mean Field Measure

where the subscript t denotes the projection at time t. This is called a McKean-Vaslov system of equations or a McKean equation. The µt is called the mean field measure (a name which will make sense as soon as we have proven the limit). However, we cannot simply talk about a µt in this McKean equation. First, we need to prove that for all t ∈ [0,T ], such a µ exists. For this, we will use Banach’s fixed-point Theorem. We define the following function. Let 2d 2d η F : C([0,T ]; P(R )) → C([0,T ]; P(R )), η 7→ µ be a function such that  ˆη  1 R ˆη ˆ η α dR = d d ∇Uint(R − x)dηt(x, y) + νY dt + dBt  t γ R ×R t t γ ˆ η d−1 ˆ η ˆ η ˆ η ˆ (5.2.2) dYt = − 2 Yt dt + (Id − Yt ⊗ Yt )dBt  η ˆη ˆ η µt = Law(Rt , Yt )

Now to prove this function has a fixed point, we will have to prove that F is a contraction. But before we can continue, we need to prove F is properly defined, i.e. we first need to argue why this function has a strong solution. 2d η Let η be a measured valued function in C([0,T ]; P(R )). It is clear that Yt is a strong α solution of equation (5.2.2). This follows directly from Theorem 3.3.9. It is also clear that γ satisfies the growth and Lipschitz continuity conditions of Theorem 3.4.3. We have seen before that ∇Uint is Lipschitz continuous and satisfies the growth condition, from both conditions 1 R η η ∇Uint(Rˆ − x)dηt(x, y) + νYˆ of γ R×R t t are easily deduced. This implies a strong solution of η η η Xt = (Rt ,Yt ) exists. To use Banach’s fixed point Theorem, we need a proper metric. We are comparing measure valued functions. To start, we will introduce a metric over measures, called the Wasserstein-p metric. Definition 5.2.1 (Wasserstein-p metric). Let µ, µˆ be two probability measures on metric space (X, d). The Wasserstein-p metric is given by Z 1/p p Wp(µ, µˆ) = inf d(z, zˆ) dγ(z, zˆ) | π a coupling of µ and µˆ (5.2.3) π X×X for p ≥ 1. For π to be a coupling, it must hold that π(z × X) = µ(z) and π(X × z) =µ ˆ(z). Equivalently, the Wasserstein-p metric can be defined as

1/p n ˆ p ˆ o Wp(µ, µˆ) = inf E[d(Z, Z) ] | µ = Law(Z), µˆ = Law(Z) (5.2.4)

Remark 5.2.2. Note that if (X, d) is a complete separable metric space, then so is (P(X),Wp).[12] 2d 2d 2d Now as (R , | · − · |) is complete, so is (P(R ),Wp). Let η, ξ ∈ C([0,T ]; P(R )). It is clear that then the metric d0(η, ξ) = supt∈[0,T ] W2(ηt, ξt) induces a complete metric space 2d (C([0,T ]; P(R )), d0). To ease the process of proving F to be a contraction, we will consider instead the metric dλ defined by

λt dλ(η, ξ) := sup W2(ηt, ξt)e (5.2.5) t∈[0,T ]

Lemma 5.2.3. Let λ ∈ R, then dλ is equivalent to d0.

Proof. To prove equivalence, we need to show that there exists α, β > 0 s.t. for any η, ξ ∈ 2d C([0,T ]; P(R )) αd0(η, ξ) ≤ dλ(η, ξ) ≤ βd0(η, ξ) (5.2.6) For the case that λ ≤ 0, we simply evaluate

λt λt 0 dλ(η, ξ) = sup W2(ηt, ξt)e ≤ sup W2(ηt, ξt) sup e = e sup W2(ηt, ξt) = d0(η, ξ) t∈[0,T ] t∈[0,T ] t∈[0,T ] t∈[0,T ]

26 5.2 Mean Field Measure and also

λt λt λT dλ(η, ξ) = sup W2(ηt, ξt)e ≥ sup W2(ηt, ξt) inf e = e d0(η, ξ) t∈[0,T ] t∈[0,T ] t∈[0,T ]

For the case that λ > 0, we similarly find

λT d0(η, ξ) ≤ dλ(η, ξ) ≤ e d0(η, ξ)

2d Due to the equivalence of d0 and dλ for negative λ, we know that C([0,T ]; P(R )), dλ) is also complete. There is one more tool we need to prove that F is a contraction. This is the Grönwall inequality. m Theorem 5.2.4 (Grönwall’s Inequality). [13, Lemma 2.7] Let u ∈ C([0,T ], R ) satisfy the inequality Z t u(t) ≤ α(t) + β(s)u(s)ds, for all t ∈ [0,T ] (5.2.7) 0 with α and β continuous real valued functions and in addition α non-decreasing, then Z t  u(t) ≤ α(t) exp β(s)ds (5.2.8) 0

Now we are ready to prove that F is a contraction. Lemma 5.2.5 (Contraction of F under dλ). Let F be the function as defined above. Then 2d there exists a q ∈ (0, 1) and λ < 0, such that for any η, ξ ∈ C([0,T ]; P(R )) with equal initial conditions, it holds that η ξ dλ(F η, F ξ) = dλ(µ , µ ) ≤ qdλ(η, ξ) (5.2.9) i.e. F is a contraction.

Proof. The idea of this proof is that we will try to estimate |Xη − Xξ|2 in such a way that we can use the Grönwall inequality. Then we will take the infimum of the of both sides of the inequality. Then we will see our earlier defined metric dλ appear to complete the proof. η ξ 2d Let X and X ∈ C([0,T ], R ) be the paths created by using η and ξ as input for F re- spectively with equal initial conditions. In other words, for every t ∈ [0,T ] it holds that η ξ η ξ (F η)t = Law(Xt ), (F ξ)t = Law(Xt ) and X0 = X0 . We choose these such that the Brown- η ξ ˆη ˆξ η ξ ian motions Bt = Bt and Bt = Bt . We can do this, because Xt and Xt are strong solutions. Let t ∈ [0,T ]. Then we evaluate

η ξ 2 η ξ 2 η ξ 2 η ξ 2 |Xt − Xt | ≤ |Rt − Rt | + |Yt − Yt | = |Rt − Rt | (5.2.10)

η ξ where we note that Yt = Yt as they are both independent of the measure valued functions η and ξ, they are governed by the same Brownian motions and they have the same initial conditions. Using integral notation similar to equation (3.4.1), we see that

Z t Z Z  2 η ξ 2 1 η η |Rt − Rt | = ∇Uint(Rs − r)dηs(r, y) − ∇Uint(Rs − r)dξs(r, y)ds γ 0 R2d R2d Z t Z 2 1 η ξ = ∇Uint(Rs − r) − ∇Uint(Rs − rˆ)dπsds γ 0 R2d×R2d Z t Z 1 η ξ 2 ≤ t |∇Uint(Rs − r) − ∇Uint(Rs − rˆ)| dπsds γ 0 R2d×R2d

27 5.2 Mean Field Measure

Where πt is an arbitrary coupling of ηt and ξt for all t. Now we note that ∇Uint(·) is Lipschitz continuous as shown in Lemma 4.3.3. This means there exists a constant L ∈ R+ independent on η or ξ, such that η ξ η ξ |∇Uint(Rs − r) − ∇Uint(Rs − rˆ)| ≤ L|Rs − r − Rs +r ˆ| (5.2.11) We substitute this to find 2 Z t Z η ξ 2 L η ξ 2 |Rt − Rt | ≤ t |Rs − r − Rs +r ˆ| dπs ds γ 0 R2d×R2d 2 Z t Z 2L η ξ 2 2 ≤ t |Rs − Rs| + |rˆ − r| dπs ds γ 0 R2d×R2d Now with linearity of the integral, we find 2 Z t 2 Z t Z η ξ 2 2L η ξ 2 2L 2 |Rt − Rt | ≤ t |Rs − Rs| ds + t |rˆ − r| dπs ds (5.2.12) γ 0 γ 0 R2d×R2d

Here we used the fact that both ηs and ξs are probability measures for all t. This means that as πs is a coupling of ηs and ξs, indeed Z η ξ 2 η ξ 2 |Rs − Rs| dπs = |Rs − Rs| R2d×R2d

Now we note that equation (5.2.12) holds for all couplings πt of ηt and ξt, such that we have 2 Z t 2 Z t η ξ 2 2L η ξ 2 2L 2 |Rt − Rt | ≤ t |Rs − Rs| ds + t W2 (ηs, ξs)ds (5.2.13) γ 0 γ 0

η ξ 2 η ξ 2 See that |Rs − Rs| ≤ |Xs − Xs | and also that Z t Z t −2tλ 2 2 2λs −2λs 2 1 − e W2 (ηs, ξs)ds ≤ sup W2 (ηs, ξs)e e ds = dλ(η, ξ) (5.2.14) 0 s∈[0,T ] 0 2λ so that we can write 2 Z t 2 −2tλ η ξ 2 2L η ξ 2 2L 2 1 − e |Xt − Xt | ≤ t |Xs − Xs | ds + tdλ(η, ξ) (5.2.15) γ 0 γ 2λ

2L2 2 1−e−2sλ 2L2 Using the Grönwall inequality with α(s) = γ sdλ(η, ξ) 2λ and β(s) = γ t, we find that 2 −2tλ  2  η ξ 2L 1 − e 2L |X − X |2 ≤ t d2 (η, ξ) exp t2 (5.2.16) t t γ 2λ λ γ Now we can multiply both sides by exp(2λt) and we see 2 2tλ  2  η ξ 2L 1 − e 2L |X − X |2 exp(2λt) ≤ t d2 (η, ξ) exp t2 (5.2.17) t t γ −2λ λ γ

Note that t is bounded by T and λ is negative, such that e2tλ ≤ 1. So we have 2  2  η ξ 2L 1 2L |X − X |2 exp(2λt) ≤ T d2 (η, ξ) exp T 2 (5.2.18) t t γ −2λ λ γ

2L2 1  2L2 2 We now define q := γ T −2λ exp γ T and choose λ < 0, s.t. 0 ≤ q ≤ 1. We can take the η ξ infimum over the random variables Xt ,Xt of the expected value on both sides. Note that the right-hand side is a constant. This will give η ξ 2 exp(2λt) inf E|Xt − Xt | ≤ qdλ(η, ξ) (5.2.19)

28 5.3 Passing the limit

As this holds for all t ∈ [0,T ] we have that

2 2 dλ(F η, F ξ) ≤ qdλ(η, ξ) (5.2.20) there is a λ < 0 and a q ∈ (0, 1), such that equation (5.2.9) holds and thus F must be a contraction.

From this result, one can easily show F to have a unique fixed point. Theorem 5.2.6 (Existence of Mean Field Measure). Let F : C([0,T ]; P(R2d)) → C([0,T ]; P(R2d)) be a function defined according to (5.2.2). Then F has a unique fixed point. As a corollary, there exists a µ ∈ (C([0,T ]; P(R2d)) which satisfies equation (5.2.1).

Proof. From Lemma 5.2.5, we know that F is a contraction. According to Lemma 5.2.3, we know 2d that (C([0,T ]; P(R )), dλ) is a non-empty complete metric space. Therefore, via Banach’s fixed point Theorem[14, Theorem 1.3], we know that there is a unique fixed point of F , which we will refer to as µ. This µ satisfies the McKean Equation (5.2.1).

Remark 5.2.7. Note that if µt exists for in the interval [0,T ] for every value of T , we can expand this to have µt exist for every t ∈ {0} ∪ R+.

5.3 Passing the limit

We now have a candidate limit for the empirical measure given in equation (5.1.1). To show that the empirical measure does converge to the mean field measure, we have to define what it means for a measure to converge. Convergence in measure can be defined in different ways, but we will discuss the most commonly used definition, called narrow convergence. Definition 5.3.1 (Narrow Convergence). Let (X, d) be a metric space. Let µN be a family of measures on X and let µ be a measure on X. Now µN converges narrowly to µ iff for every bounded and measureable function f on X: Z Z N fdµ −−−−−−→N → ∞ fdµ (5.3.1)

This is noted as µN ⇒ µ Remark 5.3.2. When one has convergence in the Wasserstein-p metric sense, narrow conver- gence follows directly. Theorem 5.3.3. Let X1,...,XN be the paths of a N > 0 particles in an N-particle system N 1 PN satisfying equation (4.2.9). Let µt = N i=1 δXi be the empirical measure of the particle system at time t ∈ [0,T ]. Let µ¯t be the mean field measure defined (5.2.1). Then the empirical measure converges to the mean field measure in the Wasserstein-p metric for all t, i.e. ∃λ < 0 :

N E[dλ(µ , µ¯)] → 0, for N → ∞ (5.3.2)

Corollary 5.3.4. As a corollary of Theorem 5.3.3, the empirical measure converges narrowly to the mean field measure, i.e.

N µt ⇒ µ¯t, for N → ∞ (5.3.3)

Proof. To conduct this proof, we start by creating N mean field particles. These are stochastic processes X¯ 1,..., X¯ N , which satisfy equation (5.2.1). As this equation allows strong solutions,

29 5.3 Passing the limit we may choose X¯ i such that it has the same Wiener process and same initial conditions as Xi. Let t ∈ [0,T ]. We define a new measure

N N 1 X µ¯ = δ ¯ (5.3.4) t N Xi i=1 which we refer to as the empirical mean field measure. Now via the triangle inequality, we see that N N N N W2(µt , µ¯t) ≤ W2(µt , µ¯t ) + W2(¯µt , µ¯t) (5.3.5) N N Now we will focus on estimating W2(µt , µ¯t ). By definition, it holds that Z Z  2 N N 2 N N W (µ , µ¯ ) = inf |x − xˆ| dπt, πt a coupling of µ , µ¯ (5.3.6) 2 t t π t t R2 R2d

Choose a coupling πt such that it holds Z Z N 2 1 X i ¯ i 2 |x − xˆ| dπt = |Xt − Xt | (5.3.7) 2d N R2 R i=1 so that we can state N 1 X W 2(µN , µ¯N ) ≤ |Xi − X¯ i|2 (5.3.8) 2 t t N t t i=1 i ¯ i 2 i ¯ i Now for any i we evaluate |Xt − Xt | . Note here that the Wiener processes of Xt and Xt are equal. i ¯ i 2 i ¯i 2 i ¯ i 2 i ¯i 2 |Xt − Xt | ≤ |Rt − Rt| + |Yt − Yt | = |Rt − Rt| Z t Z Z 2 1 i N ¯i ≤ ∇iUint(Rs − r)dµs − ∇iUint(Rs − r¯)dµ¯s ds γ 0 R2d R2d Z t Z t i ¯i 2 ≤ |∇iUint(Rs − r) − ∇iUint(Rs − r¯)| dπs ds γ 0 R2d×R2d N where πs is an arbitrary coupling of µs and µ¯s. As ∇U is Lipschitz continuous, there exists an L > 0, such that i ¯i 2 2 i ¯i 2 2 |∇iUint(Rs − r) − ∇iUint(Rs − r¯)| ≤ 2L (|Rs − Rs| + |r¯ − r| ) (5.3.9) i ¯i 2 i ¯ i 2 We substitute this and note that |Rs − Rs| ≤ |Xs − Xs| to find 2 Z t 2 Z t Z i ¯ i 2 2L t i ¯ i 2 2L t 2 |Xt − Xt | ≤ |Xs − Xs| ds + |x − x¯| dπs ds (5.3.10) γ 0 γ 0 R2d×R2d

As this equality holds for any coupling πs, it must hold that 2 Z t 2 Z t i ¯ i 2 2L t i ¯ i 2 2L t 2 N |Xt − Xt | ≤ |Xs − Xs| ds + W2 (µs , µ¯s)ds (5.3.11) γ 0 γ 0 Again, note that for any λ < 0: Z t Z t −2tλ 2 N 2 N 2λs −2λs 2 N 1 − e W2 (µs , µ¯s)ds ≤ sup W2 (µs , µ¯s)e e ds = dλ(µ , µ¯) (5.3.12) 0 s∈[0,T ] 0 2λ

2L2s 2 N 1−e−2sλ Now we use the Gronwall inequality from Theorem 5.2.4 with α(s) = γ dλ(µ , µ¯) 2λ and 2Lt β(s) = γ to find 2L2t 1 − e−2tλ |Xi − X¯ i|2 ≤ d2 (µN , µ¯) (5.3.13) t t γ λ 2λ

30 5.4 Partial Differential Equation

Now as this holds for any i, we substitute this in equation (5.3.5) to find s N 2 r −2sλ N N 1 X 2L t 1 − e N W2(µ , µ¯t) ≤ W2(¯µ , µ¯t) + dλ(µ , µ¯) (5.3.14) t t N γ 2λ i=1 We multiply both sides with eλt and take the supremum on both sides, to find s 2 N N 2L T 1 N dλ(µ , µ¯) ≤ dλ(¯µ , µ¯) + √ dλ(µ , µ¯) (5.3.15) γ −2λ

q 2 λ < 0 q := 2L T √ 1 < 1 Now choose , such that γ −2λ . Consequently

N N 1 dλ(µ , µ¯) ≤ dλ(¯µ , µ¯) (5.3.16) 1 − q This means that the convergence of the empirical mean field measure to the mean field measure implies the convergence of the empirical measure to the mean field measure. Fortunately, it holds that N − 1 EW2(¯µ , µ¯) ≤ cN 2d (5.3.17) for some constant c independent of N.[15] Therefore we can conclude that

N 1 N c − 1 [dλ(µ , µ¯)] ≤ [dλ(¯µ , µ¯)] ≤ N 2d (5.3.18) E 1 − q E 1 − q which converges to 0 for N → ∞.

The stochastic processes X¯, satisfying equation (5.2.1) we can call mean field particles, a sort of pseudo-particles. These mean field particles are different from ordinary particles, as they do not interact with anything, except their own distribution. As we have proven the limit of the empirical measure to be the mean field measure, a system of one mean field particle "behaves" as a big particle system. For computational purposes, this means simulating mean field particles is much cheaper than simulating interacting particles. For a system of n interacting particles, we need O(n2) computations per time step, as every particle interacts with any other particle. To simulate mean field particles, we still need multiple particles to approximate the distribution of X¯ at any time t. However, as it requires O(n) calculations to approximate the distribution of X¯ and we need O(n) calculations to update X¯ for each time step, we only need O(n) calculations for a simulation of mean field particles. Mean field simulations are indeed much more efficient. In chapter 6, we will conduct such a simulation.

5.4 Partial Differential Equation

In order to analyze the mean field measure, it is useful to write it in another form. As it turns out, it is possible to write a partial differential equation (PDE) in distributional sense for mean field measure. This is a macroscopic description of the problem. Theorem 5.4.1 (PDE of Mean Field Measure for McKean-Vlasov Equation). Let µt be a mean field measure defined by a McKean-Vlasov equation ( dXt = b(Xt, µt)dt + σ(Xt) · dBt (5.4.1) µt = Law(Xt) where Xt is an n-dimensional random variable. Then the following PDE holds in distributional sense: n 2 T 1 X ∂ (σσ )prµt(x) ∂tµt(x) + div(µt(x)b(x, µ0)) = (5.4.2) 2 ∂x ∂x p,r=1 p r

31 5.4 Partial Differential Equation

2 n Proof. Let φ ∈ C0 (R ). Using the Itô formula, it follows that

m n 2 ∂φ(Xt) X ∂φ(Xt) j 1 X ∂ φ(Xt) r s dφ(Xt) = dt + dX + dX dX (5.4.3) ∂t ∂x t 2 ∂x ∂x t t j=1 j p,r=1 r s

i where Xt denotes the i-th component of Xt. Note that as φ is not explicitly time dependent, ∂φ = 0 ∇φ(x) = Pm ∂φ(x) it holds that ∂t . We note that j=1 ∂xj . Now we evaluate the second term on the right-hand side by substituting equation 5.1.3 and see

T ∇φ(Xt) · dXt = ∇φ(Xt) · b(Xt, µt)dt + ∇φ(Xt) · σ(Xt) · dBt (5.4.4)

r r Finally we evaluate the last right-hand term. For this, first note that dXt = b (Xt, µt)dt + Pm p p=1 σrp(Xt)dBt . Now it is clear to see that

m r s X T dXt dXt = σrp(Xt)σsp(Xt)dt = (σσ )pr(Xt) (5.4.5) p=1

r s r r where we used dBt · dBt = δrsdt and dBt dt = dtdBt = dtdt = 0. Now we substitute (5.4.4) and (5.4.5) in (5.4.3) and integrate over time to find   Z t n 2 Z t 1 X ∂ φ(Xs) φ(X )−φ(X ) = ∇φ(X ) · b(X , µ ) + (σσT ) (X ) ds+ ∇φ(X )T ·σ(X )dB t 0  s s s 2 ∂x ∂x pr s  s s s 0 p,r=1 p r 0 (5.4.6) As Xt is a random variable, equation (5.4.6) is a stochastic equation. In order to turn this into a deterministic equation, we take the expectation on both sides of the equation to find that   Z t n 2 1 X ∂ φ(Xs) T [φ(Xt)] − [φ(X0)] = ∇φ(Xs) · b(Xs, µs) + (σσ )pr(Xs)ds (5.4.7) E E E  2 ∂x ∂x  0 p,r=1 p r

hR t T i where we used that E 0 ∇φ(Xs) · σ(Xs)dBs = 0 as a property of the Wiener process[2, Theorem 3.2.1]. By Fubini’s Theorem, we can interchange the integral with the expectation. Now we take the time derivative to find   n 2 1 X ∂ φ(Xt) T ∂t [φ(Xt)] = ∇φ(Xt) · b(Xt, µt) + (σσ )pr(Xt) (5.4.8) E E  2 ∂x ∂x  p,r=1 p r

n Now by definition, for any function f : R → R, the expectation of f(Xt) is given by Z E[f(Xt)] = f(Xt(ω))dP (5.4.9) Ω where (Ω, F , P) is the underlying probability space of the Itô process. Now as µt is the law of Xt, it holds by definition that µt is the Xt pushforward of P, i.e. µt = Xt#P. By change of variables, we can write Z Z Z E[f(Xt)] = f(Xt(ω))dP(ω) = f(x)dX#P(x) = f(x)dµt(x) (5.4.10) Ω Rn Rn From this we can state that Z Z Z n 2 1 X ∂ φ T φd∂tµt = ∇φ · b(·, µt)dµt + (σσ )prdµt (5.4.11) n n 2 n ∂x ∂x R R R p,r=1 p r

32 5.4 Partial Differential Equation

From partial integration (and with abuse of notation), we can now write first integral on the right-hand side, that Z Z ∇φ · b(·, µt)dµt = − φ d div(b(·, µt)µt) (5.4.12) Rn Rn 2 which holds because φ ∈ C0 . The second integral on the right-hand side, we evaluate for individual cases of p and r. For any p, r ∈ N≤n, it holds that Z 2 Z 2 T ∂ φ T ∂ (σ )prµt) (σσ )prdµt = φ d (5.4.13) Rn ∂xp∂xr Rn ∂xp∂xr

2 As all these equations hold for any φ ∈ C0 , we can write that (5.4.2) holds in distributional sense.

The result of this Theorem allows us to write a PDE for our system of equations. We have d d a vector function b that for any x = (r, y) ∈ R × R is given by  1 R  d d−1 ∇Uint(r − rˆ)dµt(ˆr, yˆ) + νy γ R ×S b(x, µt) = d−1 (5.4.14) − 2 y and similarly a matrix function σ for which

 α  γ Id 0 σ(x) = T (5.4.15) 0 Id − yy with α2 ! T γ2 Id 0 σσ = T (5.4.16) 0 Id − yy

T 2 T 2 T T where we note that (Id − yy ) = Id − 2yy + |y| yy = Id − yy as |y| = 1. This allows us to finally write 1  d − 1  α2 ∂µt + νy · ∇rµt + divr (µt∇rUint ∗ µt) + divy −µt y = ∆rµt + µt (5.4.17) γ 2 2γ2 L where the subscripts r and y refer to partial integration w.r.t. the r and y components of x respectively. The operator L is for any f(r, y) given by

d 2 1 X ∂ ((δi,j − yiyj)f) f = (5.4.18) L 2 ∂y ∂y i,j=1 i j

Here ∇rUint ∗ µt is the convolution of ∇rUint and µt. In this context, it must be intepreted that d for any r ∈ R , it holds that Z def Uint ∗ µt(r) = Uint(r − rˆ)dµt(ˆr, yˆ) (5.4.19) Rd×Sd−1

5.4.1 Stationary Solutions

Now that we have an explicit PDE, it is possible to consider stationary solutions of this PDE. What is particularly interesting, is the stationary solutions of the position aspect of the distribution measure. The rotational aspect is of less interest, as it is a known that Yt is Brownian

33 5.4 Partial Differential Equation

motion on the unit sphere. We disintegrate the measure µt. This means that we define a new probability measure ρt by Z ρt(r) = µt(r, dy) (5.4.20) Sd−1 where we write dy to clearly indicate that the integration takes place over the y component. This measure ρt can be interpreted as the positional distribution of the particles. Now we integrate equation (5.4.17) over the y component to find a PDE in term of ρt given by

Z  1 α2 ∂tρt + ν divr y µt(r, dy) + divr (ρt∇rUint ∗ ρt) = 2 ∆rρt (5.4.21) Sd−1 γ 2γ

Unfortunately, there is still a term expressed in µt rather than in ρt. To state something about ρt, R  it is preferable if we can express divr Sd−1 y dµt either in terms of ρt or in terms of constants. To do so, we again disintegrate µt, but now integrate over the position part. We define a new measure Υt as Z Υt(y) = µt(dr, y) (5.4.22) Rd We suppose for a stationary solution it holds that µ∞(r, y) = ρ∞(r) ⊗ Υ∞(y). The subscript is used to denote the stationary solution. Analogous to before, we integrate (5.4.17) over the r component to find for the stationary solution that

divy(−Υ∞(d − 1)y) = 2LΥ∞ (5.4.23)

This equation is equal to the stationary on the unit sphere[2]. As Υ∞ follows the heat equation on the unit sphere, it holds that Υ∞ is simply the Lebesgue measure on the unit sphere. This implies that Z y dΥ∞ = 0 (5.4.24) Sd−1 For a stationary solution, it must thus hold that α2 divr(ρ∞∇rUint ∗ ρ∞) = ∆rρ∞ (5.4.25) 2γ

Note that it holds that ∆rf = divr(∇rf) = divr(f∇r log f), for any nice function f. This result follows directly from the chain rule. This is a very useful equality, as it allows us to write α2 ∇rUint ∗ ρ∞ − ∇r log ρ∞ = C (5.4.26) 2γ

d for some constant C ∈ R .

5.4.2 Free Energy

If as an additional condition, we assume ρt to be absolutely continuous with respect to the Lebesgue measure, there exists some function ut(r) such that dρt(r) = ut(r)dr. This can be used to rephrase the stationary solution condition from equation (3.2.4). This is done by introducing a new parameter, called the free energy, noted by F . We define the free energy, given a distribution ρt as α2 Z 1 Z Z F [ut] := ut log utdr − Uint(r − rˆ)dρt(r)dρt(ˆr) (5.4.27) 2γ Rd 2 Rd Rd

34 5.4 Partial Differential Equation

For perturbation w with small h ∈ R+, it holds that 2 Z F [ut + hw] − F [ut] α = [((ut + hw) log(ut + hw) − ut log ut] dr h 2γh Rd 1 Z Z − Uint(r − rˆ) [(ut(r) + hw(r))(ut(ˆr) + hw(ˆr)) − ut(r)ut(ˆr)] drdrˆ 2h Rd Rd  2  h→0 Z α Z −−−→ w(r) log ut − Uint(r − rˆ)ut(r)ut(ˆr)drˆ dr Rd 2γ Rd

From this, it follows that the derivative of the free energy with respect to the measure ρt, is given by δF α2 Z = (log ut + 1)) − Uint(r − rˆ)dρt(ˆr) (5.4.28) δρt 2γ Rd From this finding, it follows that the equation δF ∇r = constant (5.4.29) δρt is equivalent to equation (5.4.26). This means that a minimiser of F results in a stationary solution for ρt.

35 Chapter 6

Numerical Simulation Set-up

In order to calculate the mean field measure at any time t, we will run a numerical simulation. We will approximate the mean field distribution as a d-dimensional histogram with equal cubic cells. In one dimension this results in a standard histogram. As a mean field particle is dependent on the distribution and vice verse, we will run the simulation with N mean field particles simultaneously. At time t the position of the particles will be used to find the approximated mean field measure. The approximated measure can then in term be used to calculate the next position of all mean field particles. A similar simulation will be executed for the case with finitely many interacting particles. The results of the mean field case and the finitely interacting particle case will then be compared.

6.1 Approximations & Mean Field Simulation

6.1.1 Histogram

We will use a standard Euler-Maruyama method on equation (5.2.1). This means that we discretise the time with m equal time intervals of size h := T/m, i.e. {t0, t1, . . . , tm} such that ∀i : ti+1 − ti = h and t0 = 0, tm = T . For any mean field particle, we assume it holds ( ¯ ¯  1 R ¯ ¯  α Rt = Rt + h 2d ∇Uint(Rt − r)dµ¯t (r, y) + νYt + Bh i+1 i γ R i i i γ (6.1.1) ¯ ¯ d−1 ¯ ¯ ¯ ˆ Yti+1 = Yti − h 2 Yti + (I − Yti ⊗ Yti )Bh where µ¯ti is the approximated mean field measure at time ti. The measure is in the form of a histogram according to our assumption. For this we divide our cube space into M equally sized k #{Xt ∈Qk} cubed cells Qk. At time t, the ratio of particles in cell Qk is N =: Ck,t. This means we can write the approximated mean field measure in the form M X Ck,ti d µ¯ti = IQk L ⊗ 1 (6.1.2) |Qk| k=1 d were L is the d dimensional Lebesgue measure. Here |Qk| notes the d-dimensional volume of Qk. The approximation is extremely useful, as it allows us to rewrite the integral in equation (6.1.1) as an integral over the Lebesgue measure. It also allows us to write the free energy from equation (5.4.27) as

2 M M α X Ck,ti 1 X Ck,ti Cl,ti F [¯ρti ] = Ck,ti log − |Qk||Ql|Uint(rl − rk) (6.1.3) 2γ |Qk| 2 |Qk| |Ql| k=1 k=1l=1

36 6.1 Approximations & Mean Field Simulation

where rk is the centre position of the cell Qk.

6.1.2 Convolution

Having expressed the mean field measure as a histogram as seen in equation (6.1.2), we are left with a new integral. The integral in equation 6.1.1 can be written as

Z M C Z ¯ X k,ti ¯ d ∇Uint(Rti − r)dµ¯ti (r, y) = ∇Uint(Rti − r)IQk (r)dL (r) (6.1.4) 2d |Qk| d R k=1 R ¯ The values for Rti change for each time step. The right-hand integral must thus be calculated often in simulation. This is not cheap. It makes sense to find the solution of the right-hand side integral for general Rti . If we look closely, we may notice that the right-hand side integral is actually the convolution of ∇Uint and IQk evaluated at Rti . To find the integral, we can use the convolution Theorem. n Theorem 6.1.1 (Convolution Theorem[16]). Let f, g be functions on R with convolution f ∗ g. Then it holds that F {f ∗ g} = F {f}· F {g} (6.1.5) where F denotes the Fourier transform operator defined by Z F {f}(ω) = f(x)e−2πix·ωdx (6.1.6) Rn

This Theorem is in itself not directly applicable. However, a direct corollary of it is quite useful. n Corollary 6.1.2. Let f, g be functions on R with convolution f ∗ g. Then it holds that

f ∗ g = F −1{F {f}· F {g}} (6.1.7) where F −1 is the inverse Fourier transform operator given by Z F −1{f}(x) = f(ω)e2πiω·xdx (6.1.8) Rn

This means that instead of computing the convolution of ∇Uint and IQk , we can also choose to compute the product of the ∇Uint and IQk in Fourier space and apply the inverse Fourier operator. As the cells {Qk} and the function ∇Uint are static objects in the simulation, the convolution between these can be calculated once during the initialisation of the simulation and saved for later use. We start by calculating the Fourier transforms of the individual functions. k k Lemma 6.1.3. Let Qk be a d-dimensional cube such that we can write Qk = [a1, b1) × · · · × k k d [ad, bd). Then for any ω = (ω1, . . . , ωd) ∈ R , the Fourier transform of IQk is given by

d  k k  Y k k −πibnωn k k −πianωn F {IQk }(ω) = bn sinc(πωnbn)e − an sinc(πωnan)e (6.1.9) n=1

d Proof. Note that for any r = (r1, . . . , rd) ∈ R , we can write

d Y (r) = k k (r ) IQk I[an,bn) n (6.1.10) n=1

37 6.1 Approximations & Mean Field Simulation

Now we can use the fact that if f(x1, x2, . . . , xd) = f1(x1)f2(x2) . . . fd(xd), then F {f}(ω) = k k F {f1}(ω1)F {f2}(ω2) ... F {fd}(ωd). Let [an, bn) be any of the intervals defining Qk. Then Z −2πirnωn { k k }(ω ) = k k e dr F I[an,bn) n I[an,bn) n R k Z bn −2πirnωn = e drn k an  k k  ( 1 −2πib ωn −2πia ωn e n − e n , for ωn 6= 0 = −2πiωn k k bn − an, for ωn = 0

1 − 1 ω 6= 0 Now we add −2πiωn −2πiωn and simplify for n

1  k k  −2πibnωn −2πianωn F {I[ak ,bk )}(ωn) = e − 1 + 1 − e n n −2πiωn k k −2πibnωn −2πianωn k 1 − e k 1 − e = bn k − an k 2πωnibn 2πωnian  k k  k k −πibnωn k k −πianωn = bn sinc(πωnbn)e − an sinc(πωnan)e

k k Now note that even if we fill in ωn = 0 on the righthand side, we get bn − an. This concludes the Lemma.

Now of course ∇Uint is a vector. This requires us to evaluate it component wise. d Lemma 6.1.4. Let ∇jUint be the j-th component of ∇Uint where Uint : R → R is defined by 2 2 2 2 Uint = Dr exp(−2a(r − re )) − 2Da exp(−a(r − re ) (6.1.11) d as in section 4.2. Then for any ω = (ω1, . . . , ωd) ∈ R

 d+2 2 2 d+2 2 2   π  2 2ar2− ω π π  2 ar2− ω π F {∇jUint}(ω) = i4aωj −Dr e e 2a + Da e e a (6.1.12) 2a a

d Proof. For any r = (r1, r2, . . . , rd) ∈ R we write out ∇Uint(r) to see that

2 2 2 2 −2a((r) −(re) ) −a((r) −(re) ) ∇Uint(r) = −4aDre r + 4aDae r (6.1.13) 2 Pn 2 Now note that (r) = i=1 ri , so that we can write Pn 2 2 Pn 2 2 −2a( r −(re) ) −a( r −(re) ) ∇Uint(r) = −4aDre i=1 i r + 4aDae i=1 i r d d 2ar2 Y −2ar2 ar2 Y −ar2 = −r4aDre e e n + r4aDae e e n n=1 n=1 d As ∇Uint(r) ∈ R , we have to evaluate d different but similar integrals. We will evaluate in the j-th direction. Here we have d d 2ar2 Y −2ar2 ar2 Y −ar2 ∇jUint(r) = −rj4aDre e e n + rj4aDae e e n (6.1.14) n=1 n=1

Again we use that if f(x1, x2, . . . , xd) = f1(x1)f2(x2) . . . fd(xd), then 2 −C2(x −C3) F {f}(ω) = F {f1}(ω1)F {f2}(ω2) ... F {fd}(ωd), where we write f(x) = C1xje and

( −C (x2−C ) C1xne 2 i 3 for j = n f (x ) = n n −C x2 (6.1.15) e 2 i , for j 6= n

38 6.1 Approximations & Mean Field Simulation

for some constants Ci ∈ R+. Now take the Fourier transform of fn where j 6= n to find

ω2 π2 Z 2 r π n −2πixnωn −C2(x −C3) − C F {fn}(ωn) = e e n dxn = e 2 (6.1.16) R C2 Similarly for j = n, we find

3/2 ω2π2 Z 2  π  j −2πixj ωj −C2(x −C3) C2C3− C F {fj}(ωj) = e C1xje j = iC1ωje 2 (6.1.17) R C2 so we can state d+2  π  2 ω2π2 C2C3− C F {f}(ω) = iC1 ωje 2 (6.1.18) C2

By choosing appropriate values for Ci, we can conclude that

 d+2 2 2 d+2 2 2   π  2 2ar2− ω π π  2 ar2− ω π F {∇jUint}(ω) = i4aωj −Dr e e 2a + Da e e a (6.1.19) 2a a

Now we can take the inverse Fourier transform of the product of the previously computed

Fourier transforms to find the convolution of IQk and ∇jUint. k k Theorem 6.1.5. Let Qk be a d-dimensional cube such that we can write Qk = [a1, b1) × · · · × k k d [ad, bd) and ∇jUint be the j-th component of ∇Uint. Then for all x ∈ R+, it holds

√ d+2 2 π  2 ar aDa4a e e h k 2 k 2 i a −a(bj −xj ) −a(an−xj ) IQk ∗ ∇jUint(x) = e − e 2π3/2 d Y 1   √   √  × erf (bk − x ) a − erf (ak − x ) a 2 n n n n n=1,n6=j

√ d+2 2 π  2 2are 2aDr4a e h −2a(bk−x )2 k 2 i − 2a e j j − e−2a(an−xj ) 2π3/2 d Y 1   √   √  × erf (bk − x ) 2a − erf (ak − x ) 2a 2 n n n n n=1,n6=j

Proof. Using the Lemmas from above, the product of F {IQk }(ω) and F {∇jUint}(ω) can be written as

F {IQk ∗ ∇jUint}(ω) = F {IQk }(ω) · F {∇jUint}(ω) d+2 π  2 2 = D i4aω eare a j a

d ω2π2 j  k k  Y − k k −πibnωn k k −πianωn × e a bn sinc(πωnbn)e − an sinc(πωnan)e n=1 d+2  π  2 2 − D i4aω e2are r j 2a

d ω2π2 j  k k  Y − k k −πibnωn k k −πianωn × e 2a bn sinc(πωnbn)e − an sinc(πωnan)e n=1

By the linearity of the integral and the fact that if f(x1, x2, . . . , xd) = f1(x1)f2(x2) . . . fd(xd), −1 −1 −1 −1 then F {f}(ω) = F {f1}(ω1)F {f2}(ω2) ... F {fd}(ωd), it is clear that we only need

39 6.1 Approximations & Mean Field Simulation to evaluate the inverse Fourier transform for two cases. For n 6= j, we take the inverse Fourier transform 2 2 ωnπ −πiC1ωn − C ± C1 sinc(C1ωnπ)e e 2 (6.1.20) Similarly for n = j, we take the inverse Fourier transform of

2 2 ωj π −πiC1ωj − C ± ωjC1C3i sinc(C1ωjπ)e e 2 (6.1.21)

Where in both cases C1, C2 and C3 are some real positive constants. For functions f is the form of equation (6.1.20) and positive xn, we find

−1 1   p   p  F {f}(xn) = ± erf (C1 − xn) C2 + erf xn C2 (6.1.22) 2 x 2 √2 R −t where erf is the error function defined by erf(x) := π 0 e dt. For functions g in the form of equation (6.1.21) and positive xn, we find

√ 2 2 2 −C2(C +xn) C C2 2C1C2xn −1 C2C3e 1 (e 1 − e ) F {g}(xj) = ± (6.1.23) 2π3/2

Using this and choosing appropriate values for C1,C2 and C3, we may conclude that for all d x = (x1, . . . xd) ∈ R with xn > 0

√ d+2 2 π  2 are aDa4a a e IQk ∗ ∇jUint(x) = 2π3/2 h −a((bk)2+x2) (bk)2a 2bkax −a((ak )2+x2) (ak)2a 2aakx i × e j j (e j − e j j ) − e n j (e j − e j j )

d Y 1   √   √  × erf (bk − x ) a − erf (ak − x ) a 2 n n n n n=1,n6=j

√ d+2 2 π  2 2ar 2aDr4a e e − 2a 2π3/2 h −2a((bk)2+x2) (bk)22a 4bkax −2a((ak )2+x2) (ak)22a 4aakx i × e j j (e j − e j j ) − e n j (e j − e j j )

d Y 1   √   √   × erf (bk − x ) 2a − erf (ak − x ) 2a − 2 n n n n n=1,n6=j which can be simplified to find the conclusion.

6.1.3 The Error Function

The result from Theorem 6.1.5 may look monstrous to us, but a computer will be able to calculate this with relative ease. Particularly for reasonably low dimensional systems (d < 10), the computation should not be any problem. The only issue that arises is the Gaussian integral that is the error function. Fortunately this can be reasonably approximated. There are various available approximations available and we will choose one which is decently easy to compute. Lemma 6.1.6. [17] Let erf be the error function. Then for x ≥ 0 1 erf(x) ≈ 1 − 2 3 4 4 (6.1.24) (1 + a1x + a2x + a3a + a4x ) with a1 = 0.278393, a2 = 0.230389, a3 = 0.000972, a4 = 0.078108 and a maximum error of 10−5. For x < 0, we can use the equality erf(x) = − erf(−x).

40 6.2 Interacting Particle Simulation

The error in this approximation is fairly low and the costs of the approximation are reasonable. Of course one could choose another, more precise approximation, but this may only be necessary for simulation with very small time steps and a big amount of particles (N  10000).

6.2 Interacting Particle Simulation

The mean field limit is a limiting case where there exists a system with infinitely many particles, but a finite density. In order to compare this to a system with interacting particles, we need to execute a second simulation. This second simulation will simulate the interacting particle system under similar conditions with regards to the mean field simulation. The mean field limit is of course a limiting case for infinitely many particles. This means that we would only expect similar behaviour between the two systems if we simulate a sufficiently large amount of particles. The interacting particle simulation set up will look very much like the set up in the mean field simulation in equation (6.1.1). The governing continuous equation is given (4.2.9). This equation is discretised. Via standard forward Euler integration methods with time step h, the system for N particles is approximated by

( j j  1 PN j k  α Rt = Rt + h ∇Uint(Rt − Rt ) + νYti + Bh i+1 i γN k=0,k6=j i i γ (6.2.1) Y j = Y − h d−1 Y + (I − Y ⊗ Y )Bˆ ti+1 ti 2 ti ti ti h

As discussed in section 5.3, the interacting particle system will be (much) slower than the mean field simulation. This is due to the summation over all particles in equation (6.2.1). For any particle, to calculate the next step, information of all other particles must be known. As this holds for all particles and every time step, the simulation takes quadratic time w.r.t. the number of particles, i.e. O(N 2). This is unfortunately limiting.

6.3 Analysis

Now that we have two properly working simulations, we can try to compare them. There is a lot of available and known data generated by the simulations. This makes manual analysis nearly impossible. This makes it very much important to write code that automatically and properly outputs an analysis per simulation. A very nice property to investigate is clustering. The clustering is a term to describe particles, their proximity to each other, the number of clusters they form and the size of the clusters. For the chosen potential, there is a set distance between two particles which is the most preferable. However, when the repulsion is very strong compared to the attraction, this distance can be very large. When the number of particles per volume unit increases, the distance between two nearby particles is very likely to be short, even for strong repulsion. The activeness of the particles will too distort the shortest distance between two particles. Clustering is a fairly abstract concept. In order to nicely and objectively measure clustering, it is necessary to find a quantification for clustering. This means that given a distribution at a certain time, a function can be called which output the clustering. We introduce two quantifications, crowding and flocking. The crowding quantification states something about the number and size of the clusters. The flocking quantification states something about the non-uniformity of the clusters. The higher the flocking value, the less uniform the particles are distributed. To find the crowding and the flocking, we use two algorithms respectively.

41 6.3 Analysis

6.3.1 DBSCAN

Clusters are group of particles, which are packed closely together. Whether particles form clusters is fully dependent on their potential. Knowing the position of all particles at a certain time is enough to see whether clustering occurs. To do this, we use the Density-Based Algorithm for Discovering Clusters (DBSCAN). The DBSCAN [18] is a simple query based algorithm which finds and labels clusters. The algo- rithm requires two input arguments: a minimum distance  and a threshold minimum number of particles minP ts. The DBSCAN differentiates the particles in three categories. Any particle is

• a core particle if there are at least minP ts particles within distance  of it, including pi.

• reachable from a particle pj if there is a path of core particles qi between pi and pj s.t. q1 = pi, qn = pj and the distance between qk and qk+1 is smaller than  for all k.

• noise if pi is not reachable from any other particle.

All particles pj that are reachable form pi with a path of only two particles (i.e. q1 = pi, q2 = pj) are said to be in its neighbourhood. Now clusters can be defined as follows. Given a core particle pi. All particles that are reachable from pi (including pi itself), form a cluster. This means that clusters can include core points and non-core points. In the context of phase separation, core points can be interpreted as liquid state particles. Noise points are gas state particles. Non-core cluster points are particles transitioning between gas and liquid state. The process of clustering is illustrated in figure 6.1.

Figure 6.1: This image schematically illustrates the DBSCAN in action. The space is two dimensional. All points represent particles and the colored circles around the point are circles of radius . Point A represents the initial core particle. All other red points represent core particles reachable from A. The yellow points are reachable non-core particles. In this diagram, minPts = 4. The arrows between the points represent the direction of the reachablitiy. Note that B is reachable from A, but not the other way around as B is not a core particle. The blue point N is not reachable from any other (core) particle and is labeled noise. All red and yellow particles together form a cluster. [19]

The parameters for the DBSCAN must be found. The value for minP ts must be certainly more than 1. This is because if minP ts = 1, all particles are core particles and none would be noise. As we work with arbitrary dimensions, we must consider the fact that a higher dimension makes it more likely for a group of n particles to be close together than in lower dimensions.

42 6.3 Analysis

This is due to the fact a higher dimensionality creates more space for particles to be. By rule of thumb, minP ts is set as minP ts = 2 · d. The maximum distance parameter  is also very important and is closely related to the chosen metric. The system works with the standard Euclidean metric. This means that all particles in the neighbourhood of pi are within a circle. It must be considered that particles have a size of re. Within a distance of re, particles are pushed away (given that Da ≈ Dr). Set  = 2 · re. This is small enough such that multiple clusters could be formed, but large enough that any cluster can indeed still be formed.

The DBSCAN algorithm has been adapted in such a way that it outputs two objects. The first object is an integer which states the number of clusters were found. The second object is a HashMap. This is a sort of table, which links every particle with the index of a cluster or which labels the particle to be noise. After the DBSCAN is run for every discrete time point, the results can be analysed. The maximum number and the minimum number and the corresponding number of noise particles at the respective times are found. The average number of clusters and noise particles are found. These averages are then used to calculate their respective . These variances quantify how much the number of clusters and the number of noise particle is consistent. Systems which show liquid-gas phases separation have at least one, but possibly multiple clusters, a non-negligible percentage of noise particles and fairly low variances is the number of clusters and number of noise particles. From the HashMap, a histogram is formed of the number of particles in each cluster.

6.3.2 Flocking Scan

The number of clusters and the number of noise particles is not the only way to properly measure whether liquid-gas phase separation takes place in a system. In actuality it may not be enough, as it may be that by incorrectly choosing the maximum range parameter  too large, that many clusters will indeed be created, but that none are meaningful in the sense of liquid-gas state phase separation. The DBSCAN algorithm cannot differentiate too well between a system with one big cluster with little to no noise particles or a system with a very high nearly uniform particle density. In order to account for this, a second algorithm is made. This algorithm scans the flocking value, a previously undefined system property. The flocking value is defined as follows. Given a maxi- mum radius rmax and a system of N particles, the number of particles within a radius of rmax of particle pi is denoted by Ni. The flocking value f for any system is given by the difference between the maximum possible value and the minimum possible value for Ni normalized for the total number of particles multiplied by the ratio of the total system volume (Vtot) and the volume 1 of a sphere with radius rmax (Vrmax ). We can write this as f := (maxi∈ (Ni)−mini∈ (Ni)). Vrmax N N

For sufficiently small (but not restrictively small) values of rmax, the flocking value compares the highest local density with the lowest local density around a particle. In the case of a globally uniform distribution, the flocking value will be near 0. For a non uniform distribution, the flock- ing distance will be higher. In the extreme case, where all particles except one are in a sphere of radius rmax and the other is far away from this sphere, the flocking value will equal the ratio

N −2 : Vrmax . The flocking value quantifies the uniformity of the particle distribution of a system.

For the simulation, the value for rmax is chosen to be rmax = 3 · re. This means that the volume of the d-dimensional sphere[20] is given by d π 2 d d Vrmax = d 3 re (6.3.1) Γ( 2 + 1)

43 6.3 Analysis where Γ is the standard gamma function. For this distribution it holds that for a positive integer 1 1 1 3 1 2 n, Γ(n) = (n − 1)! and for non-negative integer n, Γ(n + 2 ) = (n − 2 ) · (n − 2 ) ····· 2 · π .

6.3.3 Radial Distribution Function

A final observable that may be interesting is the Radial Distribution Function. This is a function depending on the mean field distribution of a system. It may be used to confirm the results gained by the DBSCAN algorithm. The observable can be defined as a function of radius r as follows: R R dρt − dρt Br0 (r+dr) Br0 (r) f[ρt](r) = C lim (6.3.2) dr↓0 rd−1dr d Here r0 ∈ R is the position of the particle in the density region of interest and B is the d dimensional ball and C ∈ R is a normalisation constant. For every value of r, the value for f[ρt](r) can be calculated. In the discretised simulation, we choose a small but reasonable value for dr to be half of the length of the edge of the cell. Note that the cells are d-dimensional cubes, meaning they have the same cell size. For gas systems, one expects this function to be roughly constant. This is due to the fact that in gas systems, the positional distribution is roughly uniform. Therefore, for gasses, equation (6.3.2) simplifies to

1 πd/2 (r + dr)d − rd 1 πd/2 f[ρt](r) = C lim = C d (6.3.3) V d dr↓0 rd−1dr V d tot Γ( 2 + 1) tot Γ( 2 + 1)

d −d/2 Here it follows that the normalisation constant C can be chosen as C = Γ( 2 + 1)π Vtot/d. For non-uniform distributions, such as those in liquids, the simplification does not hold. For a particle at r0 in a high density region, one expects high values of f for low values of r, such as r ≈ re. After the spike, a small dip is expected. For high values of r, the function f should again be roughly constant. This can be explained intuitively by the idea that particles far away from r0 are not or barely influenced by the local region around r0 as explained in section 2.2. Thus for high r, the particles are approximately uniformly distributed. Even if some other high density regions exist far away from r0, the effect of them on f will be little, due to the large value of rd−1.

44 Chapter 7

Simulation Results

The simulation built in chapter 6 is run for various ranges of system and potential parameters. As explained in chapter 1, the simulation has two goals. The first of these goals is to test the algorithms for bugs, errors and running time. This includes the simulation and the result analysis tools. The second goal is to find whether the mean field particle simulation and the interacting particle system have compatible results. If this is indeed the case, a mean field simulation is time-efficient alternative to the interacting particle simulation. In this chapter, the results of the analysis of the simulations are presented. The found results are also discussed. All simulations are run with periodic boundary conditions. All simulations are initialized with a uniform distribution of the particle positions.

7.1 First Reconnaissance

To find the system parameters for which state separation occurs, the simulations are first run in a small space with periodic boundary conditions for a wide range of parameters. This serves as a first reconnaissance to test the algorithms.

7.1.1 Two Dimensional

From table 7.1, it appears that for low global densities clustering does not take place. This is the case for both the interacting particle simulation and the mean field simulation independent of the active velocity. For higher global densities, there is a higher ratio of gas particles. This is visualised in figure 7.1. Figures 7.1a and 7.1c show barely any clustering. In figures 7.1b and 7.1d, there are more particles present. These high-density figures simply appear to be a more crowded version of the low-density figures. This implies that phase-separation may in fact not take place. All figures are similar to the results of a uniform distribution of particles in a two dimensional field. This leads to the likely conclusion that the effects of the initialisation are significant. The effects can be reduced by a larger simulation time. The active velocity does not appear to have a significantly relevant effect on the four chosen observables. This may be due to the fact that the attractive Da will cause an attraction between the particles, but it may also be due to the small simulation time. Larger simulation time may increase the effect of the active velocity, as the particles will have more time to behave differently. From the reconnaissance, it appears to be interesting to study the simulations for

45 7.1 First Reconnaissance

Table 7.1: Several observables of the simulation in two dimensions. The time step is 0.1 s with a total simulation time of 20 s. The length of the system in one direction is 40re, giving a 2 total area of 160re . The results are given as (Interacting Particles / Mean Field)). The simulations are run five times and results are averaged over all times. The errors are 68%-confidence intervals.

Global Active Number of clus- Size of Ratio number of Flocking num- Density Veloc- ters largest gas particles ber (re−2) (Total ity (re clusters number of s−1) particles) 0.1 (160) 0 0.63 ± 0.5 / 1 ± 0.7 3±15 / 5±20 0.9 ± 0.1 / 0.9 ± 0.2 0.030 ± 0.04 / 0.31 ± 0.03 0.1 (160) 4 0.07 ± 0.07 / 1.1 ± 0 ± 2 / 5 ± 15 0.99 ± 0.02 / 0.9 ± 0.03 ± 0.2 / 0.29 ± 0.8 0.2 0.04 0.1 (160) 8 0.7 ± 0.6 / 1 ± 0.8 4±20 / 5±15 0.9 ± 0.2 / 0.9 ± 0.2 0.25±0.03 / 0.28± 0.04 0.3 (480) 0 50 ± 14 / 50 ± 10 11±1 / 11±1 0.5 ± 0.6 / 0.5 ± 0.7 0.6 ± 0.1 / 0.54 ± 0.09 0.3 (480) 4 50 ± 10 / 50 ± 12 11±1 / 11±1 0.4 ± 0.5 / 0.5 ± 0.5 0.57±0.07 / 0.55± 0.04 0.5 (800) 0 130 ± 20 / 130 ± 20 13±1 / 13±2 0.1 ± 0.2 / 0.1 ± 0.2 0.7 ± 0.1 / 0.8 ± 0.1 0.5 (800) 4 130 ± 30 / 130 ± 20 13±2 / 13±1 0.1 ± 0.2 / 0.1 ± 0.2 0.8 ± 0.2 / 0.8 ± 0.1

densities between 0.2 and 0.4. This should now also be done for very low values of Da and high values of Dr. What is also notable from the table, is the ratio number of gas particles for a global density of 0.1. The active velocity does not appear to influence the observables. However, in the interacting particle simulation, an active velocity of 4, results in a larger and more precise ratio. The other two presented values from the interacting particle simulation and the three values presented from the mean field simulation agree on value and all have an error in the order of 0.1. The exceptional result has an error in the order of 0.01. The value does fall in the first interval of all other measurements. This means that the higher value does not imply a contradiction. The results of the interacting particle simulation and the mean field particle simulation are nearly indistinguishable even from as little as 480 particles. This too can be ascribed to the small simulation time. For more accuracy and further investigation, the further simulations will be done for larger number of particles in a larger system and with larger simulation time. Figure 7.1a shows some spots with a slightly higher local density. Due to the low number of particles, these higher density spots cannot be considered clusters. The one cluster that has formed in this snapshot, is located in the middle left of the heat map. There are many particles located at this area. The rest of the particles are nearly uniformly distributed. However, the particles are not perfectly homogeneously distributed. This is likely due to the interaction potential between the particles. Figure 7.1b appears to show some clustering. Particularly in the top left, the bottom right corners and in the centre of the snapshot, locally high densities have formed. The local high densities are is a contrast with the locally low densities that can be seen in the bottom, left and top of the snapshot. However, there is much space in which it is unclear whether clustering occurs. The snapshot suggests that the initialisation may still be a relevant factor.

46 7.1 First Reconnaissance

The snapshot shown in figure 7.1c is very similar to figure 7.1a. However, the contrast between the locally high and locally low density regions is sharper. The number of clusters, the size of the clusters and the overall homogeneity are still not significant enough for it to be considered clustering or phase separation. The snapshot is figure 7.1d appears to be very crowded. The contrast of high density regions and low density regions is not as sharp as in figure 7.1b. However, some large clusters are still clearly visible. The two most prominent clusters are located in the top right and the bottom right corners respectively. The bottom and the top areas show a low local density. These two areas are connected through the periodic boundary conditions. Between the high density spots in the centre of the figure, some clearly lower density areas appear.

(a) A snapshot of the interacting particle (b) A snapshot of the interacting particle simulation visualised as a heat map. The simulation visualised as a heat map. The −2 −2 density is 0.1 re with an active velocity of 0. density is 0.5 re with an active velocity of 4. There is one cluster according to the There are 150 clusters according to the algorithm, with a size of 6. algorithm, the biggest of size 17.

(c) A snapshot of the mean field simulation (d) A snapshot of the mean field simulation visualised as a heat map. The density is 0.1 visualised as a heat map. The density is 0.5 −2 −2 re with an active velocity of 0. There is one re with an active velocity of 4. There are 146 cluster according to the algorithm, with a size clusters according to the algorithm, the biggest of 6. of size 19.

Figure 7.1: Four snapshots of the particle simulation. Two are from the interacting particle simulation and two are from the mean field simulation. The heat maps visualise some results form the table 7.1. Red represents a high local density and yellow represents a low local density.

The algorithm ran for small simulation time. The observables presented in table 7.1 were computed using the result analysis tools of the developed algorithm. The obserables were also

47 7.2 DBSCAN - Radial Distribution Function computed manually from a table with the positions of all particles at all times. The resulting observables were found to be the exact same in both computing methods. This implies that there is likely no bug or error in the result analysis tool of the developed algorithm.

7.1.2 Reconnaissance in Other Dimensions

From the reconnaissance in two dimensional space, no bugs or errors were found. No con- clusion could be drawn with regards to phase separation, due to the likely lasting effects of the initialisation. The algorithm was also tested in other dimensions. As the ratio of gas particles is a number independent of the dimension, it can be well compared between spaces with different dimensionality. Figure 7.2 shows the ratio of gas particles as a function of global density for systems with different dimensions.

Figure 7.2: A plotted graph showing the ratio of noise (gas) particles as a function of the global density for four different dimensions.

What is apparent from graph 7.2, is that for all dimensionalities, the number of gas particles decreases as a function as the global density increases. The relative error is at maximum at a −d global density between 0.2 and 0.3 re for each dimensionality. However, for higher dimension- ality and fixed global density, the ratio of gas particles is lower. As the simulation time is again relatively small, this is likely an effect of the uniform initialisation of the particles. In a higher dimensional space with equal volume, the maximum distance between two particles is smaller. The one dimensional and the two dimensional results are very similar. For both dimensionali- −d ties, the global density interval [0.3, 0.5] re is interesting. For 3 dimensional simulations, the −3 −4 interval [0.1, 0.3] re is interesting and for 4 dimensions, the interval of interest is [0.01, 0.2] re .

7.2 DBSCAN - Radial Distribution Function

To further investigate, first the normalized radial distribution function from subsection 6.3.3 can confirm whether the presumed clusters are indeed liquids and whether the particles labeled as noise particles by the DBSCAN are indeed gas state particles. To do this, in any simulation a core point particle and a noise point particle are selected in accordance with the definitions of

48 7.2 DBSCAN - Radial Distribution Function section 6.3.1. Then for each particle the radial distribution is computed around that particle’s position. This means that the position r0 in equation 6.3.2 is chosen to equal the position of the chosen particles. Non-core cluster point particles will not be considered as those particles are not clearly in the gas or in the liquid state.

(a) Typical example of the radial distribution (b) Typical example of the radial distribution function of a noise point particle. function of a core point particle.

Figure 7.3: Two typical examples of the normalized radial distribution for a gas state particle and a liquid state particle respectively in two dimensions. The results are generated by the mean field simulation. The total number of particles in the system is 5000 and the system has −2 a density of 0.5re and a length of 100re.

Figure 7.3 shows two plots of the radial distribution function as generated by the mean field simulation. These are for a randomly chosen noise point particle and a randomly chosen core point particle. Both plots are very noisy. Note that the shown plots represent the distribution of one specific noise or core particle at one specific point in time in one specific simulation. There is only a finite number of particles and thus the curves will not be perfectly smooth. On the left-hand side in figure 7.3a, the distribution is centered around the line distribution = 1. This is true for the entire distribution except for r/re approaching 0. In an ideal gas, the radial distribution is constant for all values of 1. The other peaks, for example those at r/re = 4.2 and r/re = 10.2 are not meaningful. This is due to the fact that for other noise particles or the same noise particle at a different moment in time, those peaks are either shifted to another place or simply not present at all. If averaged over all noise particles, the graph is smooth with no peaks for r/re > 1. However, around r/re approaching 0 at any point in time for any noise particle, the distribution approaches zero. For non-ideal gasses, this is expected, as particles repel each other, meaning very few particles will be nearby and no particle will exist at a distance of r = 0. Overall the plotted function strongly represents the expected radial distribution function for a non-ideal gas. Figure 7.3b on the right-hand side shows the radial distribution centered around a core point particle. It can be seen that for high values of r/re, the distribution is again centered around the line distribution = 1. For a liquid state particle, this is to be expected. For very low values of r, the distribution approaches 0 similar to radial distribution around the noise point particle. Around r = re, the graph shows a high spike. As a core point is in a cluster, there are many other particles close to any core point particle. This explains the first peak. After this first peak, there is a strong dip. This is due to the fact the particles nearby also repel other particles. As a results, at a distance of roughly r = re there are little to no other particles. This is then

49 7.3 Parameters for Clustering again compensated by a spike. This spike is slightly lower as the particles have more latitude in their exact position. Overall, the plotted function also strongly represents the expected radial distribution function for a liquid. The two shown plots are simply examples of the radial distribution function for specific parameters. However, in any system with a non-zero repulsion and a significant running time, the radial distribution function around a noise particle looks very similar to the graph plotted in figure 7.3a. Similarly, the radial distribution function around a core particle for non-zero repulsion systems is very similar to the graph plotted in figure 7.3b. This confirms that the DBSCAN algorithm indeed properly distinguishes liquid state particles from gas state particles.

7.3 Parameters for Clustering

After reconnaissance, the simulations have run for a wide range of supposedly more interesting parameter values in all dimensions. Results of the two dimensional case are plotted in a graph figure 7.4. This graph shows the ratio of noise particles for a global density of 0.3 with a total number of particles of 2400 for various values of the active velocity. The results are shown for both the interactive particle simulation as well as for the mean field simulation. Figure 7.4 shows much information. Firstly, it is clear that the results for the mean field simulation coincides with the results generated by the interacting particle simulation. This is true for all plotted data points. It was seen in section 7.1 that for a higher total number of particles of at least 480 the results generated by both simulations matched well. As 2400 is an even large number of particles, it was to be expected that the data would match in great extend.

Figure 7.4: Ratio of noise particles as a function of Dr and Da for different values of the active velocity (AV) for the interacting particle and the mean field simulation respectively. Parameters are chosen√ such that Da = 8De − Dr. Other simulation parameters are d = 2, −2 ν = 4, α = 0.1, γ = 0.2. The total number of particles is 2400 with a global density of 0.3re . The uncertainty of all data points is equal to 0.1, the total simulation time is 200 s.

Secondly, when there is no active velocity, there is less clustering. Particularly for high repulsion (Dr) and low attraction (Da), it is obvious there are many more noise particles than in the case of an active velocity of at least 4. This implies that the attractive part of the potential

50 7.3 Parameters for Clustering indeed does cause clustering. For low attraction, the repulsive part of the potential dominates, causing an increase in number of noise particles. The ratio of noise particles is never 100% and does not appear to approach 100% for low attraction and high repulsion. This implies that due to the density, some group of particles will always form. Thirdly, for an active velocity of at least 4, the ratio of noise particles stays roughly equal to 0.4. This is value lies well within the uncertainty interval found in the graph of figure 7.2. On the surface, it appears the potential does not influence the ability of the system to make a cluster. However, for an active velocity of 0, it was clear that the attractive part of the potential does have a positive effect on clustering. At closer inspection, it is clear that the potential does influence the clustering of the system for a positive active velocity. At low repulsion and high attraction, the clustering is dominated by the interactive potential. The potential is pulling together all particles. For high repulsion and low attraction, the opposite occurs. The potential pushes all particles apart. The activity of the particle still causes clusters to form. What is striking, is that the ratio of noise particles is 0.4 for high and for low attraction. This implies that the clustering of particles caused by the activity of the particles compensates for lower attraction. It also implies there is a clustering maximum: given a set density, a minimum number of particles will be noise particles. This is supported by the fact that the results for an active velocity of 4 and 8 generate the same results rather than having more clustering for higher activity. The simulations are also run in one, three and four dimensions. Given a spatial dimension- ality, the global density is chosen such that the ratio of noise particles is roughly 50% according to figure 7.2. Regardless of dimensionatily, when the ratio of noise particles was plotted as a function of Dr/De for different values of the active velocity ν, the resulting graphs have a similar shape as the graph shown in figure 7.4. This implies that in one, two, three and four dimensions, −1 the minimum active velocity required for MIPS to occur, is between 0 and 4res . If total simulation time T of the system is increased for a system with no repulsion, eventually all particles will form clusters. There are generally only very few, but very large clusters. Figure 7.5 visualizes this phenomenon as a heat map. The figure shows the local densities of the distribution of a two dimensional system with high attraction and no repulsion. The system is 2 a square with periodic boundary conditions and a surface of 625re . Although the system has a −2 global density of 0.3re , the local density at most points in this system is 0.

Figure 7.5: A snap shot of the mean field simulation of a system with high attraction and no −2 repulsion after a significant simulation time. The global density of the system is 0.3re . The largest cluster contains roughly 40% of all particles. Local density in the largest cluster exceeds −2 10re . The smallest cluster still contains 25% of all particles. Red represents a very high local density and yellow represents a low local density.

The three clusters move, but only very slowly. Each cluster is pulled by both other roughly equally as hard. Due to the random motion of each individual particle, the clusters also move slightly. However, it is very improbable that any particle is able to escape the cluster. This is

51 7.4 Run Time Improvement due to the fact when any one particle tries to escape, the entire cluster pulls on the particle. If all particles coincidentally happen to have the same orientation, the clusters can move as a whole. Eventually, the three clusters will meet. The clusters either meet each other simultaneously or one-by-one. In either case, when multiple clusters meet, they conjoin. This results in one large cluster containing all particles. Similar to the three smaller clusters, this large cluster barely moves. This phenomenon also occurs in one, three and four dimensional systems, but again under the condition that there is no repulsion and a significantly high simulation time. The found results were to be expected. A system with no repulsion allows for multiple particles on the same location. When multiple particles are close together, they will together pull in more particles. The random motion of the individual particles will eventually cause the particles to have little velocity while being inside the cluster, causing it to be trapped in the cluster. In the physical world, these results are meaningless. This is due to the fact that there is always a repulsive force between two particles,1 such as the coulomb force. However, these results may be interesting for more abstract particles, which may indeed not have a repulsive force. These could for example represent market prices or other financial concepts.

7.4 Run Time Improvement

From the theory in section 5.3, the total running time of the two type of simulations, are of a different order. The interacting particle simulation should run at O(N 2), whereas the mean field simulation is expected to run at O(N), where N is the total number of particles. To compare the run time of both simulations, the simulations are run with equal system parameters for different total number of particles. This is done in one, two, three and four dimensions. To compare the run time, the system parameters are irrelevant as long as the parameters are 1 equal in both systems. The size of the system is chosen to be 4000 d . The total number of time steps is chosen to be 100. All other parameters are set to unit and are thus equal to 1. The Mean Field simulation is run for three different total number of cells. The used processor is the Xeon E5-2683v4. Figure 7.6 shows a graph plotting the simulation results for the one dimensional case. The data points of the mean field simulations indeed appear to be linear. The interacting particle simulation’s data points are clearly not linear. The mean field data points and the interacting particle data points have linear fits and a quadratic fit respectively. The fit parameters of the linear fits have a relative error of at most 0.05. The relative errors of the fit parameters of the quadratic fit are bounded by 0.1. From the graph, it is clear that the slope of fit increases with an increasing number of cells. The slopes for 1, 1000, 2000 and 3000 cells are (7.5 ± 0.4) · 10−4 min, (4.9 ± 0.1) · 10−3 min, (9.3 ± 0.1) · 10−3 min and (12.7 ± 0.4) · 10−3 min respectively. From this it appears the slope of the fit is linearly dependent on the total number of cells. One would expect this correlation, as for a system with N particles and a approximated distribution with q cells, there are O(Nq) computations needed to update the compute the distribution and to update the particles. In two, three and four spatial dimensional systems, the results are very similar. The run time for the mean field simulation is fits linearly with respect to the total number of particles. The run time for the interacting particle simulation is quadratic with respect to the total number

1Quantum systems are excluded, as these systems cannot accurately be described by point particles.[21]

52 7.4 Run Time Improvement

Figure 7.6: A plotted graph showing the total run time of simulation of a one dimensional system with unit parameters and 100 time steps as a function of the number of particles in the system. of particles. This holds for all tested dimensions. In higher dimensional systems, the run time appears to be larger. Figure 7.7 shows an increased run time for higher dimensionalities. The correlation appears to be linear. This is expected, as all computations have to be done once for every spatial dimension. Different number of particles also show the same linear dependence of the running time on the spatial dimensionality.

Figure 7.7: The runtime as a function of the spatial dimensionality. The number of cells is 1000 and the number of particles is 1200.

53 Chapter 8

Conclusions

The aim of this project was to find and test a mean field description of a general system of interacting particles in arbitrary dimensions. In this report, a system is introduced, in which the particles interact according to newly introduced potential, referred to as the modified Morse potential. This is potential with a repulsive and an attractive part, which can be scaled relative to each other as described in section 4.2. A mathematical derivation and proof were given of a mean field equation in chapter 5. It was shown that this equation holds for the limit to infinitely many interacting particles. To find results in this mean field limit via simulation, computing time should theoretically be cut significantly from quadratic to linear. Interacting particle simulations and mean field simulations were run under similar initial conditions to find whether the results are indeed similar. In particular, liquid-gas phase separation was studied in both type of simulations to test the made algorithm on errors and bugs. In this chapter, conclusions are drawn for the main findings. Wherever appropriate, suggestions for further research are given in the discussion in chapter 9. Using the radial distribution function as an observable as described in subsection 6.3.3, it was found that the DBSCAN from subsection 6.3.1 with parameters minP ts = 2·d and  = 2·re can properly distinguish gas state particles from liquid-state particles as can be seen in figure 7.3. The particles that the DBSCAN labeled as core particles were expected to behave as liquid state particles and the radial distribution function showed that this was indeed the case. Similarly, the particles that were labeled to be noise indeed showed to behave as gas particles according to the radial distribution function. This confirmed that the DBSCAN is a proper tool to distinguish between gas particles and liquid particles and thus that the algorithm can be used to investigate phase separation phenomena. The made mean field algorithm do not appear to show any bugs or errors. This appears to hold both for the system calculation and the result analysis algorithms. In one, two, three and four dimensions for small simulation time, it was found small increase in global density results in significantly more and larger clusters. However, figure 7.5 indicates that these results may still be an artifact of the initialisation process. This means further research is required, in which simulations with larger simulation time are run, to conclude anything about phase separation. All systems were simulated twice in parallel. One of the simulations used a standard inter- acting particle algorithm which describes the system microscopically. The other simulation used an algorithm based on a mean field approximation and thus describes the system mesoscopically. In systems with 160 particles, it was found that the results generated by both simulation were significantly different. Additionally, the confidence interval of the observables generated by the mean field algorithm was in general larger than the confidence interval of the observables gener- ated by the standard interacting particle algorithm. However, for systems with more than 480

54 particles, there was no measurable difference between the observables of the two simulations. The run time of the simulations was measured as a function of number of particles. As expected, the interacting particle simulation runs in quadratic time with respect to the total number of particles, whereas the mean field simulation runs in linear time with respect to the total number of particles. This means that for large particle systems, a mean field simulation is much quicker than the standard interacting particle simulation. The number of cells in which the mean field is discretised must be chosen wisely, as run time of the mean field algorithm is linearly dependent on the number of cells. The number of cells can still be chosen significantly lower than the number of particles. The running time of both simulations is linearly dependent on the spatial dimensionality of the system. The mean field algorithm increases in accuracy for increasing number of particles. The mean field algorithm also has significantly lower computation time than the standard interactive particle simulation for high number of particles. In conclusion, the mean field algorithm appears to be eminently preferable compared to the alternative standard interactive particle algorithm systems with high number of particles. However, to conclude anything the phenomenon of phase- separation in either the mean field algorithm or the standard interactive particle algorithm in the system defined in section 4.2, a much larger simulation time is required. In current practise, the number of particles chosen in a simulation is generally very low compared to the actual number of particles in the physical system. This is done because of the fact that large particle systems cannot be simulated in reasonable time. Mean field simulations may offer a faster alternative to the standard used algorithm.

55 Chapter 9

Discussion

In this chapter, we reflect on the project. We discuss whether the goals have been met, look back to the process and give suggestions for further research.

9.1 Goals

This project had two main goals. The first was to develop a new algorithm which accurately and quickly simulates interacting particle simulations in a general case. The second was to investigate under which conditions liquid gas phase separation occurs. By the taking the mean field limit as an approximation for the interacting particle system, a new system of equations was indeed found. By discretising the mean field limit, an algorithm which describes the particle simulation was found. Simulations confirmed the theory that the run time of this algorithm was linearly dependent on the number of particles rather than quadratic. The algorithm was shown to be an accurate approximation of the interacting particle system. This means that the first goal was clearly reached. Liquid gas phase separation was explained. Then some data analysis tools were developed to quantify the clustering. The DBSCAN algorithm was tested to see whether it accurately distinguishes liquid state particles from gas state particles. It turned out that for appropriately chosen parameters of the algorithm, this is indeed the case. The simulations have been ran for a range of system parameters. Unfortunately, the results are not meaningful, as the simulation time was chosen too small. The effects of the initialisation were too much present. Further research with larger simulation time must be conducted to make accurate conclusion.

9.2 Process

A wide range of mathematics was used in the process of this project. An understanding of and some experience in measure theory, stochastics, analysis, differential equations and complex analysis are necessary to properly understand this project in its entirety. Initially it was expected measure theory and stochastics would be big part of this project. Only later it became clear that there is more mathematics to it. Particularly the proof of existence of the mean field equation (5.2.1) was unexpectedly challenging. The physics involved in this project is more straightforward and more easily understood. However, it was not trivial to find a proper quantification on the clustering process. Liquid

56 9.3 Further Research gas phase separation is essentially a qualitative phenomenon, but whether it occurs cannot be expressed in binary terms. A last unforeseen issue is the vast amount of data generated by one simulation alone. Each simulation generates a ton of data that all must be processed. This must be automated as it cannot be reasonably done manually.

9.3 Further Research

There are several suggestions for further research projects. These are listed below: • Section 5.3 found that the mean field limit theoretically is an exact solution for an infinite number of particles and the mean field becomes more exact for larger number of particles. The mean field approximation is a discretised version of the mean field limit. This was too found to be a very accurate approximation for large particle systems. It was not investigated what the correlation between the number of particles and the accuracy of the approximation is. It may be interesting to quantify the accuracy of the approximation and investigate how it behaves as a function of number of particles and number of discretised cells. • In the current simulation analysis, we mostly consider averages and variances of observables measured in one time frame. It may be interesting to consider observables for which a longer period of time is necessary. For example, once a cluster has been found, we may want to inspect how long that cluster exists. The longevity of cluster can be more closely investigated to more accurately describe under which conditions phase separation occurs. • The clusters form shapes. These shapes result in interesting material properties. It is yet unknown whether the shapes of the clusters in our system are entirely random or are some- how dependent on the system parameters. Finding whether there is a correlation between the system parameters and the shapes may be very useful. It may also be interesting to not use the DBSCAN algorithm, but rather the HDBSCAN algorithm. This algorithm can look further than the given parameter  to find larger structures and shapes. • A mesoscopic approximation was found to be very accurate for large particle systems. It may be interesting to further investigate the macroscopic description of the problem. Section 5.4 does give a macroscopic description in the form of a PDE, but this PDE has not been solved analytically nor numerically. • In addition to (or as part of) a macroscopic analysis, the behaviour of the free energy of the system as described in section 5.4.2 can be investigated. • The found parameter thresholds for which phase separation occurs were found very roughly. Far more simulations under different initial conditions must be done to find a more accurate relation between the system parameters and the clustering. More data must be gathered and investigated in order to understand the clustering in different dimensions process better. • In this project, only one, two, three and four dimensions were investigated in simulation. The mathematical model and simulations were developed to run for any spatial dimen- sionality. It may be interesting to investigate phase separation or other phenomena in systems with a high number of dimensions such as 37, or even extremely high number of dimensions (> 1000).

57 Bibliography

[1] T.M. Liggett. Interacting Particle Systems - An Introduction. University of California, 2002. [2] B. Øksendal. Stochastic Differential Equations, An Introduction with Applications. 6th ed. Springer, 2005. isbn: 7-5062-7308-X/O-570. [3] M.E. Cates and J. Tailleur. “Motility-Induced Phase Separation”. In: (2015). [4] P. Digregorio et al. “Full Phase Diagram of Active Brownian DIsks: From Melting to Motility-Induced Phase Separation”. In: (2018). [5] J.B. Reece et al. Campbell Biology. 10th ed. Pearson. [6] A.H. Carter. Classical and Statistical Thermodynamics. Pearson, 2000. [7] flocking_birds.dfx. https://manula.r.sizr.io/large/user/6101/img/node-particles- flocking-affector{_}v1.jpg. Accessed: 2019-05-28. [8] M. Ballerini et al. “Interaction ruling animal collective behavior depends on topoligical rather than metric distance: Evidence from a field study”. In: (2008). [9] T. Tao. An Introduction to Measure Theory. Graduate studies in mathematics. American Mathematical Society, 2011. isbn: 9781470411879. url: https : / / books . google . nl / books?id=eckAjwEACAAJ. [10] W.E. Boyce, R.C. Diprima, and D.B. Meade. Elementary Differential Equations and Bound- ary Value Problems. 11th ed. Wiley, 2017. isbn: 978-1-119-37792-4. [11] T. Apostol. Mathematical Analysis. 2nd ed. Pearson, 1973. [12] F. Bolley. “Separability and completeness for the Wasserstein distance”. In: (2006). [13] G. Teschl. Ordinary Differential Equations and Dynamical Systems. 2009. [14] V. Pata. “Fixed Point Theorems and Applications”. In: (2019). [15] J. Lei. “Convergence and Concentration of Emperical Measures under Wasserstein Distance in Unbounded Functional Spaces”. In: (2018). [16] G. Arfken. Mathematical Methods for Physicist. Academic Press, 1985, pp. 810–814. [17] M. Abramowitz and I. Stegun. Handbook of the Mathematical Functions with Formulas, Graphs and Mathematical Tables. United States Department of Commerce, National Bu- reau of Standards, 1964. [18] E. Martin et al. “A Density-Based Algorithm for Discovering Clusters in Large Spatial Database with Noise”. In: (1996). [19] WikiPedia DBSCAN. https://upload.wikimedia.org/wikipedia/commons/thumb/a/af/ DBSCAN-Illustration.svg/400px-DBSCAN-Illustration.svg.png. Accessed: 2019-05-25. [20] Digital Library of Mathematical Functions. https://dlmf.nist.gov/5.19#E4. Accessed: 2019-05-27. [21] D.J. Griffiths. Introduction to . 2nd ed. Cambridge University Press, 2016.

58 Appendix A

Simulation Source Code

Both simulations were written in Java version 1.9. A source library of the code can be found on GitHub https://github.com/MiloGrillo/BEP. In this chapter, we briefly discuss the source code of the set up of the simulations, the mean field simulation, the interacting simulation and the analysis of both simulations.

A.1 Simulation Set-Up

The simulations are both set up in a similar fashion. There are two important classes. These are the particle class and the distribution class. The particle class is a fairly simple class. It stores the position and the rotation vectors as arrays. The distribution class is a bit more complex. This class stores the d dimensional histogram in a one dimensional array. This is done is such a way, due to the fact it is impossible to initialize an array with d dimensional cells. To find the corresponding cell index given a d-dimensional index and vice versa, we use the following two functions int positionIndexToIndex(int[] positionIndex){ int index = 0; for(int d = 0; d < dimensions; d++) { index += Math.pow(numCells, d) * positionIndex[d]; } return index; } int[] indexToPositionIndex(int i){ int[] position = new int[dimensions]; float sum = 0; for(int j = 0; j < dimensions; j++) { position[j] = ((int) ((i - sum) / Math.pow(numCells, j)) % numCells); sum += position[j]; } return position; } Listing A.1: translate index to position and vice versa

The initialisation of the simulations is done as follows. The particles are placed uniformly randomly on the field. The rotation vector is the same for all particles and chosen size unity, such that it is indeed a vector on the unit sphere.

59 A.2 Mean Field Simulation

A.2 Mean Field Simulation

The mean field particles’ positions are updated via the convolution integral. float meanFieldIntegral(float posx[], float j, MeanFieldDistribution distribution){ double sum = 0; for(int q = 0; q < Math.pow(numCells, dimensions); q++){ sum += distribution.getDistribution()[q]/cellSize*convolution(posx, j, indexToCellCorner(q)); } return(float) sum; } double convolution(float[] pos, float j, float[] cellPos){ double prod1=1, prod2 =1; double factor1 = (Math.sqrt(a)*Da*4*a*Math.pow( Math.PI/a, (dimensions+2f)/2f) * Math.exp( a*re2))/pi32; double factor2 = (Math.sqrt(2*a)*Dr*4*a*Math.pow( Math.PI/(2*a), (dimensions+2f)/2f) * Math.exp( 2*a*re2))/pi32; for(int d = 0; d < cellPos.length; d++) { float bd = cellPos[d] + cellSize; float ad = cellPos[d]; if( d == j){ prod1 *= factor1 *(Math.exp(-a*(bd - pos[d])*(bd-pos[d])) - Math.exp(-a*(bd - pos[d])*(bd-pos[d]))); prod2 *= factor2 *(Math.exp(-2*a*(bd - pos[d])*(bd-pos[d])) - Math.exp(-2*a*(bd - pos[d])*(bd-pos[d]))); } else{ prod1 *= 0.5f*(errorFunction((bd - pos[d])* Math.sqrt(a) ) - errorFunction((ad - pos[d])* Math.sqrt(a))); prod2 *= 0.5f*(errorFunction((bd - pos[d])* Math.sqrt(2*a) ) - errorFunction((ad - pos[d])* Math.sqrt(2*a))); } } return prod1 - prod2; } Listing A.2: convolution integral

Here the .getDistribution() function returns the Mean Field Distribution approximation in his- togram form. The function errorFunction uses the error function approximation from Lemma 6.1.6.

A.3 Interacting Particle Simulation

The particle update for the interacting particle system is a bit more straightforward. float[][] update(Particle[] particle){ float[] newPosition = new float[dimensions]; float[] newRotation = new float[dimensions]; float[] brownianMotionRotation = new float[dimensions]; float[] brownianMotionPosition = new float[dimensions]; for(int d = 0; d < dimensions; d++){

60 A.3 Interacting Particle Simulation

brownianMotionRotation[d] = (float) rand.nextGaussian()*timestep2; brownianMotionPosition[d] = (float) rand.nextGaussian()*timestep2; } for(int d = 0; d < dimensions; d++){ newPosition[d] = position[d] + (float) (alpha / gamma * brownianMotionPosition[d]) + activeVelocity*rotation[d];

newRotation[d] = rotation[d] - (dimensions - 1f)/2f * rotation[d]; for(int d1 = 0; d1 < dimensions; d1++){ if(d1 == d){ newRotation[d] -= (1- rotation[d]*rotation[d1])* brownianMotionRotation[d1]; } newRotation[d] -= rotation[d]*rotation[d1]* brownianMotionRotation[d1]; } } for(int i = 0; i < particle.length; i++) { if(i == id){ continue;// No interaction with itself } float dist2 = distance2(position, particle[i].getPosition()); float factor = (float) (timestep/numParticles * 4*a*(-Dr * Math.exp(-2*a*(dist2-re2))+Da* Math.exp(-a*(dist2 - re2)))); for(int d = 0; d < dimensions; d++) { float dist; dist = position[d] - particle[i].getPosition()[d]; // Correct for the boundary conditions if(Math.abs(dist) == size/2){ continue; } if(dist > size/2){ dist = size - dist; } if(dist < size/2){ dist = dist - size; } newPosition[d] += dist*factor; } }

for(int d = 0; d < dimensions; d++) { if (newPosition[d] > size || newPosition[d] <= 0) { newPosition[d] = newPosition[d] % size; if (newPosition[d] < 0) { newPosition[d] += size; } } } float size = absolutValue(newRotation); if(size < 0.05){ newRotation = rotation; } else{ for(int d = 0; d < dimensions; d++) { newRotation[d] = newRotation[d]/size; } } float[][] newPosRot = new float[2][dimensions]; newPosRot[0] = newPosition;

61 A.4 Simulation Analysis

newPosRot[1] = newRotation; return newPosRot; } Listing A.3: particle update

A.4 Simulation Analysis

The simulation analysis consists of one loop, which iterates over the particle positions for each time. The first quarter of the time is ignored entirely. This is to lower the bias of the initialisation as much as possible. After the first quarter of time steps, the analysis keeps track of the minimum, maximum, average and variance of the parameters at interest.

62