2.4. APDL Commands

These commands make up the ANSYS Parametric Design Language (APDL). The commands are grouped by functionality.

Table 2.18:  Parameter Definition

These APDL commands are used to define parameters and their values.
*AFUNSpecifies units for angular functions in parameter expressions. 
*ASKPrompts the user to input a parameter value. 
*DELDeletes a parameter (GUI). 
*DIMDefines an array parameter and its dimensions. 
*GETRetrieves a value and stores it as a user-named parameter. 
/INQUIREReturns system information to a parameter. 
PARRESReads parameters from a file. 
PARSAVWrites parameters to a file. 
*SETAssigns values to user-named parameters. 
*STATUSLists the current parameters and abbreviations. 
*TAXISDefines table index numbers. 
*TREADReads data from an external file into a table array parameter. 
*VFILLFills an array parameter. 
*VGETRetrieves values into an array parameter. 
*VREADReads data and produces an array parameter vector or matrix. 

Table 2.19:  Macro Files

These APDL commands are used to build and execute command macros.
*CFCLOSCloses the "command" file. 
*CFOPENOpens a "command" file. 
*CFWRITEWrites a command (or similar string) to a "command" file. 
*CREATEOpens (creates) a macro file. 
/DFLABChanges degree of freedom labels for user custom elements. 
*ENDCloses a macro file. 
/MAILMails file to specified address. 
/MKDIRCreates a directory. 
*MSGWrites an output message via the message subroutine. 
/PMACROSpecifies that macro contents be written to the session log file. 
/PSEARCHSpecifies a directory to be searched for "unknown command" macro files. 
/RMDIRRemoves (deletes) a directory. 
/TEEWrites a list of commands to a specified file at the same time that the commands are being executed. 
*ULIBIdentifies a macro library file. 
*USEExecutes a macro file. 

Table 2.20:  Abbreviations

These APDL commands can be used to define abbreviations for longer commands, and to create user-defined commands.
*ABBRDefines an abbreviation. 
ABBRESReads abbreviations from a coded file. 
ABBSAVWrites the current abbreviation set to a coded file. 
/UCMDAssigns a user-defined command name. 

Table 2.21:  Array Parameters

These APDL commands are used to operate on parameter arrays (i.e., vectors and matrices).
/DIRECTORYPut the file names in the current directory into a string parameter array. 
*MFOURICalculates the coefficients for, or evaluates, a Fourier series. 
*MFUNCopies or transposes an array parameter matrix. 
*MOPERPerforms matrix operations on array parameter matrices. 
*MWRITEWrites a matrix to a file in a formatted sequence.  
*SREADReads a file into a string array parameter. 
*TOPEROperates on table parameters. 
*VABSApplies the absolute value function to array parameters. 
*VCOLSpecifies the number of columns in matrix operations. 
*VCUMAllows array parameter results to add to existing results. 
*VEDITAllows numerical array parameters to be graphically edited. 
*VFACTApplies a scale factor to array parameters. 
*VFUNPerforms a function on a single array parameter. 
*VITRPForms an array parameter by interpolation of a table. 
*VLENSpecifies the number of rows to be used in array parameter operations. 
*VMASKSpecifies an array parameter as a masking vector. 
*VOPEROperates on two array parameters. 
*VPLOTGraphs columns (vectors) of array parameters. 
*VPUTRestores array parameter values into the database. 
*VSCFUNDetermines properties of an array parameter. 
*VSTATLists the current specifications for the array parameters. 
*VWRITEWrites data to a file in a formatted sequence. 

Table 2.22:  Process Controls

These APDL commands can be used to control the order in which other commands are processed.
*CYCLEBypasses commands within a do-loop. 
*DODefines the beginning of a do-loop. 
*DOWHILELoops repeatedly through the next *ENDDO command. 
*ELSESeparates the final if-then-else block. 
*ELSEIFSeparates an intermediate if-then-else block. 
*ENDDOEnds a do-loop and starts the looping action. 
*ENDIFEnds an if-then-else. 
*EXITExits a do-loop. 
*GOCauses a specified line on the input file to be read next. 
*IFConditionally causes commands to be read. 
*REPEATRepeats the previous command. 
*RETURNReturns input stream to a higher level. 
/WAITIntroduces a delay before reading the next command. 

Table 2.23:  Matrix Operations (APDL Math)

These APDL Math commands can be used to create, manipulate, and solve matrices.
*AXPYPerforms the matrix operation M2= v*M1 + w*M2. 
*COMPCompresses the columns of a matrix using a specified algorithm. 
*DMATCreates a dense matrix. 
*DOTComputes the dot (or inner) product of two vectors. 
*EIGENPerforms a modal solution with unsymmetric or damping matrices.  
*EXPORTExports a matrix to a file in the specified format. 
*FFTComputes the fast Fourier transformation of a specified matrix or vector. 
*FREEDeletes a matrix or a solver object and frees its memory allocation. 
*INITInitializes a vector or dense matrix. 
*ITENGINEPerforms a solution using an iterative solver. 
*LSBACPerforms the solve (forward/backward substitution) of a factorized linear system.  
*LSENGINECreates a linear solver engine.  
*LSFACTORPerforms the numerical factorization of a linear solver system.  
*MERGEMerges two dense matrices or vectors into one. 
*MULTPerforms the matrix multiplication M3 = M1(T1)*M2(T2). 
*NRMComputes the norm of the specified matrix or vector. 
*PRINTPrints the matrix values to a file.  
*REMOVE Suppresses rows or columns of a dense matrix or a vector. 
*SCALScales a vector or matrix by a constant 
*SMATCreates a sparse matrix. 
*SORTSorts the values of the specified vector. 
*VECCreates a vector.  

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