Solution (source code)

= Solution

A cold self-gravitating core initially contracts on a dynamical scale $t_{\rm ff}\sim(G\rho)^{-1/2}$ if cooling prevents <pressure> from halting collapse. Increasing <optical depth> eventually traps <radiation> and forms a pressure-supported <first hydrostatic core>. Dissociation of <molecular hydrogen> absorbs compressional <energy>, softens the <equation of state> and triggers a <second protostellar collapse> to a compact <protostar>. Rotation produces a disk; angular-momentum transport permits continuing <accretion>, while outflows remove some <mass> and <angular momentum>.

An accreting object's <luminosity> includes a contribution of order $L_{\rm acc}\sim GM\dot M/R$, with a coefficient set by where <accretion> <energy> is radiated or retained. After <accretion> subsides, gravitational contraction supplies internal <luminosity> over the <Kelvin-Helmholtz cooling time> $t_{\rm KH}\sim GM^2/(RL_{\rm int})$. Hydrostatic contraction heats the interior even while <energy> is radiated, as follows from the <virial theorem> and the <negative heat capacity of a virialized gravitational system>. <accretion luminosity> must not be substituted for $L_{\rm int}$ in the contraction time without an energy-budget justification.

Low-mass, nearly fully convective <pre-main-sequence stars> contract down a <Hayashi track> at roughly constant <effective temperature> and decreasing radius and <luminosity>. A developing <radiative core> can lead onto a <Henyey track> toward higher <effective temperature>; the route depends on <mass> and opacity. The <deuterium-burning energy-generation rate> can temporarily moderate contraction, but sustained core <hydrogen burning> marks arrival on the <main sequence>. Massive objects may begin <hydrogen burning> while still accreting, and substellar objects never establish long-lived <hydrogen burning>. An <infrared> spectral class reflects envelope and disk emission as well as inclination and <interstellar extinction>, so it is not a unique stellar age or interior evolutionary track.