Monte Carlo method for Smoluchowski equation

In summary, the conversation was about a problem with the Monte Carlo method for the Smoluchowski equation in a Maple program. The issue was with the positions of particles not changing, and the question was where the problem was. The conversation included a method for calculating natural random numbers and uniform random numbers, as well as a code for determining the position of particles at a certain time. The expert's response was that the code explicitly states that the position at t+dt is equal to the position at t, which may be incorrect.
  • #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
 
Physics news on Phys.org
  • #2
I guess that r>1/(20*z) is "always" true. Then you have z[t+dt](i)=z[t] explicitly in your code.
 
  • #3


Hi there,

I am not familiar with the specific programming language or method you are using, but I can provide some general insights on the Monte Carlo method for Smoluchowski equation.

The Monte Carlo method is a simulation technique used to solve complex mathematical problems by generating random numbers and using them to approximate the solution. In the context of the Smoluchowski equation, this method is used to simulate the motion of particles in a fluid.

From the code provided, it seems like you are generating random numbers to represent the positions (z) and velocities (pi) of the particles. However, the problem you are facing is that the positions of the particles (z) are not changing.

One possible reason for this could be that your code is not properly updating the positions of the particles. In the for loop, you are only checking for certain conditions and setting the position of the particle at the next time step (t+dt) to be equal to its current position (z). This may not accurately simulate the movement of particles as they should be changing positions over time.

I suggest reviewing your code and making sure that the positions of the particles are being properly updated at each time step. You may also want to consider using a different method or checking for any errors in your code.

I hope this helps and good luck with your programming!
 

1. What is the Monte Carlo method for Smoluchowski equation?

The Monte Carlo method for Smoluchowski equation is a computational technique used to solve the time-dependent Smoluchowski equation, which describes the dynamics of particles in a medium. It involves simulating the Brownian motion of particles and calculating their trajectories to determine the evolution of the system over time.

2. How does the Monte Carlo method work?

The Monte Carlo method works by randomly sampling the position and velocity of particles and using this information to simulate their movement over time. This is done through repeated iterations, where the position and velocity of each particle are updated based on their interactions with other particles and the surrounding medium. The results from these simulations are then averaged to obtain the solution to the Smoluchowski equation.

3. What are the advantages of using the Monte Carlo method for Smoluchowski equation?

The Monte Carlo method allows for the simulation of complex systems with many interacting particles, which would be difficult or impossible to solve analytically. It also allows for the inclusion of stochastic effects, such as Brownian motion, which are important in many physical and biological systems. Additionally, the Monte Carlo method is highly parallelizable, making it efficient for large-scale simulations.

4. What are the limitations of the Monte Carlo method for Smoluchowski equation?

One of the main limitations of the Monte Carlo method for Smoluchowski equation is that it is a probabilistic approach, so the results may contain statistical errors. This can be mitigated by running multiple simulations and averaging the results. Additionally, the accuracy of the results may be affected by the chosen sampling algorithm and the number of particles included in the simulation.

5. What are some applications of the Monte Carlo method for Smoluchowski equation?

The Monte Carlo method for Smoluchowski equation has been applied to a wide range of systems, including diffusion processes, chemical reactions, and biological systems such as protein folding. It is also commonly used in materials science, for example, to study the dynamics of nanoparticles in a fluid or to simulate the growth of crystal structures. Additionally, the Monte Carlo method has applications in finance, where it is used to model stock prices and other financial processes.

Similar threads

  • Set Theory, Logic, Probability, Statistics
Replies
2
Views
1K
  • Set Theory, Logic, Probability, Statistics
Replies
7
Views
1K
  • Set Theory, Logic, Probability, Statistics
Replies
2
Views
790
  • Programming and Computer Science
Replies
1
Views
965
  • Programming and Computer Science
Replies
1
Views
749
Replies
0
Views
2K
  • Atomic and Condensed Matter
Replies
3
Views
860
  • Set Theory, Logic, Probability, Statistics
Replies
4
Views
2K
  • Calculus and Beyond Homework Help
Replies
1
Views
896
  • Programming and Computer Science
Replies
1
Views
1K
Back
Top