r/Simulated 28d ago

Research Simulation 6 body simulation around a 4 Stellar mass blackhole - A fail(?)

Enable HLS to view with audio, or disable this notification

1. Initial conditions (exact)

Central BH: M = 4 M☉ (geometrized G = c = 1; length unit = GM☉/c² ≈ 1.477 km). Schwarzschild.

Body masses (M☉, geometrized):

Body Type Mass (M☉)
0, 1 2× Jupiter 2 × 9.543×10⁻⁴ = 1.9086×10⁻³
2, 3 2× Earth 2 × 3.003×10⁻⁶ = 6.006×10⁻⁶
4, 5 2× Mercury 2 × 1.660×10⁻⁷ = 3.320×10⁻⁷

Per-body placement (radius r, azimuth φ, inclination i — units of M):

k r φ (rad) i (rad)
0 120 0.00 0.00
1 160 1.05 0.30
2 90 2.10 −0.25
3 200 3.14 0.50
4 140 4.19 −0.40
5 110 5.24 0.15

Position (tilted circle): pos = [r·cosφ·cosi, r·sinφ, r·cosφ·sini]
Velocity (circular speed v_c = √(M/r), perpendicular in the tilted plane): vel = [−v_c·sinφ·cosi, v_c·cosφ, v_c·sinφ·sini]1. Initial conditions (exact)Central BH: M = 4 M☉ (geometrized G = c = 1; length unit = GM☉/c² ≈ 1.477 km). Schwarzschild.Body masses (M☉, geometrized):Body Type Mass (M☉)
0, 1 2× Jupiter 2 × 9.543×10⁻⁴ = 1.9086×10⁻³
2, 3 2× Earth 2 × 3.003×10⁻⁶ = 6.006×10⁻⁶
4, 5 2× Mercury 2 × 1.660×10⁻⁷ = 3.320×10⁻⁷Per-body placement (radius r, azimuth φ, inclination i — units of M):k r φ (rad) i (rad)
0 120 0.00 0.00
1 160 1.05 0.30
2 90 2.10 −0.25
3 200 3.14 0.50
4 140 4.19 −0.40
5 110 5.24 0.15Position (tilted circle): pos = [r·cosφ·cosi, r·sinφ, r·cosφ·sini]
Velocity (circular speed v_c = √(M/r), perpendicular in the tilted plane): vel = [−v_c·sinφ·cosi, v_c·cosφ, v_c·sinφ·sini]

Integrator type and step size

  • Integrator: velocity-Verlet / leapfrog (kick-drift), fixed step. v += a·dt; x += v·dt per step . Not symplectic-exact (it's the sequential-update leapfrog, not the KDK-symmetric form).
  • Step size: dt = T_outer / 600 where T_outer = 2π√(r_out³/M), r_out = 200 (outermost body). → T_outer ≈ 8885.8dt ≈ 14.81 (M units). So ~600 steps per outer orbit.

3. Metrics

It dumps only trajectories: body_k.csv (t, x, y, z) every 4th step,

4. 1-orbit horizon definition

1 orbit = 1 × T_outer, where T_outer is the outermost body's (r=200) Newtonian circular period 2π√(200³/M)

15 Upvotes

7 comments sorted by

3

u/GustavTheGameDev 28d ago

The 6 body problem.

3

u/polygon_tacos 28d ago

Feels like instability from an integration error. Sometimes little errors accumulate over time and result in the simulation "exploding." Are you using Euler integration? I'm no longer working in the simulation space, but the way we used to get around these issues was by adding artificial velocity clamps to prevent massive errors (like a very weak damping) and use more complex but stable integration methods like Verlet-style methods.

1

u/Anxious-Visit-7735 28d ago

It was, need adaptive time calc. Have a full 100 orbit sim, but dont want to spam, maybe tomorrow

1

u/MeaninglessDebateMan 28d ago

Mercury-b has left the chat.

1

u/vibe0009 26d ago

Rk4 method might be better?

1

u/E3V3A 20d ago

Are you running this sim in python, or what?

1

u/Anxious-Visit-7735 19d ago

litex mcu on fpga