Skip to content

Latest commit

 

History

History
90 lines (60 loc) · 1.89 KB

File metadata and controls

90 lines (60 loc) · 1.89 KB

⚡ 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)
  • OpenMP (for Multi-Threadding)
  • HDF5

🚀 Quickstart

1. Clone the repository

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

2. Build the simulator

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

This produces the next executable in the root directory.


3. Run a built-in example simulation

cd examples/TwoBodies
python two_body.py
../../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.