11import numpy as np
2- from .physics import gamma_1
2+ from .physics import gamma_1 , gamma_si
33
44def init_solar_system ():
55 bodies = np .array ([[ 0 , 0 , 0 , 0 ], #sun
@@ -33,7 +33,7 @@ def getOrbitalVelocity(xb, yb, mb, xs, ys):
3333 dist = np .sqrt (r [0 ] * r [0 ] + r [1 ] * r [1 ])
3434
3535 # Based on the distance from the sun calculate the velocity needed to maintain a circular orbit
36- v = np .sqrt (gamma_1 * mb / dist )
36+ v = np .sqrt (gamma_si * mb / dist )
3737
3838 # Calculate a suitable vector perpendicular to r for the velocity of the tracer
3939 vxs = ( r [1 ] / dist ) * v
@@ -65,7 +65,7 @@ def init_collisions(blackHole):
6565
6666 nstars = b ['stars' ]
6767 rad = b ['radstars' ]
68- r = 0.1 + .8 * (rad * np .random .rand (nstars ))
68+ r = 0.3 + .8 * (rad * np .random .rand (nstars ))
6969 a = 2 * np .pi * np .random .rand (nstars )
7070 tmp_mass = 0.03 + 20 * np .random .rand (nstars )
7171 x = b ['coord' ][0 ] + r * np .sin (a )
@@ -75,8 +75,8 @@ def init_collisions(blackHole):
7575
7676 particles [ind :ind + nstars , 0 ] = x
7777 particles [ind :ind + nstars , 1 ] = y
78- particles [ind :ind + nstars , 2 ] = 1e2 * ( vx + vxb )
79- particles [ind :ind + nstars , 3 ] = 1e2 * ( vy + vyb )
78+ particles [ind :ind + nstars , 2 ] = vx + vxb
79+ particles [ind :ind + nstars , 3 ] = vy + vyb
8080 mass [ind :ind + nstars ] = tmp_mass
8181 ind += nstars
8282
0 commit comments