
Features
Integration methods
Compute engines
Engine alias |
Approximate |
Description |
ah |
:star: |
Single threaded engine with Ahmad-Cohen universe force simulation. See 2) |
block |
:heavy_minus_sign: |
Multi-threaded (OpenMP) engine with block-by-block force computation |
cuda |
:heavy_minus_sign: |
Parallel CUDA engine |
cuda_bh |
:star: |
CUDA engine with Burnes-Hut force simulation |
cuda_bh_tex |
:star: |
CUDA engine with Burnes-Hut force simulation and with bodies tree stored at texture memory. Possible tree layout is 'heap' and 'heap_stackless' |
opencl |
:heavy_minus_sign: |
Parallel OpenCL engine |
opencl_bh |
:star: |
Parallel OpenCL engine with Burnes-Hut force simulation |
openmp |
:heavy_minus_sign: |
Multi-threaded (OpenMP) engine |
simple |
:heavy_minus_sign: |
Simple single threaded engine |
simple_bh |
:star: |
Multi-threaded (OpenMP) engine with Burnes-Hut force simulation |
How to run
Simulation
To run n-body problem simulation use 'nbody-simulation' program.
Simulation control
Argument |
Description |
--stars_count |
Stars count |
--box_size |
'Universe' box size. |
--output |
Output stream name. |
--resume |
Stream name to resume (in this case output and initial_state are ignored). |
--initial_state |
Optional initial state file |
--initial_type |
Initial state type. Possible values are: Zeno, G1, SI, ADK. See initial state types table. |
--max_part_size |
Max stream file size (splits a stream into multiple files). |
--max_time |
Max simulation time. |
--dump_step |
Time step to dump simulation state to stream. |
--check_step |
Time step to verify the fundamental laws of physics. Conservation of impulse [P], angular momentum [L], energy [E], mass center velocity [V]. |
--check_list |
List of fundamental laws of physics to check. For example --check_list=PL to check only conservation of impulse [P] and angular momentum [L]. |
--verbose |
Print detailed simulation information. |
Initial state types
Type |
Description |
Zeno |
File in 'Zeno' format. Can be created with snapascii tool. |
G1 |
Plane text table with Rx Ry Rz Vx Vy Vz M values. Space as separator. |
SI |
Plane text table same format as G1 . Units are meter , second , kilogram . On load mass will be multiplied by MassFactorSI to convert to G1 type. |
ADK |
Plane text table same format as G1 . Units are astronomical unit , day , kilogram . On load mass will be multiplied by MassFactorAuDayKg to convert to G1 type. |
Engine control arguments are:
Argument |
Description |
--engine |
Compute engine type. |
--distance_to_node_radius_ratio |
Simulation accuracy control for Burnes-Hut engines. |
--traverse_type |
Space tree traverse type for Burnes-Hut engine. Possible values are cycle or nested_tree . |
--tree_layout |
Space tree layout type for Burnes-Hut engine. Possible values are tree or heap . |
--tree_build_rate |
Full tree build rate in cucles for Burnes-Hut engine. Only boxes geometry are rebuild between full builds, cells layout is not changed. If 0 than full tree build occurs on each compute. |
--full_recompute_rate |
Full force recompute rate in cucles (Ahmad-Cohen engine). |
--max_dist |
The maximum distance at which the force is calculated completely at each step (Ahmad-Cohen engine). |
--min_force |
The minimum force of attraction at which it is calculated completely at each step (Ahmad-Cohen engine). |
--device |
Platforms/devices list for OpenCL based engines. Format: Platform1_ID:Device1,Device2;Platform2_ID:Device1,Device2... For example: --device=0:0,1 - first and second devices from first platform (with same context), --device=0:0;0:1 - first and second devices from first platform (with separate contexts) |
--oclprof |
Enable OpenCL profile |
--block_size |
Data block size to load at local OpenCL/CUDA memory |
Solver control arguments are:
Argument |
Description |
--solver |
Solver type. |
--max_step |
Solvers max time step |
--min_step |
Embedded solvers min time step |
--rank |
Adams–Bashforth solver rank (1...5). |
--correction |
Kahan summation at each integration step (for now at Adams–Bashforth and Runge-Kutta solvers) |
--starter_solver |
Adams–Bashforth starter solver. |
--refine_steps_count |
Refine step count for implicit solvers. |
--error_threshold |
Step error threshold for solvers with dynamic step. If the error at the current step is greater than the threshold, then we decrease the time step and repeat the step. |
--max_recursion |
Max recursion level for embeded solvers. |
--substep_subdivisions |
Number of embeded solver substeps into which the current step is divided at the next level of recursion when the error greater than error_threshold . |
--max_level |
Maximum extrapolation table size for Bulirsch-Stoer solver |
Player
To view simulation results run 'nbody-player' program.
Argument |
Description |
--input |
Input stream name. |
--check_list |
List of fundamental laws of physics to check. For example --check_list=PL to check only conservation of impulse [P] and angular momentum [L]. |
Other parameters controlled via UI.
Gallery

Refs
-
Hairer, Ernst; Nørsett, Syvert Paul; Wanner, Gerhard (1993), Solving ordinary differential equations I: Nonstiff problems, Berlin, New York
-
A Numerical Integration Scheme for the N-Body Gravitational Problem A. AHMAD AND L. COHEN 1973
-
Задача N тел или как взорвать галактику не выходя из кухни
-
Feagin T. A tenth-order Runge–Kutta method with error estimate. In: Proc. of the IAENG Conf. on Scientific Computing. Hong Kong, 2007.