單面接觸用於當一個物體的外表面與自身接觸或和另一個物體的外表面接觸時使用。單面接觸是 ANSYS/LS-DYNA 中最通用的接觸類型,因爲程序將搜索模型中的所有外表面,檢查其間是否相互發生穿透。由於所有的外表面都在搜索範圍內, 不需要定義接觸面與目標面。
在預先不知接觸情況時,單面接觸非常有用。相對於 ANSYS 隱式分析, ANSYS/LS-DYNA 的單面接觸不會非常耗時。 大多數衝擊與碰撞問題需要定義單面接觸當接觸面之間的穿透超過接觸單元厚度的 40%時,單面接觸自動釋放接觸,從而對下列問題造成潛在的問題:
1. 超薄部分
2. 具有低剛度的軟體
3. 高速運動物體之間的接觸
單面接觸在 ASCII rcforc文件中不記錄所有的接觸反作用力。 如果需要接觸反力,可以使用點到面或面到面接觸。有效的接觸類型有 Single Surface,Automatic Single Surface,Automatic General,Eroding Single Surface 和 Single Edge。
APDL:
!calculate mean contact pressure
!file name : pressure.txt
!command: /input,pressure,txt
!pave is the mean contact pressure
esel,s,type,,3 !contact element 172
*get,nelm,elem,0,count
*get,el,elem,0,num,min
*dim,pel,,nelm,1
*dim,sfel,,nelm,1
pfsum=0
pfsumx=0
pfsumy=0
sfsum=0
sfsumx=0
sfsumy=0
asum=0
asumx=0
asumy=0
pave=0 !the average contact pressure
numcont=0 !the number of contact elements
cnfxsum=0
cnfysum=0
pi=4*atan(1)
*do,i,1,nelm
*GET,stat1,ELEM,el,NMISC,19,1,2 !stat1, contact element status
*if,stat1,ge,2,then !if stat1>=2, it is in close contact,else it's open
!*GET,ael,ELEM,el,AREA
!For axisymmetric model
*GET,lel,ELEM,el,LENG
nd1=nelem(el,1)
nd2=nelem(el,2)
sintheta=(ny(nd2)+uy(nd2)-ny(nd1)-uy(nd1))/lel
costheta=(nx(nd2)+ux(nd2)-nx(nd1)-ux(nd1))/lel
r1=nx(nd1)+ux(nd1)
r2=nx(nd2)+ux(nd2)
!ael=pi*(r1+r2)*lel
ael=(r1+r2)*lel
!*
!calculate force in x and y direction
*GET,lelx,ELEM,el,LPROJ,X
*GET,lely,ELEM,el,LPROJ,Y
aely=(r1+r2)*lely
aelx=(r1+r2)*lelx
!*
*GET,pel( i ),ELEM,el,SMISC, 5,1,2 !get normal contact pressure of contact element el.
*GET,sfel( i ),ELEM,el,SMISC, 3,4 !get tangential contact stress of contact element el.
*GET,cnfx,ELEM,el,NMISC, 21 !get Contact element el force-x component.
*GET,cnfy,ELEM,el,NMISC, 22 !get Contact element el force-y component.
cnfxsum=cnfxsum+cnfx
cnfysum=cnfysum+cnfy
!*
asum=asum+ael
pfsum=pfsum+ael*pel( i )
sfsum=sfsum+ael*sfel( i )
!sum of the forces in x and y directions
asumx=asumx+aelx
asumy=asumy+aely
pfsumx=pfsumx+ael*pel( i )*sintheta
pfsumy=pfsumy+ael*pel( i )*costheta
sfsumx=sfsumx+aelx*sfel( i )*costheta
sfsumy=sfsumy+aely*sfel( i )*sintheta
!*
numcont=numcont+1
*endif
el=elnext(el)
*enddo
!average and total forces
pave=pfsum/asum
pfsum=pi*pfsum
sfave=sfsum/asum
sfsum=pi*sfsum
!average and total forces in x and y directions
pavex=pfsumx/asumx !平均法向接觸力 x 向分量
pfsumx=pi*pfsumx !法向接觸力 x 向分量
pavey=pfsumy/asumy !平均法向接觸力 y 向分量
pfsumy=pi*pfsumy !法向接觸力 y 向分量
sfavex=sfsumx/asumx !平均摩擦力 x 向分量
sfsumx=pi*sfsumx !摩擦力 x 向分量
sfavey=sfsumy/asumy !平均摩擦力 y 向分量
sfsumy=pi*sfsumy !摩擦力 y 向分量
!*
cnfxsum=cnfxsum !x 向接觸力(摩擦力和法向接觸力的 x 向分量)
cnfysum=cnfysum !y 向接觸力(摩擦力和法向接觸力的 y 向分量)
作者:XuJC