PFCdocumentation_examples_tutorials

目录

Tutorials

Using the CMAT(PFC2d)

Using the Default Slots

Using Additional Slots

Property Inheritance

Modifying Existing Contacts

Specifying the Proximity Distance

Generating a Bonded Assembly

Replicating a Particle Size Distribution


Tutorials


Using the CMAT(PFC2d)


        PFC will use the null model contact model by default and therefore, the user is required to explicitly specify which contact model(s) should be used in each PFC model.(必须指定模型接触,否则是空模型)

        The CMAT is a very generic tool that can handle both built-in contact models and user-defined contact models.

        The CMAT is queried any time a new contact is created in order to determine which contact model should be installed at that specific contact.(每个新接触都要CMAT指定)


Using the Default Slots

        两种不同的接触模型:

; set different contact models for the ball-ball and ball-facet contact types 
contact cmat default type ball-ball ...
                   model hertz      ...
                   property hz_shear 30e9 hz_poiss 0.3  ...
                            fric 0.25                   ...
                            dp_nratio 0.2
               
contact cmat default type ball-facet ...
                   model linear      ...

Using Additional Slots

        to model a mix of balls made of steel and glass using the hertz contact model.

contact cmat add 1 model hertz                          ...
                 property hz_shear 30e9 hz_poiss 0.3    ...
                          fric 0.25                     ...
                          dp_nratio 0.2                 ...
           range group 'glass' matches 2

contact cmat add 2 model hertz                          ...
                 property hz_shear 70e9 hz_poiss 0.3    ...
                          fric 0.05                     ...
                          dp_nratio 0.2                 ...
           range group 'steel' matches 2

contact cmat default type ball-ball                     ...
                   model hertz                          ...
                   property hz_shear 50e9 hz_poiss 0.3  ...
                           fric 0.05                    ...
                           dp_nratio 0.2

contact cmat default type ball-facet                    ...
                   model linear                         ...
                   property kn 1e6 dp_nratio 0.2

        上面列出的命令定义了三个与球-球接触有关的槽:

(1)槽1控制赫兹接触模型的分配,其属性与玻璃-玻璃相互作用一致。
(2)槽2控制赫兹接触模型的分配,其属性与钢与钢的相互作用一致。这是用钢组标识符完成的。
(3)球-球接触的默认槽控制赫兹接触模型的分配,其属性与玻璃-钢相互作用相一致。


Property Inheritance

        Only the default slots of the CMAT are specified, and inheritable properties are defined at the balls.

        在CMAT中没有直接指定每个球与球的接触。相反,这些属性是在球上定义的,相应的接触模型属性是在创建接触时从球的属性中导出的。

contact cmat default type ball-ball         ...
                   model hertz              ...
                   property dp_nratio 0.2

contact cmat default type ball-facet               ...
                   model linear                    ...
                   property kn 1e6 dp_nratio 0.2

ball property 'hz_shear' 30e9 'hz_poiss' 0.3 'fric' 0.25 ...
     range group 'glass'

ball property 'hz_shear' 70e9 'hz_poiss' 0.3 'fric' 0.05 ...
     range group 'steel'


Modifying Existing Contacts

(1)修改CMAT并发出联系cmat应用命令来重置联系模型(只修改某一范围/某一点的过程略)

contact cmat modify 1 model linearpbond                        ...
                    method deformability    emod 1e6 krat 0.5  ...
                           pb_deformability emod 1e6 krat 0.5  ...
                    property fric 0.25 dp_nratio 0.2           ...
                           pb_ten 1e8 pb_coh 1e8 pb_fa 30.0  
                      
; apply the CMAT - every contact existing in the model will be processed 
; and a new contact model will be installed. Note that all information in the 
; existing contact model will be lost when it is replaced by a new contact model.
contact cmat apply
contact method bond

(2)使用联系人命令来修改选定的联系人。


Specifying the Proximity Distance

       contact method命令被用来执行线性平行结合接触模型所定义的结合方法。默认情况下,该方法将在间隙小于或等于零的触点处安装粘结。

        为了确保当球的距离超过所需的接近距离时创建接触,可以修改CMAT以使用接近的关键字。例如,下面的命令将修改CMAT,对模型进行清理,以强制创建具有新的接近度设置的新接触,将新的CMAT条目应用于现有的球-球接触,最后,以小于或等于2.5×10-4的间隙粘合接触。

model restore 'cmat6'
contact cmat default type ball-ball   ...
                   model linearpbond  ...
                   property kn 1e6    ...
                   proximity 2.5e-4
             
