声振论坛

 找回密码
 我要加入

QQ登录

只需一步,快速开始

查看: 6638|回复: 15

[综合讨论] 一个完整的三维移动高斯分布表面热源焊接例子

[复制链接]
发表于 2006-5-16 07:33 | 显示全部楼层 |阅读模式

马上注册,结交更多好友,享用更多功能,让你轻松玩转社区。

您需要 登录 才可以下载或查看,没有账号?我要加入

x
  1. /prep7
  2. /UNITS,si

  3. et,1,solid70
  4. mp,c,1,544.28
  5. mp,kxx,1,15.06
  6. mp,dens,1,4500

  7. block,0,30,0,15,0,3

  8. esize,1
  9. vmesh,all
  10. FINISH

  11. /SOLU
  12. !PARAMETER TABLE TO INPUT HEAT FLUX AS A MOVING SOURCE
  13. !SPEED OF HEAT SOURCE IN X DIRECTION v=(200/60)m/s
  14. !GAUSS VARIATION ASSUMED IN X & Y DIRECTION AS q=qmax/EXP(K*R**2)
  15. !TOTAL HEAT INPUT Q=3.14*qmax/K
  16. !DIMENSIONING TABLE NAMED "FLUX2"
  17. v=1
  18. L=30
  19. NUM_TIME=L/v+1
  20. NUM_X=L/v+1

  21. *DIM,FLUX2,TABLE,NUM_TIME,NUM_X,7,TIME,X,Y

  22. *DO,K,1,7,1

  23. *DO,I,1,NUM_TIME,1
  24. FLUX2(I,0,K)=(I-1)
  25. *ENDDO

  26. *DO,J,1,NUM_X,1
  27. FLUX2(0,J,K)=(J*v-v)
  28. *ENDDO

  29. Q=1000
  30. KAPA=1/4
  31. qmax=((Q*KAPA)/3.14159)
  32. PERCENT=0.98
  33. RADIUS=ABS(SQRT(1/KAPA*LOG(1/(1-PERCENT))))

  34. !N=[RADIUS/v]

  35. *DO,ANTIME,1,NUM_TIME,1
  36. *DO,N,0,15,1
  37. XDIST=(N*v)
  38. *IF,(ANTIME-N),GT,0,THEN
  39. *IF,SQRT((XDIST)**2+((RADIUS/6)*(K-1))**2),LE,RADIUS,THEN
  40. !
  41. GAUSS=qmax/EXP(KAPA*((XDIST)**2+((RADIUS/6)*(K-1))**2))
  42. FLUX2(ANTIME,ANTIME-N,K)=GAUSS*10e5
  43. !
  44. *ELSE
  45. *ENDIF
  46. *ENDIF
  47. !
  48. *IF,(ANTIME+N),LE,NUM_TIME,THEN
  49. *IF,SQRT((XDIST)**2+((RADIUS/6)*(K-1))**2),LE,RADIUS,THEN
  50. !
  51. GAUSS=qmax/EXP(KAPA*((XDIST)**2+((RADIUS/6)*(K-1))**2))
  52. FLUX2(ANTIME,ANTIME+N,K)=GAUSS*10e5
  53. !
  54. *ELSE
  55. *ENDIF
  56. *ENDIF
  57. *ENDDO
  58. *ENDDO
  59. !
  60. !INPUT Y DIRECTION DIVISIONS
  61. !---------------------------
  62. FLUX2(0,0,K)=(K-1)*(RADIUS/6)
  63. *ENDDO

  64. antype,trans
  65. tunif,20
  66. kbc,1

  67. *SET,delt,1
  68. timint,on
  69. autots,off

  70. *do,tm,1e-6,30,0.5
  71. /VIEW, 1 ,1,1,1
  72. /ANG, 1
  73. /REP,FAST
  74. FLST,2,1,5,ORDE,1
  75. FITEM,2,2
  76. /GO
  77. !*
  78. TIME,tm
  79. AUTOTS,0
  80. DELTIM, , , ,1
  81. KBC,0
  82. !*
  83. TSRES,ERASE
  84. FLST,2,1,5,ORDE,1
  85. FITEM,2,2
  86. /GO
  87. !*
  88. !*
  89. SFA,P51X,1,HFLUX, %FLUX2%
  90. /STATUS,SOLU
  91. SOLVE
  92. OUTRES,ALL,ALL,
  93. /PSF,hflux,,2

  94. /replot

  95. *enddo
  96. OUTRES,ALL,ALL,

  97. FINISH
