View Issue Details
|ID||Project||Category||View Status||Date Submitted||Last Update|
|0003084||OpenFOAM||Bug||public||2018-10-11 14:56||2019-05-02 03:16|
|Platform||GNU/Linux||OS||Linux Mint||OS Version||19|
|Fixed in Version|
|Summary||0003084: Lagrangian KinematicParcel hitPatch called on inactive parcel => LocalInteraction number of stuck parcels is wrong|
|Description||As the summary says the number of stuck parcels is counted incorrectly. The bug occurs because of the change from OF 5.x to 6 where the hitFace function is called at the end of the Foam::KinematicParcel<ParcelType>::move function.|
The submodel handeling the ineraction is called from the function Foam::KinematicParcel<ParcelType>::hitPatch in KinematicParcel.C:
-> In OF 5.x hitPatch is called from the trackToFace function in Foam::KinematicParcel<ParcelType>::move BUT ONLY if the parcel is active
-> In OF 6 the hitFace function which calls the hitPatch function is called at the end of the ::move function no matter what
so in Foam::LocalInteraction<CloudType>::correct the number of stuck parcels is incremented every timestep.
A possible solution would be to check if the parcel is active or not before the switch statement in Foam::LocalInteraction<CloudType>::correct.
Possibly there are more bugs cause by this through the functions called in Foam::KinematicParcel<ParcelType>::hitPatch
|Tags||No tags attached.|
Just noticed FunctionObject like PatchCollisionDensity also counts the number collisions incorrectly.
A better solution would be to check in Foam::KinematicParcel<ParcelType>::move before calling p.hitFace if the the parcel is active or not. Then the code acts more like OP 5.x, not sure if this again causes other bugs with new FunctionObjects
||Have you tried doing the check? I.e., if you put "p.active()" into both of the if conditions at the bottom of KinematicParcel::move, does it resolve the issue?|
Both issue (stuck parcels, CollisionDensity Function Object) are resolved if you put the p.active() in the if statement at the bottem of KinematicParcel::move! So then the check in LocalInteraction is not needed.
I am just not sure if any other function called from hitPatch needs to be executed even when the parcel is inactive. I mean don't know why you guys moved the hitFace function to this new place maybe there is a reason for it, if not than everything can be fixed by simply adding the p.active() in ::move
The reason for moving the hitFace is to have the "calc"-step in between moving and interacting with the patch so that things happening at the patch do not influence the calc-phase.
Setting the active checks to postFace and hitpatch -sections should be ok.
||Resolved in dev by commit c17e6dbfe, and in version 6 by 166e3a7a1|
|2018-10-11 14:56||ChrisK15||New Issue|
|2018-10-11 15:30||ChrisK15||Note Added: 0010093|
|2018-10-11 16:29||will||Note Added: 0010094|
|2018-10-11 21:28||ChrisK15||Note Added: 0010095|
|2018-10-12 08:00||tniemi||Note Added: 0010096|
|2018-10-12 11:43||will||Assigned To||=> will|
|2018-10-12 11:43||will||Status||new => resolved|
|2018-10-12 11:43||will||Resolution||open => fixed|
|2018-10-12 11:43||will||Fixed in Version||=> 6|
|2018-10-12 11:43||will||Note Added: 0010097|