; The CLEAN command forces contact detection
; Upon execution, new contacts are created, and we are sure that pairs with a 
; separation distance <= 2.5e-4 now have an inactive contact
model clean
; The CMAT APPLY command must also be executed to modify existing contact
contact cmat apply range contact type 'ball-ball'

; the contacts with a gap <= 2.5e-4 can now be modified
contact model linearpbond range contact type 'ball-ball' gap 2.5e-4
contact property kn 1e6 ks 1e6 fric 0.5 ...
                 pb_kn 1e6 pb_ks 1e6    ...
                 pb_ten 1e8 pb_coh 1e8  ...
                 range contact model 'linearpbond'
;gap指的是它的粘结距离
                 
contact method bond gap 2.5e-4


Generating a Bonded Assembly


以下关键词可以用来修改一个给定的值

(1)add:Add the specified value to the existing value.

(2)gradient v <origin v >:Apply a gradient to the scalar-value provided.

(3)multiply:Multiply the existing value by the specified value.

(4)vary v:Apply a linear variation to the scalar-value provided.

        We will use the linear contact model for ball-facet contacts. To generate a bonded specimen, we will use the linear parallel bond model for ball-ball contacts. Also note the use of the proximity keyword; it ensures that all contacts will be created between pieces if their surfaces are within the specified gap.

        (1)模型建立

model new
model title 'Generating a bonded assembly (Linear Parallel-Bond contact model)'

; Set the domain extent.
model domain extent -10 10

contact cmat default model linear property kn 5e6
contact cmat default type ball-ball ...
                     model linearpbond property kn 5e6 proximity 0.1

; Generate a box 
wall generate box -5 5 one-wall

; Distribute balls in the box.
; The seed of the pseudo-random number generator is fixed, ensuring that the 
; same initial configuration will be produced any time this file is executed.
; Note also that the box extent specified with the 'ball distribute' command is
; smaller than the box-wall generated above. This is done to avoid balls  
; escaping from the material vessel. Consequently, the porosity specified with 
; the 'ball distribute' command is tuned down, to achieve the desired porosity 
; upon equilibration.
;
model random 10001
ball distribute porosity 0.2 radius 0.5 0.6 box -4.5 4.5 
;box的体积比之前的要小,放置球体离开box
model save 'balls'

        (2)模型设置

ball attribute density 1000.0 damp 0.7
model cycle 2000 calm 50
model mechanical timestep scale
model solve ratio-average 1e-3
model mechanical timestep auto
model calm

model cycle带有 calm 关键字以周期性地使所有球平移/旋转速度为零,从而有效地从系统中消除动能。这使得滚珠可以在没有明显重叠和明显运动的情况下重新排列,从而相对快速地实现密集的包装。采用密度缩放快速达到平衡,model solve,设定目标平均力比极限。

        (3)监测(测量球由孔隙率的计算值着色)

measure create id 1 radius 5.0
measure history name 1 stress-xx id 1  
measure history name 2 stress-yy id 1  
measure history name 3 stress-zz id 1

        (4)设置初始状态

contact method bond gap 0.1
;设置接触间隙
contact property pb_kn 1e6 pb_ks 1e6 pb_ten 1e6 pb_coh 1e6 pb_fa 30.0
ball attribute displacement multiply 0.0
model save 'initial'

        (5)删除wall

        删除墙壁来改变模型,并将系统求解为目标平衡准则。

wall delete
model cycle 1
model solve ratio-average 1e-3
model save 'final1'

        (6)移除wall,改变线性刚度

        重复模拟,但将线性刚度设置为 0.0。因此,由于球彼此重叠,不应存在力,并且模型应处于平衡状态。但是,请注意,由于先前累积到球上的力在第一个循环中起作用,因此存在轻微的扰动。

; equilibrium.
model restore 'initial'
wall delete
contact property kn 0.0
model cycle 1
model solve ratio-average 1e-3

        (7)消除扰动,重置

        为了消除这种扰动,必须重置在上一个力-位移计算周期中累积到物体上的接触力(可能还有接触力矩)。为了保持一致性,下面的行还重置了线性平行键接触模型的lin_force属性(尽管此步骤不是强制性的)。

; and the system is cycled for 1 step, to reset the linear forces.
model restore 'initial'
wall delete
contact property kn 0.0 lin_force 0.0 0.0 0.0
ball attribute force-contact multiply 0.0 moment-contact multiply 0.0 
model cycle 1
model solve ratio-average 1e-3
model save 'final3'

