Вы находитесь на странице: 1из 32

Chapter 5

ANSYS命令: 基礎與觀念
Fundamentals and Concepts
Contents
5.1 ANSYS命令分類
Classification of ANSYS Commands
5.2 準備工作
Set Up Commands
5.3 ANSYS數學式
ANSYS Expressions
5.4 座標系統
Coordinate Systems
5.5 模型的元件及選擇
Model Entities and Selections
2/32
第5.1節

ANSYS命令分類
Classification of ANSYS Commands

3/32
5.1.1 ANSYS程序結構
... ! Set up
... ! Define parameters

/PREP7 ! Enter preprocessor


... ! Build solid model
... ! Define attribute tables
... ! Generate mesh
FINISH ! Back to begin level

/SOLU ! Enter solver


... ! Specify loads
... ! Specify solution options
... ! Solve the model
FINISH ! Back to begin level

/POST1 ! Enter general postprocessor


... ! Read a set of results
... ! Plot or print results
FINISH ! Back to begin level

/POST26 ! Enter time history postprocessor


... ! Store solution in variables
... ! Plot or print variables
4/32
5.1.2 ANSYS命令分類
Chapter 5 Chapter 6 Chapter 7
Set Up Preprocessing Solution
Enter/Leave a Module Solid Modeling Loads
Keypoints Loads on Analysis Model
Parameters and Expressions
Lines Loads on Solid Model
Coordinate Systems Areas Initial Conditions
Entities Selections Volumes Solution Options
Primitives Solve
Components
Booleans
General Postprocessing
Element Attributes
ET Table
Basic Commands
MP Table Element Tables
R Table Path Operations
CS Table Graphics Controls
Attributes Assignment
Time-History Postprocessing
Mesh Generation
Nodes
Elements
Mesh Size/Shape
Auto-Meshing

5/32
第5.2節

準備工作
Set Up Commands

6/32
5.2.1 ANSYS資料庫與檔案結構
Jobname.DB

Model

Loads
Database
Result
Model

Loads
Jobname.RST
Result
Result at t1

Result at t2

etc.

7/32
5.2.2 Set Up 命令
01 FINISH
02 /CLEAR
03 /TITLE, Title
04 /FILNAME, Fname
05 /SHOW, Fname, Ext
06 RESUME, Fname, Ext, Dir
07 SAVE, Fname, Ext, Dir

8/32
5.2.3 進入與離開模組
01 /PREP7
02 /SOLU
03 /POST1
04 /POST26
05 /OPT
06 FINISH
07 /EXIT

9/32
第5.3節

ANSYS數學式
ANSYS Expressions

10/32
5.3.1 ANSYS數學式
01 X=A+B
02 P=(R2+R1)/2
03 D=-B+(E**2)-(4*A*C)
04 XYZ=(A<B)+Y**2
05 INC=A1+(31.4/9)
06 M=((X2-X1)**2-(Y2-Y1)**2)/2
07 PI=ACOS(-1)
08 Z3=COS(2*THETA)-Z1**2
09 R2=SQRT(ABS(R1-3))
10 X=RAND(-24,R2)
11 *AFUN,DEG
12 THETA=ATAN(SQRT(3))
13 PHI=ATAN2(-SQRT(3),-1)
14 *AFUN,RAD
15 X249=NX(249)
16 SLOPE=(KY(2)-KY(1))/(KX(2)-KX(1))
11/32
5.3.2 參數名稱
• Grammatically similar FORTRAN variable
names.
• The first 8 letters are significant.
• Example of legal names are: ABC, PI,
X_OR_Y.
• Examples of illegal names are: NEW_VALUE,
2CF3, M&E.

12/32
5.3.3 ANSYS運算符號
Operator Description
+ Addition
- Subtraction
* Multiplication
/ Division
** Exponentiation
< Less-than
> Greater-than
13/32
5.3.4 ANSYS數學函數
(FORTRAN-Like Functions)
ABS(X) SQRT(X) SIN(X) TANH(X)

SIGN(X,Y) NINT(X) COS(X) ASIN(X)

EXP(X) MOD(X,Y) TAN(X) ACOS(X)

LOG(X) RAND(X,Y) SINH(X) ATAN(X)

LOG10(X) GDIS(X,Y) COSH(X) ATAN2(Y,X)

14/32
5.3.5 ANSYS “GET”
Functions
Coordinate ID Number DOF Results

NX(N) NODE(X,Y,Z) UX(N) TEMP(N) ENDS(N)

NY(N) KP(X,Y,Z) UY(N) PRES(N) VOLT(N)

NZ(N) UZ(N) VX(N) MAG(N)

KX(N) ROTX(N) VY(N) AX(N)

KY(N) ROTY(N) VZ(N) AY(N)

KZ(N) ROTZ(N) ENKE(N) AZ(N)

15/32
第5.4節

座標系統
Coordinate Systems

16/32
5.4.1 為什麼需要座標系統?
• When construct a model, you need a CS to
refer to.
• For various purpose, more than one CS’s are
preferable.
• In ANSYS, CS’s are stored in a CS table.

