tpt-engineering

Rust

Applied engineering primitives (fluid/gas properties, sensor timeseries alignment, infrastructure topology, control systems) for the tpt-solutions physical-systems verticals

0 stars0 forks0 watchers1 open issuesApache License 2.0
civil-engineeringelectrical-engineeringengineeringengineering-calculationsmechanical-engineeringno-stdnumerical-methodsphysicsrustthermodynamics

Languages

Rust99.9%Just0.1%
README

tpt-engineering

CI license: MIT OR Apache-2.0

Applied engineering primitives for the TPT Solutions physical-systems verticals.

Dual-licensed under MIT or Apache-2.0.

29 of 43 crates are published on crates.io at 0.1.0 (Batches 1-5, released 2026-08-15 — see RELEASE.md). The 14 newest domain crates (props-mixture, electrical, schedule, biomech, crystallography, geotech, heat-transfer, vehicle-dynamics, power-components, pcb, renewables, building-sys, thermal-mgmt, unit-ops) are not yet published — see PUBLISH_TRACKING.md. There is no v0.1.0 git tag yet. APIs are unstable until the first tagged release.

Scope

A set of small, single-purpose tpt-eng-* crates providing reusable engineering maths — fluid/gas properties, time-series conditioning, infrastructure topology, controls, structural/mechanical analysis, geometry/CAD primitives, and domain-specific component models — drawn out of the product verticals as foundation-pillar building blocks rather than product-shaped packages. The workspace has grown from the original 14-crate Phase-0 scope (see spec.txt) to 43 crates: structural/mechanical and geometry/CAD domains were added post-Phase-4, and a further 14 electronics/energy/transport/medical/process/earth/construction component-model crates were added per spec2.txt (Phase 9).

