timoshenko-engine 2.0.3__tar.gz → 2.2.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 (80) hide show
  1. {timoshenko_engine-2.0.3 → timoshenko_engine-2.2.0}/PKG-INFO +74 -19
  2. {timoshenko_engine-2.0.3 → timoshenko_engine-2.2.0}/README.md +70 -18
  3. {timoshenko_engine-2.0.3 → timoshenko_engine-2.2.0}/pyproject.toml +10 -2
  4. {timoshenko_engine-2.0.3 → timoshenko_engine-2.2.0}/src/timoshenko/__init__.py +186 -30
  5. timoshenko_engine-2.2.0/src/timoshenko/_spectral.py +34 -0
  6. {timoshenko_engine-2.0.3 → timoshenko_engine-2.2.0}/src/timoshenko/adapters.py +21 -6
  7. timoshenko_engine-2.2.0/src/timoshenko/alignment.py +287 -0
  8. {timoshenko_engine-2.0.3 → timoshenko_engine-2.2.0}/src/timoshenko/assets.py +10 -2
  9. timoshenko_engine-2.2.0/src/timoshenko/beams.py +145 -0
  10. {timoshenko_engine-2.0.3 → timoshenko_engine-2.2.0}/src/timoshenko/csv_source.py +34 -13
  11. timoshenko_engine-2.2.0/src/timoshenko/dynamics.py +213 -0
  12. timoshenko_engine-2.2.0/src/timoshenko/environmental.py +147 -0
  13. {timoshenko_engine-2.0.3 → timoshenko_engine-2.2.0}/src/timoshenko/health.py +16 -10
  14. {timoshenko_engine-2.0.3 → timoshenko_engine-2.2.0}/src/timoshenko/mechanics.py +2 -1
  15. {timoshenko_engine-2.0.3 → timoshenko_engine-2.2.0}/src/timoshenko/modal.py +57 -14
  16. timoshenko_engine-2.2.0/src/timoshenko/model_update.py +172 -0
  17. {timoshenko_engine-2.0.3 → timoshenko_engine-2.2.0}/src/timoshenko/monitor.py +23 -4
  18. {timoshenko_engine-2.0.3 → timoshenko_engine-2.2.0}/src/timoshenko/mqtt.py +55 -20
  19. {timoshenko_engine-2.0.3 → timoshenko_engine-2.2.0}/src/timoshenko/multichannel.py +22 -7
  20. {timoshenko_engine-2.0.3 → timoshenko_engine-2.2.0}/src/timoshenko/observations.py +6 -2
  21. {timoshenko_engine-2.0.3 → timoshenko_engine-2.2.0}/src/timoshenko/oma.py +132 -22
  22. {timoshenko_engine-2.0.3 → timoshenko_engine-2.2.0}/src/timoshenko/plugins.py +19 -7
  23. {timoshenko_engine-2.0.3 → timoshenko_engine-2.2.0}/src/timoshenko/polygon.py +125 -14
  24. timoshenko_engine-2.2.0/src/timoshenko/postgres.py +493 -0
  25. {timoshenko_engine-2.0.3 → timoshenko_engine-2.2.0}/src/timoshenko/pressure.py +15 -8
  26. {timoshenko_engine-2.0.3 → timoshenko_engine-2.2.0}/src/timoshenko/project.py +9 -2
  27. {timoshenko_engine-2.0.3 → timoshenko_engine-2.2.0}/src/timoshenko/report.py +43 -25
  28. {timoshenko_engine-2.0.3 → timoshenko_engine-2.2.0}/src/timoshenko/sections.py +36 -6
  29. {timoshenko_engine-2.0.3 → timoshenko_engine-2.2.0}/src/timoshenko/sensors.py +3 -2
  30. {timoshenko_engine-2.0.3 → timoshenko_engine-2.2.0}/src/timoshenko/sensorthings.py +67 -16
  31. {timoshenko_engine-2.0.3 → timoshenko_engine-2.2.0}/src/timoshenko/session.py +61 -24
  32. timoshenko_engine-2.2.0/src/timoshenko/shafts.py +52 -0
  33. timoshenko_engine-2.2.0/src/timoshenko/ssi.py +324 -0
  34. timoshenko_engine-2.2.0/src/timoshenko/stability.py +39 -0
  35. {timoshenko_engine-2.0.3 → timoshenko_engine-2.2.0}/src/timoshenko/storage.py +158 -19
  36. {timoshenko_engine-2.0.3 → timoshenko_engine-2.2.0}/src/timoshenko/strength.py +13 -3
  37. timoshenko_engine-2.2.0/src/timoshenko/structural.py +1640 -0
  38. timoshenko_engine-2.2.0/src/timoshenko/structural_3d.py +528 -0
  39. {timoshenko_engine-2.0.3 → timoshenko_engine-2.2.0}/src/timoshenko/structure.py +15 -7
  40. {timoshenko_engine-2.0.3 → timoshenko_engine-2.2.0}/src/timoshenko/uncertainty.py +44 -15
  41. {timoshenko_engine-2.0.3 → timoshenko_engine-2.2.0}/src/timoshenko/update.py +6 -2
  42. {timoshenko_engine-2.0.3 → timoshenko_engine-2.2.0}/src/timoshenko/vibration.py +30 -7
  43. {timoshenko_engine-2.0.3 → timoshenko_engine-2.2.0}/src/timoshenko_engine.egg-info/PKG-INFO +74 -19
  44. {timoshenko_engine-2.0.3 → timoshenko_engine-2.2.0}/src/timoshenko_engine.egg-info/SOURCES.txt +20 -0
  45. {timoshenko_engine-2.0.3 → timoshenko_engine-2.2.0}/src/timoshenko_engine.egg-info/requires.txt +3 -0
  46. timoshenko_engine-2.2.0/tests/test_adapters.py +991 -0
  47. timoshenko_engine-2.2.0/tests/test_csv_source.py +163 -0
  48. timoshenko_engine-2.2.0/tests/test_dynamics.py +252 -0
  49. timoshenko_engine-2.2.0/tests/test_environmental.py +129 -0
  50. timoshenko_engine-2.2.0/tests/test_examples.py +72 -0
  51. timoshenko_engine-2.2.0/tests/test_formulas.py +394 -0
  52. {timoshenko_engine-2.0.3 → timoshenko_engine-2.2.0}/tests/test_modal.py +213 -30
  53. timoshenko_engine-2.2.0/tests/test_model_update.py +132 -0
  54. timoshenko_engine-2.2.0/tests/test_multichannel_csv.py +21 -0
  55. timoshenko_engine-2.2.0/tests/test_oma_advanced.py +219 -0
  56. {timoshenko_engine-2.0.3 → timoshenko_engine-2.2.0}/tests/test_package.py +24 -10
  57. timoshenko_engine-2.2.0/tests/test_polygon.py +201 -0
  58. timoshenko_engine-2.2.0/tests/test_postgres_store.py +127 -0
  59. timoshenko_engine-2.2.0/tests/test_project_report.py +312 -0
  60. timoshenko_engine-2.2.0/tests/test_sensor_inputs.py +193 -0
  61. timoshenko_engine-2.2.0/tests/test_storage_session.py +476 -0
  62. timoshenko_engine-2.2.0/tests/test_structural.py +1419 -0
  63. timoshenko_engine-2.2.0/tests/test_structural_3d.py +211 -0
  64. timoshenko_engine-2.2.0/tests/test_uncertainty.py +306 -0
  65. timoshenko_engine-2.0.3/src/timoshenko/beams.py +0 -75
  66. timoshenko_engine-2.0.3/src/timoshenko/shafts.py +0 -36
  67. timoshenko_engine-2.0.3/src/timoshenko/stability.py +0 -30
  68. timoshenko_engine-2.0.3/tests/test_adapters.py +0 -425
  69. timoshenko_engine-2.0.3/tests/test_formulas.py +0 -189
  70. timoshenko_engine-2.0.3/tests/test_polygon.py +0 -105
  71. timoshenko_engine-2.0.3/tests/test_project_report.py +0 -120
  72. timoshenko_engine-2.0.3/tests/test_storage_session.py +0 -230
  73. timoshenko_engine-2.0.3/tests/test_uncertainty.py +0 -79
  74. {timoshenko_engine-2.0.3 → timoshenko_engine-2.2.0}/LICENSE +0 -0
  75. {timoshenko_engine-2.0.3 → timoshenko_engine-2.2.0}/setup.cfg +0 -0
  76. {timoshenko_engine-2.0.3 → timoshenko_engine-2.2.0}/src/timoshenko/_validation.py +0 -0
  77. {timoshenko_engine-2.0.3 → timoshenko_engine-2.2.0}/src/timoshenko/py.typed +0 -0
  78. {timoshenko_engine-2.0.3 → timoshenko_engine-2.2.0}/src/timoshenko_engine.egg-info/dependency_links.txt +0 -0
  79. {timoshenko_engine-2.0.3 → timoshenko_engine-2.2.0}/src/timoshenko_engine.egg-info/entry_points.txt +0 -0
  80. {timoshenko_engine-2.0.3 → timoshenko_engine-2.2.0}/src/timoshenko_engine.egg-info/top_level.txt +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: timoshenko-engine
