loading...
running...
The science
This lab follows a young star surrounded by a gas and dust disc. Dust settles and sticks into planetesimals (the "seeds"), seeds grow into protoplanets by sweeping up a reservoir of solids, protoplanets pull on each other with real gravity, and the gas drags, migrates and finally disappears.
Disc (minimum-mass nebula scaling).
Sigma_gas = 1700 f_g (r/AU)^(-3/2) exp(-t_epoch/tau_disc) g/cm^2, T = 280 K (L/Lsun)^(1/4) (r/AU)^(-1/2)
Sigma_solid = 7.1 f_Z (r/AU)^(-3/2) inside the frost line, 30 f_Z (r/AU)^(-3/2) outside (Hayashi 1981)
frost line: T = 170 K => r_f = 2.7 (L/Lsun)^(1/2) AU, L = M*^3.5 (main-sequence stand-in)
Water ice condenses beyond the frost line, so the solid surface density jumps by about 4 times there and bodies that form outside carry ice (the ice fraction is tracked per body and sets its density).
Growth. A protoplanet of mass M at distance a has Hill radius and feeding zone
R_H = a (M / 3M*)^(1/3), zone = a +/- 5 R_H, dM/dt = Omega pi R^2 F_g Sigma_solid, F_g = 1 + 6 R_H/R
F_g is gravitational focusing in the Hill regime (escape speed over a relative speed of about R_H Omega). The solids are removed from a 3000-bin radial reservoir, so a growing planet clears a gap and runs out of food. It stalls near the isolation mass (Lissauer 1987), with a feeding zone of b = 10 Hill radii:
M_iso = (2 pi b a^2 Sigma_solid)^(3/2) / (3 M*)^(1/2)
Gravity. All bodies and the star are integrated together as an N-body system with a kick-drift-kick leapfrog (symplectic, second order) and a step limited to 2 % of the shortest orbital period or to a fraction of any close-encounter time scale. Bodies that touch (within the chosen collision radius) merge, conserving mass and linear momentum; the relative orbital angular momentum goes into spin. Bodies that fall inside 0.08 AU are counted as swallowed by the star, those beyond 250 AU as ejected.
Gas. Gas drag and tidal torques damp eccentricity, inclination and semi-major axis (Tanaka and Ward; Tanaka et al. 2002, with surface-density slope 3/2):
tau_e = (M*/M)(M*/(Sigma_gas a^2)) h^4 / Omega, tau_a = (M*/M)(M*/(Sigma_gas a^2)) h^2 / (4.35 Omega), h = H/r = h0 r^(1/4)
eta = 1.625 h^2 (gas rotates at v_K sqrt(1 - 2 eta)), pebble drift v_r = -2 eta v_K St / (1 + St^2)
Both are applied as exact exponential relaxations so they stay stable at any time-lapse. A planet above the gap-opening mass migrates and damps more slowly. Cores above about 0.5 Earth masses can add a gas envelope: a slow Kelvin-Helmholtz phase, tau_KH = 3 Myr (M_core/10 Earth)^(-3), then runaway growth limited by the disc supply 3 pi alpha h^2 a^2 Omega Sigma_gas. The runaway phase is what makes a gas giant, and it only works while gas is left.
Honest simplifications. (1) Orbits are integrated in real time but growth, drag, migration and gas loss run on an epoch clock t_epoch = C t (the time-lapse factor C, default about 3000), because a few million years cannot be integrated directly in a browser; the price is that mutual scattering is under-represented compared with the real Myr-long evolution. (2) The solid reservoir is a smooth one-dimensional profile, not a size distribution: no fragmentation, no pebble accretion (pebbles are visual tracers with a fixed Stokes number and do not feed the embryos), no resonances beyond what the N-body gives. (3) The collision radius is inflated (default 30 times the physical radius) so mergers happen in the simulated time. (4) The gas disc is analytic and only decays: no hydrodynamics, no gap feedback, no photoevaporation front. (5) Type-I migration is known to be too fast in real discs; the default strength is low and adjustable. (6) The envelope time scales and the gap-opening mass are stylised. (7) Seeds are random: the result is one possible outcome (change the random seed), not a prediction for the Solar System. With a minimum-mass nebula (enrichment 1) cores never reach 10 Earth masses beyond the frost line, which is the classic core-accretion timescale problem; the presets use enriched solids for that reason. Body sizes on screen are exaggerated and, in the log view, distances are compressed.
Numerical checks in the panel. (1) The leapfrog orbital period of a 1 AU orbit against Kepler's third law. (2) Energy drift of a three-body system (Sun, 1 Earth mass, 1 Jupiter mass) over 40 years. (3) Angular momentum including merger spin across a perfectly inelastic collision. (4) The isolation mass at 1 AU grown from the reservoir against the analytic formula (independent of the growth code). (5) The grid solid mass against the closed-form integral of the surface density law (an algebraic identity). (6) Conservation of solids over a live run with your current settings. (7) The pressure-support parameter eta from a numerical derivative of the gas pressure against the analytic 1.625 h^2, and the drift speed of a St = 1 pebble built from it. Checks 1 to 4 and 7 compare against independent calculations; 5 and 6 are identities that catch bookkeeping errors.