How can I export the elements of the deformed geometry?

Options
itxasne
itxasne Member Posts: 2
edited June 2023 in Structures

Hi, I have used the following snippet for exporting the elements and write the in a txt file but was unsuscessful, if anyone could help.

allsel ! Select all entities of the model.

*GET, E_COUNT, ELEM,0,COUNT

/PREP7

my_elements = E_COUNT

*cfopen, element_data_file,txt        !Create a txt file called "node_data_file"​

*do,i,1,num_elements,1          ! Loop over each node​

    num_nodes = ETABLE(ELEM, i, NODE, 0)​

   node_id_1 = ETABLE(ELEM, elem_num, NODE, 1)​

   node_id_2 = ETABLE(ELEM, elem_num, NODE, 2)​

   node_id_3 = ETABLE(ELEM, elem_num, NODE, 3)​

   node_id_4 = ETABLE(ELEM, elem_num, NODE, 4)​

   *vwrite, node_id_1,node_id_2,node_id_3, node_id_4              ! Write out these values​

    (4F16.5)   ​

*enddo​

*CFCLOS                            ! Close file​

Tagged:

Answers

  • Pierre Thieffry
    Pierre Thieffry Member, Moderator, Employee Posts: 98
    First Anniversary Ansys Employee Solution Developer Community of Practice Member Photogenic
    Options

    Not sure I understand what you are trying to do. Could you please elaborate on your goal?