Assigning different contact properties/ - models to seperate walls in one model

Hi everyone,
I am stuck with a rather basic question.

How can I define different contact - properties - for different walls within a model and how can I define different contact - models - for different walls within a model.

I have tried to use the tutorial example " Using the CMAT" - “cmat3.dat” as a basic example to explain the issue.

Here 2 groups of balls are being created within a box where each of the groups of balls has different contact properties. I have failed to assign different contact properties for the bottom wall for this case while trying to use the same logic from the example (optional cmat slots) for the balls applied to the walls.

I have attached the commented cmat3.dat file to this tag.

As a next step I would like to change the contact model from the bottom wall in this example from Linear model to the Burgers model, unfortunately I dont have a clue on how to procede here.

I am using PFC 7 to solve this problem - any hint on this matter is very much appreciated.

Thank you very much!

Mussie
cmat3.dat (2.1 KB)

Dear Mussie,
cmat3.dat (3.4 KB)
attached you will find a modified version of your script which uses different properties or contact models for different parts of the walls.
The key when assigning different contact models to different pieces is using the matches keyword with range group.


Dear Nils,
thank you very much! Your reply is of great help for me - one additional question to the topic tough. Where can I find a definition or additional info on the “matches” keyword - Im still trying to understand the parameters 1 and 2? - Unfortunately I could find any in the documentation yet.

Cheers,
and once again thank you very much

Mussie

Dear Mussie,
the “matches” can be used in the range logic to specify the required number of object matches that needs to be met to apply the command prepending the range. You can see about it here:
Range Phrase Keyword Reference — PFC 7.0 documentation (itascacg.com)

Below you will find an example of a colleague, using PFC2D for convenience.
Commenting line 22 to 39 and using “matches 2” for line 18/19 you get the following figure:


You can see that the contact with kn = 7 is formed only between the two balls in the “mainball” group.
If we switch to “matches 1” you get the following figure.

You can see that the contact with kn = 7 is also formed between wall and the balls in the “mainball” group. Using “matches 1” is sufficient to have the ball in the correct group so that the connection between facet and ball is formed.

Another short test using just:

contact cmat add 2 model linear property kn 6 …
range group ‘mainball’ matches 1 group ‘ball1’ matches 1

Results in contacts with kn 6 between all balls in “mainball” and “ball1”

If we modify the command to

contact cmat add 2 model linear property kn 6 …
range group ‘ball1’ matches 1

We get the same contacts and additionally we get the ball+facet connection.
Using “matches 2” with the command above results in no contacts being formed.


And lastly if you rename the “rightwall” to be named “ball1” and use the same command again, we get the expected connection between the right wall and the ball1:

I hope these examples help you!

1 Like

Dear Nils,
thank you very much for the detailed explanation!

I have to admit tough that I got most of it through context but the very first part - “Commenting line 22 to 39 …”.

Which file/code are you referring to here?

Best regards,

Mussie

run.dat (1.6 KB)
Dear Mussie, sorry I forgot to attach the example. See attached.

Thank you very much Nils!

This answers all my questions.

Best regards,
Mussie

I am also surfer a similar problem when trying to model 2 layer of soil particle as well as assign each layer with it own properties. So, Can anyone suggest how to modeling such a soil layer in PFC3D version 6.0

Dear Kppairoj,
I would suggest assigning two groups of balls according to their z- coordinate (with “H” being the height of both layers) as follows:

ball group 'bottom layer' range position-z 0.0 [H/2]
ball group 'top layer' range position-z [H/2] [H]

and then assign each ball group to a set of different contact model properties like:

contact cmat add 1 model hertz                          ...
                 property hz_shear 30e9 hz_poiss 0.3    ...
                          fric 0.25                     ...
                          dp_nratio 0.2                 ...
             range group 'bottom layer' 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 'top layer' matches 2

Regards
Mussie

Dear Mussie,

Thank you for your suggestion. I still have further issue to fill the ball in each ball group.
Could you give me some example to assign the ball ?

Dear Kppairoj,
you can use the “Hopper” tutorial example where different ball groups are defined.

If you add the contact formulation as expressed in my last comment you should be able to define different propertie for the different layers. Please see the updated example below:


; fname: Hopper.dat (3D)
;=========================================================================
; excerpt-jdkv-start
model new
model large-strain on
model title 'Simple hopper discharge model'

fish define geometry
  W = 20.0
  W0 = 6.0
  Theta = 30
  H = 30.0
  A = (W-W0)*math.tan(Theta*math.pi/180)
end
[geometry]

model domain extent ([-W*1.5],[W*1.5]) ([-W*1.5],[W*1.5]) ([-H*2],[H*2])
model domain condition destroy
; excerpt-jdkv-end

; excerpt-xzvv-start
wall generate id 1 cylinder base (0.0,0.0,[A])           ...
                            height [H-A] radius [W*0.5] ...
                            cap false false one-wall
wall generate id 2 cone radius [W0*0.5] [W*0.5] height [A] cap true false 
; excerpt-xzvv-end

; excerpt-opbl-start
contact cmat default type ball-ball model linear  ...
     property kn 5e7 ks 5e7 fric 0.577 dp_nratio 0.2

contact cmat default type ball-facet model linear ...
    property kn 1e8 ks 1e8 fric 0.1 dp_nratio 0.2
; excerpt-opbl-end

; excerpt-bfck-start
model random 10001
ball distribute porosity 0.5 box ([-W*0.35],[W*0.35]) ...
                                 ([-W*0.35],[W*0.35]) ...
                                 ([A],[1.8*H]) radius 0.8 1.0
ball attribute density 1000.0 damp 0.7
; excerpt-bfck-end

