Chapter 2. Brownian dynamics. 2.1 Introduction

Similar documents
Chapter 1 Introduction

Chapter 1 Direct Modeling for Computational Fluid Dynamics

CHAPTER V. Brownian motion. V.1 Langevin dynamics

This is a Gaussian probability centered around m = 0 (the most probable and mean position is the origin) and the mean square displacement m 2 = n,or

Stochastic Integration (Simple Version)

Direct Modeling for Computational Fluid Dynamics

Brownian Motion and Langevin Equations

4. The Green Kubo Relations

M4A42 APPLIED STOCHASTIC PROCESSES

Stochastic differential equation models in biology Susanne Ditlevsen

1. Introduction Systems evolving on widely separated time-scales represent a challenge for numerical simulations. A generic example is

Numerical Integration of SDEs: A Short Tutorial

The dynamics of small particles whose size is roughly 1 µmt or. smaller, in a fluid at room temperature, is extremely erratic, and is

7 The Navier-Stokes Equations

Stochastic Histories. Chapter Introduction

ON ALGORITHMS FOR BROWNIAN DYNAMICS COMPUTER SIMULATIONS

Stochastic Particle Methods for Rarefied Gases

Hierarchical Modeling of Complicated Systems

Continuum Limit of Forward Kolmogorov Equation Friday, March 06, :04 PM

Part III. Polymer Dynamics molecular models

Chapter 9: Statistical Mechanics

16. Working with the Langevin and Fokker-Planck equations

Introduction to Computer Simulations of Soft Matter Methodologies and Applications Boulder July, 19-20, 2012

Computational Fluid Dynamics Prof. Dr. Suman Chakraborty Department of Mechanical Engineering Indian Institute of Technology, Kharagpur

Lecture 12: Detailed balance and Eigenfunction methods

Langevin Methods. Burkhard Dünweg Max Planck Institute for Polymer Research Ackermannweg 10 D Mainz Germany

Treatment of Error in Experimental Measurements

Stochastic Structural Dynamics Prof. Dr. C. S. Manohar Department of Civil Engineering Indian Institute of Science, Bangalore

Handbook of Stochastic Methods

dynamical zeta functions: what, why and what are the good for?

Introduction to Diffusion Processes.

Motion in 1 Dimension. By Prof. Massimiliano Galeazzi, University of Miami

1. Introductory Examples

Some Terminology and Concepts that We will Use, But Not Emphasize (Section 6.2)

Stochastic equations for thermodynamics

Number-Flux Vector and Stress-Energy Tensor

Lecture 4: Numerical Solution of SDEs, Itô Taylor Series, Gaussian Approximations

Temporal Integrators for Langevin Equations with Applications to Fluctuating Hydrodynamics and Brownian Dynamics

2tdt 1 y = t2 + C y = which implies C = 1 and the solution is y = 1

2. As we shall see, we choose to write in terms of σ x because ( X ) 2 = σ 2 x.

Introduction to multiscale modeling and simulation. Explicit methods for ODEs : forward Euler. y n+1 = y n + tf(y n ) dy dt = f(y), y(0) = y 0

Introduction to multiscale modeling and simulation. Almost every system is multiscale.

Introduction to Computational Stochastic Differential Equations

Brownian Motion. An Undergraduate Introduction to Financial Mathematics. J. Robert Buchanan. J. Robert Buchanan Brownian Motion

Computational Fluid Dynamics Prof. Dr. SumanChakraborty Department of Mechanical Engineering Indian Institute of Technology, Kharagpur

Discretization of SDEs: Euler Methods and Beyond

Stochastic Differential Equations.

MICRO-MACRO METHODS FOR THE MULTISCALE SIMULATION OF VISCOELASTIC FLOW USING MOLECULAR MODELS OF KINETIC THEORY

Figure 1: Doing work on a block by pushing it across the floor.

Stochastic Calculus. Kevin Sinclair. August 2, 2016

The Polymers Tug Back

Linear Algebra and Robot Modeling

Signal Processing - Lecture 7

Example 4.1 Let X be a random variable and f(t) a given function of time. Then. Y (t) = f(t)x. Y (t) = X sin(ωt + δ)

Liouville Equation. q s = H p s

One-Variable Calculus

Lecture 11: Non-Equilibrium Statistical Physics

Numerical analysis for the BCF method in complex fluids simulations

A path integral approach to the Langevin equation

Lecture 12: Detailed balance and Eigenfunction methods

Physics 6010, Fall Relevant Sections in Text: Introduction

One-Parameter Processes, Usually Functions of Time

Stochastic continuity equation and related processes

Timeseries of Determinisic Dynamic Systems

Brownian motion and the Central Limit Theorem

The concentration of a drug in blood. Exponential decay. Different realizations. Exponential decay with noise. dc(t) dt.

Particle-Simulation Methods for Fluid Dynamics

Wave Mechanics Relevant sections in text: , 2.1

Week 9 Generators, duality, change of measure

SDE Coefficients. March 4, 2008

Differential Forms. Introduction

Gillespie s Algorithm and its Approximations. Des Higham Department of Mathematics and Statistics University of Strathclyde

An Overview of Fluid Animation. Christopher Batty March 11, 2014

Problems 5: Continuous Markov process and the diffusion equation

Lecture - 30 Stationary Processes

Stochastic Modelling in Climate Science

LANGEVIN EQUATION AND THERMODYNAMICS

MACROSCOPIC VARIABLES, THERMAL EQUILIBRIUM. Contents AND BOLTZMANN ENTROPY. 1 Macroscopic Variables 3. 2 Local quantities and Hydrodynamics fields 4

A Short Introduction to Diffusion Processes and Ito Calculus

Week 4: Differentiation for Functions of Several Variables

Lattice Boltzmann Method

Simulation Method for Solving Stochastic Differential Equations with Constant Diffusion Coefficients

Mesoscale Simulation Methods. Ronojoy Adhikari The Institute of Mathematical Sciences Chennai

Lecture 4: Numerical Solution of SDEs, Itô Taylor Series, Gaussian Process Approximations

Polymer Dynamics and Rheology

LANGEVIN THEORY OF BROWNIAN MOTION. Contents. 1 Langevin theory. 1 Langevin theory 1. 2 The Ornstein-Uhlenbeck process 8

