View Issue Details

IDProjectCategoryView StatusLast Update
0000503OpenFOAMBugpublic2012-04-17 12:20
Reporteruser411Assigned Touser2 
PriorityhighSeveritymajorReproducibilityalways
Status resolvedResolutionfixed 
PlatformLinuxOSOpenSuseOS Version11.3
Summary0000503: linearMomentumOfSystem and linearKineticEnergyOfSystem calculations in "KinematicCloudI.H"
Descriptionin the file "src/lagrangian/intermediate/clouds/Templates/KinematicCloud/KinematicCloudI.H",

the way calculating total linear momentum of parcels is in the member function "linearMomentumOfSystem":
forAllConstIter(typename KinematicCloud<CloudType>, *this, iter)
    {
        const parcelType& p = iter();

        linearMomentum += p.mass()*p.U();
    }

the way calculating total parcel mass is in the memeber function "massInSystem":

forAllConstIter(typename KinematicCloud<CloudType>, *this, iter)
    {
         const parcelType& p = iter();
         sysMass += p.mass()*p.nParticle();
    }

    return sysMass;

After comparison, linear momentum should be "linearMomentum += p.mass()*p.nParticle()*p.U()" instead of "linearMomentum += p.mass()*p.U()" since the
for loop in these two member functions is a loop over parcels, not particles.
Same thing occurs in linearKineticEnergyOfSystem member function.
 
TagsNo tags attached.

Activities

user2

2012-04-17 12:20

  ~0001260

Thanks for the report - bug fixed by commit:

99208b4e16394ac758eaa36e73ba45f7c6472df6

Issue History

Date Modified Username Field Change
2012-04-12 04:49 user411 New Issue
2012-04-17 12:20 user2 Note Added: 0001260
2012-04-17 12:20 user2 Status new => resolved
2012-04-17 12:20 user2 Fixed in Version => 2.1.x
2012-04-17 12:20 user2 Resolution open => fixed
2012-04-17 12:20 user2 Assigned To => user2