找回密码
 注册
Simdroid-非首页
查看: 99|回复: 1

帮助文件中橡胶垫例子中的疑惑 !

[复制链接]
发表于 2007-8-29 16:59:36 | 显示全部楼层 |阅读模式 来自 大连理工大学
在建好模型划分网格之后,创建流体物理环境时是否先要用asel命令选中流体区,然后设置流体边界条件?
流体固体的材料属性都是在创建物理环境时才设置吗?流体没有材料属性,难道不需要定义?
流体固体材料属性并没有定义也可以用aatt设置网格单元属性?
只要你知道任何一个问题的答案,请你告诉我,十分感谢!
/Batch,list
/prep7
/sho,gasket,grph
shpp,off
ET,1,141      ! Fluid - static mesh
ET,2,56,      ! Hyperelastic element

!!
yent = 0.0       ! Y coordinate of the entrance to the pipe
dyen = 1.0       !  Undeformed geometry flow entrance length
ysf1 = yent+dyen ! Y coordinate of entrance to the morphing fluid region
dsf1 = 0.5       !  Thickness of upstream
ygas = ysf1+dsf1 ! Y coordinate of the bottom of the gasket
dg = 0.02        !  Thickness of the gasket
dg2=dg/2.
ytg = ygas+dg    ! Y coordinate of the initial top of the gasket
dsf2 = 0.5       !  Thickness of downstream region
ysf2 = ytg + dsf2! Y of Top of the downstream morphing fluids region
dyex =  6.0      !  Exit fluid length
x = 0.           ! Location of the axisymmetric  Centerline
dgasr =.20       !  Initial span of gasket
piper = 0.3      ! Radius of the pipe
xrgap = piper-dgasr!! radius 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 region
rect,x,piper,yent,ysf1        ! A3: Fluid region with static mesh
rect,x,piper,ysf2,ysf2+dyex   ! A4: Fluid region with static mesh
aovlap,all
k,22,xrgap+dg2,ygas+dg2
rarc = dg2*1.1
larc,1,4,22,rarc
al,6,4
adelete,7
al,6,3,22,7,8,5,21,1

!!Mesh Division information
ngap = 10         ! Number elements across the gap
ngas = 10         ! Number of elements along the gasket
rgas = -2         ! Spacing ratio along gasket
nflu = ngap+ngas  ! Number of elements across the fluid region
raflu = -3        ! Space fluid elements near the walls and center
nenty =8          ! Elements along flow - entrance
raent =5          ! Size ratio in the inlet region
nfl1 = 20         ! Elements along flow - first morph.fluid.
nthgas = 4        ! Elements in the gasket
nfl2 = 3                ! Elements along flow - second morph.fluid.
next = 30       ! Elements along flow - exit region
rext = 6        ! Size ratio in flow direction of outlet
rafls = 12      ! Initial element spacing ratio - morph.fluid
lesize,1,,,ngas,rgas
lesize,3,,,ngas,rgas
nfl11= nfl1*2+9
lsel,s,,,2,4,2  ! (Modify lesize of line 8 if changing gasket mesh)
lesize,all,,,nthgas
alls
lesize,5,,,nflu,raflu
lesize,7,,,nflu,raflu
lesize,9,,,nflu,raflu
lesize,15,,,nflu,raflu
lesize,18,,,nenty,1./raent
lesize,17,,,nenty,1./raent
lesize,21,,,nfl1,rafls
lesize,8,,,nfl11,-1./(rafls+3)
lesize,22,,,nfl1,rafls
lesize,19,,,next,rext
lesize,20,,,next,rext      

!!! AATT,MAT,REAL,TYPE     - Set the attributes for the areas
asel,s,,,1,2
aatt,2,2,2    ! Gasket   (material 2) 材料并没有定义也可以用aatt设置网格单元属性?
asel,s,,,3
cm,area2,area
alist    ! List area selected for further morphing

asel,a,,,5,6
aatt,1,1,1    ! Fluid area (material 1)
alls

