Hello,(adsbygoogle = window.adsbygoogle || []).push({});

I'm trying to simulate disc galaxy dynamics with a nbody code. The main problem is to get

good initial values (positions and velocities of each star) in order to reproduce the

experimental dynamics.

For the positions, I began by generating a gaussian distribution of stars on 0x and Oy plans ( with mux=muy=0.0 and sigmax != sigmay). On 0z direction, I have generated a uniform distribution whose interval is small compared to sigmax and sigmay. ( this is supposed to reproduce the thin thickness of the disc galaxy). For the velocities of each point, I simply took the newtonian formula :

v_{x}= - ||vnorm|| * sin(theta)

v_{y}= ||vnorm|| * cos(theta)

v_{z}= 0.0

with ||vnorm||=sqrt(GM/R) with R equal to the distance from the origin and M the mass parameter that we have to adjust.

Unfortunately, using the code with these initial conditions, the galaxy is not stable from a dynamics point of view.

I know the model of these conditions is too basic. Could you give me indications to generate initial conditions more accurate, which could reproduce a stable dynamics.

For example, I should take account of a central bulge.

Has anyone got some documentation on this problem and models more elaborated ?

Thanks

**Physics Forums | Science Articles, Homework Help, Discussion**

The friendliest, high quality science and math community on the planet! Everyone who loves science is here!

# Simulation for galaxy dynamics

**Physics Forums | Science Articles, Homework Help, Discussion**