ET,1,SOLID45 定义单元类型
KEYOPT,1,2,1 单元选项(OPTION)
MP,EX,1,100 定义材料参数,1为材料号
tb, 材料表(定义塑性、超弹性等)
*dim,rr,array,3,2 定义数组rr为3行2列
k,1,X,Y,Z 定义KEYPOINT1坐标
LSTR,1,2 由1、2点生成线
lesize 划分网格,尺寸定义
NUMMRG,KP, , , ,LOW 压缩节点号
asel , 选择面
r, 定义实常数
wpro,,-90, 旋转工作平面
esln,s 选择与节点相关的单元
emodif,all,real,i 修改单元实常数
amesh 对面划分网格
type,2
mat,2
real,1
esys,0 (或 aatt) 激活单元类型2,材料号2,实常数1,单元坐标系
vsweep,all,,, 扫掠网格
csys,4 激活坐标系4
-------------------------------------------------------------------------------------------------------------------------------
numstr,kp,100 !define the following keypoint number start with with the 100
l,1,2,4 !如果CSYS=0则生成直线,如果CSYS=1则生成弧线,这个命令与当前的坐标系统有
lsel , !取线
wprof,,12 !移坐标
alsv !拾取一选定实体上的所有面
nsla !同理,拾取一选定面上的所有节点
aatt,1,1,1 !等效于楼上的 MAT,1 TYPE,1 REAL, 1对面定义属性
mshke,0
!网格格划分进行限定:采用FREE进行划分;网格形状为 四 边形或六面体
mshape,1,2d
vmesh ,2 !划分实体网格,后面的参数是实体编号如:2
/solu !进入求解过程
antype,static !选择求解类型为静力分析
asel,s,loc,x,
nsla
d,all,uy,,,,,roty,rotz !对选定的面上的所有节点施加UY ROTY ROTZ 的对称约束.
allsel !恢复全部选择等效于:ASELL,ALL ESEL,ALL NSEL,ALL
asel,s,,,1
sfa,all,1,press,1000 !对选定的面1施加均布力1000
allsel
/stat,slou !显示求解状况
solve
/post1 !进入后处理
set,list !列出求解的步数及相关信息
set,last !读取最后一步结果
plns,s,eqv,,1 !绘出节点的等效应力云图
plns,epto,eqv !绘出节点的等效应变云图
/post26 !进入时间后处理器
plvar,2 !对以定义的变量2用曲线绘出
/exit,save !退出并存盘
好了,参照楼上师兄的命令,一个简单的ANSYS分析就进行完了.
愿大家共同进步!!
* --> k, l, a, v, e, n, cm, et, mp, r where ==>
k --> Keypoints
l --> Lines
a --> Area
v --> Volumes
e --> Elements
n --> Nodes
cm --> component
et --> element type
mp --> material property
r --> real constant
$ --> d, f, sf, bf, ic, where ==>
d --> DOF constraint (ux... in Structural, Temp in thermal,
f --> Force Load ( Heat in thermal)
sf --> Surface load on nodes
bf --> Body Force on Nodes
$* --> dk --> DOF constraints on KP (Vx,Vy,Pres... in CFD)
dl --> DOF constraints on Lines
da --> DOF constraints on Areas
fk --> Force on Keypoints
sfl --> Surface load on Lines
sfa --> Surface load on Areas
sfe --> Surface load on element faces
bfk --> Body Force on Keypoints
bfl --> Body Force on Lines
bfa --> Body Force on Area
bfv --> Body Force on Volumes
bfe --> Body Force on Elements
ic --> Initial Conditions ",
asba,p --> Subtract Area from Area
asbl,p --> Divide Area by line
vsba,p --> Divide volume by Area
lsbw,p --> Divide line by Workplane
vsbw,p --> Divide volume by Workplane
asbw,p --> Divide area by Workplane
vsbv,p --> subtract Volume by another volume
vdrag,p --> Drag areas along a line to create a new volume
adrag,p --> Drag line along a line to create a new area
ldrag,p --> Drag KP along a line to create a new line
k,p ---> Allows user to pick KP in the Workplane
l,p ---> Create lines from existing KP
ak,p ---> Create area from KP
al,p ---> Create area from lines
v,p ---> Create Volume from KP
va,p ---> Create Volume from Areas
e,p ---> Create Elem from existing nodes
en,p ---> Create Elem from nodes
D,p --> To apply DOF on nodes
DK,p --> To apply DOF on Keypoints
DL,p --> Apply DOF on Lines
DA,p --> Apply DOF on Areas ( symmetry or Anti-symmetry will be prompted)
****************
16b. FORCE Loading:
COMMAND SYNTAX : $*,p
See the valid combinations below:
f,p --> Forces on nodes
fk,p --> Force on Keypoints
(fa,p or FV,p or FL,p ----> Since force cannot be applied on Lines or Area & volumes... this command does not exist.)
sf,p --> Surface Load on a set of Nodes
sfl,p --> Surface Load on Lines
sfa,p --> Surface Load on Area
sfe,p --> Surface Load on Element
(SFk,p and SFV,p do not exist since pressure cannot be applied on a single Kp and neither can it be applied on a volume)
****************
16d. BodyForce Load: COMMAND SYNTAX : bf*,p
See the valid combinations below:
bf,p --> Bodyforce Load on a set of Nodes
bfk,p --> Bodyforce Load on KP
bfl,p --> Bodyforce Load on Lines
bfa,p --> Bodyforce Load on Areas
bfv,p --> Bodyforce Load on Volumes
bfe,p --> Bodyforce Load on E
--------------------------------------------------------------------------------------------------------
ANSYS具有混合网格剖分的功能。例如两个粘在一起的面,可以对一个面进行三角形划分,再对另一个面进行四边形划分。过程见下列命令:
/prep7
et,1,42
rect,,1,,1
rect,1,2,,1
aglue,all
mshape,0,2d
amesh,1
mshape,1,2d
amesh,3
FINISH
/CLEAR
/Title, Cross-Sectional Results of a Simple Cantilever Beam
/PREP7
! All dims in mm
Width = 60
Height = 40
Length = 400
BLC4,0,0,Width,Height,Length ! Creates a rectangle
/ANGLE, 1 ,60.000000,YS,1 ! Rotates the display
/REPLOT,FAST ! Fast redisplay
ET,1,SOLID45 ! Element type
MP,EX,1,200000 ! Young's Modulus
MP,PRXY,1,0.3 ! Poisson's ratio
esize,20 ! Element size
vmesh,all ! Mesh the volume
FINISH
/SOLU ! Enter solution mode
ANTYPE,0 ! Static analysis
ASEL,S,LOC,Z,0 ! Area select at z=0
DA,All,ALL,0 ! Constrain the area
ASEL,ALL ! Reselect all areas
KSEL,S,LOC,Z,Length ! Select certain keypoint
KSEL,R,LOC,Y,Height
KSEL,R,LOC,X,Width
FK,All,FY,-2500 ! Force on keypoint
KSEL,ALL ! Reselect all keypoints
SOLVE ! Solve
FINISH
/POST1 ! Enter post processor
PLNSOL,U,SUM,0,1 ! Plot deflection
WPOFFS,Width/2,0,0 ! Offset the working plane for cross-section view
WPROTA,0,0,90 ! Rotate working plane
/CPLANE,1 ! Cutting plane defined to use the WP
/TYPE,1,8 ! QSLICE display
WPCSYS,-1,0 ! Deflines working plane location
WPOFFS,0,0,1/16*Length ! Offset the working plane
/CPLANE,1 ! Cutting plane defined to use the WP
/TYPE,1,5 ! Use the capped hidden display
PLNSOL,S,EQV,0,1 ! Plot equivalent stress
!Animation
ANCUT,43,0.1,5,0.05,0,0.1,7,14,2 ! Animate the slices
1.2 设材料线弹性、非线性特性
u mp,lab, mat, co, c1,…….c4 定义材料号及特性
lab: 待定义的特性项目(ex,alpx,reft,prxy,nuxy,gxy,mu,dens)
ex: 弹性模量
nuxy: 小泊松比
alpx: 热膨胀系数
reft: 参考温度
reft: 参考温度
prxy: 主泊松比
gxy: 剪切模量
mu: 摩擦系数
dens: 质量密度
mat: 材料编号(缺省为当前材料号)
co: 材料特性值,或材料之特性,温度曲线中的常数项
c1-c4: 材料的特性-温度曲线中1次项,2次项,3次项,4次项的系数
u Tb, lab, mat, ntemp,npts,tbopt,eosopt 定义非线性材料特性表
Lab: 材料特性表之种类
Bkin: 双线性随动强化
Biso: 双线性等向强化
Mkin: 多线性随动强化(最多5个点)
Miso: 多线性等向强化(最多100个点)
Dp: dp模型
Mat: 材料号
Ntemp: 数据的温度数
对于bkin: ntemp缺省为6
miso: ntemp缺省为1,最多20
biso: ntemp缺省为6,最多为6
dp: ntemp, npts, tbopt 全用不上
Npts: 对某一给定温度数据的点数
u TBTEMP,temp,kmod 为材料表定义温度值
temp: 温度值
kmod: 缺省为定义一个新温度值
如果是某一整数,则重新定义材料表中的温度值
注意:此命令一发生,则后面的TBDATA和TBPT均指此温度,应该按升序
若Kmod为crit, 且temp为空,则其后的tbdata数据为solid46,shell99,solid191中所述破坏准则
如果kmod为strain,且temp为空,则其后tbdata数据为mkin中特性。
u TBDATA, stloc, c1,c2,c3,c4,c5,c6
给当前数据表定义数据(配合tbtemp,及tb使用)
stloc: 所要输入数据在数据表中的初始位置,缺省为上一次的位置加1
每重新发生一次tb或tbtemp命令上一次位置重设为1,
(发生tb后第一次用空闲此项,则c1赋给第一个常数)
u tbpt, oper, x,y 在应力-应变曲线上定义一个点
oper: defi 定义一个点
dele 删除一个点
x,y:坐标
-------------------------------------------------------------------------------------------------
! ELLIPT by Hai C. Tang in tang/ansys
! Creates an elliptic area
! *USE,ELLIPT,A,B,N
! where x**2/a**2 + y**2/b**2 = 1
! and the whole elliptic arc is divided into N parts
! equally by the angle at origin
*SET,A,ARG1
*SET,B,ARG2
*SET,N,ARG3
*AFUN,DEG
THETA=360.0/N
K,,A
*GET,KMIN,KP,,NUM,MAX
*DO,I,1,N
ANGX=I*THETA
X=A*COS(ANGX)
Y=B*SIN(ANGX)
K,,X,Y
**GET,KMAX,KP,,NUM,MAX
L,KMAX-1,KMAX
*ENDDO
*GET,LMAX,LINE,,NUM,MAX
LMIN=LMAX-N+1
NUMMRG,ALL
LSEL,S,LINE,,LMIN,LMAX
AL,ALL
LSEL,ALL
An ANSYS program Using Macro
/PREP7
ET,1,42
R,1,.25
MP,EX,1,1e7
$*$USE,ELLIPT,.05,.2,36
/pnum,kp,1
RECTNG,,3,,2
/pnum,area,1
aplot
asba,2,1
kesize,10,.01
ksel,s,kp,,1,5
kesize,all,.04
ksel,s,kp,,38,40
kesize,all,.2
ksel,all
amesh,3
save
FINISH
/SOLU
lsel,s,line,,41,42
dl,all,3,symm
lsel,all
sfl,38,pres,-100
solve
FINISH
/POST1
PLNSOL,S,EQV
Mesh Refinement
High gradient areas generally require finer meshes. Meshes
can be refined with:
Adaptive meshing
User adjustment
Adaptive meshing automatically evaluates mesh discretization
error in each element and determines if a particular mesh is fine
enough. If it is not, the element is refined with finer meshes
automatically.
Users can also revise the mesh by modifying the mesh controls
after they have reviewed the results of initial runs. Only the
meshes in the regions of steep gradients need to be revised.
Usually this is less CPU intensive and is more applicable to the
situation that requires only minor adjustments.
Consider the solution for the semi-infinite plate with an elliptic
crack in last example. Clearly the steep gradient is located near
the crack tip, and only the tip area need to be refined. So let's
binarily bisect tip element m times with the following formula;
m = log(b/a + 1)
A Mesh Refinement Example
! *USE,ELLIPTQ,A,B,N
*SET,A,ARG1
*SET,B,ARG2
*SET,N,ARG3
*AFUN,DEG
THETA=90.0/N
K
*GET,KMIN,KP,,NUM,MAX
K,,A
L,KMIN,KMIN+1
*GET,LMIN,LINE,,NUM,MAX
*IF,A,GT,B,THEN
M=LOG(A/B+1)
ANGX=THETA/2**(M+1)
*DO,I,1,M
ANGX=ANGX*2
X=A*COS(ANGX)
Y=B*SIN(ANGX)
K,,X,Y
*GET,KMAX,KP,,NUM,MAX
L,KMAX-1,KMAX
*ENDDO
*ENDIF
*DO,I,1,N-1
ANGX=I*THETA
X=A*COS(ANGX)
Y=B*SIN(ANGX)
K,,X,Y
*GET,KMAX,KP,,NUM,MAX
L,KMAX-1,KMAX
*ENDDO
*IF,A,LT,B,THEN
M=LOG(B/A+1)
ANGM=THETA
*DO,I,1,M
ANGM=ANGM/2
ANGX=ANGX+ANGM
X=A*COS(ANGX)
Y=B*SIN(ANGX)
K,,X,Y
*GET,KMAX,KP,,NUM,MAX
L,KMAX-1,KMAX
*ENDDO
*ENDIF
ANGX=N*THETA
X=A*COS(ANGX)
Y=B*SIN(ANGX)
K,,X,Y
*GET,KMAX,KP,,NUM,MAX
L,KMAX-1,KMAX
L,KMAX,KMIN
*GET,LMAX,LINE,,NUM,MAX
NUMMRG,ALL
LSEL,S,LINE,,LMIN,LMAX
AL,ALL
LSEL,ALL
A Mesh Refinement Example
/PREP7
ET,1,42
R,1,.25
MP,EX,1,1e7
ELLIPTQ,.05,.2,9
/pnum,kp,1
RECTNG,,3,,2
/pnum,area,1
aplot
asba,2,1
ksel,s,kp,,11,13
kesize,all,.005
ksel,s,kp,,9,10
kesize,all,.001
ksel,all
kesize,2,.02
ksel,s,kp,,15,17
kesize,all,.2
ksel,all
amesh,3
save
FINISH
/SOLU
lsel,s,line,,18,19
dl,all,3,symm
lsel,all
sfl,15,pres,-100
solve
FINISH
/POST1 PLNSOL,S,EQV
Graphics Display
The first command in an interactive ANSYS run, /SHOW
specifies the graphics device driver. The most common drivers
at NIST are:
X11,X11C, etc X-windows based
3D For local run only
3D has local graphics functions that work only the workstation
actually running the ANSYS program. X-windows allow users to
run ANSYS on a network connected remote machine and to
instantaneously display the results on a local workstation or a
X-terminal.
ANSYS has two types of commands that control a display:
Graphics action commands:
xPLOT displays elements/volumes/areas/lines
x = E,V,A,L,K,N /keypoints/nodes,respectively
PLNSOL plots nodal solution
PLESOL plots element solution
etc.
Graphics specification commands:
/PNUM,label,key specifies if numbers of label are
shown
/PBC,item,component,key specifies if constraints or loads
are shown
/PSYMB,label,key specifies if symbols(CS/LDIR etc)
are shown
/EDGE,wn,key,angle specifies if edges are shown
etc.
Selective displays can be made with the nodes and elements
SELECT utilities - ASEL, NSLA, NSEL, ESEL, etc. If a
selective command is issued before the PLNSOL command,
only the results on the selected elements will be displayed. The
following comands are the frquently used graphics commands:
PLNSOL,item,comp Displays the solution results
as continuous contours
PLDISP,kund,kscal Displays the displaced structure
/WINDOW,wn,xmin,xmax, Defines window size on
screen
ymin,ymax,ncopy
/TYPE,wn,type Defines type of display
/FOCUS,wn,xf,yf,zf,ktrans Defines the location of object
to be at the center of the window
/DIST,wn,dval,kfact Defines the viewing distance for
magnification and perspective
/VIEW,wn,xv,yv,zv Defines the viewing direction of
the ojbect
Grph menu button Interactive graphics for Zoom,
Rotation, and Translation
Use of Generic Utilities
In Revision 5.0, many utility commands are generic and
consistent for all disciplines, and they are available throughout
the program. For example, select logic and components are
available anywhere in the program, at anytime, and button
menus are also available. The type of selection (reselect,
unselect, additional select, all, etc.) has been moved to the first
field on the command, and there are more fields for the basis of
selection.
NSEL
ESEL
KSEL
LSEL
ASEL
VSEL
CMSEL
Exiting the PREP7 preprocess
FINISH command at the end of PREP7 modeling does not
save the database; issue SAVE command to save the
database before exiting the process.
ANSYS Example 1
Thermal Modeling of a Cryogenic Radiometer
Given: A radiometer at cryogenic temperature is applied
with a
constatnt heat flux at given nodes on the surface
of a
2-layer cone whose base is welded to a
cylindrical tube.
The radiometer is modeled with axial symmetry.
ANSYS Program for Example 1
/FILNAM,AXSYM1 ! Specify prefix of file names
/TITLE,Cryogenic Radiometer
/UNITS,cgs ! SI units: cm,g,s,K,1e-7 J, etc.
! for reference only
/PREP7 ! Begin PREP7 preprocessing phase
ET,1,55,,,1 ! 2-D 4 node PLANE element, axial sym.
! ET,1,PLANE77 ! 2-D 8 node PLANE element
! MPTEMP,1,2,5,10,20 ! Temp. at 2,5,10,and 20 K
MPTEMP,1,0,2.8,7.8,17.8 ! Temp = ABTemp - 2.2 K
/COM,Thermal Conductivity, KXX, ABW/cm.K (1E-7
W/cm.K)
MPDATA,KXX,1,1,1.69E7,3.10E7,5.74E7,10.75E7 ! MAT 1
(Cu)
MPDATA,KXX,2,1,2.2E4,5.0E4,10.0E4,20.0E4 ! MAT 2
(Paint)
MPDATA,KXX,3,1,1.57E4,3.69E4,7.96E4,18.3E4 ! MAT 3
(SS)
/COM,Specific Heat, C, ABJ/kg.K
MPDATA,C,1,1,0.355E3,1.8E3,9.0E3,73.0E3 ! MAT 1
MPDATA,C,2,1,0.144E3,9.23E3,23.1E3,51.0E3 ! MAT 2
MPDATA,C,3,1,1.0E4,2.4E4,5.0E4,13.0E4 ! MAT 3
MP,DENS,1,9.08 ! Density for MAT 1
MP,DENS,2,1.154 ! Density for MAT 2
MP,DENS,3,8.00 ! Density for MAT 3
/COM, *** Define Geometry
R=1.9185 ! SET radius, cone1
R1=1.905 ! SET radius, cone2
R2=1.95 ! SET radius, cone3
R3=1.900 ! SET radius, cylinder I.D.
H=4.632 ! SET Height of cone1
H1=4.600 ! SET Height of cone2
H2=4.586 ! SET Height of cone3
H3=-5.0E-1 ! SET Height of cylinder (MAT 1)
H4=-3.50 ! SET Height of cylinder (MAT 3)
THK1=R-R1 ! Cylinder thickness and cone disp for
MAT 1
THK2=R1-R2 ! Paint displacement in x-dir for MAT 2
THK3=R1-R3 ! Cylinder thickness for MAT 3
DH=0.05
DR=DH*R/H ! rate of change of copper cone
radius
DH1=0.02
DR1=DH1*R/H ! rate of change of copper cone
radius
! near the tip
CSYS,0
N,1,R,H3 ! Node 1
NGEN,11,1,1,,,0,DH ! Node 1-11
NGEN,91,1,11,,,-DR,DH ! Node 11-101
NGEN,5,1,101,,,-DR1,DH1 ! Node 101-105
N,150,0,H ! Node 150 is the tip of cone1
NGEN,2,200,1,105,1,-THK1 ! Node 201-305
N,350,0,H1 ! Node 350 is the tip of cone2
NGEN,2,1,350,,,THK1 ! Node 351 on cone1
NGEN,2,200,211,305,1,-THK2 &! Node 411-505
N,550,0,H2 ! Node 550 is the tip of cone3
NGEN,2,1,550,,,THK2 ! Node 551 on cone2
NGEN,2,1,551,,,THK1 ! Node 552 on cone1
N,601,R1,H4 ! Node 601 at cylinder bottom
NGEN,71,1,601,,,0,DH ! Node 601-671
NGEN,2,100,601,671,1,-THK3 ! Node 701-771
MAT,1 &! MAT 1 is copper
E,201,1,2,202 ! Elem 1
EGEN,104,1,1 ! Elem 1-104
/PNUM,ELEM,1
E,305,105,552,551 ! Elem 105
E,551,552,351,350 ! Elem 106
E,350,351,150,150 ! Elem 107
EPLOT
*ASK,KC,' to continue:',0
*IF,KC,NE,0,THEN
FINISH
/EXIT
*ENDIF
MAT,2 &! MAT 2 is paint
E,411,211,212,412 ! Elem 108
EGEN,94,1,108 ! Elem 108-201
E,505,305,551,550 ! Elem 202
E,550,551,350,350 ! Elem 203
EPLOT
*ASK,KC,' to continue:',0
*$IF,KC,NE,0,THEN
FINISH
/EXIT
*ENDIF
MAT,3 ! MAT 3 is stainless steel
E,701,601,602,702 ! Elem 204
*GET,LELM,ELEM,,NUM,MAX ! Find the last element
number
! LELM=204
EGEN,70,1,LELM ! Elem 204-273
EPLOT
NUMMRG,NODE
SAVE
FINISH
ANSYS Example 2
/TITLE, Full NIST Piezo Shaker, Case A with Damping
/PREP7
ET,1,SOLID5 ! 3-D Multi field solid element
/COM, *** Material properties for Piezoelectric
/COM, *** ceramic PZT-5 -- CLEVITE CORP
MP,DENS,3,.000722
/COM, *** Permittivity (X,Y and Z Directions)
MP,PERX,3,3.8853E-10
TB,PIEZ,3 ! [E] = Piezoelectric matrix
TBDATA,3,-.00511
TBDATA,6,-.00511
TBDATA,9,.00972
TBDATA,11,.00795
TBDATA,13,.00795
MP,MURX,3,1 ! Create dummy properties to avoid
MP,KXX,3,1 ! warning messages
/COM *** B4C - Boron Carbide Properties (table)
MP,DENS,2,.000345
MP,EX,2,54.E6
MP,NUXY,2,.345
/COM *** Adhesive Properties
MP,DENS,4,.00016
MP,EX,4,15.E5
MP,NUXY,4,.38
/COM *** WC - Tungsten Carbide Properties (base)
MP,DENS,5,.00163
MP,EX,5,99.E6
MP,NUXY,5,.3
DMPRAT,.01
HAA=1.002 ! Height of top of lower adhesive layer
HP=1.202 ! Height to top of piezoelectric layer
HAB=1.204 ! Height to top of upper adhesive layer
RB=.75
HBA=.9
RT=.6
HT=1.6 ! Height to table surface
HS=HT-.2 ! Height to base of stud hole
/COM, *** Define Geometry
DH=.10 ! Element high
DANG=11.25 ! 11.25 Degrees
DR=0.075 ! Radical length of element
CYCS,1
N,1,RB
NGEN,33,1,1,,,0,DANG
NGEN,8,100,1,33,1,-DR
ND1=701
*DO,I,1,2
N2I=2**I
ND2=ND1+32
NGEN,2,100,ND1,ND2,N2I,-DR
ND1=ND1+100
*ENDDO
ND1=ND1+98
N,ND1,0
NGEN,10,1000,1,ND1,1,0,0,DH
NGEN, 2,1000, 9201, 9000+ND1,1,0,0,DH
NGEN, 2,1000,10201,10000+ND1,1,0,0,0.002
NGEN, 3,1000,11201,11000+ND1,1,0,0,DH
NGEN, 2,1000,13201,13000+ND1,1,0,0,0.002
NGEN, 5,1000,14201,14000+ND1,1,0,0,DH
NEGEN=32
MAT,5 ! WC - Tungsten Carbide (base)
E,1,2,102,101,1001,1002,1102,1101
EGEN,NEGEN,1,1
EGEN,7,100,1,NEGEN,1
ND1=701
*DO,I,1,2
N2I=2**I
N2IM1=N2I/2
NEGS=NEGEN/N2I
ND2=ND1+100
ND3=ND1+1000
ND4=ND2+1000
ND2=ND1+100
ND3=ND1+1000
ND4=ND2+1000
E,ND1,ND1+N2IM1,ND2,ND3,ND3+N2IM1,ND4
E,ND2,ND2+N2I,ND1+N2IM1,ND4,ND4+N2I,ND3+N2IM1
E,ND1+N2IM1,ND1+N2I,ND2+N2I,ND3+N2IM1,ND3+N2I,ND
4+N2I
*GET,LELM,ELEM,,NUM,MAX ! Find the last element
number
EGEN,NEGS,N2I,LELM-2,LELM,1
ND1=ND1+100
*ENDDO
ND2=ND1+98
ND3=ND1+1000
ND4=ND3+98
*DO,I,1,8
E,ND1,ND1+N2I,ND2,ND3,ND3+N2I,ND4
ND1=ND1+N2I
ND3=ND3+N2I
*ENDDO
*GET,LELM,ELEM,,NUM,MAX ! Find the last element
number
EGEN,9,1000,1,LELM,1
NELM=LELM-
*GET,LELM1,ELEM,,NUM,MAX ! Find the last element
number
EGEN,2,1000,LELM1-NELM+1,LELM1,1
MAT,4 ! MAT 4 is the bdhesive glue
*GET,LELM1,ELEM,,NUM,MAX ! Find the last element
number
EGEN,2,1000,LELM1-NELM+1,LELM1,1
MAT,3 ! MAT 4 is the bdhesive glue
*GET,LELM1,ELEM,,NUM,MAX ! Find the last element
number
EGEN,3,1000,LELM1-NELM+1,LELM1,1
*GET,LELM1,ELEM,,NUM,MAX ! Find the last element
number
MAT,2 ! MAT 2 is B4C - Boron Carbide (table)
*GET,LELM1,ELEM,,NUM,MAX ! Find the last element
number
EGEN,5,1000,LELM1-NELM+1,LELM1,1
/PNUM,ELEM,1
EPLOT
NUMMRG,NODE
SAVE
FINISH
FLOTRAN Example 1
/TITLE,Flow through a Curved Channel
/UNITS,SI ! SI units
/PREP7 ! Begin PREP7 preprocessing
ET,1,55 ! Plane55 Element type
! Define pipe dimensions
D=20 ! channel width
R=0.5*D
RI=40 ! Radius of curved center line of channel
D4=D*4 ! Four times channel width
RR=R*R
V0=200
K,1,,-R
K,2,,R
K,3
L,1,2
/pnum,line,1
/pnum,kp,1
/pnum,area,1
/pnum,node,1
lplot
LESIZE,1,,,16,-4
ESHAPE,2 ! Quadrilaterals only
/triad,off ! turn off coordinate traid at origin
KPLOT
K,4,D4+RI
K,5,D4+RI,D4*2+RI
L,3,4
L,4,5
LFILL,2,3,RI
LESIZE,2,,,32,0.5
LESIZE,3,,,48,2.5
LESIZE,4,,,32
LPLOT
ADRAG,1,,,,,,2,4,3
APLOT
AMESH,ALL
Flow through a Curved Channel
FLOTRAN Modeling - Example 2
/TITLE,Flow through a Curved Pipe
/UNITS,SI
/PREP7
ET,1,55
ET,2,70
! Define pipe dimensions
D=20 ! Pipe diameter
RI=40 ! Radius of curved center line of pipe
D4=D*4 ! Four times diameter length
RR=(0.5*D)**2
V0=200
PCIRC,0.4*D,,0,90
PCIRC,0.4*D,0.5*D,0,90
NUMMRG,ALL
/PNUM,line,1
/PNUM,area,1
/PNUM,kp,1
RR=(0.5*D)**2
V0=200
PCIRC,0.4*D,,0,90
PCIRC,0.4*D,0.5*D,0,90
NUMMRG,ALL
/PNUM,line,1
/PNUM,area,1
/PNUM,kp,1
LPLOT
TYPE,1
LESIZE,1,,,8
LESIZE,2,,,8,2
LESIZE,3,,,8,0.5
LESIZE,5,,,4,2
LESIZE,7,,,4,2
APLOT
ESHAPE,2
AMESH,ALL
ARSYM,X,ALL
NUMMRG,ALL
ARSYM,Y,ALL
NUMMRG,ALL
NUMCMP,NODE
/pnum,node,1
/triad,off
TYPE,2
K,23,,,D4+RI
K,24,D4*2+RI,,D4+RI
L,3,23
L,23,24
lplot
LFILL,13,16,RI
LESIZE,13,,,16,0.25
LESIZE,18,,,32
LESIZE,16,,,24,5
/VIEW,1,1,1
VDRAG,ALL,,,,,,13,18,16
NUMMRG,NODE
ASEL,S,TYPE,,1
ACLEAR,ALL
/pnum,node,0
/pnum,kp,0
/pnum,elem,0
/triad,on
EPLOT
VSEL,S,TYPE,,2
NSLV,S,1 下载本文