ebbef2p-python 0.0.3.dev0__tar.gz → 1.0.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.
- ebbef2p_python-1.0.0/.gitignore +27 -0
- ebbef2p_python-1.0.0/CHANGELOG.md +121 -0
- ebbef2p_python-1.0.0/CITATION.cff +29 -0
- ebbef2p_python-1.0.0/LICENSE +21 -0
- ebbef2p_python-1.0.0/PKG-INFO +126 -0
- ebbef2p_python-1.0.0/README.md +95 -0
- ebbef2p_python-1.0.0/docs/source/conf.py +56 -0
- ebbef2p_python-1.0.0/docs/source/ebbef2p.rst +59 -0
- ebbef2p_python-1.0.0/docs/source/index.rst +42 -0
- ebbef2p_python-1.0.0/docs/source/modules.rst +7 -0
- ebbef2p_python-1.0.0/docs/source/theory/fe_modeling.rst +161 -0
- ebbef2p_python-1.0.0/docs/source/theory/index.rst +27 -0
- ebbef2p_python-1.0.0/docs/source/theory/verification.rst +65 -0
- ebbef2p_python-1.0.0/docs/source/theory/vlasov.rst +95 -0
- ebbef2p_python-1.0.0/docs/source/user_guide/conventions.rst +37 -0
- ebbef2p_python-1.0.0/docs/source/user_guide/examples.rst +33 -0
- ebbef2p_python-1.0.0/docs/source/user_guide/getting_started.rst +97 -0
- ebbef2p_python-1.0.0/docs/source/user_guide/installation.rst +46 -0
- ebbef2p_python-1.0.0/examples/modified_vlasov.py +24 -0
- ebbef2p_python-1.0.0/examples/variable_foundation.py +35 -0
- ebbef2p_python-1.0.0/examples/winkler_long_beam.py +21 -0
- ebbef2p_python-1.0.0/pyproject.toml +85 -0
- ebbef2p_python-1.0.0/src/ebbef2p/__init__.py +24 -0
- ebbef2p_python-1.0.0/src/ebbef2p/elements.py +117 -0
- ebbef2p_python-1.0.0/src/ebbef2p/exceptions.py +23 -0
- ebbef2p_python-1.0.0/src/ebbef2p/mesh.py +116 -0
- ebbef2p_python-1.0.0/src/ebbef2p/model.py +189 -0
- ebbef2p_python-1.0.0/src/ebbef2p/plotting.py +36 -0
- ebbef2p_python-1.0.0/src/ebbef2p/results.py +215 -0
- ebbef2p_python-1.0.0/src/ebbef2p/solver.py +130 -0
- ebbef2p_python-1.0.0/src/ebbef2p/vlasov.py +177 -0
- ebbef2p_python-1.0.0/tests/unit/test_elements.py +44 -0
- ebbef2p_python-1.0.0/tests/unit/test_examples.py +14 -0
- ebbef2p_python-1.0.0/tests/unit/test_model.py +89 -0
- ebbef2p_python-1.0.0/tests/unit/test_plotting.py +21 -0
- ebbef2p_python-1.0.0/tests/unit/test_results.py +62 -0
- ebbef2p_python-1.0.0/tests/verification/test_classical_beams.py +64 -0
- ebbef2p_python-1.0.0/tests/verification/test_element_matrices.py +48 -0
- ebbef2p_python-1.0.0/tests/verification/test_equilibrium.py +43 -0
- ebbef2p_python-1.0.0/tests/verification/test_hetenyi.py +17 -0
- ebbef2p_python-1.0.0/tests/verification/test_razaqpur_shah.py +60 -0
- ebbef2p_python-1.0.0/tests/verification/test_vallabhan_das.py +54 -0
- ebbef2p_python-1.0.0/tests/verification/test_vlasov_parameters.py +55 -0
- ebbef2p-python-0.0.3.dev0/PKG-INFO +0 -36
- ebbef2p-python-0.0.3.dev0/README.md +0 -14
- ebbef2p-python-0.0.3.dev0/ebbef2p/__init__.py +0 -2
- ebbef2p-python-0.0.3.dev0/ebbef2p/beam.py +0 -36
- ebbef2p-python-0.0.3.dev0/ebbef2p/distributed_load.py +0 -16
- ebbef2p-python-0.0.3.dev0/ebbef2p/elastic_foundation.py +0 -33
- ebbef2p-python-0.0.3.dev0/ebbef2p/element.py +0 -76
- ebbef2p-python-0.0.3.dev0/ebbef2p/helpers.py +0 -15
- ebbef2p-python-0.0.3.dev0/ebbef2p/nodal_load.py +0 -5
- ebbef2p-python-0.0.3.dev0/ebbef2p/nodal_support.py +0 -7
- ebbef2p-python-0.0.3.dev0/ebbef2p/structure.py +0 -338
- ebbef2p-python-0.0.3.dev0/ebbef2p/vlasov_foundation_parameters.py +0 -60
- ebbef2p-python-0.0.3.dev0/ebbef2p_python.egg-info/PKG-INFO +0 -36
- ebbef2p-python-0.0.3.dev0/ebbef2p_python.egg-info/SOURCES.txt +0 -22
- ebbef2p-python-0.0.3.dev0/ebbef2p_python.egg-info/dependency_links.txt +0 -1
- ebbef2p-python-0.0.3.dev0/ebbef2p_python.egg-info/requires.txt +0 -2
- ebbef2p-python-0.0.3.dev0/ebbef2p_python.egg-info/top_level.txt +0 -2
- ebbef2p-python-0.0.3.dev0/setup.cfg +0 -4
- ebbef2p-python-0.0.3.dev0/setup.py +0 -38
- ebbef2p-python-0.0.3.dev0/tests/test_beam_on_two_parameter_elastic_foundation.py +0 -54
- ebbef2p-python-0.0.3.dev0/tests/test_elastic_foundation_parameters.py +0 -74
- ebbef2p-python-0.0.3.dev0/tests/test_long_beam_on_winkler_foundation.py +0 -28
- ebbef2p-python-0.0.3.dev0/tests/test_simple supported_beam.py +0 -53
- /ebbef2p-python-0.0.3.dev0/tests/__init__.py → /ebbef2p_python-1.0.0/src/ebbef2p/py.typed +0 -0
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
# Python
|
|
2
|
+
__pycache__/
|
|
3
|
+
*.py[cod]
|
|
4
|
+
*.egg-info/
|
|
5
|
+
build/
|
|
6
|
+
dist/
|
|
7
|
+
|
|
8
|
+
# Environments
|
|
9
|
+
.venv/
|
|
10
|
+
env/
|
|
11
|
+
|
|
12
|
+
# Tools
|
|
13
|
+
.pytest_cache/
|
|
14
|
+
.ruff_cache/
|
|
15
|
+
.coverage
|
|
16
|
+
coverage.xml
|
|
17
|
+
htmlcov/
|
|
18
|
+
|
|
19
|
+
# Docs
|
|
20
|
+
docs/build/
|
|
21
|
+
|
|
22
|
+
# OS
|
|
23
|
+
.DS_Store
|
|
24
|
+
|
|
25
|
+
# Session hand-off notes (kept local)
|
|
26
|
+
HANDOFF*.md
|
|
27
|
+
*.bundle
|
|
@@ -0,0 +1,121 @@
|
|
|
1
|
+
# Changelog
|
|
2
|
+
|
|
3
|
+
All notable changes to this project are documented here. The format follows
|
|
4
|
+
[Keep a Changelog](https://keepachangelog.com/en/1.1.0/) and the project uses
|
|
5
|
+
[semantic versioning](https://semver.org/).
|
|
6
|
+
|
|
7
|
+
## [Unreleased]
|
|
8
|
+
|
|
9
|
+
## [1.0.0] - 2026-10-26
|
|
10
|
+
|
|
11
|
+
A rewrite with a new API. Code written for 0.0.x does not run unchanged;
|
|
12
|
+
see *Migrating from 0.0.x* below.
|
|
13
|
+
|
|
14
|
+
### Added
|
|
15
|
+
|
|
16
|
+
- `Model` with chainable builders (`add_beam`, `add_foundation`,
|
|
17
|
+
`add_point_load`, `add_distributed_load`, `add_support`) and validation of
|
|
18
|
+
the input when it is added and before solving.
|
|
19
|
+
- Both foundation parameters may vary linearly along every segment;
|
|
20
|
+
overlapping segments add up, so jumps in `k` and `g` are allowed.
|
|
21
|
+
- `Model(soil_beyond_ends=True)`: the foundation continues beyond the beam
|
|
22
|
+
ends, represented by equivalent springs `sqrt(k*g)`.
|
|
23
|
+
- `Solution` with nodal `w` and `theta`, `deflection(x)` from the Hermite
|
|
24
|
+
interpolation, `bending_moment()` and `shear_force()` from element
|
|
25
|
+
equilibrium (values on both sides of every node, so jumps are kept),
|
|
26
|
+
`reactive_pressure()` including the concentrated forces of the shear
|
|
27
|
+
layer, `support_reactions()` and an `equilibrium()` check.
|
|
28
|
+
- `VlasovSoil` (Young's modulus varying linearly with depth) and
|
|
29
|
+
`solve_vlasov()` with the iteration for the decay parameter gamma.
|
|
30
|
+
- Package exceptions `ModelError`, `UnstableModelError`,
|
|
31
|
+
`ConvergenceError`, all derived from `EBBEF2pError` and from the
|
|
32
|
+
matching built-in exception.
|
|
33
|
+
- Type hints (`py.typed`).
|
|
34
|
+
- Test suite split into `tests/unit` and `tests/verification`; the
|
|
35
|
+
verification tests compare with closed-form beam solutions, Hetényi's
|
|
36
|
+
long beam, the exact results of Razaqpur & Shah (1991), the gamma values
|
|
37
|
+
of Vallabhan & Das (1991), numerical integration of the element matrices
|
|
38
|
+
and Vlasov parameters, and global equilibrium.
|
|
39
|
+
|
|
40
|
+
### Fixed
|
|
41
|
+
|
|
42
|
+
- Bending moments and shear forces were computed from the bending
|
|
43
|
+
stiffness alone, ignoring the foundation and the distributed load on the
|
|
44
|
+
element. The shear force did not converge with mesh refinement: it
|
|
45
|
+
contained an error of the order of the shear-layer force `g*w'`.
|
|
46
|
+
- Two concentrated loads at the same node: only the last one was applied.
|
|
47
|
+
- The gamma update of the Vlasov model included the soil beyond the beam
|
|
48
|
+
ends while the stiffness matrix had no end springs. For the uniform-load
|
|
49
|
+
case of Vallabhan & Das this gave gamma = 0.498 instead of 0.395.
|
|
50
|
+
- The Vlasov parameters lost accuracy for small gamma because of
|
|
51
|
+
cancellation (error in `g` of 1e-5 at gamma = 1e-3, and `g = 0` instead
|
|
52
|
+
of `E*H/(6(1+nu))` for a rigidly settling beam). A Taylor series is now
|
|
53
|
+
used for gamma < 0.3.
|
|
54
|
+
- Compatibility with NumPy 2 (`np.trapz` and `np.asmatrix` were removed).
|
|
55
|
+
|
|
56
|
+
### Changed
|
|
57
|
+
|
|
58
|
+
- The second foundation parameter is called `g` (`g = 2t` in Vlasov's
|
|
59
|
+
notation, `G_p` in Pasternak's). The old code called it `t` although it
|
|
60
|
+
meant `2t`.
|
|
61
|
+
- Sparse assembly and solution (SciPy); element computations are
|
|
62
|
+
vectorised.
|
|
63
|
+
- Matplotlib is optional (`pip install "ebbef2p-python[plot]"`).
|
|
64
|
+
- Requires Python 3.12 or newer, NumPy 1.26 or newer and SciPy 1.11.3 or
|
|
65
|
+
newer.
|
|
66
|
+
- Packaging with `pyproject.toml`; the distribution is `ebbef2p-python`
|
|
67
|
+
(`setup.py` called it `ebbef2py`).
|
|
68
|
+
|
|
69
|
+
### Removed
|
|
70
|
+
|
|
71
|
+
- The `Structure` class and the modules `beam`, `element`,
|
|
72
|
+
`elastic_foundation`, `distributed_load`, `nodal_load`, `nodal_support`,
|
|
73
|
+
`vlasov_foundation_parameters` and `helpers`.
|
|
74
|
+
|
|
75
|
+
### Migrating from 0.0.x
|
|
76
|
+
|
|
77
|
+
| 0.0.x | 1.0 |
|
|
78
|
+
|---|---|
|
|
79
|
+
| `s = Structure("name")` | `m = Model()` |
|
|
80
|
+
| `s.add_beam([x0, x1], E, I)` | `m.add_beam(x0, x1, E, I)` |
|
|
81
|
+
| `s.add_elastic_foundation([k0, k1], [x0, x1], 'k')` | `m.add_foundation(x0, x1, k=(k0, k1))` |
|
|
82
|
+
| `s.add_elastic_foundation([t0, t1], [x0, x1], 't')` | `m.add_foundation(x0, x1, g=(t0, t1))` (the old `t` was already `2t`) |
|
|
83
|
+
| `s.add_nodal_load(P, x, 'fz')` / `(M, x, 'my')` | `m.add_point_load(x, force=P, moment=M)` |
|
|
84
|
+
| `s.add_distributed_load([q0, q1], [x0, x1])` | `m.add_distributed_load(x0, x1, q0, q1)` |
|
|
85
|
+
| `s.add_nodal_support({'uz': 0, 'ur': 'NaN'}, x)` | `m.add_support(x, w=0, theta=None)` |
|
|
86
|
+
| `add_nodes`, `add_elements`, `build_global_matrix`, `solve(...)` | `solution = solve(m, n_elements)` |
|
|
87
|
+
| `get_displacements()` (sign flipped) | `solution.w`, `solution.theta` (positive downwards) |
|
|
88
|
+
| `get_bending_moments()`, `get_shear_forces()` | `solution.bending_moment()`, `solution.shear_force()` |
|
|
89
|
+
| `compute_elastic_foundation_parameters({'E1':…, 'E2':…}, nu, H)` | `solve_vlasov(m, VlasovSoil(E_top, nu, H, E_bottom))` |
|
|
90
|
+
|
|
91
|
+
## [0.0.3.dev0] - 2020-05-25
|
|
92
|
+
|
|
93
|
+
- Foundation input reworked: `soil_conditions` became `elastic_foundation`,
|
|
94
|
+
`elastic_foundation_support` was removed; `Structure` and the Vlasov
|
|
95
|
+
parameters revised; the iteration for gamma
|
|
96
|
+
(`Structure.compute_elastic_foundation_parameters`) and `example.py`
|
|
97
|
+
added.
|
|
98
|
+
- Tests for the simply supported beam, the long beam on a Winkler
|
|
99
|
+
foundation, a beam on a two-parameter foundation and the Vlasov
|
|
100
|
+
parameters (replacing the first tests).
|
|
101
|
+
|
|
102
|
+
## [0.0.2.dev1] - 2020-04-22
|
|
103
|
+
|
|
104
|
+
- First tests (`Beam`, `Structure`), Travis CI with coverage,
|
|
105
|
+
`requirements.txt`, documentation updates.
|
|
106
|
+
|
|
107
|
+
## [0.0.1.dev1] - 2020-04-21
|
|
108
|
+
|
|
109
|
+
First Python version: the `Structure` class, beams on Winkler and
|
|
110
|
+
two-parameter foundations, and the modified Vlasov formulas for `k`, `t`
|
|
111
|
+
and gamma.
|
|
112
|
+
|
|
113
|
+
The 0.0.x versions were tagged retroactively in 2026 on the commits whose
|
|
114
|
+
code matches the sdists published on PyPI; the version number in
|
|
115
|
+
`setup.py` was not always committed at the time.
|
|
116
|
+
|
|
117
|
+
[Unreleased]: https://github.com/bteodoru/ebbef2p-python/compare/v1.0.0...HEAD
|
|
118
|
+
[1.0.0]: https://github.com/bteodoru/ebbef2p-python/compare/v0.0.3.dev0...v1.0.0
|
|
119
|
+
[0.0.3.dev0]: https://github.com/bteodoru/ebbef2p-python/compare/v0.0.2.dev1...v0.0.3.dev0
|
|
120
|
+
[0.0.2.dev1]: https://github.com/bteodoru/ebbef2p-python/compare/v0.0.1.dev1...v0.0.2.dev1
|
|
121
|
+
[0.0.1.dev1]: https://github.com/bteodoru/ebbef2p-python/releases/tag/v0.0.1.dev1
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
cff-version: 1.2.0
|
|
2
|
+
message: "If you use EBBEF2p in your work, please cite it as below."
|
|
3
|
+
title: "EBBEF2p: Euler-Bernoulli beams on two-parameter elastic foundations"
|
|
4
|
+
type: software
|
|
5
|
+
authors:
|
|
6
|
+
- family-names: Teodoru
|
|
7
|
+
given-names: Iancu-Bogdan
|
|
8
|
+
email: bteodoru@gmail.com
|
|
9
|
+
affiliation: "Gheorghe Asachi Technical University of Iași"
|
|
10
|
+
orcid: "https://orcid.org/0000-0001-8298-9374"
|
|
11
|
+
version: 1.0.0
|
|
12
|
+
date-released: 2026-10-26
|
|
13
|
+
license: MIT
|
|
14
|
+
repository-code: "https://github.com/bteodoru/ebbef2p-python"
|
|
15
|
+
url: "https://ebbef2p-python.readthedocs.io"
|
|
16
|
+
abstract: >-
|
|
17
|
+
EBBEF2p is a Python finite element package for the static analysis of
|
|
18
|
+
Euler-Bernoulli beams on Winkler, Pasternak and modified Vlasov
|
|
19
|
+
foundations, with foundation parameters varying along the beam, soil
|
|
20
|
+
continuing beyond the beam ends, and soil pressure including the
|
|
21
|
+
concentrated forces of the shear layer.
|
|
22
|
+
keywords:
|
|
23
|
+
- finite element method
|
|
24
|
+
- beam on elastic foundation
|
|
25
|
+
- two-parameter foundation
|
|
26
|
+
- Pasternak
|
|
27
|
+
- modified Vlasov model
|
|
28
|
+
- soil-structure interaction
|
|
29
|
+
- geotechnical engineering
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2020-2026, Bogdan Teodoru
|
|
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,126 @@
|
|
|
1
|
+
Metadata-Version: 2.5
|
|
2
|
+
Name: ebbef2p-python
|
|
3
|
+
Version: 1.0.0
|
|
4
|
+
Summary: Finite element analysis of Euler-Bernoulli beams on two-parameter elastic foundations (Winkler, Pasternak, modified Vlasov)
|
|
5
|
+
Project-URL: Homepage, https://github.com/bteodoru/ebbef2p-python
|
|
6
|
+
Project-URL: Documentation, https://ebbef2p-python.readthedocs.io
|
|
7
|
+
Project-URL: Issues, https://github.com/bteodoru/ebbef2p-python/issues
|
|
8
|
+
Project-URL: Changelog, https://github.com/bteodoru/ebbef2p-python/blob/main/CHANGELOG.md
|
|
9
|
+
Author-email: Bogdan Teodoru <bteodoru@gmail.com>
|
|
10
|
+
License-Expression: MIT
|
|
11
|
+
License-File: LICENSE
|
|
12
|
+
Keywords: Pasternak,Vlasov,Winkler,beam on elastic foundation,finite element method,geotechnical engineering,soil-structure interaction
|
|
13
|
+
Classifier: Development Status :: 5 - Production/Stable
|
|
14
|
+
Classifier: Intended Audience :: Education
|
|
15
|
+
Classifier: Intended Audience :: Science/Research
|
|
16
|
+
Classifier: Operating System :: OS Independent
|
|
17
|
+
Classifier: Programming Language :: Python :: 3
|
|
18
|
+
Classifier: Programming Language :: Python :: 3 :: Only
|
|
19
|
+
Classifier: Programming Language :: Python :: 3.12
|
|
20
|
+
Classifier: Programming Language :: Python :: 3.13
|
|
21
|
+
Classifier: Programming Language :: Python :: 3.14
|
|
22
|
+
Classifier: Topic :: Scientific/Engineering
|
|
23
|
+
Classifier: Topic :: Scientific/Engineering :: Physics
|
|
24
|
+
Classifier: Typing :: Typed
|
|
25
|
+
Requires-Python: >=3.12
|
|
26
|
+
Requires-Dist: numpy>=1.26
|
|
27
|
+
Requires-Dist: scipy>=1.11.3
|
|
28
|
+
Provides-Extra: plot
|
|
29
|
+
Requires-Dist: matplotlib>=3.10.7; extra == 'plot'
|
|
30
|
+
Description-Content-Type: text/markdown
|
|
31
|
+
|
|
32
|
+
|
|
33
|
+
# EBBEF2p for Python
|
|
34
|
+
|
|
35
|
+
[](https://github.com/bteodoru/ebbef2p-python/actions/workflows/tests.yml)
|
|
36
|
+
[](https://badge.fury.io/py/ebbef2p-python)
|
|
37
|
+
[](https://pypi.org/project/ebbef2p-python/)
|
|
38
|
+
[](https://github.com/bteodoru/ebbef2p-python/blob/main/LICENSE)
|
|
39
|
+
[](https://ebbef2p-python.readthedocs.io/en/latest/?badge=latest)
|
|
40
|
+
|
|
41
|
+
EBBEF2p (Euler-Bernoulli Beams on Two-Parameter Elastic Foundations) is a
|
|
42
|
+
finite element package for static analysis of beams on Winkler, Pasternak
|
|
43
|
+
and modified Vlasov foundations.
|
|
44
|
+
|
|
45
|
+
* both foundation parameters may vary linearly along the beam, with jumps
|
|
46
|
+
between segments;
|
|
47
|
+
* the soil may continue beyond the beam ends (equivalent end springs);
|
|
48
|
+
* modified Vlasov model (Vallabhan & Das, 1991) with iterated decay
|
|
49
|
+
parameter and depth-dependent soil modulus;
|
|
50
|
+
* bending moments and shear forces from element equilibrium;
|
|
51
|
+
* soil pressure including the concentrated forces of the shear layer, with
|
|
52
|
+
a global equilibrium check.
|
|
53
|
+
|
|
54
|
+
EBBEF2p was originally written as a MATLAB toolbox.
|
|
55
|
+
|
|
56
|
+
## Installation
|
|
57
|
+
|
|
58
|
+
```
|
|
59
|
+
pip install ebbef2p-python # NumPy and SciPy only
|
|
60
|
+
pip install "ebbef2p-python[plot]" # with Matplotlib for quick-look plots
|
|
61
|
+
```
|
|
62
|
+
|
|
63
|
+
Python 3.12 or newer is required.
|
|
64
|
+
|
|
65
|
+
## Quick start
|
|
66
|
+
|
|
67
|
+
```python
|
|
68
|
+
from ebbef2p import Model, solve
|
|
69
|
+
|
|
70
|
+
model = Model(soil_beyond_ends=True)
|
|
71
|
+
model.add_beam(0, 10, E=30e6, I=0.01)
|
|
72
|
+
model.add_foundation(0, 10, k=5000, g=2000) # g = 2t (Vlasov) = Gp (Pasternak)
|
|
73
|
+
model.add_point_load(5, force=100)
|
|
74
|
+
|
|
75
|
+
solution = solve(model, n_elements=100)
|
|
76
|
+
print(solution.w.max(), solution.bending_moment().max())
|
|
77
|
+
print(solution.equilibrium())
|
|
78
|
+
```
|
|
79
|
+
|
|
80
|
+
A modified Vlasov foundation is defined by the soil layer instead:
|
|
81
|
+
|
|
82
|
+
```python
|
|
83
|
+
from ebbef2p import Model, VlasovSoil, solve_vlasov
|
|
84
|
+
|
|
85
|
+
model = Model(soil_beyond_ends=True)
|
|
86
|
+
model.add_beam(0, 100, E=432000, I=2.25).add_distributed_load(0, 100, 3)
|
|
87
|
+
result = solve_vlasov(model, VlasovSoil(E_top=144, nu=0.2, depth=25))
|
|
88
|
+
print(result.gamma, result.k, result.g)
|
|
89
|
+
```
|
|
90
|
+
|
|
91
|
+
More in the [documentation](https://ebbef2p-python.readthedocs.io) and in
|
|
92
|
+
the `examples` folder.
|
|
93
|
+
|
|
94
|
+
## Verification
|
|
95
|
+
|
|
96
|
+
`tests/verification` compares EBBEF2p with independent references:
|
|
97
|
+
closed-form solutions for beams without foundation, Hetényi's long beam on
|
|
98
|
+
a Winkler foundation, the exact element stiffness and joint rotations of
|
|
99
|
+
Razaqpur & Shah (1991), the decay parameter gamma of Vallabhan & Das
|
|
100
|
+
(1991), numerical integration of the element matrices and Vlasov
|
|
101
|
+
parameters, and global equilibrium. The full table is in the
|
|
102
|
+
[documentation](https://ebbef2p-python.readthedocs.io/en/latest/theory/verification.html).
|
|
103
|
+
|
|
104
|
+
## Development
|
|
105
|
+
|
|
106
|
+
The project uses [uv](https://docs.astral.sh/uv/):
|
|
107
|
+
|
|
108
|
+
```
|
|
109
|
+
uv sync # environment with the package and the dev tools
|
|
110
|
+
uv run pytest # tests/unit and tests/verification
|
|
111
|
+
uv run ruff check .
|
|
112
|
+
```
|
|
113
|
+
|
|
114
|
+
See [CONTRIBUTING.md](CONTRIBUTING.md) for guidelines and
|
|
115
|
+
[CHANGELOG.md](CHANGELOG.md) for the changes since 0.0.x, including how to
|
|
116
|
+
migrate from the old `Structure` API.
|
|
117
|
+
|
|
118
|
+
## Citing
|
|
119
|
+
|
|
120
|
+
If you use EBBEF2p in your work, please cite it using the metadata in
|
|
121
|
+
[CITATION.cff](CITATION.cff) (GitHub shows it under *Cite this
|
|
122
|
+
repository*).
|
|
123
|
+
|
|
124
|
+
## License
|
|
125
|
+
|
|
126
|
+
MIT, see [LICENSE](LICENSE).
|
|
@@ -0,0 +1,95 @@
|
|
|
1
|
+
|
|
2
|
+
# EBBEF2p for Python
|
|
3
|
+
|
|
4
|
+
[](https://github.com/bteodoru/ebbef2p-python/actions/workflows/tests.yml)
|
|
5
|
+
[](https://badge.fury.io/py/ebbef2p-python)
|
|
6
|
+
[](https://pypi.org/project/ebbef2p-python/)
|
|
7
|
+
[](https://github.com/bteodoru/ebbef2p-python/blob/main/LICENSE)
|
|
8
|
+
[](https://ebbef2p-python.readthedocs.io/en/latest/?badge=latest)
|
|
9
|
+
|
|
10
|
+
EBBEF2p (Euler-Bernoulli Beams on Two-Parameter Elastic Foundations) is a
|
|
11
|
+
finite element package for static analysis of beams on Winkler, Pasternak
|
|
12
|
+
and modified Vlasov foundations.
|
|
13
|
+
|
|
14
|
+
* both foundation parameters may vary linearly along the beam, with jumps
|
|
15
|
+
between segments;
|
|
16
|
+
* the soil may continue beyond the beam ends (equivalent end springs);
|
|
17
|
+
* modified Vlasov model (Vallabhan & Das, 1991) with iterated decay
|
|
18
|
+
parameter and depth-dependent soil modulus;
|
|
19
|
+
* bending moments and shear forces from element equilibrium;
|
|
20
|
+
* soil pressure including the concentrated forces of the shear layer, with
|
|
21
|
+
a global equilibrium check.
|
|
22
|
+
|
|
23
|
+
EBBEF2p was originally written as a MATLAB toolbox.
|
|
24
|
+
|
|
25
|
+
## Installation
|
|
26
|
+
|
|
27
|
+
```
|
|
28
|
+
pip install ebbef2p-python # NumPy and SciPy only
|
|
29
|
+
pip install "ebbef2p-python[plot]" # with Matplotlib for quick-look plots
|
|
30
|
+
```
|
|
31
|
+
|
|
32
|
+
Python 3.12 or newer is required.
|
|
33
|
+
|
|
34
|
+
## Quick start
|
|
35
|
+
|
|
36
|
+
```python
|
|
37
|
+
from ebbef2p import Model, solve
|
|
38
|
+
|
|
39
|
+
model = Model(soil_beyond_ends=True)
|
|
40
|
+
model.add_beam(0, 10, E=30e6, I=0.01)
|
|
41
|
+
model.add_foundation(0, 10, k=5000, g=2000) # g = 2t (Vlasov) = Gp (Pasternak)
|
|
42
|
+
model.add_point_load(5, force=100)
|
|
43
|
+
|
|
44
|
+
solution = solve(model, n_elements=100)
|
|
45
|
+
print(solution.w.max(), solution.bending_moment().max())
|
|
46
|
+
print(solution.equilibrium())
|
|
47
|
+
```
|
|
48
|
+
|
|
49
|
+
A modified Vlasov foundation is defined by the soil layer instead:
|
|
50
|
+
|
|
51
|
+
```python
|
|
52
|
+
from ebbef2p import Model, VlasovSoil, solve_vlasov
|
|
53
|
+
|
|
54
|
+
model = Model(soil_beyond_ends=True)
|
|
55
|
+
model.add_beam(0, 100, E=432000, I=2.25).add_distributed_load(0, 100, 3)
|
|
56
|
+
result = solve_vlasov(model, VlasovSoil(E_top=144, nu=0.2, depth=25))
|
|
57
|
+
print(result.gamma, result.k, result.g)
|
|
58
|
+
```
|
|
59
|
+
|
|
60
|
+
More in the [documentation](https://ebbef2p-python.readthedocs.io) and in
|
|
61
|
+
the `examples` folder.
|
|
62
|
+
|
|
63
|
+
## Verification
|
|
64
|
+
|
|
65
|
+
`tests/verification` compares EBBEF2p with independent references:
|
|
66
|
+
closed-form solutions for beams without foundation, Hetényi's long beam on
|
|
67
|
+
a Winkler foundation, the exact element stiffness and joint rotations of
|
|
68
|
+
Razaqpur & Shah (1991), the decay parameter gamma of Vallabhan & Das
|
|
69
|
+
(1991), numerical integration of the element matrices and Vlasov
|
|
70
|
+
parameters, and global equilibrium. The full table is in the
|
|
71
|
+
[documentation](https://ebbef2p-python.readthedocs.io/en/latest/theory/verification.html).
|
|
72
|
+
|
|
73
|
+
## Development
|
|
74
|
+
|
|
75
|
+
The project uses [uv](https://docs.astral.sh/uv/):
|
|
76
|
+
|
|
77
|
+
```
|
|
78
|
+
uv sync # environment with the package and the dev tools
|
|
79
|
+
uv run pytest # tests/unit and tests/verification
|
|
80
|
+
uv run ruff check .
|
|
81
|
+
```
|
|
82
|
+
|
|
83
|
+
See [CONTRIBUTING.md](CONTRIBUTING.md) for guidelines and
|
|
84
|
+
[CHANGELOG.md](CHANGELOG.md) for the changes since 0.0.x, including how to
|
|
85
|
+
migrate from the old `Structure` API.
|
|
86
|
+
|
|
87
|
+
## Citing
|
|
88
|
+
|
|
89
|
+
If you use EBBEF2p in your work, please cite it using the metadata in
|
|
90
|
+
[CITATION.cff](CITATION.cff) (GitHub shows it under *Cite this
|
|
91
|
+
repository*).
|
|
92
|
+
|
|
93
|
+
## License
|
|
94
|
+
|
|
95
|
+
MIT, see [LICENSE](LICENSE).
|
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
"""Sphinx configuration for EBBEF2p."""
|
|
2
|
+
|
|
3
|
+
from importlib.metadata import version as _version
|
|
4
|
+
|
|
5
|
+
NAME = 'EBBEF2p'
|
|
6
|
+
NAME_LONG = 'Euler-Bernoulli Beams on Two-Parameter Elastic Foundations'
|
|
7
|
+
NAME_LC = NAME.lower()
|
|
8
|
+
NAME_CLI = NAME_LC
|
|
9
|
+
AUTHOR = 'Bogdan Teodoru'
|
|
10
|
+
LICENCE_NAME = "MIT"
|
|
11
|
+
|
|
12
|
+
project = 'ebbef2p-python'
|
|
13
|
+
copyright = '2020-2026, Bogdan Teodoru'
|
|
14
|
+
author = AUTHOR
|
|
15
|
+
release = _version('ebbef2p-python')
|
|
16
|
+
version = '.'.join(release.split('.')[:2])
|
|
17
|
+
|
|
18
|
+
extensions = [
|
|
19
|
+
'sphinx.ext.autodoc',
|
|
20
|
+
'sphinx.ext.coverage',
|
|
21
|
+
'sphinx.ext.napoleon',
|
|
22
|
+
'sphinx.ext.doctest',
|
|
23
|
+
'sphinx.ext.mathjax',
|
|
24
|
+
'sphinx.ext.viewcode',
|
|
25
|
+
]
|
|
26
|
+
autodoc_member_order = 'bysource'
|
|
27
|
+
root_doc = 'index'
|
|
28
|
+
language = 'en'
|
|
29
|
+
exclude_patterns = []
|
|
30
|
+
|
|
31
|
+
rst_prolog = f"""
|
|
32
|
+
.. |name| replace:: {NAME}
|
|
33
|
+
.. |name_long| replace:: {NAME_LONG}
|
|
34
|
+
.. |name_cli| replace:: ``{NAME_CLI}``
|
|
35
|
+
.. |eb| replace:: Euler-Bernoulli
|
|
36
|
+
.. |name_bold| replace:: **{NAME}**
|
|
37
|
+
.. |dof| replace:: d.o.f.
|
|
38
|
+
.. |dof_long| replace:: degrees of freedom
|
|
39
|
+
.. _FEM: https://en.wikipedia.org/wiki/Finite_element_method
|
|
40
|
+
.. _FE: https://en.wikipedia.org/wiki/Finite_element_method
|
|
41
|
+
.. _PyPI: https://pypi.org/project/ebbef2p-python/
|
|
42
|
+
.. |pypi_long| replace:: Python Package Index
|
|
43
|
+
.. _pip: https://pip.pypa.io/en/stable/
|
|
44
|
+
.. |author1| replace:: {AUTHOR}
|
|
45
|
+
.. |license| replace:: {LICENCE_NAME}
|
|
46
|
+
"""
|
|
47
|
+
|
|
48
|
+
html_theme = 'alabaster'
|
|
49
|
+
html_theme_options = {
|
|
50
|
+
'show_powered_by': False,
|
|
51
|
+
'github_user': 'bteodoru',
|
|
52
|
+
'github_repo': 'ebbef2p-python',
|
|
53
|
+
'github_banner': False,
|
|
54
|
+
'show_related': True,
|
|
55
|
+
'note_bg': '#FFF59C',
|
|
56
|
+
}
|
|
@@ -0,0 +1,59 @@
|
|
|
1
|
+
ebbef2p package
|
|
2
|
+
===============
|
|
3
|
+
|
|
4
|
+
The names most users need are available directly from the package:
|
|
5
|
+
:class:`~ebbef2p.model.Model`, :func:`~ebbef2p.solver.solve`,
|
|
6
|
+
:class:`~ebbef2p.vlasov.VlasovSoil` and :func:`~ebbef2p.vlasov.solve_vlasov`.
|
|
7
|
+
|
|
8
|
+
Model
|
|
9
|
+
-----
|
|
10
|
+
|
|
11
|
+
.. automodule:: ebbef2p.model
|
|
12
|
+
:members:
|
|
13
|
+
|
|
14
|
+
Solver
|
|
15
|
+
------
|
|
16
|
+
|
|
17
|
+
.. automodule:: ebbef2p.solver
|
|
18
|
+
:members:
|
|
19
|
+
|
|
20
|
+
Results
|
|
21
|
+
-------
|
|
22
|
+
|
|
23
|
+
.. automodule:: ebbef2p.results
|
|
24
|
+
:members:
|
|
25
|
+
|
|
26
|
+
Modified Vlasov model
|
|
27
|
+
---------------------
|
|
28
|
+
|
|
29
|
+
.. automodule:: ebbef2p.vlasov
|
|
30
|
+
:members:
|
|
31
|
+
|
|
32
|
+
Mesh
|
|
33
|
+
----
|
|
34
|
+
|
|
35
|
+
.. automodule:: ebbef2p.mesh
|
|
36
|
+
:members:
|
|
37
|
+
|
|
38
|
+
Element matrices
|
|
39
|
+
----------------
|
|
40
|
+
|
|
41
|
+
.. automodule:: ebbef2p.elements
|
|
42
|
+
:members:
|
|
43
|
+
|
|
44
|
+
Exceptions
|
|
45
|
+
----------
|
|
46
|
+
|
|
47
|
+
All errors raised by the package derive from
|
|
48
|
+
:class:`~ebbef2p.exceptions.EBBEF2pError` and also from the matching
|
|
49
|
+
built-in exception, so they can be caught either way.
|
|
50
|
+
|
|
51
|
+
.. automodule:: ebbef2p.exceptions
|
|
52
|
+
:members:
|
|
53
|
+
:show-inheritance:
|
|
54
|
+
|
|
55
|
+
Plotting
|
|
56
|
+
--------
|
|
57
|
+
|
|
58
|
+
.. automodule:: ebbef2p.plotting
|
|
59
|
+
:members:
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
ebbef2p documentation
|
|
2
|
+
=====================
|
|
3
|
+
|
|
4
|
+
EBBEF2p (Euler-Bernoulli Beams on Two-Parameter Elastic Foundations) solves
|
|
5
|
+
static problems for one-dimensional beams resting on Winkler, Pasternak and
|
|
6
|
+
modified Vlasov foundations. Both foundation parameters may vary along the
|
|
7
|
+
beam, and the soil can be taken to continue beyond the beam ends.
|
|
8
|
+
|
|
9
|
+
.. note::
|
|
10
|
+
EBBEF2p has no built-in system of units. All input data must be given in
|
|
11
|
+
consistent units.
|
|
12
|
+
|
|
13
|
+
.. toctree::
|
|
14
|
+
:maxdepth: 2
|
|
15
|
+
:caption: User guide
|
|
16
|
+
|
|
17
|
+
user_guide/installation
|
|
18
|
+
user_guide/getting_started
|
|
19
|
+
user_guide/conventions
|
|
20
|
+
user_guide/examples
|
|
21
|
+
|
|
22
|
+
.. toctree::
|
|
23
|
+
:maxdepth: 2
|
|
24
|
+
:caption: Theory
|
|
25
|
+
|
|
26
|
+
theory/index
|
|
27
|
+
theory/fe_modeling
|
|
28
|
+
theory/vlasov
|
|
29
|
+
theory/verification
|
|
30
|
+
|
|
31
|
+
.. toctree::
|
|
32
|
+
:maxdepth: 2
|
|
33
|
+
:caption: API reference
|
|
34
|
+
|
|
35
|
+
modules
|
|
36
|
+
|
|
37
|
+
Indices and tables
|
|
38
|
+
==================
|
|
39
|
+
|
|
40
|
+
* :ref:`genindex`
|
|
41
|
+
* :ref:`modindex`
|
|
42
|
+
* :ref:`search`
|