# Hel needed: Simulation of Direct Shear Test

**URL:** <https://forum.itascainternational.com/t/hel-needed-simulation-of-direct-shear-test/2385>\
**Category:** PFC\
**Created:** [May 11, 2026, 2:22pm UTC](https://forum.itascainternational.com/t/hel-needed-simulation-of-direct-shear-test/2385 "2026-05-11T14:22:20Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![ShivamPandey](https://avatars.discourse-cdn.com/v4/letter/s/f4b2a3/32.png) [@ShivamPandey](https://forum.itascainternational.com/u/ShivamPandey)\
**Post date:** [May 11, 2026, 2:22pm UTC](https://forum.itascainternational.com/t/hel-needed-simulation-of-direct-shear-test/2385/1 "2026-05-11T14:22:20Z")

</div>

**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](https://docs.itascacg.com/pfc600/pfc/pfcmodule/doc/manual/wall_manual/wall_commands/cmd_wall_servo.html#wall.servo)

- 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:

2. I am unsure how to correctly:

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

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

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.

 ![image](https://canada1.discourse-cdn.com/flex031/uploads/itasca/original/2X/8/83efbb1e268f4ee66a8c47cde1a5d1fa3cbb25d0.png)

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

---

<div class="post-metadata">

**Author:** ![dpotyondy](https://yyz1.discourse-cdn.com/flex031/user_avatar/forum.itascainternational.com/dpotyondy/32/1399_2.png) [@dpotyondy](https://forum.itascainternational.com/u/dpotyondy)\
**Post date:** [May 11, 2026, 4:55pm UTC](https://forum.itascainternational.com/t/hel-needed-simulation-of-direct-shear-test/2385/2 "2026-05-11T16:55:33Z")

</div>

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](https://itasca.sharefile.com/public/share/web-s2dfcc27e323047848def0c2513e0642a)

[PFC2D\_ShearBox.pdf](https://forum.itascainternational.com/uploads/short-url/a3N6RG14WuoktQq1RccsSxCjWrR.pdf) (1.2 MB)

---

<div class="post-metadata">

**Author:** ![ShivamPandey](https://avatars.discourse-cdn.com/v4/letter/s/f4b2a3/32.png) [@ShivamPandey](https://forum.itascainternational.com/u/ShivamPandey)\
**Post date:** [May 15, 2026, 1:18pm UTC](https://forum.itascainternational.com/t/hel-needed-simulation-of-direct-shear-test/2385/3 "2026-05-15T13:18:18Z")

</div>

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.

 ![image](https://canada1.discourse-cdn.com/flex031/uploads/itasca/original/2X/7/7fbcd2388272ac67307d27a678bf84db0b919af4.png)

Thankyou,

---

<div class="post-metadata">

**Author:** ![dpotyondy](https://yyz1.discourse-cdn.com/flex031/user_avatar/forum.itascainternational.com/dpotyondy/32/1399_2.png) [@dpotyondy](https://forum.itascainternational.com/u/dpotyondy)\
**Post date:** [May 15, 2026, 4:20pm UTC](https://forum.itascainternational.com/t/hel-needed-simulation-of-direct-shear-test/2385/4 "2026-05-15T16:20:52Z")

</div>

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.
