Skip to content

Expand swift-physics with spacecraft dynamics, trajectory planning, and fluid simulation - #1

Merged
lorrden merged 106 commits into
mainfrom
more-features
Oct 15, 2026
Merged

lorrden merged 106 commits into
mainfrom
more-features

Conversation

@lorrden

@lorrden lorrden commented Oct 15, 2026 •

Copy link
Copy Markdown
Member

This PR expands the package from astronomical algorithms into a modular physics toolkit for spaceflight and vehicle simulation. It adds shared time, state, and frame APIs; ephemeris and SPICE integration; spacecraft propagation and mission planning; and atmospheric, aerodynamic, hydrodynamic, and magnetic-field models.

The package exposes seven focused modules through individual products and the combined Physics package.

Main changes

  • Time and frames: precise epochs and durations, UTC and TT–TDB conversions, measured Earth orientation, body-fixed and local orbital frames, and consistent rotation conventions.

  • Ephemerides: common provider interfaces, origin and frame conversion, accuracy selection, caching, batching, fallback providers, DE441 support, and SPICE kernel loading.

  • Spaceflight: orbital-element conversion, two-body and numerical propagation, gravity and environmental forces, attitude dynamics, finite thrust, fuel depletion, and propagation events.

  • Trajectory planning: Hohmann, Lambert, brachistochrone, waypoint, rendezvous, and gravity-assist planning, with bounded searches and numerical refinement.

  • Fluid and environmental physics: expanded atmosphere and magnetic models, wing and body aerodynamics, lifting-line solvers, control surfaces, rarefied flow, aerothermal heating, propwash, compressible and incompressible flow grids, and liquid hydrostatics and hydrodynamics.

  • Integration and maintenance: runnable demos, simulation snapshots and renderer adapters, benchmarks, reference fixtures, and module documentation.

Compatibility and licensing

Requires Swift 6.4. Updates public API naming and concurrency contracts, upgrades Yams to 6.2.2, and configures build-and-test CI for macOS, Linux, and Windows.
ERFA-derived numerical routines and coefficient tables are isolated in the internal ERFASwift module, with their BSD license and attribution retained alongside the source.

Adding docc targets
- Validated coefficient tables with irregular angle samples and Reynolds/Mach interpolation.
- Safe YAML loading and legacy decoding.
- NACA geometry and cambered thin-airfoil fixes.
- SI flow quantities, rotational local flow, and force/moment contracts.
- Wings default to eight strips, with configurable geometry, local rotational flow and per-strip loads.
- Capsule/body models use pluggable six-coefficient providers and validated incidence/sideslip/Mach/Reynolds tables.
Add bounded finite-wing model that solves effective incidence and adds induced drag.
Connects aerodynamic loads to CelMek’s coupled dynamics.
It rotates force into inertial axes and transfers moments to the centre of mass.
- Nonlinear wing/tail coupling with fixed wakes and local flow.
- Explicit gas mixtures, transport inputs and model coverage.
- Transitional traction and high-enthalpy/radiative heating from supplied data.
- Turbulent surface and swept leading-edge heating.
- Capsule/winged entry examples with step-refinement checks.
@lorrden lorrden changed the title More features Expand swift-physics with spacecraft dynamics, trajectory planning, and fluid simulation Oct 15, 2026
@lorrden
lorrden merged commit f272e12 into main Oct 15, 2026
3 checks passed
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.

1 participant