4 3.0*(1.0 - 1.0 / totalZoneMols)
5 *moleculeCloud::kb*temperature
9 for (molN = totalMols; molN < totalMols + totalZoneMols; molN++)
11 // Assign velocity: random direction, magnitude determined by desired
14 // Temperature gradients could be created by specifying a gradient in the
15 // zone subDict, or by reading a field from a mesh.
17 // The velocities are treated on a zone-by-zone basis for the purposes of
18 // removal of bulk momentum - hence nMols becomes totalZoneMols
20 velocity = (2.0*rand.vector01() - vector::one);
22 velocity *= initVelMag/mag(velocity);
24 momentumSum += mass*velocity;
26 initialVelocities.append(velocity);