單向流固耦合——模擬彎曲河床砂石運移
瀏覽:3373 評論:2 收藏:3
0 引言
要完成這個工況的模擬,其實需要解決兩個難點,第一個是如何生成河床。這里假設河床截面是圓形的,那其實是需要一個pipe形狀的三維體,但是這個在PFC中是沒有提供的。第二個難點就是河流流場的生成了。
1 生成河床
這里我們使用的是以直代曲的辦法,可以用一個個圓柱拼接成河床的額樣子。createwall 函數中就是使用循環生成河床的墻體,R_he 為河床截面中心的弧長半徑,jing_he 為河床截面的圓形半徑,he_kua 為河床跨過的圓心角。wallsplit是我們河床墻體的分段,也不是說分的越細結果越好的。
ball_range 我們定義了河床砂石的生成區域,也是一個圓柱形區域,用的是generate生成后自重沉降的方式。
newdomain extent 0 20 -20 20 -4 4=50]=16]=2]=math.pi*1.0/3.0]def createwalljiaodu_split=he_kua/float(wallsplit)loop n(1,wallsplit)jiaodu1=-he_kua*0.5+jiaodu_split*(n-1)jiaodu2=-he_kua*0.5+jiaodu_split*(n)x_pos1=math.cos(jiaodu1)*R_hey_pos1=math.sin(jiaodu1)*R_hex_pos2=math.cos(jiaodu2)*R_hey_pos2=math.sin(jiaodu2)*R_hevec=math.unit(vector(x_pos2-x_pos1,y_pos2-y_pos1,0))height=(R_he+jing_he)*jiaodu_splitcommandwall generate cylinder base @x_pos1 @y_pos1 0 axis @vec height @height radius @jing_he ...cap false false resolution 0.5endcommandendloopendwall delete range z 0 20 extentdef ball_rangejiaodu1=-he_kua*0.5+jiaodu_split*6jiaodu2=-he_kua*0.5+jiaodu_split*7x_pos1=math.cos(jiaodu1)*R_hey_pos1=math.sin(jiaodu1)*R_hex_pos2=math.cos(jiaodu2)*R_hey_pos2=math.sin(jiaodu2)*R_hevec=math.unit(vector(x_pos2-x_pos1,y_pos2-y_pos1,0))height=(R_he+jing_he)*jiaodu_split*8commandgeometry set ballrangegeometry generate cylinder base @x_pos1 @y_pos1 0 axis @vec height @height radius [jing_he*0.8]endcommandend@ball_rangecmat default model rrlinear method deformability emod 100e6 kratio 1.5 property fric 0.5ball generate radius 0.03 0.09 number 2000 tries 20000000 range geometry ballrange count 1ball attribute density 2.7e3 damp 0.7set gravity 9.8solvesave sample
生成后如圖:
2 流場生成
這里使用我們之前的小程序 PFC單向流固耦合——模擬顆粒落入流動的水中 生成流體網格。
參數為:
記得將其放置到項目文件下。
導入網格后我們需要對流場進行設置,這里我們假設流速是均勻的,實際上的河床截面上的流速是上大下小的應該。因為我們河床圓弧的中心在原點,所以我們直接根據流體網格的位置取切向作為流速方向即可。
restore sampleconfigure cfdball attribute displacement multiply 0cfd read nodes Node.datcfd read elements Elem.datcfd buoyancy on[sudu=5]def addliusuloop foreach local ele element.cfd.listvec=math.unit(vector(element.cfd.pos.y(ele),(-1)*element.cfd.pos.x(ele),0))element.cfd.vel(ele)=(-1)*vec*suduendloopend@addliusuelement cfd attribute density 1000.0element cfd attribute viscosity 1.5set mech age 0[baocunpinlv=0.1][time_record=mech.age-1][count=0]def savefileif mech.age-time_record >= baocunpinlv thenfilename=string.build("jieguo%1",count)commandsave @filenameendcommandtime_record=mech.agecount +=1endifendset fish callback -1.0 @savefilesolve time 10
生成后的結果如圖,保證模型元素都在流場中即可:
3 結果展示
這里就不會結果進行分析了,按理說這種弧形的河道會發生砂石顆粒的離析,這種規律是和粒徑有關系的,可以統計粒徑隨著徑向的分布應該是可以得到一些比較好的結果的。
這里提供兩個動圖給大家:
技術鄰APP
工程師必備
工程師必備
- 項目客服
- 培訓客服
- 平臺客服
TOP
6
2
3




















