PFC3D建模流程和代碼解釋培訓(xùn)講學(xué)_第1頁
PFC3D建模流程和代碼解釋培訓(xùn)講學(xué)_第2頁
PFC3D建模流程和代碼解釋培訓(xùn)講學(xué)_第3頁
PFC3D建模流程和代碼解釋培訓(xùn)講學(xué)_第4頁
PFC3D建模流程和代碼解釋培訓(xùn)講學(xué)_第5頁
已閱讀5頁,還剩6頁未讀, 繼續(xù)免費(fèi)閱讀

下載本文檔

版權(quán)說明:本文檔由用戶提供并上傳,收益歸屬內(nèi)容提供方,若內(nèi)容存在侵權(quán),請(qǐng)進(jìn)行舉報(bào)或認(rèn)領(lǐng)

文檔簡(jiǎn)介

1、PFC3D建模流程和代碼解釋本示例表示生成球體在一定的空間內(nèi)進(jìn)行運(yùn)動(dòng)的部分代碼以及代碼表示意義。新建一個(gè) PFC3D 模型必要部分生成的整體日志。 PFC3D 建模需要的部分和代碼解釋*Logging started at 周三 八月 30 16:50:55 2017By pfc3d Version 5.00 Release 025*Job Title: Pandect example*pfc3dpfc3d; 3-設(shè)置模型名稱,可有可無。pfc3dtitle Pandect examplepfc3dpfc3d; 4-設(shè)定計(jì)算區(qū)域(必要條件)pfc3d; Set the domain exten

2、tpfc3ddomain extent -10.0 10.0 -20 20 ; domain 中有兩個(gè)關(guān)鍵詞是 condition 和extent, condition 指的是邊界條件periodic ;destroy ;stop ;reflect; condition 默認(rèn)值是stop。extent指的是模型區(qū)域pfc3dpfc3d; 5-指定隨機(jī)種子(若不指定,種子隨機(jī))pfc3dset random 10001默認(rèn)值是一萬,且數(shù)量級(jí)是相同的數(shù)量級(jí),也就是該隨;機(jī)數(shù)值 10000不能過大,不能過小。設(shè)置隨機(jī)種子以后,生成的顆粒的半徑和位置都在范圍內(nèi)隨機(jī)。pfc3dpfc3d; 6-生成及修

3、改模型組件(必要條件) ,有三種命令是來生成顆粒的,generate, create, distribute。pfc3d; Generate 30 balls in a box, wall 就是一個(gè)生成顆粒的容器。pfc3dwall generate box -5.0 5.0- The wall boxWallBottom1 with id 1 and 2 facets has been created- The wall boxWallTop2 with id 2 and 2 facets has been created- The wall boxWallLeft3 with id 3 a

4、nd 2 facets has been created- The wall boxWallRight4 with id 4 and 2 facets has been created- The wall boxWallFront5 with id 5 and 2 facets has been created- The wall boxWallBack6 with id 6 and 2 facets has been createdpfc3d;ball createpfc3dball generate radius 1.0 1.4 box -5.0 5.0 number 1000+ Fewe

5、r balls were generated than specified!34 balls out of 1000 generated in 20000 tries.pfc3d;ball distributepfc3dpfc3d; 7-組件分組,顆粒分組,墻體分組。pfc3dpfc3dball group small_balls range radius 1.0 1.2- Group small_balls assigned to 14 Balls in slot 1.pfc3dball group big_balls range radius 1.2 1.4- Group big_ball

6、s assigned to 20 Balls in slot 1.pfc3dpfc3d; 8-施加實(shí)體屬性(必要條件) ,實(shí)體屬性的意思是這些屬性是作用在顆粒的中心的。pfc3d; Assign ball density,顆粒的實(shí)體屬性一般都是由attribute這個(gè)屬性來添加。 fix 是來限制顆粒的移動(dòng)方向和位移。pfc3dball attribute density 100.0- Attribute density initialized in 34 ball(s).pfc3dball fix zvelocity range group big_balls- Fixity conditi

7、ons changed in 20 balls.pfc3dpfc3dpause keyPress any key to continue -pfc3dpfc3dball attribute radius multiply 1.2;這是半徑放大和縮小倍數(shù)的,這句話的意思是,生成的半徑乘以 1.2倍。- Attribute radius initialized in 34 ball(s).pfc3dball attribute damp 0.7;局部阻尼,PFC3.0-4.0默認(rèn)值是 0.7,在 PFC5.0是0.0- Attribute damp initialized in 34 ball(s

8、).pfc3dpfc3dpause keyPress any key to continue -pfc3dpfc3d; 9-指定接觸模型(必要條件)pfc3d; Modify the default slots of the Contact Model Assignment Tablepfc3d; Here we choose the linear contact model (with kn=1e6) for all contact typespfc3dcmat default model linear property kn 1.0e6 fric 0.0;定義法向剛度為10 的 6次方。p

