def veras_multiplanet(): """ Initial conditions for multi-planet system as described in: Veras D, MNRAS 431, 1686-1708 (2013), paragraph 2.2 """ endtime = 5e5 | units.yr mdot = 1.244e-5 | (units.MSun / units.yr) mass1 = 7.659 | units.MSun mass2 = 0.001 | units.MSun assert mdot * endtime < mass1 threebody = Particles() twobody1 = new_binary_from_elements(mass1, mass2, 10 | units.AU) twobody2 = new_binary_from_elements(mass1, mass2, 30 | units.AU, eccentricity=0.5) threebody.add_particles(twobody1) threebody.add_particle(twobody2[1]) threebody[0].radius = 363.777818568 | units.RSun threebody[1].radius = 6000 | units.km threebody[2].radius = 6000 | units.km return threebody
def nbodies(centralmass, *orbiting): """ Parameters ---------- centralmass: mass of the central body orbiting: dictionary with args/kwargs to create binary from elements """ bodies = Particles() centralbody = Particle(mass = centralmass) bodies.add_particle(centralbody) for body in orbiting: mass = body['mass'] elements = body['elements'] twobody = new_binary_from_elements(centralmass, mass, **elements) bodies.add_particle(twobody[1]) return bodies
def nbodies(centralmass, *orbiting): """ Parameters ---------- centralmass: mass of the central body orbiting: dictionary with args/kwargs to create binary from elements """ bodies = Particles() centralbody = Particle(mass=centralmass) bodies.add_particle(centralbody) for body in orbiting: mass = body['mass'] elements = body['elements'] twobody = new_binary_from_elements(centralmass, mass, **elements) bodies.add_particle(twobody[1]) return bodies
def veras_multiplanet(): """ Initial conditions for multi-planet system as described in: Veras D, MNRAS 431, 1686-1708 (2013), paragraph 2.2 """ endtime = 5e5 |units.yr mdot = 1.244e-5 |(units.MSun/units.yr) mass1 = 7.659 |units.MSun mass2 = 0.001 |units.MSun assert mdot * endtime < mass1 threebody = Particles() twobody1 = new_binary_from_elements(mass1, mass2, 10|units.AU) twobody2 = new_binary_from_elements(mass1, mass2, 30|units.AU, eccentricity=0.5) threebody.add_particles(twobody1) threebody.add_particle(twobody2[1]) threebody[0].radius = 363.777818568 |units.RSun threebody[1].radius = 6000 |units.km threebody[2].radius = 6000 |units.km return threebody