PyCBA 0.8.0__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.
Files changed (70) hide show
  1. pycba-1.0.0/PKG-INFO +131 -0
  2. pycba-1.0.0/README.md +91 -0
  3. {pycba-0.8.0 → pycba-1.0.0}/pyproject.toml +2 -1
  4. pycba-1.0.0/src/PyCBA.egg-info/PKG-INFO +131 -0
  5. pycba-1.0.0/src/PyCBA.egg-info/SOURCES.txt +55 -0
  6. {pycba-0.8.0 → pycba-1.0.0}/src/PyCBA.egg-info/requires.txt +4 -0
  7. pycba-1.0.0/src/pycba/__init__.py +46 -0
  8. pycba-1.0.0/src/pycba/analysis.py +1255 -0
  9. pycba-1.0.0/src/pycba/beam.py +1622 -0
  10. pycba-1.0.0/src/pycba/bridge.py +1345 -0
  11. pycba-1.0.0/src/pycba/foundation.py +228 -0
  12. {pycba-0.8.0 → pycba-1.0.0}/src/pycba/inf_lines.py +9 -3
  13. pycba-1.0.0/src/pycba/load_cases.py +1334 -0
  14. pycba-1.0.0/src/pycba/modal.py +280 -0
  15. {pycba-0.8.0 → pycba-1.0.0}/src/pycba/nonlinear.py +325 -79
  16. pycba-1.0.0/src/pycba/pattern.py +207 -0
  17. pycba-1.0.0/src/pycba/plotting.py +283 -0
  18. pycba-1.0.0/src/pycba/prestress.py +538 -0
  19. pycba-1.0.0/src/pycba/render.py +1168 -0
  20. pycba-1.0.0/src/pycba/results.py +1069 -0
  21. {pycba-0.8.0 → pycba-1.0.0}/src/pycba/section.py +27 -27
  22. pycba-1.0.0/src/pycba/types.py +127 -0
  23. pycba-1.0.0/src/pycba/units.py +234 -0
  24. pycba-1.0.0/src/pycba/utils.py +226 -0
  25. pycba-1.0.0/src/pycba/vehicle.py +709 -0
  26. pycba-1.0.0/tests/test_additive_pattern.py +384 -0
  27. {pycba-0.8.0 → pycba-1.0.0}/tests/test_basic.py +99 -0
  28. {pycba-0.8.0 → pycba-1.0.0}/tests/test_bridge.py +85 -3
  29. pycba-1.0.0/tests/test_code_load_models.py +136 -0
  30. pycba-1.0.0/tests/test_foundation.py +168 -0
  31. pycba-1.0.0/tests/test_loadpattern_ergonomics.py +304 -0
  32. pycba-1.0.0/tests/test_member_naming.py +36 -0
  33. pycba-1.0.0/tests/test_member_type.py +71 -0
  34. pycba-1.0.0/tests/test_modal.py +108 -0
  35. {pycba-0.8.0 → pycba-1.0.0}/tests/test_moving_load.py +3 -3
  36. pycba-1.0.0/tests/test_moving_udl.py +184 -0
  37. {pycba-0.8.0 → pycba-1.0.0}/tests/test_nonlinear.py +57 -8
  38. {pycba-0.8.0 → pycba-1.0.0}/tests/test_nonprismatic.py +16 -7
  39. pycba-1.0.0/tests/test_plot_helpers.py +90 -0
  40. pycba-1.0.0/tests/test_plotly.py +115 -0
  41. pycba-1.0.0/tests/test_prestress.py +208 -0
  42. pycba-1.0.0/tests/test_reaction_envelope.py +56 -0
  43. pycba-1.0.0/tests/test_reactions.py +99 -0
  44. pycba-1.0.0/tests/test_render.py +432 -0
  45. pycba-1.0.0/tests/test_results_export.py +91 -0
  46. pycba-1.0.0/tests/test_shear_points.py +192 -0
  47. pycba-1.0.0/tests/test_supports.py +136 -0
  48. pycba-1.0.0/tests/test_timoshenko.py +276 -0
  49. pycba-1.0.0/tests/test_units.py +129 -0
  50. pycba-0.8.0/PKG-INFO +0 -54
  51. pycba-0.8.0/README.md +0 -17
  52. pycba-0.8.0/src/PyCBA.egg-info/PKG-INFO +0 -54
  53. pycba-0.8.0/src/PyCBA.egg-info/SOURCES.txt +0 -29
  54. pycba-0.8.0/src/pycba/__init__.py +0 -25
  55. pycba-0.8.0/src/pycba/analysis.py +0 -637
  56. pycba-0.8.0/src/pycba/beam.py +0 -856
  57. pycba-0.8.0/src/pycba/bridge.py +0 -646
  58. pycba-0.8.0/src/pycba/pattern.py +0 -164
  59. pycba-0.8.0/src/pycba/results.py +0 -556
  60. pycba-0.8.0/src/pycba/types.py +0 -68
  61. pycba-0.8.0/src/pycba/utils.py +0 -102
  62. pycba-0.8.0/src/pycba/vehicle.py +0 -386
  63. {pycba-0.8.0 → pycba-1.0.0}/LICENSE +0 -0
  64. {pycba-0.8.0 → pycba-1.0.0}/setup.cfg +0 -0
  65. {pycba-0.8.0 → pycba-1.0.0}/setup.py +0 -0
  66. {pycba-0.8.0 → pycba-1.0.0}/src/PyCBA.egg-info/dependency_links.txt +0 -0
  67. {pycba-0.8.0 → pycba-1.0.0}/src/PyCBA.egg-info/top_level.txt +0 -0
  68. {pycba-0.8.0 → pycba-1.0.0}/src/pycba/load.py +0 -0
  69. {pycba-0.8.0 → pycba-1.0.0}/tests/test_inf_lines.py +0 -0
  70. {pycba-0.8.0 → pycba-1.0.0}/tests/test_results.py +0 -0