9、fc3dpfc3d; 10-設(shè)置表面屬性,也就是說這些屬性是作用在顆粒表面的。pfc3dball property kn 2e6 ks 1e6 fric 0.0;要通過屬性轉(zhuǎn)換才能轉(zhuǎn)到50行的 fric- Property kn assigned to 34 ball(s) in range.- Property ks assigned to 34 ball(s) in range.- Property fric assigned to 34 ball(s) in range.pfc3dpfc3d; 11-添加重力場(chǎng)pfc3d; Activate gravitypfc3dset gravity

10、 10.0pfc3dpfc3d; 12-設(shè)定時(shí)間步長(zhǎng)(若不指定,取默認(rèn)值,默認(rèn)值為模擬時(shí)間步長(zhǎng))pfc3dset timestep maximum 5e-3- maximum timestep set to 0.005 in mechanical process.pfc3dpfc3ddef timestepDef timestep = math.sqrt(m/K)Def time = mech.age得到模擬時(shí)間從而設(shè)置時(shí)間步長(zhǎng)的時(shí)候要將時(shí)間步長(zhǎng)設(shè)置的小于該模擬時(shí)間,否則該設(shè)置的時(shí)間步長(zhǎng)將會(huì)被忽略。Defendpfc3dpfc3d; 13-記錄數(shù)據(jù) pfc3dwall history id 1

11、 zcontactforce id 1- Created history 1 Z-ContactForce of wall 1pfc3dpfc3dpause 5現(xiàn)在是數(shù)字,指的是暫停五秒,如果是pause key的話,則是撼任意鍵繼續(xù)。pfc3dpfc3d; 14-計(jì)算求解(必要條件)主要是三個(gè)命令,step, cycle, solve time。pfc3d; Solve for a given time and save the modelpfc3d;step 1000, step很少用,幾乎用不到。step和cycle后面都是跟的步數(shù)。pfc3d;cycle 2002pfc3dsolve

12、time 10.0Cycle Total Timestep Mech Time Clock 20002000 5.00000E-03 1.000000e+01 00:00:00:241.000000e+01- Limit time of 1.000000e+01 met in process(es): mech Ball (1.000000e+01),mechClump (1.000000e+01),mech Wall (1.000000e+01).- Cycling ended at: 2017-08-30 16:51:36pfc3dpfc3d; 15-輸出數(shù)據(jù)pfc3dhistory wr

13、ite 1 file wzcforce ;.csv ,如果不加擴(kuò)展名默認(rèn)的擴(kuò)展名是.his,his文件可以用文本打開。-History contents written to file D:/安裝程序 /PFC/PFC學(xué)習(xí)版 2d+3d+例子/01-模型基本組成 /PFC5.0-3D/wzcforce.his.pfc3dpfc3d; 16-保存模型及模型調(diào)用,保存模型是以.p3sav為擴(kuò)展名的一個(gè)文件。通過restore來調(diào)用模型。pfc3dsave pandect_example-Model saved to file D:/安裝程序/PFC/PFC學(xué)習(xí)版2d+3d+例子/01-模型基本組成

14、/PFC5.0-3D/pandect_example.p3savpfc3dpfc3d;pausepfc3d;cmat命令一個(gè)模型當(dāng)中前后計(jì)算設(shè)置不同的接觸最好不要。pfc3d;ball attribute displacement multiply 0.0,清空顆粒的位移。清空以后都是0.pfc3dpfc3dset log off* Logging ended at 周三 八月 30 16:51:37 2017*建模部分代碼-建立尾礦壩的一部分newdomain extent -50 350 -50 350ball distribute porosity 0.06 radius 0.5 0.7

15、5 box 0 300 0 200ball attribute density 2500 damp 0.7geometry import 01.dxfball del rang geometry 01 count 1 notwall import geometry 01geometry import 02.dxfwall import geometry 02porosity=0.04area=7948set random 10001def ball_creati=50000a=area*(1-porosity) loop while area_sum=af1 = math.random.uni

16、formf2 = math.random.uniformf3 = math.random.uniformradius_1=0.75+f3*(2-0.75)x_1=2+80*f1y_1=2+42*f2commandball create id=i radius=radius_1 x=x_1 y=y_1 endcommandi=i+1area_1=radius_1*radius_1*math.piarea_sum=area_sum+area_1end_loopendball_creatball attribute density 2700cmat default type ball-facet m

17、odel linear property kn 1e10cmat default type ball-ball model linearpbond method deform emod 2e8 kratio 2cyc 100000 calm 1000wall delgeometry delgeometry import 02.dxfgeometry import 05.dxfgeometry import 06.dxfball group 1 rang geometry 02 count 1ball group 2 rang geometry 05 count 1ball group 3 ra

18、ng geometry 06 count 1save model接觸模型的部分代碼書寫例子一; fname: cmat1.p2dat; Illustrate simple usage of the CMAT; (All default slots filled with the same data) newset random 10001domain extent -1.5e-2 1.5e-2 condition destroy定義該計(jì)算區(qū)域wall generate box -1.0e-2 1.0e-2 onewal 隴成墻體ball generate number 200 radius 0

