Lagrangian subroutine _where_are_you

Miscellaneous discussion topics about Code_Saturne (development, ...)
Post Reply
lehongduc
Posts: 23
Joined: Thu Aug 20, 2015 3:05 pm

Lagrangian subroutine _where_are_you

Post by lehongduc »

Hello,

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
Yvan Fournier
Posts: 4070
Joined: Mon Feb 20, 2012 3:25 pm

Re: Lagrangian subroutine _where_are_you

Post by Yvan Fournier »

Hello,

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).

Regards,

Yvan
lehongduc
Posts: 23
Joined: Thu Aug 20, 2015 3:05 pm

Re: Lagrangian subroutine _where_are_you

Post by lehongduc »

Hello Yvan,

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

Regard,
Hong Duc
Post Reply