3
- Version: 2.0.3
3
+ Version: 2.2.0
4
4
  Summary: Composable structural engineering calculations and analysis primitives for Python applications.
5
5
  Author: Ayberk Korkmaz
6
6
  License-Expression: Apache-2.0
@@ -18,6 +18,7 @@ Classifier: Programming Language :: Python :: 3.10
18
18
  Classifier: Programming Language :: Python :: 3.11
19
19
  Classifier: Programming Language :: Python :: 3.12
20
20
  Classifier: Programming Language :: Python :: 3.13
21
+ Classifier: Programming Language :: Python :: 3.14
21
22
  Classifier: Topic :: Scientific/Engineering
22
23
  Classifier: Typing :: Typed
23
24
  Requires-Python: >=3.10
@@ -34,6 +35,8 @@ Requires-Dist: ruff>=0.6; extra == "lint"
34
35
  Requires-Dist: mypy>=1.10; extra == "lint"
35
36
  Provides-Extra: docs
36
37
  Requires-Dist: mkdocs-material<10,>=9.5; extra == "docs"
38
+ Provides-Extra: postgres
39
+ Requires-Dist: psycopg[binary]<4,>=3.2; extra == "postgres"
37
40
  Dynamic: license-file
38
41
 
39
42
  <p align="center">
