Welcome, Guest

Author Topic: a little off topic -- how do galaxies work  (Read 5304 times)

vh

  • formerly mudkipz
  • *****
  • Posts: 1140
  • "giving heat meaning"
a little off topic -- how do galaxies work
« on: November 27, 2013, 09:00:59 PM »
i see there's dark matter and no galaxy core. i've tried to code an n-body galaxy simulator before, and i never figured it out.

how do you compute the orbital speeds of the stars? with a single point of mass and stars orbiting, you can do a simple calculation, but with many points of mass and including dark matter, you would need to somehow get density as a function of distance and set the velocity with that. or maybe something like that, i have no idea

there are multiple points of mass in galaxies now, right? because it seems so?

also i'm very interested about the dark matter: is it just points with mass but no collision?

the galaxies in this simulation are very cool :)

edit:

also, density waves. i understand that spiral galaxies manage to keep their arms because there is a star density wave of sorts that causes new starts to be born in a pattern causing an arm appearance. will this be implemented? because it doesn't seem it has been yet

ericjhilton

  • Development Team
  • *****
  • Posts: 4
Re: a little off topic -- how do galaxies work
« Reply #1 on: November 27, 2013, 11:11:08 PM »
Great question. Galaxies are hard to do in a simulator. So we're doing our best to simulate it reasonably accurately, but also fast enough that you can integrate galaxies (and collisions of multiple galaxies) in real time. No easy task!

Yeah, the easiest way is to put all the mass at the center (like in a super massive black hole) and allow the particles to have a simple orbit around that. This is easy, but not realistic. The rotation speed of galaxies is one of the strongest pieces of evidence we have for the existence of dark matter. If you look at the mass that we can see (regular matter), and then compute the orbits, then they should be rotating slower when you get further from the center (just like how the outer planets orbit more slowly than the inner planets). But the rotation speed actually stays 'flat' with radial distance - meaning it's about the same value even if you get further away. The best explanation for this is some mass that we can't see: dark matter. (http://en.wikipedia.org/wiki/Galaxy_rotation_curve)

To simulate dark matter, we just plunk down some red particles with a bunch of mass. And yeah, they don't collide with anything. Just like real dark matter, we only see its influence through gravity. In real life, there would be a very smooth distribution. But we are limited to the number of particles we can use. More particles is more realistic.

To compute the orbital speeds, we can't just put down a Keplerian orbit around a single, massive object. So I compute the total mass that is internal to the orbit of the galaxy particle, and orbit it around that.
And you can safely ignore the dark matter particles external to that radius.
Basically, I use this principle:
http://en.wikipedia.org/wiki/Shell_theorem

Yeah, density waves. So right now Universe Sandbox 2 only uses gravity. In real life, there are lots of other physics that happen. The spiral arms are indeed density waves. So the arms are not the same stars throughout time.
We don't simulate that. So you'll notice that our arms don't stick around for very long. In order to simulate that properly, you need to include more physics. Essentially, we will do that through SPH (http://en.wikipedia.org/wiki/Smoothed-particle_hydrodynamics). SPH is difficult to do in many cases, but it allows us to include a lot of fluid physics, which is necessary to get real stable arms.
Thomas is working on SPH, and hopefully one day we'll be able to apply it to galaxies. But it's very difficult to do this fast enough to be able to compute and render in real time. Lots of professional astronomers are doing incredibly high fidelity galaxy simulations using the same techniques. They just run them on supercomputers for months, with lots and lots of detailed physics. We're trying to make this work on your laptop.

vh

  • formerly mudkipz
  • *****
  • Posts: 1140
  • "giving heat meaning"
Re: a little off topic -- how do galaxies work
« Reply #2 on: November 29, 2013, 07:42:27 AM »
very interesting, thanks for the reply.

if you don't mind me asking, what equation do you use for the dark matter halo density? That is, what is the density of dark matter as a function of distance from the center of galaxy?

do all particles of dark matter have the same mass, or is it randomly generated?