Skip to main content
  1. Projects/

Gugnir - Mass-Driver Simulation and Optimization

Pranav
Author
Pranav
Coding with Physics, Physics-ing with code

This project was developed for Olympus Mons Laboratory, a startup building a next-generation Orbital/Lunar mass driver. Exact specifics are voided since the project is in the process of a patent.

TL;DR
#

I built a physics-informed simulation stack that models system dynamics end-to-end, tracks energy and performance metrics, and produces decision-quality visuals for engineering and investor updates. The goal was to have a fast, trusted modeling loop that could support design iteration without exposing proprietary details.

Approach
#

  • Componentized physics engine: Modular subsystems with explicit parameters for fast swaps and design iteration.
  • State evolution: Stable time-stepping for kinematics, power flow, and system state in a tight loop.
  • Loss modeling: Energy and efficiency losses tracked explicitly to keep predictions realistic.
  • Parameter sweeps: Automated studies over discrete/continuous design variables to explore sensitivity.

Optimization Pipeline
#

  • Mixed-variable optimization using BlackBoxOptim.jl (discrete + continuous decisions).
  • Constrained objectives that balance performance targets with cost/complexity proxies.
  • Fast surrogates for early search, then validation on full-fidelity runs.

Here’s some parts of the optimization logic.

function score(x)
    # x has mixed discrete + continuous design variables
    cost = w1 * proxy_1(x) + w2 * proxy_2(x) + w3 * proxy_3(x)
    penalty = k * (performance(x) - target)^2
    return cost + penalty
end

The idea was to use a digital twin to drive prototyping. The math is simple: I assign weights to parameters that map to real costs (i.e., [redacted]), then build a cost function with both rewards and penalties. Using Differential Evolution via BlackBoxOptim.jl, the optimizer samples realistic ranges (you can’t ask for a billion loops of wire ;D), tests each candidate against the cost, and quickly homes in on the cheapest viable design. On my CPU it finished in ~16.3 seconds while evaluating ~10,089 candidates (~53k evals/sec), and returned the lowest-cost parameters.

Software & Visualization
#

  • Julia for performance and composability (Parameters.jl, StaticArrays).
  • Makie (GLMakie/CairoMakie) for live plots, animation, and high-quality renders.
  • Built for easy understanding: I don’t want users rummaging through my codebase. Also has excellent documentation for further prototyping for those unfamiliar with the code.

Media
#

The following clips show a simplified linear-rail demonstration. Specific system details remain withheld while patent review is ongoing.

Linear-rail demonstration clip.
Linear-rail clip with a transition segment.

NDA Notice
#

System specifics, geometry, and performance targets are under NDA and are not shown here.

Related