Monte Carlo method for Smoluchowski equation

AI Thread Summary
The discussion centers on a programming issue related to the Monte Carlo method for the Smoluchowski equation, specifically in Maple. The user reports that the positions of particles, denoted as z[l], are not changing as expected during the simulation. A potential problem identified is that the condition r[i] > 1/(20*z[i]) may always evaluate to true, resulting in no updates to the particle positions. The code logic suggests that if this condition holds, z[t+dt][i] remains equal to z[i], preventing any movement. The user seeks assistance in resolving this issue to achieve the desired dynamic behavior of particle positions.
Feynman
Messages
152
Reaction score
0
Hi every body,
i've a simple question in the programation for a certain methode called Monte Carlo method for Smoluchowski equation:
i programe this method in maple but the problem is that the positions of particules z[l]is not changing ( it most be changed ): can anyone tell me where is the problem?
this is the method:

//calculate natural random numbers
test:=proc(N)
local a,i,L;
L:=[];
a:=rand(1..N):
for i from 1 to N do L:=[op(L),a()] od;
L;
end:
\\z is the position of particules
z:=test(10);

pi:=test(10);
\\ calculate uniform random numbers U[0,1]

r:=stats[random, uniform](10):for i from 1 to 10
do
printf("r[%d]=%f\n",i,r);
od;

\\ position of particules at time t+dt=t+1/20

for i from 1 to 10
do
if
r>1/(20*z) or r=1/(20*z)
then
z(t+dt)=z:
end if;
if
r<1/(20*z)
then
z(t+dt)=z+z[pi]:
end if;
od:
thankx verry much
 
Physics news on Phys.org
I guess that r>1/(20*z) is "always" true. Then you have z[t+dt](i)=z[t] explicitly in your code.
 
I was reading documentation about the soundness and completeness of logic formal systems. Consider the following $$\vdash_S \phi$$ where ##S## is the proof-system making part the formal system and ##\phi## is a wff (well formed formula) of the formal language. Note the blank on left of the turnstile symbol ##\vdash_S##, as far as I can tell it actually represents the empty set. So what does it mean ? I guess it actually means ##\phi## is a theorem of the formal system, i.e. there is a...
Back
Top