Decoherence and the Classical Limit

Onsager theory: overview

MATH 320, WEEK 7: Matrices, Matrix Operations

Handbook of Stochastic Methods

1 Fundamentals. 1.1 Overview. 1.2 Units: Physics 704 Spring 2018

For those of you who are taking Calculus AB concurrently with AP Physics, I have developed a

Eulerian models. 2.1 Basic equations

Time-Dependent Statistical Mechanics 1. Introduction

Ordinary Differential Equations

Malliavin Calculus in Finance

Computational Techniques Prof. Sreenivas Jayanthi. Department of Chemical Engineering Indian institute of Technology, Madras

Mathematics that Every Physicist should Know: Scalar, Vector, and Tensor Fields in the Space of Real n- Dimensional Independent Variable with Metric

Controlled Diffusions and Hamilton-Jacobi Bellman Equations

Time-Dependent Statistical Mechanics 5. The classical atomic fluid, classical mechanics, and classical equilibrium statistical mechanics

Transcription:

Chapter 2 Brownian dynamics 2.1 Introduction The equations of physics are deterministic rather than stochastic in nature. Stochastic differential equations are used to approximate reality. They are introduced because systems are too complex to be described in detail, or simply because a detailed description is too difficult to handle. The stochastic aspect is introduced to model incomplete knowledge. Instead of describing a situation in full detail (a micro state) one describes possible situations, characterised by some coarse grained variable (defining a macro state). The most famous example of a stochastic differential equation is the Langevin equation which describes the highly irregular motion of a Brownian particle. The motion of a Brownian particle is the result of collisions with the many small solvent molecules surrounding it. In the ideal deterministic world the repetition of an experiment with identical initial conditions would give exactly the same final situation. This would require a full specification of the initial conditions of all the surrounding solvent molecules. In an experiment, however, when a Brownian particle is repeatedly released in a fluid, the trajectory of the particle will be different every time. Even if it where possible to give an identical initial condition to the Brownian particle in the different experiments, the initial conditions of the solvent molecules are beyond the control of the experimentalist. Variables which can not be controlled experimentally are usually not worth modelling in complete detail. A good, in some sense averaged description is to be preferred in this case. Instead of describing all the fluid molecules it is common practice to introduce a stochastic Brownian force. None of the individual stochastic Brownian particles moves along exactly the same trajectory as the original deterministic particle. However, the stochastic modelling can be called successful when, after averaging over many of these typical trajectories, values of average quantities, such as the mean square displacement as a function of time, coincide with experimentally determined values. Brownian dynamics is a simulation method to numerically solve so-called stochastic differential equations. A stochastic variable represents a whole range of possible values all with a probability measure associated to it. The stochastic variable is quite an abstract 9

10 CHAPTER 2. BROWNIAN DYNAMICS object. A natural way to think about it is in terms of realisations. These are the values the variable can obtain. To accurately represent a stochastic variable many of these realisations have to be considered simultaneously. The set of realisations is commonly referred to as the ensemble. In a strict sense this term denotes all possible realisations. In a more loose sense it is often used for the set of realisations used to approximate a stochastic variable. If the ensemble is obtained by sampling the probability distribution of the stochastic variable, expectation values of functions of the stochastic variable can be calculated by statistically averaging over the realisations. This averaging procedure is called ensemble averaging. In Brownian dynamics simulations the time-evolution of individual realisations of the stochastic variable is simulated. This time evolution is described by the stochastic differential equation. At each time step there are many possible ways for a realisation to evolve (all with a certain probability). Only one of the possible time increments of the realisation is actually chosen. This is performed in such a way that the probability distribution is sampled correctly. Physically relevant quantities are then obtained by ensemble averaging. The transition from a detailed deterministic description to a coarser stochastic one, can only be made with confidence if there is a gap in the spectrum of time scales. When this gap is large enough, the long-time dynamics becomes decorrelated from the dynamics at short times. In computer simulations a wide spectrum of time scales requires a large amount of CPU-time since the entire spectrum of time scales must be resolved. When the fast dynamics of the process is replaced by a stochastic process with zero correlation time the small time scales do not have to be resolved anymore. The spectrum becomes less wide and the required CPU-time will decrease dramatically. For example at this moment a very advanced molecular dynamics code, which simulates (somewhat coarse grained) atoms and their interactions, can compute a time interval of no more than 1µs. One important reason for this is that the very small time scales corresponding with molecular frequencies have to be resolved. The maximum time that can be reached is of course dependent on the available computer power, but will remain for too small for many years to come. In rheology, relevant macroscopic time scales are typically of the order of seconds or longer. A second reason why molecular dynamics is expensive, is the large number of particleparticle interactions that have to be taken into account. The number of operations grows with the square of the number of particles. To stop this rapid growth in CPU-time with increasing system size almost all molecular dynamics codes work with cutoff radii. Particles are modelled to interact with the particles in their neighbourhood only. To code this efficiently, constructs like neighbour lists are needed (see [1] and[2]). Nevertheless, handling many particle interaction causes a lot of overhead. In pure Brownian dynamics, i.e. the solving stochastic differential equations, realisations are modelled to be statistically independent. The only way in which other realisations are allowed to influence the evolution of a specific realisation is through macroscopic quantities (which may be averages over the whole ensemble). The statistical independence of realisations is a severely restrictive modelling assumption.

