Can we use the formula for $V_{rms}$ to calculate the temperature of a ideal gas (In a molecular dynamics simulator)? Here is my approach to calculate the temperature:
- At t=0, I initialize the velocities of molecules with values drawn from the range of (400,600) $m/s$ (drawn uniformly).
- I let the distribution converge to a Maxwellian distribution of speeds.
- At that time, I take the average of square of speeds of molecules, and take its root.
- This gives me the $V_{rms}$ for the system.
- I calculate the temperature using the standard formula.
Am I wrong at any step? Any advice on the initial distribution?