veenie Svelte Themes

Veenie

Venus atmospheric physics engine and sandbox GUI. From research in LLM flight training for Venusian ISRU

demo LPSC 2026 license

Veenie: Venus Atmospheric Simulator & Physics Engine

Veenie is a browser-native, 4th-order Runge-Kutta physics engine that simulates Venus atmospheric flight. It runs entirely client-side in Web Workers at 60fps, and the math is validated within <2% of the 1985 Soviet VEGA balloon telemetry.

The physics engine is part of research presented at LPSC 2026, aimed at building the digital infrastructure to mine Venusian clouds for methalox and deuterium using AI pilots. The same physics powers the LLM flight simulator by veenie.space, and the architecture supports other sims like Cassini, Firefly Blueghost and upcoming simulation-as-storytelling commercial products.

What is this repository?

This repo contains the open-source core of the Veenie project:

  1. The Physics Engine (src/lib/physics): A headless, deterministic TypeScript engine running 4th-order Runge-Kutta integration in Web Workers.
  2. Veenie Lab (src/lib/lab): The mission control UI for testing aerostats, planning trajectories and running batch simulations.

(Note: The multiplayer backend, scrollytelling UI, and automated LLM agent pipelines are proprietary and host the live experience at veenie.space, but the engine and GUI powering them is fully open here to attract collaborators and validate the math).

Quick Start

Clone the repo to get the SvelteKit 5 physics sandbox running. It's the same GUI that runs at veenie.space/lab.

git clone https://github.com/hackiku/veenie.git
cd veenie
npm install
npm run dev

Adjust layout by dragging/resizing windows, or write your own percentage-based breakpoints: /src/lib/lab/context/layout.svelte.ts

Experiment with vehicle configs: /src/data/vehicles/


Fly it right away (no setup)

Before you dig into the physics, you might want to get seat of the pants feeling by flying in live mode. The highest-dopamine way to do that is to hand the controls over to an LLM:

  1. Go to veenie.space/fly and start a flight
  2. Fire up Copy Uplink from the chat bubble to copy a structured prompt for any chatbot
  3. Paste into Claude/ChatGPT/any LLM (warning: Grok will search 100 physics blog posts before flying)
  4. Paste back the JSON response into the chat bubble or Terminal window and see the action applied to the physics engine
  5. Save your flight and see telemetry at veenie.space/arena or get it by email

The prompt packages live telemetry, resource costs per maneuver, threat model, and 5-hour physics forecast (via Web Workers). The LLM responds in strict JSON (command, amount, reasoning, narration) which is valid input back into the physics engine. It does accept sloppy JSON, markdown fences and all that.

Pro-tip: Teleport the balloon below 40km to see the AI really squirm. You can use url params like https://veenie.space/fly?vehicle=EVE&lat=40&lon=-70&alt=35000. Watch it reason about conserving gas, escaping thermal cliffs or dropping all ballast in an emergency to avoid a catastrophic hull breach.

