[关闭]
@2014301020081 2017-01-07T05:29:32.000000Z 字数 5142 阅读 1051

The homework of the end of term-----random walk about problem 7.1,7.2,7.3

kongdefeng 2014301020081


1.Abstract

Calculate the diffusion constant and make comparison of random walk in three dimension for simple-cubic lattice ,face-centered and body-centered cubic lattice.
Simulate a random walk in three dimensions allowing the walker to make steps of unit length in random direction.
Investigate the behavior of a random walk in which the probabilities for different step directions are not equal.

2key words

random walk
Cubic crystal system
dimension

3.background

1.Problem

7.1 Caculate the diffusion constant analytically for the random-walk simulations in Figure 7.3 and Figure 7.4.Can you generalize your analytic results to a wilder class of lattice types such as a two-dimensional triangular lattice,or a there-dimensional face-centered or body-centered cubic lattice?
7.2 Simulate a random walk in three dimensions allowing the walker to make steps of unit length in random directions; don't restrict the walker to sites on a discrete lattice.show that the motion is diffussive,that is ,<>~t.Find the value of the proportionality constant.
7.3 investigate the behavior of a random walk in which the probabilities for different step directions are not equal.

2.Introduction

Random walk

此处输入图片的描述
A random walk is a mathematical object which describes a path that consists of a succession of random steps. For example, the path traced by a molecule as it travels in a liquid or a gas, the search path of a foraging animal, superstring behavior, the price of a fluctuating stock and the financial status of a gambler can all be approximated by random walk models, even though they may not be truly random in reality. As illustrated by those examples, random walks have applications to many scientific fields including ecology, psychology, computer science, physics, chemistry, and biology, and also to economics. Random walks explain the observed behaviors of many processes in these fields, and thus serve as a fundamental model for the recorded stochastic activity. As a more mathematical application, the value of pi can be approximated by the usage of random walk in agent-based modelling environment.1 The term random walk was first introduced by Karl Pearson in 1905.
此处输入图片的描述random walk in two dimensions
此处输入图片的描述random walk in three dimensions

Lattice random walk

A popular random walk model is that of a random walk on a regular lattice, where at each step the location jumps to another site according to some probability distribution. In a simple random walk, the location can only jump to neighboring sites of the lattice, forming a lattice path. In simple symmetric random walk on a locally finite lattice, the probabilities of the location jumping to each one of its immediate neighbours are the same. The best studied example is of random walk on the d-dimensional integer lattice .
此处输入图片的描述
If the state space is limited to finite dimensions, the random walk model is called bordered symmetric random walk and the transition probabilities depend on the location of the state, because on margin and corner states the movement is limited.

Cubic crystal system

There are three main varieties of these crystals:
Primitive cubic (abbreviated cPand alternatively called simple cubic)
Body-centered cubic (abbreviated cIor bcc),
Face-centered cubic (abbreviated cF or fcc, and alternatively called cubic close-packed or ccp)

Each is subdivided into other variants listed below. Note that although the unit cell in these crystals is conventionally taken to be a cube, the primitive unit cell often is not. This is related to the fact that in most cubic crystal systems, there is more than one atom per cubic unit cell.

此处输入图片的描述

4.The body and conclusion

For problem 7.1:
for random walk in one dimension:
此处输入图片的描述
code
此处输入图片的描述
code
the slope of line is 1,from the pattern of 7.1 so D=1/2.

for a there-dimensional face-centered or body-centered cubic lattice:
此处输入图片的描述
we can see for every point,there are 6 points of peak and 12 points of face-centered.I assume 18 points is equally probable.Based on my assumtion,I make the code of in a there-dimensional face-centered cubic lattice.
for a there-dimensional body-centered cubic lattice:
此处输入图片的描述
we can see for every point,there are 6 points of peak and 8 points of body-centered.I also assume 14 points is equally probable.

to contrast:
I make a figure including the random walk(for one walker ,1000 steps)in three dimensions for simple-cubic lattice ,face-centered and body-centered cubic lattice.
此处输入图片的描述
code
此处输入图片的描述
code
此处输入图片的描述
code

for simple-cubic lattice ,face-centered and body-centered cubic lattice.
此处输入图片的描述
code
from figure,we can see for simple-cubic lattice. for face-centered cubic lattice.
for body-centered cubic lattice.
There are also diffusion,just the rate of diffusion is different.

For problem 7.2:
we don't restrict the directions.the dirctions is random in three dimensions.the steps is constant.so we can use spherical coordinate frame to express the position of every step.
此处输入图片的描述
for x=rcossin ,y=rsinsin,z=rcos.
we can make the code as fllow:

  1. self.rad1=rd.uniform(0, np.pi)
  2. self.rad2=rd.uniform(0, 2*np.pi)
  3. #self.r=rd.uniform(0, 10)
  4. self.x=self.x+self.r*np.cos(self.rad2)*np.sin(self.rad1)
  5. self.y=self.y+self.r*np.sin(self.rad2)*np.sin(self.rad1)
  6. self.z=self.z+self.r*np.cos(self.rad1)
  7. self.r2ave[i+1]=self.r2ave[i+1]+self.x**2+self.y**2+self.z**2

此处输入图片的描述
code

It's also diffusion ,D=1/2
we can also make the r random just from 0 to 10,we can get :
此处输入图片的描述
It's also linear,just D is different.

For problem 7.3:
we can consider one-dimensional walk with Pleft=0.25and Pright=0.75.
from the code of problem 7.1,we can change the probabilities simply
and get the figure of Pleft=0.25and Pright=0.75.
此处输入图片的描述
It's not linear,but by observing the curve,we can make the figure of ogarithmic coordinates to slove the problem.
此处输入图片的描述
code
We can see .it's also diffusive,just the rate of diffusion is faster than equal probabilities.

5.thanks

Computational Physics using MATLAB®
Wikipedia

添加新批注
在作者公开此批注前,只有你和作者可见。
回复批注