@@ -55,13 +58,30 @@ Dynamic: license-file
55
58
  <a href="https://github.com/Ayberkrk/timoshenko/actions/workflows/tests.yml"><img alt="Tests" src="https://github.com/Ayberkrk/timoshenko/actions/workflows/tests.yml/badge.svg"></a>
56
59
  <a href="https://github.com/Ayberkrk/timoshenko/tree/python-coverage-comment-action-data"><img alt="Coverage" src="https://img.shields.io/endpoint?url=https%3A%2F%2Fraw.githubusercontent.com%2FAyberkrk%2Ftimoshenko%2Fpython-coverage-comment-action-data%2Fendpoint.json&style=for-the-badge"></a>
57
60
  <a href="https://timoshenko.readthedocs.io/en/latest/"><img alt="Documentation" src="https://img.shields.io/readthedocs/timoshenko?style=for-the-badge"></a>
61
+ <a href="https://github.com/Ayberkrk/timoshenko/labels/good%20first%20issue"><img alt="Good first issues" src="https://img.shields.io/github/issues/Ayberkrk/timoshenko/good%20first%20issue?style=for-the-badge&label=good%20first%20issues"></a>
58
62
  </p>
59
63
 
60
- Timoshenko packages common structural calculations, modal analysis, sensor
61
- workflows, and monitoring components so applications can reuse them instead
62
- of rebuilding the same foundations for every project. It is an embeddable
63
- Python library, not a hosted monitoring service or a general finite-element
64
- solver.
64
+ Monitoring a bridge or building usually means writing the same code again:
65
+ modal identification from accelerometer records, comparison against a
66
+ reference model, stiffness updating, and a decision on whether a frequency
67
+ shift needs an engineer's review. Timoshenko packages these steps as a
68
+ tested, embeddable Python library so a monitoring application can call them
69
+ instead of rebuilding them.
70
+
71
+ - **Modal identification:** peak picking, FDD/EFDD and covariance-driven SSI,
72
+ including asynchronous channel alignment
73
+ - **Model comparison and updating:** frequency and MAC checks, global and
74
+ per-story stiffness updating, environmental normalization
75
+ - **Health assessment:** evidence-oriented mode-change reports with a review
76
+ threshold that you choose explicitly
77
+ - **Structural models:** shear buildings plus linear 2D/3D trusses and frames
78
+ (static, modal, buckling, Newmark time history)
79
+ - **Monitoring runtime:** rolling-window sessions with SQLite/PostgreSQL
80
+ history and CSV, MQTT and OGC SensorThings sources
81
+ - **Engineering calculations:** section properties, beam, torsion and
82
+ buckling formulas, and GUM/Monte Carlo uncertainty
83
+
84
+ It is not a hosted monitoring service or a general finite-element solver.
65
85
 
66
86
  > **Alpha:** the API may still change between releases. Every behavior change
