![PFC3D建模流程和代碼解釋培訓(xùn)講學(xué)_第1頁](http://file4.renrendoc.com/view/d7ece0e82e556b47c4aa353153a0aae7/d7ece0e82e556b47c4aa353153a0aae71.gif)
![PFC3D建模流程和代碼解釋培訓(xùn)講學(xué)_第2頁](http://file4.renrendoc.com/view/d7ece0e82e556b47c4aa353153a0aae7/d7ece0e82e556b47c4aa353153a0aae72.gif)
![PFC3D建模流程和代碼解釋培訓(xùn)講學(xué)_第3頁](http://file4.renrendoc.com/view/d7ece0e82e556b47c4aa353153a0aae7/d7ece0e82e556b47c4aa353153a0aae73.gif)
![PFC3D建模流程和代碼解釋培訓(xùn)講學(xué)_第4頁](http://file4.renrendoc.com/view/d7ece0e82e556b47c4aa353153a0aae7/d7ece0e82e556b47c4aa353153a0aae74.gif)
![PFC3D建模流程和代碼解釋培訓(xùn)講學(xué)_第5頁](http://file4.renrendoc.com/view/d7ece0e82e556b47c4aa353153a0aae7/d7ece0e82e556b47c4aa353153a0aae75.gif)
版權(quán)說明:本文檔由用戶提供并上傳,收益歸屬內(nèi)容提供方,若內(nèi)容存在侵權(quán),請進行舉報或認(rèn)領(lǐng)
文檔簡介
PFC3D建模流程和代
碼解釋本示例表示生成球體在一定的空間內(nèi)進行運動的部分代碼以及代碼表示意義。新建一個PFC3D模型必要部分生成的整體日志。PFC3D建模需要的部分和代碼解釋**********************************************Loggingstartedat周三八月3016:50:552017Bypfc3dVersion5.00Release025**JobTitle:Pandectexample**********************************************pfc3d>pfc3d>;3-設(shè)置模型名稱,可有可無。pfc3d>title'Pandectexample'pfc3d>pfc3d>;4-設(shè)定計算區(qū)域(必要條件)pfc3d>;Setthedomainextentpfc3d>domainextent-10.010.0-2020;domain3中有兩個關(guān)鍵詞是condition和extent,condition指的是邊界條件periodic;destroy;stop;reflect;condition默認(rèn)值是stop。extent指的是模型區(qū)域pfc3d>pfc3d>;5-指定隨機種子(若不指定,種子隨機)pfc3d>setrandom10001默認(rèn)值是一萬,且數(shù)量級是相同的數(shù)量級,也就是該隨機數(shù)值10000不能過大,不能過小。設(shè)置隨機種子以后,生成的顆粒的半徑和位置都在范圍內(nèi)隨機。pfc3d>pfc3d>;6-生成及修改模型組件(必要條件),有三種命令是來生成顆粒的,generatecreate,distributeepfc3d>;Generate30ballsinaboxwall就是一個生成顆粒的容器。pfc3d>wallgeneratebox-5.05.0--ThewallboxWallBottom1withid1and2facetshasbeencreated--ThewallboxWallTop2withid2and2facetshasbeencreated--ThewallboxWallLeft3withid3and2facetshasbeencreated--ThewallboxWallRight4withid4and2facetshasbeencreated--ThewallboxWallFront5withid5and2facetshasbeencreated--ThewallboxWallBack6withid6and2facetshasbeencreatedpfc3d>;ballcreatepfc3d>ballgenerateradius1.01.4box-5.05.0number1000+++Fewerballsweregeneratedthanspecified!34ballsoutof1000generatedin20000tries.pfc3d>;balldistributepfc3d>pfc3d>;7-組件分組,顆粒分組,墻體分組。pfc3d>pfc3d>ballgroupsmall_ballsrangeradius1.01.2--Groupsmall_ballsassignedto14Ballsinslot1.pfc3d>ballgroupbig_ballsrangeradius1.21.4--Groupbig_ballsassignedto20Ballsinslot1.pfc3d>pfc3d>;8-施加實體屬性(必要條件),實體屬性的意思是這些屬性是作用在顆粒的中心的。pfc3d>;Assignballdensity,顆粒的實體屬性一般都是由attribute這個屬性來添加。fix是來限制顆粒的移動方向和位移。pfc3d>ballattributedensity100.0--Attributedensityinitializedin34ball(s).pfc3d>ballfixzvelocityrangegroupbig_balls--Fixityconditionschangedin20balls.pfc3d>pfc3d>pausekeyPressanykeytocontinue--pfc3d>pfc3d>ballattributeradiusmultiply1.2;這是半徑放大和縮小倍數(shù)的,這句話的意思是,生成的半徑乘以1.2倍。--Attributeradiusinitializedin34ball(s).pfc3d>ballattributedamp0.7;局部阻尼,PFC3.0-4.0默認(rèn)值是0.7,在PFC5.0是0.0--Attributedampinitializedin34ball(s).pfc3d>pfc3d>pausekeyPressanykeytocontinue--pfc3d>pfc3d>;9-指定接觸模型(必要條件)pfc3d>;ModifythedefaultslotsoftheContactModelAssignmentTablepfc3d>;Herewechoosethelinearcontactmodel(withkn=1e6)forallcontacttypespfc3d>cmatdefaultmodellinearpropertykn1.0e6fric0.0定義法向剛度為10的6次方。pfc3d>pfc3d>;10-設(shè)置表面屬性,也就是說這些屬性是作用在顆粒表面的。pfc3d>ballpropertykn2e6ks1e6fric0.0;要通過屬性轉(zhuǎn)換才能轉(zhuǎn)到50行的fric--Propertyknassignedto34ball(s)inrange.--Propertyksassignedto34ball(s)inrange.--Propertyfricassignedto34ball(s)inrange.pfc3d>pfc3d>;11-添加重力場pfc3d>;Activategravitypfc3d>setgravity10.0pfc3d>pfc3d>;12-設(shè)定時間步長(若不指定,取默認(rèn)值,默認(rèn)值為模擬時間步長)pfc3d>settimestepmaximum5e-3--maximumtimestepsetto0.005inmechanicalprocess.pfc3d>pfc3d>deftimestepDef>timestep=math.sqrt(m/K)Def>time=mech.age得到模擬時間從而設(shè)置時間步長的時候要將時間步長設(shè)置的小于該模擬時間,否則該設(shè)置的時間步長將會被忽略。Def>endpfc3d>pfc3d>;13-記錄數(shù)據(jù)pfc3d>wallhistoryid1zcontactforceid1---Createdhistory1Z-ContactForceofwall1pfc3d>pfc3d>pause5現(xiàn)在是數(shù)字,指的是暫停五秒,如果是pausekey的話,則是撼任意鍵繼續(xù)。pfc3d>pfc3d>;14-計算求解(必要條件)主要是三個命令,step,cycle,solvetime。pfc3d>;Solveforagiventimeandsavethemodelpfc3d>;step1000step很少用,幾乎用不到。step和cycle后面都是跟的步數(shù)。pfc3d>;cycle2002pfc3d>solvetime10.0CycleTotalTimestepMechTimeClock—200020005.00000E-031.000000e+0100:00:00:241.000000e+01---Limittimeof1.000000e+01metinprocess(es):mechBall(1.000000e+01),mechClump(1.000000e+01),mechWall(1.000000e+01).---Cyclingendedat:2017-08-3016:51:36pfc3d>pfc3d>;15-輸出數(shù)據(jù)pfc3d>historywrite1filewzcforce;.csv,如果不加擴展名默認(rèn)的擴展名是.his,his文件可以用文本打開。---HistorycontentswrittentofileD:/安裝程序/PFC/PFC學(xué)習(xí)版2d+3d+例子/01-模型基本組成/PFC5.0-3D/wzcforce.his.pfc3d>pfc3d>;16-保存模型及模型調(diào)用,保存模型是以.p3sav為擴展名的一個文件。通過restore來調(diào)用模型。pfc3d>savepandect_example---ModelsavedtofileD:/安裝程序/PFC/PFC學(xué)習(xí)版2d+3d+例子/01-模型基本組成/PFC5.0-3D/pandect_example.p3savpfc3d>pfc3d>;pausepfc3d>;cmat命令一個模型當(dāng)中前后計算設(shè)置不同的接觸最好不要。pfc3d>;ballattributedisplacementmultiply0.0,清空顆粒的位移。清空以后都是0.pfc3d>pfc3d>setlogoff***********************************************Loggingendedat周三八月3016:51:372017**********************************************建模部分代碼-建立尾礦壩的一部分newdomainextent-50350-50350balldistributeporosity0.06radius0.50.75box03000200ballattributedensity2500damp0.7geometryimport01.dxfballdelranggeometry01count1notwallimportgeometry01geometryimport02.dxfwallimportgeometry02[porosity=0.04][area=7948]setrandom10001defball_creati=50000a=area*(1-porosity)loopwhilearea_sum<=af1=math.random.uniformf2=math.random.uniformf3=math.random.uniformradius_1=0.75+f3*(2-0.75)x_1=2+80*f1y_1=2+42*f2commandballcreateid=@iradius=@radius_1x=@x_1y=@y_1endcommandi=i+1area_1=radius_1*radius_1*math.piarea_sum=area_sum+area_1end_loopend@ball_creatballattributedensity2700cmatdefaulttypeball-facetmodellinearpropertykn1e10cmatdefaulttypeball-ballmodellinearpbondmethoddeformemod2e8kratio2cyc100000calm1000walldelgeometrydelgeometryimport02.dxfgeometryimport05.dxfgeometryimport06.dxfballgroup1ranggeometry02count1ballgroup2ranggeometry05count1ballgroup3ranggeometry06count1savemodel接觸模型的部分代碼書寫例子一;fname:cmat1.p2dat;;IllustratesimpleusageoftheCMAT;(Alldefaultslotsfilledwiththesamedata)newsetrandom10001domainextent-1.5e-21.5e-2conditiondestroy定義該計算區(qū)域wallgeneratebox-1.0e-21.0e-2onewal隴成墻體ballgeneratenumber200radius0.4e-30.6e-3box-1.0e-21.0e-生;成了200個顆粒,也可能生成不了那么多的顆粒,半徑為0.4*10的-3次方,0.6*10的-3次方,顆粒范圍為-1.0*10的-2次方即為-0.01,0.01ballattributedensity2500.0設(shè)置密度為2500;setALLthedefaultslotsoftheCMATcmatdefaultmodellinearpropertykn1e6dp_nratio0.0旨定了接觸模型為線性接觸模型,法向剛度為10的6次方,法向臨界阻尼比為0.0setgravity9.81;設(shè)置了重力加速度為9.81cycle1000pausekey;setALLthedefaultslotsoftheCMATcmatdefaultmodellinearpropertykn1e7dp_nratio0.2lin_mode1旨定了接觸模型為線性接觸模型,法向剛度為10的7次方,法向臨界阻尼比為0.2,控制接觸力的法向接觸更新模式為1.cmatapplyrangex0.01.5e-21l觸模型的應(yīng)用范圍為x方向0.0至U0.015,cmatapply指的是將新建的模型添加在已有的模型上。solvearatio1e-4;solvearatio^于平均不平衡力與平均接觸力的比值,默認(rèn)值是10的-5次方。但是不能太小,因為太小了以后會造成模型完成時間過長。用step和cycle也是可以求解的。savecmat1保存接觸模型為1.return尸============================================================================;eof:cmat1.p2dat例子二;fname:cmat2.p2dat;;IllustratesimpleusageoftheCMAT;(Defaultslotsfilledwiththedifferentdata)newsetrandom10001domainextent-1.5e-21.5e-2conditiondestroywallgeneratebox-1.0e-21.0e-2onewallballgeneratenumber200radius0.4e-30.6e-3box-1.0e-21.0e-2ballattributedensity2500.0生成了和cmat1一樣的模型,只是在接觸模型上有了變化。;setdifferentcontactmodelsfortheball-ballandball-facetcontacttypescmatdefaulttypeball-ball...modelhertz…赫茲接觸模型,顆粒與顆粒之間propertyhz_shear30e9hz_poiss0.3.赫茲切向模量30的9次方,赫茲泊松比為0.3fric0.25...摩擦系數(shù)0.25dp_nratio0.2法向臨界阻尼比為0.2pertykn1e6dp_nratio0.2setgravity9.81solvesavecmat2return;對兩種接觸模型分別定義;eof:cmat2.p2dat例子三;fname:cmat3.p2datIllustrateadvancedusageoftheCMAT(DefaultandOptionalslotsfilledwithdifferentdata)newsetrandom10001domainextent-1.5e-21.5e-2conditiondestro件成了兩組顆粒,在ballgenerate當(dāng)中用了group命令wallgeneratebox-1.0e-21.0e-2onewallballgeneratenumber100radius0.4e-30.6e-3box-1.0e-21.0e-2groupglasfe璃球ballgeneratenumber100radius0.4e-30.6e-3box-1.0e-21.0e-2groupsteeH球ballattributedensity2500.0rangegroupglassy義密度ballattributedensity7500.0rangegroupsteel;contactgroupleftrangex-1.5e-20;contactgrouprightrangex0
溫馨提示
- 1. 本站所有資源如無特殊說明,都需要本地電腦安裝OFFICE2007和PDF閱讀器。圖紙軟件為CAD,CAXA,PROE,UG,SolidWorks等.壓縮文件請下載最新的WinRAR軟件解壓。
- 2. 本站的文檔不包含任何第三方提供的附件圖紙等,如果需要附件,請聯(lián)系上傳者。文件的所有權(quán)益歸上傳用戶所有。
- 3. 本站RAR壓縮包中若帶圖紙,網(wǎng)頁內(nèi)容里面會有圖紙預(yù)覽,若沒有圖紙預(yù)覽就沒有圖紙。
- 4. 未經(jīng)權(quán)益所有人同意不得將文件中的內(nèi)容挪作商業(yè)或盈利用途。
- 5. 人人文庫網(wǎng)僅提供信息存儲空間,僅對用戶上傳內(nèi)容的表現(xiàn)方式做保護處理,對用戶上傳分享的文檔內(nèi)容本身不做任何修改或編輯,并不能對任何下載內(nèi)容負(fù)責(zé)。
- 6. 下載文件中如有侵權(quán)或不適當(dāng)內(nèi)容,請與我們聯(lián)系,我們立即糾正。
- 7. 本站不保證下載資源的準(zhǔn)確性、安全性和完整性, 同時也不承擔(dān)用戶因使用這些下載資源對自己和他人造成任何形式的傷害或損失。
最新文檔
- 湘教版數(shù)學(xué)七年級上冊1.5.2《有理數(shù)的除法》聽評課記錄
- 常州信息職業(yè)技術(shù)學(xué)院《城市規(guī)劃原理》2023-2024學(xué)年第二學(xué)期期末試卷
- 商丘工學(xué)院《區(qū)域地質(zhì)與礦產(chǎn)調(diào)查》2023-2024學(xué)年第二學(xué)期期末試卷
- 成都醫(yī)學(xué)院《醫(yī)學(xué)創(chuàng)新》2023-2024學(xué)年第二學(xué)期期末試卷
- 廣西工業(yè)職業(yè)技術(shù)學(xué)院《護理教育學(xué)》2023-2024學(xué)年第二學(xué)期期末試卷
- 榆林學(xué)院《中外語言文化比較》2023-2024學(xué)年第二學(xué)期期末試卷
- 西安明德理工學(xué)院《細(xì)胞生物學(xué)專題》2023-2024學(xué)年第二學(xué)期期末試卷
- 魚塘土方回填施工方案
- 物業(yè)小區(qū)外墻保溫施工方案
- 砼網(wǎng)格護坡施工方案
- 中考現(xiàn)代文閱讀理解題精選及答案共20篇
- ESD測試作業(yè)指導(dǎo)書-防靜電手環(huán)
- 高頻變壓器的制作流程
- 春季開學(xué)安全第一課PPT、中小學(xué)開學(xué)第一課教育培訓(xùn)主題班會PPT模板
- JJG30-2012通用卡尺檢定規(guī)程
- 部編版人教版二年級上冊語文教材分析
- 艾賓浩斯遺忘曲線復(fù)習(xí)方法表格模板100天
- APR版制作流程
- 《C++程序設(shè)計》完整教案
- 美國LM2500艦用燃?xì)廨啓C
- RNA-seq研究方法與策略-zzz
評論
0/150
提交評論