CFD Online Logo CFD Online URL
www.cfd-online.com
[Sponsors]
Home > Forums > General Forums > Main CFD Forum

Inside, Outside or on the boundary of a Body?

Register Blogs Community New Posts Updated Threads Search

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   January 23, 2004, 12:56
Default 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.
  Reply With Quote

Old   January 24, 2004, 00:22
Default 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
  Reply With Quote

Old   January 25, 2004, 20:43
Default 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!
  Reply With Quote

Reply


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 Off
Trackbacks are Off
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Rigid body motion + Boundary Layer Manoj Kumar FLUENT 4 May 26, 2012 11:34
CFX does not continue Shafiul CFX 10 February 17, 2011 08:57
[Gmsh] Import problem ARC OpenFOAM Meshing & Mesh Conversion 0 February 27, 2010 11:56
Please help with flow around car modelling! Tudor Miron CFX 17 March 19, 2004 20:23
Boundary conditions? Tom Main CFD Forum 0 November 5, 2002 02:54


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