General Mechanical

General Mechanical

Topics related to Mechanical Enterprise, Motion, Additive Print and more.

APDL Command to Export Specific Nodal Stress Values

TAGGED: 

    • james.lee
      Subscriber

      Apologies if this is the incorrect area to post the following, this is my first post.

      I would like to export an array of nodal principal stress values to a text file and have created the following APDL command to do so:

      The problem is my output file contains values that do not reflect those in the relevant contour plots and associated exported text files:

      I have tried several options with the *VGET and *GET commands to no avail. Could someone point ime in the right direction as I am not overly familiar with APDL command references.

    • Erik Kostson
      Ansys Employee

      Hi

      These example shows some different ways of doing this.

      https://www.ansystips.com/2017/10/ansys-apdl-some-neat-commands.html

      All the best

      Erik

      • james.lee
        Subscriber

        Thank you Erik, much appreciated.

    • SaiD
      Ansys Employee

      Hello,

      Based on Table 244 in in this Ansys Help link: *VGET you can see that when using Item1=S, ENTNUM has to be a node number. I am not sure what happens when it is left empty. My guess is that it defaults to node 1 and it keeps looping till the array 'Principal' is filled up. Could you check if the values printed in FLS1_1.txt match with the principal stress values for node 1 to 4?

      • james.lee
        Subscriber

        Hi, you are correct, the stress values reported appear to be associated with node 1 to 4. Is it possible to associate the selected nodes with the VGET command? I have updated the script to reflect the nodes selected but am only able to output zero values in the text file:

        Your assistance is much appreciated.

    • SaiD
      Ansys Employee

      Hello, 
      Maybe you can try looping over the selected set of nodes using the *DO command and use *GET command to retrieve the principal stress values for each node in the set.

      ! Loop over selected nodes
      *DO, i, 1, numNd
      *GET, nnum, NODE, 0, NXTH ! Get the next node number
      ! Perform operations on the node
      *ENDDO

Viewing 3 reply threads
  • You must be logged in to reply to this topic.