Skip to content

PyCBA 1.0.1 — a complete continuous-beam toolkit

Latest

Choose a tag to compare

@ccaprani ccaprani released this 27 Jun 14:46
· 1 commit to main since this release
5564c18

🎉 PyCBA 1.0.1 — a complete continuous‑beam toolkit

PyCBA reaches 1.0 — and rather than just the delta since 0.9, these notes set out the whole capability, because the library has grown enormously through a rapid run of releases since 0.6.

PyCBA is a focused, dependable 1‑D continuous‑beam engine for the design, assessment and teaching of buildings and bridges: matrix‑stiffness accurate, light on dependencies (just numpy / scipy / matplotlib), and deliberately not a general 2‑D/3‑D FE tool. At 1.0 it spans linear and nonlinear statics, moving‑load bridge assessment, free‑vibration dynamics, prestress, and a rich, publication‑ready visualisation layer.


🧱 Modelling & analysis

  • Continuous beams by the matrix (direct) stiffness method, any number of spans / members.
  • Supports: pin, roller, encastré, guided, vertical spring and rotational spring — via the low‑level restraint vector or the friendly supports=["pin", "roller", …] API.
  • Prescribed displacements / support settlements (D=).
  • Internal moment releases (hinges) per member.
  • Pre‑solve stability / mechanism detection.
  • Full reaction recovery — vertical, moment and spring forces — reported and plotted.

🧩 Element library

  • Euler–Bernoulli prismatic elements (the exact default).
  • Timoshenko shear‑deformable elements (opt‑in via GAv).
  • Non‑prismatic (variable‑EI) members — SectionEI from const / linear / pwl / poly segments, integrated exactly.
  • Beam on a Winkler (elastic) foundation (kf) — a statically‑condensed super‑element, validated against Hetényi.

🏋️ Loads

  • UDL, point, partial‑UDL, trapezoidal (linearly varying) and moment loads.
  • Imposed‑curvature (initial‑strain) loads for creep, shrinkage and thermal effects.
  • Load cases & combinations, patterned UDLs, and envelope/superposition utilities.

🌉 Bridges & moving loads

  • Vehicle traversal with influence lines and envelopes (Mmax/Mmin/Vmax/Vmin), with traverse‑range control.
  • Coincident load effects (e.g. the shear coexisting with peak moment) and envelope arithmetic (sum, augment).
  • Code load models — road & rail, from six nations. VehicleLibrary grouped by region (AU / US / EU / UK / CA / CN): AASHTO HL‑93, Eurocode LM1 / LM71, BS 5400 / CS 454 HB, CSA CL‑625, China JTG, AREA Cooper E, AS 5100 M1600/S1600/A160/W80/300LA, and the historical NAASRA T44 / MS18.
  • Moving lane UDL with clearance zones, and shear points / critical shear (dv) for code assessment.

💥 Nonlinear & dynamics

  • Elasto‑plastic (plastic‑hinge) analysis to collapse — static and moving load — with hinge tracking, mechanism detection, and a plot_collapse() mechanism diagram.
  • Free‑vibration (modal) analysis — natural frequencies, periods and mode shapes (validated to < 0.1 % against the classical cases).

🔗 Prestress

  • A post‑tensioning preprocessor that converts tendon profiles to equivalent loads.

📊 Visualisation

  • Beam & load schematics in matplotlib and publication‑quality TikZ / stanli (.tex → PDF).
  • Result diagrams — bending moment / shear / deflection (shaded, sagging‑positive), individual or combined, with a reactions panel; plus reaction, coincident‑effects, mode‑shape, collapse‑mechanism and vehicle plots.
  • Interactive Plotly backend — hover any section to read M, V and deflection together.
  • Display unit systems — relabel for SI / US / N·mm without touching the analysis.

⚡ Results & ergonomics

  • Point queries at(x); exports to_dataframe() / to_csv().
  • Consistent member terminology; the friendly supports= API; clear, actionable errors.

✅ Quality

Validated against closed‑form solutions throughout (Hetényi, classical modal frequencies, plastic‑collapse virtual work, …), with 370+ tests and a dozen worked‑example tutorials.


⚠️ Breaking changes (1.0 clean‑ups)

Both keep deprecated aliases, so most existing code is unaffected:

  • i_spani_member on the load‑add methods — positional calls (ba.add_udl(1, 10)) are unchanged; only the i_span= keyword is renamed. no_spans / add_span retained as aliases.
  • VehicleLibrary accessors move under region namespacesVehicleLibrary.AU.get_m1600(6.25) (and the new AU.get_300la(…)).

📄 Licence — now AGPL‑3.0

As of 1.0, PyCBA is licensed under the GNU Affero General Public License v3.0 (previously Apache 2.0). You remain free to use PyCBA for any purpose, including commercial and professional work — but software that incorporates it, whether distributed or offered over a network (SaaS), must in turn be released under the AGPL. This keeps PyCBA open while preventing proprietary appropriation.

📦 Install / upgrade

pip install --upgrade pycba
pip install "pycba[plotly]"   # optional interactive plots

Python 3.9+. Core dependencies remain just numpy, scipy and matplotlib.


Full changelog: https://github.com/ccaprani/pycba/blob/main/CHANGELOG.md · compare: v0.6.0...v1.0.1
Docs & tutorials: https://ccaprani.github.io/pycba/

Thank you to everyone who has used, taught with, and contributed to PyCBA on the road to 1.0. 🚀