Page 1 of 1

Easy way to determine if point is in fluid domain?

Posted: Wed Apr 15, 2015 10:03 am
by Meskine
Hi everybody,

Is there a simple way to determine if a point (x,y,z) is in the fluid domain ?

For example if we have a fluid domain with obstacles (that could be complex), it is difficult to define conditions based on geometrical criteria. Does a simple test exists to determine if we are in or out ?

Does the function findpt give the nearest nodes even if we are outside the domain border ?

Thank you for your help

Meskine

Re: Easy way to determine if point is in fluid domain?

Posted: Wed Apr 15, 2015 8:50 pm
by Yvan Fournier
Hello,

Currently, findpt will find the closest cell center.

To really determine if a point is inside the mesh, you would need to use the ple_locator_... / fvm_point_location_... functions, which are accessible in the code's C API.

A rewrite of probes using this is planned in the future, but for now, you need to use relatively low-level functions to do this.

The code for the new mapped boundary conditions (in cs_boundary_conditions.c) is probably the simplest example in the whole code using the needed functions, so you may want to take at look at it, in addition to libple/src/ple_locator.h.

Regards,

Yvan

Re: Easy way to determine if point is in fluid domain?

Posted: Thu Apr 16, 2015 11:50 am
by Meskine
Thank you Yvan for these informations

Regards

Meskine