1
$\begingroup$

Some context: I'm trying to make a molecular dynamics simulation in python and want to initialise the velocities of all particles according to some temperature T.

The Maxwell-Boltzmann distribution (if I understand it correctly) is for the distribution of speeds and not for the component-wise velocities.

What I want to do is pick the velocities, component-wise from some probability density. So what probability denisity would I use? Should I use the Maxwell-Boltzmann distribution itself? And if so then what would be the mean velocity in each direction?

My overall doubt roots from the question: Does the Maxwell-Boltzmann distribution behave same for speeds as well as component-wise velocities?

EDIT: Thanks @GeorgioP. Also just to sum it up

  • If we're picking velocities in one dimension we use the density:

$$ f(v_x) = \sqrt{\dfrac{kT}{m}}\:\cdot\:e^{-\dfrac{mv_x^2}{2kT}} $$

and

  • if we're picking speeds then :

$$ f(v) = ({\dfrac{kT}{m}})^{3/2}\:\cdot\:e^{-\dfrac{mv^2}{2kT}} $$

Check out http://hyperphysics.phy-astr.gsu.edu/hbase/Kinetic/maxspe.html for more clarity.

$\endgroup$

1 Answer 1

0
$\begingroup$

At constant temperature, each cartesian component of the velocity $v_i$, ($i = x,y,z$) has a gaussian probability distribution proportional to $e^{\frac12\beta mv_i^2}$ ($\beta = \frac{1}{k_BT}$).

However, it may be useful to know that even if you do not initialize velocities according to their asymptotic equilibrium distribution, relaxation towards equilibrium velocity distribution is quit a fast process and even initial conditions far from the equilibrium can be used.

$\endgroup$
2
  • $\begingroup$ Regarding your last paragraph: true, but the. You don’t get to pick the temperature! $\endgroup$ Commented May 29, 2020 at 23:59
  • 1
    $\begingroup$ @JahanClaes Even starting with the Maxwell-Boltzman distribution does not help to pick the temperature: Redistribution of energy among potential and kinetic energy usually results in a change of temperature with respect to the starting one. In order to have control on the final temperature, either a simulation thermostat or at last a few rescaling of velocities are always needed. $\endgroup$ Commented May 31, 2020 at 6:00

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.