Hel needed: Simulation of Direct Shear Test

Subject: Help required for Direct Shear Test (DST) simulation in PFC2D with moving bottom box

I am trying to simulate a Direct Shear Test (DST) in PFC2D. I have been following the built-in PFC2D direct shear example, where:

wall servo command — PFC 6.0 documentation

  • Normal stress is applied through the top wall

  • The upper shear box is moved horizontally

However, my experimental setup is different:

  • Normal loading is applied on the top plate/wall

  • The bottom shear box moves horizontally, while the top box remains fixed

I am facing difficulties modifying the example according to my experimental configuration.

My main issues are:

  1. When I try to move the lower wall/box, I get errors such as:

    • "wall2 not found"

    • or the wall reference is not recognized

  2. I am unsure how to correctly:

    • Define separate upper and lower shear boxes

    • Apply horizontal velocity only to the bottom box

    • Keep the top box fixed while maintaining normal loading

  3. I would also like guidance on how to calculate:

    • Shear load vs horizontal displacement

    • Shear stress vs displacement curve

    • Normal displacement during shearing

  4. I am using a bonded particle assembly, and I would like to know:

    • What changes are needed in wall generation or wall grouping

    • Whether I should use wall IDs, wall names, or ranges

    • The proper method for servo-controlled normal loading while the lower box moves

My current understanding is:

  • Top wall → applies vertical stress

  • Bottom box → moves in horizontal direction

  • Need to monitor reaction force and displacement during shearing

I would appreciate:

  • Example PFC2D commands/scripts

  • Suggestions on modifying the built-in DST example

  • Best practices for calculating load–displacement response in DST simulations

Thank you very much for your help.

model new
model large strain on
model title ‘Testing Bonded Particle Model’

; Set the domain extent
model domain extent -0.05 0.05 -0.1 0.1 condition destroy

contact cmat default model linear method deform emod 1.0e9 kratio 0.0
contact cmat default property dp_nratio 0.5

; create walls that extend past the edges of the sample
wall create vertices -0.03,0.0 -0.03,0.0175 id 1

wall create vertices -0.03,0.0175 0.03,0.0175 id 2

wall create vertices 0.03,0 0.03,0.0175 id 3
wall group ‘top’ range id 1 3
wall create vertices -0.03,0.0 -0.03,-0.0175 id 4

wall create vertices -0.03,-0.0175 0.03,-0.0175 id 5

wall create vertices 0.03,0 0.03,-0.0175 id 6
wall group ‘bot’ range id 4 6
wall create vertices -0.05,0.0 -0.03,0.0 id 7
wall group ‘topext’ range id 7
wall create vertices 0.03,0.0 0.05,0.0 id 8
wall group ‘botext’ range id 8
;[wp_left_top = wall.find(1)]
;[wp_right_top = wall.find(3)]
;[wp_bot = wall.find(5)]
;[wp_top = wall.find(2)]
;[wp_left_bot = wall.find(4)]
;[wp_right_bot = wall.find(6)]

model random 10001
ball distribute poros 0.35 …
resolution 0.04 …
radius 75e-6 4.75e-3 …
box -0.03 0.03 -0.0175 0.0175
ball attribute density 2500 damp 0.7
measure create id 1 rad [0.9*(math.min(0.03,0.0175))]
[porosity = measure.porosity(measure.find(1))]

; program call parallel bonded
contact cmat default model linearpbond property pb_ten 30.0e3 pb_coh 20.0e3 pb_fa 10.0 fric 0.5 kn 1e11 ks 1e7 …
method deformability emod 60e9 kratio 1 …;e10
method pb_deformability emod 60e9 kratio 1
contact model linearpbond range contact type ‘ball-ball’
contact method bond gap 0.5e-4

; excerpt-nrnz-start
; set linear stiffness
contact method deform emod 60.0e7 krat 1

; set stiffness of bond material
contact method pb_deform emod 60.0e7 krat 2.0
; excerpt-nrnz-end

; set bond strengths
contact property pb_ten 53.0e5 pb_coh 56.0e5 pb_fa 10

; set some damping at the contacts
contact property dp_nratio 0.5

; set ball-ball friction to non-zero value
contact property fric 0.718 range contact type ‘ball-ball’

; Reset ball displacement
ball attribute displacement multiply 0.0

; excerpt-eire-start
; Set linear force to 0.0 and force a reset of the linear contact forces.
contact property lin_force 0.0 0.0 lin_mode 1
ball attribute force-contact multiply 0.0 moment-contact multiply 0.0
; excerpt-eire-end
model gravity 10.0
model cycle 100 calm 10
model solve cycle 1000;ratio-average 1e-1
model mechanical time-total 0.0
model save ‘sb-init-dst’

; — activate servo on top wall to apply a target force
ball attribute displacement 0.0 0.0 damp 0.7
ball property ‘fric’ 0.5
[m=100.0] ; mass
[p=m*global.gravity()] ; force
wall servo force [p] activate on range set name ‘wall2’
model history name ‘1’ mechanical age
model history name ‘2’ mechanical ratio-average
wall history name ‘11’ displacement-x name ‘wall2’
wall history name ‘12’ displacement-y name ‘wall2’
wall history name ‘21’ force-contact-y name ‘wall2’
wall history name ‘22’ force-contact-x name ‘wall4’
wall history name ‘23’ force-contact-y name ‘wall4’
model solve cycle 1000
model save ‘sb-load-dst’

; — maintain servo on top wall but superimpose an orthogonal velocity
history purge
model mechanical time-total 0.0
ball attribute displacement 0.0 0.0
wall attribute displacement 0.0 0.0
wall attribute velocity-x 0.05 range group ‘bot’
model solve time 5.0
model save ‘sb-move-dst’
program return
return

Again, I cannot provide free support to debug your data file. You may wish to look at the PFC2D direct-shear test example that I use in the PFC & BPM Short Course. It works with PFC2D 9.6.46. I cannot provide further support for it. You can use it as is. The project can be downloaded from the link: ShareFile

PFC2D_ShearBox.pdf (1.2 MB)

Thankyou sir,

But may i know why we are getting the initial stress from 1.4e3 initially but not from Zero.

According to me the ball has not been calmed well or not reaching equilibrium as shown i figure when direct shear test is performed.

Thankyou,

From what I recall of this example, the applied load on the top is 1.4e3. That load is applied first and the model is run until we reach static equilibrium (usually with command: model solve ratio-average 1e-5). Then one of the pieces is moved laterally.