19、.4e-3 0.6e-3 box -1.0e-2 1.0e-生;成了 200 個(gè)顆粒,也可能生成不了那么多的顆粒,半徑為 0.4*10 的-3次方, 0.6*10 的-3 次方,顆粒范圍為 -1.0*10 的-2次方即為 -0.01,0.01ball attribute density 2500.0;設(shè)置密度為2500; set ALL the default slots of the CMATcmat default model linear property kn 1e6 dp_nratio 0.0指定了接觸模型為線性接;觸模型,法向剛度為 10 的 6 次方,法向臨界阻尼比為 0.0se

20、t gravity 9.81;設(shè)置了重力加速度為9.81cycle 1000pause key; set ALL the default slots of the CMATcmat default model linear property kn 1e7 dp_nratio 0.2 lin_mode 1指定了接觸模型;為線性接觸模型,法向剛度為 10 的 7 次方,法向臨界阻尼比為0.2,控制接觸力的法向接觸更新模式為 1.cmat apply range x 0.0 1.5e-2;l觸模型的應(yīng)用范圍為 x 方向 0.0至U 0.015, cmatapply 指的是將新建的模型添加在已有的模型

21、上。solve aratio 1e-4;solve aratio于平均不平衡力與平均接觸力的比值,默認(rèn)值是10 的 -5 次方。但是不能太小,因?yàn)樘×艘院髸?huì)造成模型完成時(shí)間過長(zhǎng)。用step和cycle也是可以求解的。save cmat1保存接觸模型為1.return;= =; eof: cmat1.p2dat例子二; fname: cmat2.p2dat; Illustrate simple usage of the CMAT; (Default slots filled with the different data)newset random 10001domain extent -1.

22、5e-2 1.5e-2 condition destroywall generate box -1.0e-2 1.0e-2 onewallball generate number 200 radius 0.4e-3 0.6e-3 box -1.0e-2 1.0e-2ball attribute density 2500.0生成了和cmat1 一樣的模型,只是在接觸模型上有了變化。;set different contact models for the ball-ball and ball-facet contact types cmat default type ball-ball .mod

23、el hertz赫茲接觸模型,顆粒與顆粒之間property hz_shear 30e9 hz_poiss 0.3 .赫茲切向模量 30 的 9 次方,赫茲泊松比為0.3fric 0.25.摩擦系數(shù) 0.25dp_nratio 0.2法向臨界阻尼比為0.2cmat default type ball-facet .model linear .property kn 1e6 dp_nratio 0.2set gravity 9.81solvesave cmat2return;對(duì)兩種接觸模型分別定義;eof: cmat2.p2dat例子三; fname: cmat3.p2datIllustrate

24、 advanced usage of the CMAT(Default and Optional slots filled with different data) newset random 10001domain extent -1.5e-2 1.5e-2 condition destro件成了兩組顆粒,在 ball generate當(dāng)中用了 group命令wall generate box -1.0e-2 1.0e-2 onewallball generate number 100 radius 0.4e-3 0.6e-3 box -1.0e-2 1.0e-2 group glass 璃球ball generate number 100 radius 0.4e-3 0.6e-3 box -1.0e-2 1.0e-2 group stee 球ball attribute density 2500.0 range group glass1義密度ball attribute density 7500.0 range group steel;contact group left range x -1.5e-2 0;contact group right range x 0 1.5e-2contact groupbehavior and ;contact groupbeha

溫馨提示

  • 1. 本站所有資源如無特殊說明,都需要本地電腦安裝OFFICE2007和PDF閱讀器。圖紙軟件為CAD,CAXA,PROE,UG,SolidWorks等.壓縮文件請(qǐng)下載最新的WinRAR軟件解壓。
  • 2. 本站的文檔不包含任何第三方提供的附件圖紙等,如果需要附件,請(qǐng)聯(lián)系上傳者。文件的所有權(quán)益歸上傳用戶所有。
  • 3. 本站RAR壓縮包中若帶圖紙,網(wǎng)頁內(nèi)容里面會(huì)有圖紙預(yù)覽,若沒有圖紙預(yù)覽就沒有圖紙。
  • 4. 未經(jīng)權(quán)益所有人同意不得將文件中的內(nèi)容挪作商業(yè)或盈利用途。
  • 5. 人人文庫網(wǎng)僅提供信息存儲(chǔ)空間,僅對(duì)用戶上傳內(nèi)容的表現(xiàn)方式做保護(hù)處理,對(duì)用戶上傳分享的文檔內(nèi)容本身不做任何修改或編輯,并不能對(duì)任何下載內(nèi)容負(fù)責(zé)。
  • 6. 下載文件中如有侵權(quán)或不適當(dāng)內(nèi)容,請(qǐng)與我們聯(lián)系,我們立即糾正。
  • 7. 本站不保證下載資源的準(zhǔn)確性、安全性和完整性, 同時(shí)也不承擔(dān)用戶因使用這些下載資源對(duì)自己和他人造成任何形式的傷害或損失。

最新文檔

評(píng)論

0/150

提交評(píng)論