Skip to main content

Questions tagged [n-body-simulations]

Questions regarding simulations for an n-body problem.

Filter by
Sorted by
Tagged with
1 vote
1 answer
100 views

What is the point of approximate Large Scale Structure simulation with neural networks?

People use N-body simulations to compute Large Scale Structure (LSS). To use this method you need to make assumptions about the underlying physics, e.g. the parameters of the Universe expansion, the ...
dust's user avatar
  • 153
7 votes
1 answer
211 views

When should we use direct O(N^2) N-body simulation (instead of other methods)?

I've read a small tutorial on N-body simulation methods. What it says about direct N-body simulation is: These codes are often used in star cluster dynamics or in other contexts where multiple stars ...
dust's user avatar
  • 153
7 votes
1 answer
557 views

Large scale structure/Single galaxy simulation on GPU

I noticed that most of the tools for cosmological simulation (e.g. large scale structure or single galaxy evolution) are based on GADGET. It only allows to use CPU. Why not GPU? What is the main ...
dust's user avatar
  • 153
4 votes
0 answers
142 views

How to speed up REBOUND python simulations on a Jupyter notebook?

I'm running Python based computational astrophysics simulations on a Jupyter notebook, with the help of a library called REBOUND (also using REBOUNDx), to create a simulation containing the solar ...
poseidon24's user avatar
3 votes
0 answers
112 views

How well are planetary formation models (e.g., determining $\mathrm{\dot{M}_{planet}}$) understood in 2024?

I know that planets can form through accretion, bulging up from $0$ to their final mass $\mathrm{M_{planet}}$ at $\mathrm{M}(t_f)$. I know that when studying Planetary formation and migration theories,...
nuwe's user avatar
  • 781
3 votes
1 answer
143 views

Corkscrew-like stable two-body system

I recently created a celestial body simulation in python for one of my classes. While playing around with different values I obtained a weird two-body stable system.. For context, these bodies are ...
Konstantinos Benjamin Vigos's user avatar
1 vote
0 answers
423 views

Three Body Problem using Python

I need help with an assignment. I'm doing a little project for a subject on my university and as the title says, its to find a solution to the three body problem restricted to a circular motion. The ...
diegoski01's user avatar
0 votes
0 answers
46 views

How to plot different curves in the same polar cordinates in matplotlib?

I tried to plot the paths of particle of different sizes in the same polar coordinate using the code given below using matplotlib. somewhat like this: Instead I got this plot: while the path for ...
Lunthang Peter's user avatar
4 votes
1 answer
132 views

How do various astrophysical models deal with so many orders of magnitude in scale? Are there completely different models for different scales?

If we just model our solar system's dynamics, one could use a straightforward numerical integrator with all n(n-1)/2 gravitational interactions along with some torques and non-gravitational forces. ...
uhoh's user avatar
  • 30.7k
2 votes
1 answer
73 views

Help with simulating long-term orbital dynamics of exoplanetary systems using Rebound

I am a junior in high school working on an independent research project and I need help because I've reached the limits of my knowledge. My goal is to simulate the long-term orbital dynamics of ...
HSStudent's user avatar
0 votes
0 answers
102 views

Difficulty simulating trajectory of moon and sun for Apollo 11 mission

