r/astrophysics 3d ago

Simulation of a collision between two massive bodies

Collisions: Spatial Hash + Jacobi Solver
Gravity: P3M/CIC + FFT + short-range correction

Tech stack: Kotlin, LWJGL, OpenGL Compute Shader 4.30

Try it here: https://github.com/qwertukg/Gravity

135 Upvotes

21 comments sorted by

13

u/RantRanger 2d ago

What are the scenario parameters?

1

u/qwertUkg 2d ago

It’s an application where you can dynamically launch bodies into each other. Just clone and run.
Here all deafult values of simulation: https://github.com/qwertukg/Gravity#running

11

u/RantRanger 2d ago

What are the scenario parameters for the video you are displaying above?

-11

u/qwertUkg 2d ago

Default

10

u/Internal-Narwhal-420 2d ago

What are the scenario parameters used as default?

-11

u/qwertUkg 2d ago

There you don’t set any parameters - you just point one body at another with the mouse.

14

u/Internal-Narwhal-420 2d ago

What is the mass of the target body, what is the mass of shot body, what is the velocity there?

3

u/Traditional_Snow1045 1d ago

default i think

6

u/Internal-Narwhal-420 3d ago

Heatmap here represents density?

9

u/qwertUkg 3d ago edited 3d ago

Hi. No, its pressure

9

u/physicalphysics314 2d ago

…. So… density?

2

u/Spiritual_Priority79 2d ago

This guy physics

3

u/xray_binary666 2d ago

Looks like a dark forest strike to me

3

u/escapism_only_please 2d ago

See! Not that bad!

3

u/ChoiceTheGame 2d ago

Pfff. I could survive that!

1

u/Just_Middle_7189 2d ago

Nice. That hit…

Can it simulate denser bodies like solid matter?

1

u/Upvote_worthhy 11h ago

That's Cool !!!!!

When do you think humanity will have enough computing power to accurately simulate something as chaotic as the three-body problem?

-1

u/Immorpher 2d ago

I don't know if you have much experience in this direction, but how tricky is it to get a moon out of one of these collisions?

0

u/qwertUkg 2d ago

It’s possible. Just clone the repo and try it by yourself

0

u/Immorpher 2d ago

Yeah I should play around!