2.1. INTRODUCTION 11 For example, in stochastic modelling of polymeric liquids the entity one wants to describe is a single chain. The assumption of statistical independence of individual chains is most trivial for very dilute polymer solutions. Here individual polymers are so far apart that they effectively do not feel each other. At higher concentrations, polymers start interacting and are no longer independent. However, if one wants to use a single chain model, this interaction has to be modelled in a mean-field way. A good example of this is the modelling of liquid crystalline polymers in flow. Liquid crystal polymers are stiff, more or less rod-like, polymers. At sufficient high concentrations they therefore tend to align with each other. In this case, for the modelling of a single polymer, not only the flow is important, but also the average orientation of the surrounding polymers plays a role. The influence of the other polymers is accounted for in a mean field way. For highly concentrated solutions and melts of flexible polymers, an other concept, the tubeparadigm, has been developed. This is a single chain theory where a tube-like region is used to model the topological constraints that the surrounding polymers exert on the one under consideration. This is still a very active field of research and will be discussed in chapter 6. The most difficult regime to model, using single chain equations, is the semi-dilute regime. In this regime the polymer coils start to overlap, but not enough to use the tube-paradigm. At this moment there is no satisfactory kinetic theory for this intermediate regime. Because the replacement of many chain interactions by a single chain theory is often problematic, many simulation techniques have been developed which lie somewhere between pure Brownian dynamics (stochastic, independent realisations) and molecular dynamics (purely deterministic). These methods use stochastic forces to avoid solving the smallest time scales, but retain the many particle interactions. If the solvent is modelled as a continuum, this approach is still called Brownian dynamics. At the other end of the spectrum are molecular dynamics techniques which incorporate some fluctuating and dissipative forces. An example of such an intermediate simulation method is the so-called dissipative particle method [3]. In this method solvent blobs are treated as particles, which interact via a soft deterministic force, and experience dissipative and fluctuating forces. Because the coarse grained force is soft, the corresponding characteristic time scale is much larger than in pure molecular dynamics. As a result the dissipative particle method is able to reach rheologically relevant time scales. The methods described above are only applicable to kinematically simple flows. For the use in complex flow they are still much too time consuming. This is in contrast to pure Brownian dynamics simulation. In recent years, Brownian dynamics simulation of the polymer micro structure has been incorporated into macroscopic-flow solvers. The first calculations were performed using the CONNFFESSIT method of Laso and Öttinger [4]. A few years ago these calculations were made much more efficient by means of the Brownian configuration fields method introduced by [5]. The key conceptual step from CONNFFESSIT to Brownian configuration fields method is the step from volume averaging to ensemble averaging. This topic is quite related to the issue of statistical independence of realisations. For most phenomena occurring in polymeric liquids the relevant macroscopic length scale is orders of magnitude

12 CHAPTER 2. BROWNIAN DYNAMICS larger than the largest length scale associated with the polymer. Because of this, macroscopic quantities can be obtained by volume averaging, using volumes many times the microscopic length scales. This assumption forms the basis of continuum mechanics and it is used in the CONNFFESSIT method. In a CONNFFESSIT simulation, dumbbells (which model polymers) are dispersed randomly in the flow and are tracked while they deform. Stresses in a point in space are calculated by averaging over a large number of dumbbells in the neighbourhood of this point. In the Brownian configuration fields method ensemble averaging is used. An ensemble is defined In every point in space a large ensemble of dumbbells is associated. Since at every instant in time realisation located at different points in space do not interact with each other, the same random numbers can be used to simulate the ensembles located at the different positions. This does not influence the local average quantities that are needed to solve the balance equations. The use of the same random sequence everywhere in space causes single realisations to vary smoothly with position. Because spatial derivatives remain noise free so-called configuration fields can be introduced. These fields smoothly connect single realisations at different positions. In techniques where different random numbers are used for dumbbells located at different positions, spatial derivatives are highly fluctuating. Up to the introduction of approaches like the Brownian configuration fields method, only closed-form constitutive equations could be used to simulate a complex flow field. These equations are solely posed in terms of average quantities. Generally, equations derived by means of a kinetic theory can not be written in such a form. When trying to write down evolution equations for average values, one will find that no closed set of equations, using a finite number of unknowns, can be found. To obtain a finite number of equations, at some point averages should be re-expressed in already known averages. Such an approximation is called a closure approximation. Most closure approximations are quite severe approximations (see e.g. [6], [7], [8] and[9]). The fact that they can be circumvented by means of the Brownian configuration fields method is a big step forward. Initially, both CONNFFESSIT and the Brownian configuration fields method used dumbbell models. Dumbbells are crude, coarse grained, approximations of a polymer chain. Calculations with somewhat more advanced models, like the Doi-Edwards model, already have been performed [10]. Flow simulations using short bead-spring chains are expected to appear in literature soon. The use of more advanced models demands more CPU-time and memory. Because the extra computer time needed is not orders of magnitude larger, this kind of simulations are expected to be performed in the near future. In this chapter the main ideas of stochastic modelling will be introduced. To this end the basic principles of stochastic calculus will be presented. Extra emphasis is given to the Stratonovich interpretation of stochastic differential equations. It is shown that this viewpoint provides a valuable interpretation for modelling purposes. In chapter 3 this is demonstrated by means of that treats how a system that experiences Brownian motion under rigid constraints, e.g. bead-rod chains. The section on the basics of stochastic differential equations ends with the discussion of the connection between stochastic dif-

2.2. LITERATURE 13 ferential equations and the equivalent, probabilistic formalism using a Fokker-Planck equation. The next sections will deal with numerical methods to simulate stochastic differential equations. An important issue in the efficient simulation of stochastic processes is the reduction of noise, or variance reduction. After the discussion of the necessary mathematics and the numerical implementation, we will proceed with the fluctuation-dissipation theorem. Stochastic differential equations describing physics at a mesoscopic level have to be consistent with statistical mechanics. This consistency requirement gives rise to some limitations on the form of the stochastic differential equations. 2.2 Literature The theory of stochastic variables is a branch of mathematics. Many books have been written on the subject. They range from books on extremely formal mathematics to guides for writing computer code. The theory of stochastical differential equations has applications in a large number of disciplines. For any of these fields there are several books written on stochastic differential equations and how to apply them. In physics there are two standard texts on stochastics, namely Gardiner [11] and van Kampen [12]. Another useful book, especially on Green-Kubo relations, is the book by Kubo et al. [13]. With the rise in popularity of kinetic theory in rheology, also stochastic differential equations have become popular. The book by Bird et al. [14] is the standard text on kinetic theory for rheological systems. It is extremely thorough but uses solely Fokker- Planck equations. Another landmark book on the kinetic approach is the book by Doi and Edwards [15]. The most important book on the application of stochastic differential equations for the numerical solution of kinetic equations in rheology is the book by Öttinger [16]. It starts from the basis and works up to the frontier of the field. Last, the book by Kloeden and Platen is worth mentioning. This is the encyclopedia of algorithms for solving stochastic differential equations [17]. 2.3 The basics of stochastic differential equations The terminology stochastic differential equations suggests a very broad class of equations. The properties of a stochastic variable can range anywhere from almost deterministic to totally uncorrelated in time. In the deterministic case knowing the value of a variable at one instant in time, means knowing (or at least being able to predict) it at any later time. In the totally uncorrelated situation knowing a variable at one point in time provides no information for future values of the variable, even for a very small time increment. Differential equations for such variables that cover the extreme cases, and the whole spectrum of partially correlated situations in between, gives a very large

