# NBodySimulationData

NBodySimulationData[data]

represents the result of an n-body simulation.

# Details • NBodySimulation generates an NBodySimulationData object.
• The following operations can be performed on an object nbsd:
•  nbsd[b,t] state of body b at time t nbsd[{b1,b2,…},t] states of bodies bi at time t nbsd[All,t] states of all bodies at time t nbsd[b,prop,t] value of property prop for body b at time t nbsd[bodies,prop,t] list of values of prop for multiple bodies at time t nbsd["comb",t] value of a combined quantity at time t nbsd["sim"] overall simulation property sim
• Possible combined quantities include:
•  "TotalKineticEnergy" total (nonrelativistic) kinetic energy for all bodies "TotalPairwiseInteractionEnergy" total pairwise interaction energy of all bodies "TotalEnergy" total kinetic and pairwise ineraction energy
• Possible overall simulation properties include:
•  "Equations" differential equations of motion "HamiltonEquations" differential equations in Hamiltonian form "SimulationTime" total simulation time

# Examples

## Basic Examples(2)

Simulate a three-body problem in two dimensions:

 In:= Out= Get the data for body 1 at time t=4:

 In:= Out= Plot the positions of the bodies:

 In:= Out= Plot the velocity for bodies 2 and 3:

 In:= Out= Continue a simulation further:

 In:= Out= In:= Out= The new data has the same body parameters as the original:

 In:= Out= The new data contains the simulation data from the original. Plot the position of the bodies:

 In:= Out= Introduced in 2019
(12.0)