Page 377 - Numerical Methods for Chemical Engineering
P. 377

366     7 Probability theory and stochastic simulation



                   7.A.5. A simple model for the geometry of a polymer chain is to treat it as a 3-D random
                                                                                        [2]
                                                                                    [1]
                                                                                 [0]
                   walk of N steps, each of length l. The chain is described by a set of coordinates r ,r ,r ,
                                               [k]
                   ..., r  [N]  where the vector r  [k+1]  − r , between successive coordinates is of length l and is
                                                                          3
                   distributedisotropicallyin3-Dspace.Togeneratearandomvectorv∈  thatisisotropically
                   distributed, first generate a vector w with components w j = 2 × (rand − 0.5) ∈ [−1, +1],
                   where rand is uniformly distributed on [0, 1]. Then, if w lies within the unit sphere, rescale
                   it to 1 and accept the scaled vector as v. Otherwise, if it lies outside of the unit sphere,
                   generate a new w and try again.
                     Writeaprogramthatgeneratesrandomconformationsofapolymerchainwiththismodel,
                   and construct the resulting probability distribution of the end-to-end distance |r N − r 0 |.
                   Show that this model results in a Gaussian distribution of the end-to-end distance,
                                                    1
                                         U(|r N − r 0 |)             K        2
                      P(|r N − r 0 |) ∝ exp −          U(|r N − r 0 |) =  |r N − r 0 |  (7.272)
                                             k b T                   2
                   K is an effective spring constant that describes the free energy required to stretch the polymer
                   chain. Using your program, demonstrate that K is related to N and l by
                                                       3k b T
                                                  K =                                (7.273)
                                                       Nl  2
                   7.B.1. For the asset price model of Problem 7.A.2, compute the corresponding Fokker–
                   Planck equation and solve it for the probability P(S, t) that the asset has a price S at time t
                   over the year-long simulation period. Use the parameters and the initial condition given in
                   Problem 7.A.2.
                   7.B.2. Here, we demonstrate once more how Brownian dynamics relates to diffusive behav-
                   ior, by simulating spherical particles of radius 1 mm in water at room temperature. At time
                   t = 0, a particle is released at the origin and undergoes 3-D Brownian motion. Write a
                   program that repeats this simulation many times and plots the radial concentration profile
                   of particles as a function of time. It is easier to do the data analysis if you do the simulations
                   concurrently. Then, solve the corresponding time-dependent diffusion equation in spherical
                   coordinates and compare the results to that obtained from Brownian dynamics.

                   7.B.3. Diffusion limited aggregation is a process by which an agglomerate of small particles
                   grows through the slow addition of particles to its surface through diffusion. Here, you
                   are asked to simulate this process in two dimensions using a simple model of diffusion
                   on a lattice, to observe the fractal shape that results from this mode of growth. We first
                   define several radii R 0 < R end < R 1 < R 2 , and form a 2-D lattice of N × N unit cells with
                   N ≥ 2R 2 + 3. The center of this lattice is identified as the origin, and a matrix with elements
                   ϕ mn for each site (m, n) in the lattice is allocated to store a 0 if the cell is empty and 1 if it is
                   filled with a small particle. Let r mn be the distance from the cell to the origin. Initially, only
                   cells within a “seed particle” region with r mn ≤ R 0 are filled and the others are empty.
                     Then, a simulation is begun that consists of a sequence of particle insertions in an empty
                   cell (m, n) with r mn ≈ R 1 , followed by random displacements of the particle by one cell to
                   the top, right, bottom, or left. If at any time, the inserted particle neighbors a filled site, it is
                   assumed to “stick” to the aggregate, the current site is filled, and a new particle insertion is
                   performed. If at any time the particle diffuses outside of the escape radius R 2 , the diffusion
   372   373   374   375   376   377   378   379   380   381   382