CENTROID

Options

I have 11 elements after meshing and I need the location of centroid of each element in a list so that I can use it again.
The code that I am using is
*DIM, CENT_X, ARRAY, 11
*DIM, CENT_Y, ARRAY, 11
*DO, I, 1, 11
*GET, XE, ELEM, I, CENT, X
*GET, YE, ELEM, I, CENT, Y
CENT_X(I) = XE
CENT_Y(I) = YE
*ENDDO
Can someone tell me where I am going wrong?

Answers

  • Chris Harrold
    Chris Harrold Member, Administrator, Employee Posts: 117
    First Answer First Comment First Anniversary Ansys Employee
    admin
    Options

    @Swamy please tag your post with the products/scripting tool you are using. The developers and ACE team members look for the tags to offer help on a question in their area.

  • Mike.Thompson
    Mike.Thompson Member, Employee Posts: 278
    First Anniversary First Comment 5 Likes Ansys Employee
    Options

    Your script looks good. What is not working? What does it say in the output?