pycba-1.0.0/PKG-INFO ADDED
@@ -0,0 +1,131 @@
1
+ Metadata-Version: 2.4
2
+ Name: PyCBA
3
+ Version: 1.0.0
4
+ Summary: Python Continuous Beam Analysis
5
+ Author-email: Colin Caprani <colin.caprani@monash.edu>
6
+ License: Apache 2.0
7
+ Project-URL: Homepage, https://ccaprani.github.io/pycba/
8
+ Project-URL: Documentation, https://ccaprani.github.io/pycba/
9
+ Project-URL: Source, https://github.com/ccaprani/pycba/
10
+ Project-URL: Tracker, https://github.com/ccaprani/pycba/issues/
11
+ Keywords: beam,bridge,vehicle
12
+ Platform: any
13
+ Classifier: Development Status :: 4 - Beta
14
+ Classifier: Topic :: Scientific/Engineering
15
+ Classifier: Environment :: Console
16
+ Classifier: Intended Audience :: Science/Research
17
+ Classifier: Programming Language :: Python :: 3 :: Only
18
+ Classifier: License :: OSI Approved :: Apache Software License
19
+ Classifier: Natural Language :: English
20
+ Classifier: Operating System :: POSIX :: Linux
21
+ Classifier: Operating System :: MacOS :: MacOS X
22
+ Classifier: Operating System :: Microsoft :: Windows
23
+ Classifier: Programming Language :: Python :: 3.9
24
+ Classifier: Programming Language :: Python :: 3.10
25
+ Classifier: Programming Language :: Python :: 3.11
26
+ Classifier: Programming Language :: Python :: 3.12
27
+ Classifier: Programming Language :: Python :: 3.13
28
+ Requires-Python: >=3.9
29
+ Description-Content-Type: text/markdown
30
+ License-File: LICENSE
31
+ Requires-Dist: matplotlib
32
+ Requires-Dist: numpy
33
+ Requires-Dist: scipy>=1.6.0
34
+ Provides-Extra: test
35
+ Requires-Dist: pytest>=6.2.2; extra == "test"
36
+ Requires-Dist: pandas; extra == "test"
37
+ Provides-Extra: plotly
38
+ Requires-Dist: plotly>=5.0; extra == "plotly"
39
+ Dynamic: license-file
40
+
41
+ <p align="center">
42
+ <img src="https://raw.githubusercontent.com/ccaprani/pycba/main/docs/source/images/pycba_logo.png" alt="PyCBA logo" width="320">
43
+ </p>
44
+
45
+ <h1 align="center">PyCBA — Python Continuous Beam Analysis</h1>
46
+
47
+ <p align="center">
48
+ <em>Fast, accurate continuous-beam analysis for the design, assessment and teaching of buildings and bridges —<br>
49
+ from linear statics to plastic collapse, modal dynamics and moving-load bridge assessment.</em>
50
+ </p>
51
+
52
+ <p align="center">
53
+ <a href="https://pypi.org/project/pycba/"><img src="https://img.shields.io/pypi/v/pycba.svg?color=blue" alt="PyPI version"></a>
54
+ <a href="https://pypi.org/project/pycba/"><img src="https://img.shields.io/pypi/pyversions/pycba.svg" alt="Python versions"></a>
55
+ <a href="https://github.com/ccaprani/pycba/actions/workflows/pytest.yml"><img src="https://github.com/ccaprani/pycba/actions/workflows/pytest.yml/badge.svg" alt="Tests"></a>
56
+ <a href="https://codecov.io/gh/ccaprani/pycba"><img src="https://codecov.io/gh/ccaprani/pycba/branch/main/graph/badge.svg?token=dUTOmPBnyP" alt="codecov"></a>
57
+ <a href="https://ccaprani.github.io/pycba/"><img src="https://img.shields.io/badge/docs-ccaprani.github.io%2Fpycba-blue" alt="Documentation"></a>
58
+ <a href="https://opensource.org/licenses/Apache-2.0"><img src="https://img.shields.io/badge/License-Apache_2.0-blue.svg" alt="License: Apache 2.0"></a>
59
+ <a href="https://github.com/psf/black"><img src="https://img.shields.io/badge/code%20style-black-000000.svg" alt="Code style: black"></a>
60
+ </p>
61
+
62
+ <p align="center">
63
+ <img src="https://raw.githubusercontent.com/ccaprani/pycba/main/docs/source/images/hero_results.png" alt="PyCBA result diagrams" width="640">
64
+ </p>
65
+
66
+ `PyCBA` is a focused, dependable **1-D continuous-beam engine** built on the matrix (direct)
67
+ stiffness method. It is deliberately *not* a general 2-D/3-D FE package — instead it does one
68
+ thing extremely well, with a clean API, light dependencies (**numpy / scipy / matplotlib**),
69
+ and an analysis core that powers a surprisingly broad toolkit.
70
+
71
+ ```python
72
+ import pycba as cba
73
+
74
+ # A two-span continuous beam: 10 m + 12 m, EI = 30 000 kN·m², pinned supports
75
+ beam = cba.BeamAnalysis(L=[10, 12], EI=30_000, supports=["pin", "pin", "pin"])
76
+ beam.add_udl(i_member=1, w=20) # 20 kN/m on span 1
77
+ beam.add_pl(i_member=2, p=50, a=6) # 50 kN point load at mid-span 2
78
+ beam.analyze()
79
+
80
+ beam.plot_results() # bending moment, shear, deflection + reactions
81
+ print(beam.at(5.0)) # -> {'M': 162.5, 'V': -17.5, 'R': 0.0, 'D': -0.05}
82
+ ```
83
+
84
+ ## ✨ What it does
85
+
86
+ **Analysis**
87
+ - Continuous beams of any number of spans, with **pin / roller / fixed / vertical-spring / rotational-spring** supports, **prescribed settlements**, and internal **hinges** — plus pre-solve **mechanism detection**.
88
+ - An **element library**: Euler–Bernoulli, **Timoshenko** (shear-deformable), **non-prismatic** (variable `EI`), and **beam-on-Winkler-foundation**.
89
+ - **Nonlinear** elasto-plastic analysis **to collapse** (plastic hinges, mechanism detection, collapse-mechanism plots).
90
+ - **Free-vibration (modal)** analysis — natural frequencies, periods and mode shapes.
91
+
92
+ **Loads & bridges**
93
+ - UDL, point, partial, **trapezoidal**, moment and **imposed-curvature** (creep / shrinkage / thermal) loads; **load cases, combinations** and patterned UDLs.
94
+ - **Moving-load bridge assessment** — influence lines, envelopes, **coincident effects**, lane UDLs and **shear points / critical shear**.
95
+ - **Code load models — road & rail, from six nations** — AASHTO **HL-93**, Eurocode **LM1 / LM71**, BS 5400 / CS 454 **HB**, CSA **CL-625**, China **JTG**, AREA **Cooper E**, AS 5100 **M1600 / S1600 / 300LA**, NAASRA **T44 / MS18** — organised by region.
96
+ - A **post-tensioning** preprocessor for prestress.
97
+
98
+ **Visualisation**
99
+ - Beam & load **schematics** in matplotlib *and* publication-quality **TikZ / `stanli`**.
100
+ - **Shaded** bending-moment / shear / deflection diagrams, **reaction** plots, **coincident-effects**, **mode-shape**, **collapse-mechanism** and **vehicle** plots.
101
+ - An **interactive Plotly** backend, and selectable **display unit systems** (SI / US / N·mm).
102
+
103
+ **Ergonomics**
104
+ - Point queries `at(x)`, exports `to_dataframe()` / `to_csv()`, a friendly `supports=` API, and clear errors — all validated against closed-form solutions, with 370+ tests.
105
+
106
+ ## 📦 Installation
107
+
108
+ ```bash
109
+ pip install pycba # core
110
+ pip install "pycba[plotly]" # + interactive plots
111
+ ```
112
+
113
+ Requires Python 3.9+.
114
+
115
+ ## 📚 Documentation & tutorials
116
+
117
+ Full documentation, a Theoretical Basis, and a dozen worked-example notebooks (bridges, foundations,
118
+ modal, non-prismatic, nonlinear collapse, creep/shrinkage/thermal, the vehicle library, and more) are at
119
+ **[ccaprani.github.io/pycba](https://ccaprani.github.io/pycba/)**.
120
+
121
+ ## 🌱 Origins
122
+
123
+ `PyCBA` began life as a Python port of Colin Caprani's MATLAB
124
+ [Continuous Beam Analysis](http://www.colincaprani.com/programming/matlab/) program (later
125
+ [ported to C++](http://cbeam.sourceforge.net/) by Pierrot). It has since grown well beyond that
126
+ starting point into the toolkit above — but the spirit is unchanged: fast, exact, and a pleasure to use.
127
+
128
+ ## 📄 License
129
+
130
+ Released under the **Apache 2.0** license. Contributions and issues are welcome on
131
+ [GitHub](https://github.com/ccaprani/pycba).
pycba-1.0.0/README.md ADDED
@@ -0,0 +1,91 @@
1
+ <p align="center">
2
+ <img src="https://raw.githubusercontent.com/ccaprani/pycba/main/docs/source/images/pycba_logo.png" alt="PyCBA logo" width="320">
3
+ </p>
4
+
5
+ <h1 align="center">PyCBA — Python Continuous Beam Analysis</h1>
6
+
7
+ <p align="center">
8
+ <em>Fast, accurate continuous-beam analysis for the design, assessment and teaching of buildings and bridges —<br>
9
+ from linear statics to plastic collapse, modal dynamics and moving-load bridge assessment.</em>
10
+ </p>
11
+
12
+ <p align="center">
13
+ <a href="https://pypi.org/project/pycba/"><img src="https://img.shields.io/pypi/v/pycba.svg?color=blue" alt="PyPI version"></a>
14
+ <a href="https://pypi.org/project/pycba/"><img src="https://img.shields.io/pypi/pyversions/pycba.svg" alt="Python versions"></a>
15
+ <a href="https://github.com/ccaprani/pycba/actions/workflows/pytest.yml"><img src="https://github.com/ccaprani/pycba/actions/workflows/pytest.yml/badge.svg" alt="Tests"></a>
16
+ <a href="https://codecov.io/gh/ccaprani/pycba"><img src="https://codecov.io/gh/ccaprani/pycba/branch/main/graph/badge.svg?token=dUTOmPBnyP" alt="codecov"></a>
17
+ <a href="https://ccaprani.github.io/pycba/"><img src="https://img.shields.io/badge/docs-ccaprani.github.io%2Fpycba-blue" alt="Documentation"></a>
18
+ <a href="https://opensource.org/licenses/Apache-2.0"><img src="https://img.shields.io/badge/License-Apache_2.0-blue.svg" alt="License: Apache 2.0"></a>
19
+ <a href="https://github.com/psf/black"><img src="https://img.shields.io/badge/code%20style-black-000000.svg" alt="Code style: black"></a>
20
+ </p>
21
+
22
+ <p align="center">
23
+ <img src="https://raw.githubusercontent.com/ccaprani/pycba/main/docs/source/images/hero_results.png" alt="PyCBA result diagrams" width="640">
24
+ </p>
25
+
26
+ `PyCBA` is a focused, dependable **1-D continuous-beam engine** built on the matrix (direct)
27
+ stiffness method. It is deliberately *not* a general 2-D/3-D FE package — instead it does one
28
+ thing extremely well, with a clean API, light dependencies (**numpy / scipy / matplotlib**),
29
+ and an analysis core that powers a surprisingly broad toolkit.
30
+
31
+ ```python
32
+ import pycba as cba
33
+
34
+ # A two-span continuous beam: 10 m + 12 m, EI = 30 000 kN·m², pinned supports
35
+ beam = cba.BeamAnalysis(L=[10, 12], EI=30_000, supports=["pin", "pin", "pin"])
36
+ beam.add_udl(i_member=1, w=20) # 20 kN/m on span 1
37
+ beam.add_pl(i_member=2, p=50, a=6) # 50 kN point load at mid-span 2
38
+ beam.analyze()
39
+
40
+ beam.plot_results() # bending moment, shear, deflection + reactions
41
+ print(beam.at(5.0)) # -> {'M': 162.5, 'V': -17.5, 'R': 0.0, 'D': -0.05}
42
+ ```
43
+
44
+ ## ✨ What it does
45
+
46
+ **Analysis**
47
+ - Continuous beams of any number of spans, with **pin / roller / fixed / vertical-spring / rotational-spring** supports, **prescribed settlements**, and internal **hinges** — plus pre-solve **mechanism detection**.
48
+ - An **element library**: Euler–Bernoulli, **Timoshenko** (shear-deformable), **non-prismatic** (variable `EI`), and **beam-on-Winkler-foundation**.
49
+ - **Nonlinear** elasto-plastic analysis **to collapse** (plastic hinges, mechanism detection, collapse-mechanism plots).
50
+ - **Free-vibration (modal)** analysis — natural frequencies, periods and mode shapes.
51
+
52
+ **Loads & bridges**
53
+ - UDL, point, partial, **trapezoidal**, moment and **imposed-curvature** (creep / shrinkage / thermal) loads; **load cases, combinations** and patterned UDLs.
54
+ - **Moving-load bridge assessment** — influence lines, envelopes, **coincident effects**, lane UDLs and **shear points / critical shear**.
55
+ - **Code load models — road & rail, from six nations** — AASHTO **HL-93**, Eurocode **LM1 / LM71**, BS 5400 / CS 454 **HB**, CSA **CL-625**, China **JTG**, AREA **Cooper E**, AS 5100 **M1600 / S1600 / 300LA**, NAASRA **T44 / MS18** — organised by region.
56
+ - A **post-tensioning** preprocessor for prestress.
57
+
58
+ **Visualisation**
59
+ - Beam & load **schematics** in matplotlib *and* publication-quality **TikZ / `stanli`**.
60
+ - **Shaded** bending-moment / shear / deflection diagrams, **reaction** plots, **coincident-effects**, **mode-shape**, **collapse-mechanism** and **vehicle** plots.
61
+ - An **interactive Plotly** backend, and selectable **display unit systems** (SI / US / N·mm).
62
+
63
+ **Ergonomics**
64
+ - Point queries `at(x)`, exports `to_dataframe()` / `to_csv()`, a friendly `supports=` API, and clear errors — all validated against closed-form solutions, with 370+ tests.
65
+
66
+ ## 📦 Installation
67
+
68
+ ```bash
69
+ pip install pycba # core
70
+ pip install "pycba[plotly]" # + interactive plots
71
+ ```
72
+
73
+ Requires Python 3.9+.
74
+
75
+ ## 📚 Documentation & tutorials
76
+
77
+ Full documentation, a Theoretical Basis, and a dozen worked-example notebooks (bridges, foundations,
78
+ modal, non-prismatic, nonlinear collapse, creep/shrinkage/thermal, the vehicle library, and more) are at
79
+ **[ccaprani.github.io/pycba](https://ccaprani.github.io/pycba/)**.
80
+
81
+ ## 🌱 Origins
82
+
83
+ `PyCBA` began life as a Python port of Colin Caprani's MATLAB
84
+ [Continuous Beam Analysis](http://www.colincaprani.com/programming/matlab/) program (later
85
+ [ported to C++](http://cbeam.sourceforge.net/) by Pierrot). It has since grown well beyond that
86
+ starting point into the toolkit above — but the spirit is unchanged: fast, exact, and a pleasure to use.
87
+
88
+ ## 📄 License
89
+
90
+ Released under the **Apache 2.0** license. Contributions and issues are welcome on
91
+ [GitHub](https://github.com/ccaprani/pycba).
@@ -45,7 +45,8 @@ Source = "https://github.com/ccaprani/pycba/"
45
45
  Tracker = "https://github.com/ccaprani/pycba/issues/"
46
46
 
47
47
  [project.optional-dependencies]
48
- test = ["pytest >= 6.2.2"]
48
+ test = ["pytest >= 6.2.2", "pandas"]
49
+ plotly = ["plotly >= 5.0"]
49
50
 
50
51
  [tool.setuptools]
51
52
  platforms = ["any"]
@@ -0,0 +1,131 @@
1
+ Metadata-Version: 2.4
2
+ Name: PyCBA
3
+ Version: 1.0.0
4
+ Summary: Python Continuous Beam Analysis
5
+ Author-email: Colin Caprani <colin.caprani@monash.edu>
6
+ License: Apache 2.0
7
+ Project-URL: Homepage, https://ccaprani.github.io/pycba/
8
+ Project-URL: Documentation, https://ccaprani.github.io/pycba/
9
+ Project-URL: Source, https://github.com/ccaprani/pycba/
10
+ Project-URL: Tracker, https://github.com/ccaprani/pycba/issues/
11
+ Keywords: beam,bridge,vehicle
12
+ Platform: any
13
+ Classifier: Development Status :: 4 - Beta
14
+ Classifier: Topic :: Scientific/Engineering
15
+ Classifier: Environment :: Console
16
+ Classifier: Intended Audience :: Science/Research
17
+ Classifier: Programming Language :: Python :: 3 :: Only
18
+ Classifier: License :: OSI Approved :: Apache Software License
19
+ Classifier: Natural Language :: English
20
+ Classifier: Operating System :: POSIX :: Linux
21
+ Classifier: Operating System :: MacOS :: MacOS X
22
+ Classifier: Operating System :: Microsoft :: Windows
23
+ Classifier: Programming Language :: Python :: 3.9
24
+ Classifier: Programming Language :: Python :: 3.10
25
+ Classifier: Programming Language :: Python :: 3.11
26
+ Classifier: Programming Language :: Python :: 3.12
27
+ Classifier: Programming Language :: Python :: 3.13
28
+ Requires-Python: >=3.9
29
+ Description-Content-Type: text/markdown
30
+ License-File: LICENSE
31
+ Requires-Dist: matplotlib
32
+ Requires-Dist: numpy
33
+ Requires-Dist: scipy>=1.6.0
34
+ Provides-Extra: test
35
+ Requires-Dist: pytest>=6.2.2; extra == "test"
36
+ Requires-Dist: pandas; extra == "test"
37
+ Provides-Extra: plotly
38
+ Requires-Dist: plotly>=5.0; extra == "plotly"
39
+ Dynamic: license-file
40
+
41
+ <p align="center">
42
+ <img src="https://raw.githubusercontent.com/ccaprani/pycba/main/docs/source/images/pycba_logo.png" alt="PyCBA logo" width="320">
43
+ </p>
44
+
45
+ <h1 align="center">PyCBA — Python Continuous Beam Analysis</h1>
46
+
47
+ <p align="center">
48
+ <em>Fast, accurate continuous-beam analysis for the design, assessment and teaching of buildings and bridges —<br>
49
+ from linear statics to plastic collapse, modal dynamics and moving-load bridge assessment.</em>
50
+ </p>
51
+
52
+ <p align="center">
53
+ <a href="https://pypi.org/project/pycba/"><img src="https://img.shields.io/pypi/v/pycba.svg?color=blue" alt="PyPI version"></a>
54
+ <a href="https://pypi.org/project/pycba/"><img src="https://img.shields.io/pypi/pyversions/pycba.svg" alt="Python versions"></a>
55
+ <a href="https://github.com/ccaprani/pycba/actions/workflows/pytest.yml"><img src="https://github.com/ccaprani/pycba/actions/workflows/pytest.yml/badge.svg" alt="Tests"></a>
56
+ <a href="https://codecov.io/gh/ccaprani/pycba"><img src="https://codecov.io/gh/ccaprani/pycba/branch/main/graph/badge.svg?token=dUTOmPBnyP" alt="codecov"></a>
57
+ <a href="https://ccaprani.github.io/pycba/"><img src="https://img.shields.io/badge/docs-ccaprani.github.io%2Fpycba-blue" alt="Documentation"></a>
58
+ <a href="https://opensource.org/licenses/Apache-2.0"><img src="https://img.shields.io/badge/License-Apache_2.0-blue.svg" alt="License: Apache 2.0"></a>
59
+ <a href="https://github.com/psf/black"><img src="https://img.shields.io/badge/code%20style-black-000000.svg" alt="Code style: black"></a>
60
+ </p>
61
+
62
+ <p align="center">
63
+ <img src="https://raw.githubusercontent.com/ccaprani/pycba/main/docs/source/images/hero_results.png" alt="PyCBA result diagrams" width="640">
64
+ </p>
65
+
66
+ `PyCBA` is a focused, dependable **1-D continuous-beam engine** built on the matrix (direct)
67
+ stiffness method. It is deliberately *not* a general 2-D/3-D FE package — instead it does one
68
+ thing extremely well, with a clean API, light dependencies (**numpy / scipy / matplotlib**),
69
+ and an analysis core that powers a surprisingly broad toolkit.
70
+
71
+ ```python
72
+ import pycba as cba
73
+
74
+ # A two-span continuous beam: 10 m + 12 m, EI = 30 000 kN·m², pinned supports
75
+ beam = cba.BeamAnalysis(L=[10, 12], EI=30_000, supports=["pin", "pin", "pin"])
76
+ beam.add_udl(i_member=1, w=20) # 20 kN/m on span 1
77
+ beam.add_pl(i_member=2, p=50, a=6) # 50 kN point load at mid-span 2
78
+ beam.analyze()
79
+
80
+ beam.plot_results() # bending moment, shear, deflection + reactions
81
+ print(beam.at(5.0)) # -> {'M': 162.5, 'V': -17.5, 'R': 0.0, 'D': -0.05}
82
+ ```
83
+
84
+ ## ✨ What it does
85
+
86
+ **Analysis**
87
+ - Continuous beams of any number of spans, with **pin / roller / fixed / vertical-spring / rotational-spring** supports, **prescribed settlements**, and internal **hinges** — plus pre-solve **mechanism detection**.
88
+ - An **element library**: Euler–Bernoulli, **Timoshenko** (shear-deformable), **non-prismatic** (variable `EI`), and **beam-on-Winkler-foundation**.
89
+ - **Nonlinear** elasto-plastic analysis **to collapse** (plastic hinges, mechanism detection, collapse-mechanism plots).
90
+ - **Free-vibration (modal)** analysis — natural frequencies, periods and mode shapes.
91
+
92
+ **Loads & bridges**
93
+ - UDL, point, partial, **trapezoidal**, moment and **imposed-curvature** (creep / shrinkage / thermal) loads; **load cases, combinations** and patterned UDLs.
94
+ - **Moving-load bridge assessment** — influence lines, envelopes, **coincident effects**, lane UDLs and **shear points / critical shear**.
95
+ - **Code load models — road & rail, from six nations** — AASHTO **HL-93**, Eurocode **LM1 / LM71**, BS 5400 / CS 454 **HB**, CSA **CL-625**, China **JTG**, AREA **Cooper E**, AS 5100 **M1600 / S1600 / 300LA**, NAASRA **T44 / MS18** — organised by region.
96
+ - A **post-tensioning** preprocessor for prestress.
97
+
98
+ **Visualisation**
99
+ - Beam & load **schematics** in matplotlib *and* publication-quality **TikZ / `stanli`**.
100
+ - **Shaded** bending-moment / shear / deflection diagrams, **reaction** plots, **coincident-effects**, **mode-shape**, **collapse-mechanism** and **vehicle** plots.
101
+ - An **interactive Plotly** backend, and selectable **display unit systems** (SI / US / N·mm).
102
+
103
+ **Ergonomics**
104
+ - Point queries `at(x)`, exports `to_dataframe()` / `to_csv()`, a friendly `supports=` API, and clear errors — all validated against closed-form solutions, with 370+ tests.
105
+
106
+ ## 📦 Installation
107
+
108
+ ```bash
109
+ pip install pycba # core
110
+ pip install "pycba[plotly]" # + interactive plots
111
+ ```
112
+
113
+ Requires Python 3.9+.
114
+
115
+ ## 📚 Documentation & tutorials
116
+
117
+ Full documentation, a Theoretical Basis, and a dozen worked-example notebooks (bridges, foundations,
118
+ modal, non-prismatic, nonlinear collapse, creep/shrinkage/thermal, the vehicle library, and more) are at
119
+ **[ccaprani.github.io/pycba](https://ccaprani.github.io/pycba/)**.
120
+
121
+ ## 🌱 Origins
122
+
123
+ `PyCBA` began life as a Python port of Colin Caprani's MATLAB
124
+ [Continuous Beam Analysis](http://www.colincaprani.com/programming/matlab/) program (later
125
+ [ported to C++](http://cbeam.sourceforge.net/) by Pierrot). It has since grown well beyond that
126
+ starting point into the toolkit above — but the spirit is unchanged: fast, exact, and a pleasure to use.
127
+
128
+ ## 📄 License
129
+
130
+ Released under the **Apache 2.0** license. Contributions and issues are welcome on
131
+ [GitHub](https://github.com/ccaprani/pycba).
@@ -0,0 +1,55 @@
1
+ LICENSE
2
+ README.md
3
+ pyproject.toml
4
+ setup.py
5
+ src/PyCBA.egg-info/PKG-INFO
6
+ src/PyCBA.egg-info/SOURCES.txt
7
+ src/PyCBA.egg-info/dependency_links.txt
8
+ src/PyCBA.egg-info/requires.txt
9
+ src/PyCBA.egg-info/top_level.txt
10
+ src/pycba/__init__.py
11
+ src/pycba/analysis.py
12
+ src/pycba/beam.py
13
+ src/pycba/bridge.py
14
+ src/pycba/foundation.py
15
+ src/pycba/inf_lines.py
16
+ src/pycba/load.py
17
+ src/pycba/load_cases.py
18
+ src/pycba/modal.py
19
+ src/pycba/nonlinear.py
20
+ src/pycba/pattern.py
21
+ src/pycba/plotting.py
22
+ src/pycba/prestress.py
23
+ src/pycba/render.py
24
+ src/pycba/results.py
25
+ src/pycba/section.py
26
+ src/pycba/types.py
27
+ src/pycba/units.py
28
+ src/pycba/utils.py
29
+ src/pycba/vehicle.py
30
+ tests/test_additive_pattern.py
31
+ tests/test_basic.py
32
+ tests/test_bridge.py
33
+ tests/test_code_load_models.py
34
+ tests/test_foundation.py
35
+ tests/test_inf_lines.py
36
+ tests/test_loadpattern_ergonomics.py
37
+ tests/test_member_naming.py
38
+ tests/test_member_type.py
39
+ tests/test_modal.py
40
+ tests/test_moving_load.py
41
+ tests/test_moving_udl.py
42
+ tests/test_nonlinear.py
43
+ tests/test_nonprismatic.py
44
+ tests/test_plot_helpers.py
45
+ tests/test_plotly.py
46
+ tests/test_prestress.py
47
+ tests/test_reaction_envelope.py
48
+ tests/test_reactions.py
49
+ tests/test_render.py
50
+ tests/test_results.py
51
+ tests/test_results_export.py
52
+ tests/test_shear_points.py
53
+ tests/test_supports.py
54
+ tests/test_timoshenko.py
55
+ tests/test_units.py
@@ -2,5 +2,9 @@ matplotlib
2
2
  numpy
3
3
  scipy>=1.6.0
4
4
 
5
+ [plotly]
6
+ plotly>=5.0
7
+
5
8
  [test]
6
9
  pytest>=6.2.2
10
+ pandas
@@ -0,0 +1,46 @@
1
+ """
2
+ PyCBA - Continuous Beam Analysis in Python
3
+ """
4
+
5
+ __version__ = "1.0.0"
6
+
7
+ from .analysis import BeamAnalysis
8
+ from .beam import Beam
9
+ from .section import SectionEI
10
+ from .types import MemberType
11
+ from .load import (
12
+ LoadCNL,
13
+ MemberResults,
14
+ LoadMatrix,
15
+ LoadType,
16
+ parse_LM,
17
+ add_LM,
18
+ factor_LM,
19
+ )
20
+ from .results import BeamResults, Envelopes
21
+ from .render import BeamPlotter
22
+ from .units import UnitSystem, set_units, get_units
23
+ from .plotting import set_backend, get_backend
24
+ from .inf_lines import InfluenceLines
25
+ from .utils import parse_beam_string, supports_to_R
26
+ from .bridge import BridgeAnalysis, resolve_shear_points
27
+ from .vehicle import Vehicle, make_train, VehicleLibrary, plot_vehicle
28
+ from .load_cases import (
29
+ LoadCase,
30
+ LoadCombination,
31
+ LoadCases,
32
+ build_pycba_model,
33
+ analyse_load_case,
34
+ analyze_load_case,
35
+ collect_response_matrix,
36
+ additive_envelope,
37
+ sign_selective_envelope,
38
+ make_patterned_udl,
39
+ make_span_udl_cases,
40
+ plot_response_envelope,
41
+ plot_load_patterns,
42
+ )
43
+ from .pattern import LoadPattern
44
+ from .nonlinear import NonlinearBeamAnalysis, NonlinearResult, HingeEvent
45
+ from .modal import ModalResults
46
+ from . import prestress