All crates are new implementations built from scratch (the spec's claimed consolidation source tpt-rust2 does not exist on this machine, and the external vertical repos were not available for audit from this build environment).

Release & publish status

29 of the 43 tpt-eng-* crates are published on crates.io at 0.1.0 (Batches 1–5, 2026-08-15); the remaining 14 newest domain crates are tracked for release in PUBLISH_TRACKING.md (Batches 6–8). The full batch plan lives in RELEASE.md.

Per-crate publish state is kept consistent with those tracking docs by cargo xtask publish-status (also run as part of cargo xtask check in CI), which asserts the README/CHANGELOG counts and the pending-crate set against Cargo.toml / RELEASE.md / PUBLISH_TRACKING.md.

StatusCratesSource
Published (0.1.0)29RELEASE.md Batches 1–5
Pending (Batches 6–8)14PUBLISH_TRACKING.md

There is no v0.1.0 git tag yet. APIs are unstable until the first tagged release.

Crate inventory

CrateDomainno_stdDescription
tpt-eng-props-waterfluid-propertiesyesIAPWS-IF97 water/steam property tables
tpt-eng-props-airfluid-propertiesyesASHRAE psychrometrics / moist-air
tpt-eng-props-fuelsfluid-propertiesyesFuel heating values, density, combustion
tpt-eng-propsfluid-propertiesyesUmbrella: re-exports water + air + fuels
tpt-eng-timeseries-coretimeseriesCore time-series types
tpt-eng-timeseries-aligntimeseriesIrregular multi-rate stream alignment
tpt-eng-timeseries-gaptimeseriesStaleness/gap detection + interpolation
tpt-eng-timeseriestimeseriesUmbrella: re-exports core + align + gap
tpt-eng-geo-assetgeo/topologyGeographic asset registry
tpt-eng-geo-topologygeo/topologyDirectional infrastructure graphs
tpt-eng-network-matrixgeo/topologyIncidence/admittance matrix generation
tpt-eng-controlscontrolsPID / state-space / transfer-function
tpt-eng-structuralstructural/mechanicalLoads, beam/frame analysis, code checks
tpt-eng-materialsstructural/mechanicalMaterial property library + data provenance
tpt-eng-sectionsstructural/mechanicalCross-section properties (rect/circle/I-section)
tpt-eng-standardsstructural/mechanicalLoad cases, design factors, code-check results
tpt-eng-tolerancestructural/mechanical1-D dimensional tolerance stack-up (worst-case/RSS/Monte-Carlo)
tpt-eng-gdtstructural/mechanicalGD&T data model (zones, datum frames, material modifiers)
tpt-eng-reliabilitystructural/mechanicalFatigue, Weibull, FMEA
tpt-eng-safetystructural/mechanicalLimit-state margins / utilization ratios
tpt-eng-geometrygeometry/CADPoints, vectors, frames
tpt-eng-nurbsgeometry/CADB-spline / NURBS curves and surfaces
tpt-eng-meshgeometry/CADTriangle mesh data structure, quality/repair
tpt-eng-cadgeometry/CADSDF solid modeling / CSG
tpt-eng-iogeometry/CADSTL/OBJ/JSON/CSV file I/O
tpt-eng-plotoutputCharts and section drawings (via plotters)
tpt-eng-reportoutputMarkdown/HTML/JSON calculation reports
tpt-eng-cliintegrationCommand-line tool over the above
tpt-eng-examplesintegrationCross-crate scenarios composing multiple domains
tpt-eng-electricalelectricalnoImpedance/reactance, per-unit systems, three-phase power
tpt-eng-heat-transferthermalnoConvection/radiation correlations, conduction, thermal-resistance networks
tpt-eng-props-mixturefluid-propertiesyesGeneral real-gas / VLE property lookups for arbitrary mixtures
tpt-eng-pcbelectronicsnoPCB layer stackup, trace routing, via/footprint definitions
tpt-eng-thermal-mgmtcross-domainnoHeat sink sizing, fan curves, thermal-resistance networks
tpt-eng-power-componentsenergynoTransformer/generator models, transmission-line parameters
tpt-eng-renewablesenergynoSolar PV, wind turbine, battery degradation models
tpt-eng-vehicle-dynamicstransportnoTire models, aero drag, suspension kinematics
tpt-eng-biomechmedicalnoHyperelastic tissue models, implant geometry
tpt-eng-unit-opsprocessnoDistillation, heat exchangers, pump/compressor curves
tpt-eng-crystallographymaterialsnoMiller indices, slip systems, symmetry operations
tpt-eng-geotechearthnoSoil constitutive models, borehole stratigraphy
tpt-eng-building-sysconstructionnoHVAC loads, plumbing fixture units, panel scheduling
tpt-eng-scheduleconstructionnoCPM/PERT, resource leveling, Earned Value Management

Building

This workspace depends on the tpt-math substrate (tpt-math-units, tpt-math-numeric, tpt-math-linalg, tpt-math-stats), resolved as regular versioned dependencies from crates.io — no sibling checkout needed:

git clone https://github.com/tpt-solutions/tpt-engineering.git
cd tpt-engineering
cargo build --workspace
cargo test --workspace
  • Edition: 2024.
  • MSRV: 1.85 (rust-version in [workspace.package]). The toolchain version is additionally fixed by rust-toolchain.toml via rustup.

The tpt-eng-props-* family is no_std; it builds for bare-metal targets with the default features disabled.

Which crate do I need?

The inventory above is a flat list. For choosing a starting point by task:

If you need to…Start with
Compute water/steam thermodynamic properties (IAPWS-IF97)tpt-eng-props-water
Compute moist-air / psychrometric properties (ASHRAE)tpt-eng-props-air
Compute fuel heating values, density, combustion propertiestpt-eng-props-fuels
Work with any/all fluid properties at oncetpt-eng-props (umbrella)
Condition/timestamp irregular sensor streamstpt-eng-timeseries-core
Align multi-rate streams (e.g. 1 Hz CAN vs 10 s Modbus) onto one gridtpt-eng-timeseries-align
Detect staleness/dropouts and interpolate gapstpt-eng-timeseries-gap
Use all time-series primitives togethertpt-eng-timeseries (umbrella)
Register geographic assets / devicestpt-eng-geo-asset
Model pipes/wires/ducts as directed graphstpt-eng-geo-topology
Generate incidence/admittance matrices from topologytpt-eng-network-matrix
Implement PID / state-space / transfer-function controltpt-eng-controls
Compute loads, beam/frame analysis, code checkstpt-eng-structural
Look up material properties (with data provenance)tpt-eng-materials
Compute cross-section properties (rect/circle/I-section)tpt-eng-sections
Apply code load cases / design factors / pass-fail checkstpt-eng-standards
Roll up 1-D dimensional tolerance stack-ups (worst-case/RSS/Monte-Carlo)tpt-eng-tolerance
Model GD&T zones, datum frames, material modifierstpt-eng-gdt
Compute fatigue life, Weibull reliability, run an FMEAtpt-eng-reliability
Compute limit-state margins / utilization ratiostpt-eng-safety
Work with points/vectors/frames in 2D/3Dtpt-eng-geometry
Build B-spline / NURBS curves and surfacestpt-eng-nurbs
Represent/repair/query a triangle meshtpt-eng-mesh
Build solids via SDF/CSG modelingtpt-eng-cad
Read/write STL, OBJ, JSON, or CSV filestpt-eng-io
Draw a chart or section diagramtpt-eng-plot
Generate a calculation report (Markdown/HTML/JSON)tpt-eng-report
Run any of the above from a command line, no Rust requiredtpt-eng-cli
A full worked cross-crate scenariotpt-eng-examples
Compute electrical impedance / per-unit / three-phase powertpt-eng-electrical
Compute convection/radiation heat transfer and conductiontpt-eng-heat-transfer
Look up general real-gas / VLE mixture propertiestpt-eng-props-mixture
Design a PCB stackup / trace / viatpt-eng-pcb
Size a heat sink or solve a fan-curve operating pointtpt-eng-thermal-mgmt
Model transformers, generators, or transmission linestpt-eng-power-components
Model solar PV, wind turbines, or battery degradationtpt-eng-renewables
Model tire forces, aero drag, or suspension kinematicstpt-eng-vehicle-dynamics
Model hyperelastic tissue or implant geometrytpt-eng-biomech
Size distillation columns / heat exchangers, pump curvestpt-eng-unit-ops
Work with Miller indices, slip systems, crystal symmetrytpt-eng-crystallography
Model soil behavior or borehole stratigraphytpt-eng-geotech
Compute HVAC loads, plumbing, or electrical panel schedulestpt-eng-building-sys
Plan/schedule projects (CPM/PERT, Earned Value Management)tpt-eng-schedule

Quickstart

Add the crates you need (they re-export tpt-math's uom-typed units):

cargo add tpt-eng-props tpt-eng-controls tpt-eng-structural
use tpt_eng_controls::{Pid, PidGains};

let mut pid = Pid::new(PidGains::new(2.0, 1.0, 0.0)).with_output_limit(1.0);
pid.set_setpoint(10.0);
let mut y = 0.0;
for _ in 0..1000 {
    let u = pid.update(y, 0.01);
    y += 0.01 * u; // first-order plant, τ = 1 s
}
assert!((y - 10.0).abs() < 0.5);

For a full, cross-crate worked example (topology → network matrix → controls → time-series conditioning → structural check), see tpt-eng-examples.

Developer tooling

cargo xtask provides one-stop hygiene and scaffolding (check, test, doctest, doc, no-std-matrix, new-crate). A root justfile mirrors these for non-Cargo users.

See CONTRIBUTING.md for the issues-only contribution policy and where to report problems.

License

Licensed under either of MIT or Apache-2.0 at your option.

Copyright (c) 2026 TPT Solutions.