Using Design Assessment to Obtain Results from Mechanical APDL

The purpose of this example is to illustrate how to run Mechanical APDL in batch mode using Design Assessment, and how to display the results within the Workbench environment; see the Mechanical APDL Command Reference for further information.

An example Mechanical APDL data file is shown below. This surf154.dat file is written to obtain surface 154 results that are not supported natively in the Mechanical application and to output them to a CSV file called data.csv. In this scenario, results are element based. Two arguments are to be passed in:

The surf154.dat file

/batch
/post1
FILE,ARG1
set,NEAR,,1.0,,ARG2
esel,s,ename,,154
ETABLE,my_press,smisc,13
*get,ecount,elem,0,count
*dim,output,arra,ecount,10
curre = 0
*do,i,1,ecount
  curre = ELNEXT(curre)
  output(i,1) = curre
  *get,output(i,2),etab,1,elem,curre
*enddo
*cfopen,data,csv
  *vwrite,output(1,1), output(1,2)
  (2(F16.7,','))
*cfclose
fini
/exit

It is recommended that the files for this example are to be placed in a folder called DA MAPDL Example within your ANSYS Inc folder. If you choose not to use this folder, the paths used in the XML definition file to locate the python scripts will need to be modified.


Release 18.2 - © ANSYS, Inc. All rights reserved.