Inside, Outside or on the boundary of a Body?

 Register Blogs Members List Search Today's Posts Mark Forums Read

 January 23, 2004, 12:56 Inside, Outside or on the boundary of a Body? #1 AFP Guest   Posts: n/a Hi, I have domain of Fluid. I have descritized the domain into finite cells. I have put a body into the domain. The body has been descritized too which means that I have only some finite nodes instead of having the curve of the body. Now I select a random point in my domain. How can I find that this is inside, outside or on the boundary on my body? What is the effective algorithm for finding that? Thank you in advance.

 January 24, 2004, 00:22 Re: Inside, Outside or on the boundary of a Body? #2 Praveen Guest   Posts: n/a You may find the following link useful, http://www.ecse.rpi.edu/Homepages/wr...es/pnpoly.html

 January 25, 2004, 20:43 Re: Inside, Outside or on the boundary of a Body? #3 Marcus Lobbia Guest   Posts: n/a You can use a simple ray test. For the point you want to check, extend a ray in any direction from the point (for example, y-direction). If you intersect the body surface only an odd number of times (e.g., 1 time), the point is inside the surface. If it is an even number of times (e.g., 0,2,...) then the point is outside the body. A few caveats regarding this method: 1) This is only valid for closed bodies. If your body has holes or gaps, the ray-test could fail. 2) The surface intersection check can be difficult in itself. Personally, I've used area comparisons (i.e., compare discretized panel area to same assuming point was inside panel). This type of method requires that you implement a tolerance (e.g., area_check - area_panel <= TOL). 3) The test can fail if the point lies right on the surface - you need to include a method for checking for this. An area check (i.e., 3D panel area vs. 3D area of panel nodes with point) can also be used for this. There are other methods also, I'm sure - the above just represents what I am using for my overset grid generation and solvers. The reference "Handbook of Grid Generation" (availabe from amazon.com) also has a short discussion in the overset grid section regarding these types of tests... Good luck!

 Thread Tools Display Modes Linear Mode

 Posting Rules You may not post new threads You may not post replies You may not post attachments You may not edit your posts BB code is On Smilies are On [IMG] code is On HTML code is OffTrackbacks are On Pingbacks are On Refbacks are On Forum Rules

 Similar Threads Thread Thread Starter Forum Replies Last Post Manoj Kumar FLUENT 4 May 26, 2012 10:34 Shafiul CFX 10 February 17, 2011 08:57 ARC Open Source Meshers: Gmsh, Netgen, CGNS, ... 0 February 27, 2010 11:56 Tudor Miron CFX 17 March 19, 2004 20:23 Tom Main CFD Forum 0 November 5, 2002 02:54

All times are GMT -4. The time now is 02:02.