<pre class="programlisting">下面的这段命令流是ansys帮助中的一个例子,可以看到对流传热系数作为边界载荷是直接加在筒壁上的。</pre><pre class="programlisting">/PREP7
/TITLE,Steady-state thermal analysis of pipe junction
/UNITS,BIN ! Use British system of units (inches)
/SHOW, ! Specify graphics driver for interactive run
!
ET,1,90 ! Define 20-node, 3-D thermal solid element
MP,DENS,1,.285 ! Density = .285 lbf/in^3
MPTEMP,,70,200,300,400,500 ! Create temperature table
MPDATA,KXX,1,,8.35/12,8.90/12,9.35/12,9.80/12,10.23/12
! Define conductivity values
MPDATA,C,1,,.113,.117,.119,.122,.125
! Define specific heat values
MPDATA,HF,2,,426/144,405/144,352/144,275/144,221/144
! Define film coefficients
! Define parameters for model generation
RI1=1.3 ! Inside radius of cylindrical tank
RO1=1.5 ! Outside radius
Z1=2 ! Length
RI2=.4 ! Inside radius of pipe
RO2=.5 ! Outside pipe radius
Z2=2 ! Pipe length
!
CYLIND,RI1,RO1,,Z1,,90 ! 90 degree cylindrical volume for tank
WPROTA,0,-90 ! Rotate working plane to pipe axis
CYLIND,RI2,RO2,,Z2,-90 ! 90 degree cylindrical volume for pipe
WPSTYL,DEFA ! Return working plane to default setting
BOPT,NUMB,OFF ! Turn off Boolean numbering warning
VOVLAP,1,2 ! Overlap the two cylinders
/PNUM,VOLU,1 ! Turn volume numbers on
/VIEW,,-3,-1,1
/TYPE,,4
/TITLE,Volumes used in building pipe/tank junction
VPLOT
VDELE,3,4,,1 ! Trim off excess volumes
! Meshing
ASEL,,LOC,Z,Z1 ! Select area at remote Z edge of tank
ASEL,A,LOC,Y,0 ! Select area at remote Y edge of tank
CM,AREMOTE,AREA ! Create area component called AREMOTE
/PNUM,AREA,1
/PNUM,LINE,1
/TITLE,Lines showing the portion being modeled
APLOT
/NOERASE
LPLOT ! Overlay line plot on area plot
/ERASE
ACCAT,ALL ! Concatenate areas and lines
! at remote tank edges
LCCAT,12,7
LCCAT,10,5
LESIZE,20,,,4 ! 4 divisions through pipe thickness
LESIZE,40,,,6 ! 6 divisions along pipe length
LESIZE,6,,,4 ! 4 divisions through tank thickness
ALLSEL ! Restore full set of entities
ESIZE,.4 ! Set default element size
MSHAPE,0,3D ! Choose mapped brick mesh
MSHKEY,1
SAVE ! Save database before meshing
VMESH,ALL ! Generate nodes and elements within volumes
/PNUM,DEFA
/TITLE,Elements in portion being modeled
EPLOT
FINISH
!
/COM, *** Obtain solution ***
!
/SOLU
ANTYPE,STATIC ! Steady-state analysis type
NROPT,AUTO ! Program-chosen Newton-Raphson option
TUNIF,450 ! Uniform starting temperature at all nodes
CSYS,1
NSEL,S,LOC,X,RI1 ! Nodes on inner tank surface
<font color="#ff0000">SF,ALL,CONV,250/144,450 ! Convection load at all nodes</font>
CMSEL,,AREMOTE ! Select AREMOTE component
NSLA,,1 ! Nodes belonging to AREMOTE
D,ALL,TEMP,450 ! Temperature constraints at those nodes
WPROTA,0,-90 ! Rotate working plane to pipe axis
CSWPLA,11,1 ! Define local cylindrical c.s at working plane
NSEL,S,LOC,X,RI2 ! Nodes on inner pipe surface
<font color="#ff0000">SF,ALL,CONV,-2,100 ! Temperature-dep. convection load at those nodes</font>
ALLSEL
/PBC,TEMP,,1 ! Temperature b.c. symbols on
/PSF,CONV,,2 ! Convection symbols on
/TITLE,Boundary conditions
NPLOT
WPSTYL,DEFA
CSYS,0
AUTOTS,ON ! Automatic time stepping
NSUBST,50 ! Number of substeps
KBC,0 ! Ramped loading (default)
OUTPR,NSOL,LAST ! Optional command for solution printout
SOLVE
FINISH
!
/COM, *** Review results ***
!
/POST1
/EDGE,,1 ! Edge display
/PLOPTS,INFO,ON ! Legend column on
/PLOPTS,LEG1,OFF ! Legend header off
/WINDOW,1,SQUARE ! Redefine window size
/TITLE,Temperature contours at pipe/tank junction
PLNSOL,TEMP ! Plot temperature contours
CSYS,11
NSEL,,LOC,X,RO2 ! Nodes and elements at outer radius of pipe
ESLN
NSLE
/SHOW,,,1 ! Vector mode
/TITLE,Thermal flux vectors at pipe/tank junction
PLVECT,TF ! Plot thermal flux vectors
FINISH
</pre><br/> |