声振论坛

 找回密码
 我要加入

QQ登录

只需一步,快速开始

查看: 2655|回复: 0

[综合讨论] 关于流固耦合在ANSYS建模中的实现

[复制链接]
发表于 2013-8-8 18:39 | 显示全部楼层 |阅读模式

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

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

x
              有谁能把这个命令流翻译成GUI(信息来自ansys13help里的5.7.           Example Fluid-Structural Analysis Using Physics Environments   可以在搜索栏里输入    Fluid-Structural   查到    )谢谢指教!/Batch,list/prep7/sho,gasket,grphshpp,offET,1,141      ! Fluid - static meshET,2,182,     ! Hyperelastic element!!!!!!!       Fluid Structure Interaction - Multiphysics!!!!!!!       Deformation of a gasket in a flow field.!!!!!!!!  Element plots are written to the file gasket.grph.!!   - Water flows in a vertical channel through a constriction!     formed by a rubber gasket.!   - Determine the equilibrium position of the gasket and!     the resulting flow field!!          |          |!          |          |!          |----------| Boundary of "morphing fluid"!          |    ______|!          |   |______  gasket!          |          |!          |----------| Boundary of "morphing fluid" (sf)!          |          |!!!  1. Build the model of the entire domain:!!        Fluid region - static mesh!!        !!     Gasket leaves a hole in the center of the channel!!     Morphing Fluid region is a user defined region around !!        the gasket.  The fluid mesh here will deform and be !!        updated as the gasket deforms.!!!!   Parameterize Dimensions in the flow direction!!yent = 0.0       ! Y coordinate of the entrance to the channeldyen = 1.0       !  Undeformed geometry flow entrance lengthysf1 = yent+dyen ! Y coordinate of entrance to the morphing fluid regiondsf1 = 0.5       !  Thickness of upstream ygas = ysf1+dsf1 ! Y coordinate of the bottom of the gasketdg = 0.02        !  Thickness of the gasketdg2=dg/2.ytg = ygas+dg    ! Y coordinate of the initial top of the gasketdsf2 = 0.5       !  Thickness of downstream regionysf2 = ytg + dsf2! Y of Top of the downstream morphing fluids regiondyex =  6.0      !  Exit fluid lengthx = 0.           ! Location of the centerlinedgasr =.20       !  Initial span of gasketpiper = 0.3      ! Width of the analysis domainxrgap = piper-dgasr!! Width of completely unobtructed flow passage!!!!!  Create geometry!!rect,xrgap,piper,ygas,ytg     ! A1:Gasket  (keypoints 1-4)rect,x,piper,ysf1,ysf2        ! A2: Morphing fluid regionrect,x,piper,yent,ysf1        ! A3: Fluid region with static meshrect,x,piper,ysf2,ysf2+dyex   ! A4: Fluid region with static meshaovlap,allk,22,xrgap+dg2,ygas+dg2rarc = dg2*1.1larc,1,4,22,rarcal,6,4adelete,7al,6,3,22,7,8,5,21,1!!Mesh Division informationngap = 10         ! Number elements across the gapngas = 10         ! Number of elements along the gasketrgas = -2         ! Spacing ratio along gasketnflu = ngap+ngas  ! Number of elements across the fluid regionraflu = -3        ! Space fluid elements near the walls and centernenty =8          ! Elements along flow - entranceraent =5          ! Size ratio in the inlet regionnfl1 = 20         ! Elements along flow - first morph.fluid.nthgas = 4        ! Elements in the gasketnfl2 = 3                ! Elements along flow - second morph.fluid.next = 30       ! Elements along flow - exit regionrext = 6        ! Size ratio in flow direction of outletrafls = 12      ! Initial element spacing ratio - morph.fluidlesize,1,,,ngas,rgaslesize,3,,,ngas,rgasnfl11= nfl1*2+9lsel,s,,,2,4,2  ! (Modify lesize of line 8 if changing gasket mesh)lesize,all,,,nthgasallslesize,5,,,nflu,raflulesize,7,,,nflu,raflulesize,9,,,nflu,raflulesize,15,,,nflu,raflulesize,18,,,nenty,1./raentlesize,17,,,nenty,1./raentlesize,21,,,nfl1,raflslesize,8,,,nfl11,-1./(rafls+3)lesize,22,,,nfl1,raflslesize,19,,,next,rextlesize,20,,,next,rext!!! AATT,MAT,REAL,TYPE     - Set the attributes for the areasasel,s,,,1,2aatt,2,2,2    ! Gasket   (material 2)asel,s,,,3cm,area2,areaalist    ! List area selected for further morphingasel,a,,,5,6aatt,1,1,1    ! Fluid area (material 1)allseshape,2asel,u,,,2,3amesh,alleshape,0asel,s,,,2,3amesh,all!-----------------!!!!!  Create element plot and write to the file gasket.grphasel,s,,,1,3esla,s/Title, Initial mesh for gasket and neighborhoodeplot/ZOOM,1,RECT,0.3,-0.6,0.4,-0.5  alls!-----------------!!!!!!!  2. Create Physics Environment for the Fluidet,1,141             et,2,0        ! Gasket becomes the Null Elementvin=3.5e-1    ! Inlet water velocity (meters/second)!!           CFD Solution Controlflda,solu,flow,1flda,solu,turb,1flda,iter,exec,400flda,outp,sumf,10!!           CFD Property Informationflda,prot,dens,constantflda,prot,visc,constantflda,nomi,dens,1000.   ! 1000 kg/m3 for density - waterflda,nomi,visc,4.6E-4  ! 4.6E-4 kg-s/m (viscosity of water)flda,conv,pres,1.E-8   ! Tighten pressure equation convergence!!    CFD Boundary Conditions (Applied to Solid Model)lsel,s,,,8,17,9lsel,a,,,20dl,all,,vx,0.,1      ! Centerline symmetrylsel,s,,,9dl,all,,vx,0.,1dl,all,,vy,vin,1     ! Inlet Conditionlsel,s,,,2lsel,a,,,18,19lsel,a,,,21,22dl,all,,vx,0.,1      ! Outer Walldl,all,,vy,0.,1lsel,s,,,1,3,2lsel,a,,,6dl,all,,vx,0.,1      ! Gasketdl,all,,vy,0.,1lsel,s,,,15dl,15,,pres,0.,1     ! Outlet pressure condition!!! create named component of nodes at the bottom of gasketlsel,s,,,1nsll,,1cm,gasket,nodenlist ! List initial nodal positions of the bottom of the gasket/com, +++++++++ STARTING gasket coordinates --------alls/title,Fluid Analysisphysics,write,fluid,fluid!!!!!!!  3.  Create Physics Environment for the Structure !!physics,clear!SOLCONTROL, , , NOPL, et,1,0        ! The Null element for the fluid regionet,2,182      ! Gasket element - material 2keyopt,2,3,2  ! Plane stresskeyopt,2,6,1  ! mixed u-Pkeyopt,2,1,2  ! Enhanced strain!mp,nuxy,2,0.49967  ! Poisson's ratio for the rubber!tb,mooney,2!tbdata,1,0.293E+6  !  Mooney-Rivlin Constants!tbdata,2,0.177E+6  !    "     "        "tb,hyper,2,,2,mooneytbdata,1,0.293E+6,0.177E+6, (1.0-2.0*0.49967)/(0.293E+6+0.177E+6)lsel,s,,,2nsll,,1d,all,ux,0.d,all,uy,0.    ! Fix the end of the gasketalls/title,structural analysisfinish/soluantype,staticnlgeom,oncnvtol,f,,,,-1physics,write,struc,strucphysics,clearsave!!!!!!!  4.  Fluid-Structure Interaction Loop!!loop=25               ! Maximum allowed number of loopstoler=0.005           ! Convergence tolerance for maximum displacement*dim,dismax,array,loop   ! Define array of maximum displacement values*dim,strcri,array,loop   ! Define array of convergence values*dim,index,array,loop*do,i,1,loop             !  Execute fluid -> structure solutions/soluphysics,read,fluid       ! Read in fluid environment*if,i,ne,1,then      flda,iter,exec,100       ! Execute 100 global iterations for*endif                   !    each new geometrysolve                    ! FLOTRAN solutionfini! end of fluid portionphysics,read,struc       ! Read in structures environment/assign,esave,struc,esav ! Files for restarting nonlinear structure/assign,emat,struc,emat*if,i,gt,1,then        ! Structural restart loopparsave,all            ! Save parameters for convergence checkresume                 ! Resume DB - to return original node positionsparresume              ! Resume parameters needed for convergence check/prep7antype,stat,rest     fini*endif/solusolc,offlsel,s,,,1,3,2        ! Select proper lines to apply fluid pressureslsel,a,,,6            ! to the entire gasket surfacensll,,1esel,s,type,,2ldread,pres,last,,,,,rfl ! Apply pressure surface load from Flotransfelistallsrescontrol,,none      ! Do not use multiframe restart for nonlinear!nsub,4,10,1solve*if,i,eq,1,thensave                  ! save original node locations at the first run*endiffini/post1cmsel,s,gasket     nsort,u,sum,1,1*get,dismax(i),sort,0,max  ! Get the maximum displacement valuestrcri(i)=toler*dismax(i)allsfini/prep7mkey=2                    ! Select level of mesh morphing for fluiddamorph,area2, ,mkey      ! Perform morphing of "morphing fluid"!----------------!!!!!  Create element plot and write it in file gasket.grphfini/prep7et,1,42asel,s,,,1,3esla,s/Title, EPLOT after DAMORPH,area2, ,%mkey% step number %i%eplotalls!-----------------cmsel,s,gasketnlist  ! List updated coordinates of bottom of gasket for comparison/com, +++++++++ UPDATED gasket coordinates --------allsfini/assign,esav/assign,emat!!!!  Checking convergence criteriaimax= iindex(i)=i*if,i,gt,1,then strcri(i)=abs(dismax(i)-dismax(i-1))-toler*dismax(i-1) *if,strcri(i),le,0,then     strcri(i)=0   *exit               ! Stop looping if convergence is reached *endif*endif*enddo!!!!! End of the Computational loopsave            ! Nodal coordinates of deformed geometry are saved!!!!! Convergence printout  *vwrite  (/'Loop No.  Max.Displacement  Struct.Convergence') /nopr  *vlen,imax  *vwrite,index(1),dismax(1),strcri(1)  (f7.0,2e17.4)finish!!!!! Postprocessing of the results!!!   1. Flotran results.physics,read,fluid/post1set,last/Title, Flotran: Streamlines Near Gasketplnsol,strm/Title, Flotran: Pressure Contoursplnsol,presfini!!!   2. Structural results.physics,read,struc/post1set,lastupcoord,-1    ! Return original node positions changed by morphing/Title, Structural results: von Mises Stressplnsol,s,eqv,1,1fini!/exit,nosave      
   

本帖被以下淘专辑推荐:

回复
分享到:

使用道具 举报

您需要登录后才可以回帖 登录 | 我要加入

本版积分规则

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

GMT+8, 2024-11-25 13:46 , Processed in 0.065682 second(s), 20 queries , Gzip On.

Powered by Discuz! X3.4

Copyright © 2001-2021, Tencent Cloud.

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