ansys

5
Useful ANSYS commands February 18, 2010 Here is a selection of the most useful ANSYS commands. These do not need to be typed into the command window individually. Instead, you can write them as a list in a text editor and then copy and paste into the command window. Remember to start each section (module) with a /XXXX command and end with a FINI command. The full command reference can be found at http://www.kxcad.net/ansys/ANSYS/ansyshelp/Hlp_C_CH2_3.html MODULES /TITLE,Analysis123 Displays title in viewport /PREP7 Enters pre-processor /SOLU Enters solve module /POST1 Enters general postprocessor FINI Exits current module DISPLAY /PBC,U Plots displacement BCs /PNUM,NODE,1 Turns node numbering on /PNUM,NODE,0 Turns node numbering off /PNUM,KP,1 Turns keypoint numbering on /PNUM,ELEM,1 Turns element numbering on /PNUM,MAT,1 Turns material numbering on /PNUM,LINE,1 Turns line numbering on /PNUM,AREA,1 Turns area numbering on /PNUM,VOLU,1 Turns volume numbering on SELECTION GENERAL SYNTAX FOR SELECTION: ASEL,S,AREA,,3,5,1 Selects areas (ASEL), new set(S), select by area number (AREA), no component to area number (blank), between 3 and 5, step size 1 OR: KSEL,U,LOC,X,100,200,1 Removes (U) keypoints (KSEL) from current selection by keypoint location (LOC), x-coordinate of location(X) for locations X=100, X=101, X=102 X=200 inclusive 1

Transcript of ansys

Page 1: ansys

Useful ANSYS commands

February 18, 2010

Here is a selection of the most useful ANSYS commands. These do not need to be typed intothe command window individually. Instead, you can write them as a list in a text editor andthen copy and paste into the command window. Remember to start each section (module) witha /XXXX command and end with a FINI command. The full command reference can be foundat http://www.kxcad.net/ansys/ANSYS/ansyshelp/Hlp_C_CH2_3.html

MODULES

/TITLE,Analysis123 Displays title in viewport/PREP7 Enters pre-processor/SOLU Enters solve module/POST1 Enters general postprocessorFINI Exits current module

DISPLAY

/PBC,U Plots displacement BCs/PNUM,NODE,1 Turns node numbering on/PNUM,NODE,0 Turns node numbering off/PNUM,KP,1 Turns keypoint numbering on/PNUM,ELEM,1 Turns element numbering on/PNUM,MAT,1 Turns material numbering on/PNUM,LINE,1 Turns line numbering on/PNUM,AREA,1 Turns area numbering on/PNUM,VOLU,1 Turns volume numbering on

SELECTION

GENERAL SYNTAX FOR SELECTION:ASEL,S,AREA,,3,5,1 Selects areas (ASEL), new set(S), select by area number (AREA), nocomponent to area number (blank), between 3 and 5, step size 1OR:KSEL,U,LOC,X,100,200,1 Removes (U) keypoints (KSEL) from current selection by keypointlocation (LOC), x-coordinate of location(X) for locations X=100, X=101, X=102 X=200inclusive

1

Page 2: ansys

ALLSEL Selects all entities with a single command.ASLL Selects those areas containing the selected lines.ASEL Selects a subset of areas.ASLV Selects those areas contained in the selected volumes.ESEL Selects a subset of elements.ESLA Selects those elements associated with the selected areas.ESLL Selects those elements associated with the selected lines.ESLN Selects those elements attached to the selected nodes.ESLV Selects elements associated with the selected volumes.KSEL Selects a subset of keypoints or hard points.KSLL Selects those keypoints contained in the selected lines.KSLN Selects those keypoints associated with the selected nodes.LSEL Selects a subset of lines.LSLA Selects those lines contained in the selected areas.LSLK Selects those lines containing the selected keypoints.NSEL Selects a subset of nodes.NSLA Selects those nodes associated with the selected areas.NSLE Selects those nodes attached to the selected elements.NSLK Selects those nodes associated with the selected keypoints.NSLL Selects those nodes associated with the selected lines.NSLV Selects those nodes associated with the selected volumes.VSEL Selects a subset of volumes.VSLA Selects those volumes containing the selected areas.

KEYPOINTS

K,1,100,200,300 Places keypoint at (100,200,300)KDELE,5,9,1 Deletes keypoints 5 to 9, step size=1KFILL Generates additional keypoints between 2 keypointsKNODE Places keypoints at nodes already existingKLIST Lists keypoint in modelKPLOT Plots keypointsKDIST,1,2 Reports distance between keypoints 1 and 2KGEN,10,1,3,1,0.1,0.1,0.1,20 Generates keypoints according to a pattern:

Performs generation exercise 10 times, operates on keypoints 1,2, and 3(1 to 3 step size 1), Increments keypoint positions (+0.1,+0.1,+0.1)for each additional generated set. Increments keypoint numbers by 20over the previous generated set, giving keypoints: 1,2,3,21,22,23...201,202,203

LINES

L,1,2 Creates line between keypoints 1 and 2LDELE Deletes lines 5 to 9, step size=1LDIV Divides line into segmentsLFILLT Creates circular fillet between two linesLGEN Generates lines according to a pattern (see KGEN)LLIST Lists lines in modelLPLOT Plots lines

2

Page 3: ansys

AREAS

A,1,2,3,4 Creates area between keypointsAL Creates areas by list of bounding linesALIST Lists areasAPLOT Plots areasADELE,5,9,1 Deletes area 5 to 9, step size=1

VOLUMES

V,1,2,3,4,5,6,7,8 Creates volume between keypointsVA Creates volumes by list of bounding areas

NODES

N,1,100,200,300 Creates node number 1 at (100,200,300)NDELE,1,5,2 Deletes nodes 1,3 and 5NGEN Generates nodes according to a pattern (see KGEN)NKPT Generates nodes at keypointsNLIST Lists nodesNPLOT Plots nodes

ELEMENTS

E,1,2,3,4 Generates element by list of node numbersETLIST Lists element typesELIST Lists elementsEPLOT Plots elementsEGEN Generates elements according to pattern (see KGEN)

PROPERTIES

ET,1,82 Sets element type number 1 to element type 82R,1,XXX Sets real constant 1 for element to XXXRLIST Lists real constantsMP,EX,1,200000 Sets material property for material 1 (Elastic modulus x-x)MP,GXY,1,200000 Sets material property for material 1 (Shear modulus x-y)MP,PRXY,1,0.3 Sets material property for material 1 (Poissons ratio)MPLIST Lists material properties

GEOMETRICAL PRIMITIVES

BLC4 Creates rectangle or cuboid by listing corner coordinatesCYL4 Creates cylinder or circleCON4 Creates conePOLY Creates polygonPRISM Creates prismRECTNG Creates rectangle

3

Page 4: ansys

BOOLEAN OPERATIONS

AADD Adds separate areas to create a single area.AGLUE Generates new areas by ”gluing” areas.AINA Finds the intersection of areas.AINP Finds the pairwise intersection of areas.AINV Finds the intersection of an area with a volume.ASBA Subtracts areas from areas.ASBL Subtracts lines from areas.ASBV Subtracts volumes from areas.BOPTN Specifies Boolean operation options.LCSL Divides intersecting lines at their point(s) of intersection.LGLUE Generates new lines by ”gluing” lines.LINA Finds the intersection of a line with an area.LINL Finds the common intersection of lines.LINP Finds the pairwise intersection of lines.LINV Finds the intersection of a line with a volume.LSBA Subtracts areas from lines.LSBL Subtracts lines from lines.LSBV Subtracts volumes from lines.VADD Adds separate volumes to create a single volume.VGLUE Generates new volumes by ”gluing” volumes.VINV Finds the intersection of volumes.VSBA Subtracts areas from volumes.VSBV Subtracts volumes from volumes.

MESHING

ESIZE Specifies element sizeAESIZE Specifies element size for area meshingLMESH Meshes linesAMESH Meshes areasVMESH Meshes volumesLCLEAR Clears element from linesACLEAR Clears element from areasVCLEAR Clears element from areasLESIZE Specifies number of divisions and spacing ratio on unmeshed lines

SOLUTION

ANTYPE,0 Specifies static analysisSOLVE Solves the modelD Creates displacement boundary conditions at nodesDK, DA, DL Creates displacement boundary conditions on keypoints, areas, linesFK Creates forces at keypointsSFA, SFL Creates surface loads on areas, linesBFA, BFL, BFK, BFV Created body loads at areas, lines, keypoints, volumesF Creates forces at nodesSF, SFE Creates surface loads on nodes, elementsBF,BFE Creates body loads on nodes, elements

4

Page 5: ansys

RESULTS

PLDISP Plots deformed shapePLNSOL Plots nodal solution (smoothed)PLESOL Plots element solution (actual results)PLVECT Produces vector plot of displacementsPRESOL Prints listing of element solutionPRNSOL Prints listing of nodal solutionPRVECT Prints listing of displacement vectorsPRRSOL Prints listing of reaction forces in solution

5