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
Easy way to determine if point is in fluid domain?
Forum rules
Please read the forum usage recommendations before posting.
Please read the forum usage recommendations before posting.
-
- Posts: 4208
- Joined: Mon Feb 20, 2012 3:25 pm
Re: Easy way to determine if point is in fluid domain?
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
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?
Thank you Yvan for these informations
Regards
Meskine
Regards
Meskine