This directory contains examples demonstrating the deep_causality_physics crate and related multi-physics capabilities.
Run any example from the repository root:
cargo run -p physics_examples --example <example_name>| Example | Domain | Description |
|---|---|---|
| algebraic_scanner | Abstract Algebra | Scans Clifford Algebras for complex structure (I²=-1) |
| bernoulli_flow_network | Fluid Dynamics | Pipe network with Venturi effect and hydrostatic gain |
| carnot_cycle_engine | Thermodynamics | 4-stage heat engine at Carnot efficiency limit |
| laser_resonator_stability | Optics | Gaussian beam propagation via ABCD matrices |
| maxwell_example | Electromagnetism | Maxwell's equations via Geometric Algebra |
| grmhd_example | Relativity | General Relativistic Magnetohydrodynamics |
| geometric_tilt_example | Robotics/IMU | Sensor fusion with Geometric Algebra |
| multi_physics_pipeline | Particle Physics | QFT → Hadronization → Hydro → Detection |
| quantum_counterfactual | Quantum | Error correction via state rewind |
| quantum_geometric_tensor | Condensed Matter | QGT, quantum metric, and flat-band transport (TBG) |
| ikkt_matrix_model | Quantum Gravity | Emergent spacetime from matrix dynamics |
| gravitational_wave | Relativity | Regge Calculus on simplicial mesh |
See also: medicine_examples for biophysics examples (protein folding, etc.)
All examples use PropagatingEffect or CausalEffectPropagationProcess for composing physics operations:
let result = step1()
.bind(|state, _, _| step2(state))
.bind(|state, _, _| step3(state));Use bind_or_error for robust pipelines:
let result = risky_operation()
.bind_or_error(|data, _, _| next_step(data), "Error message");Physics types enforce invariants:
Probability- Values in [0, 1]EnergyDensity- Non-negative energyHilbertState- Normalized quantum states
| Crate | Purpose |
|---|---|
deep_causality_physics |
Physics kernels (Klein-Gordon, heat diffusion, etc.) |
deep_causality_multivector |
Geometric Algebra (CausalMultiVector, HilbertState) |
deep_causality_tensor |
Tensor operations (CausalTensor) |
deep_causality_topology |
Discrete geometry (SimplicialComplex, ReggeGeometry) |
deep_causality_core |
Monadic effects (PropagatingEffect) |
- Create directory:
examples/<your_example>/ - Add
main.rswith doc comments (//!module docs) - Add
README.mdwith:- How to run
- Engineering value
- Key concepts
- APIs demonstrated
- Adaptation suggestions
- Register in
Cargo.toml:[[example]] name = "your_example" path = "examples/your_example/main.rs"