67
87
  > is listed in the [changelog](https://timoshenko.readthedocs.io/en/latest/changelog/).
@@ -79,6 +99,10 @@ The distribution is named `timoshenko-engine`; the import package is
79
99
  python -m pip install "timoshenko-engine[mqtt]"
80
100
  ```
81
101
 
102
+ For the synchronous PostgreSQL history backend, install
103
+ `timoshenko-engine[postgres]`. SQLite is included with Python and needs no
104
+ extra dependency.
105
+
82
106
  ## Quick start
83
107
 
84
108
  Compare measured vibration with a reference model. This example simulates a
@@ -93,7 +117,7 @@ structure = tm.Structure(
93
117
  story_masses_kg=[120_000.0, 110_000.0],
94
118
  story_stiffness_n_m=[85_000_000.0, 70_000_000.0],
95
119
  )
96
- print(structure.natural_frequencies_hz) # (2.626, 6.476)
120
+ print(structure.natural_frequencies_hz) # (2.626, 6.476)
97
121
 
98
122
  fs = 100.0
99
123
  t = np.arange(60_000) / fs
@@ -102,10 +126,10 @@ signal = np.sin(2 * np.pi * f1 * t) + 0.4 * np.sin(2 * np.pi * f2 * t)
102
126
  sensors = tm.SensorData(signal, sampling_hz=fs, unit="m/s^2")
103
127
 
104
128
  result = tm.monitor(structure, sensors, review_threshold_pct=3.0)
105
- print(result.structure.update_scale_factor) # 0.903, since stiffness scales with frequency squared
129
+ print(result.structure.update_scale_factor) # 0.903, since stiffness scales with frequency squared
106
130
  for change in result.health.mode_changes:
107
131
  print(change.mode_number, change.change_pct) # 1 -5.0, then 2 -5.0
108
- print(result.health.review_recommended) # True
132
+ print(result.health.review_recommended) # True
109
133
  ```
110
134
 
111
135
  <p align="center">
@@ -128,8 +152,12 @@ import timoshenko as tm
128
152
 
129
153
  section = tm.rectangle_section(width_m=0.3, height_m=0.6)
130
154
  beam = tm.simply_supported_uniform_load(
131
- 20_000.0, 6.0, 30e9, section.second_moment_y_m4,
132
- shear_modulus_pa=12.5e9, area_m2=section.area_m2,
155
+ 20_000.0,
156
+ 6.0,
157
+ 30e9,
158
+ section.second_moment_y_m4,
159
+ shear_modulus_pa=12.5e9,
160
+ area_m2=section.area_m2,
133
161
  )
134
162
  print(beam.bending_m, beam.shear_m) # 2.083 mm bending, 0.048 mm shear
135
163
 
@@ -141,16 +169,22 @@ frequency = tm.propagate_uncertainty(
141
169
  print(frequency.estimate, frequency.standard_uncertainty) # 6.366 Hz ± 0.090 Hz
142
170
  ```
143
171
 
172
+ Planar members can also be assembled into a small-displacement linear frame
173
+ model. Supports, nodal loads, local uniform loads and member masses are
174
+ explicit model inputs. See [2D frame analysis](https://timoshenko.readthedocs.io/en/latest/structural-analysis/)
175
+ for the stiffness, mass and scope assumptions.
176
+
144
177
  ## What it provides
145
178
 
146
179
  | Area | Components |
147
180
  |---|---|
148
181
  | Engineering calculations | Section properties (including polygons with holes), beam deflection with shear, torsion, Euler buckling, plane stress, thin-wall pressure, SDOF vibration, Rayleigh damping, and GUM / Monte Carlo uncertainty |
149
- | Structural models | Lumped-mass shear-building models and their natural frequencies |
150
- | Modal analysis | Single-channel peak picking with resolution-checked damping, and multi-channel FDD with complex mode shapes |
151
- | Model comparison | Nearest-frequency mode pairing, global stiffness updating, and evidence-oriented health assessment |
152
- | Monitoring | Bounded rolling-window sessions, restart from local history, and source adapters for CSV, MQTT, and OGC SensorThings |
153
- | Data and reporting | Project manifests with SHA-256 provenance, local SQLite history, and standalone HTML reports |
182
+ | Structural models | Lumped-mass shear buildings; linear 2D trusses and frames with static, modal, P-delta and buckling analysis; and linear 3D trusses and frames with static, modal and ideal buckling analysis |
183
+ | Modal analysis | Single-channel peak picking, optional EFDD damping, multi-channel FDD, covariance-driven SSI and asynchronous channel alignment |
184
+ | Model comparison | Frequency and MAC tools, global and per-story stiffness updating, environmental frequency normalization, and evidence-oriented health assessment |
185
+ | Time history | Newmark average-acceleration response with optional Rayleigh damping and base acceleration for 2D and 3D models |
186
+ | Monitoring | Bounded rolling-window sessions, restart from SQLite or PostgreSQL history, and source adapters for CSV, MQTT, and OGC SensorThings |
187
+ | Data and reporting | Project manifests with SHA-256 provenance, SQLite and optional PostgreSQL history, and standalone HTML reports |
154
188
 
155
189
  Sensor collection, alarm policy, and engineering interpretation remain with the
156
190
  application that embeds Timoshenko.
@@ -158,7 +192,10 @@ application that embeds Timoshenko.
158
192
  ## Multi-channel modal analysis
159
193
 
160
194
  Frequency domain decomposition needs synchronized channels with a common
161
- sample rate and unit:
195
+ sample rate and unit. FDD can optionally estimate damping with EFDD; use
196
+ covariance-driven SSI when you also need a pole-stability screening indicator.
197
+ For asynchronous sources, `tm.align_multichannel` can apply explicit clock
198
+ offsets and calibration before resampling onto one shared grid:
162
199
 
163
200
  ```python
164
201
  signals = tm.load_multichannel_csv(
@@ -172,6 +209,9 @@ for mode in fdd.modes:
172
209
  print(mode.frequency_hz, mode.shape_real)
173
210
  ```
174
211
 
212
+ Pass `estimate_damping=True` to request EFDD damping estimates; unresolved
213
+ estimates are returned as `None`. See [advanced OMA and channel alignment](https://timoshenko.readthedocs.io/en/latest/advanced-oma/).
214
+
175
215
  ## Monitoring sessions
176
216
 
177
217
  A host application feeds timestamped observation batches. The session aligns
@@ -215,8 +255,9 @@ The full documentation is at
215
255
  - Timoshenko is alpha software and is not a structural safety certification tool.
216
256
  - The shear-building model is a small lumped-mass reference model, not a full FEM solver.
217
257
  - Modal identification is a screening estimate. A single sensor may miss a mode near a modal node; unpaired peaks are reported rather than compared with the wrong mode.
218
- - Damping is a coarse screening estimate, reported only when the averaged spectrum resolves the half-power bandwidth. FDD does not estimate damping.
219
- - The model update applies a single stiffness scale. It cannot locate or size local damage.
258
+ - Damping is a screening estimate. Peak-picking requires a resolved half-power bandwidth; EFDD and SSI damping can be sensitive to record length, mode overlap and model settings.
259
+ - `tm.update` applies one stiffness scale to all stories. `tm.update_story_stiffness` fits individual story scales from a complete ordered modal set, but neither method locates or sizes damage reliably without an identifiable model and engineering review.
260
+ - The 3D solver uses dense matrices, prismatic Euler-Bernoulli frame members, ideal restraints and nodal loads. It does not analyze plates, shells, nonlinear response or design-code compliance.
220
261
  - A frequency shift is evidence for human review, not a damage verdict. Temperature, sensor placement, boundary conditions, and other effects also shift measured frequencies.
221
262
  - Closed-form mechanics and section functions rely on their documented ideal assumptions. They are not code-compliance checks.
222
263
 
@@ -226,6 +267,7 @@ The full documentation is at
226
267
  python -m pip install -e ".[test,lint]"
227
268
  python -m pytest --cov
228
269
  python -m ruff check .
270
+ python -m ruff format --check .
229
271
  python -m mypy
230
272
  ```
231
273
 
@@ -252,6 +294,19 @@ always resolves to the latest release; each release also has its own DOI on
252
294
  [`CITATION.cff`](https://github.com/Ayberkrk/timoshenko/blob/main/CITATION.cff),
253
295
  which GitHub's "Cite this repository" button reads.
254
296
 
297
+ Author: Ayberk Korkmaz, Eskişehir Osmangazi University
298
+ ([ORCID 0009-0009-0699-090X](https://orcid.org/0009-0009-0699-090X)).
299
+
300
+ ## Contributors
301
+
302
+ Thanks to everyone who has contributed:
303
+
304
+ <a href="https://github.com/Ayberkrk/timoshenko/graphs/contributors">
305
+ <img src="https://contrib.rocks/image?repo=Ayberkrk/timoshenko" alt="Contributors" />
306
+ </a>
307
+
308
+ New here? The [good first issues](https://github.com/Ayberkrk/timoshenko/issues?q=is%3Aissue+is%3Aopen+label%3A%22good+first+issue%22) each come with a clear "done when" check, and questions are welcome in [Discussions](https://github.com/Ayberkrk/timoshenko/discussions). If the project is useful to you, a star helps others find it.
309
+
255
310
  ## License
256
311
 
257
312
  Apache License 2.0. See [LICENSE](https://github.com/Ayberkrk/timoshenko/blob/main/LICENSE).
@@ -17,13 +17,30 @@
17
17
  <a href="https://github.com/Ayberkrk/timoshenko/actions/workflows/tests.yml"><img alt="Tests" src="https://github.com/Ayberkrk/timoshenko/actions/workflows/tests.yml/badge.svg"></a>
18
18
  <a href="https://github.com/Ayberkrk/timoshenko/tree/python-coverage-comment-action-data"><img alt="Coverage" src="https://img.shields.io/endpoint?url=https%3A%2F%2Fraw.githubusercontent.com%2FAyberkrk%2Ftimoshenko%2Fpython-coverage-comment-action-data%2Fendpoint.json&style=for-the-badge"></a>
19
19
  <a href="https://timoshenko.readthedocs.io/en/latest/"><img alt="Documentation" src="https://img.shields.io/readthedocs/timoshenko?style=for-the-badge"></a>
20
+ <a href="https://github.com/Ayberkrk/timoshenko/labels/good%20first%20issue"><img alt="Good first issues" src="https://img.shields.io/github/issues/Ayberkrk/timoshenko/good%20first%20issue?style=for-the-badge&label=good%20first%20issues"></a>
20
21
  </p>
21
22
 
22
- Timoshenko packages common structural calculations, modal analysis, sensor
23
- workflows, and monitoring components so applications can reuse them instead
24
- of rebuilding the same foundations for every project. It is an embeddable
25
- Python library, not a hosted monitoring service or a general finite-element
26
- solver.
23
+ Monitoring a bridge or building usually means writing the same code again:
24
+ modal identification from accelerometer records, comparison against a
25
+ reference model, stiffness updating, and a decision on whether a frequency
26
+ shift needs an engineer's review. Timoshenko packages these steps as a
27
+ tested, embeddable Python library so a monitoring application can call them
28
+ instead of rebuilding them.
29
+
30
+ - **Modal identification:** peak picking, FDD/EFDD and covariance-driven SSI,
31
+ including asynchronous channel alignment
32
+ - **Model comparison and updating:** frequency and MAC checks, global and
33
+ per-story stiffness updating, environmental normalization
34
+ - **Health assessment:** evidence-oriented mode-change reports with a review
35
+ threshold that you choose explicitly
36
+ - **Structural models:** shear buildings plus linear 2D/3D trusses and frames
37
+ (static, modal, buckling, Newmark time history)
38
+ - **Monitoring runtime:** rolling-window sessions with SQLite/PostgreSQL
39
+ history and CSV, MQTT and OGC SensorThings sources
40
+ - **Engineering calculations:** section properties, beam, torsion and
41
+ buckling formulas, and GUM/Monte Carlo uncertainty
42
+
43
+ It is not a hosted monitoring service or a general finite-element solver.
27
44
 
28
45
  > **Alpha:** the API may still change between releases. Every behavior change
29
46
  > is listed in the [changelog](https://timoshenko.readthedocs.io/en/latest/changelog/).
@@ -41,6 +58,10 @@ The distribution is named `timoshenko-engine`; the import package is
41
58
  python -m pip install "timoshenko-engine[mqtt]"
42
59
  ```
43
60
 
61
+ For the synchronous PostgreSQL history backend, install
62
+ `timoshenko-engine[postgres]`. SQLite is included with Python and needs no
63
+ extra dependency.
64
+
44
65
  ## Quick start
45
66
 
46
67
  Compare measured vibration with a reference model. This example simulates a
@@ -55,7 +76,7 @@ structure = tm.Structure(
55
76
  story_masses_kg=[120_000.0, 110_000.0],
56
77
  story_stiffness_n_m=[85_000_000.0, 70_000_000.0],
57
78
  )
58
- print(structure.natural_frequencies_hz) # (2.626, 6.476)
79
+ print(structure.natural_frequencies_hz) # (2.626, 6.476)
59
80
 
60
81
  fs = 100.0
61
82
  t = np.arange(60_000) / fs
@@ -64,10 +85,10 @@ signal = np.sin(2 * np.pi * f1 * t) + 0.4 * np.sin(2 * np.pi * f2 * t)
64
85
  sensors = tm.SensorData(signal, sampling_hz=fs, unit="m/s^2")
65
86
 
66
87
  result = tm.monitor(structure, sensors, review_threshold_pct=3.0)
67
- print(result.structure.update_scale_factor) # 0.903, since stiffness scales with frequency squared
88
+ print(result.structure.update_scale_factor) # 0.903, since stiffness scales with frequency squared
68
89
  for change in result.health.mode_changes:
69
90
  print(change.mode_number, change.change_pct) # 1 -5.0, then 2 -5.0
70
- print(result.health.review_recommended) # True
91
+ print(result.health.review_recommended) # True
71
92
  ```
72
93
 
73
94
  <p align="center">
@@ -90,8 +111,12 @@ import timoshenko as tm
90
111
 
91
112
  section = tm.rectangle_section(width_m=0.3, height_m=0.6)
92
113
  beam = tm.simply_supported_uniform_load(
93
- 20_000.0, 6.0, 30e9, section.second_moment_y_m4,
94
- shear_modulus_pa=12.5e9, area_m2=section.area_m2,
114
+ 20_000.0,
115
+ 6.0,
116
+ 30e9,
117
+ section.second_moment_y_m4,
118
+ shear_modulus_pa=12.5e9,
119
+ area_m2=section.area_m2,
95
120
  )
96
121
  print(beam.bending_m, beam.shear_m) # 2.083 mm bending, 0.048 mm shear
97
122
 
@@ -103,16 +128,22 @@ frequency = tm.propagate_uncertainty(
103
128
  print(frequency.estimate, frequency.standard_uncertainty) # 6.366 Hz ± 0.090 Hz
104
129
  ```
105
130
 
131
+ Planar members can also be assembled into a small-displacement linear frame
132
+ model. Supports, nodal loads, local uniform loads and member masses are
133
+ explicit model inputs. See [2D frame analysis](https://timoshenko.readthedocs.io/en/latest/structural-analysis/)
134
+ for the stiffness, mass and scope assumptions.
135
+
106
136
  ## What it provides
107
137
 
108
138
  | Area | Components |
109
139
  |---|---|
110
140
  | Engineering calculations | Section properties (including polygons with holes), beam deflection with shear, torsion, Euler buckling, plane stress, thin-wall pressure, SDOF vibration, Rayleigh damping, and GUM / Monte Carlo uncertainty |
111
- | Structural models | Lumped-mass shear-building models and their natural frequencies |
112
- | Modal analysis | Single-channel peak picking with resolution-checked damping, and multi-channel FDD with complex mode shapes |
113
- | Model comparison | Nearest-frequency mode pairing, global stiffness updating, and evidence-oriented health assessment |
114
- | Monitoring | Bounded rolling-window sessions, restart from local history, and source adapters for CSV, MQTT, and OGC SensorThings |
115
- | Data and reporting | Project manifests with SHA-256 provenance, local SQLite history, and standalone HTML reports |
141
+ | Structural models | Lumped-mass shear buildings; linear 2D trusses and frames with static, modal, P-delta and buckling analysis; and linear 3D trusses and frames with static, modal and ideal buckling analysis |
142
+ | Modal analysis | Single-channel peak picking, optional EFDD damping, multi-channel FDD, covariance-driven SSI and asynchronous channel alignment |
143
+ | Model comparison | Frequency and MAC tools, global and per-story stiffness updating, environmental frequency normalization, and evidence-oriented health assessment |
144
+ | Time history | Newmark average-acceleration response with optional Rayleigh damping and base acceleration for 2D and 3D models |
145
+ | Monitoring | Bounded rolling-window sessions, restart from SQLite or PostgreSQL history, and source adapters for CSV, MQTT, and OGC SensorThings |
146
+ | Data and reporting | Project manifests with SHA-256 provenance, SQLite and optional PostgreSQL history, and standalone HTML reports |
116
147
 
117
148
  Sensor collection, alarm policy, and engineering interpretation remain with the
118
149
  application that embeds Timoshenko.
@@ -120,7 +151,10 @@ application that embeds Timoshenko.
120
151
  ## Multi-channel modal analysis
121
152
 
122
153
  Frequency domain decomposition needs synchronized channels with a common
123
- sample rate and unit:
154
+ sample rate and unit. FDD can optionally estimate damping with EFDD; use
155
+ covariance-driven SSI when you also need a pole-stability screening indicator.
156
+ For asynchronous sources, `tm.align_multichannel` can apply explicit clock
157
+ offsets and calibration before resampling onto one shared grid:
124
158
 
125
159
  ```python
126
160
  signals = tm.load_multichannel_csv(
@@ -134,6 +168,9 @@ for mode in fdd.modes:
134
168
  print(mode.frequency_hz, mode.shape_real)
135
169
  ```
136
170
 
171
+ Pass `estimate_damping=True` to request EFDD damping estimates; unresolved
172
+ estimates are returned as `None`. See [advanced OMA and channel alignment](https://timoshenko.readthedocs.io/en/latest/advanced-oma/).
173
+
137
174
  ## Monitoring sessions
138
175
 
139
176
  A host application feeds timestamped observation batches. The session aligns
@@ -177,8 +214,9 @@ The full documentation is at
177
214
  - Timoshenko is alpha software and is not a structural safety certification tool.
178
215
  - The shear-building model is a small lumped-mass reference model, not a full FEM solver.
179
216
  - Modal identification is a screening estimate. A single sensor may miss a mode near a modal node; unpaired peaks are reported rather than compared with the wrong mode.
180
- - Damping is a coarse screening estimate, reported only when the averaged spectrum resolves the half-power bandwidth. FDD does not estimate damping.
181
- - The model update applies a single stiffness scale. It cannot locate or size local damage.
217
+ - Damping is a screening estimate. Peak-picking requires a resolved half-power bandwidth; EFDD and SSI damping can be sensitive to record length, mode overlap and model settings.
218
+ - `tm.update` applies one stiffness scale to all stories. `tm.update_story_stiffness` fits individual story scales from a complete ordered modal set, but neither method locates or sizes damage reliably without an identifiable model and engineering review.
219
+ - The 3D solver uses dense matrices, prismatic Euler-Bernoulli frame members, ideal restraints and nodal loads. It does not analyze plates, shells, nonlinear response or design-code compliance.
182
220
  - A frequency shift is evidence for human review, not a damage verdict. Temperature, sensor placement, boundary conditions, and other effects also shift measured frequencies.
183
221
  - Closed-form mechanics and section functions rely on their documented ideal assumptions. They are not code-compliance checks.
184
222
 
@@ -188,6 +226,7 @@ The full documentation is at
188
226
  python -m pip install -e ".[test,lint]"
189
227
  python -m pytest --cov
190
228
  python -m ruff check .
229
+ python -m ruff format --check .
191
230
  python -m mypy
192
231
  ```
193
232
 
@@ -214,6 +253,19 @@ always resolves to the latest release; each release also has its own DOI on
214
253
  [`CITATION.cff`](https://github.com/Ayberkrk/timoshenko/blob/main/CITATION.cff),
215
254
  which GitHub's "Cite this repository" button reads.
216
255
 
256
+ Author: Ayberk Korkmaz, Eskişehir Osmangazi University
257
+ ([ORCID 0009-0009-0699-090X](https://orcid.org/0009-0009-0699-090X)).
258
+
259
+ ## Contributors
260
+
261
+ Thanks to everyone who has contributed:
262
+
263
+ <a href="https://github.com/Ayberkrk/timoshenko/graphs/contributors">
264
+ <img src="https://contrib.rocks/image?repo=Ayberkrk/timoshenko" alt="Contributors" />
265
+ </a>
266
+
267
+ New here? The [good first issues](https://github.com/Ayberkrk/timoshenko/issues?q=is%3Aissue+is%3Aopen+label%3A%22good+first+issue%22) each come with a clear "done when" check, and questions are welcome in [Discussions](https://github.com/Ayberkrk/timoshenko/discussions). If the project is useful to you, a star helps others find it.
268
+
217
269
  ## License
218
270
 
219
271
  Apache License 2.0. See [LICENSE](https://github.com/Ayberkrk/timoshenko/blob/main/LICENSE).
@@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta"
4
4
 
5
5
  [project]
6
6
  name = "timoshenko-engine"
7
- version = "2.0.3"
7
+ version = "2.2.0"
8
8
  description = "Composable structural engineering calculations and analysis primitives for Python applications."
9
9
  readme = "README.md"
10
10
  requires-python = ">=3.10"
@@ -28,6 +28,7 @@ classifiers = [
28
28
  "Programming Language :: Python :: 3.11",
29
29
  "Programming Language :: Python :: 3.12",
30
30
  "Programming Language :: Python :: 3.13",
31
+ "Programming Language :: Python :: 3.14",
31
32
  "Topic :: Scientific/Engineering",
32
33
  "Typing :: Typed",
33
34
  ]
@@ -37,6 +38,7 @@ mqtt = ["paho-mqtt>=2.1,<3"]
37
38
  test = ["pytest>=7", "pytest-cov>=5"]
38
39
  lint = ["ruff>=0.6", "mypy>=1.10"]
39
40
  docs = ["mkdocs-material>=9.5,<10"]
41
+ postgres = ["psycopg[binary]>=3.2,<4"]
40
42
 
41
43
  [project.entry-points."timoshenko.plugins"]
42
44
  mqtt = "timoshenko.mqtt:MqttPlugin"
@@ -68,16 +70,22 @@ relative_files = true
68
70
 
69
71
  [tool.coverage.report]
70
72
  show_missing = true
73
+ fail_under = 90
71
74
 
72
75
  [tool.ruff]
73
76
  target-version = "py310"
74
77
  src = ["src", "tests"]
78
+ line-length = 100
75
79
 
76
80
  [tool.ruff.lint]
77
- select = ["E4", "E7", "E9", "F"]
81
+ select = ["E4", "E7", "E9", "F", "I", "B", "SIM", "C4", "PT011", "PT012"]
82
+
83
+ [tool.ruff.lint.isort]
84
+ force-sort-within-sections = true
78
85
 
79
86
  [tool.mypy]
80
87
  files = ["src/timoshenko"]
81
88
  check_untyped_defs = true
89
+ disallow_untyped_defs = true
82
90
  warn_unused_ignores = true
83
91
  warn_redundant_casts = true