17/32
5.4.2 Global Coordinate Systems
(Predefined CS)

(0) Cartesian (X,Y,Z) (1) Cylindrical (R,q,Z) (2) Spherical (R,q,f) (5) Cylindrical (R,q,Y)

18/32
5.4.3 Local Coordinate System
(User-defined CS)

To defined a local CS, you need to


specify
• The CS type (e.g., Cartesian)
• Position of origin in global CS
• Directions of the 3 axes

19/32
5.4.4 CS Table
ID Description
0 Global Cartesian (X,Y,Z)
1 Global Cylindrical (R,q,Z)
2 Global Spherical (R,q,f)
3 (Reserved)
4 Working Plane
5 Global Cylindrical (R,q,Y)
6-10 (Reserved)
11 User Defined Local CS
12 User Defined Local CS
… …
20/32
5.4.5 Working Plane
• WP is a predefined CS (no. 4) which is
always coincident with the Active CS.
• Many commands are available to
manipulate the WP.
• WP can be used as dynamic Local CS.
• Primitives are created referring to WP.

21/32
5.4.6 Use of CS’s

• Active CS
• Element CS
• Nodal CS
• Result CS
• Display CS

22/32
5.4.7 CS Table 命令
01 LOCAL, KCN, KCS, XC, YC, ZC, THXY, THYZ, THZX
02 CLOCAL, KCN, KCS, XL, YL, ZL, THXY, THYZ, THZX
03 CSWPLA, KCN, KCS
04 CSLIST

23/32
5.4.8 指定座標系統
01 CSYS, KCN
02 DSYS, KCN
03 ESYS, KCN
04 RSYS, KCN
05 NROTAT, NODE1, NODE2, NINC

(a) Parallel to (b) Parallel to a local (c) Parallel to global


global cartesian CS cylindrical CS cylindrical CS
(Default)
24/32
5.4.9 Working Plane 命令
01 WPCSYS,, KCN
02 WPOFFS, XOFF, YOFF, ZOFF
03 WPROTA, THXY, THYZ, THZX
04 WPLANE,, X, Y, Z, XA, YA, ZA, XP, YP, ZP

25/32
第5.5節

模型的元件及選擇
Model Entities and Selections

26/32
5.5.1 Model Entities
• Entities to construct a solid model consist
of keypoints, lines, areas, and volumes.
• Entities to construct an analysis model
consist of nodes and elements.
• The hierarchical relations (from bottom to
top) are: keypoints-lines-areas-volumes-
nodes-elements.

27/32
5.5.2 Selection of Entities (1/3)
01 NSEL, S, LOC, X, 0
02 D, ALL, ALL, 0
03 ...
04 NSEL, ALL
05 F, N1, FY, -P/2
06 ...
07 SOLVE

28/32
5.5.2 Selection of Entities (2/3)
NSEL, Type, Item, Comp, VMIN, VMAX, VINC

NSEL,, LOC, X, 0 選出X = 0的所有節點


NSEL,, LOC, Y, -5, 5 選出Y座標在-5至5之間的所有節點
NSEL,, NODE, 1, 100 選出1至100號的所有節點
NSEL, ALL 選出所有定義過的節點
NLIST, 1, 100 以文字列印出1至100號節點的資料
NLIST, ALL 以文字列印出所有節點的資料

29/32
5.5.2 Selection of Entities (3/3)
Type Description
S Select a new set (default)
R Reselect a set from the current set
A Select a set and add to the current set
U Unselect a set from the current set
ALL Restore the full set
NONE Clear the current set
INVE Invert the current set; selected becomes
unselected and vice versa
STAT Display the current selection status

30/32
5.3.3 Entities Selection Commands
01 NSEL, Type, Item, Comp, VMIN, VMAX, VINC
02 NSLE, Type
03 NSLK, Type
04 NSLL, Type, NKEY
05 NSLA, Type, NKEY
06 NSLV, Type, NKEY
07 ESEL, Type, Item, Comp, VMIN, VMAX, VINC
08 ESLN, Type, EKEY
09 ESLL, Type
10 ESLA, Type
11 ESLV, Type
12 KSEL, Type, Item, Comp, VMIN,VMAX, VINC
13 KSLN, Type
14 KSLL, Type
15 LSEL, Type, Item, Comp, VMIN, VMAX, VINC
16 LSLK, Type, LSKEY
17 LSLA, Type
18 ASEL, Type, Item, Comp, VMIN, VMAX, VINC
19 ASLL, Type, ARKEY
20 ASLV, Type
21 VSEL, Type, Item, Comp, VMIN, VMAX, VINC
22 VSLA, Type, VLKEY
23 DOFSEL, Type, Dof1, Dof2, ..., Dof6
24 ALLSEL
31/32
5.5.4 Components
01 CM, Cname, Entity
02 CMGRP, Aname, Cname1, Cname2, ..., Cname8
03 CMSEL, Type, Name
04 CMLIST, Name

32/32

Вам также может понравиться