  Sub-Neptune-sized exoplanets represent one of the most common types of
planets in the Milky Way, yet many of their properties are unknown. Here, we
present a prescription to adapt the capabilities of the stellar evolution
toolkit Modules for Experiments in Stellar Astrophysics (MESA) to model
sub-Neptune mass planets with H/He envelopes. With the addition of routines
treating the planet core luminosity, heavy element enrichment, atmospheric
boundary condition, and mass loss due to hydrodynamic winds, the evolutionary
pathways of planets with diverse starting conditions are more accurately
constrained. Using these dynamical models, we construct mass-composition
relationships of planets from 1 to 400 $M_{\oplus}$ and investigate how
mass-loss impacts their composition and evolution history. We demonstrate that
planet radii are typically insensitive to the evolution pathway that brought
the planet to its instantaneous mass, composition and age, with variations from
hysteresis. We find that planet envelope mass loss timescales, $\tau_{\rm
env}$, vary non-monotonically with H/He envelope mass fractions (at fixed
planet mass). In our simulations of young (100~Myr) low-mass
($M_p\lesssim10~M_\oplus$) planets with rocky cores, $\tau_{\rm env}$ is
maximized at $M_{\rm env}/M_p=1\%$ to $3\%$. The resulting convergent mass loss
evolution could potentially imprint itself on the close-in planet population as
a preferred H/He mass fraction of ${\sim}1\%$. Looking ahead, we anticipate
that this numerical code will see widespread applications complementing both
3-D models and observational exoplanet surveys.
