This program contains a few integrators, able to compute more or less precisely the solution of an N-Body problem.
The program arguments should be :
nBodyProblem [options] initFile [outputFile]
The initFile contains the presets of the simultation, it has to be specified. The outputFile will contains the trajectories of the bodies, its default value is out.csv. If it already exists the program will continue the computation from the end of this file.
The program options are the following :
--eulerUses the explicit Euler integrator-tor--taylorUses a 4-order Taylor serie--symplectic4Uses a 4-order symplectic integrator-sor--symplectic6Uses a 6-order symplectic integrator-eor--energyCorrects the energy of the system-oor--overwriteThe output file will be overwritten
The default integrator running is the classic 4-order Runge-Kutta method
The file containing the simulation informations should have the following format :
bodyNumber,computationStep,computationTime[,outputStepRatio,G]
x1,y1,z1,vx1,vy1,vz1,m1
...
Where outputStepRatio indicates the ratio between the outputed step number and the computed step number. One step out of this much will be recorded in the file. The default value of this is 100. G is the gravitational constant used, its default value is 1, adjust depending on the units used. These two arguments are then optional. Try to choose the units so the system dimensions are as close as possible to 10^0.
The output file will have the following format :
bodyNumber,stepNumber,maxPosition,maxSpeed
t,x1,y1,z1,vx1,vy1,vz1 ... ,xn,yn,zn,vxn,vyn,vzn
...
maxPosition and maxSpeed gives the maximum intensity of each vectors, it can be used to quickly determine the system dimensions
- Fabio d'ORTOLI-GALERNEAU