eshape,2
asel,u,,,2,3
amesh,all
eshape,0
asel,s,,,2,3
amesh,all
!-----------------在这之前都是在创建模型和划分网格吗?
!!!!!  Create element plot and write to the file gasket.grph
asel,s,,,1,3
esla,s
/Title, Initial mesh for gasket and neighborhood  此处定义分析标题干什么
eplot
/ZOOM,1,RECT,0.3,-0.6,0.4,-0.5  
alls
!-----------------
!!
!!!!!  2. Create Physics Environment for the Fluid 创建流体物理环境前不需要先选择流体区域吗?
et,1,141            
et,2,0        ! Gasket becomes the Null Element
vin=3.5e-1    ! Inlet water velocity (meters/second)
!!           CFD Solution Control
flda,solu,flow,1
flda,solu,turb,1
flda,iter,exec,400
flda,outp,sumf,10
!!           CFD Property Information
flda,prot,dens,constant
flda,prot,visc,constant
flda,nomi,dens,1000.   ! 1000 kg/m3 for density - water
flda,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,9
lsel,a,,,20
dl,all,,vx,0.,1      ! Centerline symmetry
lsel,s,,,9
dl,all,,vx,0.,1
dl,all,,vy,vin,1     ! Inlet Condition
lsel,s,,,2
lsel,a,,,18,19
lsel,a,,,21,22
dl,all,,vx,0.,1      ! Outer Wall
dl,all,,vy,0.,1
lsel,s,,,1,3,2
lsel,a,,,6
dl,all,,vx,0.,1      ! Gasket
dl,all,,vy,0.,1
lsel,s,,,15
dl,15,,pres,0.,1     ! Outlet pressure condition
!!! create named component of nodes at the bottom of gasket
lsel,s,,,1
nsll,,1
cm,gasket,node
nlist ! List initial nodal positions of the bottom of the gasket
/com, +++++++++ STARTING gasket coordinates --------

alls
/title,Fluid Analysis 此处又定义分析标题干什么
physics,write,fluid,fluid
!!
!!!!!  3.  Create Physics Environment for the Structure
!!
physics,clear
et,1,0      ! The Null element for the fluid region
et,2,56     ! Gasket element - material 2
mp,ex,2,2.82E+6    ! Young's modulus for rubber  在此处定义材料属性?
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  !    "     "        "

lsel,s,,,2
nsll,,1
d,all,ux,0.
d,all,uy,0.    ! Fix the end of the gasket
alls

/title,structural analysis
finish
/solu
antype,static
nlgeom,on
cnvtol,f,,,,-1
physics,write,struc,struc
physics,clear
save
!!
!!!!!  4.  Fluid-Structure Interaction Loop
!!
loop=25               ! Maximum allowed number of loops
toler=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
/solu
physics,read,fluid       ! Read in fluid environment
*if,i,ne,1,then      
flda,iter,exec,100       ! Execute 100 global iterations for
*endif                   !    each new geometry
solve                    ! FLOTRAN solution
fini
! end of fluid portion
physics,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 loop
parsave,all            ! Save parameters for convergence check
resume                 ! Resume DB - to return original node positions
parresume              ! Resume parameters needed for convergence check
/prep7
antype,stat,rest     
fini
*endif

/solu
solc,off
lsel,s,,,1,3,2        ! Select proper lines to apply fluid pressures
lsel,a,,,6            ! to the entire gasket surface
nsll,,1
esel,s,type,,2
ldread,pres,last,,,,,rfl ! Apply pressure surface load from Flotran
alls
rescontrol,,none      ! Do not use multiframe restart for nonlinear
solve
*if,i,eq,1,then
save                  ! save original node locations at the first run
*endif
fini

/post1
cmsel,s,gasket     
nsort,u,sum,1,1
*get,dismax(i),sort,0,max  ! Get the maximum displacement value
strcri(i)=toler*dismax(i)
alls
fini

/prep7
mkey=2                    ! Select level of mesh morphing for fluid
damorph,area2, ,mkey      ! Perform morphing of "morphing fluid"
!----------------
!!!!!  Create element plot and write it in file gasket.grph
fini
/prep7
et,1,42
asel,s,,,1,3
esla,s
/Title, EPLOT after DAMORPH,area2, ,%mkey% step number %i%
eplot
alls
!-----------------
cmsel,s,gasket
nlist  ! List updated coordinates of bottom of gasket for comparison
/com, +++++++++ UPDATED gasket coordinates --------
alls
fini
/assign,esav
/assign,emat

!!!!  Checking convergence criteria
imax= i
index(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 loop
save            ! 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
/post1
set,last
/Title, Flotran: Streamlines Near Gasket
plnsol,strm
/Title, Flotran: Pressure Contours
plnsol,pres
fini
!!!   2. Structural results.
physics,read,struc
/post1
set,last
upcoord,-1    ! Return original node positions changed by morphing
/Title, Structural results: von Mises Stress
plnsol,s,eqv,1,1
fini
!/exit,nosave
 楼主| 发表于 2007-8-30 11:47:06 | 显示全部楼层 来自 大连理工大学
Simdroid开发平台
:'(
回复 不支持

使用道具 举报

您需要登录后才可以回帖 登录 | 注册

本版积分规则

Simapps系列直播

Archiver|小黑屋|联系我们|仿真互动网 ( 京ICP备15048925号-7 )

GMT+8, 2024-9-21 12:42 , Processed in 0.040765 second(s), 13 queries , Gzip On, MemCache On.

Powered by Discuz! X3.5 Licensed

© 2001-2024 Discuz! Team.

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