db7fac3f24
git-svn-id: https://openfoam-extend.svn.sourceforge.net/svnroot/openfoam-extend/trunk/Core/OpenFOAM-1.5-dev@1731 e4e07f05-0c2f-0410-a05a-b8ba57e0c909
21 lines
707 B
C
21 lines
707 B
C
for (molN = totalMols; molN < totalMols + totalZoneMols; molN++)
|
|
{
|
|
|
|
// Remove bulk momentum introduced by random numbers and add
|
|
// desired bulk velocity
|
|
|
|
// For systems with molecules of significantly differing masses, this may
|
|
// need to be an iterative process or employ a better algorithm for
|
|
// removing an appropriate share of the excess momentum from each molecule.
|
|
|
|
initialVelocities(molN) += bulkVelocity - momentumSum/totalZoneMols/mass;
|
|
}
|
|
|
|
// momentumSum = vector::zero;
|
|
//
|
|
// for (molN = totalMols; molN < totalMols + totalZoneMols; molN++)
|
|
// {
|
|
// momentumSum += mass*initialVelocities(molN);
|
|
// }
|
|
//
|
|
// Info << "Check momentum adjustment: " << momentumSum << endl;
|