How to determine certain point belongs to which element
How to determine certain point belongs to which element
(OP)
In 2-D case, I got all the node coordinates and I also know the matrix n(i,e),where the value of n(i,e)is global node number, i is local node number, and e is the local node number. Given a point with coordinate (x,y).How to determine which element this point belongs to?
Thanks very much!
Thanks very much!





RE: How to determine certain point belongs to which element
RE: How to determine certain point belongs to which element
WTF ... an element joins two nodes, it's basic. knowing where the nodes are (their co-ordinates) allows you to know where the elements are ...
???
RE: How to determine certain point belongs to which element
And a mistake in my quesion post above. e should denote the element number,not the local node number. thx again.
RE: How to determine certain point belongs to which element
but this sounds much like a school problem (no?)
your matrix has rows that are your nodes, and columns that are your elements; so that a node can appear on multiple elements, but each element (column) should only have two entries).
a dumm way (which i'd probably do myself) would be the plot out the connectivity and then see where your point lies. a more methodical approach would be to determine the equation of each of the elements (from their two nodes), and then you can calculate which element the point is on (which eaquation is satified by the point).
RE: How to determine certain point belongs to which element
Here my suggestion:
nsel,all
local,100,1, x, y, z ! cylidrical coordinate sistem at
! your coordinates
etab, ecent, cent, x ! element table whith element centroids
esort, etab, ecent, 1 ! ascending sort of element table
*get, elemno, sort, 0, imin ! get the element no. whith the
! smallest distance to x, y, z
please, tell me if it works!
Alex
RE: How to determine certain point belongs to which element
/prep1
nsel,all
local,100,1, x, y, z
etab, ecent, cent, x
esort, etab, ecent, 1
*get, elemno, sort, 0, imin
Alex
RE: How to determine certain point belongs to which element
/post1
nsel,all
local,100,1, x, y, z
etab, ecent, cent, x
esort, etab, ecent, 1
*get, elemno, sort, 0, imin
Alex
RE: How to determine certain point belongs to which element
wseedling - which software are you using? We can't give you any information unless you tell us more details.
------------
See FAQ569-1083 for details on how to make best use of Eng-Tips.com
RE: How to determine certain point belongs to which element
I try to understand the idea of mihaiupb, since I do not know ansys. Thanks for your kind help.
RE: How to determine certain point belongs to which element
i think the same alogrithm still works, each element is defined by three nodes, there are three numbers in each column of your matrix. this defines a limited plane, which can be tested to see if the point in question is on that plane.
RE: How to determine certain point belongs to which element
I think the question was, how to do this.
This would get more complicated in 3D.
RE: How to determine certain point belongs to which element
actually, test the distance of the arbitary point from each of the three nodes defining one of (each of) your elements. if this is greater than the distance between any pair of nodes defining the element, then it can't be on that element, this will create a short list of potential elements.
another check would be from the equation of the element (from the three corners) determine the normal (perpendicular to the plane), then the equation of the normal that passes thru the point (point, slope equation of a line), then point where this line pierces the plane, then the distance between these two points. if the distance is zero then the point is on the plane of the element, but it might be outside the element ...
but this is a school problem isn't it ? (i can't imagine anyone doing this in the real world) ... if it is real world, take your model into an FE code or an FE front end (like PATRAN, FEMAP), and it will plot the model for you; the rest is simple
RE: How to determine certain point belongs to which element
regards
Alex
RE: How to determine certain point belongs to which element
RE: How to determine certain point belongs to which element
Thanks!
Alex
RE: How to determine certain point belongs to which element
RE: How to determine certain point belongs to which element
You have two nodes for a line or three for a plane. Use them to determine the equation for the line, or the plane. Any basic linear algebra book should give this if you dont know it.
Next is to check if the point belong to the element. For a 2d case, use one coordinate to compute the second and check if the point is on the line. (Or two to compute a third coordinate.)
I don't mean to be rude but what surprices me is not that you found something useful in mathlab, it's that you need mathlab for this.
Regards
Thomas
RE: How to determine certain point belongs to which element
You can see from my privious post, I know how to solve this using the method you gave, but since too many elements and too many points need to be determined,this is a little time consuming. I want to find a simpler way to do it.
Anyway, thank all for the discussion and help.
RE: How to determine certain point belongs to which element