Metadata-Version: 2.4
Name: slipsurface.wall
Version: 0.1.0
Summary: Cantilever reinforced concrete retaining walls: earth pressure by Rankine, Coulomb, at rest and the trial wedge; sliding, overturning, eccentricity, bearing capacity by Terzaghi, Meyerhof, Hansen, Vesić and EN 1997-1; global stability by Bishop and Fellenius; the earthquake of TBDY 2018; the reinforced concrete design of TS 500 with the bars, the reinforcement drawing (DXF) and the bar bending schedule, with PDF reporting.
Author-email: Hasan Deniz Altuntaş <slipsurface@proton.me>
License-Expression: AGPL-3.0-only
Project-URL: Homepage, https://slipsurface.dev/
Project-URL: Documentation, https://slipsurface.dev/wall/
Project-URL: Repository, https://github.com/hdaltuntas/slipsurface.wall
Project-URL: Issues, https://github.com/hdaltuntas/slipsurface.wall/issues
Project-URL: Releasing, https://github.com/hdaltuntas/slipsurface.wall/blob/main/docs/releasing.md
Keywords: geotechnical,retaining wall,cantilever wall,reinforced concrete,earth pressure,bearing capacity,slope stability,bishop,tbdy 2018,ts 500,reinforcement,dxf,civil engineering
Classifier: Development Status :: 4 - Beta
Classifier: Environment :: Web Environment
Classifier: Intended Audience :: Science/Research
Classifier: Intended Audience :: Education
Classifier: Natural Language :: English
Classifier: Natural Language :: Turkish
Classifier: Operating System :: OS Independent
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Classifier: Programming Language :: Python :: 3.13
Classifier: Topic :: Scientific/Engineering
Classifier: Topic :: Scientific/Engineering :: Visualization
Requires-Python: >=3.10
Description-Content-Type: text/markdown
License-File: LICENSE
Requires-Dist: numpy>=1.24
Requires-Dist: matplotlib>=3.7
Requires-Dist: reportlab>=4.0
Provides-Extra: docx
Requires-Dist: python-docx>=0.8; extra == "docx"
Provides-Extra: dev
Requires-Dist: pytest>=7.0; extra == "dev"
Requires-Dist: ruff>=0.4; extra == "dev"
Requires-Dist: build>=1.0; extra == "dev"
Requires-Dist: twine>=5.0; extra == "dev"
Requires-Dist: python-docx>=0.8; extra == "dev"
Dynamic: license-file

