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 NBodySimulationData[] 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 interaction 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:

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

Plot the positions of the bodies:

Plot the velocity for bodies 2 and 3:

Continue a simulation further:

The new data has the same body parameters as the original:

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

Wolfram Research (2019), NBodySimulationData, Wolfram Language function, https://reference.wolfram.com/language/ref/NBodySimulationData.html.

Text

Wolfram Research (2019), NBodySimulationData, Wolfram Language function, https://reference.wolfram.com/language/ref/NBodySimulationData.html.

BibTeX

@misc{reference.wolfram_2020_nbodysimulationdata, author="Wolfram Research", title="{NBodySimulationData}", year="2019", howpublished="\url{https://reference.wolfram.com/language/ref/NBodySimulationData.html}", note=[Accessed: 15-April-2021 ]}

BibLaTeX

@online{reference.wolfram_2020_nbodysimulationdata, organization={Wolfram Research}, title={NBodySimulationData}, year={2019}, url={https://reference.wolfram.com/language/ref/NBodySimulationData.html}, note=[Accessed: 15-April-2021 ]}

CMS

Wolfram Language. 2019. "NBodySimulationData." Wolfram Language & System Documentation Center. Wolfram Research. https://reference.wolfram.com/language/ref/NBodySimulationData.html.

APA

Wolfram Language. (2019). NBodySimulationData. Wolfram Language & System Documentation Center. Retrieved from https://reference.wolfram.com/language/ref/NBodySimulationData.html