|
MolSim
|
Utility function(s) for working with Maxwell-Boltzmann distributions. More...
#include <array>#include <random>Go to the source code of this file.
Functions | |
| std::array< double, 3 > | maxwellBoltzmannDistributedVelocity (double averageVelocity, size_t dimensions) |
| Generate a random velocity vector according to the Maxwell-Boltzmann distribution, with a given average velocity. | |
Utility function(s) for working with Maxwell-Boltzmann distributions.
|
inline |
Generate a random velocity vector according to the Maxwell-Boltzmann distribution, with a given average velocity.
| averageVelocity | The average velocity of the brownian motion for the system. |
| dimensions | Number of dimensions for which the velocity vector shall be generated. Set this to 2 or 3. |