**English** | [Türkçe](https://github.com/hdaltuntas/slipsurface.wall/blob/main/README.tr.md)

# SlipSurface Wall

[![Tests](https://github.com/hdaltuntas/slipsurface.wall/actions/workflows/tests.yml/badge.svg)](https://github.com/hdaltuntas/slipsurface.wall/actions/workflows/tests.yml)

**Documentation and examples:** [slipsurface.dev/wall](https://slipsurface.dev/wall/)

Cantilever reinforced concrete retaining walls, driven from your browser. An inverted-T wall —
a stem, a footing with a toe and a heel, an optional shear key, the backfill behind it and the
foundation soil under it — is analysed, checked and **designed down to the bars**:

1. **Earth pressure, by every method** — Rankine (with a sloping backfill and the cohesion of
   the backfill), Coulomb (wall friction δ), at rest (Jáky / EN 1997-1, with OCR and slope) and
   a numerical **trial wedge**, on the virtual back through the heel, side by side; the chosen
   one drives the checks. Passive resistance in front by Rankine or Coulomb. Water behind and
   in front of the wall, uplift, permanent and live surcharges, loads at the top of the stem.
2. **Stability** — sliding (base friction, adhesion, passive, **shear key**), overturning about
   the toe, eccentricity, the contact pressure under the base (trapezoid or triangle) and an
   **allowable soil pressure** from the geotechnical report.
3. **Bearing capacity** under Meyerhof's effective width B′ = B − 2e, by the factor sets of
   **Terzaghi, Meyerhof, Brinch Hansen, Vesić and EN 1997-1** side by side, with load
   inclination, embedment, depth factors, the water table and a slope in front.
4. **Global stability** — slip circles passing under the wall by **Bishop's simplified
   method** and **Fellenius'**, with a refined grid search, static and seismic.
5. **Earthquake by TBDY 2018** — the site coefficients Fs and F1 (Tables 2.1, 2.2) of the site
   classes ZA–ZE, SDS and SD1, the design spectrum, **kh = βr·0.4·SDS** (§16.12) and kv acting
   up and down; the dynamic thrust by **Mononobe–Okabe**, **Seed–Whitman** or **Wood**, the
   inertia of the wall and of the soil on its heel; the TBDY §16.7 resistance factors for
   sliding (γRh = 1.1) and bearing (γRv = 1.4).
6. **Reinforced concrete by TS 500** — the load combinations of TS 500 (1.4G + 1.6Q + 1.6H,
   0.9G + 1.6H) and TBDY 2018 (G + Q + H + E, 0.9G + H + E, kv ±); the moment and shear of the
   **stem, the toe, the heel and the key**; the tension steel from the stress block, ρmin and
   ρmax, the shear the concrete carries (Vcr), the **bars and their spacing**, the distribution
   steel, the **curtailment** of half the stem bars, the development lengths.
7. **Drawing and schedule** — the **reinforcement drawing** of the section (bars by position,
   labels, dimensions, title block) as a figure and as an **AutoCAD DXF**; the **bar bending
   schedule** with every shape, length, number and mass; concrete and steel quantities.
8. **The heel the wall needs** — the shortest heel that satisfies every stability check, static
   and seismic; and a **Suggest dimensions** button with the textbook first guess from H.

The whole program — every label, result text, figure, drawing and report — is bilingual in
**English and Turkish**, switchable while it runs.

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 [SlipSurface MSEW](https://github.com/hdaltuntas/slipsurface.msew),
> [SlipSurface Bearing](https://github.com/hdaltuntas/slipsurface.bearing),
> [SlipSurface Pile](https://github.com/hdaltuntas/slipsurface.pile),
> [SlipSurface Rock](https://github.com/hdaltuntas/slipsurface.rock),
> [SlipSurface Settle](https://github.com/hdaltuntas/slipsurface.settle) and
> [SlipSurface FEA](https://github.com/hdaltuntas/slipsurface.2d), and follows the same architecture,
> theme and fonts. Its bearing capacity factors are SlipSurface Bearing's.

## Screenshots

| Results summary | Member design and the drawing |
|---|---|
| ![Summary](https://raw.githubusercontent.com/hdaltuntas/slipsurface.wall/main/screenshots/wall_summary.png) | ![Design](https://raw.githubusercontent.com/hdaltuntas/slipsurface.wall/main/screenshots/wall_design.png) |

| Earthquake, dark theme, Turkish | Reinforcement drawing, Turkish |
|---|---|
| ![Seismic](https://raw.githubusercontent.com/hdaltuntas/slipsurface.wall/main/screenshots/wall_summary_dark_tr.png) | ![Drawing](https://raw.githubusercontent.com/hdaltuntas/slipsurface.wall/main/screenshots/wall_reinforcement_dark_tr.png) |

| Reinforcement drawing | Bar bending schedule |
|---|---|
| ![Reinforcement](https://raw.githubusercontent.com/hdaltuntas/slipsurface.wall/main/screenshots/wall_reinforcement.png) | ![Schedule](https://raw.githubusercontent.com/hdaltuntas/slipsurface.wall/main/screenshots/wall_schedule.png) |

| Stem: moment, shear and capacity | Global stability |
|---|---|
| ![Stem](https://raw.githubusercontent.com/hdaltuntas/slipsurface.wall/main/screenshots/wall_stem.png) | ![Global](https://raw.githubusercontent.com/hdaltuntas/slipsurface.wall/main/screenshots/wall_global.png) |

## Install & run

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

```bash
pip install numpy matplotlib reportlab
python main.py
```

or install the clone itself with `pip install .` (Word reports need `python-docx`:
`pip install ".[docx]"`). Python 3.10+ is required. `main.py` puts its own directory first on
the import path, so the clone's code is what runs even when `slipsurface-wall` is also installed.

## Command line

```bash
slipsurface-wall                                   # web interface (the default)
slipsurface-wall web --port 9000 --lang tr --no-browser
slipsurface-wall example -o project.lwall          # a starter project file
slipsurface-wall run project.lwall -o report.pdf --dxf wall.dxf --lang tr
```

`run` reads the same `.lwall` file the interface saves, so a wall set up in the browser can be
re-run unattended; it prints the results, and writes the report and the drawing if asked. The
interface listens on port 8785 by default.

## Inputs

* **Geometry:** height H (underside of the footing to the top of the stem), stem thickness at
  the top and at the base, which face is inclined, toe, heel, footing thickness, soil over the
  toe, backslope β, slope of the ground in front.
* **Shear key:** depth, width, distance from the front of the footing.
* **Loads:** permanent and live uniform surcharges on the backfill, a vertical line load on
  the stem, a horizontal load at its top.
* **Soils:** the backfill (γ, γsat, φ′, c′) and the foundation soil (γ, γsat, φ′, c′ — or
  φ = 0 and cu), which the soil in front of the wall is also taken to be.
* **Water:** behind the wall and in front of it (above the base), or a water table below it.
* **Earth pressure:** the method (Rankine, Coulomb, at rest, trial wedge), δ/φ, OCR; the
  passive resistance in front, its method and the share of it counted.
* **Stability and bearing:** base friction δb/φ and adhesion ca/c, the bearing capacity
  factors, embedment, load inclination and depth factors, an allowable pressure, the slip
  circle search; the required factors of safety, static and seismic.
* **Earthquake (TBDY 2018):** Ss and S1 from the AFAD map, the site class, the displacement
  the wall may accept (βr), or kh given directly; kv/kh, the dynamic thrust method and the
  height it acts at, the share of the live load.
* **Reinforced concrete:** concrete class (C20–C50), steel (B420C, B500C), unit weight of
  concrete, clear covers, the main bars of the stem and of the footing (or let the program
  choose), ρmin, the minimum of the front face and of the distribution steel, curtailment.

## What it computes

| quantity | method |
|---|---|
| Ka | Rankine cos β·(cos β − √(cos²β − cos²φ))/(cos β + √…) at β; Coulomb (δ, β); K0 = (1 − sin φ)·√OCR·(1 + sin β); the trial wedge by trial planes through the heel |
| forces | the wall, the soil on the heel and the toe (saturated below the water), the thrust on the virtual back (soil, surcharges, water), uplift, loads at the top |
| sliding | V·tan(δb) + ca·B + share·Pp (Pp down to the bottom of the key) against ΣH; the live load on the heel left out |
| overturning, eccentricity | moments about the toe; e ≤ B/6 static, B/3 seismic (as entered) |
| base pressure | V/B·(1 ± 6e/B), or 2V/(3·(B/2 − e)) beyond the middle third |
| bearing | B′ = B − 2e, σv = ΣV/B′ against q_ult by Terzaghi, Meyerhof, Hansen, Vesić, EN 1997-1 |
| global | slip circles under the footing and the key; Bishop's simplified and Fellenius' methods; kh on every slice in an earthquake |
| TBDY 2018 | Fs, F1 interpolated; SDS = Ss·Fs, SD1 = S1·F1; Sae(T); kh = βr·0.4·SDS, kv = ratio·kh up and down |
| dynamic thrust | Mononobe–Okabe ΔP = (1 − kv)·KAE·(½γh² + q·h) − Ka·(…), Seed–Whitman ΔKAE = ¾·kh, Wood ΔP = kh·γ·h²; at the chosen share of h; inertia kh·W of the wall and the soil on the heel |
| members | TS 500 and TBDY 2018 combinations; the stem under its own vertical back, the toe and the heel under the contact pressure; envelopes |
| sections | As from 0.85·fcd over k1·c; ρmin·b·h ≤ As; ρ ≤ min(0.85·ρb, 0.02); Vd ≤ Vcr = 0.65·fctd·b·d; s ≤ min(1.5h, 200 mm), 300 mm for distribution; lb = 0.12·fyd/fctd·φ ≥ 20φ |
| curtailment | half the stem bars stop where Mr of the other half suffices, extended by max(d, 12φ), never below lb |
| required heel | bisection on the heel until every stability and bearing check holds, static and seismic |

The expressions, their sources and their limits are in
[docs/theory.md](https://github.com/hdaltuntas/slipsurface.wall/blob/main/docs/theory.md).

## Figures

Section to scale with the soils, water, surcharges, the virtual back, the forces and the base
pressure · the pressures on the virtual back (soil, surcharges, water, dynamic increment,
passive) · earth pressure by method · every stability check as a margin, static and seismic ·
bearing capacity by method · the critical slip circle · the stem's moment and shear with the
capacity of its bars · the base pressure and the toe and heel moments per combination · the
**reinforcement drawing** · the **bar bending schedule** · the TBDY 2018 design spectrum.

## Reports and drawings

Choose PDF, self-contained HTML or Word in the header and press *Export report…*. The report
carries the inputs, the earth pressure by every method, the forces and their moments, the
stability checks, the bearing capacity by every method and the factors of the chosen one, the
slip circles, the earthquake parameters and forces, the design of every section, the
curtailment and the anchorage, the bar bending schedule and the quantities, the heel the wall
needs, the figures, the warnings and the method notes — in whichever language the interface is
in. *Drawing (DXF)* downloads the reinforcement drawing as an AutoCAD R12 DXF in millimetres
(layers CONCRETE, REBAR, REBAR_DIST, DIMENSION, TEXT, GROUND, LEADER).

## Project files (`.lwall`)

JSON. *Save* writes every input; *Open…* reads them back. Missing entries keep their defaults.

## Modules

| file | content |
|---|---|
| `slipsurface/wall/earth.py` | Rankine, Coulomb, K0, the trial wedge, Mononobe–Okabe (active and passive), Seed–Whitman, Wood |
| `slipsurface/wall/tbdy.py` | TBDY 2018 site coefficients, the design spectrum, kh and kv |
| `slipsurface/wall/factors.py`, `capacity.py` | Bearing capacity factors and the general equation (from SlipSurface Bearing) |
| `slipsurface/wall/concrete.py` | TS 500 materials, flexure, shear, development length, the choice of bars |
| `slipsurface/wall/geometry.py` | The wall's outline, areas, centroids, clipping at the water table |
| `slipsurface/wall/engine.py` | The wall: pressures, forces, stability, bearing, earthquake, required heel, first dimensions |
| `slipsurface/wall/globalstab.py` | Slip circles by Bishop and Fellenius, the grid search |
| `slipsurface/wall/design.py` | Member forces, the sections, the curtailment, the bars, the schedule, the quantities |
| `slipsurface/wall/drawing.py` | The reinforcement drawing as primitives, and its DXF |
| `slipsurface/wall/plotting.py`, `plot_style.py`, `render.py` | Matplotlib figures, theme-aware, off-screen |
| `slipsurface/wall/report.py`, `pdf.py` | Calculation report: one HTML assembly, exported as PDF, HTML or DOCX |
| `slipsurface/wall/forms.py` | Input schema and readers, with the conditions under which each field applies |
| `slipsurface/wall/summary.py` | The results as cards, tables and text, for the browser and the command line alike |
| `slipsurface/wall/i18n.py` | Every text, English and Turkish, written side by side |
| `slipsurface/wall/web/` | The local HTTP server, the session, and the browser interface |

## Development

```bash
pip install -e ".[dev]"
pytest -q                 # earth pressure, TBDY, TS 500, the wall by hand, design, drawing, report, web, packaging
ruff check .
```

The tests check the earth pressure coefficients against their closed forms and published
values (the trial wedge against Coulomb, Mononobe–Okabe against Coulomb at kh = 0 and a hand
value), the TBDY coefficients and spectrum, the TS 500 strengths, steel, shear and anchorage
against hand calculations, the weights, the thrust, sliding, overturning, base pressure and
bearing of the wall by hand, the seismic increment of each method, the required heel as a
boundary, the slip circles, the stem, toe and heel moments by hand, the bars (inside the
concrete, enough steel, the curtailment), the schedule and the quantities, the DXF, the report
in all three formats, the input schema and its round trips, both languages, and the interface
itself — the session and the HTTP layer both.

Not included: settlement, the drainage of the backfill, the hydrodynamic pressure of free
water in an earthquake, and the joints and laps along the wall; check them separately.

Releasing to PyPI is described in [docs/releasing.md](https://github.com/hdaltuntas/slipsurface.wall/blob/main/docs/releasing.md).

## Independent project

SlipSurface is an independent open-source project for geotechnical and rock engineering, developed by
Hasan Deniz Altuntaş. It is not affiliated with, endorsed by, or connected to any other company or
product using a similar name.

## License

Copyright © 2026 Hasan Deniz Altuntaş

SlipSurface Wall is free software: you can redistribute it and/or modify it under the terms of the
[GNU Affero General Public License, version 3](https://github.com/hdaltuntas/slipsurface.wall/blob/main/LICENSE) as published by the Free Software
Foundation. It is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY;
without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

Whoever runs a modified version for users over a network must offer them the source of that
version (section 13 of the licence).
