Page 1 of 1

Lagrangian subroutine _where_are_you

Posted: Tue Sep 27, 2016 10:29 am
by lehongduc

I'm implementing some new model in CS v4.0.3 and I need to understand the subroutine _where_are_you which is founded in cs_lagr_tracking.c at line 1812. I do understand that this subroutine is used to verify if the particle stay in the cell or move to the next cell though a face. But what I don't understand is which method is used? (event I try to read the code...). Do you have any theorical explanation about this point?

More precisely, I don't understand what "orient_test" and "orient_count" are used for?

The documentation in French is ok for me.

Thanks in advance,
Best regard,
LE Hong Duc

Re: Lagrangian subroutine _where_are_you

Posted: Thu Sep 29, 2016 1:16 am
by Yvan Fournier

The trajectory algorithm was described in an old (circa-2000) EDF report, but I do not know of any publication describing its details. The algorithm in v4.0 is based on splitting planar faces into triangles, and using determinants to check whether a trajectory crosses that triangle. It can fail (loose particles) when faces are not so plane, or when a particle goes through an edge or vertex.

In the trunk (V5.0-alpha), the trajectory algorithm was rewritten to handle warped faces, but to my knowledge, there is no detailed theoretical description at this stage (I'll check, there is a report describing recent work, but I have not seen if it contains that part yet).



Re: Lagrangian subroutine _where_are_you

Posted: Thu Sep 29, 2016 8:34 am
by lehongduc
Hello Yvan,

Thanks you for your reply. I'll take a closer look at this point.

Hong Duc