Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
88 changes: 88 additions & 0 deletions NEXT_Quickstart_Under_30_Seconds.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,88 @@
# ⚡ Run a NEXT Simulation in Under 30 Seconds

This quickstart shows how to build and run a minimal simulation using the **NEXT (Newtonian EXact Trajectories)** codebase in under 30 seconds on a typical developer machine.

---

## Prerequisites

- Git
- CMake (≥ 3.10)
- C++ compiler (Clang, GCC, or MSVC)
- Python 3 (for example input generation)

---

## 🚀 Quickstart

### 1. Clone the repository

```bash
git clone https://github.com/TimGoTheCreator/NEXT.git
cd NEXT
```

---

### 2. Build the simulator

```bash
mkdir build
cd build
cmake ..
cmake --build . --config Release
cd ..
```

This produces the `next` executable in the build directory.

---

### 3. Run a built-in example simulation

```bash
cd examples/TwoBodies
python two_body.py
../../build/next two_body.txt 8 0.01 0.1 vtu
```

**Arguments explained:**

- `two_body.txt` – input file generated by the Python script
- `8` – number of CPU threads
- `0.01` – time step
- `0.1` – total simulation time
- `vtu` – output format (VTK Unstructured Grid)

---

### 4. View the results

The simulation outputs a `.vtu` file in the example directory.

To visualize:
- Open the file in **ParaView**
- Load the dataset and press *Play* to view particle trajectories

---

## 🧠 What This Demonstrates

- Successful compilation of the NEXT C++ engine
- Generation of initial conditions via Python
- Execution of an N-body simulation
- Export of results to a standard visualization format

This workflow is intended as the fastest possible validation that NEXT builds and runs correctly.

---

## Notes

- Build times may vary depending on compiler and system.
- For longer or higher-resolution simulations, adjust thread count, timestep, and total time accordingly.
- Additional examples are available under the `examples/` directory.

---

✅ **Expected total time**: ~20–30 seconds on a modern development machine.