MolSim
Loading...
Searching...
No Matches
Functions
MaxwellBoltzmannDistribution.h File Reference

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.
 

Detailed Description

Utility function(s) for working with Maxwell-Boltzmann distributions.

Author
F. Gratl
Date
2019-12-13

Function Documentation

◆ maxwellBoltzmannDistributedVelocity()

std::array< double, 3 > maxwellBoltzmannDistributedVelocity ( double  averageVelocity,
size_t  dimensions 
)
inline

Generate a random velocity vector according to the Maxwell-Boltzmann distribution, with a given average velocity.

Parameters
averageVelocityThe average velocity of the brownian motion for the system.
dimensionsNumber of dimensions for which the velocity vector shall be generated. Set this to 2 or 3.
Returns
Array containing the generated velocity vector.