EXPORTING ELEMENTS OF THE DEFORMED GEOMETRY

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

Please include the following where applicable:

  • The Ansys simulation product(s) in use: Ansys workbench/mechanical
  • Version of product(s) R2020
  • Screenshot of error message

Copy/paste of any script code 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: