linear momentum calculation in KinematicCloudI.H
Dear all,
I am confused with the way OpenFOAM calculates linear momentum of system: template<class CloudType> inline Foam::vector Foam::KinematicCloud<CloudType>::linearMomentumOfS ystem() const { vector linearMomentum(vector::zero); forAllConstIter(typename KinematicCloud<CloudType>, *this, iter) { const parcelType& p = iter(); linearMomentum += p.mass()*p.U(); } return linearMomentum; } I think that p.mass() returns the mass of a "particle" in a parcel. So the mass of a parcel should be p.mass() * p.nParticle(). Then the linearMomentum should be p.mass() * p.nParticle() * p.U() instead of p.mass() * p.U(). For your reference, below is the way how OpenFOAM calculates total mass of a system: template<class CloudType> inline Foam::scalar Foam::KinematicCloud<CloudType>::massInSystem() const { scalar sysMass = 0.0; forAllConstIter(typename KinematicCloud<CloudType>, *this, iter) { const parcelType& p = iter(); sysMass += p.mass()*p.nParticle(); } return sysMass; } What do you think? Thank you! Regards |
All times are GMT -4. The time now is 10:34. |