Solving Monte Carlo Method Smoluchowski Equation Problem

  • Thread starter Feynman
  • Start date
In summary, the conversation is about a problem with the Monte Carlo method for Smoluchowski equation in Maple. The positions of particles are not changing and the user is seeking help to find the problem. The code for the method is shown, including the calculation of natural and uniform random numbers. The issue with updating the positions of particles at time t+dt is discussed and the conversation ends with a request for correction.
  • #1
Feynman
159
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
 
Mathematics news on Phys.org
  • #2
I couldn't help myself...

LUIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIII IIIIIIIIIII
Inta SCOTEEEEEEEEEEEEEEEEEEEEEEEEEEEE
 
  • #3
Code:
\\ position of particules at time t+dt=t+1/20

for i from 1 to 10
 do
     if 
         r[i]>1/(20*z[i]) or r[i]=1/(20*z[i])
           then
             z(t+dt)[i]=z[i]: 
           end if;
     if 
         r[i]<1/(20*z[i])
            then 
               z(t+dt)[i]=z[i]+z[pi[i]]:
            end if;       
 od:

These lines look strange to me:
z(t+dt)=z:
z(t+dt)=z+z[pi]:

First, the := means assignment.
So, you might have meant:
z(t+dt) := z+z[pi]:

Second, what kind of maple object is z(t+dt)?
Do you mean to "update" the z[] array, e.g.
z := z+z[pi]:
?
 
  • #4
so please correct me this program please
Thanks
 

1. What is the Monte Carlo Method?

The Monte Carlo Method is a computational technique used to solve complex problems by generating random samples and using probability distributions to simulate various scenarios. It is commonly used in science and engineering to solve problems that involve multiple variables and uncertain outcomes.

2. What is the Smoluchowski Equation?

The Smoluchowski Equation is a mathematical model that describes the behavior of particles in a system undergoing Brownian motion. It is used to calculate the time evolution of the particle concentration in a system and is often used in the study of reaction kinetics and diffusion processes.

3. How does the Monte Carlo Method solve the Smoluchowski Equation problem?

The Monte Carlo Method uses random sampling and probability distributions to simulate the behavior of particles in a system described by the Smoluchowski Equation. By generating a large number of random samples, the method can approximate the solution to the equation and provide insights into the behavior of the system.

4. What are the benefits of using the Monte Carlo Method to solve the Smoluchowski Equation problem?

One of the main benefits of using the Monte Carlo Method is its ability to handle complex systems with multiple variables and uncertainties. It also provides a more accurate solution compared to traditional analytical methods, as it takes into account the random nature of particle behavior. Additionally, the method can be easily adapted to model various scenarios and conditions.

5. Are there any limitations to using the Monte Carlo Method for solving the Smoluchowski Equation problem?

While the Monte Carlo Method is a powerful tool, it does have some limitations. It can be computationally intensive, requiring a large number of samples to accurately simulate a system. Additionally, the method relies on the accuracy of the probability distributions used, so it is important to choose appropriate distributions for the system being modeled. Finally, the method may not be suitable for systems with highly non-linear behavior or strong correlations between variables.

Similar threads

  • Programming and Computer Science
Replies
1
Views
872
Replies
6
Views
1K
  • Atomic and Condensed Matter
Replies
3
Views
766
Replies
0
Views
2K
  • Programming and Computer Science
Replies
1
Views
662
  • Set Theory, Logic, Probability, Statistics
Replies
7
Views
1K
  • General Math
Replies
1
Views
161
  • Set Theory, Logic, Probability, Statistics
Replies
2
Views
1K
  • Calculus and Beyond Homework Help
Replies
1
Views
875
Replies
6
Views
945
Back
Top