复制代码

回复
分享到:

使用道具 举报

 楼主| 发表于 2006-5-16 07:34 | 显示全部楼层
这个例子的看点:

1.建模.

2.死活单元.

3.相变.

4.局部坐标系.


  1. /PREP7
  2. !*********************
  3. ET,1,SOLID70 !thermal solid

  4. MP,KXX,1,.5e-3 !weld on right
  5. MP,C,1,.2
  6. MP,DENS,1,.2833
  7. MPTEMP,1,0,2643,2750,2875,3000 !enthalpy as function of time
  8. MPDATA,ENTH,1,1,0,128.1,163.8,174.2,184.6

  9. MP,KXX,2,.5e-3 !solid material
  10. MP,C,2,.2
  11. MP,DENS,2,.2833

  12. MP,KXX,3,0.5e-3 !weld on left
  13. MP,C,3,.2 !for t=[0,1000]: only right weld, left weld has no therm conduct
  14. MP,DENS,3,.2833 !for t>1000: left weld is activated

  15. W=1.20
  16. TL=.34
  17. TWELD=.2 ! weld thickness
  18. TPIVOT=TL ! thickness of support bar
  19. TPHALF=TPIVOT/2
  20. WIDTH=W ! width of support bar
  21. WHALF=WIDTH/2
  22. LCYL=2.5 ! length of cylinder
  23. LHALF=LCYL/2
  24. RID=.50 ! inside radius of cylinder
  25. ROD=.75 ! outside radius of cylinder
  26. *AFUN,DEG
  27. ANG1=50-ASIN(TPHALF/ROD)-2*ASIN(TWELD/(2*ROD))
  28. ANG2=50-ASIN(TPHALF/ROD)
  29. ANG3=50+ASIN(TPHALF/ROD)
  30. ANG4=50+ASIN(TPHALF/ROD)+2*ASIN(TWELD/(2*ROD))
  31. WPST,-1 ,1 ,-10 ,10 ,.003 ,3

  32. /PNUM,VOLU,1
  33. /VIEW,1,-.2,.2,1
  34. CYLIND,RID,ROD,-LHALF,-WHALF,-90,ANG1
  35. CYLIND,RID,ROD,-WHALF,+WHALF,-90,ANG1
  36. CYLIND,RID,ROD,+WHALF,+LHALF,-90,ANG1
  37. CYLIND,RID,ROD,-LHALF,-WHALF,ANG1,ANG2
  38. CYLIND,RID,ROD,-WHALF,+WHALF,ANG1,ANG2
  39. CYLIND,RID,ROD,+WHALF,+LHALF,ANG1,ANG2
  40. CYLIND,RID,ROD,-LHALF,-WHALF,ANG2,ANG3
  41. CYLIND,RID,ROD,-WHALF,+WHALF,ANG2,ANG3
  42. CYLIND,RID,ROD,+WHALF,+LHALF,ANG2,ANG3
  43. CYLIND,RID,ROD,-LHALF,-WHALF,ANG3,ANG4
  44. CYLIND,RID,ROD,-WHALF,+WHALF,ANG3,ANG4
  45. CYLIND,RID,ROD,+WHALF,+LHALF,ANG3,ANG4
  46. CYLIND,RID,ROD,-LHALF,-WHALF,ANG4,90
  47. CYLIND,RID,ROD,-WHALF,+WHALF,ANG4,90
  48. CYLIND,RID,ROD,+WHALF,+LHALF,ANG4,90

  49. /TYPE,1,4
  50. WPROT,50 ! vol 16 (used to trim welds)
  51. BLOCK,.6,rod*cos(asin(tphalf/rod))+tweld,-tphalf,tphalf,-whalf,whalf
  52. CSWPLA,11,0
  53. KSEL,S,LOC,X,.75*COS(ASIN(TPHALF/ROD))
  54. KSEL,R,LOC,Y,-TPHALF
  55. KSEL,R,LOC,Z,LHALF
  56. *GET,KNUM1,KP,,NUM,MAX
  57. KSEL,S,LOC,X,.75*COS(ASIN(TPHALF/ROD))
  58. KSEL,R,LOC,Y,TPHALF
  59. KSEL,R,LOC,Z,LHALF
  60. *GET,KNUM2,KP,,NUM,MAX
  61. KSEL,ALL
  62. WPRO,-50
  63. CSYS,0
  64. LOCAL,12,0,KX(KNUM1),KY(KNUM1)
  65. CSYS,0
  66. LOCAL,13,0,KX(KNUM2),KY(KNUM2)
  67. WPCSYS,-1,12
  68. VSEL,U,,,1,16
  69. CYLIND,,TWELD,-WHALF,WHALF,(ANG1+ANG2)/2-90,70
  70. /DIST,1,.6
  71. /FOCUS,1,.47,.59
  72. WPCSYS,-1,13
  73. CYLIND,,TWELD,-WHALF,WHALF,35,90+(ANG3+ANG4)/2
  74. VSEL,ALL
  75. BOPT,keep,yes,
  76. bopt,version,rv52
  77. VSEL,S,,,5,17,12
  78. VSBV,17,5
  79. VSEL,A,,,16,19,3
  80. VSBV,19,16
  81. VSEL,A,,,11,18,7
  82. VSBV,18,11
  83. VSEL,A,,,16,21,5
  84. VSBV,21,16
  85. VSEL,ALL
  86. WPSTYLE,default
  87. /FOCUS,,.5,.5
  88. /DIST,1,.6
  89. CYLIN,.6,SQRT((ROD+.01)**2+TPHALF**2),-2,+2,10,90
  90. BOPT,keep,no
  91. VSEL,S,,,20,22,2
  92. VSEL,A,,,23
  93. VSEL,ALL
  94. VOVLAP,20,22,23
  95. VDELE,16,21,1,1
  96. VDELE,28,,,1
  97. /TYPE,1,4

  98. CSYS,0
  99. WPCSYS,-1
  100. WPROT,50

  101. NUMSTR,VOLU,29
  102. block,ROD+.01,ROD*COS(ASIN(TPHALF/ROD))+TWELD,-TPHALF,TPHALF,-WHALF,WHALF
  103. NUMSTR,VOLU,30
  104. BLOCK,ROD*COS(ASIN(TPHALF/ROD))+TWELD,3,-TPHALF,TPHALF,-WHALF,WHALF
  105. NUMMRG,KP
  106. VSEL,S,,,24,26,2 ! right hand weld (make mat 1)
  107. ESIZE,.1
  108. VMESH,ALL
  109. MAT,3
  110. vsel,s,,,25,27,2 ! left hand weld (make mat 3 - dead)
  111. vmesh,all
  112. ALLSEL,ALL
  113. VSEL,S,,,24,27,1
  114. VSEL,A,,,30
  115. VSEL,INVE
  116. ESIZE,.1
  117. MAT,2
  118. VMESH,ALL
  119. ESIZE,.2
  120. LSEL,S,,,198,199
  121. LESIZE,ALL,,,8,5,1
  122. LSEL,S,,,196,201,5
  123. LESIZE,ALL,,,8,.2,1
  124. ALLSEL,ALL
  125. VMESH,30
  126. NUMCMP,all
  127. WPSTYLE,,,,,,,,0
  128. esel,s,mat,,3
  129. ekill,all
  130. allsel,all
  131. SAVE,mesh,DB
  132. FINI
  133. !
  134. !
  135. !*********************
  136. /SOLU
  137. !*********************
  138. ANTYPE,TRANS

  139. !Initialization of temperatures
  140. !----------------------------
  141. TIMINT,OFF
  142. ESEL,S,MAT,,1 !weld on right
  143. NSLE
  144. D,ALL,TEMP,3000 !To(weld)=3000
  145. NSEL,INVE
  146. D,ALL,TEMP,70 !To(steel)=70
  147. TIME,1
  148. KBC,0
  149. NSUBST,2,2,2
  150. OUTRES,BASIC,2
  151. ALLSEL,all
  152. SOLVE
  153. SAVE,therm,db

  154. !Phase change for weld on right (time varies from 1 to 100 and from 100 to 1000)
  155. !----------------------------------------------------------------------------------
  156. OUTRES,NSOL,1
  157. DDELE,ALL,TEMP
  158. TIMINT,ON
  159. TINTP,,,,1
  160. TIME,100 !phase change
  161. DELTIME,1,.5,10
  162. AUTOTS,ON
  163. ASEL,S,EXT
  164. ASEL,U,LOC,X,0
  165. SFA,ALL,,CONV,5E-5,70
  166. ALLSEL,ALL
  167. SOLVE

  168. TIME,1000 !solidification
  169. DELTIME,50,10,500
  170. AUTOTS,ON
  171. SOLVE
  172. FINI

  173. !Phase change for weld on right (time varies from 1e3 to 1100 and from 1100 to 2000)
  174. !---------------------------------------------------------------------------------------
  175. /PREP7
  176. EALIVE,ALL
  177. ALLSEL,all
  178. FINI

  179. /SOLU
  180. ANTYPE,TRANS,REST
  181. vsel,s,,,17
  182. vsel,a,,,19
  183. nslv,,1
  184. d,all,temp,3000
  185. time,1001
  186. nsubst,2,2,2
  187. allsel,all
  188. solve

  189. ANTYPE,TRANS,REST
  190. DDELE,ALL,TEMP
  191. TIME,1100
  192. DELTIME,1,.5,10
  193. SOLVE
  194. TIME,2000
  195. DELTIME,100,10,200
  196. SOLVE
  197. FINI
