Computational particle physics

In summary: According to the conversation, in summary, the speaker is trying to use a random number generator in FORTRAN to assign initial velocities to particles in a three-dimensional system. They are seeking advice on how to make the particles move with a specific weight, such as a Maxwellian distribution, and how to keep the particles with a probability proportional to their weight. They also mention struggling with making the particles gain initial weight and ask for suggestions on how to do so. They mention the possibility of changing the distribution to a loss cone and clarify that they are analyzing the particles' trajectories and final distribution function. They also express uncertainty about whether to use the Maxwell-Boltzmann speed or velocity distribution and ask for clarification on how to make a weighted sum over the particles
  • #1
mehdi6
4
0
Hi to all,
I have a random number generator in FORTRAN, which gives a random numbers to my particles initial velocity in three dimension (vx,vy,vz). If, I want to make my particles to embark to move with a specific weight (eg. Maxwellian), what should I do?

absv = sqrt(vx*vx+vy*vy+vz*vz)
wt= absv*absv*exp(-(absv*absv)/(a*a))
(a = sqrt(2*k*t/m))

if you simply plot any random numbers based on 'wt' you will get the maxwellian speed distribution as an output. I want to know, how can I make the 'wt' to be effective as a probability of particles initial distribution.
any suggestion is appreciated
 
Physics news on Phys.org
  • #2
If your initial velocities have a uniform distribution over some sufficient range: You can keep particles with a probability proportional to wt. You might lose most of them in the process, however. If you can keep them and assign a weight to them you might get better results.
Even better would be a process that directly produces Gaussian random numbers, e.g. via the Box-Muller transform.
 
  • #3
mfb said:
If your initial velocities have a uniform distribution over some sufficient range: You can keep particles with a probability proportional to wt. You might lose most of them in the process, however. If you can keep them and assign a weight to them you might get better results.
Even better would be a process that directly produces Gaussian random numbers, e.g. via the Box-Muller transform.

Thanks for your reply.
As you may know, the random generator produce a number between -1 to 1 for the 3 velocity components. I make the arrangement so the velocity would be around -0.35 to 0.35 for each of them (non-relativistic range).
My code is a test particle code, and I could make it work efficiently for each test particle in both constant and dipolar field (with or without Electric field(acc)), but still I am struggling with making the particles to move based on their initial weight. I don't even know, whether I need to use the Maxwell–Boltzmann speed distribution or Maxwell–Boltzmann velocity distribution which in concept, both are telling the same story but giving me different result.
https://en.wikipedia.org/wiki/Maxwell–Boltzmann_distribution
"You can keep particles with a probability proportional to wt" would you please tell me how?
I will be appreciated if you can guide me through, cause I have been struggling with this issue for a while.
Thanks again
 
  • #4
mfb said:
If your initial velocities have a uniform distribution over some sufficient range
I have generated those numbers by using a self made function, so it Not some pseudo random generator. I need to give my particles an specific ID's apart from just giving them random velocity. plus their distribution is not uniform in this domain (-0.35 up to 0.35).

Before I run the code, I need my particle to gain weight initially. If you plot the generated velocity over 'wt', you can find out that they follow the maxwellian, as I mentioned. The question simply comes down to a point that, how to make particles to gain initial weight? what should be done?

Modifying the way that I produce those random numbers (like Box-Muller transform) won't be the appropriate solution for that. later I may need to change the maxwellian to another type of distribution (eg. loss cone ), So the concept is what I am looking for which can be used in different situation.
please let me know if you have any suggestions.
Thanks.
 
  • #5
mehdi6 said:
making the particles to move based on their initial weight
What do you mean by that?
mehdi6 said:
I don't even know, whether I need to use the Maxwell–Boltzmann speed distribution or Maxwell–Boltzmann velocity distribution which in concept, both are telling the same story but giving me different result.
As long as the system is spherically symmetric they should give the same result. What exactly are you doing?
mehdi6 said:
"You can keep particles with a probability proportional to wt" would you please tell me how?
What is unclear? Just keep every particle. If you want to know some property of your gas, make a weighted sum over the particles.
mehdi6 said:
Before I run the code, I need my particle to gain weight initially.
Weight as in m*g or a mathematical weight? Why, how? Giving them a mathematical weight: Just assign the weight to each of them.
 
  • #6
mfb said:
What do you mean by that?
I meant Initial statistical weight.
mfb said:
As long as the system is spherically symmetric they should give the same result. What exactly are you doing?
I am trying to initially distribute my particle based on an specific statistical weight (e.g. maxwellian, loss cone or...) then put them in an specific field like dipolar field and analysis their trajectory. plus Analyzing and deriving the final distribution function (for large number of particles).
mfb said:
What is unclear? Just keep every particle. If you want to know some property of your gas, make a weighted sum over the particles.
maybe from your side everything is clear, but not in mine that's why I am asking question. My environment is solar atmosphere which is plasma. what is weighted sum over the particle? what does it represent?
mfb said:
Weight as in m*g or a mathematical weight? Why, how? Giving them a mathematical weight: Just assign the weight to each of them.
Statistical- I need to initialize them based on their density probability to see how the outcome would be.
by assigning you mean, simply multiplying the distribution function to the initial values? In any case?
 
  • #7
mehdi6 said:
I meant Initial statistical weight.
That answer doesn't clarify what you mean by "make them move based on a weight".
mehdi6 said:
what is weighted sum over the particle? what does it represent?
Whatever you want to observe. Velocity, density, ...
100 particles in some volume with a weight of 1/10 each are the same thing as 10 particles with a weight of 1 - but the former will typically lead to smaller statistical fluctuations and it can be easier to generate.
mehdi6 said:
Statistical- I need to initialize them based on their density probability to see how the outcome would be.
by assigning you mean, simply multiplying the distribution function to the initial values? In any case?
If I understand your question right: Yes.
 

1. What is computational particle physics?

Computational particle physics is a field of study that uses computer simulations and mathematical models to study the behavior and interactions of subatomic particles.

2. How is computational particle physics used in research?

Computational particle physics is used to simulate and analyze experimental data, predict the behavior of particles and their interactions, and test theories and hypotheses in the field of particle physics.

3. What techniques are used in computational particle physics?

Techniques used in computational particle physics include Monte Carlo simulations, numerical integration, and statistical analysis to model and study the behavior of particles and their interactions.

4. What are the benefits of using computational methods in particle physics?

The use of computational methods in particle physics allows for more precise and efficient analysis of complex data, as well as the ability to simulate and study particles and their interactions in environments that may be difficult or impossible to recreate in a laboratory setting.

5. What are some current areas of research in computational particle physics?

Some current areas of research in computational particle physics include the study of dark matter and dark energy, the search for new particles and forces, and the development of advanced simulations and models to better understand the fundamental laws of the universe.

Similar threads

  • High Energy, Nuclear, Particle Physics
Replies
3
Views
2K
  • Introductory Physics Homework Help
Replies
13
Views
2K
  • Special and General Relativity
Replies
11
Views
1K
  • Programming and Computer Science
Replies
2
Views
1K
  • Advanced Physics Homework Help
Replies
2
Views
1K
  • STEM Academic Advising
Replies
2
Views
873
  • Programming and Computer Science
Replies
4
Views
1K
  • High Energy, Nuclear, Particle Physics
Replies
1
Views
1K
  • Programming and Computer Science
Replies
12
Views
1K
Replies
15
Views
931
Back
Top