# Upward user guide

## Open the lab

Keep `index.html`, `style.css`, `physics.js` and `app.js` together. Open `index.html` in a current browser. No install, server, account or internet connection is needed. This is an original educational companion, not a rocket engineering tool.

## Run a reproducible experiment

1. Start with payload 120 kg, Learner engine, Medium tank, 100% fill, air drag on.
2. Write down a predicted peak altitude and a reason. Record all five settings.
3. Select Launch to watch simulated time advance at about real time. If a tab is hidden or the computer stalls, simulation time may advance more slowly than wall time. Physics uses a fixed 0.02 s step.
4. Pause to inspect the numbers. Step 1 s advances exactly 50 physics steps. You can start directly with Step 1 s for a deterministic paused run.
5. When propellant runs out, thrust becomes zero but velocity may remain positive. Watch velocity approach zero near the highest point, then become negative on descent.
6. Save flight CSV to keep measurements. It includes the initial state, one-second samples and the current or final state. Values use SI units and six decimal places. The time-zero row is before ignition. Keep your settings in your experiment notes alongside the CSV.
7. Reset clears measurements while keeping your settings. Replay those settings for the same simulated trajectory. Settings lock during a flight so a payload cannot change in midair.

The lab refuses ignition when initial thrust does not exceed weight. Real rockets could burn propellant while held on a pad; this small lab deliberately does not model that procedure. Engine off and zero fill also produce a specific no-liftoff message. There is no fuel consumption while merely configuring the rocket.

## Suggested investigations

- **Payload:** Compare 120 kg with 240 kg, changing nothing else. Predict initial thrust-to-weight ratio and peak altitude before each run.
- **Tank tradeoff:** Compare Small and Large tanks. More propellant also adds mass and empty-tank mass. Is the result what you predicted?
- **Air drag:** Repeat identical settings with drag disabled. The no-drag run is a comparison model, not an achievable atmospheric flight.
- **Failed launch:** Choose Engine off, then try zero fill. Finally use Learner, Large tank and 2,000 kg payload. Explain the three different reasons.
- **Coasting:** Pause after burnout. Explain why the rocket can rise without thrust. Compare velocity and altitude rather than inferring motion from the flame.

For each experiment record settings, prediction, initial TWR, peak altitude, the measurement that surprised you, and one model limitation. Copy the on-page tutor prompts into a permitted AI tool if useful. The lab itself sends no data and contains no AI API.

## Parts and units

All parts are fictional. Structure mass is 100 kg. Learner engine mass is 80 kg and Lifter is 130 kg; the off-engine placeholder is 40 kg. Empty tanks weigh 35, 65 and 105 kg for Small, Medium and Large. Capacity is propellant mass, not volume. Tank fill changes propellant only. Payload remains attached throughout flight.

Mass is kg, force is N, time is s, altitude is m, and vertical velocity is m/s. Total mass includes dry mass plus remaining propellant. Initial TWR is thrust divided by initial weight. The displayed thrust before ignition is zero; the initial TWR uses available engine thrust. Positive velocity means rising and negative means falling. Peak altitude is the highest sampled altitude, not an orbital achievement. The diagram rescales and the rocket is not drawn to physical size.

## Model boundaries

This is a one-dimensional point-mass model of vertical flight over a spherical, nonrotating Earth. Gravity decreases with altitude; air density decreases exponentially. Drag coefficient and reference area stay fixed, even though real values change with geometry and flight conditions. Engines have constant thrust and mass flow while propellant remains. There is no atmosphere-dependent engine performance, horizontal velocity, staging, steering, stability, weather, heating, parachute or structural analysis.

The numerical integrator uses midpoint steps of 0.02 s, splitting a step at burnout. Ground contact is resolved at a step boundary and clamps altitude and velocity to zero. It does not model landing or impact forces. Peak and ground-contact time have finite-step error. A 600 s cap prevents endless runs; a cap message is not a landing. No mission safety or real hardware conclusions follow from this model. High altitude alone is not orbit, which requires appropriate sideways velocity.

## Verify locally

Runtime needs only a browser. Optional developer checks need Node.js and Python Playwright with an existing Chromium installation:

```
node tests/physics.test.cjs
python tests/browser_test.py
```

Run commands from this lab directory on Linux. If system Chrome cannot start headlessly, install an isolated test browser on the data disk with `PLAYWRIGHT_BROWSERS_PATH="$PWD/.browser" TMPDIR="$PWD" python -m playwright install chromium --only-shell`. The test prefers that local headless shell when present. This development-only download is not needed to use or distribute the lab. The browser check creates a separate headless Chromium profile under this directory, uses a local file URL with offline mode enabled, and does not attach to desktop Chrome. Tests write to `proof/`. The analytical tests use independently written equations; the drag/gravity comparison uses a separately implemented RK4 integrator. A passing small-model test does not validate a real rocket.
