Selection of particular area Elements

Altair Forum User
Altair Forum User
Altair Employee
edited October 2020 in Community Q&A

hi,

 

i am trying to select the elements of particular area. (please check attached picture)

 

but if i am trying to select the elements with manual process its not coming accurately as to be selected.

 

so i had tried to select the elements while giving input of selection of nodes and then lines got created and from line surface got created.

 

now the surface is created accurately as the selection is required.

 

but how to select the elements with reference to surface area.

 

please see the reference attached picture.

 

(geometry is not there for reference. only surface created with the code.)

 

Regards

Adams

<?xml version="1.0" encoding="UTF-8"?>post-5813-0-40094400-1402996934_thumb.jp

Answers

  • tinh
    tinh Altair Community Member
    edited June 2014

    Hello Adams

    if the elems are associated to the surf, you can select elems by *createmark elems 1 'by surface' $surfID

    but don't go around by such method because *createmark command provided many useful selection method like 'by box', 'by cylinder' 'by adjacent',...

  • Altair Forum User
    Altair Forum User
    Altair Employee
    edited June 2014

    hi tinh,

     

    thanks for replying.

     

    elements are not at all associated wit the surfaces...

     

    and with the method of 'by box' , 'by cylinder' , 'by adjacent' selecting the elements is not accurate.

    because i want the exact  selection of elements of particular area....and if i am selection that area manually then first i have to put the model in perfect view or place. then only i can select the elements.

    specially this is the case of shafts as shown in attached figures.   

     

    Regards

    Adams

  • tinh
    tinh Altair Community Member
    edited June 2014

    Hi

    assume that you created the surface by 2 rings of nodes

    if i had 2 rings of nodes, i can

    - create center of first ring

    - create center of second ring

    - measure distance 2 center nodes (height)

    - measure radius of rings

    then put them in command *createmark elems 'by cylinder' center1_x center1_y center1_z center2_x center2_y center2_z radius height

    i think this command work well in your case

  • Altair Forum User
    Altair Forum User
    Altair Employee
    edited June 2014

    hi tinh,

     

    i had tried this concept...but there is some kind of problem occuring.

     

    *createmark elems 1 'by cylinder' x y z i j k r h location contained all tol

     

    'x y z 1 j k' values are achieved

    also 'r h' values are achieved

     

    now, location : inside / outside / boundary and acrossboundary.

            contained : 0

            all : 0

            tol : 0

     

     

    but with this...full component elements is selected.....

  • tinh
    tinh Altair Community Member
    edited June 2014

    Hi

    check it again by create a cylinder from x y z to i j k with radius r and height h

    if your elems are inside that cylinder then the command should work. i tested

    *createmark elems 1 'by cylinder' $x $y $z $i $j $k $r $h inside 1 0 0

  • Altair Forum User
    Altair Forum User
    Altair Employee
    edited June 2014

    Hi,

     

    i had created two centre nodes. and extracted the coordinated of it in the for of.

     

    Centre node 1 : x y z

    Centre node 2 : i j k

     

    then calculated the radius with the edge node while using: set radius [hm_getdistance nodes $Centre_n1 $Edge_n1 0];

     

                                                                                                set height [hm_getdistance nodes $Centre_n2 $Centre_n1 0]

     

    and putting these values for selecting the inside elements of the component.

     

     

    eval *createmark elems 1 'by cylinder' $x $y $z $i $j $k $radius $height inside 1 0 0

     

     

    but with this, all the internal elements got selected.

     

    please reffer the attached figure.

     

     

    results: 

     

    Radius : 22.000600571600504 -8.272249507584775 9.59899999999999 17.984868990219866

     

    Height : 7.200088058750607 6.5413229042695775 0.0001515303197834328 3.008714458515442

     

     

    <?xml version="1.0" encoding="UTF-8"?>post-5813-0-56026500-1403570933_thumb.jp

  • tinh
    tinh Altair Community Member
    edited June 2014

    Hi

    the radius and height returned from hm_getdistance are lists, you need only first values to put in *createmark, they are actually radius and height

    * commands usually do not throw errors for wrong arguments so you have to care about this

  • Altair Forum User
    Altair Forum User
    Altair Employee
    edited June 2014

    hi tinh,

     

    To extract the first value of the radius and Height.

     

    which command should i use? or i have to create the formulation.

     

     

    as of now i had tried while creating the vector but its not working as well.

     

    help me

  • tinh
    tinh Altair Community Member
    edited June 2014

    Hi

    it's a list so you can use 

    set radius [lindex $radius 0]

    => so get first value of 'radius'

    same for height

     

    or extract it directly from first command forexample

     

    set radius [lindex  [hm_getdistance nodes $Centre_n1 $Edge_n1 0] 0]

    set height [lindex [hm_getdistance nodes $Centre_n2 $Centre_n1 0] 0]

  • Altair Forum User
    Altair Forum User
    Altair Employee
    edited June 2014

    hi tinh,

     

    thanks. its really a great help.