声振论坛

 找回密码
 我要加入

QQ登录

只需一步,快速开始

查看: 2216|回复: 6

[求助]声学分析例子

[复制链接]
发表于 2006-3-28 22:01 | 显示全部楼层 |阅读模式

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

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

x
[求助]声学分析例子
回复
分享到:

使用道具 举报

发表于 2006-3-28 22:30 | 显示全部楼层

回复:(wanxiao)[求助]声学分析例子

  1. (Example of acoustic radiating sphere. Comparison w/ hand calculations. )

  2. /com, Sample input file for acoustics
  3. /com, Radiating sphere problem (simple case), compare w/ theory
  4. /com,

  5. !------------------------------------------------------------
  6. ! Check if running file in batch or interactive mode
  7. ! If batch mode, redirect plots to GRPH file
  8. !------------------------------------------------------------
  9. *get,STATGUI,active,,int
  10. *if,STATGUI,eq,0,then
  11. /show,file
  12. *endif
  13. !------------------------------------------------------------
  14. ! Define variables for problem:
  15. ! Radiating Sphere of Radius SPHRRADS with uniform surface
  16. ! velocity of VELOCITY oscillating at FREQUENC
  17. !------------------------------------------------------------
  18. *set,FREQUENC,3000
  19. *set,VELOCITY,0.005
  20. *set,PI ,acos(-1)
  21. *set,SPHRRADS,0.1
  22. !------------------------------------------------------------
  23. ! Fluid properties:
  24. ! Density, Speed of sound in water, Reference pressure
  25. !------------------------------------------------------------
  26. *set,WATRDENS,1000
  27. *set,WATRSONC,1500
  28. *set,REFEPRES,1e-6
  29. !------------------------------------------------------------
  30. ! Geometry info
  31. ! Infinite radius at INFIRADS meters
  32. ! INFIXOFF, INFIYOFF not used right now...
  33. !------------------------------------------------------------
  34. *set,INFIRADS,5
  35. *set,INFIXOFF,0.0
  36. *set,INFIYOFF,0.0
  37. !------------------------------------------------------------
  38. ! Mesh info
  39. ! Use mapped mesh? YES=1 NO=0 (use NO for now)
  40. ! Elements per wavelength (EPW)
  41. !------------------------------------------------------------
  42. *set,MAPDMESH,0
  43. *set,TRIMESH ,1
  44. *set,EPW ,15
  45. !------------------------------------------------------------
  46. ! Graphics settings
  47. ! Set title and subtitles
  48. ! Make sure the legend is always on (/plopt,info,on)
  49. ! Put global triad at right top corner (/triad,rtop)
  50. ! Turn on Full Graphics because of DDTSREP#16215
  51. !------------------------------------------------------------
  52. /title,Uniformly Radiating Sphere, EPW=%EPW%
  53. /stitle,1,Sphere radius of %SPHRRADS%m
  54. /stitle,2,Frequency at %FREQUENC%Hz
  55. /stitle,3,Uniform velocity of %VELOCITY%m/s
  56. /stitle,4,Infinite Boundary of %INFIRADS%m at (%INFIXOFF%,%INFIYOFF%)
  57. /plopt,info,on
  58. /triad,rtop
  59. /graphics,full
  60. !------------------------------------------------------------
  61. ! Enter Preprocessor
  62. !------------------------------------------------------------
  63. /prep7
  64. !------------------------------------------------------------
  65. ! Define elements
  66. ! 1 = fluid w/ structure
  67. ! 2 = fluid no structure
  68. ! 3 = infinite fluid
  69. ! Define elements and keyopts (et) (keyopt)
  70. ! Define real constants (r)
  71. ! Define material properties (mp)
  72. !------------------------------------------------------------
  73. et,1,fluid29
  74. keyopt,1,2,0
  75. keyopt,1,3,1
  76. et,2,fluid29
  77. keyopt,2,2,1
  78. keyopt,2,3,1
  79. et,3,fluid129
  80. keyopt,3,3,1
  81. r,1,REFEPRES
  82. r,2,REFEPRES
  83. r,3,INFIRADS,0,0,
  84. mp,dens,1,WATRDENS
  85. mp,sonc,1,WATRSONC
  86. mp,dens,2,WATRDENS
  87. mp,sonc,2,WATRSONC
  88. mp,sonc,3,WATRSONC
  89. !------------------------------------------------------------
  90. ! Create geometry
  91. ! Create five 90 degree quarter circles (pcirc)
  92. ! Merge keypoints (nummrg,kp)
  93. !------------------------------------------------------------
  94. pcirc,1,SPHRRADS,0,90,
  95. pcirc,2,1,0,90,
  96. pcirc,3,2,0,90,
  97. pcirc,4,3,0,90,
  98. pcirc,5,4,0,90,
  99. nummrg,kp
  100. !------------------------------------------------------------
  101. ! Mesh
  102. ! Set global element size based on EPW above
  103. ! Map with quads, quad-dominant for free mesh (mshape,0)
  104. ! Mesh mapped or free (mshkey)
  105. ! Set area attributes (aatt)
  106. ! Mesh all areas (amesh)
  107. ! Set plot controls based on element type number
  108. !------------------------------------------------------------
  109. esize,(WATRSONC/FREQUENC)/EPW
  110. mshape,TRIMESH
  111. mshkey,MAPDMESH
  112. aatt,2,2,2
  113. amesh,all
  114. /pnum,type,1
  115. /num,1
  116. /auto
  117. eplot
  118. !------------------------------------------------------------
  119. ! Rotate all nodes in cylindrical CS
  120. !------------------------------------------------------------
  121. csys,1
  122. nrotate,all
  123. !------------------------------------------------------------
  124. ! Change elements near center to fluid with struct present
  125. !------------------------------------------------------------
  126. type,1
  127. real,1
  128. mat,1
  129. nsel,s,loc,x,SPHRRADS
  130. esln
  131. nsle
  132. emodif,all
  133. !------------------------------------------------------------
  134. ! Apply struct boundary conditions on element type 1
  135. ! Constrain all translation DOF (the "free" DOF)
  136. ! Reapply velocity as displacement on inner nodes in radial dir. (ux)
  137. ! Apply FSI (fluid-struct interface) flag to active
  138. !------------------------------------------------------------
  139. d,all,uy
  140. d,all,ux
  141. nsel,s,loc,x,SPHRRADS
  142. d,all,ux,0,-VELOCITY/(2*PI*FREQUENC)
  143. sf,all,fsi
  144. !------------------------------------------------------------
  145. ! Mesh Infinite fluid domain
  146. ! Instead of meshing, use ESURF to generate elements on existing mesh
  147. !------------------------------------------------------------
  148. type,3
  149. real,3
  150. mat,3
  151. esel,all
  152. nsel,s,loc,x,INFIRADS,INFIRADS+0.0001
  153. esurf,all
  154. allsel,all
  155. finish
  156. !------------------------------------------------------------
  157. ! solution options
  158. ! Full harmonic analysis
  159. ! frequency at FREQUENC
  160. ! select everything & solve
  161. !------------------------------------------------------------
  162. /solu
  163. antype,harm
  164. hropt,full
  165. hrout,on
  166. lumpm,0
  167. !eqslv,front
  168. eqslv,sparse
  169. harfrq,FREQUENC
  170. nsubst,
  171. kbc,0
  172. allsel,all
  173. solve
  174. finish
  175. !------------------------------------------------------------
  176. ! postprocessing w/ annotations
  177. ! Load real (set,1,1,1,0) and plot pressure
  178. ! Load imag (set,1,1,1,1) and plot pressure
  179. ! do a load case comb. to SRSS for pressure magnitude
  180. !------------------------------------------------------------
  181. /post1
  182. /tsp,,0.75
  183. /ann,dele
  184. /tla,-.90,.90,Plot of real part of pressure
  185. /dscale,1,off
  186. set,1,1,1,0
  187. plnsol,pres
  188. *if,STATGUI,eq,2,then
  189. *ask,Paused,Press Enter to Continue,'pause'
  190. *endif

  191. /tsp,,0.75
  192. /ann,dele
  193. /tla,-.90,.90,Plot of imag part of pressure
  194. set,1,1,1,1
  195. /replot
  196. *if,STATGUI,eq,2,then
  197. *ask,Paused,Press Enter to Continue,'pause'
  198. *endif

  199. /tsp,,0.75
  200. /ann,dele
  201. /tla,-.90,.90,Plot of magnitude of pressure
  202. lcdef,1,1,1,0
  203. lcoper,srss,1
  204. /replot
  205. *if,STATGUI,eq,2,then
  206. *ask,Paused,Press Enter to Continue,'pause'
  207. *endif
  208. /ann,dele
  209. !------------------------------------------------------------
  210. ! path operations
  211. ! this part gets ugly...
  212. !------------------------------------------------------------
  213. csys,0
  214. lsel,s,loc,x,0
  215. nsll,s,1
  216. *get,NCOUNT,node,,count
  217. csys,1
  218. nsel,s,loc,x,SPHRRADS
  219. nsel,r,loc,y,90,90.0001
  220. STRTNODE=ndnext(0)
  221. nsel,s,loc,x,INFIRADS,INFIRADS+0.0001
  222. nsel,r,loc,y,90,90.0001
  223. FININODE=ndnext(0)
  224. allsel,all
  225. path,RADIAL,2,30,(NCOUNT-1)
  226. ppath,1,STRTNODE
  227. ppath,2,FININODE
  228. avprin,0,0,
  229. set,1,1,1,0
  230. pdef,REALPRES,pres,,noavg
  231. set,1,1,1,1
  232. pdef,IMAGPRES,pres,,noavg
  233. !plpath,REALPRES,IMAGPRES
  234. paget,tracpoin,poin
  235. paget,tracdata,tabl
  236. paget,traclabl,labe
  237. *dim,RADSPATH,table,NCOUNT,7
  238. *do,ICOUNT,1,NCOUNT
  239. WAVENUMB=2*PI*FREQUENC/WATRSONC
  240. CURRRADS=TRACDATA(ICOUNT,2,1)
  241. TEMPAMPL=WATRDENS*WATRSONC*VELOCITY*WAVENUMB*(SPHRRADS**2)/CURRRADS
  242. TEMPAMPL=TEMPAMPL/(1+(WAVENUMB*SPHRRADS)**2)
  243. TEMPAMRC=WAVENUMB*SPHRRADS*cos(WAVENUMB*(CURRRADS-SPHRRADS))
  244. TEMPAMRS=sin(WAVENUMB*(CURRRADS-SPHRRADS))
  245. TEMPAMIC=cos(WAVENUMB*(CURRRADS-SPHRRADS))
  246. TEMPAMIS=-WAVENUMB*SPHRRADS*sin(WAVENUMB*(CURRRADS-SPHRRADS))
  247. RADSPATH(ICOUNT,1)=TRACDATA(ICOUNT,2,1)
  248. RADSPATH(ICOUNT,2)=TRACDATA(ICOUNT,5,1)
  249. RADSPATH(ICOUNT,3)=TEMPAMPL*(TEMPAMRC+TEMPAMRS)
  250. RADSPATH(ICOUNT,4)=TRACDATA(ICOUNT,6,1)
  251. RADSPATH(ICOUNT,5)=TEMPAMPL*(TEMPAMIC+TEMPAMIS)
  252. RADSPATH(ICOUNT,6)=sqrt(TRACDATA(ICOUNT,5,1)**2+TRACDATA(ICOUNT,6,1)**2)
  253. TEMP1 =TEMPAMPL*(TEMPAMRC+TEMPAMRS)
  254. TEMP2 =TEMPAMPL*(TEMPAMIC+TEMPAMIS)
  255. RADSPATH(ICOUNT,7)=sqrt(TEMP1**2+TEMP2**2)
  256. *enddo

  257. /gcolumn,1,ANSYS
  258. /gcolumn,2,Theory
  259. /axlab,x,Radial Distance
  260. /axlab,y,Real Pressure (Pa)
  261. *vplot,RADSPATH(1,1),RADSPATH(1,2),3
  262. *if,STATGUI,eq,2,then
  263. *ask,Paused,Press Enter to Continue,'pause'
  264. *endif

  265. /axlab,y,Imaginary Pressure (Pa)
  266. *vplot,RADSPATH(1,1),RADSPATH(1,4),5
  267. *if,STATGUI,eq,2,then
  268. *ask,Paused,Press Enter to Continue,'pause'
  269. *endif

  270. /axlab,y,Magnitude of Pressure (Pa)
  271. *vplot,RADSPATH(1,1),RADSPATH(1,6),7
  272. *if,STATGUI,eq,2,then
  273. *ask,Paused,Press Enter to Continue,'pause'
  274. *endif

  275. !parsav,all
  276. finish
  277. *del,TEMPAMPL
  278. *del,TEMPAMRC
  279. *del,TEMPAMRS
  280. *del,TEMPAMIC
  281. *del,TEMPAMIS
  282. *del,TEMP1
  283. *del,TEMP2
  284. *del,CURRRADS
  285. *del,WAVENUMB

  286. !=(DENSITY*SPEED_OF_SOUND*VELOCITY*WAVE_NUMBER*RADIUS*(RADIUS/C2)/(1+(WAVE_NUMBER*RADIUS)^2))*(WAVE_NUMBER*RADIUS*COS(WAVE_NUMBER*(C2-RADIUS))+SIN(WAVE_NUMBER*(C2-RADIUS)))
  287. !=(DENSITY*SPEED_OF_SOUND*VELOCITY*WAVE_NUMBER*RADIUS*(RADIUS/C2)/(1+(WAVE_NUMBER*RADIUS)^2))*(COS(WAVE_NUMBER*(C2-RADIUS))-WAVE_NUMBER*RADIUS*SIN(WAVE_NUMBER*(C2-RADIUS)))
  288. *if,STATGUI,eq,0,then
  289. /exit
  290. *endif
