PFC接觸分組賦值
今天將接觸分組這部分思考了一下,總結了一下接觸分組的做法,并提出一個做法可以實現接觸層面賦值的方法。
首先我們這里提出一個工況,有兩層土,底層是礫石,上層是砂土,礫石的參數為:kn=ks=5e7,砂土為:kn=ks=2e7,組間接觸為:kn=ks=3e7,顆粒與墻的接觸定義為:kn=ks=1e8。
下面的demo是我經常用的做法,在cmat entry中將除了組間接觸之外的所有接觸都定義好,id 1對應的是礫石內部,2對應的是砂土內部,3對應的是顆粒與墻的。那組間接觸在cmat entry中找不到自己的range時,就會返回到default中。
new
domain extent -1 1
wall generate box -0.5 0.5
ball distribute porosity 0.2 radius 0.02 0.03 group lishi box -0.5 0.5 -0.5 0
ball distribute porosity 0.2 radius 0.006 0.01 group shatu box -0.5 0.5 0 0.5
ball attribute density 3.8e3 damp 0.7 range group lishi
ball attribute density 2.6e3 damp 0.7 range group shatu
contact groupbehavior and
cmat default model linear property kn 3e7 ks 3e7
cmat add 1 model linear property kn 5e7 ks 5e7 range group lishi
cmat add 2 model linear property kn 2e7 ks 2e7 range group shatu
cmat add 3 model linear property kn 1e8 ks 1e8 range contact type ball-facet
cycle 2000 calm 10
set gravity 9.8
solve
運行的結果為:
這個是達到我們預期的結果的,但是我們也會發現這個問題的不足,當出現多個組時,這個方法就不太適用了。
受到裂紋函數的啟發,這里利用contact_activated事件進行接觸的定義,demo如下:
new
domain extent -1 1
wall generate box -0.5 0.5
ball distribute porosity 0.2 radius 0.02 0.03 group lishi box -0.5 0.5 -0.5 0
ball distribute porosity 0.2 radius 0.006 0.01 group shatu box -0.5 0.5 0 0.5
ball attribute density 3.8e3 damp 0.7 range group lishi
ball attribute density 2.6e3 damp 0.7 range group shatu
contact groupbehavior and
cmat default model linear property kn 1e9 ks 1e9
cmat add 1 model linear property kn 5e7 ks 5e7 range group lishi
cmat add 2 model linear property kn 2e7 ks 2e7 range group shatu
cmat add 3 model linear property kn 1e8 ks 1e8 range contact type ball-facet
;
def set_contact(entry)
local ct=entry(1)
if type.pointer.name(contact.end1(ct)) # "Facet" then
if type.pointer.name(contact.end2(ct)) # "Facet" then
if ball.group(contact.end1(ct))="lishi" then
if ball.group(contact.end2(ct))="shatu" then
contact.model(ct)="linear"
contact.prop(ct,"kn")=3e7
contact.prop(ct,"ks")=3e7
endif
endif
if ball.group(contact.end2(ct))="lishi" then
if ball.group(contact.end1(ct))="shatu" then
contact.model(ct)="linear"
contact.prop(ct,"kn")=3e7
contact.prop(ct,"ks")=3e7
endif
endif
endif
endif
end
set fish callback contact_activated @set_contact
cycle 2000 calm 10
set gravity 9.8
solve
這個是用set_contact函數進行接觸的定義,在其中篩選出組間的接觸,然后對其進行定義,為了區分之前的,這里將cmat default中的參數設置為1e9,我們可以看一下運行結果:
這個也是符合我們需求的。
下面測試一下三個分組的:
這里增加了底層為塊石,定義其接觸參數為:kn=ks=8e7,礫石和塊石間的接觸參數為:kn=ks=7e7。
將demo修改為:
new
domain extent -1 1
wall generate box -0.5 0.5
ball distribute porosity 0.2 radius 0.03 0.05 group kuaishi box -0.5 0.5 -0.5 -0.3
ball distribute porosity 0.2 radius 0.02 0.03 group lishi box -0.5 0.5 -0.3 0.1
ball distribute porosity 0.2 radius 0.006 0.01 group shatu box -0.5 0.5 0.1 0.5
ball attribute density 3.8e3 damp 0.7 range group kuaishi
ball attribute density 3.8e3 damp 0.7 range group lishi
ball attribute density 2.6e3 damp 0.7 range group shatu
contact groupbehavior and
cmat default model linear property kn 1e9 ks 1e9
cmat add 1 model linear property kn 5e7 ks 5e7 range group lishi
cmat add 2 model linear property kn 2e7 ks 2e7 range group shatu
cmat add 3 model linear property kn 1e8 ks 1e8 range contact type ball-facet
cmat add 1 model linear property kn 8e7 ks 8e7 range group kuaishi
;
def set_contact(entry)
local ct=entry(1)
if type.pointer.name(contact.end1(ct)) # "Facet" then
if type.pointer.name(contact.end2(ct)) # "Facet" then
if ball.group(contact.end1(ct))="lishi" then
if ball.group(contact.end2(ct))="shatu" then
contact.model(ct)="linear"
contact.prop(ct,"kn")=3e7
contact.prop(ct,"ks")=3e7
endif
endif
if ball.group(contact.end2(ct))="lishi" then
if ball.group(contact.end1(ct))="shatu" then
contact.model(ct)="linear"
contact.prop(ct,"kn")=3e7
contact.prop(ct,"ks")=3e7
endif
endif
if ball.group(contact.end1(ct))="lishi" then
if ball.group(contact.end2(ct))="kuaishi" then
contact.model(ct)="linear"
contact.prop(ct,"kn")=3e7
contact.prop(ct,"ks")=3e7
endif
endif
if ball.group(contact.end2(ct))="lishi" then
if ball.group(contact.end1(ct))="kuaishi" then
contact.model(ct)="linear"
contact.prop(ct,"kn")=7e7
contact.prop(ct,"ks")=7e7
endif
endif
endif
endif
end
set fish callback contact_activated @set_contact
cycle 2000 calm 10
set gravity 9.8
solve
運行的結果為:
可以看到也是達到預期了。
這個方法有個缺點就是速度會稍微慢點,如果兩個分組的話,采用第一個方法好點。
工程師必備
- 項目客服
- 培訓客服
- 平臺客服
TOP




