复制代码

评分

1

查看全部评分

发表于 2006-9-7 21:23 | 显示全部楼层
楼主的例子从何而来?望能提供更多的例子。
发表于 2006-9-26 10:12 | 显示全部楼层
例子不错,就是少了一点注释,跟编程一样,没有注释的代码别人总是很难看懂的。建议今后再上传类似例子时能有相关的注释。
发表于 2006-12-19 10:04 | 显示全部楼层
也是
我是新手
现在看命令流有点困难
建议
加上注释
毕竟还有广大的初级爱好者
谢谢
发表于 2008-4-25 17:15 | 显示全部楼层
感谢LZ !这个例子很好啊
发表于 2008-4-26 12:47 | 显示全部楼层
例子很好,这是两个例子吗?:@)
发表于 2008-5-9 14:17 | 显示全部楼层
zhi支持,就是看的不是很懂
发表于 2008-5-9 17:18 | 显示全部楼层
不久我也要做这方面的东西,感谢了先,以后还得多多请教
发表于 2009-12-9 15:46 | 显示全部楼层
非常感谢,好好看咯:@)
发表于 2009-12-18 16:23 | 显示全部楼层
谢谢啦。。。呵呵
发表于 2011-1-3 15:23 | 显示全部楼层
下来研究下,现在正在做这方面的工作,急需这样的例子。还有这样的例子吗?
发表于 2011-3-9 11:44 | 显示全部楼层
正需要这个,只是得一行一行看,有点麻烦啊
发表于 2011-3-9 11:50 | 显示全部楼层
回复 1 # AaronSpark 的帖子

问下楼主,第28行的7,和47行的15怎么确定的?
发表于 2011-3-30 13:10 | 显示全部楼层
能讲解一下否?
您需要登录后才可以回帖 登录 | 我要加入

本版积分规则

QQ|小黑屋|Archiver|手机版|联系我们|声振论坛

GMT+8, 2024-11-18 23:07 , Processed in 0.080648 second(s), 19 queries , Gzip On.

Powered by Discuz! X3.4

Copyright © 2001-2021, Tencent Cloud.

快速回复 返回顶部 返回列表