14 CHAPTER 2. BROWNIAN DYNAMICS and complicated extension of the theory for ordinary differential equations. The common use of stochastic differential equations indicates a small subclass of this large class. Here an infinitesimal time increment of a variable is made up of a deterministic increment plus a completely uncorrelated (to all previous times) stochastic contribution. When adding many uncorrelated stochastic variables, one obtains a stochastic variable that has a Gaussian distribution. Because of the central importance of Gaussian variables for the theory of stochastic differential equations, we will start discussing those. Then we proceed to treat the Wiener process. This is a time dependent stochastic variable with normally distributed, uncorrelated increments. Knowing the Wiener process and its properties is enough to develop the calculus for stochastic differential equations. A single realisation of a Wiener process is continuous, but the derivative is defined nowhere. Therefore ordinary differential calculus can not be applied. However, only a slight generalisation is needed to obtain a calculus valid for stochastic differential equations. This generalisation is the so called Ito-calculus. To describe a stochastic process in an unambiguous way, one has to agree on the interpretation of the equation. Two of the most common used interpretations are the Ito interpretation and the Stratonovich interpretation. The Ito interpretation is most practical for computations and the Stratonovich interpretation appeals more to physical intuition. In this thesis the standard notation is used, with some small extensions. If no special typography appears, a stochastic equation is to be interpreted in the Ito way. An open dot indicates Stratonovich interpretation. The Stratonovich interpretation is most useful for modelling purposes. The understanding of its derivation (as a smooth limit from finite correlation time to zero correlation time), makes it straightforward to derive physically valid equations. Furthermore, by using it effectively one can derive stochastic equations (sometimes with mixed Stratonovich-Ito interpretations), which are free of terms containing derivatives. These equations can be discretised in a straightforward way, without the need to evaluate the numerically troublesome derivatives. The methodology introduced in the section on the Stratonovich interpretation will be used extensively throughout this thesis. Most importantly it will be used to derive a very general expression for constrained stochastic motion in the next chapter. Most of the results written in this chapter are very basic to the theory of stochastic differential equations and can be found in standard textbooks. The motivation for writing it nonetheless, is twofold. Firstly, the derivations presented here differ from most of the derivations in textbooks because they are relatively simple and quick. There is one really important result in the calculus of stochastic differential equations (dw 2 = dt). Only remembering this result, and using it consistently, is enough to reconstruct the whole set of other, less basic, results. By emphasising this point now and showing the quick way of deriving these results, a powerful tool for working with stochastic differential equations is provided. The second motivation is another point we want to make. As is shown below there is an equivalence relation between stochastic differential equations and Fokker-Planck equations. Many results in literature are obtained by repeatedly switching

2.3. THE BASICS OF STOCHASTIC DIFFERENTIAL EQUATIONS 15 between these two equivalent representations. Probably many authors feel insecure when they have to rely on SDE s alone. In many other cases stochastic differential equations are seen as just a computational tool for numerically solving the Fokker- Planck equations. Even in many recent papers on Brownian dynamics the stochastic differential equation is only introduced in a discretised (Euler forward) way. In this thesis it is shown that the stochastic differential equation is a very powerful mathematical tool in itself. Understanding the few subtleties involved is enough to quickly derive very useful relationships. No Fokker-Planck equations are needed. This point will become very clear when we address the problem of deriving valid equations for constrained Brownian motion in the next chapter. 2.3.1 Gaussian variables Gaussian or normal distributions are abundant in physics. For example measurement errors are expected to be distributed normally most of the times. The frequent appearance of Gaussian distributions is due to the Central Limit theorem. When summing many independent stochastic variables (with the same variance) the resulting variable will be normally distributed. Below we will demonstrate the appearance of the Gaussian distribution for the case of a variable G, which is a sum of N independent stochastic variables U j all with variance U 2 and zero mean. The central limit theorem is a bit more general, a small amount of dependence is in fact allowed. For our proof G will be taken to be normalised to have variance 1 G = 1 N U 2 N U j. (2.1) j=1 We will use the fact that the expectation value of exp(ikg), the so-called characteristic function (see [12]), is a Fourier transform of the probability density function of the variable G, i.e. p(g) exp(ikg) = exp(ikg)p(g)dg. (2.2) At the end, using a Fourier transform, the characteristic function will be used to obtain the probability density. By substituting, Eq. (2.1) into the left-hand side of Eq. (2.2),

16 CHAPTER 2. BROWNIAN DYNAMICS we obtain, up to first order in the small variable (here N 1 ), exp(ikg) = 1 exp(ik N U 2 = = N U j ) = j=1 N U j exp(ik N U 2 ) j=1 N [ U 1+ik N U 2 1 U 2 2 k2 N U 2 + O(N 3 ] 2 ) j=1 N [ 1 1 2 k2 /N + O(N 3 ] N 2 ) = exp [ 1 ] 2 k2 /N + O(N 3 2 ) j=1. =exp( 1 2 k2 ), j=1 (2.3) where we used the fact that the U j s are independent. The symbol =. will be used throughout this thesis to indicate approximations accurate up to the lowest non-fractional order of the small variable or time step. In the Taylor expansion no second order term occurs because this term is proportional to the mean of U which is zero. The backward Fourier transformation now gives p(g) = 1 exp(ikg) exp( ikg)dk 2π. = 1 exp( 1 (2.4) 2 2π 2 k2 )exp( ikg)dk = π exp( G2 2 ), i.e. a normal distribution with variance 1. 2.3.2 The Wiener process The Wiener process W (t) is a time dependent Gaussian variable. For non-overlapping time intervals of possibly different lengths t i the increments of the process, i.e. W i = W (t i + t i ) W (t i ), are uncorrelated W i W j = δ ij t i. (2.5) The most essential part of the Wiener process is this statistical independence of nonoverlapping time intervals. The fact that the Wiener process is Gaussian is a consequence of this, as is proven in the previous section. According to Eq. (2.5) the time increment of a Wiener process scales as W t ( W 2 = t). This implies that the Wiener process is non differentiable, since W/ t diverges for t 0. Another way of defining the Wiener process, often found in literature, is the following W (t 1 )W (t 2 ) =min(t 1,t 2 ). (2.6) This relation is obtained by demanding that W (0) = 0. The initial value is not relevant for stochastic differential equations. Only the time increments are important. Because t = 0 is in general of no special importance, this definition may lead to confusion.

