A self-contained Python desktop application (Tkinter GUI) that computes the Factor of Safety (FoS) of a layered soil slope using four classic limit-equilibrium methods of slices:
- Morgenstern–Price (rigorous — force + moment equilibrium, half-sine interslice function)
- Spencer (rigorous — force + moment equilibrium, constant interslice function)
- Bishop Simplified (moment equilibrium)
- Janbu Simplified (force equilibrium + f₀ correction)
It was built to reproduce and extend the slope-stability analysis in Santo et al. (2023) for the Rangamati hill tracts, Bangladesh, and is verified against analytical solutions and published benchmarks to within ~1%.
Bishop Simplified — critical slip surface for each slope angle (30/45/60/75°) plus the combined Factor-of-Safety-vs-angle trend.
- Four methods of slices built on the General Limit Equilibrium (GLE) framework of Fredlund & Krahn (1977); Ordinary/Fellenius included for verification.
- Critical surface search — automatic two-stage grid search for the minimum-FoS circular slip surface.
- Layered soil (3 layers), optional water table, effective-stress Mohr–Coulomb strength.
- Multiple slope angles at once (e.g.
30, 45, 60, 75) → a cross-section panel per angle plus a combined FoS vs angle curve. - Compare ALL methods → one line per angle across the four methods.
- Compare LOCATIONS → one line per location, for any chosen method.
- Soil presets from the source paper (Locations 1–3) and save your own
presets (persisted to
user_presets.json). - Accuracy readouts — Spencer/M-P report the force–moment residual
|Fm − Ff|; comparisons report the cross-method spread. - Save any graph as PNG / PDF / SVG.
- Built-in Verification & References window.
Requires Python 3.9+. Tkinter ships with standard CPython.
pip install -r requirements.txt(requirements.txt = numpy, matplotlib.)
python slope_stability.py- Enter the slope height, one or more slope angles, optional water-table elevation, layer boundary elevations, and the soil table (or pick a Preset).
- Click a method button (Morgenstern-Price / Spencer / Bishop / Janbu) or Compare ALL methods / Compare LOCATIONS.
- Read the FoS and verdict, inspect the graph, and Save Graph….
Crest/toe ground extent and slice discretization are handled automatically (model scaffolding that does not affect the result).
| Compare ALL methods (one line per angle) | Compare LOCATIONS (one line per location) |
|---|---|
![]() |
![]() |
All figures are reproducible with python docs/make_screenshots.py.
Run the verification suite (17 sample cases, 3 tiers):
python verify.py| Tier | Check | Result |
|---|---|---|
| A | Closed-form analytical (φ = 0) | ≤ 0.11 % error |
| B | Published benchmark slopes | mean ~0.72 % error |
| C | Cross-method agreement (Fredlund & Krahn 1977) | spread ≤ 0.74 % |
Full details and the reference list are in
VERIFICATION.md. The governing equations are documented in
EQUATIONS.md / EQUATIONS.pdf.
| File | Purpose |
|---|---|
slope_stability.py |
The GUI application + method-of-slices engine |
verify.py |
Verification suite (analytical + benchmark + cross-method) |
EQUATIONS.md / EQUATIONS.pdf |
Governing equations for each method |
make_equations_pdf.py |
Regenerates EQUATIONS.pdf |
VERIFICATION.md |
Verification results + full reference list |
requirements.txt |
Python dependencies |
All methods solve the same base-normal-force equation; Bishop satisfies
moment equilibrium only, Janbu satisfies force equilibrium with an empirical
correction, while Spencer and Morgenstern–Price satisfy both force and
moment equilibrium, differing in the interslice force function f(x)
(constant vs. half-sine). See EQUATIONS.md.
- Bishop (1955), Géotechnique 5(1) — Bishop Simplified
- Janbu (1973), Embankment-Dam Engineering — Janbu Simplified
- Spencer (1967), Géotechnique 17(1) — Spencer
- Morgenstern & Price (1965), Géotechnique 15(1) — Morgenstern–Price
- Fredlund & Krahn (1977), Can. Geotech. J. 14(3) — GLE framework
- Santo et al. (2023), J. Studies in Science and Engineering 3(2), 61–72 — application/source paper
Full list with DOIs in VERIFICATION.md.
Released under the MIT License — see LICENSE.
This tool is for research and educational use. Verify all results independently before relying on them for engineering design decisions.


