Skip to main content

English | Türkçe

Lythos Kinematic

Rock slope kinematics and stability, driven from your browser. Two steps, one workflow:

  1. Kinematic screening — the Markland test on a stereonet, pole density and a Monte Carlo probability of failure establish which failure mechanism is possible.
  2. Limit equilibrium — for the mechanism found critical, compute the factor of safety, the required support and the bolt design.

The two steps are bridged: the most critical discontinuity or intersection found during screening is written into the limit-equilibrium inputs with one click. The whole application — every label, result text, plot and PDF report — is bilingual in Turkish and English, switchable at runtime.

The interface is a small HTTP server on your own machine, driven from a browser. That keeps the program usable over a remote session or inside a container, where a desktop toolkit would need a display it does not have, and it costs no dependency beyond the standard library.

This is the sibling of LythosFEA and follows the same architecture. It merges two formerly separate desktop programs, SlopeKinematics and Kinematix; see Background.

Screenshots

Kinematic screening Bolt spacing × length matrix
Kinematic screening Bolt matrix
Probabilistic analysis Wedge analysis English interface, dark theme
Probability Wedge Dark theme

Install & run

pip install lythoskinematic
lythos-kinematic                 # opens the interface in your browser

From a clone, with nothing installed but the scientific stack:

pip install numpy scipy matplotlib reportlab
python main.py

Python 3.10+ is required.

Command line

lythos-kinematic                          # web interface (the default)
lythos-kinematic web --port 9000 --lang EN --no-browser
lythos-kinematic example -o inputs.json   # a starter input file
lythos-kinematic screen inputs.json -o screening.pdf
lythos-kinematic run inputs.json --mode wedge -o wedge.pdf

screen and run read the same JSON the interface saves, so a case set up in the browser can be re-run unattended.

What it computes

Kinematic screening

  • Kinematic tests: planar sliding, wedge sliding (Markland), flexural toppling (Goodman & Bray)
  • Stereonet: equal-area (Schmidt) lower-hemisphere projection, pole density contour (Kamb counting cone), critical zone sweep, friction / sliding limit cone
  • Monte Carlo: overall and component-wise probability of failure accounting for discontinuity orientation uncertainty; runs on a background thread, the page stays live
  • PDF report: checks, probabilities and the stereonet in one file

Limit equilibrium

  • Wedge (Swedge): tetrahedral wedge geometry, Hoek & Bray vector limit equilibrium, 3D view and stereonet
  • Planar (RocPlane): tension crack, water pressure, seismic load, 2D section
  • Toppling (RocTopple): Goodman & Bray block toppling, water + seismic + toe anchor
  • Support design: force required for a target FS, a clickable bolt spacing × length matrix, and a capacity/FS check for the design you pick
  • PDF report: project data, input tables, figures, force-balance tables

The bridge

"→ Send critical result to limit equilibrium" transfers the most critical component:

Screening mode Transferred inputs
Planar sliding plane ψp, slope face ψf, friction angle φ
Wedge Joint 1 and Joint 2 dip/dip dir, slope face dip/dip dir, φ
Toppling discontinuity dip ψd, slope face ψf, φ

Layout

main.py                    run from a clone without installing
lythoskinematic/
  cli.py                   command line (web · screen · run · example)
  i18n.py                  language switch; bilingual text helper T("tr", "en")
  forms.py                 input schema and readers — one definition per field
  stereonet.py             shared lower-hemisphere projection (no extra deps)
  render.py                figures as PNG, for the browser and the report alike
  theme.py                 plot palette
  kinematics/              screening core — independent of the interface
    engine.py              Markland criteria + Monte Carlo
    plots.py               screening stereonet
    htmlreport.py          HTML report bodies
    report.py              screening PDF report
    i18n.py                TR/EN strings
  rockslope/               limit-equilibrium core — independent of the interface
    core.py wedge.py planar.py toppling.py bolts.py report.py style.py text.py
  web/
    server.py              HTTP routes (standard library only)
    session.py             the one working session: analyses, figures, reports
    strings.py             interface text, served to the page
    static/                index.html · style.css · app.js
tests/                     pytest suite

Forms are generated from forms.py: a field's key, label, unit, range and default are written once, in Python, and the page renders whatever the server sends. There is no second copy of the labels in JavaScript and nothing to keep in step by hand — switching language simply re-fetches the schema.

