TAGGED: ansys-mechanical-apdl
-
-
September 16, 2024 at 2:12 pmben.gilmourSubscriber
I have been attempting to automate the extraction of principal stresses from a beam element model. This seems to be a little tricky, and I’m now having an issue exporting the principal stresses using APDL. I can see the principal stresses mapped onto the nodes in a stress plot, giving me an example maximum principal stress value here of 1.8e5 Pa. Using my APDL script, the principal stress I extract is 0.7e-30 Pa.
I have used this script successfully with shells and understand there is some difficulty in reading nodal stress outputs from beam elements. However, even in this model I have a maximum principal stress of 1.2e8 Pa on my shell node whereas the script picks up -0.2e-2 Pa. Stranger still, it reads the middle and minimum principal stresses fine for the shell.
Anyone know what the problem is here please?Â
I will include the script below for reference:
/OUTRES,DATAFILE,TXTFINISH/POST1SET,LASTÂ!  Name a text file and write headers for columns.FNAME = 'NodeStress'*CFOPEN,%FNAME%,TXT*VWRITE,'No.','MaxPrinc','MidPrinc','MinPrinc'(A,','A,','A,','A)Â!  Select all nodes, and then call upon the node numbers we're interested in. Name these using an!  incremental value such that the names can be sequentially read.ÂALLSELNS1 = 23NS2 = 88NS3 = 426ÂNos = 3Â!  'D' is used as an integer describing the number of iterations performed.D = 1Â!  Do loop for finding the node, getting the maximum/middle/minimum principal stresses.*DO,A,1,Nos,1NSEL,S,NODE,,NS%A%*GET,Snom1%A%,NODE,NS%A%,S,1*GET,Snom2%A%,NODE,NS%A%,S,2*GET,Snom3%A%,NODE,NS%A%,S,3ALLSELÂ!  Write the stress values to the text file.*VWRITE,%D%,NS%A%,Snom1%A%,Snom2%A%,Snom3%A%(F8.0,','F8.0,','E16.10,','E16.10,','E16.10)Â!  Increase the iteration count by one before restarting the loop.D = D + 1Â*ENDDOÂ!  Close the text file and end script./OUTRES -
September 18, 2024 at 1:55 pmdanielshawAnsys Employee
The low stress value obtained by *GET probably just means that quantity was not available. What message was issued to the solve.out file when that *GET was issued?Â
1Did you try just issuing *GET for 1 node/element before embedding the *GET commands inside a *DOLOOP?
1Why are you attempting to extract nodal stresses for beam elements? What is the relevance of the nodal stress from a beam element? Typically you are interested in the beam results.
Â
.
-
- You must be logged in to reply to this topic.
-
461
-
220
-
194
-
177
-
162
© 2024 Copyright ANSYS, Inc. All rights reserved.