April 4, 2023 at 6:45 pm
Ansys Employee
The above script gets the (node id, x, y, z) and then also gets the USUM vs mode shape. All of these values are double precision. BUT I do not see where the data is being exported? You could try using *VWRITE with a proper format. For example you can try like shown in orange highlight below. This should give high precision export.
*cfopen,output,dat ! open a file called output.dat
! Select lowest node in the subset as the active node
NODE = currn
! LOOP through all nodes in the subset, for each node store the node ID, NODE X< Y< Z Coord in Node_List
*DO, k,1,NUM_NODES,
/GOPR
/PREP7
ncx = nx(currn)
Node_List(k,1) = currn
Node_List(k,2) = nx(currn)
Node_List(k,3) = ny(currn)
Node_List(k,4) = nx(currn)
*vlen,1
*vwrite,Node_List(k,1),Node_List(k,2),Node_List(k,3),Node_List(k,4)
node id= %i x = %e y= %e z=%e
/POST1
!Loop through all 13 frequencies and extract the modal displacement (vector sum) and store in mode shapes for the current node
*DO, l,1,13,1
SET,1,MODES(l),
*GET, MODE_SHAPES(k,l), NODE, currn,U,SUM
*ENDDO
!Increment to next node
*GET, currn, NODE, currn, nxth,
!Select next node
NODE = currn
*ENDDO
*cfclose