Background

Lythos Kinematic began as two desktop programs, SlopeKinematics (kinematics and probability, PyQt5) and Kinematix (limit equilibrium, bolting and reporting, PySide6). Merging them required three changes worth recording:

  1. One interface. Two Qt bindings cannot share a process, and a desktop toolkit needs a display. Both interfaces were replaced by this browser-driven one, which also brought the two programs' workflows together behind a single set of inputs.
  2. mplstereonet removed. Stereonet drawing now comes from one shared implementation in stereonet.py (equal-area/equal-angle projection, great and small circles, pole density via the Kamb counting cone). Both modules plot on exactly the same geometry, and a dependency that fails to build on current Python versions is gone.
  3. One reporting path. Screening reports used to be printed through Qt; everything now goes through the same reportlab template as the limit-equilibrium report, so both modules produce the same document, and no display is needed to make a PDF.

While unifying the projection, a radius normalisation bug in the equal-area projection was fixed: horizontal lines (plunge = 0) landed at 70.7 % of the radius instead of on the primitive circle, so all data was squeezed into the inner part of the net. The fix is pinned by tests/test_stereonet.py.

Validation

pip install -e ".[dev]"
pytest

The cores are pinned against closed-form solutions:

  • wedge — matches the Hoek & Bray closed-form short solution exactly (dry 1.696 / flooded 1.065)
  • planar — c = 0, dry: tanφ/tanψp
  • toppling — Wyllie & Mah Chapter 9 example (block heights, failure modes, limit-equilibrium φ ≈ 38°)
  • kinematics — the intersection line is cross-checked against the independent vector implementation in the limit-equilibrium core; with zero uncertainty the Monte Carlo result must reduce to the deterministic 0/100 answer
  • stereonet — projection radii against the analytical Schmidt/Wulff values, poles against being perpendicular to the dip vector
  • i18n — every summary follows the language, the fixed-width label column stays aligned in both, the numbers never change, and internal keys are never translated
  • web — the schema covers every field, the session's analyses reproduce the validated results, background jobs finish without deadlocking the state poll, and the HTTP routes return PNG figures, PDF reports and plain error messages rather than stack traces

Releasing

tools/upload_to_pypi.py builds the distribution and uploads it, from a terminal or from an editor such as Thonny: run it and answer the questions. It makes its own environment for build and twine, refuses a version that is already on PyPI, and sends nothing before showing what it is about to upload. Set TEST_PYPI = True at the top to rehearse on TestPyPI.

The token is never stored in the repository: it is read from ~/.pypirc or typed in, and passed straight to twine. A project's first upload needs a token scoped to the entire account — a project-scoped token can only be created once the project exists.

License

MIT — see LICENSE.

Release files for lythoskinematic 0.1.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for lythoskinematic 0.1.0
File Size Uploaded
lythoskinematic-0.1.0.tar.gz 109.0 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for lythoskinematic 0.1.0
File Interpreter ABI Platform
lythoskinematic-0.1.0-py3-none-any.whl Python 3 none any Details

Total release size: 213.7 kB

Release files / lythoskinematic-0.1.0.tar.gz

Download URL lythoskinematic-0.1.0.tar.gz
Size 109.0 kB
Tags Source
SHA-256 checksum
How to use checksums
1318fa18baf18a5a6a7b6d794c8294595690c5e85314000e41e55ef9c7a6d2b5
BLAKE2b-256 checksum
How to use checksums
5246c1d632a93922be465f35a43b8d49f9377749a6f5fe7f0672d70d523cdbd3
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.14.4

Release files / lythoskinematic-0.1.0-py3-none-any.whl

Download URL lythoskinematic-0.1.0-py3-none-any.whl
Size 104.8 kB
Tags Python 3
SHA-256 checksum
How to use checksums
fd4329e777b13ace1a59f7260d85037e49eb6942e5c5ea46ba81695a0950b0f2
BLAKE2b-256 checksum
How to use checksums
43e58e6aeca6a77f3dc504567dcecb9cabba46366a0e7759caf1a881d8317f6b
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.14.4

Release history Release notifications | RSS feed

This release

0.1.0 This release

2 release 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