# Code for modeling the slope

**URL:** <https://forum.itascainternational.com/t/code-for-modeling-the-slope/450>\
**Category:** PFC\
**Created:** [April 17, 2022, 6:36am UTC](https://forum.itascainternational.com/t/code-for-modeling-the-slope/450 "2022-04-17T06:36:12Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![syaniliffa](https://avatars.discourse-cdn.com/v4/letter/s/57b2e6/32.png) [@syaniliffa](https://forum.itascainternational.com/u/syaniliffa)\
**Post date:** [April 17, 2022, 6:36am UTC](https://forum.itascainternational.com/t/code-for-modeling-the-slope/450/1 "2022-04-17T06:36:12Z")

</div>

Dear all,

I’m trying to make a slope model, but the model doesn’t reach convergence. Is there someone who can help review the code I’m using below? Your help will mean a lot to me, thanks in advance.

model large-strain on

contact method bond gap 0.1

contact method deform emod 1.0e9 kratio 2.5

contact method pb\_deform emod 1.0e9 kratio 2.5

contact property pb\_kn 2.87e11 pb\_ks 2.87e11 pb\_ten 1.5e6 pb\_coh 12.00e6 pb\_fa 10.00  
contact property dp\_nratio 0.7  
contact property fric 1 range contact type ‘ball-ball’

ball attribute displacement multiply 0.0  
contact property lin\_force 0.0 0.0 lin\_mode 1  
ball attribute force-contact multiply 0.0 moment-contact multiply 0.0

model cycle 1  
model gravity (0,-9.8)  
model mechanical timestep scale  
model solve ratio-average 1e-4  
model mechanical timestep auto  
model calm

---

<div class="post-metadata">

**Author:** ![Mussie](https://yyz1.discourse-cdn.com/flex031/user_avatar/forum.itascainternational.com/mussie/32/360_2.png) [@Mussie](https://forum.itascainternational.com/u/Mussie)\
**Post date:** [May 6, 2022, 7:58pm UTC](https://forum.itascainternational.com/t/code-for-modeling-the-slope/450/2 "2022-05-06T19:58:35Z")

</div>

Dear syanliffa,  
which version of PFC do you use?

Is this really the whole code or just a part of it?

I cant see a command that actually creates the balls (like “ball generate” or “ball distribute”).

Maybe this example helps:  
[http://docs.itascacg.com/pfc600/pfc/pfcmodule/doc/manual/ball\_manual/ball\_commands/cmd\_ball.delete.html#ball.delete](http://docs.itascacg.com/pfc600/pfc/pfcmodule/doc/manual/ball_manual/ball_commands/cmd_ball.delete.html#ball.delete)
