# Python 2D Jean Instability in Spiral Galaxy Simulation

I have ~1000 snapshots of a spiral galaxy simulation (from Molecular cloud perturbations t=0 to t>1Gyr. What I need to do is determine whether any position at any of the snapshot times meets criteria for Jeans instability.

The simulation is 2D, and the snapshot script can read position, velocity and surface density ∑, but not temperature. The simulation also has no gas, instead the simulation was modeled by giving each individual star extra mass which corresponds to gas. I looked online and several site state the Jeans mass in 2d equal to c$_{s}$$^4$ / G$^2$*∑. But I have no clue how to determine speed of sound c$_{s}$. Also I am not really interested in Jeans mass, more so whether any position can collapse to make stars, i.e. satisfy Jeans instability.

• It seems like the model is inadequate to the question you want to answer. It seems to assume that the gas and the stars have the same distribution, whereas you are interested in finding clumps of gas that could form stars. – David Ketcheson Oct 29 '14 at 17:58
• You want to look at Toomre s number : if it's larger than one your disc will be stable to radial instabilities Q= kappa c_s/pi/G/Sigma – chris Jul 8 '17 at 9:25

## 1 Answer

First a warning, then a hack:

1) If you didn't run this simulation, if you are not a trained theoretical astronomer of undergraduate level or above, and if this simulation doesn't have the kind of data you need to answer the question you are asking you should not trust the results at all.

It takes years of study to understand the weird numerical effects (things that happen in the simulation because of the way it is set up that would never happen in reality), background physics and loads of assumptions and approximations that go into this kind of stuff.

We often say 'garbage in, garbage out'. The answers you get from this will probably not be very illuminating because they say more about the simulation than real space.

2) That said, if you are just doing this for fun or to learn the skills, GREAT! Keep playing! And a very basic assumption you can make in order to get some numbers out (that will be quite wrong) is that all gas in space is ~10K.