第三次计算物理作业
------分子动力学
问题:
Put 20 particles in a 10X10 box with periodic boundary conditions, with initial speed v=0 in randomly chose directions. The time step was 0.02. Simulate the system and plot the positions of the particles after every third time step.
1、
Calculate the speed distribution of different time intervals (a)t=0-20, (b) t=20-40, (c) t=40-60 calculate the mean-square displacement of an atom as a function of time.
2、Show that the motion is indeed diffusive
解:
1、子程序:
随机撒点的子程序
subroutine init(x,y,vx,vy,xp,yp) integer,parameter :: L=10 integer,parameter :: N=20 real,parameter :: e=0.1 integer a(L,L) real x(N),y(N),xp(N),yp(N) real :: dr=0.1 real p,q,rnd1,rnd2 integer i,j integer :: k=1 do i=1,L do j=1,L a(i,j)=0 end do end do do while(k10) then y(k)=y(k)-10.0 end if a(ceiling(p*L),ceiling(q*L))=1 xp(k)=x(k) yp(k)=y(k) k=k+1 end if end do return end
!在y方向有小的扰动
!标记已用过的格点
计算力的子程序 subroutine Force(x,y,dx,dy,Fx,Fy) implicit none integer,parameter :: N=20 integer,parameter :: L=10 real :: x(N),y(N),xp(N),yp(N),vx(N),vy(N),LL(N),Fx(N),Fy(N),r(N),dx(N),dy(N),rr(N) integer j,k,i open(unit=20,file="f.txt") do i=1,20
!每次计算使力归零
Fx(i)=0.0
Fy(i)=0.0
end do do i=1,20 do k=1,20 dx(k)=0.0 dy(k)=0.0 rr(k)=0.0 end do do j=1,20 if(j/=i) then dx(j)=x(i)-y(j) dy(j)=y(i)-y(j) if (dx(j)>0.0) then if(dx(j)>l-dx(j))then dx(j)=dx(j)-l end if end if if(dx(j)l+dx(j))then dx(j)=dx(j)+l end if end if if(dy(j)>0.0)then if(dy(j)>=l-dy(j))then dy(j)=dy(j)-l end if end if if(dy(j)l+dy(j))then dy(j)=dy(j)+l
end
Related Documents: Essay about Boundary Value Problem and Integer I, J Integer
w2 (t) be two independent Brownian Motions, that is, for each value of t, w1 , w2 are independent random variables. Then w1 (0) = w2 (0) = 0, E(w1 ) = E(w2 ) = 0 and 2 2 E(w1 ) = E(w2 ) = t E(w1 w2 ) = E(w2 w1 ) = 0 Let W = Then WWT = 2 w1 w1 w2 2 w2 w1 w2 2 E(w1 ) E(w1 w2 ) 2 E(w2 w1 ) E(w2 ) w1 w2 E(W W T ) = = 1 0 t = It 0 1 Now let z1 (t), z2 (t) be two (possibly) correlated Brownian Motions, that is, for each value of t, 2 2 E(z1 ) = E(z2 ) = t E(z1 z2 ) = E(z2 z1 ) = ρ12…
THE DESIGN AND IMPLEMENTATION OF AN E-COMMERCE SITE FOR ONLINE BOOK SALES By tefera awetahegn Project Report Submitted to the faculty of the University Graduate School in partial fulfillment of the requirements for the degree Master of Science in the Department of Computer and Information Sciences mekelle university May 2007 Committee Members: Abstract The business-to-consumer aspect of electronic commerce (e-commerce) is the most visible business use of the World Wide Web. The…
environment. The idea is to minimize the use of natural resources and to preserve them and focus more on alternative methods. Electrical & Electronic equipment is one of the largest growing waste streams globally, According to solve the E-waste problem (StEP) Initiative showed that in year 2011-12 almost 48.9 million metric tons of used electrical and electronic products waste generated. Hence, for a sustainable environment and the economic recovery of valuable material for reuse, the efficient…
three types of cluster detection methods. The first type is global test (Moran’s I statistic, Geary’s C statistic) which uses a single quantity to summarize the degree to which an observed spatial pattern deviates from random pattern. The observed value of global test is compared with the expected value null hypothesis of spatial randomness, and the comparison leads to acceptance or rejection of the null. The problem of global test is that it does not give a direct indication about the size and location…
Decision Making Process “Decision making is the study of identifying and choosing alternatives based on the values and preferences of the decision maker. Making a decision implies that there are alternative choices to be considered, and in such a case we want not only to identify as many of these alternatives as possible but to choose the one that best fits with our goals, objectives, desires, values, and so on.” (Harris (1980)) According to Baker et al. (2001), decision making should start with the identification…
performance. The knowledge base on which supply chain management is based is still in flux and surrounded by controversy. For example, there is disagreement over the very nomenclature applied – are we dealing with supply chains, supply chain networks or value chain networks? For the purposes of this note, we shall conform to common usage by using the term ‘supply chain management’. *Corresponding author. Email: decampos@msu.edu Ó 2013 Taylor & Francis…
Operating Manager in Information Systems CASE STUDY I-1 IMT Custom Machine Company, Inc.: Selection of an Information Technology Platform CASE STUDY I-2 VoIP2.biz, Inc.: Deciding on the Next Steps for a VoIP Supplier CASE STUDY I-3 The VoIP Adoption at Butler University CASE STUDY I-4 Supporting Mobile Health Clinics: The Children’s Health Fund of New York City CASE STUDY I-5 Data Governance at InsuraCorp CASE STUDY I-6 H.H. Gregg’s Appliances, Inc.: Deciding on a…