2.3. THE BASICS OF STOCHASTIC DIFFERENTIAL EQUATIONS 17 2.3.3 The stochastic differential equation The general stochastic differential equation is of the form dx = Ādt + B dw. (2.7) In the case of the motion of a Brownian particle, denotes the position, Ā models a deterministic drift term, e.g. caused by gravity. The X Brownian motion is modelled by the second, stochastic, term, where the tensor is related to the the diffusion tensor. Because the Wiener process is non-differentiable, B the equation can not be written as an ordinary differential equation. In fact Eq. (2.7) is an integral relation and it is more correct to write it as X (t) X (0) = t 0 Ā(X (t ))dt + t 0 B (X (t )) dw (t ). (2.8) Because of the stochastic nature of the Wiener process there are a few subtleties to be considered when dealing integrals that contain the Wiener increment. Therefore we first consider the definition of the stochastic integral of some stochastic variable G(t). If we use the Riemann sum to define the integral we obtain t t 0 G(t ) dw (t ). = lim t 0 N 1 i=0 N 1 G(t i ) W i = lim t 0 i=0 G(t i )(W (t i + t) W (t i )), (2.9) where t t 0 = N t. It is important to note that in this definition the integrand G(t) is evaluated at the start of each time increment. This is called the Ito interpretation. In the modelling of physical systems, stochastic processes such as G(t) are non-anticipating. In other words: they do not anticipate the future evolution of totally random variables. How could they? For the present discussion it means that G at time t i is uncorrelated with any future increment of the Wiener process. This implies that G(t i )(W(t i + t i ) W (t i )) =0andfromEq.(2.9) wethusobtain t G(t ) dw (t ) =0. (2.10) t 0 Evaluating the integrand in the Riemann sum (Eq. (2.9)) at a different position in the interval, N 1 i=0 G(ˆt)(W (t i + t) W (t i )), with t i < ˆt <t i + t (2.11) will give a different outcome to the sum. This means that, when writing down a stochastic integral (or a stochastic differential equation), one has to agree upon the interpretation. If not mentioned otherwise most authors imply the Ito interpretation. For the purpose of making a calculus for stochastic differential equations and also for interpreting definitions of stochastic differential equations other than the Ito interpretation (see 2.3.5), it is important to know how to compute Riemann sums for which

