【PFC6.0】泰森多邊形區域劃分及顆粒填充

0 引言

    前兩天發了【PFC6.0】隨機多邊形區域劃分及顆粒填充 的文章后,公眾號后臺收到了一些同學的留言。介紹了在PFC高版本軟件中,可以直接使用泰森多邊形進行rblock的生成。

    于是乎我就趁這機會也升了一下目前使用的版本。上個文章采用的是PFC6.0.13,本文章采用PFC6.0.30進行測試。

1 成樣

    泰森多邊形的rblock主要使用rblock construct 中的from-balls關鍵詞,所以在這之前需要生成ball的式樣。需要注意的是,from-balls采取的邊界是ball式樣的邊界,所以需要ball和facet之間的剛度大一點。

model new

model domain extent -10 10



wall generate box -5 5

ball distribute porosity 0.1 radius 0.8 1.5 box -5 5cmat default type ball-facet model linear method deform emod 100e9 kratio 1.5 cmat default type ball-ball model linear method deform emod 100e6 kratio 1.5

ball attribute density 2e3 damp 0.7



model cycle 2000 calm 50ball delete range pos-x -5 5 notball delete range pos-y -5 5 notmodel solve model save "ball_dis"

得到的模型如圖:

【PFC6.0】泰森多邊形區域劃分及顆粒填充的圖1

之后直接調用rblock construct命令進行rblock的生成:

rblock construct from-balls polydisperse true  

model save "rblock_dis"

如圖:

【PFC6.0】泰森多邊形區域劃分及顆粒填充的圖2

    后面的顆粒填充邏輯和上篇文章一樣,我個人也是比較傾向于一塊塊的進行顆粒填充的。

model restore "rblock_dis"

ball deletedef GetGeo geoname_count=1 loop foreach rb rblock.list groupName=string.build("geo_%1",geoname_count) idRblock=rblock.id(rb) command rblock export to-geometry @groupName range id @idRblock endcommand geoname_count+=1 endloopend@GetGeorblock delete

def GenerateBallIn(geo_count_single) groupName=string.build("geo_%1",geo_count_single) command ball distribute porosity 0.1 radius 0.03 0.06 group @groupName range geometry-space @groupName count 1 ball attribute density 2.7e3 damp 0.3 endcommandend

def genAllBall loop gen_cur(1,geoname_count-1) groupName=string.build("geo_%1",gen_cur) command wall import from-geometry @groupName id 10000 model calm ball fix velocity spin endcommand GenerateBallIn(gen_cur) command model cycle 2000 calm 20 ball delete range geometry-space @groupName count 1 not group @groupName endcommand command model solve ratio-average 1e-5 or cycles 10000 model save @groupName wall delete walls range id 10000 endcommand endloopend@genAllBallmodel save "sample"

最后效果如圖:

【PFC6.0】泰森多邊形區域劃分及顆粒填充的圖3



登錄后免費查看全文
立即登錄
App下載
技術鄰APP
工程師必備
  • 項目客服
  • 培訓客服
  • 平臺客服

TOP

5
2
13