【PFC6.0】泰森多邊形區域劃分及顆粒填充
瀏覽:5206 評論:2 收藏:13
0 引言
前兩天發了【PFC6.0】隨機多邊形區域劃分及顆粒填充 的文章后,公眾號后臺收到了一些同學的留言。介紹了在PFC高版本軟件中,可以直接使用泰森多邊形進行rblock的生成。
于是乎我就趁這機會也升了一下目前使用的版本。上個文章采用的是PFC6.0.13,本文章采用PFC6.0.30進行測試。
1 成樣
泰森多邊形的rblock主要使用rblock construct 中的from-balls關鍵詞,所以在這之前需要生成ball的式樣。需要注意的是,from-balls采取的邊界是ball式樣的邊界,所以需要ball和facet之間的剛度大一點。
model newmodel domain extent -10 10wall generate box -5 5ball distribute porosity 0.1 radius 0.8 1.5 box -5 5cmat default type ball-facet model linear method deform emod 100e9 kratio 1.5cmat default type ball-ball model linear method deform emod 100e6 kratio 1.5ball attribute density 2e3 damp 0.7model cycle 2000 calm 50ball delete range pos-x -5 5 notball delete range pos-y -5 5 notmodel solvemodel save "ball_dis"
得到的模型如圖:
之后直接調用rblock construct命令進行rblock的生成:
rblock construct from-balls polydisperse truemodel save "rblock_dis"
如圖:
后面的顆粒填充邏輯和上篇文章一樣,我個人也是比較傾向于一塊塊的進行顆粒填充的。
model restore "rblock_dis"ball deletedef GetGeogeoname_count=1loop foreach rb rblock.listgroupName=string.build("geo_%1",geoname_count)idRblock=rblock.id(rb)commandrblock export to-geometry @groupName range id @idRblockendcommandgeoname_count+=1endloopend@GetGeorblock deletedef GenerateBallIn(geo_count_single)groupName=string.build("geo_%1",geo_count_single)commandball distribute porosity 0.1 radius 0.03 0.06 group @groupName range geometry-space @groupName count 1ball attribute density 2.7e3 damp 0.3endcommandenddef genAllBallloop gen_cur(1,geoname_count-1)groupName=string.build("geo_%1",gen_cur)commandwall import from-geometry @groupName id 10000model calmball fix velocity spinendcommandGenerateBallIn(gen_cur)commandmodel cycle 2000 calm 20ball delete range geometry-space @groupName count 1 not group @groupNameendcommandcommandmodel solve ratio-average 1e-5 or cycles 10000model save @groupNamewall delete walls range id 10000endcommandendloopend@genAllBallmodel save "sample"
最后效果如圖:
技術鄰APP
工程師必備
工程師必備
- 項目客服
- 培訓客服
- 平臺客服
TOP
5
2
13




