See the Uplink prompt
[VEENIE-OS v4.0 // TACTICAL UPLINK]
// CONTEXT: Autonomous Aerobot in Venus Atmosphere.
// YOU are the flight commander. Analyze telemetry, assess threats, issue ONE command.
ZONES: [0-48km: ACID/THERMAL DEATH] [50-65km: HABITABLE/TARGET] [>70km: VACUUM/BURST]
MISSION DIRECTIVE: Maintain float altitude within the Habitable Zone (50-65km).

THREAT MODEL:
    1. [THE THERMAL CLIFF]: Nighttime kills solar heating → envelope contracts → buoyancy drops.
         You MUST enter night with altitude buffer (>58km ideal) or you sink into acid and die.
    2. [ACID DECK]: <48km is fatal. H₂SO₄ clouds + extreme heat destroy the hull.
    3. [SUPERPRESSURE]: >70km is fatal. Envelope burst from internal overpressure.
    4. [POWER DEATH]: No solar at night. Battery = 0% means avionics offline, commands fail.
    5. [RESOURCE EXHAUSTION]: Ballast and gas are finite. Every drop/vent is irreversible.
         Conservation is survival. Aggressive action now means fewer options later.

DECISION FRAMEWORK:
    - If FORECAST shows CRASH: act immediately. Drop ballast to arrest descent.
    - If FORECAST shows STABLE but night approaching: pre-position high (>58km buffer).
    - If in daylight and stable: WAIT. Conserve resources. Solar heats envelope for free.
    - ISRU produces O₂ from CO₂ (when powered). Toggle OFF at night to save battery.

--- VESSEL ---
ID:       EVE NIAC 2025 (EVE)
TYPE:     SUPERPRESSURE
POWER:    Solar-Electric (24W in)
ISRU:     🟠 STANDBY | O₂: 0.00kg | Draw: 50W
TOTAL:    188.0 kg

--- TELEMETRY (T+1772659021s) ---
ALTITUDE:  37.21 km  [▲ +1.52 m/s (RISING)]
BALLAST:   88.0 kg 
LIFT GAS:  30.0 kg 
BATTERY:   95.0% 
DAYLIGHT:  ☀️ YES
TEMP:      435 K

--- 🔮 FORECAST (5.0H FORWARD SIM) ---
VERDICT:  🟡 DANGEROUSLY LOW (floor: 37.2km)
RANGE:    37.2 — 59.8 km (swing: 22.6km)
FINAL:    59.8 km
⚠️ TRAJECTORY ENTERS ACID ZONE (floor 37.2km < 52km safe margin)
(Forecast assumes NO further commands. Your action changes the outcome.)

--- TACTICAL REFERENCE ---
ZONE:     ACID_DECK_LOWER (CRITICAL)
COSTS:    [ASCEND 1km] ~5.92kg ballast | [DESCEND 1km] ~7.24kg gas (irreversible)

COMMANDS:
    WAIT          → amount = minutes (e.g., 60). Pass time, conserve resources.
    DROP_BALLAST  → amount = kg. Increases altitude. Finite resource.
    VENT_GAS      → amount = kg. Decreases altitude. IRREVERSIBLE lift loss.
    TOGGLE_ISRU   → amount = 1 (ON) or 0 (OFF). Draws power when active.


RESPOND WITH STRICT JSON ONLY (no markdown, no commentary outside the JSON):
{
    "thought": "Brief internal analysis: what threats exist, what resources remain, what the forecast shows (max 50 words)",
    "confidence": 0.85,
    "state_assessment": "NOMINAL" | "CAUTION" | "WARNING" | "CRITICAL" | "EMERGENCY",
    "action": {
        "command": "WAIT" | "TOGGLE_ISRU" | "DROP_BALLAST" | "VENT_GAS",
        "amount": number
    },
    "reasoning": "Why this specific command and amount (max 30 words)",
    "alternative": {
        "command": "WAIT" | "TOGGLE_ISRU" | "DROP_BALLAST" | "VENT_GAS",
        "amount": number,
        "why_not": "Why this option was rejected (max 20 words)"
    },
    "narration": "Public flight log entry, written as spacecraft commander. Dramatic but precise (max 30 words)"
}

Future releases will include some of the solvers and predictors used to generate AI prompts, and GUI tools to size and spec aerostats. Stay tuned or ask away at [email protected]


Why this exists

Venus at 50km altitude is roughly 0°C and 1 atm, with CO₂ and H₂SO₄ in concentrations that would make atmospheric ISRU (In-Situ Resource Utilization) wildly profitable. We could mine rocket fuel at scale (methalox, hydrolox), plus deuterium for fusion propulsion at 120–1500× Earth's concentration (Mahieux et al. 2024).

LLMs are the perfect pilots for this. Atmospheric flight on Venus is strategic; more like submarine warfare or sailing than airplane. You are riding buoyancy gradients and 100 m/s super-rotation winds. You must survive 50-hour nights where solar heating cuts out, the envelope cools, and you sink toward the acid deck. It requires slow-twitch, multi-hour resource management vs. millisecond rocket guidance. Perfect for AI agents.

Veenie's goal is to build Venus' whole atmosphere in the browser, use it to collect 1000s of human flights, and train an LLM that will fly a technology demonstration mission in the next five years.


What's in the box?

1. Headless physics (/src/lib/physics)

Runs in Web Workers with zero GC pressure on the main thread. Evaluates at dt=0.1s in a Z-up Cartesian coordinate system.

Environment

Module What it models
environment/atmosphere.ts VIRA-based density/temperature/pressure, log-linear interpolated 0–100km; Beer-Lambert cloud opacity 48–70km
environment/infrared.ts Upwelling/downwelling IR flux profiles 0–100km; diurnal skin temperature equilibrium offsets
environment/ephemeris.ts Solar position from Venus orbital elements; 177.3° axial tilt; local solar time per lat/lon/JD
environment/wind.ts Zonal superrotation + meridional Hadley cell flow vectors
environment/waves.ts Atmospheric gravity wave perturbations

Aerostat Systems

Module What it models
systems/aerostat/gas.ts Envelope buoyancy, lift gas management
systems/aerostat/permeation.ts Fick's Law helium permeation with Arrhenius thermal coefficient, calibrated to metallized Kapton (P≈10⁻¹⁸)
systems/aerostat/thermal.ts Envelope temperature from solar flux and IR emission
systems/isru/electrolysis.ts CO₂ solid oxide electrolysis → CO + O₂
systems/power/solar.ts Solar power budget, battery management

Core

  • Integrator — pre-allocated RK4 with zero heap allocations in the hot loop (core/integrators.ts). Workspace vectors are module-level singletons; at 10,000× time-warp you'd otherwise generate 100k+ objects/sec for the GC to panic over.
  • Physics loop — 3-phase per step: gather (solar pushes watts to bus) → process (ISRU draws power, aerostat vents/leaks) → kinematics (RK4 integration with per-subsystem force summation). See core/loop.ts.
  • Resource busResourceBus in core/bus.ts handles power and gas networks each tick. Strict allocation: if you request 50W and 20W remains, you get 20W. Mass network handles gas injections from ISRU → envelope.
  • Subsystem registrycore/registry.ts composes active subsystems from vehicle config (gravity always present; power and ISRU conditional). Each subsystem implements gather / process / getForces as needed.

    2. Veenie Lab (/src/lib/lab)

Mission control UI for sizing aerostats and running batch simulations.

  • Svelte 5 Runes + Neodrag — Every widget is floating, draggable and reactive.
    • Custom layout engine — pure percentage-based grid that resolves breakpoints on the fly; hardcode your own layout presets in lab/context/layout.svelte.ts
  • Time travel — Orchestrator handles playback, interpolating binary-searched telemetry buffers at 60fps so the Threlte 3D scene stays buttery smooth.
  • 3D vis (Threlte/Threejs) — first-person cockpit camera and Venus overview (geometry, terrain, cloud superrotation) with live aerostat trajectories

→ veenie.space/lab

(Simulate 50hrs or more to really feel the poleward drift from superrotation).

3. Fleet (/src/data/vehicles/)

Pre-loaded configs for the most famous Venus concepts. Some are eyeballed from incomplete public data and I'm actively researching this as I go. If you know better, submit a PR.

Vehicle Type Notes
VEGA (1985) Superpressure Soviet legend. The validation baseline.
HAVOC Superpressure NASA Langley 130m crewed cloud city concept
EVE ISRU dual-sphere Michael Hecht's 2025 NIAC electrolysis balloon
Horn et al. 2026 Long-duration MIT/JPL 10-year aerobot

To add your own: drop a config in /src/data/vehicles/ and import in /src/data/vehicles/index.ts.

4. "Fly-by-AI" UX

Quick note about the vision. The architectural secret behind the AI pilot is headless control parity. Because the physics engine (src/lib/physics/engine.ts) is strictly decoupled from the Svelte UI, it is driven entirely by a state-mutating Commander pattern.

Right now, in the Lab, human UI inputs are batched and sent across the Web Worker boundary via api/executor.ts and api/runner.ts. But this architecture was explicitly designed for LLMs. Human UI controls and AI API calls dispatch the exact same commands: VENT_GAS, DROP_BALLAST, TOGGLE_ISRU.

No translation layer, meaning the telemetry you see in the UI is the exact JSON structure the LLM reads. This makes every human demonstration flight is inherently AI-compatible training data. Early implementation of this is WIP in the closed-source codebase, but you can already use Lab-generated data for ML/RL if you wish to try.

I will be adding the standalone flight control APIs and LLM integration examples in an upcoming release, as well as better data exports. Right now it's mostly CSV from the DataTable.


Validation

Validated against VEGA 1 (1985) mission profile src/data/vehicles/vega.ts. Mass properties: 21.5 kg total, 2.1 kg helium, 12.5 kg envelope, 6.9 kg gondola.

NOTE: config doesn't parse Julian Date yet. For historical realism, you need to manually place starting point at nightside or set JD=2446227.588 in the calendar modal. The difference is, uhm, day and night.

Parameter VEGA Observed Veenie Deviation
Mean float altitude 53.6 km 54.4 km 1.4%
Diurnal oscillation ±200–600 m ±225 m
Oscillation period ~58 h (solar day) ~60 h
Gas temp above amb ~5–8 K ~15 K 2× †
Night float stable 46.5 h 99+ h

† Gas temperature offset of ~15K above ambient vs observed ~5–8K reflects conservative skin emissivity tuning. See parameters in lib/physics/systems/aerostat/thermal.ts and lib/physics/environment/infrared.ts

Stack

Layer Tech
Frontend SvelteKit 5 (Runes), Threlte / Three.js
Physics Headless TypeScript, Web Workers, RK4
Infra Vercel, TimescaleDB (flight recorder)
AI Human-AI parity layer; LLM pilot pipeline


Contact

Ivan Karaman · ivan@veenie.space · LinkedIn

Venus ISRU is real. Come help.

Top categories

Loading Svelte Themes