Documentos de Académico
Documentos de Profesional
Documentos de Cultura
1 of 1
Creating Files
ANSYS
UTILITIES
http://www.mece.ualberta.ca/tutorials/ansys/CL/Features.html
BASIC
TUTORIALS
INTERMEDIATE
TUTORIALS
ADVANCED
TUTORIALS
POSTPROC.
TUTORIALS
COMMAND
LINE FILES
PRINTABLE
VERSION
Features
Basic Tutorials
Intermediate Tutorials
Advanced Tutorials
PostProc Tutorials
Radiation
Index
Contributions
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:
entering parameters (variables)
prompting the user for parameters
performing calculations with paramaters; note that the syntax and functions are similar to
FORTRAN
control structures
if - then - else - endif
looping
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.
Comments
MecE 563
Mechanical Engineering
University of Alberta
ANSYS Inc.
Copyright 2001
University of Alberta
!
/PREP7
! preprocessor phase
!
x1 = 5
! define some parameters
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
! if "ndivs" is greater than "1"
dx = (x2-x1)/ndivs
*DO,i,1,ndivs+1,1
! do i = 1, ndivs + 1 (in steps of one)
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
! turn keypoint numbering on
kplot
! plot keypoints
klist,all,,,coord
! list all keypoints with coordinates
06/01/2014 5:58 PM