As an engineering student, I am doing a project about Kalman filtering and the mission Apollo 11. Now I tried to simulate the trajectory of the moon and sun for 3 days (the duration in which the ...
Blobmou's user avatar
  • 55
3 votes
1 answer
74 views

Most accurate way of measuing the radius of a rubble-pile comet in an N-body simulation?

I have written an N-body simulation (close to finished) in C++ which focuses on the tidal disruption of comets. I allow comets to be constructed in 2 ways: Via my HCP (hexagonal-closest-packing) ...
Gregor Hartl Watters's user avatar
3 votes
2 answers
802 views

How to find zero velocity contours for circular restricted 3-body problem in x-y plane?

(I am having physics background; I am not an astronomer/astrophysicist.) How to solve a single nonlinear algebraic equation in two variables, $x$ and $y$? (I know that - if there are two variables, ...
atom's user avatar
  • 169
7 votes
2 answers
3k views

Would it be possible for a planet to orbit around a trinary star system in a figure 8 orbit?

I know that it is possible for a 3-body system to be "stable" in a figure-8 pattern. It's only stable if it is set up perfectly with no outside forces, but that's fine with me. If there were ...
Teagan's user avatar
  • 79
5 votes
0 answers
206 views

Different techniques for calculation of celestial bodies dynamics with different time-scales

Differential equations describing the dynamics of celestial bodies (rotation, nutation, precession and other effects) can be solved numerically, which makes it possible to study their general non-...
ayr's user avatar
  • 886
8 votes
2 answers
975 views

Does the barycenter of an n-body system remain constant during collisions?

I am developing an n-body simulation software which simulates collisions. Most of these have a stationary frame of reference, meaning that orbiting objects may eventually move off the screen. To ...
WarpPrime's user avatar
  • 6,733
3 votes
1 answer
219 views

How to get JPL Ephemeris data to work in n-body simulation or why is Mercury flying to Jupiter

I wanted to make a n-body simulation for an art project. I used this n-body algorithm, which includes a stable system for the Sun + gas giants, but no inner planets. I wanted to simulate inner planets ...
Michael Cole's user avatar
3 votes
1 answer
64 views

RAMSES fine multigrid Poisson solver fails to converge?

I am working on setting up N-body simulations of galaxy mergers. The initial conditions are generated from the DICE code, and looking at them, they seem very realistic. Unfortunately, when I let ...
BooleanDesigns's user avatar
3 votes
1 answer
598 views

Initial state for a 3-body problem to create Figure 8 [ restricted to 2D ]

I've made an n-body simulation solution using the naive algorithm of O(n^2) in my library ChelseaaJS. I was trying to make some pleasing 3 Body simulations. I wanna do the 8 figure thing. I know it's ...
Beetran Dahiya's user avatar
5 votes
1 answer
2k views

What is Gravitational softening length?

I was reading the Aquarius simulation preprint (Springel et al. 2008) The Aquarius Project: the subhalos of galactic halos as a reference for my internship. I came across the term Gravitational ...
Sriram Ramaswamy's user avatar
5 votes
1 answer
533 views

Orbital modelling, three bodies, leapfrog numerical integration

Apologies for the length of this question. I'm modelling the motion of a single planet around the Sun using the equations: $$dv_{x_{i}}/dt=a(t)=-GM_{SUN}x_{i}/r^{3},$$ where $x_{1}=x$, $x_{2}=y$ and $...
Peter's user avatar
  • 1,033
3 votes
0 answers
35 views

Mass resolution in cosmological simulations [duplicate]

I've been reading papers about different cosmological simulations and they all talk about the "mass resolution" of those. Can someone please explain what does "mass resolution" ...
schrodingal's user avatar
1 vote
0 answers
589 views

Nbody problem solving on python with Leapfrog

I am relatively new to astronomical programming and I am trying to code a simulation of the solar system as simplified as possible on python. To do so, I am using numpy in order to have one array ...
mkvb_78's user avatar
  • 11
6 votes
3 answers
2k views

N-body simulation still losing precision despite using arbitrary-precision arithmetic and symplectic integrator

A while ago I asked 2-body orbits expanding in nbody simulation?. One thing that I noticed was that JavaScript does not have arbitrary precision, and that I used RK4 as my integrator, while it is ...
WarpPrime's user avatar
  • 6,733
22 votes
1 answer
7k views

Is it possible to have a stable 3 body system that orbits in a perfect circle?

I.e. a system that has 3 objects of equal mass, rotating around the system's center of gravity like so: Please excuse the crude drawing, but I've just been reading The Three-Body Problem book by Liu ...
ROODAY's user avatar
  • 365
3 votes
0 answers
214 views

Is there a tool to convert N-body RAMSES simulation file formats to GADGET 2 format in Python?

I am looking for a way to convert RAMSES files to GADGET-2 binary files because I want to use the package SimSpin (https://github.com/kateharborne/SimSpin/blob/master/R/make_simspin_file.R) which is ...
Jerome's user avatar
  • 155
1 vote
1 answer
205 views

Is it true that the 3 body problem can't be solved using the four basic functions, radicals, and integrals?

The two-body problem can be completely solved via two one-body problems, which only uses the four basic binary functions. However, the three-body problem cannot be solved with these functions and ...
WarpPrime's user avatar
  • 6,733
2 votes
2 answers
278 views

Does one need to consider relativistic effects when simulating the (or any) Solar system?

There was a question over at Physics asking how to improve a home-brew numerical simulation of the Solar system. Even though in that case the defects were likely numerical, I started to wonder whether ...
Peter - Reinstate Monica's user avatar
2 votes
1 answer
257 views

How to interpret skewness and kurtosis plots of galaxy snapshots?

What I did:- I am analysing some simulation snapshots of the Milky Way and it is modelled as a dark matter halo – bulge – disc system. I produced some skewness (using ...
Jerome's user avatar
  • 155
5 votes
1 answer
275 views

Lagrange points for bodies in elliptical orbits?

Lagrange points are points of relative stability near the orbit of another, more massive body. Most of the examples of such points regard orbits with relatively low eccentricity. However, after ...
WarpPrime's user avatar
  • 6,733
2 votes
0 answers
386 views

How to calculate orbital velocity of binary star?

I am trying to simulate the Alpha Centauri AB System. I built the simulation, it works flawlessly when trying to simulate our solar system, and I am now trying to simulate the AB System. I found all ...
Marc Klemm's user avatar
0 votes
0 answers
146 views

Are there python packages to calculate mean line of sight velocity, linewidth and other distributions from galaxy simulation snapshots?

Does anyone know of any packages/functions in packages that can give mean line of sight velocities (losv) from a simulation snapshot (from the spatial and velocity coordinates or directly from the ...
Jerome's user avatar
  • 155
4 votes
1 answer
280 views

How to calculate mean line of sight velocity of stars after rotation of galaxy?

I am trying to calculate the mean line of sight velocity from a simulation snapshot of a galaxy after the galaxy is inclined by a certain angle, theta. I am coding it in python. What I have done so ...
Jerome's user avatar
  • 155
3 votes
1 answer
362 views

Best way to procedurally generate an orbit given mass and eccentricity

As stated here, I've badly expressed my problem and have made what we call a XY problem (the question was well answered nonetheless) so I restate the question. Sorry for the inconvenience I have a 2D ...
Eol's user avatar
  • 75
4 votes
2 answers
493 views

Given mass, position and eccentricity, is there a way to get initial velocity in a 2-body problem?

I know that the we can get the eccentricity vector like that: $\mathbf{e} = \frac{\mathbf{v} \times \mathbf{h}}{\mu} - \frac{\mathbf{r}}{\|\mathbf{r}\|}$ (source: https://astronomy.stackexchange.com/...
Eol's user avatar
  • 75
4 votes
2 answers
204 views

Uncertainities of orbital elements queried from JPL Horizons

I'm trying to retrieve the orbital elements' uncertainities for asteroids queried from NASA JPL Horizons. However I'm not able to find them in the query fields returned in python. Nor am I able to ...
mysterium's user avatar
  • 831
5 votes
2 answers
325 views

Where to find data on orbits of exoplanetary systems?

I hope this is the correct place to ask this question which entails asking if there is a database much like the JPL NASA one for the solar system, but for exoplanetary systems? I am conducting an n ...
Harry Spratt's user avatar
4 votes
1 answer
94 views

How to locate helpful and instructive books and resources about numerical methods in cosmology?

I am interested in the hydrodynamical and N-body simulations, and I want to use simulation results to examine the theoretical models. Hence I am searching for some helpful and instructive books and ...
Wang Yun's user avatar
  • 451
2 votes
0 answers
54 views

What are the one-dimensional observables that can reveal the matter clustering properties of the Universe?

As we all know, the distribution of galaxies, which depend on the spatial coordinates, can help us understand the large-scale structure of the Universe. We can measure the distribution of galaxies ...
Wang Yun's user avatar
  • 451
2 votes
0 answers
64 views

Is this paper on globular cluster stability still up to date?

I'm looking to better understand the stability of globular clusters for an n-body dynamical simulation, specifically with respect to initial data conditions. I know that the total potential energy ...
Justin T's user avatar
  • 3,404
0 votes
1 answer
93 views

Would it be a good idea to dockerize softwares in order to conduct hands-on tutorial sessions? [closed]

I am going to organize a tutorial in which I intend to train students on semi numerical simulations for reionization. Is it a good idea to supply use Docker to supply the codes? What do you think ...
Yami's user avatar
  • 89
3 votes
0 answers
54 views

How to distinguish primary hosts (stars) and orbiting satellites (planets) and tertiary bodies (moons) by their mass and trajectory?

Suppose one has run a gravitational simulation of N bodies (has the mass, vector positions, vector velocities, etc for each body), but knows nothing a priori about ...
zeebeel's user avatar
  • 31
0 votes
0 answers
176 views

2-body orbits expanding in nbody simulation?

Recently, I designed an n-body engine and tested it with a binary star system. After a minute of running, the orbit began noticeably expanding: Why is it happening, and is this natural? The source ...
WarpPrime's user avatar
  • 6,733
6 votes
0 answers
75 views

What fraction of matter is not bound to the galaxies, groups and clusters that we see?

We know that most of the matter in the universe has collapsed into galaxies and galaxies into groups and clusters and that a lot of matter is presently in clusters between the galaxies. But, what ...
eshaya's user avatar
  • 4,682
5 votes
1 answer
751 views

Which will destroy the Earth first: the Sun or Jupiter?

The sun is expected to grow in brightness over time, slowly heating the Earth until the oceans evaporate, leaving the planet uninhabitable. Jupiter is the source of the largest perturbations to Earth'...
Sean Lake's user avatar
  • 2,956
2 votes
1 answer
120 views

Why is the boundary of friends-of-friends (FOF) halo corresponding to iso-density contour?

The friends-of-friends algorithm (hereafter FOF) is commonly used to find halos in cosmological simulations. (For more information, please refer to here and here) I found that some literature argues ...
Wang Yun's user avatar
  • 451
12 votes
2 answers
3k views

Why do people choose 0.2 as the value of linking length in the friends-of-friends algorithm?

The friends-of-friends algorithm (hereafter FOF) is commonly used to find halos in cosmological simulations. And FOF depends on only one parameter, linking length, $l_\mathrm{link}=b \left(\frac{V_u}{...
Wang Yun's user avatar
  • 451
4 votes
5 answers
440 views

If an orbit is shifting due to orbital precession, is it still a Keplerian orbit?

I was thinking about orbits a few days ago, and realized that orbits shift/precess naturally. Given that a two-body problem with a star and a planet, if the planet has an eccentric orbit that ...
WarpPrime's user avatar
  • 6,733
4 votes
2 answers
877 views

'Little h' usage in cosmological simulations

I am running a cosmological simulation and am having some trouble putting things into code units. The physical distance units in my simulation are in terms of $\text{Mpc/h}$, where $h$ is the ...
gabe's user avatar
  • 141
2 votes
1 answer
278 views

What kind of triangle is formed by three unequal masses in a circular restricted three body orbit?

This answer to Are the orbits of all triple star systems at least technically unstable? mentions: There are known solutions to the gravitational three body problem that can be shown to be stable. ...
uhoh's user avatar
  • 30.7k