コード例 #1
0
ファイル: solarsystem.py プロジェクト: vdhelm/amuse
def new_solar_system_for_mercury():
    """
    Create initial conditions for the symplectic integrator Mercury, describing 
    the solar system. Returns a tuple consisting of two particle sets. The first 
    set contains the central particle (sun) and the second contains the planets 
    and Pluto (the 'orbiters'). The positions and velocities are in heliocentric 
    coordinates.
    
    Defined attributes sun: 
    name, mass, radius, j2, j4, j6, Lx, Ly, Lz
    
    Defined attributes orbiters: 
    name, mass, radius, density, x, y, z, vx, vy, vz, Lx, Ly, Lz, celimit
    """
    planets = _planets_only(define_mercury_attributes = True)
    centre = Particles(1)
    centre.name = 'SUN'
    centre.mass = 1.0 | units.MSun
    centre.radius = 0.0000001 | units.AU
    centre.j2 = .0001|units.AU**2
    centre.j4 = .0|units.AU**4
    centre.j6 = .0|units.AU**6
    centre.angularmomentum = [0.0, 0.0, 0.0] | units.MSun * units.AU**2/units.day
    return centre, planets