复制代码


Acoustic Superelements
Q: Has anybody got superelements to work with fluid 29/30 (acoustic, pressure DOF) elements?

A: Yes, superelements work fine w/ acoustic elements, too. Useful for those nasty 3D models -- even w/ 2D radiation problems, it works fine and is helpful.

There are many "gotchas" when doing this, so be careful and start off with a simple model. For example, in the GEN pass, you shouldn't define any fluid29 w/ structure present (i.e., if you use top-down substructuring, null FLUID29 w/ structure present). Any model in the GEN pass containing unsymm elements uses that for the SE which means that only stiffness is stored, not mass. In other words:

You can have mass & stiffness (& damping) for symm matrices for SE or
You can have stiffness only for unsym matrices for SE part -- basically, trying to substructure FSI part is unusable for modal or harmonic.
However, in the USE pass, you can use unsymm matrices for non-SE portions (i.e., in the USE pass, define your FLUID29 with FSI). A simple modal analysis input file (acoustic_se.inp) is attached. I didn't spend much time on it, so it's not fancy, but I hope you get the idea.

Another one for those doing piezo is that VOLT and UX/UY/UZ can't be MDOF together, mainly because VOLT has no mass or damping equivalent. Instead of applying voltage as a load vector after the GEN pass, I usually do this as a non-SE element in the USE pass.