18 CHAPTER 2. BROWNIAN DYNAMICS the integrand is not evaluated at the beginning of each time interval. Suppose that G is a function of a stochastic variable X(t), which is related to a Wiener process by means of a stochastic differential equation such as Eq. (2.7). Using this function G(X(t)) we will perform a stochastic integral using the same Wiener process. Individual terms in the Riemann sum will be of the form G(X(t ))(W (t i + t i ) W (t i )), (2.12) with t i <t <t i + t i. To interpret these terms correctly up to O( t) (which is sufficient to calculate the limit t 0 of the Riemann sum) G(X(t )) has to be expanded up to first order in X(t ) X(t i ). This first order term will have a contribution proportional to W (t ) W (t i ). Because it is then multiplied by W (t i + t i ) W (t i ) it will give rise to a O( t) term in the Riemann sum, Eq. (2.12). In the limit t 0, the extra contribution which is obtained when interpreting integrals in a non-ito way, can formally always be written as f(t )dw 2 (t ), (2.13) (which is rather a strange form because the differential squared appears in a single integral). The most important premise in the calculus of stochastic differential equations is that dw 2 (t) =dt. (2.14) This statement means that in the integral above this substitution can be made, without influencing the final result. The proof of the identity is obtained by a calculation of the expectation value of the difference of the original expression and the expression obtained by substitution of Eq. (2.14). [ N 1 i=0 N 1 N 1 = = = i=0 N 1 i=0 N 1 i=0 j=0 N 1 j=0. = O( t) f(t i ) W 2 i N 1 i=0 f(t i ) t i ] 2 [ ] f(t i )f(t j ) Wi 2 W j 2 2 t i Wj 2 + t i t j ] f(t i )f(t j ) [(1 + 2δ ij ) t i t j 2 t i t j + t i t j N 1 f(t i )f(t j )2δ ij t i t j j=0 t t 0 f 2 (t )dt, (2.15)

2.3. THE BASICS OF STOCHASTIC DIFFERENTIAL EQUATIONS 19 where we used that W 2 = t and W 4 =3 t 2 (which is obtained from a standard result for Gaussian variables with zero mean: G 4 =3 G 2 2 ). So in the limit t 0 the difference disappears, which proves the permissibility of the substitution Eq. (2.14) in the stochastic integral. 2.3.4 Ito calculus If we look at the differential of a function f(x ) of the stochastic variable X,obeying Eq. (2.7), an important extension of the chain-rule for ordinary differential equations arises. Because stochastic increments have a component proportional to t, the function has to be expanded up to second order in the stochastic increments to be correct up to first order in the time step. This expansion of f(x) gives f = X f + 1 2 X X : f + O( X3 ) = Ā f t +(B T f) + W 1 2 (B W )( W B T ): f + O( t 3 2 ) (2.16) =[Ā f + 1 2 (B B T ): f] t +(B T f) + O( t W 3 2 ) In going from the second to the third line we made the substitution = W W δ t, where δ is the unit tensor. The error that is introduced by this is O( t 3 2 ) and thus disappears for t 0. Compared to the deterministic case the resulting differential expression for df has an extra deterministic term df =[Ā f + 1 2 (B B T ): f] dt +(B T f). (2.17) dw This generalisation of the chain rule is often referred to as the Ito formula. To end the discussion of the stochastic integral we finish with a remark on the stochastic term. The vector is a Gaussian variable with zero mean. The Gaussian property implies that the second B dw moment (given by (B dw )(B dw ) = B B T dt) determines the full statistics and thus all the physics. This second moment tensor is proportional to the diffusion tensor, which is defined as D = 1 2 B B T. (2.18) The tensor is a square symmetric positive tensor. This means that there can be lot of redundant D information in. A whole class of s are in fact equivalent. The first observation concerning this B redundancy is that it B makes no physical sense to use a vector of Wiener processes with a higher dimension than the dimension of. The second observation is that even if is square, but not positive-symmetric, a large X part of the information contained in its B components is redundant. For all purposes one is therefore allowed to use B = 2D. (2.19)

20 CHAPTER 2. BROWNIAN DYNAMICS Throughout this thesis we will use this form as a shorthand. The benefit is that this emphasises the relation between and the diffusion tensor. In a numerical implementation, however, it is probably not B at all beneficial to use a symmetric positive form for B. When needs to be computed from a known diffusion tensor, a Cholesky decomposition will be B the most appropriate choice. 2.3.5 The Stratonovich interpretation As discussed in 2.3.3 stochastic integrals can be interpreted in many ways. Depending on where the integrand is evaluated in the intervals building up a Riemann sum, the outcome will be different. Besides the Ito interpretation, another interpretation, called the Stratonovich interpretation, is used in this thesis. The latter interpretation is indicated by the use of a special typography, namely an open dot ( ). In the Stratonovich interpretation of the stochastic integral, integrands are evaluated at the midpoint of each time interval. The need to expand expressions to second order in time disappears if one uses this midpoint evaluation, as midpoint evaluation gives second order accuracy in the increments (i.e. first order in the time step). Midpoint evaluation of the stochastic integral gives t t 0 G(t ) dw (t ). = = n G(t i + 1 2 t i) W i i=1 n G(t i + 1 2 t i)(w (t i + t) W (t i )). i=1 (2.20) Note that the formulas Eq. (2.8) andeq.(2.20) are not equivalent. An important observation to this respect is that the expectation value for the Stratonovich integral is not zero. Even if a non-anticipating stochastic variable G, the value evaluated at t i + 1 t 2 i is already partially correlated with W i. Now suppose that G is a continuous differentiable function of the stochastic variable X(t), where X(t) depends via a stochastic differential equation on the Wiener process, as in Eq. (2.7). The question one needs to answer before being able to evaluate the Riemann sum is what G(X(t i + 1 t)) W 2 i looks like. To obtain an order t correct expression, the only part that matters at the midpoint is the part of the increment of G that scales as t and correlates with the Wiener process. The conditional expectation value for the Wiener process at the midpoint of the interval when knowing the increment over the full interval, is E ( W (t i + 1 2 t i) W (t i ) W (t i+1 ) W (t i ) ) = 1 2 (W (t i+1) W (t i )). (2.21) The noise around the mean value is uncorrelated to the total Wiener increment. Therefore it does not contribute an order t in the finite difference increment. The fact that only the mean value of the Wiener process in the midpoint is important, is directly

2.3. THE BASICS OF STOCHASTIC DIFFERENTIAL EQUATIONS 21 carried over to the stochastic variable X(t), therefore we have G(t i + 1 2 t) W i = G(X(t i + 1 2 t)) W i = G(X i + 1 2 X i) W i + O( t 3 2 ) (2.22) =[G(X i )+ 1 2 X i G (X i )] W i + O( t 3 2 ), which is the same result ordinary calculus would have given. Calculus is much easier using the Stratonovich interpretation. Because of the second order accuracy of the midpoint evaluation, all the ordinary calculus rules are valid if one consistently uses the open dot, e.g. df = f dx. (2.23) This can easily be verified by applying Eq. (2.22) and inserting a stochastic differential equation for. Expanding everything up to second order in the Wiener increments and setting X = δ dt gives the Ito formula Eq. (2.7). The dw typical dw Stratonovich differential equation looks like dx = Ā dt + B dw. (2.24) Again this is not equivalent to the visually similar Ito variant Eq. (2.7). To relate the Stratonovich interpretation to the Ito interpretation one should perform the usual second order expansion B dw. = B (t + 1 dt) 2 dw =[B + 1 ] 2 dx B dw (2.25) Then the Ito equivalent of Eq. (2.24) is = B dw + 1 2 dw B T B dw = B dw + 1 2 B T : B T dt =(Ā + dx 1 2 B T : B T ) dt +. (2.26) B dw This shows that for problems in which the diffusion tensor is independent of the position the Ito interpretation and the Stratonovich interpretation of a stochastic differential equation are equivalent. For many rheological relevant systems, such as bead-spring chains in isothermal flow, the generalised diffusion tensor is indeed independent of bead positions. For systems with constraints such as bead-rod chains this is, however, not the case. Here matters of interpretation are important.

22 CHAPTER 2. BROWNIAN DYNAMICS The Stratonovich interpretation is of a more physical nature. The reason for this is the time symmetry of the midpoint evaluation. In nature there are no processes with zero correlation time, only processes with very small correlation time. The limit towards zero correlation time is smooth if the Stratonovich interpretation is used. To demonstrate this, let us consider a stochastic process U(t) with a finite correlation time τ. If we take the limit τ 0, U(t) becomes a Wiener process. The Ito calculus of stochastic differential equations is needed because realisations are non-differentiable. This is a direct consequence of the fact that the correlation time of the Wiener process is zero. Differential equations with stochastic processes with a finite correlation time obey ordinary calculus because here the time derivative is defined. So let us start with the equation Ẋ(t) =B(X) U(t). (2.27) We are interested in increments over times which are long compared to the correlation time τ. For t<τwe expect U 2 t 2. For large increments, however, we expect that U 2 t. This is caused by the fact that a large increment consists of a large number of nearly independent subincrements. Therefore the variance becomes proportional to the number of subincrements, i.e. proportional to time. We choose U(t) such that U(0) = 0, and that for time intervals much larger than τ U 2 = t. To be first-order accurate in time the relations for X have to be expanded up to second order in U. X = = = = t 0 t 0 t 0 t t =0 Ẋ(t )dt, B(X(t )) U(t ) dt with t τ [B(X 0 )+B (X 0 ) X(t )+O( X 2 )] U(t ) dt [ t B(X 0 )+B (X 0 ) t =0. = B(X 0 ) U + B (X 0 )B(X 0 ) 1 2 U 2. ] B(X 0 ) U(t )dt + O( X 2 ) The last step can be proven most easily going the other way around U 2 = = =2 t t =0 t t t =0 t =0 t t t =0 U(t )dt t t =0 t =0 U(t )dt = U(t ) U(t )dt dt + U(t ) U(t )dt dt. t t t =0 t =0 t t t =0 t =0 U(t ) dt U(t ) U(t )dt dt U(t ) U(t )dt dt (2.28) (2.29) After having integrated over a time t τ, the limit τ 0 can be safely made. In this limit U(t) becomes, as a consequence of the central limit theorem, a Gaussian

2.3. THE BASICS OF STOCHASTIC DIFFERENTIAL EQUATIONS 23 variable (see 2.3.1). Furthermore, its increments are statistically independent. These facts combined with the special choice for the normalisation of increments U gives that U(t) becomes a Wiener process. This observation reduces Eq. (2.28) to dx = B(X)dW + 1 2 B (X)B(X) dw 2 = B(X + 1 dx) dw 2 (2.30) = B(X) dw. The fact that in the limit very small correlation times the Stratonovich interpretation arises will be used many times in the next chapter. Results that will be derived using it are: the fluctuation-dissipation theorem, the general equation for constrained systems and the different equations of motion for rigid and very stiff systems. To be able to follow these derivations it is necessary to understand the derivation given above. In this thesis the open dot ( ) will not only indicate the Stratonovich interpretation. It also implies an dot product. Besides pure Ito expressions and pure Stratonovich expressions, also mixed expressions will be encountered. An example would be ]. (2.31) B [C dx The finite difference equivalent which is implied by this expression is given by B (t + 1 t) (t) (t + t) (t)]. (2.32) 2 C [X X 2.3.6 The Fokker-Planck equation Stochastic differential equations are equivalent to probabilistic Fokker-Planck equations. To show what the correspondence is between a stochastic differential equation and the Fokker-Planck equation we use a simple identity for the probability density (t) x ), (2.33) p(x,t)= δ(x where δ(...) is the delta function and the time evolution of (t) is given by Eq. (2.7). We now consider a time differential with the x-coordinate X fixed. At the right hand side of Eq. (2.33). For reasons discussed extensively above, wehavetodoa(formal)expansionintodx this expansion has to be second order in the increments t p(x,t)= (t) x ) t δ(x = 1 dt dx (t) x )+ Xδ(X 1 2 dx dx : X X (t) x ) δ(x = 1 x (t) x )+ dt dx δ(x 1 2 dx dx : x x (t) x ) δ(x = 1 [ x (t) x ) + dt dx δ(x 1 ] (2.34) 2 x x : (t) x ) dx dx δ(x = x (t) x ) + Ā(X )δ(x 1 2 x x : B T ) (t) x ) (X B (X )δ(x = x (t) x ) + x x : (t) x ) Ā(X )δ(x D (X )δ(x = x [Ā(x ) p(x,t)] + x x (x ) p(x, t)], :[D

24 CHAPTER 2. BROWNIAN DYNAMICS here Ā and are the standard coefficients in the Ito stochastic differential equation Eq. (2.7). So B Eq. (2.34) provides the link between the stochastic equation Eq. (2.7) and the corresponding Fokker-Planck equation. A useful form of the Fokker-Planck equation is the form that most explicitly expresses the conservation of probability p + =0, (2.35) t J where is the probability flux. This flux can be identified to be J J (x ) =Ā(x )p(x ) (x )p(x )]. (2.36) [D 2.4 On different representations of a stochastic process A stochastic variable consists of two main ingredients, namely all possible realisations and the statistical weight connected to these realisations, i.e. the probability measure. The stochastic differential equations and the Fokker-Planck equation are just two possible representations of the time evolution of a stochastic process. In a stochastic differential equation individual realisations are tracked. The realisation evolves and the statistical weight is fixed. A probability density function used in the Fokker-Planck formulation gives the probability measure associated with any given realisation. In a sense the realisations are used as labels. This means realisations are fixed and the associated statistical weights evolve. In addition to these two fairly common representations many alternative representations are possible as well. For example, if one is interested in instantaneous quantities only, and not in time correlations, the set of all moments of the probability distribution fully characterises a stochastic variable. One can write down an evolution equation for these moments. When trying to solve this set of equations numerically one will find that closure approximations are needed. To illustrate that many more representations are possible we devised a mixed stochastic probabilistic representation. This method is presented in appendix 2.A. In the discretised form the stochastic variable is represented by a finite number of realisations. With all realisations a probability (or weight factor) is associated. Both the realisations and the statistical weight evolve in such a way that the stochastic differential equation is obeyed approximately. This means that in this approach neither the value, nor the weight is fixed. Although different representations of a stochastic process are equivalent, having more representations can be very useful. Different representations can be seen as limits of different and more general theories. Conversely, different representations can be generalised to different theories. For example, the generalisation the zero correlated Wiener process to finitely correlated stochastic processes is trivial in the case of stochastic differential equations, but almost impossible for the description in terms of Fokker-Planck equations.

2.5. DISCRETISATION 25 A practical reason for exploring different representations of a stochastic process is that they mostly require different numerical discretisation methods and hence the nature of the discretisation errors will be different for different representations. In the case of stochastic differential equations, only a finite number of realisations can be considered and a time-discretisation error will occur. The statistical error will diminish with the inverse of the square root of the number of realisations. When discretising a Fokker-Planck equation a space and a time-discretisation error have to be considered. Discretisation of a high dimensional Fokker-Planck equation is almost impossible. The spatial discretisation error will in general be proportional to some low power of the grid spacing. To obtain accurate results, grid spacings must be quite small. In a high dimensional space this results in a very large number of discretisation points. For Brownian dynamics computations, as those presented in chapter 4, the CPU-time increases only linearly with the number of state variables. A representation that might give rise to discretisations that perform beyond the capabilities of ordinary Brownian dynamics is the path integral formulation. Here every possible trajectory (or path) through the space of states is given a probability measure. Expectation values can be calculated by integrating over all possible paths. In this perspective the use of Brownian dynamics to solve path integrals is equivalent to using Monte Carlo methods for solving ordinary integrals. This analogy opens the door to further improve the simple Brownian dynamics algorithm. For example one can use a different stochastic process to sample the paths. These paths have then to be weighted correctly. This method is called importance sampling. It is a so called variance reduction method and discussed briefly in 2.5.4. For solving high dimensional integrals, quasi Monte Carlo methods are known to perform best. Here points are not picked in a completely random uncorrelated way. Maybe similar methods can also be used to pick paths to achieve an efficiency much higher than normal Brownian dynamics offers. 2.5 Discretisation As discussed earlier, Brownian dynamics is a technique to numerically solve stochastic differential equations. In this method the time evolution of individual realisations of a stochastic variable is simulated. Averaged quantities can be determined at any instant in time by statistically averaging over (preferably) a large number of independent realisations. The discretisation of stochastic differential equations for the use in Brownian dynamics codes is either very straightforward or extremely complicated. This depends on the fact whether we want a first-order or higher-order accuracy. 2.5.1 Euler-forward The numerical simulation of the first-order, Euler-forward discretisation of an Ito-stochastic differential equation is easy. The Ito-stochastic differential equation is in fact defined as the limit of an Euler forward discretisation with t 0, see 2.3.3. Thisthus

26 CHAPTER 2. BROWNIAN DYNAMICS immediately gives (t) ) t + ) (t). (2.37) X =Ā(X B (X W The only difficulty might seem the numerical generation of the Wiener process. The increment of a Wiener process is Gaussian with variance t. There are standard routines to generate Gaussian variables, but it is not at all necessary to generate a Gaussian variable. The third order moment of a Gaussian variable is zero, and the fourth order moment is 3 t 2. All higher order moments go to zero faster than O( t). This means that to simulate an increment of the Wiener process which is correct up to order t, any process will do provided it has a zero mean, variance t, and all higher order moments decrease faster than O( t). The second constraint is that the random steps are independent (or that at least the correlation is less than O( t)). A sum of these independent random steps will converge toward a Gaussian distribution, as expected (see 2.3.1). The simplest adequate distribution is a two point distribution consisting of { t, t}, both sampled with equal probability. In our simulations we use a uniformly distributed variable on [ 3 t, 3 t] generated by a pseudo random generator based on an addand-carry random generator proposed in [18]. 2.5.2 Midpoint algorithm The midpoint algorithm is a finite difference implementation of Stratonovich stochastic differential equations. Formally every Stratonovich equation can be rewritten as an Ito equation and vice versa. Very often, in cases where the diffusion tensor is position dependent, a Stratonovich interpretation (or a mixed Stratonovich-Ito equation) gives the simplest looking equations. Rewriting this equation in a pure Ito form then gives rise to derivatives of e.g. the diffusion tensor. Quantity like this are hard to evaluate numerically. In those situations the approach presented here is to be preferred. The finite difference approximation of a Stratonovich stochastic differential equation gives an implicit equation = ) dt + ), (2.38) dx Ā(X B (X dw X. = ) dt + Ā(X B (X + 1 ) 2 X W (2.39) To implement this numerically one can first perform a predictor step to estimate the midpoint, and subsequently a corrector step to compute the difference with the needed order t accuracy. The simplest implementation looks like pred = (t)) (t) X B (X W (t) (t)) t + X =Ā(X B (X (t)+1 2 X pred ) (t). W (2.40)

2.5. DISCRETISATION 27 The predictor step only has to be order t accurate. This means that the deterministic part does not have to be included, and that only the stochastic term is evaluated in the estimated midpoint. For a general stochastic differential equation, including the deterministic term in the predictor step and evaluating the deterministic term in the corrector step at the midpoint does not increase the overall order of the scheme. In the special case of a constant diffusion tensor, order t 2 schemes can be found, using a two-step predictor-corrector scheme. This scheme will be treated in the next section. 2.5.3 Higher-order methods In this thesis no higher-order integration methods will be used. The motivation not to use them is twofold. Firstly, they are complicated and therefore relatively expensive to evaluate. Secondly, most of the time the statistical error is dominant, therefore there is little gain in using them. Higher-order time integration methods for stochastic differential equations are notoriously difficult. The reason can be made intuitively clear. The usual higher-order methods are most appropriate for functions that are differentiable several times. Stochastic processes are not differentiable even once. Nevertheless higher-order algorithms can be found. Starting from the identity f(t) =f(0) + t 0 df (t ), (2.41) a generalised Taylor series can be created. The procedure is to apply the Ito formula Eq. (2.17) for df. Subsequently, the identity is used again for the new terms and one can continue this approach in an iterative manner. The multidimensional integrals that show up in this calculation, are mixed integrals over the time variable and Wiener processes. These integrals are complicated to evaluate and many subtleties related to stochastic calculus appear. An algorithm that is consistent with a cut-off Taylor expansion is said to show strong convergence with a certain order. Strong convergence measures the rate convergence of individual realisations, i.e. paths, to the zero time step result. An easier approach to developing higher order algorithms is to start from the Taylor expansion of f. This quantity obeys an ordinary differential equation. If an algorithm calculates the expectation values for a large class of functions correctly to within a specified order, this order denotes characterises the rate of weak convergence. Maybe a trivial, but important, remark is that usually Brownian dynamics algorithms are not strongly convergent at all. When using smaller time steps usually a different sequence of random numbers will be used. Therefore the realisations will evolve in a totally different way. To check strong convergence takes some effort as it must be performed in a counter intuitive way. One has to start with small Wiener increments. The next run the time step is doubled and sums of the smaller Wiener processes of the previous run can be used, etc.. It is often stated that in order to visualise a stochastic process (i.e. make a movie of an individual realisation) it is necessary to use a strongly convergent algorithm. This