tpt-shipyard

Rust

Open-source, MIT-licensed pure-Rust engine for vehicle construction: sea shipyards, orbital assembly, in-space manufacturing, and construction digital twins. Build anything, anywhere — no gravity constraints, no launch limits, no proprietary lock-in.

0 stars0 forks0 watchers3 open issuesApache License 2.0

Languages

Rust92.9%Python6.3%HTML0.8%Just0.1%Dockerfile0.0%
README

tpt-shipyard

CI License: MIT OR Apache-2.0 docs.rs MSRV 1.98

A fully open-source, MIT-licensed computational engine for vehicle construction: sea shipyards, orbital assembly, in-space manufacturing, and construction digital twins.

Build Anything, Anywhere. Sea or Space. No Gravity Constraints. No Proprietary Lock-in.

┌─────────────────────────────────────────────────────────────┐
│              THE VEHICLE LIFECYCLE STACK                     │
├─────────────────────────────────────────────────────────────┤
│                                                             │
│  ┌──────────┐  ┌──────────┐  ┌──────────┐  ┌──────────┐    │
│  │  tpt-    │  │  tpt-    │  │  tpt-    │  │  (end of │    │
│  │transport │→ │ shipyard │→ │transport │→ │   life)  │    │
│  │ (design) │  │ (build)  │  │(operate) │  │          │    │
│  └──────────┘  └──────────┘  └──────────┘  └──────────┘    │
│                                                             │
│         SEA            SPACE           BOTH                 │
│    Drydock / Slipway   OrbitalAssembly  Digital Twin        │
│    Launch / Outfit     In-space Mfg     Weight & CoG        │
│                                                             │
└─────────────────────────────────────────────────────────────┘

Crates

Every crate ships its own README.md (overview, features, usage, verification) and CHANGELOG.md; crates.io keywords and categories are declared in each manifest. See for example crates/structural/tpt-yard-welding.