Replicating a Particle Size Distribution


        从粒度分布 (PSD) 曲线开始创建粒子组件。介绍了从筛子分析数据到球组装的整个过程。

        (1)fish筛分

fish define granulometry
  global exptab = table.create('experimental')
  table(exptab,0.03) = 0.083
  table(exptab,0.04) = 0.166
  table(exptab,0.05) = 0.26
  table(exptab,0.06) = 0.345
  table(exptab,0.075) = 0.493
  table(exptab,0.1) = 0.693
  table(exptab,0.12) = 0.888
  table(exptab,0.15) = 0.976
  table(exptab,0.18) = 0.997
  table(exptab,0.25) = 1.0
end
@granulometry

        (2)对照组

        创建了第二个表格,其中包含用于绘制Rosin-Rammler曲线以与PFC模型进行比较的数值。

fish define RosinRammler(Dp_rr,n_rr,dmin)
  global t = "RosinRammler"
  loop local i (1,1000)
    freq = math.random.uniform
    temp = Dp_rr*((-math.ln(1-freq))^(1/n_rr))
    table(t,temp)=freq
  endloop
end
@RosinRammler(0.0876,2.25,0.002)

        (3)创建试样

        创建域;用模型随机命令来设置伪随机数生成器的种子,从而保证模型的可重复性。

[global domain_extent = 1.0]
model domain extent [-domain_extent] [domain_extent]
[global dmin = 0.001]

model random 10001
ball distribute box ([-domain_extent*0.7],[domain_extent*0.7])        ...
        porosity 0.36                                                 ...
        number-bins 10                                                ... 
        bin 1                                                         ...
            radius [0.5*dmin] [0.5*table.x(exptab,1)]                 ...
            volume-fraction [table.y(exptab,1)]                       ...
        bin 2                                                         ...
            radius [0.5*table.x(exptab,1)] [0.5*table.x(exptab,2)]    ...
            volume-fraction [table.y(exptab,2)-table.y(exptab,1)]     ...
        bin 3                                                         ...
            radius [0.5*table.x(exptab,2)] [0.5*table.x(exptab,3)]    ...
            volume-fraction [table.y(exptab,3)-table.y(exptab,2)]     ...
        bin 4                                                         ...
            radius [0.5*table.x(exptab,3)] [0.5*table.x(exptab,4)]    ...
            volume-fraction [table.y(exptab,4)-table.y(exptab,3)]     ...
        bin 5                                                         ...
            radius [0.5*table.x(exptab,4)] [0.5*table.x(exptab,5)]    ...
            volume-fraction [table.y(exptab,5)-table.y(exptab,4)]     ...
        bin 6                                                         ...
            radius [0.5*table.x(exptab,5)] [0.5*table.x(exptab,6)]    ...
            volume-fraction [table.y(exptab,6)-table.y(exptab,5)]     ...
        bin 7                                                         ...
            radius [0.5*table.x(exptab,6)] [0.5*table.x(exptab,7)]    ...
            volume-fraction [table.y(exptab,7)-table.y(exptab,6)]     ...
        bin 8                                                         ...
            radius [0.5*table.x(exptab,7)] [0.5*table.x(exptab,8)]    ...
            volume-fraction [table.y(exptab,8)-table.y(exptab,7)]     ...
        bin 9                                                         ...
            radius [0.5*table.x(exptab,8)] [0.5*table.x(exptab,9)]    ...
            volume-fraction [table.y(exptab,9)-table.y(exptab,8)]     ...
        bin 10                                                        ...
            radius [0.5*table.x(exptab,9)] [0.5*table.x(exptab,10)]   ...
            volume-fraction [table.y(exptab,10)-table.y(exptab,9)]

        (4)检验

        可以使用 measure create 命令创建一个测量球体,使用 bin 关键字指定用于大小分布计算的箱数。落在测量区域内的所有球都根据其直径进行分箱。计算球的累积体积百分比(介于 0 和 1 之间)作为箱大小的函数,并使用测量转储命令导出到表中。(the measure dump command.)

measure create id 1 radius [domain_extent*0.6] ...
                    bins 100 @dmin [table.x(exptab,10)] 
measure dump id 1 table 'numerical'

        名为 numeric 的表用作绘制已生成样本的大小分布的基础。可以与松香-拉姆勒曲线直接比较。如果在球分布命令中使用更多数量的箱,则数值结果将更接近此曲线。

  • 1
    点赞
  • 5
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值