Skip to main content

xslope

xslope is an open-source Python package for geotechnical slope stability and seepage analysis. It answers the question a slope engineer has to answer on every embankment, cut, dam, and levee — is this slope stable, and by how much? — with three analysis engines that share one input file:

  • Limit equilibrium (LEM) — the method of slices with seven methods: Ordinary Method of Slices, Simplified Janbu, Bishop's Simplified, Corps of Engineers, Lowe & Karafiath, Spencer, and Morgenstern–Price. Circular and non-circular surfaces, automated critical-surface search, rapid drawdown, reinforcement, seismic loading, and Monte Carlo reliability analysis.
  • Finite element seepage — saturated/unsaturated groundwater flow, steady-state or transient, on a mesh generated from the same slope geometry. It produces the pore pressure field used by the stability analyses, rather than assuming pore pressures from a piezometric line, and also serves as a standalone 2D groundwater flow solver.
  • Finite element slope stability — elastic–perfectly plastic Mohr–Coulomb analysis with the Shear Strength Reduction Method, which lets the failure mechanism emerge instead of requiring an assumed failure surface.

Problems are defined in an Excel template, which keeps the workflow accessible to practitioners while the analysis and plotting run in Python. A companion desktop application, XSLOPE Studio, provides a point-and-click interface to the same engine.

Installation

xslope requires Python 3.9 or later and is published on PyPI:

pip install xslope

That installs everything needed for limit equilibrium analysis. Optional extras add the remaining capabilities:

pip install "xslope[fem]"       # seepage and finite element analysis (adds gmsh)
pip install "xslope[gui]"       # XSLOPE Studio, the desktop application
pip install "xslope[ai]"        # Studio's AI assistant
pip install "xslope[cad]"       # DXF import/export
pip install "xslope[gui,fem,ai,cad]"  # everything

Studio is launched with the xslope-studio command. On Debian/Ubuntu Linux (including Google Colab), gmsh needs system OpenGL libraries — run apt-get install -y libgl1 libglu1-mesa before installing the fem extra.

Example

A problem is an Excel file. This example uses one of the sample problems from this repository, so download it into the current directory first:

curl -O https://raw.githubusercontent.com/njones61/xslope/main/docs/inputs/slope/xslope_simple1.xlsx

Then load it, build slices on its failure surface, solve for the factor of safety, and plot the result:

from xslope.fileio import load_slope_data
from xslope.slice import generate_slices
from xslope.solve import solve_selected
from xslope.plot import plot_solution

slope_data = load_slope_data("xslope_simple1.xlsx")

circle = slope_data['circles'][0]
success, result = generate_slices(slope_data, circle=circle, num_slices=20)
slice_df, failure_surface = result

results = solve_selected('bishop', slice_df)
print(f"FS = {results['FS']:.3f}")          # FS = 1.279

plot_solution(slope_data, slice_df, failure_surface, results)

To search for the critical surface instead of analyzing a single one:

from xslope.search import circular_search
from xslope.plot import plot_circular_search_results

fs_cache, converged, search_path, circle_cache = circular_search(slope_data, 'bishop')
print(f"minimum FS = {fs_cache[0]['FS']:.3f}")   # minimum FS = 1.215

plot_circular_search_results(slope_data, fs_cache, search_path)

More sample problems are in docs/inputs/slope/ in this repository. To start a problem from scratch instead, a blank copy of the input template ships inside the installed package, at the path returned by xslope.fileio.default_template_path().

Documentation

Full documentation — theory, input template reference, worked examples, XSLOPE Studio, and verification against published benchmarks — is at xslope.org.

Support and contributing

Questions, bug reports, and feature requests go to GitHub Issues. Contributors should start with the contributing guide, which covers the development install, coding conventions, and the test suite.

Citation

If you use xslope in published work, please cite the archived release:

Jones, N. L. (2026). xslope (Version 0.2.1) [Computer software]. https://doi.org/10.5281/zenodo.21830232

Machine-readable metadata is in CITATION.cff.

License

This project is licensed under the Apache License, Version 2.0 - see the LICENSE.txt file for details.

Copyright

Copyright 2025 Norman L. Jones

Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

xslope-0.5.1.tar.gz (2.0 MB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

xslope-0.5.1-py3-none-any.whl (2.0 MB view details)

Uploaded Python 3

File details

Details for the file xslope-0.5.1.tar.gz.

File metadata

  • Download URL: xslope-0.5.1.tar.gz
  • Upload date:
  • Size: 2.0 MB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.13.5

File hashes

Hashes for xslope-0.5.1.tar.gz
Algorithm Hash digest
SHA256 5e0627014b7c6be2f8fca51602881aec6cee06be9e98fd467735d3539d262632
MD5 eca70c58e39ea4375194d0917d803967
BLAKE2b-256 39c1bd79572bb82b59c7b6122d150fec32ea3a7cdb7aa5f94616e64bc63f3d63

See more details on using hashes here.

File details

Details for the file xslope-0.5.1-py3-none-any.whl.

File metadata

  • Download URL: xslope-0.5.1-py3-none-any.whl
  • Upload date:
  • Size: 2.0 MB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.13.5

File hashes

Hashes for xslope-0.5.1-py3-none-any.whl
Algorithm Hash digest
SHA256 d0ee6f00b5b31480399e32e6ab8a7a9a902493915a96bd69c403e9817167bfeb
MD5 ca535052617bbc6af8806d3e66430b62
BLAKE2b-256 2dd17d316d1ebbdc08f354ef8152229639c1b565cf6b3d5bf23afb94663184ad

See more details on using hashes here.

Release history Release notifications | RSS feed

0.5.2

2 files

This release

0.5.1 This release

2 files

0.5.0

2 files

0.4.1

2 files

0.4.0

2 files

0.3.0

2 files

0.2.2

2 files

0.2.1

2 files

0.2.0

2 files

0.1.58

2 files

0.1.57

2 files

0.1.56

2 files

0.1.55

2 files

0.1.54

2 files

0.1.53

2 files

0.1.52

2 files

0.1.51

2 files

0.1.50

2 files

0.1.49

2 files

0.1.48

2 files

0.1.47

1 file

0.1.45

2 files

0.1.44

2 files

0.1.43

2 files

0.1.42

2 files

0.1.41

2 files

0.1.40

2 files

0.1.39

2 files

0.1.38

2 files

0.1.37

2 files

0.1.36

2 files

0.1.35

2 files

0.1.34

2 files

0.1.33

2 files

0.1.32

2 files

0.1.31

2 files

0.1.30

2 files

0.1.29

2 files

0.1.28

2 files

0.1.27

2 files

0.1.26

2 files

0.1.25

2 files

0.1.24

2 files

0.1.23

2 files

0.1.22

2 files

0.1.21

2 files

0.1.20

2 files

0.1.19

2 files

0.1.18

2 files

0.1.17

2 files

0.1.16

2 files

0.1.15

2 files

0.1.14

2 files

0.1.13

2 files

0.1.12

2 files

0.1.11

2 files

0.1.10

2 files

0.1.9

2 files

0.1.8

2 files

0.1.7

2 files

0.1.6

2 files

0.1.5

2 files

0.1.4

2 files

0.1.3

2 files

0.1.2

2 files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page