Status legend: Done = implemented and verified against analytical/golden cases. Simplified model = working, but with documented modelling simplifications (see each crate's README — several are roadmap items to deepen). Stand-in = a thin, honest bridge awaiting the companion tpt-transport / tpt-process / tpt-earth substrates.

CrateDescriptionStatus
tpt-yard-coreCore shipyard types: vessel projects, build phases, activitiesDone
tpt-yard-assemblyShared assembly-activity primitives: dependency graphsDone
tpt-yard-weightWeight and CoG managementDone
tpt-yard-digital-twinConstruction state tracking and simulationDone
tpt-yard-structuralStructural analysis during buildSimplified model (3-D truss + 2-D frame + plate FEM: BFS thin and MITC4 Mindlin elements, penalty BCs, sparse CG/Cholesky)
tpt-yard-weldingWelding simulationDone (analytical Rosenthal, experimentally verified)
tpt-yard-distortionBlock distortion managementSimplified model (threshold-based correction planning)
tpt-yard-jointsShared joint-geometry primitivesDone (closed-form groove/fillet geometry)
tpt-yard-hullHull block constructionDone (pre-design weight estimate)
tpt-yard-blocksBlock lifting and sling loadsDone
tpt-yard-drydockDrydock flooding and ballast sequencingSimplified model (rectangular-block hydrostatics)
tpt-yard-launchLaunch calculationsSimplified model (statics screening + dynamic slipway simulation with stern-lift/poppet/way-moment series)
tpt-yard-outfittingSystems installation and routingSimplified model (AABB routing checks)
tpt-yard-sea-trialsSea-trial test planningDone
tpt-yard-hydrostaticsHydrostatics, GZ curves, IMO 2008 stability, hull-girder strength, damage stability, scantlingsSimplified model (prismatic screen, plus hull-offsets hydrostatics and constant-displacement GZ from a CSV offsets table; Bonjean/cross-curves, SOLAS probabilistic damage stability (cargo, multi-zone, with r- and v-factors), local plate scantlings + Euler/EN 1993-1-5 buckling shipped; class (CSR) buckling curves and rule minimum-thickness tables on roadmap)
tpt-yard-orbital-assemblyOrbital assembly planningSimplified model (greedy sequence, kinematic checks)
tpt-yard-space-structuralStructures without launch constraintsSimplified model (analytical screening)
tpt-yard-space-manufacturingIn-space manufacturing and additive constructionSimplified model (estimate-grade constants)
tpt-yard-robotic-assemblyRobotic arm planningSimplified model (planar RRT, 2-4 link arms)
tpt-yard-habitatRotating habitat designSimplified model (analytical shell stress)
tpt-yard-propellantPropellant loading and boil-off managementSimplified model (lump-parameter thermal)
tpt-yard-schedulingConstruction schedulingDone (exact CPM; Monte Carlo risk with delivery/weather gates; capacity-aware levelling at exact breakpoints)
tpt-yard-logisticsMaterial and resource logisticsSimplified model (flow accounting)
tpt-yard-facilityShipyard facility layout planningDone (plan-view capacity/placement)
tpt-yard-qualityQuality control and inspectionSimplified model (plan generation only)
tpt-yard-transport-linkVehicle design ⇄ construction bridgeStand-in (awaits the tpt-transport substrate)
tpt-yard-process-linkProcess engineering bridgeStand-in (awaits the tpt-process substrate)
tpt-yard-earth-linkWeather/sea-state bridgeStand-in (awaits the tpt-earth substrate)
tpt-yard-cliCLI: validate / plan / schedule / risk / report / new / html-report / pdf-reportDone
tpt-yardFacade: one dependency, curated prelude, feature flagsDone
tpt-yard-wasmWebAssembly bindings for dashboardsSimplified model (browser tests in CI; 3-D three.js dashboard shipped)
tpt-yard-pyPython bindings (PyO3; detached from the workspace build)First slice (DigitalTwin + HullForm; CI job exercises both)

Quick Start

The easiest way in is the tpt-yard facade — one dependency with a curated prelude and sea/space/planning/wasm feature flags. Or depend on tpt-yard-digital-twin directly and define the erection plan:

use tpt_yard_assembly::ActivityId;
use tpt_yard_core::{ActivityType, AssemblyActivity, BuildPhase, ConstructionMethod,
    PhaseId, ProjectId, SeaVesselType, VesselProject, VesselType};
use tpt_yard_digital_twin::DigitalTwin;

// One erection activity per block; dependencies gate the order.
let mut phase = BuildPhase::new(PhaseId(1), "Erection", 4.0);
for i in 1..=3u64 {
    let deps: Vec<ActivityId> = if i == 1 { vec![] } else { vec![ActivityId(i - 1)] };
    phase.activities.push(
        AssemblyActivity::new(ActivityId(i), format!("Erect block {i}"), ActivityType::JoinBlock, 6.0)
            .with_dependencies(&deps),
    );
}

let project = VesselProject::new(
    ProjectId(1),
    "Demo barge",
    VesselType::Sea(SeaVesselType::ContainerShip { teu_capacity: 800 }),
    ConstructionMethod::SeaDrydock,
    vec![phase],
)
.unwrap();
let mut twin = DigitalTwin::new(project);

// Collect the ids first: `advance_phase` takes `&mut twin`, and the
// activity list borrows `twin.vessel`.
let ids: Vec<ActivityId> = twin
    .vessel
    .build_phases
    .iter()
    .flat_map(|p| p.activities.iter().map(|a| a.id))
    .collect();
for id in &ids {
    twin.advance_phase(id).expect("activity must be sound to run");
}
println!(
    "{}/{} activities complete, phase {:?}",
    twin.assembly_state.completed_activities.len(),
    ids.len(),
    twin.vessel.current_phase
);

DigitalTwin::new tracks the plan and structure; pass a populated WeightModel to DigitalTwin::with_weight_model (wiring each item's installed_by to an activity) and the twin also tracks installed mass and CoG as erection proceeds — see the tpt-yard-digital-twin docs and the worked examples.

Run a complete worked example with cargo run -p container-ship-block-assembly; sample vessel projects ship in test-data/. The examples/ directory covers block assembly, a submarine pressure hull, drydock flooding, orbital truss assembly, a rotating habitat, and in-space solar-array manufacturing.

Stability from the command line

Hydrostatics, the GZ curve and the IMO 2008 intact-stability criteria for a loading condition, from a hull-offsets CSV (full form) or prismatic coefficients (screening):

cargo run -p tpt-yard-cli -- new-hull workboat --out my-hull   # offsets CSV + case file
cargo run -p tpt-yard-cli -- stability my-hull/workboat.json --csv out --svg gz.svg --strict

new-hull writes a runnable starting point (wigley, barge, workboat, tug, sailboat or ferry, every dimension adjustable); replace its offsets CSV with your own lines plan to analyse your hull. --strict exits non-zero when a criterion fails, so it drops straight into CI; --json gives machine-readable output. The Wigley offsets in test-data/stability/ are checked against the hull's closed-form hydrostatics. See the stability chapter.

Geometry leaves the engine in open formats: tpt_yard::export::geometry_to_gltf writes a self-contained glTF 2.0 document for web viewers, tpt_yard::export::elements_to_ifc writes an IFC4 (STEP) file for BIM tools, and Python bindings (crates/bindings/tpt-yard-py, PyO3) expose the digital twin and hull hydrostatics directly from Python.

Build Anything, Anywhere

tpt-shipyard supports:

  • Sea shipyards — block construction, drydock flooding, slipway launch, outfitting, sea trials
  • Orbital assembly — robotic, microgravity, constraint-checked assembly sequences
  • In-space manufacturing — additive construction, ISRU feedstock, print planning
  • Rotating habitats — O'Neill cylinders, Stanford torus, Bernal spheres

No gravity constraints. No aerodynamic limits. No proprietary lock-in.

A spacecraft built in space is not a rocket

On Earth, every spacecraft is constrained by aerodynamic drag, Max-Q, fairing diameter limits, launch vibration, and gravity sag during horizontal assembly. In orbit, none of these constraints exist. tpt-shipyard is the engine that plans, simulates, and validates construction — whether in a drydock in Busan or a robotic assembly bay at Earth-Moon L2.

Design Principles

  1. 100% open source — MIT OR Apache-2.0, no open-core, no proprietary file formats.
  2. Permissive dependency chain — the crates are MIT OR Apache-2.0; cargo-deny enforces the allow-list (MIT / Apache-2.0 / BSD / ISC / Zlib / Unicode) and denies copyleft on every PR.
  3. Pure Rust — zero heavy external dependencies in the core crates; compiles to WebAssembly for interactive dashboards.
  4. Physics you can audit — every solver documents its governing equations and is verified against analytical cases and golden data (test-data/golden/).

Documentation

  • The Book: docs/book (mdBook) — run mdbook build docs/book or read the sources in docs/book/src/.
  • RFCs: rfcs/ with the process index in docs/rfc/index.md.
  • API docs: cargo doc --workspace --open.

Governance

Benevolent Dictator + public RFC process. See GOVERNANCE.md. Releases follow SemVer on a 6-week cadence — see RELEASES.md. Roadmap tracking happens on the public GitHub Projects board linked from the repository.

Security

Please report vulnerabilities privately — see SECURITY.md.

License

Licensed under either of

at your option.

The "TPT Shipyard" name and logo are trademarks of TPT Solutions — see GOVERNANCE.md.