I've use a combination of superelements and non-superelements with pretty good success in modal and harmonic acoustic analyses. Like I mentioned above, there are some things which may not be intuitive, so try simple models first. Chop up your fluid domain into repeatable sections except for infinite boundary or FSI areas. Then, you can use SE in those areas (SETRAN, etc.). Make sure you have M not only at boundaries of SE but inside, too, since you need proper mass characterization (mass and damping are reduced via Guyan reduction which is approximate, instead of being exact like the stiffness matrix because stiffness can be directly condensed to a reduced matrix w/o problems -- damping and mass have time derivatives of DOF which make this very ugly, hence Guyan reduction is used instead for those terms).

Anyways, that's my two cents on the above. Like I mentioned above, it can be done, but be careful of the procedure and selecting MDOF.
发表于 2006-3-28 22:51 | 显示全部楼层
发表于 2006-3-28 23:02 | 显示全部楼层
发表于 2006-5-24 22:49 | 显示全部楼层

新手!!也做声学-结构设计灵敏度分析的!

太谢谢了!我做汽车内腔声学结构灵敏度分析!求相关资料或者高手指点!!
联系方式: QQ:214969264
邮箱:guhongyang1983@163.com
发表于 2013-7-1 16:37 | 显示全部楼层
     现传上《ANSYS Workbench基础教程与实例详解(第二版)》中的一个实例,
     详细操作过程如下面的图片所示,希望对大家在WB中进行声学分析分析有所帮助。
11.jpg
1.jpg
2.jpg
3.jpg
4.jpg
5.jpg
6.jpg
7.jpg
8.jpg
发表于 2013-7-3 19:06 | 显示全部楼层
又来了,不过挺好的。
您需要登录后才可以回帖 登录 | 我要加入

本版积分规则

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

GMT+8, 2024-11-11 04:15 , Processed in 0.071962 second(s), 22 queries , Gzip On.

Powered by Discuz! X3.4

Copyright © 2001-2021, Tencent Cloud.

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