|
OpenMPCD
|
Represents a Maxwell-Boltzmann distribution. More...
#include <MaxwellBoltzmannDistribution.hpp>
Public Member Functions | |
| template<typename RNG > | |
| FP | getRandomMaxwell (const FP m, const FP kT, RNG &rng) |
| Generates a random number drawn from the Maxwell-Boltzmann distribution. More... | |
| template<typename RNG > | |
| OpenMPCD::FP | getRandomMaxwell (const FP m, const FP kT, RNG &rng) |
Represents a Maxwell-Boltzmann distribution.
Definition at line 16 of file MaxwellBoltzmannDistribution.hpp.
| FP OpenMPCD::MaxwellBoltzmannDistribution::getRandomMaxwell | ( | const FP | m, |
| const FP | kT, | ||
| RNG & | rng | ||
| ) |
Generates a random number drawn from the Maxwell-Boltzmann distribution.
The Maxwell-Boltzmann distribution is given by \( \left(v\right) = \left( \frac{m}{2\pi kT} \right)^{\frac{3}{2}} \cdot 4\pi v^2 \exp\left(- \frac{m v^2}{2 kT} \right) \)
| RNG | The type of the random number generator. |
| [in] | m | The mass parameter. |
| [in] | kT | The Boltzmann constant times the temperature. |
| [in] | rng | The random number generator to use. |
1.8.17