lythosspwa 0.1.0__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- lythosspwa-0.1.0/LICENSE +21 -0
- lythosspwa-0.1.0/PKG-INFO +236 -0
- lythosspwa-0.1.0/README.md +189 -0
- lythosspwa-0.1.0/lythosspwa/__init__.py +42 -0
- lythosspwa-0.1.0/lythosspwa/__main__.py +6 -0
- lythosspwa-0.1.0/lythosspwa/analysis_engine.py +716 -0
- lythosspwa-0.1.0/lythosspwa/beam_spring.py +472 -0
- lythosspwa-0.1.0/lythosspwa/cli.py +109 -0
- lythosspwa-0.1.0/lythosspwa/config.py +570 -0
- lythosspwa-0.1.0/lythosspwa/forms.py +537 -0
- lythosspwa-0.1.0/lythosspwa/pdf.py +268 -0
- lythosspwa-0.1.0/lythosspwa/plot_style.py +58 -0
- lythosspwa-0.1.0/lythosspwa/plotting.py +316 -0
- lythosspwa-0.1.0/lythosspwa/render.py +87 -0
- lythosspwa-0.1.0/lythosspwa/report.py +603 -0
- lythosspwa-0.1.0/lythosspwa/section_database.json +249 -0
- lythosspwa-0.1.0/lythosspwa/study.py +506 -0
- lythosspwa-0.1.0/lythosspwa/study_plots.py +251 -0
- lythosspwa-0.1.0/lythosspwa/summary.py +183 -0
- lythosspwa-0.1.0/lythosspwa/web/__init__.py +4 -0
- lythosspwa-0.1.0/lythosspwa/web/server.py +198 -0
- lythosspwa-0.1.0/lythosspwa/web/session.py +343 -0
- lythosspwa-0.1.0/lythosspwa/web/static/app.js +671 -0
- lythosspwa-0.1.0/lythosspwa/web/static/index.html +116 -0
- lythosspwa-0.1.0/lythosspwa/web/static/style.css +254 -0
- lythosspwa-0.1.0/lythosspwa/web/strings.py +84 -0
- lythosspwa-0.1.0/lythosspwa.egg-info/PKG-INFO +236 -0
- lythosspwa-0.1.0/lythosspwa.egg-info/SOURCES.txt +39 -0
- lythosspwa-0.1.0/lythosspwa.egg-info/dependency_links.txt +1 -0
- lythosspwa-0.1.0/lythosspwa.egg-info/entry_points.txt +2 -0
- lythosspwa-0.1.0/lythosspwa.egg-info/requires.txt +21 -0
- lythosspwa-0.1.0/lythosspwa.egg-info/top_level.txt +1 -0
- lythosspwa-0.1.0/pyproject.toml +87 -0
- lythosspwa-0.1.0/setup.cfg +4 -0
- lythosspwa-0.1.0/tests/test_beam_spring.py +190 -0
- lythosspwa-0.1.0/tests/test_engine.py +219 -0
- lythosspwa-0.1.0/tests/test_forms.py +146 -0
- lythosspwa-0.1.0/tests/test_packaging.py +87 -0
- lythosspwa-0.1.0/tests/test_report.py +132 -0
- lythosspwa-0.1.0/tests/test_study.py +162 -0
- lythosspwa-0.1.0/tests/test_web.py +258 -0
lythosspwa-0.1.0/LICENSE
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2025 Hasan Deniz Altuntaş
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
|
@@ -0,0 +1,236 @@
|
|
|
1
|
+
Metadata-Version: 2.4
|
|
2
|
+
Name: lythosspwa
|
|
3
|
+
Version: 0.1.0
|
|
4
|
+
Summary: Sheet pile wall analysis: limit equilibrium by the free-earth support method, Winkler beam-spring analysis with staged construction and tension-only anchors, seismic earth pressures, and parametric / reliability studies with PDF reporting.
|
|
5
|
+
Author-email: Hasan Deniz Altuntaş <lythosfea@gmail.com>
|
|
6
|
+
License-Expression: MIT
|
|
7
|
+
Project-URL: Homepage, https://github.com/hdaltuntas/lythosspwa
|
|
8
|
+
Project-URL: Repository, https://github.com/hdaltuntas/lythosspwa
|
|
9
|
+
Project-URL: Issues, https://github.com/hdaltuntas/lythosspwa/issues
|
|
10
|
+
Project-URL: Releasing, https://github.com/hdaltuntas/lythosspwa/blob/main/docs/releasing.md
|
|
11
|
+
Keywords: geotechnical,sheet pile,retaining wall,quay wall,excavation,limit equilibrium,free earth support,beam spring,winkler,subgrade reaction,mononobe okabe,coulomb,earth pressure,anchor,reliability,monte carlo,civil engineering
|
|
12
|
+
Classifier: Development Status :: 4 - Beta
|
|
13
|
+
Classifier: Environment :: Web Environment
|
|
14
|
+
Classifier: Intended Audience :: Science/Research
|
|
15
|
+
Classifier: Intended Audience :: Education
|
|
16
|
+
Classifier: Natural Language :: English
|
|
17
|
+
Classifier: Natural Language :: Turkish
|
|
18
|
+
Classifier: Operating System :: OS Independent
|
|
19
|
+
Classifier: Programming Language :: Python :: 3
|
|
20
|
+
Classifier: Programming Language :: Python :: 3.10
|
|
21
|
+
Classifier: Programming Language :: Python :: 3.11
|
|
22
|
+
Classifier: Programming Language :: Python :: 3.12
|
|
23
|
+
Classifier: Programming Language :: Python :: 3.13
|
|
24
|
+
Classifier: Topic :: Scientific/Engineering
|
|
25
|
+
Classifier: Topic :: Scientific/Engineering :: Visualization
|
|
26
|
+
Requires-Python: >=3.10
|
|
27
|
+
Description-Content-Type: text/markdown
|
|
28
|
+
License-File: LICENSE
|
|
29
|
+
Requires-Dist: numpy>=1.24
|
|
30
|
+
Requires-Dist: scipy>=1.10
|
|
31
|
+
Requires-Dist: matplotlib>=3.7
|
|
32
|
+
Requires-Dist: reportlab>=4.0
|
|
33
|
+
Provides-Extra: docx
|
|
34
|
+
Requires-Dist: python-docx>=0.8; extra == "docx"
|
|
35
|
+
Provides-Extra: xlsx
|
|
36
|
+
Requires-Dist: openpyxl>=3.0; extra == "xlsx"
|
|
37
|
+
Provides-Extra: fast
|
|
38
|
+
Requires-Dist: threadpoolctl>=3.0; extra == "fast"
|
|
39
|
+
Provides-Extra: dev
|
|
40
|
+
Requires-Dist: pytest>=7.0; extra == "dev"
|
|
41
|
+
Requires-Dist: ruff>=0.4; extra == "dev"
|
|
42
|
+
Requires-Dist: build>=1.0; extra == "dev"
|
|
43
|
+
Requires-Dist: twine>=5.0; extra == "dev"
|
|
44
|
+
Requires-Dist: python-docx>=0.8; extra == "dev"
|
|
45
|
+
Requires-Dist: openpyxl>=3.0; extra == "dev"
|
|
46
|
+
Dynamic: license-file
|
|
47
|
+
|
|
48
|
+
**English** | [Türkçe](README.tr.md)
|
|
49
|
+
|
|
50
|
+
# Lythos SPWA
|
|
51
|
+
|
|
52
|
+
[](https://github.com/hdaltuntas/lythosspwa/actions/workflows/tests.yml)
|
|
53
|
+
[](https://pypi.org/project/lythosspwa/)
|
|
54
|
+
|
|
55
|
+
Sheet pile wall analysis, driven from your browser. A cantilever or multi-anchored wall
|
|
56
|
+
is analysed two ways and the two are put side by side:
|
|
57
|
+
|
|
58
|
+
1. **Limit equilibrium** — the free-earth support method with Coulomb / Mononobe-Okabe
|
|
59
|
+
earth pressures gives the *embedment depth, the anchor forces and the internal-force
|
|
60
|
+
diagrams*.
|
|
61
|
+
2. **Beam-spring (Winkler)** — the wall as a beam on elastoplastic soil springs, built in
|
|
62
|
+
stages, gives the *deflections and moments the sequence of construction actually
|
|
63
|
+
produces*, with tension-only inclined anchors.
|
|
64
|
+
|
|
65
|
+
On top of either, a **parametric or reliability study** sweeps any input — a range, or a
|
|
66
|
+
distribution — and reports sensitivities, the probability of failure with a confidence
|
|
67
|
+
interval, and the reliability index β.
|
|
68
|
+
|
|
69
|
+
The whole program — every label, result text, figure and report — is bilingual in
|
|
70
|
+
**English and Turkish**, switchable while it runs.
|
|
71
|
+
|
|
72
|
+
The interface is a small HTTP server on your own machine, driven from a browser. That
|
|
73
|
+
keeps the program usable over a remote session or inside a container, where a desktop
|
|
74
|
+
toolkit would need a display it does not have, and it costs no dependency beyond the
|
|
75
|
+
standard library.
|
|
76
|
+
|
|
77
|
+
> This is the sibling of [LythosFEA](https://github.com/hdaltuntas/lythos) and
|
|
78
|
+
> [Lythos Kinematic](https://github.com/hdaltuntas/lythoskinematic), and follows the same
|
|
79
|
+
> architecture. It began life as the desktop program **SPWA**; see [Background](#background).
|
|
80
|
+
|
|
81
|
+
## Screenshots
|
|
82
|
+
|
|
83
|
+
| Results summary | Bending moment, dark theme |
|
|
84
|
+
|---|---|
|
|
85
|
+
|  |  |
|
|
86
|
+
|
|
87
|
+
| Beam-spring (Winkler) | Reliability study |
|
|
88
|
+
|---|---|
|
|
89
|
+
|  |  |
|
|
90
|
+
|
|
91
|
+
## Install & run
|
|
92
|
+
|
|
93
|
+
```bash
|
|
94
|
+
pip install lythosspwa
|
|
95
|
+
lythos-spwa # opens the interface in your browser
|
|
96
|
+
```
|
|
97
|
+
|
|
98
|
+
From a clone, with nothing installed but the scientific stack:
|
|
99
|
+
|
|
100
|
+
```bash
|
|
101
|
+
pip install numpy scipy matplotlib reportlab
|
|
102
|
+
python main.py
|
|
103
|
+
```
|
|
104
|
+
|
|
105
|
+
Python 3.10+ is required. Word reports need `python-docx` and the spreadsheet export of a
|
|
106
|
+
study needs `openpyxl`; both are extras (`pip install "lythosspwa[docx,xlsx]"`), and the
|
|
107
|
+
interface offers those formats only when they are installed.
|
|
108
|
+
|
|
109
|
+
## Command line
|
|
110
|
+
|
|
111
|
+
```bash
|
|
112
|
+
lythos-spwa # web interface (the default)
|
|
113
|
+
lythos-spwa web --port 9000 --lang tr --no-browser
|
|
114
|
+
lythos-spwa example -o project.spwa # a starter project file
|
|
115
|
+
lythos-spwa run project.spwa -o report.pdf # analyse, print the results, write a report
|
|
116
|
+
lythos-spwa study project.spwa -o samples.csv
|
|
117
|
+
```
|
|
118
|
+
|
|
119
|
+
`run` and `study` read the same `.spwa` file the interface saves, so a case set up in the
|
|
120
|
+
browser can be re-run unattended.
|
|
121
|
+
|
|
122
|
+
## What it computes
|
|
123
|
+
|
|
124
|
+
### Limit equilibrium (free-earth support)
|
|
125
|
+
- **Earth pressures:** Coulomb (static) and Mononobe-Okabe (seismic) for a vertical wall,
|
|
126
|
+
with the cohesion term 2c√K and a tension cut-off on the active side
|
|
127
|
+
- **Embedment:** moment equilibrium about the toe (cantilever, simplified method) or about
|
|
128
|
+
the lowest anchor (free-earth); solved by root-finding, `D_design = round-up(1.2·D_req)`
|
|
129
|
+
- **Anchors:** horizontal and axial force per anchor, and the vertical component
|
|
130
|
+
- **Diagrams:** net pressure, earth and water pressures, shear, moment, rotation, deflection
|
|
131
|
+
- **Checks:** bending stress against f_y / FS, deflection against H/120, H/100 or H/240,
|
|
132
|
+
and an indicative vertical equilibrium check
|
|
133
|
+
|
|
134
|
+
### Beam-spring (Winkler)
|
|
135
|
+
- Euler-Bernoulli beam on elastoplastic springs bounded by the active and passive limits,
|
|
136
|
+
starting from at-rest (K₀ = 1 − sin φ)
|
|
137
|
+
- **Staged construction**, worked out automatically: excavate to the anchor level plus the
|
|
138
|
+
overdig, install the anchor, carry on to the final level; the springs keep their state
|
|
139
|
+
between stages
|
|
140
|
+
- **Anchors** as tension-only springs, `k_h = EA/(L_free·s)·cos²α`, with a lock-off load
|
|
141
|
+
- **Subgrade modulus** kₛ entered directly, or from Ménard-Bourdon or Schmitt (1995)
|
|
142
|
+
- Water in the excavation either as given (underwater dredging) or dewatered until the
|
|
143
|
+
final stage
|
|
144
|
+
|
|
145
|
+
### Seismic
|
|
146
|
+
- Mononobe-Okabe K_AE / K_PE, with the inertia angle θ computed from γsat/γ′ below the
|
|
147
|
+
water table (restrained pore water)
|
|
148
|
+
- Westergaard hydrodynamic pressure of the free water in front of the wall,
|
|
149
|
+
7/8·kh·γw·√(H_w·y), as a driving load
|
|
150
|
+
|
|
151
|
+
Both corrections can be switched off.
|
|
152
|
+
|
|
153
|
+
### Parametric and reliability studies
|
|
154
|
+
- **Variables:** any soil, anchor, geometry, load, seismic or factor input, as a range or
|
|
155
|
+
as a distribution (normal, lognormal, uniform; mean and CoV)
|
|
156
|
+
- **Sampling:** one-at-a-time sweep, full grid, Latin hypercube, Monte Carlo; correlated
|
|
157
|
+
inputs through the API (`Study(..., correlation={(a, b): rho})`)
|
|
158
|
+
- **Results:** Spearman rank and standardised regression sensitivities, failure
|
|
159
|
+
probability with a 95 % confidence interval and the reliability index β, tornado charts
|
|
160
|
+
- Runs in parallel with progress and cancellation; exports to CSV / XLSX and becomes
|
|
161
|
+
section 7 of the report
|
|
162
|
+
|
|
163
|
+
## Reports
|
|
164
|
+
|
|
165
|
+
Choose PDF, self-contained HTML or Word in the header and press *Export report…*. The
|
|
166
|
+
report carries the inputs (geometry, soil, anchors, section, options), the
|
|
167
|
+
limit-equilibrium results, the beam-spring results (kₛ table, stages, anchor forces,
|
|
168
|
+
checks, comparison with the LE analysis), the figures, the warnings and the method notes —
|
|
169
|
+
in whichever language the interface is in. All three formats are assembled from one place,
|
|
170
|
+
so they say the same thing.
|
|
171
|
+
|
|
172
|
+
## Project files (`.spwa`)
|
|
173
|
+
|
|
174
|
+
JSON. *Save* writes the inputs and the study definition; *Open…* reads them back. Files
|
|
175
|
+
written by SPWA v0.1 (anchor depths only, no kₛ fields) load with the defaults filled in.
|
|
176
|
+
|
|
177
|
+
## Modules
|
|
178
|
+
|
|
179
|
+
| file | content |
|
|
180
|
+
|---|---|
|
|
181
|
+
| `lythosspwa/analysis_engine.py` | Free-earth support analysis: Coulomb / Mononobe-Okabe pressures, embedment (brentq), anchor forces, diagrams at D_req, stress / deflection / vertical checks |
|
|
182
|
+
| `lythosspwa/beam_spring.py` | Winkler beam on elastoplastic springs with staged construction, tension-only inclined anchors, kₛ from Ménard-Bourdon or Schmitt |
|
|
183
|
+
| `lythosspwa/study.py`, `study_plots.py` | Parametric (OAT / grid) and reliability (LHS / Monte Carlo) studies: sampling with optional Gaussian-copula correlation, parallel runner, sensitivities, P_f with 95 % CI and β, CSV / XLSX export, figures |
|
|
184
|
+
| `lythosspwa/plotting.py`, `plot_style.py` | Matplotlib figures (schematic + diagrams, beam-spring 4-panel), theme-aware |
|
|
185
|
+
| `lythosspwa/report.py`, `pdf.py` | Calculation report: one HTML assembly, exported as PDF (reportlab), self-contained HTML or DOCX |
|
|
186
|
+
| `lythosspwa/forms.py` | Input schema and readers; converts between the interface's flat values and the engine's configuration |
|
|
187
|
+
| `lythosspwa/summary.py` | The results as summary cards and as text, for the browser and the command line alike |
|
|
188
|
+
| `lythosspwa/render.py` | Figures to PNG, off-screen (Agg) |
|
|
189
|
+
| `lythosspwa/web/` | The local HTTP server, the session that runs the analyses, and the browser interface |
|
|
190
|
+
| `lythosspwa/config.py` | Defaults, theme, plot palette, translations, section database |
|
|
191
|
+
| `lythosspwa/section_database.json` | I [m⁴/m] and W [m³/m] of sheet pile sections |
|
|
192
|
+
|
|
193
|
+
## Method notes
|
|
194
|
+
|
|
195
|
+
* LE: moment equilibrium about the toe (cantilever, simplified method) or the lowest
|
|
196
|
+
anchor (free-earth). Internal forces are evaluated at the theoretical depth D_req;
|
|
197
|
+
D_design = round-up(1.2·D_req) is the constructed length. For more than one anchor the LE
|
|
198
|
+
distribution is approximate — the beam-spring results should govern.
|
|
199
|
+
* Seismic: Mononobe-Okabe with K_AE / K_PE (vertical wall); below the water table θ uses
|
|
200
|
+
γsat/γ′ (restrained pore water); Westergaard hydrodynamic pressure of the free water in
|
|
201
|
+
front of the wall is applied as a driving load.
|
|
202
|
+
* Beam-spring: p = clip(p_ref ± kₛ·Δw, p_a, p_p) per node, at-rest start; anchors
|
|
203
|
+
T = max(0, P₀·cosα/s + k_h·Δw); moment from the element curvature (EI·w″).
|
|
204
|
+
* Vertical check (indicative): ΣT_h·tanα against the skin friction ∫(p_a + p_p)·tanδ over
|
|
205
|
+
the embedded length; no end bearing.
|
|
206
|
+
|
|
207
|
+
## Development
|
|
208
|
+
|
|
209
|
+
```bash
|
|
210
|
+
pip install -e ".[dev]"
|
|
211
|
+
pytest -q # 99 tests: engine, beam-spring, report, study, forms, web, packaging
|
|
212
|
+
ruff check .
|
|
213
|
+
```
|
|
214
|
+
|
|
215
|
+
The tests cover the analysis cores against closed-form and published cases, the report in
|
|
216
|
+
all three formats, the input schema and its file round-trips, and the interface itself —
|
|
217
|
+
the session and the HTTP layer both, so the browser is exercised without a browser.
|
|
218
|
+
|
|
219
|
+
Releasing to PyPI is described in [docs/releasing.md](docs/releasing.md);
|
|
220
|
+
`tools/upload_to_pypi.py` does it from an editor, without a terminal.
|
|
221
|
+
|
|
222
|
+
## Background
|
|
223
|
+
|
|
224
|
+
Lythos SPWA is the desktop program **SPWA** (PyQt6 + Matplotlib) rebuilt as a web
|
|
225
|
+
application: the analysis cores are the same code, while the Qt interface has been replaced
|
|
226
|
+
by a local server and a browser page, and the Qt-based PDF writer by reportlab. Nothing in
|
|
227
|
+
the program needs a display any more, it installs from PyPI in one command, and the
|
|
228
|
+
original desktop version remains at [hdaltuntas/spwa](https://github.com/hdaltuntas/spwa).
|
|
229
|
+
|
|
230
|
+
## License
|
|
231
|
+
|
|
232
|
+
[MIT](LICENSE) © 2025 Hasan Deniz Altuntaş
|
|
233
|
+
|
|
234
|
+
## Author
|
|
235
|
+
|
|
236
|
+
Hasan Deniz Altuntaş
|
|
@@ -0,0 +1,189 @@
|
|
|
1
|
+
**English** | [Türkçe](README.tr.md)
|
|
2
|
+
|
|
3
|
+
# Lythos SPWA
|
|
4
|
+
|
|
5
|
+
[](https://github.com/hdaltuntas/lythosspwa/actions/workflows/tests.yml)
|
|
6
|
+
[](https://pypi.org/project/lythosspwa/)
|
|
7
|
+
|
|
8
|
+
Sheet pile wall analysis, driven from your browser. A cantilever or multi-anchored wall
|
|
9
|
+
is analysed two ways and the two are put side by side:
|
|
10
|
+
|
|
11
|
+
1. **Limit equilibrium** — the free-earth support method with Coulomb / Mononobe-Okabe
|
|
12
|
+
earth pressures gives the *embedment depth, the anchor forces and the internal-force
|
|
13
|
+
diagrams*.
|
|
14
|
+
2. **Beam-spring (Winkler)** — the wall as a beam on elastoplastic soil springs, built in
|
|
15
|
+
stages, gives the *deflections and moments the sequence of construction actually
|
|
16
|
+
produces*, with tension-only inclined anchors.
|
|
17
|
+
|
|
18
|
+
On top of either, a **parametric or reliability study** sweeps any input — a range, or a
|
|
19
|
+
distribution — and reports sensitivities, the probability of failure with a confidence
|
|
20
|
+
interval, and the reliability index β.
|
|
21
|
+
|
|
22
|
+
The whole program — every label, result text, figure and report — is bilingual in
|
|
23
|
+
**English and Turkish**, switchable while it runs.
|
|
24
|
+
|
|
25
|
+
The interface is a small HTTP server on your own machine, driven from a browser. That
|
|
26
|
+
keeps the program usable over a remote session or inside a container, where a desktop
|
|
27
|
+
toolkit would need a display it does not have, and it costs no dependency beyond the
|
|
28
|
+
standard library.
|
|
29
|
+
|
|
30
|
+
> This is the sibling of [LythosFEA](https://github.com/hdaltuntas/lythos) and
|
|
31
|
+
> [Lythos Kinematic](https://github.com/hdaltuntas/lythoskinematic), and follows the same
|
|
32
|
+
> architecture. It began life as the desktop program **SPWA**; see [Background](#background).
|
|
33
|
+
|
|
34
|
+
## Screenshots
|
|
35
|
+
|
|
36
|
+
| Results summary | Bending moment, dark theme |
|
|
37
|
+
|---|---|
|
|
38
|
+
|  |  |
|
|
39
|
+
|
|
40
|
+
| Beam-spring (Winkler) | Reliability study |
|
|
41
|
+
|---|---|
|
|
42
|
+
|  |  |
|
|
43
|
+
|
|
44
|
+
## Install & run
|
|
45
|
+
|
|
46
|
+
```bash
|
|
47
|
+
pip install lythosspwa
|
|
48
|
+
lythos-spwa # opens the interface in your browser
|
|
49
|
+
```
|
|
50
|
+
|
|
51
|
+
From a clone, with nothing installed but the scientific stack:
|
|
52
|
+
|
|
53
|
+
```bash
|
|
54
|
+
pip install numpy scipy matplotlib reportlab
|
|
55
|
+
python main.py
|
|
56
|
+
```
|
|
57
|
+
|
|
58
|
+
Python 3.10+ is required. Word reports need `python-docx` and the spreadsheet export of a
|
|
59
|
+
study needs `openpyxl`; both are extras (`pip install "lythosspwa[docx,xlsx]"`), and the
|
|
60
|
+
interface offers those formats only when they are installed.
|
|
61
|
+
|
|
62
|
+
## Command line
|
|
63
|
+
|
|
64
|
+
```bash
|
|
65
|
+
lythos-spwa # web interface (the default)
|
|
66
|
+
lythos-spwa web --port 9000 --lang tr --no-browser
|
|
67
|
+
lythos-spwa example -o project.spwa # a starter project file
|
|
68
|
+
lythos-spwa run project.spwa -o report.pdf # analyse, print the results, write a report
|
|
69
|
+
lythos-spwa study project.spwa -o samples.csv
|
|
70
|
+
```
|
|
71
|
+
|
|
72
|
+
`run` and `study` read the same `.spwa` file the interface saves, so a case set up in the
|
|
73
|
+
browser can be re-run unattended.
|
|
74
|
+
|
|
75
|
+
## What it computes
|
|
76
|
+
|
|
77
|
+
### Limit equilibrium (free-earth support)
|
|
78
|
+
- **Earth pressures:** Coulomb (static) and Mononobe-Okabe (seismic) for a vertical wall,
|
|
79
|
+
with the cohesion term 2c√K and a tension cut-off on the active side
|
|
80
|
+
- **Embedment:** moment equilibrium about the toe (cantilever, simplified method) or about
|
|
81
|
+
the lowest anchor (free-earth); solved by root-finding, `D_design = round-up(1.2·D_req)`
|
|
82
|
+
- **Anchors:** horizontal and axial force per anchor, and the vertical component
|
|
83
|
+
- **Diagrams:** net pressure, earth and water pressures, shear, moment, rotation, deflection
|
|
84
|
+
- **Checks:** bending stress against f_y / FS, deflection against H/120, H/100 or H/240,
|
|
85
|
+
and an indicative vertical equilibrium check
|
|
86
|
+
|
|
87
|
+
### Beam-spring (Winkler)
|
|
88
|
+
- Euler-Bernoulli beam on elastoplastic springs bounded by the active and passive limits,
|
|
89
|
+
starting from at-rest (K₀ = 1 − sin φ)
|
|
90
|
+
- **Staged construction**, worked out automatically: excavate to the anchor level plus the
|
|
91
|
+
overdig, install the anchor, carry on to the final level; the springs keep their state
|
|
92
|
+
between stages
|
|
93
|
+
- **Anchors** as tension-only springs, `k_h = EA/(L_free·s)·cos²α`, with a lock-off load
|
|
94
|
+
- **Subgrade modulus** kₛ entered directly, or from Ménard-Bourdon or Schmitt (1995)
|
|
95
|
+
- Water in the excavation either as given (underwater dredging) or dewatered until the
|
|
96
|
+
final stage
|
|
97
|
+
|
|
98
|
+
### Seismic
|
|
99
|
+
- Mononobe-Okabe K_AE / K_PE, with the inertia angle θ computed from γsat/γ′ below the
|
|
100
|
+
water table (restrained pore water)
|
|
101
|
+
- Westergaard hydrodynamic pressure of the free water in front of the wall,
|
|
102
|
+
7/8·kh·γw·√(H_w·y), as a driving load
|
|
103
|
+
|
|
104
|
+
Both corrections can be switched off.
|
|
105
|
+
|
|
106
|
+
### Parametric and reliability studies
|
|
107
|
+
- **Variables:** any soil, anchor, geometry, load, seismic or factor input, as a range or
|
|
108
|
+
as a distribution (normal, lognormal, uniform; mean and CoV)
|
|
109
|
+
- **Sampling:** one-at-a-time sweep, full grid, Latin hypercube, Monte Carlo; correlated
|
|
110
|
+
inputs through the API (`Study(..., correlation={(a, b): rho})`)
|
|
111
|
+
- **Results:** Spearman rank and standardised regression sensitivities, failure
|
|
112
|
+
probability with a 95 % confidence interval and the reliability index β, tornado charts
|
|
113
|
+
- Runs in parallel with progress and cancellation; exports to CSV / XLSX and becomes
|
|
114
|
+
section 7 of the report
|
|
115
|
+
|
|
116
|
+
## Reports
|
|
117
|
+
|
|
118
|
+
Choose PDF, self-contained HTML or Word in the header and press *Export report…*. The
|
|
119
|
+
report carries the inputs (geometry, soil, anchors, section, options), the
|
|
120
|
+
limit-equilibrium results, the beam-spring results (kₛ table, stages, anchor forces,
|
|
121
|
+
checks, comparison with the LE analysis), the figures, the warnings and the method notes —
|
|
122
|
+
in whichever language the interface is in. All three formats are assembled from one place,
|
|
123
|
+
so they say the same thing.
|
|
124
|
+
|
|
125
|
+
## Project files (`.spwa`)
|
|
126
|
+
|
|
127
|
+
JSON. *Save* writes the inputs and the study definition; *Open…* reads them back. Files
|
|
128
|
+
written by SPWA v0.1 (anchor depths only, no kₛ fields) load with the defaults filled in.
|
|
129
|
+
|
|
130
|
+
## Modules
|
|
131
|
+
|
|
132
|
+
| file | content |
|
|
133
|
+
|---|---|
|
|
134
|
+
| `lythosspwa/analysis_engine.py` | Free-earth support analysis: Coulomb / Mononobe-Okabe pressures, embedment (brentq), anchor forces, diagrams at D_req, stress / deflection / vertical checks |
|
|
135
|
+
| `lythosspwa/beam_spring.py` | Winkler beam on elastoplastic springs with staged construction, tension-only inclined anchors, kₛ from Ménard-Bourdon or Schmitt |
|
|
136
|
+
| `lythosspwa/study.py`, `study_plots.py` | Parametric (OAT / grid) and reliability (LHS / Monte Carlo) studies: sampling with optional Gaussian-copula correlation, parallel runner, sensitivities, P_f with 95 % CI and β, CSV / XLSX export, figures |
|
|
137
|
+
| `lythosspwa/plotting.py`, `plot_style.py` | Matplotlib figures (schematic + diagrams, beam-spring 4-panel), theme-aware |
|
|
138
|
+
| `lythosspwa/report.py`, `pdf.py` | Calculation report: one HTML assembly, exported as PDF (reportlab), self-contained HTML or DOCX |
|
|
139
|
+
| `lythosspwa/forms.py` | Input schema and readers; converts between the interface's flat values and the engine's configuration |
|
|
140
|
+
| `lythosspwa/summary.py` | The results as summary cards and as text, for the browser and the command line alike |
|
|
141
|
+
| `lythosspwa/render.py` | Figures to PNG, off-screen (Agg) |
|
|
142
|
+
| `lythosspwa/web/` | The local HTTP server, the session that runs the analyses, and the browser interface |
|
|
143
|
+
| `lythosspwa/config.py` | Defaults, theme, plot palette, translations, section database |
|
|
144
|
+
| `lythosspwa/section_database.json` | I [m⁴/m] and W [m³/m] of sheet pile sections |
|
|
145
|
+
|
|
146
|
+
## Method notes
|
|
147
|
+
|
|
148
|
+
* LE: moment equilibrium about the toe (cantilever, simplified method) or the lowest
|
|
149
|
+
anchor (free-earth). Internal forces are evaluated at the theoretical depth D_req;
|
|
150
|
+
D_design = round-up(1.2·D_req) is the constructed length. For more than one anchor the LE
|
|
151
|
+
distribution is approximate — the beam-spring results should govern.
|
|
152
|
+
* Seismic: Mononobe-Okabe with K_AE / K_PE (vertical wall); below the water table θ uses
|
|
153
|
+
γsat/γ′ (restrained pore water); Westergaard hydrodynamic pressure of the free water in
|
|
154
|
+
front of the wall is applied as a driving load.
|
|
155
|
+
* Beam-spring: p = clip(p_ref ± kₛ·Δw, p_a, p_p) per node, at-rest start; anchors
|
|
156
|
+
T = max(0, P₀·cosα/s + k_h·Δw); moment from the element curvature (EI·w″).
|
|
157
|
+
* Vertical check (indicative): ΣT_h·tanα against the skin friction ∫(p_a + p_p)·tanδ over
|
|
158
|
+
the embedded length; no end bearing.
|
|
159
|
+
|
|
160
|
+
## Development
|
|
161
|
+
|
|
162
|
+
```bash
|
|
163
|
+
pip install -e ".[dev]"
|
|
164
|
+
pytest -q # 99 tests: engine, beam-spring, report, study, forms, web, packaging
|
|
165
|
+
ruff check .
|
|
166
|
+
```
|
|
167
|
+
|
|
168
|
+
The tests cover the analysis cores against closed-form and published cases, the report in
|
|
169
|
+
all three formats, the input schema and its file round-trips, and the interface itself —
|
|
170
|
+
the session and the HTTP layer both, so the browser is exercised without a browser.
|
|
171
|
+
|
|
172
|
+
Releasing to PyPI is described in [docs/releasing.md](docs/releasing.md);
|
|
173
|
+
`tools/upload_to_pypi.py` does it from an editor, without a terminal.
|
|
174
|
+
|
|
175
|
+
## Background
|
|
176
|
+
|
|
177
|
+
Lythos SPWA is the desktop program **SPWA** (PyQt6 + Matplotlib) rebuilt as a web
|
|
178
|
+
application: the analysis cores are the same code, while the Qt interface has been replaced
|
|
179
|
+
by a local server and a browser page, and the Qt-based PDF writer by reportlab. Nothing in
|
|
180
|
+
the program needs a display any more, it installs from PyPI in one command, and the
|
|
181
|
+
original desktop version remains at [hdaltuntas/spwa](https://github.com/hdaltuntas/spwa).
|
|
182
|
+
|
|
183
|
+
## License
|
|
184
|
+
|
|
185
|
+
[MIT](LICENSE) © 2025 Hasan Deniz Altuntaş
|
|
186
|
+
|
|
187
|
+
## Author
|
|
188
|
+
|
|
189
|
+
Hasan Deniz Altuntaş
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
"""
|
|
2
|
+
Lythos SPWA — sheet pile wall analysis, driven from a browser.
|
|
3
|
+
|
|
4
|
+
The program analyses cantilever and anchored sheet pile walls two ways and
|
|
5
|
+
compares them:
|
|
6
|
+
|
|
7
|
+
1. Limit equilibrium — free-earth support, Coulomb / Mononobe-Okabe
|
|
8
|
+
pressures, embedment by root-finding, anchor
|
|
9
|
+
forces, internal-force diagrams, design checks
|
|
10
|
+
2. Beam-spring — Winkler beam on elastoplastic soil springs with
|
|
11
|
+
automatic staged construction and tension-only
|
|
12
|
+
inclined anchors
|
|
13
|
+
|
|
14
|
+
On top of either, a parametric or reliability study sweeps any input (range,
|
|
15
|
+
or a distribution) and reports sensitivities, failure probability and the
|
|
16
|
+
reliability index.
|
|
17
|
+
|
|
18
|
+
The interface is a local web server driven from the browser (standard library
|
|
19
|
+
only), so the program also runs over a remote session or inside a container,
|
|
20
|
+
where a desktop toolkit would need a display it does not have.
|
|
21
|
+
|
|
22
|
+
Package layout
|
|
23
|
+
--------------
|
|
24
|
+
lythosspwa.config app identity, defaults, themes, translations
|
|
25
|
+
lythosspwa.analysis_engine limit-equilibrium core (free-earth support)
|
|
26
|
+
lythosspwa.beam_spring Winkler beam-spring core (staged construction)
|
|
27
|
+
lythosspwa.study parametric / reliability studies
|
|
28
|
+
lythosspwa.plotting analysis figures (schematic + diagrams)
|
|
29
|
+
lythosspwa.study_plots study figures (sweeps, scatter, histogram, tornado)
|
|
30
|
+
lythosspwa.report calculation report: HTML, PDF, DOCX
|
|
31
|
+
lythosspwa.forms input schema and readers (interface-independent)
|
|
32
|
+
lythosspwa.web local web server and the browser interface
|
|
33
|
+
|
|
34
|
+
Run it: lythos-spwa (or python -m lythosspwa)
|
|
35
|
+
"""
|
|
36
|
+
|
|
37
|
+
__version__ = "0.1.0"
|
|
38
|
+
|
|
39
|
+
APP_NAME = "Lythos SPWA"
|
|
40
|
+
ORG = "Lythos"
|
|
41
|
+
|
|
42
|
+
__all__ = ["__version__", "APP_NAME", "ORG"]
|