Professional Documents
Culture Documents
ANSYS Command File Programming Features
ANSYS Command File Programming Features
The following ANSYS command listing, shows some of the commonly used
programming features in the ANSYS command file language known as ADPL
(ANSYS Parametric Design Language). It illustrates:
This example file does not do anything really useful in itself besides generate
keypoints along a line, but it does illustrate some of the "programming features" of
the ANSYS command language.
!
/PREP7
! preprocessor phase
!
x1 = 5
x2 = 10
*ask,ndivs,Enter number of divisions (default 5),5
!
! the above command prompts the user for input to be entered into the
! variable "ndivs"; if only is entered, a default of "5" is used
!
*IF,ndivs,GT,1,THEN
dx = (x2-x1)/ndivs
*DO,i,1,ndivs+1,1
x = x1 + dx*(i-1)
k,i,x,0,0
*ENDDO
*ELSE
k,1,x1,0,0
k,2,x2,0,0
*ENDIF
!
/pnum,kp,1
kplot
klist,all,,,coord