; excerpt-pgnz-start
model gravity 0 0 -9.81
model cycle 1000 calm 50
model mechanical timestep scale
model solve ratio-average 1e-3
; excerpt-pgnz-end

; excerpt-hiej-start
ball delete range cylinder end-1 (0.0,0.0,0.0) ...
                           end-2 (0.0,0.0,[H])  ...
                           radius 0.0 [W*0.5] not 
ball group 'LevelOne' range position-z 0.0 [H/6]
ball group 'LevelTwo' range position-z [H/6][2*H/6]
ball group 'LevelThree' range position-z [2*H/6][3*H/6]
ball group 'LevelFour' range position-z [3*H/6][4*H/6]
ball group 'LevelFive' range position-z [4*H/6][5*H/6]
ball group 'LevelSix' range position-z [5*H/6][H*2]

; Here I have added the different contact properties
contact cmat add 1 model linear                          ...
                 property kn 5e7 ks 5e7 fric 0.1 dp_nratio 0.2 range group ... 'LevelOne' matches 2

contact cmat add 1 model linear                          ...
                 property kn 5e7 ks 5e7 fric 0.2 dp_nratio 0.2 range group ... 'LevelTwo' matches 2

contact cmat add 1 model linear                          ...
                 property kn 5e7 ks 5e7 fric 0.3 dp_nratio 0.2 range group ... 'LevelThree' matches 2

contact cmat add 1 model linear                          ...
                 property kn 5e7 ks 5e7 fric 0.4 dp_nratio 0.2 range group ... 'LevelFour' matches 2

contact cmat add 1 model linear                          ...
                 property kn 5e7 ks 5e7 fric 0.5 dp_nratio 0.2 range group ... 'LevelFive' matches 2

contact cmat add 1 model linear                          ...
                 property kn 5e7 ks 5e7 fric 0.6 dp_nratio 0.2 range group ... 'LevelSix' matches 2

wall delete range position-z 0.0 set id 2
wall generate id 200 box ([-W*1.25],[W*1.25]) ...
                         ([-W*0.25],[W*0.25]) ...
                         ([-H*1.5],0.0)
wall delete range set id 201
; excerpt-hiej-end

model save 'initial'

; excerpt-gbrq-start
fish define makeMovie(dur,inc,name)
  i = 0
  curv = inc
  dur = dur
  namefile = name
  loop while (curv <= dur)
    i = i + 1
    dist = 150.0/(i*0.01)
    if dist > 150.0
      dist = 150.0
    endif
    local fname = string.build('%1_%2.png',name,i)
    command
      model result import [i] skip-fish
      ;plot export bitmap filename [fname]
    endcommand
    curv = curv + inc
  endloop
end
; excerpt-gbrq-end

; excerpt-bhin-start
ball attribute damp 0.0
model mechanical timestep auto
model mech time-total 0.0
; excerpt-bhin-end
model results interval mechanical 0.04
wall results active on
ball results active true add-attribute velocity
model solve time 15.0
model save 'final'
;[makeMovie(15,0.04,'test')]

program return
;=========================================================================
; eof: Hopper.dat (3D)

Dear Mussie

Thank you fro your advice. I have try the coding as express below.

fish define geometry
W = 20.0
H = 30.0

end
[geometry]

model new
model domain extent (-1,25) (-6,6) (-6,30)
model domain condition destroy

wall generate box (0,24) (-5,5) (0,17)
model random 10001

ball generate id 1 5000 box (-1,25) (-6,6) (-6,30) radius 0.02

contact cmat default type ball-ball model linearpbond …
property fric 0.577 kn 1e8 ks 1e8 …
pb_kn 1e8 pb_ks 1e8 pb_ten 1e6 …
pb_coh 1e6 pb_rmul 0.8 dp_nratio 0.2

contact cmat default type ball-facet model linear …
property fric 0.09 kn 1e8 ks 1e8 …
dp_nratio 0.2

ball attribute density 1000.0 damp 0.7

ball group ‘LevelOne’ range position-z 0.0 [H/6]

ball group ‘LevelTwo’ range position-z [H/6][2*H/6]

ball group ‘LevelThree’ range position-z [2H/6][3H/6]

ball group ‘LevelFour’ range position-z [3*H/6][H]

contact cmat add 1 model hertz …

             property hz_shear 30e9 hz_poiss 0.3    ...

                      fric 0.25                     ...

                      dp_nratio 0.2                 ...

         range group 'LevelOne' matches 2

contact cmat add 1 model hertz …

             property hz_shear 70e9 hz_poiss 0.3    ...

                      fric 0.05                     ...

                      dp_nratio 0.2                 ...

         range group 'LevelTwo' matches 2

contact cmat add 1 model hertz …

             property hz_shear 30e9 hz_poiss 0.3    ...

                      fric 0.25                     ...

                      dp_nratio 0.2                 ...

         range group 'LevelThree' matches 2

contact cmat add 1 model hertz …

             property hz_shear 70e9 hz_poiss 0.3    ...

                      fric 0.05                     ...

                      dp_nratio 0.2                 ...

         range group 'LevelFour' matches 2

The program show the notice No ball avaliable in range at line express below:

ball group ‘LevelOne’ range position-z 0.0 [H/6]
ball group ‘LevelTwo’ range position-z [H/6][2H/6]
ball group ‘LevelThree’ range position-z [2
H/6][3H/6]
ball group ‘LevelFour’ range position-z [3
H/6][H]

Could you please give me a solution to solve this one ?

Dear Mussie,

Do you mind if,I ask you for your e-mail ? Because I a new comer to deal with PFCD. I may have a lot of question to ask for experience people. So, I may disturb the other in this forum.