TAGGED: ansys-mapdl
-
-
April 1, 2025 at 1:16 pm
james.lee
SubscriberApologies 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.
-
April 1, 2025 at 5:13 pm
Erik Kostson
Ansys EmployeeHi
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
-
April 2, 2025 at 7:05 am
james.lee
SubscriberThank you Erik, much appreciated.
-
-
April 1, 2025 at 7:29 pm
SaiD
Ansys EmployeeHello,
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?
-
April 2, 2025 at 7:26 am
james.lee
SubscriberHi, 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.
-
-
April 2, 2025 at 7:16 pm
SaiD
Ansys EmployeeHello,Â
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
-
- You must be logged in to reply to this topic.
-
2773
-
960
-
841
-
599
-
591
© 2025 Copyright ANSYS, Inc. All rights reserved.