Skip to content

feat(schema): mechanical sub-table additions (#151)#189

Merged
gerchowl merged 1 commit into
mainfrom
feature/151-mechanical-fields
May 6, 2026
Merged

feat(schema): mechanical sub-table additions (#151)#189
gerchowl merged 1 commit into
mainfrom
feature/151-mechanical-fields

Conversation

@gerchowl
Copy link
Copy Markdown
Contributor

@gerchowl gerchowl commented May 6, 2026

Summary

Pure additive — 5 new optional fields on MechanicalProperties. No backwards-compat concern, no API surface change.

Field Unit Use case
flexural_modulus MPa plastics & ceramics datasheets
flexural_strength MPa plastics & ceramics datasheets
fatigue_limit MPa cyclic gantry loads
cti V PCB substrate selection (Comparative Tracking Index)
cte_anisotropic ppm/K [a, b, c] for non-cubic crystals (sapphire, quartz)
creep_rate [{temp_K, stress_MPa, strain_per_hr}, ...] sparse points for cryostat long-term loads

Plus matching *_qty Pint-Quantity accessors for the 4 new scalar fields.

creep_rate is stored as a plain list[dict] rather than a new dataclass — points are sparse and heterogeneous; consumers index by temp/stress as needed. Promotable to a structured type later if a real consumer surfaces.

Test plan

  • pytest tests/test_mechanical_fields.py — 8 tests pass
  • Full suite: 552 passed, 11 skipped, zero regressions
  • ruff check clean, ruff format no diff

Closes #151

Pure additive — no backwards-compat concern. New optional fields on
MechanicalProperties:

- flexural_modulus / flexural_strength (MPa) — plastics & ceramics
  datasheets
- fatigue_limit (MPa) — cyclic gantry loads
- cti (V) — PCB substrate selection
- cte_anisotropic = [a, b, c] (ppm/K, list-of-3) — non-cubic crystals
  like sapphire/quartz where direction-dependent thermal expansion
  matters
- creep_rate = [{temp_K, stress_MPa, strain_per_hr}, ...] — sparse
  creep measurements for cryostat long-term load planning. Stored as
  a plain list[dict] (no special dataclass — points are sparse and
  heterogeneous; consumers index by temp/stress as needed)

Plus matching `*_qty` Pint-Quantity accessors for the 4 new scalar
fields.

Tests: tests/test_mechanical_fields.py (8 tests) + full corpus
regression. 552 passed, 11 skipped, no regressions.

Closes #151
@gerchowl gerchowl merged commit fd21d46 into main May 6, 2026
19 checks passed
@gerchowl gerchowl deleted the feature/151-mechanical-fields branch May 6, 2026 19:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Schema: mechanical sub-table additions

1 participant