A primordial radius valley as a consequence of planet formation Jesper Nielsen, Anders Johansen, Komal Bali, Caroline Dorn Abstract The radius distribution of close-in planets has been observed to have a bimodal distribution with a dearth of planets around ∼ \sim 1.5-2.0 R ⊕ R_{\oplus} commonly referred to as the ”radius valley”. The origin of the valley is normally attributed to mass-loss process such as photoevaporation or core-powered mass loss. Recent work, however, has suggested that the radius valley may instead arise as a consequence of gas accretion by low-mass planets. In this work we therefore aim to investigate the formation of a primordial radius valley from the formation of planet cores through pebble accretion up until the dissipation of the protoplanetary disc and subsequent contraction of accreted atmospheres. The goal of this work is to explore the conditions for forming a primordial radius valley from first principles of planet formation theory, rather than attempting to explain the detailed structure of the observed valley. We use an analytical model with minimal assumptions to estimate the contraction rate of atmospheres and, indeed, find the formation of a primordial radius valley. The planets smaller than the valley did not reach the pebble isolation mass, which is required for the planets to cool down sufficiently to be able to accrete a significant amount of gas. We also estimate the slopes of the radius gap as a function of orbital period for the intrinsic population as well as for planets with orbital periods < < 100 days. For the intrinsic population, the radius gap follows the pebble isolation mass and increases with increasing orbital period, while for close-in planets the direction of the slope reverses and decreases with increasing orbital period. We find that planets smaller than the radius valley are predominantly rocky while the population of planets larger than the valley consists of a mixture of rocky and water-rich planets. 1 Introduction The Kepler mission ( Borucki et al., 2010 ) has given us a lot of insight into the formation and evolution of planetary systems. One of the key findings from the Kepler mission is the apparent lack of planets with radii in the range \sim 1.5-2.0 R_{\oplus} , for orbital periods < 100 days ( Fulton et al., 2017 ) . This is commonly referred to as the ”radius valley”. Follow-up studies, utilising precise stellar parameters from Gaia ( Gaia Collaboration et al., 2016 ) and more precise planet radii measurements confirmed these findings and found that the location of the valley increases with increasing stellar masses and decreases with increasing orbital periods ( Fulton & Petigura, 2018 ; Berger et al., 2020a ; Ho & Van Eylen, 2023 ) . Observed planets smaller than \sim 1.6 R_{\oplus} have been inferred to have a rocky composition. In contrast, larger planets have too low densities to be composed mainly of metals and silicates, which implies that larger planets require an atmosphere of low mean molecular weight to explain their masses and sizes ( Rogers, 2015 ; Wolfgang & Lopez, 2015 ) . Further, only a small atmosphere mass fraction ( \sim 1-3%) is required in order to inflate the radius significantly, thereby doubling the size of the planet ( Lopez & Fortney, 2014 ; Owen & Wu, 2017 ) . This indicates that planets smaller than the radius valley have very light to no atmospheres, while planets larger than the radius valley host an atmosphere with a mass fraction of at least \sim 1%. Attempts to explain the radius valley have therefore focused on trying to understand how planets lose their atmospheres, populating the smaller end of the radius valley. There have been two major mechanisms that both shape the distribution of planetary radii during their evolution: photoevaporation ( Lopez & Fortney, 2013 ; Owen & Wu, 2013 ; Owen & Wu, 2016 ; Owen & Wu, 2017 ) and core-powered mass loss ( Ginzburg et al., 2018 ; Gupta & Schlichting, 2019 ; Gupta & Schlichting, 2020 ; Gupta & Schlichting, 2021 ; Gupta et al., 2022 ) . After the pressure support of the disc is removed, gas at the Bondi radius will escape at the Bondi rate. In order to sustain mass-loss, the remaining gas needs to expand out towards the Bondi radius. Such an expansion requires a supply of heat. The mass loss in the photoevaporation model is mainly driven from high-energy flux from the star, accelerating the atoms in the atmosphere, which causes heating, expansion and an outflow. Core-powered mass loss is instead mainly driven by the remaining thermal energy of the planet, combined with the bolometric illumination by the central star ( Ginzburg et al., 2016 ; Ginzburg et al., 2018 ) . The position of the radius gap has been observed to decrease with increasing orbital period ( Fulton et al., 2017 ; Petigura et al., 2022 ) , which both mass loss models are able to predict ( Owen & Wu, 2017 ; Gupta & Schlichting, 2019 ) . However, Cloutier & Menou (2020) found that the radius gap increases with increasing orbital period for M-dwarfs, which might hint towards a separate planet formation process for planets around these types of stars as an increasing radius gap with increasing orbital period is generally predicted by planet formation after the dissipation of the protoplanetary disc ( Lopez & Rice, 2018 ) . The two presented mass loss models nevertheless predict different dependencies on the stellar mass. As the core-powered mass loss mechanism is driven by the planet’s internal energy as well as the bolometric luminosity, it predicts that given a fixed incident bolometric flux onto the planet, there is no dependence on the luminosity (and hence the mass) of the host star. The photoevaporation model, in contrast, predicts a stellar mass dependency of the photoevaporation timescale since the high-energy luminosity fraction does scale with stellar mass ( Jackson et al., 2012 ; Shkolnik & Barman, 2014 ; Rogers et al., 2021 ) . Fulton & Petigura (2018) investigated the stellar mass dependencies of the radius valley and found results more consistent with the photoevaporation model. Berger et al. (2023) used data from Gaia DR3 ( Gaia Collaboration et al., 2023 ) and found that the predictions for the observed stellar mass scaling given a fixed flux from both models was within the observed uncertainties. In contrast, the observed flux scaling given a fixed stellar mass could only be explained by the core-powered mass loss model. Further, Loyd et al. (2020) found that the observed radius gap did not vary with stellar mass after fixing incident fluxes, indicating that photoevaporation is not favoured over core-powered mass loss. Core-powered mass loss also seems favoured when considering the ages of sub-Neptune host stars. Observations indicate that the occurrence rate of sub-Neptunes of similar age as the timescale for photoevaporation ( \sim a few 100 Myr) is larger than the occurrence rate of older sub-Neptunes of similar age as the core-powered mass loss timescale ( \sim a few Gyr) ( Berger et al., 2020a ; Christiansen et al., 2023 ) . These results could indicate that sub-Neptunes lose their atmospheres on timescales similar to that of the core-powered mass loss mechanism. However, recent work by Owen & Schlichting (2024) has shown that both core-powered mass loss and photoevaporation can contribute to the loss of atmospheres after disc dispersal and that they are dominant in different regions of the parameter space. Core-powered mass loss is found to be mostly dominant for planets with low core masses and high atmosphere mass fractions while photoevaporation dominates for more massive planets with lower atmosphere mass fractions. This means that a planet can initially lose mass through the core-powered mass loss mechanism and move into a region where photoevaporation dominates. A planet that is initially experiencing photoevaporative mass loss will however not transition into core-powered mass loss ( Owen & Schlichting, 2024 ) . This means that it might be difficult to disentangle the two mechanisms as they are both expected to contribute to the mass loss of planetary atmospheres. It has also been shown that the radius gap can be reproduced without the need for a gaseous envelope by instead allowing for different bulk compositions of the planets. The two peaks in the radius distribution can then emerge by simply considering the presence of water in the form of vapour on the planet. Water-rich planets would naturally be inflated compared to rocky cores, creating the two peaks in the radius distribution ( Venturini et al., 2020 ; Burn et al., 2024 ) . Further, after disc dissipation, multiple planets may be locked in resonant chains which become unstable, causing orbital crossings and potentially collisions between planets. Such collisions would strip away any accreted atmospheres and only bare cores would remain ( Liu et al., 2015 ) . Dense, rocky cores would then constitute the peak at \sim 1.5 R_{\oplus} while water-rich cores ( \gtrsim 50% water mass fraction) of similar masses would be larger and constitute the peak at \sim 2.1 R_{\oplus} on the other side of the valley ( Izidoro et al., 2021 ; Izidoro et al., 2022 ) . Further, the radius valley has been found to be significantly shallower around low-mass host stars. This trend could be explained by water-rich planets with lower densities and therefore inflated core radii ( Ho et al., 2024 ) . The emergence of a radius valley has also been explained as a primordial feature without the need for mass loss. Instead the peak at smaller radii consists of planets that are not able to accrete enough gas to become inflated to \sim 2\,R_{\oplus} . For a given core mass, there exists a maximum atmosphere mass that can be accreted before it becomes fully isothermal with the same temperature of the disc. For small cores ( \sim 1-2 \,M_{\oplus} ), this mass is small enough to not grow beyond the radius valley ( Lee & Connors, 2021 ; Lee et al., 2022 ) . Finally, the radius valley can also be explained in the context of core formation. Planets that form close to the star are generally thought to form through a combination of pebble accretion and giant impacts ( Lambrechts et al., 2019a ; Drążkowska et al., 2023 ) . While the protoplanet is still embedded within a protoplanetary disc, the accretion of pebbles will heat up the planet enough to prevent the contraction of a significant primordial atmosphere. This will prevent the accretion of any significant amount of gas ( Lambrechts et al., 2014 ) . Once the planet core is large enough to perturb the gas in the disc, pebble accretion is halted and the planet can accrete a gaseous atmosphere by lowering its thermal energy. This mass is commonly referred to the pebble isolation mass ( Bitsch et al., 2018 ) . Planets that have not yet reached pebble isolation mass after the dispersal of the disc have therefore not been able to accrete a significant atmosphere and could therefore plausibly constitute the peak at \sim 1.5 R_{\oplus} . Further, the peak at the other end of the radius valley could be constituted by planets that have managed to reach pebble isolation mass and accrete a significant atmosphere. As pebble accretion has been shown to contribute to the formation of both gas giants ( Bitsch et al., 2015 ) and terrestrial planets ( Johansen et al., 2021 ; Onyett et al., 2023 ) , we will only focus on the mechanisms of pebble accretion during this work. We nevertheless note that a similar reasoning as above could be made when assuming instead that planets in the inner regions of the protoplanetary disc would grow by planetesimal accretion ( Batygin & Morbidelli, 2023 ) . In this work, we aim to test whether we can create a primordial radius valley by simulating core formation by pebble accretion, including the accretion of gas after the cores reach pebble isolation mass. We then allow the planets that have accreted an atmosphere to contract without invoking mass loss and compare our synthesised planets to observations. In Sect. 2 we briefly describe our core formation model while in Sects. 3 and 4 we go over our gas accretion and contraction models. Finally we show our results in Sect. 5 . We discuss and present our conclusion in Sect. 6 . In Appendix A , we test the effects of using different fragmentation velocities for our pebbles. In Appendix B , we show some properties of the protoplanetary discs in our model. In appendices C and D , we investigate using lower values for the viscous \alpha -parameter as well as including the emergence of a gap in the protoplanetary disc respectively. In Appendix E , we derive the energy of the core of a planet and discuss its relevance in our model. Finally, in appendices F , H , and G , we investigate the effects of photoevaporation, steam atmospheres, as well as different opacity values respectively. 2 Core formation In order to grow the planet cores, we use the pebble accretion model described in Nielsen et al. (2023) . For details, we refer the readers there and only briefly go over the main points here. We calculate the growth of pebbles following Drążkowska et al. (2021) by assuming that the dust is initially micrometer-sized and grows by collisions. We limit the pebble sizes by taking into account radial drift, turbulence-driven fragmentation, and fragmentation from differential drift. Typical fragmentation velocities are usually set to between 1 m/s and 10 m/s ( Gundlach & Blum, 2015 ; Musiolik & Wurm, 2019 , see e.g.) . We nevertheless set the fragmentation velocity of pebbles to 2 m/s in order to reach Stokes numbers of approximately \sim 0.01 in the outer regions of the discs 1 1 1 See figure 4 in Nielsen et al. (2023) for the resulting Stokes numbers and pebble flux as a function of time at different locations in the protoplanetary disc. . In Appendix A , we show the core mass distribution for our nominal model as well as when varying the fragmentation velocity for different pebble compositions. We find that for cores with masses \lesssim 6 M_{\oplus} , the core mass distribution between the two models are similar, which means that our choice of fragmentation velocity will not have a major effect on the final result as we will mainly focus on planets that are less massive than this limit. We also take into account the sublimation of pebbles as they migrate across sublimation fronts (ice lines). Further, as we track the compositions of the cores as they grow by accreting pebbles, we are able to model their densities and therefore the sizes of the cores. Planets migrate through type-I migration, which we implement following the migration rate of Kanagawa et al. (2018) . Once a planet has the pebble isolation mass M_{\rm iso} , core accretion stops and gas accretion begins. The pebble isolation mass is given by Bitsch et al. (2018) as \begin{split}&M_{\rm iso}=25\,M_{\oplus}\left(\frac{H/a}{0.05}\right)^{3}\left[0.34\left(\frac{\log(\alpha_{3})}{\log(\alpha_{\rm t})}\right)^{4}+0.66\right]\times\\ &\left(1+\frac{\chi-2.5}{6}\right)\left(\frac{M_{*}}{M_{\odot}}\right),\end{split} (1) where \alpha_{3}=10^{-3} is a constant, H is the disc scale height, \alpha_{\rm t} is a parameter setting the strength of the turbulence, a is the distance to the star, and \chi is the negative of the logarithmic pressure gradient. It can be defined from the temperature and surface density gradients and is set to \chi\approx 2.786 . The the disc scale height is given by H=c_{\rm s}/\Omega , where c_{\rm s} is the sound speed and \Omega is the Keplerian frequency. We show both the aspect ratio, H/a , and pebble isolation mass as function of the distance to the host star for different times throughout the disc lifetime in Appendix B . The sound speed is calculated from the ideal gas law c_{\rm s}=\sqrt{\mathcal{R}T}, (2) where T is the temperature of the protoplanetary disc and \mathcal{R}=k_{\rm b}/(m_{\rm H}\mu) is the specific gas constant, k_{\rm b} is Boltzmann’s constant, m_{\rm H} is the hydrogen mass, and \mu is the mean molecular weight of the gas, which we set to 2.35 for a mixture of H 2 and He. We calculate the temperature from a simple irradiated disc model from Ida et al. (2016) T_{\rm irr}=150\left(\frac{L}{L_{\odot}}\right)^{2/7}\left(\frac{M_{*}}{M_{\odot}}\right)^{-1/7}\left(\frac{a}{\rm AU}\right)^{-3/7}. (3) We assume that the accretion speed of the gas onto the star is set by the turbulent viscosity \nu=\alpha c_{\rm s}H , where \alpha is the viscous \alpha -parameter. This results in a gas speed of u_{r}=(3/2)\alpha c_{\rm s}(H/r) . We distinguish the viscous \alpha from \alpha_{\rm t} , setting \alpha=10^{-2} and \alpha_{\rm t}=10^{-4} . We specifically separate the parameter setting the strength of angular momentum transport, \alpha , and the parameter setting the strength of the turbulence and therefore the maximum pebble size in the fragmentation limit, \alpha_{\rm t} , since a single \alpha -parameter is not enough to model the possibility of laminar or weak-turbulence angular momentum transport of protoplanetary discs ( Lesur et al., 2023 ) . We choose to adopt a value of \alpha=0.01 , which have been needed in order to match the evolution of observed disc sizes ( Najita & Bergin, 2018 ) as well as the decrease of stellar accretion rate with time ( Hartmann et al., 1998 ) . We note however, that other observations have implied that \alpha should be in the range of \sim 10 -4 -10 -3 ( Trapman et al., 2020 ; Rosotti, 2023 ) . For a full discussion on our choice of \alpha , we refer to Sect. 7.1 in Nielsen et al. (2023) . In Appendix C , we show our final planet population, similar to the top row in Fig. 7 , but for \alpha=10^{-3} . We model the temporal decay of gas flux onto the star following Hartmann et al. (1998) , keeping track of the amount of gas lost from the disc by accretion onto the star as well as from XUV photoevaporation using the mass-loss relation from Owen et al. (2012) . We model the XUV flux from the star as a function of stellar mass using the relation from Bae et al. (2013) . The inclusion of photoevaporation could cause an opening of a gap in the gas disc, which can influence the growth of planets. However, such an opening usually happens very late during the disc lifetime and therefore is expected to have a minimal effect on the planet population. We show this in Appendix D . Similarly to Nielsen et al. (2023) , we set the initial gas flux onto the star to be \sim 10^{-7} M_{\odot}/{\rm yr} , typical for solar mass stars. The lifetime of the disc is then equal to the time when all gas is lost. For a solar mass star, this becomes \sim 2 Myr in our model. We set the initial gas mass of the disc to be M_{\rm gas}=0.1\,M_{\odot} . We also vary the luminosity of the star during the lifetime of the disc according to the evolutionary tracks from Baraffe et al. (2015) for a solar mass star. 3 Gas accretion Once the pebble isolation mass is reached and pebble accretion is halted, the planet is able to cool down and accrete gas. In this section, we will describe our method for determining the structure of the atmosphere in order to find the luminosity of the planet, which in turn reduces the internal energy of the planet, cooling it down. As shown in previous work ( Ikoma et al., 2000 ; Lee et al., 2014 ; Lee & Chiang, 2015 ) , gas accretion is driven by atmospheres undergoing Kelvin-Helmholtz contraction from cooling, which allows more gas to become bound to the planet. We work under the assumption that the atmosphere is spherically symmetric and in hydrostatic equilibrium as well as in pressure balance with the midplane of the protoplanetary disc. We also assume that once the pebble isolation mass is reached and gas accretion has been initiated, the core is fixed in mass and radius i.e. it is not accreting any pebbles or planetesimals. In Fig. 1 we show a flowchart of our procedure for calculating gas accretion when the planet is embedded as well as the contraction of the atmosphere after disc dissipation. Figure 1: Flowchart of our procedure for calculating the accreted gas when the planet is embedded in the disc (left). We also show our method for calculating the rate of contraction after disc dissipation (right). The orange boxes show the input parameters going into each calculation. The main loops are shown as solid arrows in their respective colors. The dashed arrow indicates that we check if the calculated \Delta t is within the allowed range and repeat the step with a new \Delta M_{\rm tot} if it is not. The dotted arrow shows the transition from the embedded case to the isolated case after disc dissipation. 3.1 Finding the luminosity We find the luminosity from the two-layer 2 2 2 While the model of Piso & Youdin (2014) only includes two layers, we will show later on that our opacity model allows the formation of several radiative layers. model of Piso & Youdin (2014) . The structure equations are \displaystyle\frac{{\rm d}m}{{\rm d}r}=4\pi r^{2}\rho, (4a) \displaystyle\frac{{\rm d}P}{{\rm d}r}=-\frac{Gm}{r^{2}}\rho, (4b) \displaystyle\frac{{\rm d}T}{{\rm d}r}=\nabla\frac{T}{P}\frac{{\rm d}P}{{\rm d}r}, (4c) where G is the gravitational constant, m is the enclosed mass at radius r , P is the pressure, T is the temperature, and \rho is the density. We also assume that the gas can be seen as an ideal gas with equation of state P=\rho\mathcal{R}T. (5) We assume that the atmosphere is divided in at least one inner convective and one outer radiative layer. The structure of the convective layer is independent of the luminosity L and we assume that radiative layers have constant luminosity. The temperature gradient is set by \nabla={\rm min}(\nabla_{\rm ad},\nabla_{\rm rad}) where \nabla_{\rm rad} is equal to \nabla_{\rm rad}=\frac{3\kappa P}{64\pi Gm\sigma T^{4}}L, (6) where \kappa is the opacity and \sigma is Boltzmann’s constant. Thus the boundary between the layers (the radiative-convective boundary, RCB) is set by \nabla_{\rm rad}=\nabla_{\rm ad} . We assume that \nabla_{\rm ad}=2/7 , which is true for an ideal diatomic gas with ratio of specific heats \gamma=1/(1-\nabla_{\rm ad})=1.4 . It is not possible to calculate the luminosity analytically without any further approximations. We therefore have to find it numerically. We initially guess a luminosity value and set the outer pressure and temperature boundaries to be equal to the disc conditions. The outer boundary condition for the mass is the total planet mass M_{\rm pl}=M_{\rm c}+M_{\rm atm} . We then integrate the structure equations inwards until we reach the core radius R_{\rm c} . The luminosity is then iterated over until we find the correct luminosity which results in m(R_{\rm c})=M_{\rm c} . The outer boundary R_{\rm out} is set as the minimum between the Hill radius R_{\rm H} and the Bondi radius R_{\rm B} defined as \begin{split}&R_{\rm H}=a\left(\frac{M_{\rm pl}}{3M_{*}}\right)^{1/3},\\ &R_{\rm B}=\frac{GM_{\rm pl}}{c_{\rm s}^{2}}.\end{split} (7) We assume that the opacity in the radiative layer is set by dust grains and use \kappa=\kappa_{i}\rho^{a}T^{b}, (8) as an opacity law. We take the parameters \kappa_{i} , a , and b from Bell & Lin (1994) , where we have assumed that the dominant sources of the opacity are ice grains, metal grains, and gas molecules. We show our opacity model in Fig. 2 where we also show the opacities used in Piso & Youdin (2014) , which only includes ice grains. It should be noted that in both models, T_{\rm RCB} is at most \sim 1000 K and below this, the atmosphere is fully convective and independent of the opacity. For clarity, we nevertheless show the opacities for the full temperature range of the atmosphere. Figure 2: The opacities that we use in this work, shown for different gas densities in units of g/cm 3 . We also show the opacity law used in Piso & Youdin (2014) using only ice grains as an opacity source. The main difference is caused by the evaporation of metal grains at \sim 1000 K, which lowers the opacity significantly. The opacity decrease caused by the evaporation of ice grains happens at \sim 200 K. We show the resulting luminosity for two different planet cores as a function of atmosphere mass fractions at several different distances to the host star in Fig. 3 . Clearly, increasing the core mass results in higher luminosities at all distances as a result of the increased pressures and temperatures in the atmosphere. Further, at larger distances to the host star, the luminosity increases. Figure 3: The embedded planet luminosity as a function of atmosphere mass fraction for different distances to the host star. We also show the temperature of the surrounding protoplanetary disc for all distances. The solid lines are the luminosities for a planet with a core mass of 1 M_{\oplus} while the dashed lines are the luminosities using a planet with a core mass of 2 M_{\oplus} . For both core masses, the luminosity increases by a factor of \sim 2.5 when placed at a distance of 1 AU compared to 0.1 AU. Further, when the core mass is doubled, the luminosity increases by a factor of \sim 10 for similar distances to the host star. 3.2 Calculating the accreted mass The atmospheric energy (from assuming that the planet is in hydrostatic equilibrium with the disc) is the sum of the gravitational energy and the internal energy E=E_{\rm G}+U=-\int_{M_{\rm c}}^{M}\frac{Gm}{r}dm+\int_{M_{\rm c}}^{M}udm, (9) where the specific thermal energy u can also be written as \mathcal{R}T(\nabla_{\rm ad}^{-1}-1) . This integral has no analytical solution since the mass m enclosed at radius r is dependent on the radius and has no analytical form. Therefore, the accretion rate \dot{M} cannot be expressed analytically as a function of L without neglecting the self-gravity of the atmosphere or the work done on the surface during accretion. Piso & Youdin (2014) solved this by considering the full energy equation at the RCB, L_{\rm M}=-\dot{E}+e_{\rm M}\dot{M}-P_{\rm M}\left.\frac{\partial V_{\rm M}}{\partial t}\right\rvert_{\rm M}, (10) where the index M means that the quantity is evaluated at surface R , where the enclosed mass m is equal to M . The specific energy e_{\rm M} at this boundary is simply u_{\rm M}-GM/R . Here, we have chosen to neglect any heating from the accretion of solids such as the accretion of planetesimals after the planet has reached pebble isolation mass as well as any potential heating from radioactive decay. Including radioactive heating would slow down the cooling of the entire atmosphere. However, models including heating from radioactive decay have found that this has a negligible effect on the overall luminosity of the planet as the radiogenic energy release rate is typically orders of magnitude lower than the luminosity from radiation as described in this work ( Lopez et al., 2012 ; Owen & Wu, 2016 ) . For a given atmosphere mass and a set of boundary conditions for T and P , the structure of the atmosphere, including the total atmospheric energy E , is uniquely determined by the luminosity L . From eq. ( 10 ), we can also see that the luminosity in turn sets the accretion rate \dot{M} . The elapsed time \Delta t between two different mass states i and i+1 can therefore be expressed as \Delta t=\frac{-\Delta E+\langle e\rangle\Delta M-\langle P\rangle\Delta V_{\langle M\rangle}}{\langle L\rangle}, (11) where \langle\rangle denotes the average between state i and i+1 while \Delta denotes the difference. This method makes it possible to calculate the time it takes to accrete a certain mass. At each time step, we therefore integrate the planet atmosphere with mass M_{i} , retrieving the luminosity by iteratively matching to the desired mass. We then choose a new atmosphere mass M_{i+1}=M_{i}+\Delta M_{\rm tot} and integrate the atmosphere again, using the updated atmosphere mass. We note the difference between \Delta M_{\rm tot} and \Delta M : \Delta M is the mass difference at the height R where we choose to evaluate eq. ( 11 ) while \Delta M_{\rm tot} is the total mass difference of the atmospheres. The difference in energy and mass between state i+1 and state i together with the luminosity at state i allows us to calculate the time elapsed between the two states through equation ( 11 ). As \Delta t sets the time step of the integration, it is necessary to prevent too small or too large time steps. We therefore only allow \Delta t to vary between 1 and 3000 years. Should \Delta t be outside of this range, we retry the integration with a different \Delta M_{\rm tot} . The accretion rate from contraction may become higher than the rate at which gas can be supplied to the planet from the disc. In that case, we use the gas accretion scheme of Ida et al. (2018) who found that the gas enters the Hill sphere at a rate of \begin{split}&\left.\frac{{\rm d}M}{{\rm d}t}\right\rvert_{\rm Hill}=1.5\times 10^{-3}\,M_{\oplus}\,{\rm yr^{-1}}\left(\frac{H/a}{0.05}\right)^{4}\times\\ &\left(\frac{M}{10M_{\oplus}}\right)^{4/3}\left(\frac{\alpha}{0.01}\right)^{-1}\left(\frac{\dot{M}_{\rm g}}{10^{-8}M_{\odot}{\rm yr^{-1}}}\right)\frac{1}{1+(M/M_{\rm gap})^{2}},\end{split} (12) where M_{\rm gap} is the mass required to carve a gap in the protoplanetary disc 3 3 3 This occurs at M_{\rm pl} \sim 2.3 M_{\rm iso} ( Johansen et al., 2019 ) . , and \dot{M}_{\rm g} is the gas flux in the protoplanetary disc. Should the contraction rate be faster than the rate at which gas enters the Hill sphere, the Hill accretion rate will set the gas accretion rate. Finally, both of these processes are limited by the gas flux onto the star \dot{M}_{\rm g} . We therefore set the final gas accretion rate to be \frac{{\rm d}M_{\rm atm}}{{\rm d}t}={\rm min}\left(\frac{\Delta M_{\rm tot}}{\Delta t},\left.\frac{{\rm d}M}{{\rm d}t}\right\rvert_{\rm Hill},\dot{M}_{\rm g}\right). (13) Given that the opacity decreases during sublimation of ice grains and dust (see Figure 2 ), it is possible for radiative windows to exist within the atmosphere. We therefore evaluate eq. ( 11 ) at the outermost RCB as the luminosity in the innermost RCB can underestimate the total luminosity should the radiative windows be too large ( Piso et al., 2015 ) . Figure 4 shows our gas accretion method in comparison to the method by Piso & Youdin (2014) for a 5 M_{\oplus} core at 60 AU using the same protoplanetary disc boundary conditions as in their work but with detailed opacities that allow metal grains and gas molecules to affect the opacity as well. Using the more complex opacity law results in slightly faster gas accretion due to the lower opacities and therefore higher luminosities. Figure 4: The accreted gas mass as a function of time for a 5 M_{\oplus} core orbiting at 60 AU using the same disc model as Piso & Youdin (2014) . We also show a reproduction of their model. When taking into account a more complex opacity model based on Bell & Lin (1994) , resulting in lower opacity due to ice and silicate dust sublimation, gas accretion is slightly more efficient due to the increased luminosities. We also show the case when the surface terms in eq. ( 11 ) are ignored which results in slightly slower gas accretion. 3.3 Calculating the atmosphere mass during pebble accretion Any planet embedded in a protoplanetary disc will have some gas bound to it. However, infalling pebbles will deposit energy into the atmosphere, heating it up and preventing significant contraction of the gas. This causes the accretion of gas to be slowed down significantly ( Lambrechts et al., 2014 ; Lambrechts & Lega, 2017 ) . During pebble accretion, the bound atmosphere mass of a protoplanet is uniquely determined by the disc conditions and the accretion luminosity of the planet. The accretion luminosity is given by L_{\rm acc}=\frac{GM_{\rm c}\dot{M}}{R_{\rm c}}, (14) where \dot{M} is the accretion rate of pebbles, which we calculate according to equation (2) in Nielsen et al. (2023) . We then use the analytical model of Piso & Youdin (2014) to determine atmosphere mass of the protoplanets where M_{\rm atm}=\frac{P_{\rm RCB}M_{\rm c}}{\xi P_{\rm M}}, (15) and \displaystyle\xi=\sqrt{\ln(P_{\rm RCB}/(\theta P_{\rm d}))}, (16a) \displaystyle P_{\rm M}=\frac{4T_{\rm d}^{4}\chi^{7/2}\mathcal{R}^{4}}{5\pi^{2}G^{3}M_{\rm c}^{2}\nabla_{\rm ad}^{5/2}}, (16b) where \chi and \theta are constants arising from the fact that the outermost radiative layer is not isothermal; we set these constants to 1.53 and 0.557 respectively, following Piso & Youdin (2014) . We approximate the pressure at the radiative-convective boundary (defined further down), P_{\rm RCB} , as \frac{P_{\rm RCB}}{P_{\rm d}}=\frac{\nabla_{\rm ad}/\nabla_{\rm rad}}{1-\nabla_{\rm ad}/\nabla_{\infty}}+1, (17) where \nabla_{\infty}=1/(4-\beta) and \beta is the temperature power-law index of the opacity. Given the low temperatures in the disc and upper regions of bound atmospheres, we assume that the opacity in these cases is dominated by ices and set \beta=2 . We use the pebble accretion luminosity, L_{\rm acc} , in order to calculate the radiative temperature gradient, \nabla_{\rm rad} , in equation ( 17 ). We note that this analytical model is only valid for very low atmosphere masses and is therefore only used for planets that have not yet reached pebble isolation mass. Once a planet reaches pebble isolation mass, we turn to our gas accretion model described in Sect. 3.2 . We show the atmosphere mass fraction as a function of time for four planets with different starting locations in a disc around a star with solar metallicity and solar mass in Fig. 5 . During pebble accretion, the atmosphere mass remains low as a result of contraction being slow. However, as the mass of the core grows, so does the bound atmosphere mass. Once pebble accretion is halted, the accretion of gas is initially very efficient as the luminosity of the planet is high, which results in rapid contraction. Due to this rapid accretion in the early stages after pebble isolation mass is reached, the planet population is naturally separated into planets with very low atmosphere mass fractions and planets with atmosphere mass fractions of a few percent. All planets except the one injected at 20 AU migrate to the inner edge, where gas accretion is halted. Figure 5: Atmosphere mass fraction and core mass for four planets as a function of time. The atmosphere masses remains low during pebble accretion due to the high accretion luminosity. Once pebble accretion is halted after pebble isolation mass is reached (triangles), the gas rapidly contracts due to the high initial luminosity. With the exception of the planet injected at 20 AU (dash-dotted line), all planets reach the inner edge (crosses), where gas accretion is halted, before a massive atmosphere has been accreted. 4 After disc dissipation After the dissipation of the disc, the planet surroundings are laid bare and the previously used disc boundary conditions are no longer relevant. These pressure and temperature boundary conditions are instead replaced by mass and energy conservation, which are integral quantities not easily connected to the luminosity without distinct boundary conditions. We therefore take an analytical approach in order to find the luminosity and thus the contraction rate of the planet after the dissipation of the protoplanetary disc. The main difference between this analytical model and the numerical model in Sect. 3 is that we replace the mass m(r) enclosed at radius r with the total planet mass M_{\rm pl} (including the atmosphere) in order to be able to solve the integrals over the density and temperature profiles of the atmosphere. Previous works have mostly focused on the effect of atmospheric mass-loss following the loss of pressure support from the surrounding protoplanetary disc and exposure to stellar radiation as a means of shaping the radius valley ( Owen & Wu, 2017 ; Ginzburg et al., 2018 ) . In this work, we aim to explore the formation of a primordial radius valley without including any form of mass-loss, such as spontaneous mass loss known as ”boil-off”, which occurs due to the loss of pressure support from the protoplanetary disc ( Owen & Wu, 2016 ) . We briefly discuss this omission of the boil-off effect in Sect. 6.1 . By this omission, we implicitly assume that the contraction rate of the atmosphere is faster than the expansion caused by heating from either the stellar XUV flux or thermal energy of the planet. The goal of this section is therefore to find an analytical expression for the total atmospheric energy of the planet as a function of the height of the RCB, which in turn can be used to estimate the radius of the planet. At the final time step before disc dissipation, we find the height of the RCB of the planet which we use to analytically find the luminosity and the energy at the first time step after disc dissipation. Given that the planet is no longer embedded in a disc, the surface terms in eq. ( 10 ) are equal to zero as there is no work done on the atmosphere anymore and the atmosphere does not accrete any more mass. Instead, the only change in energy comes from radiative heat loss and subsequent contraction. The energy of the planet evolves through L=-\dot{E} and thus we can infer the height of the RCB over time. This method is similar in nature to previous work by Owen & Wu (2017) ; Lee & Connors (2021) . 4.1 Finding the luminosity The density profile of the innermost convective region can be written as \rho=\rho_{\rm RCB}\left(1+\frac{R_{\rm B}^{\prime}}{r}-\frac{R_{\rm B}^{\prime}}{R_{\rm RCB}}\right)^{1/(\gamma-1)}. (18) Here we have defined 4 4 4 We define the effective Bondi radius R_{\rm B}^{\prime} based on the total planet mass M_{\rm pl} , including the total atmosphere. This results in a slight overestimation of the effects of self-gravity and thus of the luminosity and total energy of the planet. We choose to use M_{\rm pl} instead of M_{\rm c} however, in order to not fully neglect self gravity. the effective Bondi radius R_{\rm B}^{\prime} . R_{\rm B}^{\prime}=\nabla_{\rm ad}\frac{GM_{\rm pl}}{\mathcal{R}T_{\rm RCB}}. (19) We assume that the temperature at the RCB, T_{\rm RCB} , is related to the equilibrium temperature of the planet T_{\rm eq} . The latter is defined as T_{\rm eq}=\left(\frac{L_{*}}{4\pi\sigma a^{2}}\right)^{1/4}, (20) where a is the semi-major axis of the planet. We set T_{\rm RCB}=\chi T_{\rm eq} . We find the atmosphere mass by integrating the density profile from the core up until the RCB, making use of the assumption that the radiative layer holds a negligible amount of the atmosphere mass. This yields \begin{split}M_{\rm atm}=&\int_{R_{\rm c}}^{R_{\rm RCB}}4\pi r^{2}\rho dr=4\pi\rho_{\rm RCB}I_{2},\end{split} (21) where we define the integral I_{n}=\int_{R_{\rm c}}^{R_{\rm RCB}}r^{n}\left(1+\frac{R_{\rm B}^{\prime}}{r}-\frac{R_{\rm B}^{\prime}}{R_{\rm RCB}}\right)^{1/(\gamma-1)}dr. (22) The analytical solution to I_{n} only has real solutions when R_{\rm RCB} 2.4 R_{\oplus} , in agreement with observations ( Fulton et al., 2017 ) . The results when growth continues at the inner edge are similar, since the final atmosphere mass fraction distributions between these two models are similar. However, when the inner edge is allowed to vary between 0.1 AU and \sim 1 AU, planets are able to accrete more massive atmospheres, resulting in some planets not being able to contract below \sim 3-4 R_{\oplus} . We nevertheless find that the number of planets with sizes of \sim 3-4 R_{\oplus} is similar to the number of planets with sizes of \sim 2-3 R_{\oplus} , which is not seen in the observed radius distribution. This could be a result of not including any mass loss processes as these highly inflated, low-mass planets would be more susceptible to mass loss processes. The location of the radius valley for close-in planets remain the same for all three models but due to efficient contraction further away from the star, the valley is more filled in when halting migration further out. Figure 9: Histogram of the resulting planet radii for the three growth models at three different snapshots in time after disc dissipation. The filled histograms show the entire planet population while the unfilled histograms show planets with P<100 days. Clearly, the radius gap at \sim 1.6 R_{\oplus} (denoted by a dashed line) can exist without the need for mass loss. When the inner edge is at 0.1 AU, the outer peak is at \sim 2.4-2.6 R_{\oplus} , in agreement with observations. However, when the inner edge varies between 0.1 AU and \sim 1 AU, the radii of a large number of planets with atmospheres are significantly larger (3-4 R_{\oplus} ) as they are more massive and therefore contract slower. In Fig. 10 we show the radii of all planets after 3 Gyr as a function of their final semi-major axis. The region between the dashed lines is the radius for a planet at pebble isolation mass (and a density of 3.6 g/cm 3 ) throughout the disc lifetime. Some planets are larger than this radius without having accreted an atmosphere, which can be attributed to these planets either having a lower density or, as explained in Sect. 5.1 , they have migrated to their final orbit towards the end of the protoplanetary disc life-time and therefore have not been able to accrete an atmosphere. In all models it is clear that planets further away from the star manage to contract more efficiently. When growth is allowed to continue at the inner edge (middle panel), some planets are able to accrete a slightly more massive atmosphere compared to when growth is halted at the inner edge (left panel). As a result, slightly fewer planets are unable to contract to sizes below 3 R_{\oplus} . When allowing the inner edge to vary, it is clear that planets with an inner edge outside of 0.1 AU manage to accrete significantly more massive atmospheres compared planet at 0.1 AU as a result of a faster contraction. A faster contraction after the dissipation of the protoplanetary disc results in a significant amount of planets contracting to \sim 1.5-2 R_{\oplus} . Planets with atmosphere mass fractions \gtrsim a few percent resist contraction and remain large at 4-5 R_{\oplus} . Ultimately, the final radius distribution is significantly shaped by how close to the host star the planets end up orbiting. Planets orbiting further away from the star are able to accrete more gas but will inevitably contract faster as well. Further, the amount of gas that a planet can accrete is also determined by when, during the disc lifetime, it reaches the pebble isolation mass and whether contraction and subsequent gas accretion is allowed to continue at the inner edge. Figure 10: Planet radii as a function of their semi-major axis for all three models after 3 Gyr of evolution. The color of each point indicates the atmosphere mass fraction. The dashed lines show the core radius at the pebble isolation mass at the start and end of the disc lifetime for a planet with a density of 3.6 g/cm 3 , which is a typical density for our planets. In all models, planets above pebble isolation mass that orbit further away from the star are smaller as their contraction rate is faster. When varying the inner edge, planets further away from the star are able to reach radii as low as \sim 2 R_{\oplus} . However, planets that accrete a massive enough atmosphere ( \sim 10% of core mass) remain large resist contraction. 5.3 Slope of the radius valley In order to estimate the slope of the radius valley as a function of orbital period, we want to fit a line to the radius gap in the planet population. We follow the procedure laid out in Rogers et al. (2021) . The radius gap can be defined as a function of the orbital period P . \log R_{\rm gap}=m\log(P/P_{0})+\log R_{\rm gap,0}, (30) where P_{0} is a reference orbital period and R_{\rm gap,0} is the position of the gap at P_{0} . In order to find the location of the gap, we calculate the probability density function (PDF) f(R_{\rm pl},P) of the planet population in \log R_{\rm pl}-\log P space through a gaussian kernel density estimation. We then evaluate the integral \mathcal{I}=\int f(\log R_{\rm pl},\log P)d\log P (31) along the line defined in equation ( 30 ). We can then find the gap line with parameters m , and R_{\rm gap,0} , which minimises \mathcal{I} . In order to estimate an uncertainty, we bootstrap the planet data with replacement and repeat the procedure 1000 times. We use an initial guess of m=0 and \log(R_{\rm gap,0}/R_{\oplus})=0.2 with a reference orbital period of P_{0}=50 days. We allow m and \log(R_{\rm gap,0}/R_{\oplus}) to vary in the intervals [-1,1] and [0,0.5] respectively. In Fig. 11 , we show the fitted gaps for the full planet population as well as only for planets with orbital periods <100 days. The color of each point denoted the mass fraction of condensed water of each planet. Triangles are planets below pebble isolation mass while circles show planets that have reached the pebble isolation mass and accreted a significant atmosphere. For the full population, the slopes of the gaps are positive with R_{\rm gap} \propto P^{0.17} , R_{\rm gap} \propto P^{0.16} , and R_{\rm gap} \propto P^{0.11} for the three models respectively. When limiting the data to planets with orbital periods < 100 days, the direction of the slope shifts to become negative. The resulting radius gaps has negative slopes with R_{\rm gap} \propto P^{-0.03} and R_{\rm gap} \propto P^{-0.02} , and R_{\rm gap} \propto P^{-0.11} respectively. In the two models with a fixed inner edge, the gap slopes are slightly shallower than derived slopes from observations ( Van Eylen et al., 2018 ; Petigura et al., 2022 ; Ho & Van Eylen, 2023 ) . This discrepancy could be caused by e.g. observational biases, which we do not take into account here. The discrepancy could also be caused by our choice of gap fitting method, which could affect the final values of the slope ( Berger et al., 2023 ) . In contrast, when the inner edge is varied, we find good agreement with the observed slope. The slope in this model is also close to the fitted slope by Lee et al. (2022) , although their slope is fitted to orbital periods up to 500 days, which might be a cause of the discrepancy. We also note that when fitting the gap for the full population, we essentially recover the pebble isolation mass as the size of a bare planet core, with mass equal to the pebble isolation mass and a fixed density, will scale with orbital period as P^{0.19} . When limiting the data to close-in planets, the direction of the slope shifts as contraction is more efficient further away from the star, resulting in smaller planets sizes for increasing orbital periods for planets with a significant atmosphere. By limiting to only planet with orbital periods < 100 days, we remove most planets with sizes of \sim 1.5-2 R_{\oplus} in all three models. This is approximately the location of the radius valley. For an orbital period of 100 days around a solar mass star, M_{\rm iso} \approx 1-1.8 M_{\oplus} , resulting in a maximum core size of \sim 1.4-1.7 R_{\oplus} depending on the water mass fraction. This is roughly the location of the radius valley. Any planets exceeding these masses will have been able to cool down and start accreting gas, inflating their radii above the radius valley. The radius valley for close-in planets is therefore a natural consequence of the pebble isolation mass. It is however, also possible for planets to grow larger through mutual collisions after reaching the pebble isolation mass, potentially resulting in further growth as well as the loss of any accreted atmosphere, filling in the valley as well as populating the peak consisting of planets larger than the valley ( Lambrechts et al., 2019b ; Izidoro et al., 2022 ; Pan et al., 2024 ) . Figure 11: Planet radius as a function of orbital period for the three different models. Circles show planets above pebble isolation mass while triangles show planets below pebble isolation mass. The color of the points show the mass fraction of water. The solid lines show the fitted gaps in this work, both for the full population (black) and when limiting the population to only planets with orbital periods < 100 days (blue). We also show the slopes from previous work by Cloutier & Menou (2020) (CM20), Van Eylen et al. (2018) (VE18), and Ho & Van Eylen (2023) (HVE23). We also show the values for the fitted slopes. 5.4 Compositions of close-in planets In Fig. 12 , we show histograms of the mass fractions of accreted water for all planets with orbital periods < 100 days. A planet that has accreted all of its solid mass outside of the water iceline will have a water mass fraction of \sim 20% according to our chemical model used 6 6 6 See Nielsen et al. (2023) for more details. . We find, in all models, that the population of planets with masses above the pebble isolation mass consists of both rocky and water-rich planets. In contrast, planets below the pebble isolation mass are predominantly rocky, with some having accreted a small amount of icy pebbles. When varying the inner edge, the number of rocky planets with a significant atmosphere increases compared to the other two models as rocky planets injected inside of the water iceline can be trapped further out in the disc and accrete solids efficiently enough to reach the pebble isolation mass and grow beyond the radius valley. When the inner edge is set at 0.1 AU, planets injected inside of the water ice line quickly migrate to the inner edge where growth is either halted or limited, causing them to remain smaller than the radius valley. We therefore expect it to be rare to find water-rich planets that are smaller than the radius valley. Figure 12: Mass fraction of accreted water for close-in planets ( P<100 days). In magenta, we show planets with masses below the pebble isolation mass while in teal we show planets with masses above the pebble isolation mass. We find that in all models, planets with masses above the pebble isolation mass can be either rocky or water-rich while planets with masses below the pebble isolation mass are mostly water-poor. 6 Discussions and conclusions 6.1 Contraction compared to mass loss Our results indicate that under the assumptions presented in our models, mass loss is not necessary in order to create a radius valley. In fact, we find that atmosphere contraction alone can shape the radius valley on a \sim Gyr timescale, similar to the effect of core-powered mass loss. However, considering that XUV photoevaporation is expected to erode atmospheres on much shorter time scales (within a few 100 Myr), photoevaporation is expected to be more efficient at sculpting the shape of the radius valley compared to core-powered mass loss or models with no mass loss. Photoevaporation could cause compositional fractionation in the atmosphere as lighter species, such as hydrogen, would be more affected by the incoming XUV flux, enriching the upper atmosphere with heavier species. This would ultimately result in diffusion-limited photoevaporation as the upper atmosphere would need to be replenished by hydrogen through diffusion and can cause the mass loss rate to decrease significantly ( Modirrousta-Galian & Korenaga, 2024 ) . Further, core-powered mass loss is expected to dominate over XUV photoevaporation for hot, low-density planets, while XUV photoevaporation dominates for denser planets further away from the star. Indeed, as the occurrence rate of sub-Neptunes decreases when comparing planets with expected ages of \sim Gyr with younger planets, observations seem to hint either towards photoevaporation being diffusion limited or core-powered mass loss being the dominant mass loss mechanism ( Christiansen et al., 2023 ) . However, we stress that we do not claim that mass loss plays no role in shaping the radius distribution of close-in exoplanets. Indeed, some of the inflated planets with low core masses that orbit close to the star will most likely lose their primordial atmosphere as they are significantly hot and puffed up. When fitting the slope of the gap, we find best agreement using the model where we vary the inner edge. However, with this model, we find too many close-in planets with radii \sim 3 R_{\oplus} compared to observations, as can be seen in the lower right panel in Fig. 9 . This cannot be a result of detection bias as those planets would be easily detectable by the Kepler satellite. Therefore, it is expected that some mass loss processes, such as photoevaporation, also shape the radius distribution of close in planets. Should a significant fraction of the planets lose their atmosphere through some mass loss process, we expect that the population of planets smaller than the radius valley would get polluted by water-rich planets that lost their atmospheres. We also expect that the radius valley becomes shallower when mass loss processes are active given that a significant fraction of planets above pebble isolation mass have water-rich cores with sizes up to \sim 1.5-2 M_{\oplus} . To demonstrate this, we show the final radius distribution when including photoevaporation for the migration model where we vary the inner edge in Appendix F . We find that several of the inflated planets lose their atmosphere after 3 Gyr and partially fill up parts of the radius valley. However, the peak at \sim 2 R_{\oplus} persists after photoevaporation. The excess of planets at \sim 3 R_{\oplus} could also be caused by the fact that we do not explicitly model the boil-off effect ( Owen & Wu, 2016 ) . After disc dispersal, the pressure support from the surrounding disc is gone, which can cause a rapid loss of mass from the now exposed planet atmosphere. This can, under certain conditions, result in as much as 90% of the atmosphere to be lost ( Rogers et al., 2024 ) . The inclusion of the boil-off effect could therefore strip away a significant amount of gas from the planet, which would mimic the effects of photoevaporation. 6.2 Resulting semi-major axes Given that we let planets grow and evolve in isolation, we neglect the possible effects of multiple planets on the growth and migration of the planets. The formation of one planet could lock further planets in resonant chains, resulting in wider orbits ( Peale, 1976 ; Goldreich & Tremaine, 1980 ; Kajtazi et al., 2023 ) . Indeed, planets in young multi-planet systems have been observed to orbit just outside of mean-motion resonances indicating that planets can be prevented from migrate all the way in to the inner edge and instead get trapped in a resonance further away from the star ( Fabrycky et al., 2014 ; Hamer & Schlaufman, 2024 ) . These planets will be able to accrete more gas due to their higher luminosities compared to planets close to the star but will in turn contract faster after the dissipation of the protoplanetary disc. Therefore, in order to properly estimate the growth and subsequent contraction of planet atmospheres, it is clearly necessary to take into account possible effects which might prevent migration to the inner disc. Given that we evolve the planetary system over Gyr timescales, the inclusion of multiple planets could cause instabilities and, in some cases, even ejection of planets, further altering the architectures of the planetary systems ( Mustill et al., 2017 ) . The breaking of resonant chains could also result in giant impacts between planets that can strip away atmospheres and shape the radius valley further ( Izidoro et al., 2021 ; Izidoro et al., 2022 ) . Recent work has also shown that it is possible to form massive planets cores and trap planets in e.g. pressure bumps, which would be an alternative mechanism for halting inwards migration of planets ( Lau et al., 2022 ; Sándor et al., 2024 ) . Further, Gurrutxaga et al. (2024) showed that if the pebble flux decreases significantly, planets can start accreting gas without reaching pebble isolation mass as the flux is low enough for the planets to start cooling down. This would result in planets accreting gas without having to grow to pebble isolation mass and thus not migrating inwards significantly, instead ending up on orbits further away from the star. Such a decrease could happen in the outer regions of the disc where the pebble reservoir is depleted first. However, in order for pebble drift to be efficient enough to deplete the pebble reservoir requires larger pebbles (St \gtrsim 0.03) than we have in our work. 6.3 Effects of varying metallicity We have throughout this work assumed host stars with solar metallicity, which is generally true for stars in the Kepler catalogue ( Berger et al., 2020b ) . However, an increased metallicity could have significant effects on the final planet population. Most notably, the core mass distribution would shift to a more top-heavy distribution, which would affect the final radius distribution ( Lee et al., 2022 ; Nielsen et al., 2023 ) . Furthermore, a higher metallicity would increase the opacity of the atmosphere and therefore decrease the luminosities of the planets, which would result in lower atmosphere mass fractions and less contraction of the planets after the dispersal of the disc. To illustrate the effect of opacity on the atmosphere contraction, we show the resulting radius distribution for our three simulations but with opacities of 0.1\kappa_{\rm BL} and 10\kappa_{\rm BL} in Appendix G , representing a metal-poor and metal-rich atmosphere respectively. Clearly, increasing the opacity results in a reduced contraction rate with significantly inflated planets while reducing the opacity causes planets to contract significantly faster, although the effects of reducing the opacity are minimal compared to the nominal case as contraction is already efficient enough to contract the atmosphere considerably. 6.4 The effects of water vapour Recently, works by Venturini et al. (2020) and Burn et al. (2024) found that the radius valley could be reproduced by considering that sub-Neptunes accreted a significant fraction of their mass as water ice outside of the water ice line and subsequently migrated inwards. By treating the accreted water as vapour mixed with the H/He atmospheres, they were able to reproduce the general shape and location of the radius valley. Throughout this work, we have assumed that the accreted atmospheres of the planets formed are purely H/He atmospheres. Therefore, we have only considered water in the shape of condensed ice, which means that it only contributes to the size of the planet cores. However, as seen in Fig. 11 , some planets have accreted some amount of water outside of the water ice line and have migrated inside the water ice line while remaining below the pebble isolation mass. This means that it might be necessary to treat their accreted water in the form of water vapour instead, using a more complex equation of state for their atmospheres. This would result in these planets being more inflated than expected through our model, potentially filling up parts of the radius valley. In order to test this effect, we included a model taking into account water in the form of steam and in a supercritical state. The details of the model are described in H . Input parameters for this model are: planet mass, water mass fraction, and surface temperature, which we take to be the irradiated temperature of the planet. From our chemical model, the highest possible water mass fraction of any planet is \sim 20%, as seen in Fig. 12 . The resulting final radii are shown in Fig. 13 . Clearly, including steam atmospheres does not have a significant effect on the final results. This is partly caused by the fact that planets that are below the pebble isolation accreted pebbles mostly inside the water iceline and are therefore mostly water-poor (see Fig. 12 ). Further, the more complex interior model used to estimate the radii for our planets with steam atmospheres results in slightly smaller core sizes compared to our core radius calculations that were based on uncompressed densities. This has the effect of cancelling out the increase in radius due to the steam atmosphere. Figure 13: The radius distribution after 3 Gyr of evolution, using a realistic interior structure that includes the compressibility of core and mantle material as well as steam atmospheres. The distributions should be compared to the lower panels of 9 . As our more detailed interior model compresses the cores compared to our simple core model, the increase in radii from the steam atmosphere results in the final radii not changing significantly compared to our nominal model. The negligible change in radius could also be attributed to the fact that we have set the inner edge to be at 0.1 AU instead of closer to the star such as in Liu et al. (2019) , where the inner edge for a solar mass star is at 0.04 AU. At 0.1 AU, the irradiated temperature of the planet is \sim 880 K while at 0.04 AU, it is \sim 1400 K, which could result in a more inflated planet. In the top panel of Fig. 14 , we show the planet radii for several planets as a function of temperature. Clearly, only the sizes of small planets with high water mass fractions are significantly inflated due to the change in temperature. Further, in order for planets with masses of \sim 2 M_{\oplus} to occupy the radius valley or the sub-Neptune population, planets need to have a high water mass fraction. For lower water mass fractions, planet masses need to be \sim 5 M_{\oplus} or above. In the lower panel of Fig. 14 , we show the planet radius as a function of planet mass for different temperatures. We also show our nominal radii using uncompressed densities for different water mass fractions as black lines. Here, it is clear that we overestimate the radii in our nominal model as a dry Earth-mass planet is of similar size to an Earth-mass planet with a water mass fraction of 20% at 400 K. Figure 14: Top: Planet radius as a function of temperature for several planets with varying masses and water mass fractions. The effect of surface temperature is small in all cases, with the exception of the planet with a mass of 1 M_{\oplus} and a high water mass fraction (40%). Planets that occupy the radius valley or the sub-Neptune population requires either a high water mass fraction (40%) or to be sufficiently massive ( > 2 M_{\oplus} for water mass fractions of 20% or > 5 M_{\oplus} for dry planets). Bottom: Planet radius as a function of planet mass for different surface temperatures. The different line types denotes the same water mass fractions as in the top panel. The black lines show our nominal radii using uncompressed densities of the core. The solid magenta and blue lines all overlap with the red solid line since the radius is independent of surface temperature when the water mass fraction is 0. 6.5 Including more massive planet cores The most massive planet cores formed in our planet formation model have masses of \sim 7 M_{\oplus} due to our choice of pebble fragmentation velocity. However, the observed planet population include also massive planets with sizes \sim 2-2.5 R_{\oplus} and masses \sim 10 M_{\oplus} ( Zeng et al., 2019 , e.g.) . These massive planets have also been formed in previous planet formation models ( Venturini et al., 2020 , e.g.) . Further, as seen in Fig. 14 , dry planets with masses \sim 10 M_{\oplus} can be large enough to fill in the radius valley while more water-rich planets only need to grow to \sim 2-5 M_{\oplus} in order to fill in the radius valley. It is therefore of interest to investigate how the inclusion of more massive planet cores would affect this work. In Appendix A , we use fragmentation velocities of 1 m/s for dry pebbles inside the water iceline and 10 m/s outside the water iceline. As a result, the pebbles can grow larger in the outer disc, increasing the pebble flux and the accretion rate for protoplanets, which in turn results in some cores reaching 7-10 M_{\oplus} as seen in Fig. 15 . We then evolve these planets for 3 Gyr, both with and without photoevaporative mass loss as described in Appendix F . The resulting radius distribution for planets with P<100 days is shown in Fig. 16 . Further, we corrected the radii of planets below pebble isolation mass, taking into account the presence of steam atmospheres as described in Appendix H . Without mass loss but with the inclusion of more massive cores, the radius valley remains empty at the same location as in our nominal model. Instead, the number of planets with sizes \gtrsim 3 R_{\oplus} has increased as a result of the more massive planet cores. This is due to the fact that the pebble isolation mass at 100 days is \sim 2 M_{\oplus} meaning that all planets above this mass will have been able to accrete atmospheres up to a few percent of their mass, inflating them above the radius valley. When photoevaporative mass loss is included, we find that several of the planets previously larger than the radius valley lose some of or all of the atmosphere and shrink, partly filling up the radius valley as well as the peak below the radius valley. However, the location of the radius valley remains similar to our nominal model. From this, we can conclude that the radius valley is expected to consist of planets that have been partially or fully stripped of their atmospheres. 6.6 Conclusions In this work, we have simulated planet formation through pebble accretion and subsequent gas accretion after the pebble isolation mass is reached. We have then calculated the contraction of the accreted atmosphere after the disc has dissipated. From this, we conclude the following: 1. We find that using our planet formation and evolution model a primordial radius valley is a natural consequence of some planets not accreting enough solid material to reach the pebble isolation mass. Only planets that reach the pebble isolation mass are able to accrete a significant atmosphere, getting inflated to radii above the valley. Despite this, we do not claim that mass loss is not a relevant physical process. Further, we investigate the effects of varying our chosen model parameters, such as the \alpha -viscosity, the emergence of a gap in the disc, the pebble fragmentation velocity, and an improved treatment of water in the mass-radius relationship. We find that the planet population varies little with respect to our choice of parameters, demonstrating that our conclusions are relatively robust to the choice of model and parameters. 2. When including photoevaporative mass loss, the initially very empty radius valley becomes filled in by stripped cores with masses > 2 M_{\oplus} . However, we find that the radius valley still persist with its location agreeing with observations. Further, we include a more careful treatment of water in our planet, allowing it to exist in the form of a steam atmosphere as well as partitioning it into the core and mantle. We find little to no difference in the resulting radii as the water mass fractions are relatively low ( < 20 %). Additionally, our original estimate for radii of bare planet used uncompressed densities, which inflated their sizes compared to a more complex model. As a result, when including a more careful treatment of water, the increase in radii due to the steam atmosphere is cancelled out with the decrease in radii due to compression. Only when we add photoevaporation onto our complex water treatment do we find a significant difference in the resulting radius distribution with the radius valley being partially filled in. 3. Migration plays a big role in shaping the final atmosphere mass fraction. If a planet with a low core mass is allowed to migrate freely, its atmospheric accretion will be limited, since it will quickly migrate close to the star where contraction and accretion is slow. In contrast, if migration is prevented, for example by trapping of the planets in a resonant chain, planets are able to accrete significantly more gas. 4. For all planet migration models, we are able to reproduce the observed location of the radius valley for close in planets. When halting migration further out in the disc, we find that gas accretion becomes efficient enough to produce an excess of large planets with sizes of \sim 3-4 R_{\oplus} compared to observations as these atmospheres are massive enough to be resistant to significant contraction. Further, due to more efficient contraction further out in the disc of planets with low atmosphere mass fractions, the radius valley is more filled in when varying the inner edge compared to when the inner edge is fixed at 0.1 AU. 5. We find that the radius valley gets filled in when extending to planets on wider orbits. Due to their high masses (4-5 M_{\oplus} ) and water-rich composition, these planets are large enough to fill in the radius valley as they are not massive enough to reach the pebble isolation mass that far out in the disc. In contrast, planets with orbital periods < 100 days will either be small enough to populate the peak on the small side of the radius valley or reach masses exceeding the pebble isolation mass, inflating them beyond the radius valley. 6. Finally, we find that in all models, the population of close-in planets larger than the radius valley consists of both rocky and water-rich cores. In contrast, close-in planets smaller than the radius valley are mostly water poor as they accreted pebbles inside of the water iceline and migrated inwards to the inner edge were their growth were halted and they remain bare, without a significant atmosphere. When varying the inner edge, a significantly higher number of rocky planets managed to reach the pebble isolation mass and grow beyond the radius valley as their migration was halted further out in the disc, allowing for efficient growth. We believe that this work has contributed to our understanding of the properties and emergence of the radius valley. Our work importantly suggests that the radius valley is mostly present for close-in planets and that the valley is expected to be become gradually filled in when considering planets on wider orbits. We envision that future exoplanet detection missions such as PLAnetary Transits and Oscillations of stars (PLATO) ( Rauer et al., 2014 ) and the Nancy Grace Roman Telescope ( Spergel et al., 2015 ) will confirm this prediction by observing and characterising a significant number of planets with periods beyond 100 days. Acknowledgements. We thank the anonymous referee for their helpful comments, which have helped improve the quality of this work. A.J. acknowledges funding from the Danish National Research Foundation (DNRF Chair Grant DNRF159), the Carlsberg Foundation (Semper Ardens: Advance grant FIRSTATMO), the Knut and Alice Wallenberg Foundation (Wallenberg Scholar Grant 2019.0442) and the Göran Gustafsson Foundation. C.D. acknowledges support from the Swiss National Science Foundation under grant TMSGI2_211313 Appendix A Fragmentation velocity and the effect of core masses Throughout this work we adopted a fragmentation velocity of of pebbles of 2 m/s, motivated by our goal to reach St \sim 0.01 in the outer regions of the disc. Previous work have instead adopted a fragmentation velocity of 1 m/s for dry pebbles inside the water ice line and 10 m/s for icy pebbles outside of the water ice line. In Fig. 15 we show the core mass distribution between these two models. When varying the fragmentation velocity, more planets with core masses \gtrsim 5 M_{\oplus} form compared to our adopted model. The number of planets with lower core masses nevertheless remains similar between the two models. As this study mainly focus on lower mass planets such as super-Earths and sub-Neptunes, we find that our adopted fragmentation velocity does not have a significant impact on our results. To further illustrate this, we show the final radius distribution after 3 Gyr for a planet population with a varying fragmentation velocity in Fig. 16 . We also include the distribution when photoevaporative mass loss is included as described in Appendix F . Further, in figure 16 , we also take into account the presence of steam atmospheres using our more complex interior model as described in Appendix H . Compared to our nominal model, the radius valley is partially filled in as more massive cores that have been stripped of their H/He atmospheres fill it in. In order for planets to be approximately the size of the radius valley using our maximum water mass fraction of 20%, they need to have masses > 2 M_{\oplus} as we show in Fig. 14 . Given that the pebble isolation mass at an orbital period of 100 days is 1-2 M_{\oplus} , planet that occupy the radius valley must therefore have been stripped of their primordial H/He atmosphere. Figure 15: Core mass distribution for two different fragmentation velocity models. When varying the fragmentation velocity for water-rich and water-poor pebbles, more planets with core masses \gtrsim 5 M_{\oplus} are able to form compared to when using a flat fragmentation velocity of 2 m/s. The distribution of smaller cores is nevertheless relatively similar between the two models. Figure 16: Radius distribution after 3 Gyr of evolution with a varying fragmentation velocity inside and outside the water ice line. The grey histogram shows the distribution using our nominal model without any mass loss while the blue histogram shows the same distribution but with photoevaporative mass loss as described in Appendix F . We only consider our migration model where we vary the inner edge of the planets. Clearly, even when including more massive cores, we are able to reproduce the general location of the radius gap both with and without photoevaporative mass loss. Appendix B Disc properties In Fig. 17 we show the pebble isolation mass and aspect ratio of the disc at two different times during the protoplanetary disc lifetime. We also show the initial gas surface density as well as the midplane temperature of the disc as a function of distance to the star in the bottom panel. Figure 17: Top: Pebble isolation mass and H/r as a function of distance to the star at two different times. The aspect ratio H/r varies between 0.02 and 0.07, typical for an irradiated disc model. The pebble isolation mass varies from \sim 0.5 M_{\oplus} at 0.1 AU to \sim 50 M_{\oplus} at 20 AU. Bottom: Gas surface density and midplane temperature as a function of distance to the host star. Appendix C Planet population for lower \alpha As observations have shown that \alpha could be as low as 10^{-4} - 10^{-3} ( Trapman et al. 2020 ; Rosotti 2023 ) , we show the two planet populations, using \alpha=10^{-3} in Fig. 18 . We use the migration model where we vary the inner edge by assuming that the planet gets stuck in 3:2 resonances. The left panel shows the planet population using the same initial gas flux onto the star as in our nominal model, which results in a similar disc lifetime but a significantly smaller disc as the disc size is proportional to \alpha . For such a small disc, the gas surface density is significantly higher than in our nominal case, leading to an increased dust and surface pebble density and fast growth of planets. However, the dust in the disc is also lost to the star much quicker, resulting in a smaller window for planets to form. Further, as the rate of type-I migration is proportional to the surface density of the gas, migration is also more efficient, leading to the planets reaching the inner edge faster. As a result, the growth of planets is limited with most planets not being able to grow above 0.02 M_{\oplus} . The planet that manage to grow by being injected early on in the disc lifetime are quickly able to grow past the pebble isolation mass and start accreting a significant atmosphere. In the right panel, we show the planet population but with a reduced initial gas flux onto the star in order to maintain the same disc size as in our nominal case. As the gas flux is now significantly lower, the disc lifetime increases to \sim 4 Myr. As the disc size is similar to our nominal case, the result planet masses are similar to that of our nominal case. However, the longer disc lifetime results in more planets reaching high atmosphere mass fraction with the most massive planets reaching \sim 20%. Further, as migration is more efficient for a lower \alpha , we find fewer planets with masses \gtrsim 1 M_{\oplus} on wider orbits outside of \sim 1 AU as most planets quickly migrate inwards and reach the pebble isolation mass, allowing them to accrete a more massive atmosphere. Figure 18: Similar to the rightmost panel in the top row in Fig. C , but using \alpha=10^{-3} . In the left panel, we show the planet population with an initial gas flux of \sim 10^{-7} M_{\odot} /yr, which is the same as our nominal disc model. This results in a much smaller initial disc size, R_{\rm disc}\sim 5 AU, while the disc lifetime remains comparable. We also show the case where we decrease the initial gas accretion rate with a factor of 10 in order to maintain the disc size. This results in a much longer disc lifetime and results in a relatively similar planet population as our nominal case. Appendix D Gap formation in the protoplanetary disc In order to calculate the lifetimes for our protoplanetary disc, we adopted a simple photoevaporation model, which allowed us to calculate when all the mass from the disc was lost, either through accretion onto the star or through photoevaporation. However, the photoevaporation rate is not expected to happen uniformly throughout the disc, and as such, can create a gap in the protoplanetary disc. This gap could affect the growth of planet cores as dust and pebbles might fail to cross this gap. Further, migrating planets might get trapped at the gap location, preventing further migration. In our nominal model, we have implicitly assumed that the formation of a gap in the disc happens so late in the disc that it has little to no effect on the formation of the planets. As our analytical disc model is incapable of capturing the formation of a gap in the protoplanetary disc, we instead turn to a numerical method to test this assumption. We utilise the chemcomp code ( Schneider & Bitsch 2021 ) , which viscously evolves the disc by solving the viscous disc equation for a gas species Y 7 7 7 This is not the equation as presented in Schneider & Bitsch (2021) as they have included a source term \dot{\Sigma}_{\rm Y} , which takes into account the sublimation of dust of a species Y as it crosses sublimation lines. This feature was turned off for our tests and therefore set to 0. \frac{\partial\Sigma_{\rm g}}{\partial t}-\frac{3}{r}\frac{\partial}{\partial}\left[\sqrt{r}\frac{\partial}{\partial r}(\nu\sqrt{r}\Sigma_{\rm g})\right]=0. (32) We evolve the disc using as similar conditions as in our nominal model, with \alpha=10^{-2} , disc mass of 0.1 M_{\odot} , disc size of \sim 60 AU but with a lifetime of 3.1 Myr instead of 2 Myr. For our photoevaporation model of the disc, we implemented the model by Komaki et al. (2021) into chemcomp , which parameterise the change in the gas surface density as a result of X-rays, EUV, abd FUV radiation. The change is surface density can then be written as \log\left(\frac{\dot{\Sigma}_{\rm g}}{1{\rm g\,cm}^{-2}\,{\rm s}^{-1}}\right)=c_{5}x^{5}+c_{4}x^{4}+c_{3}x^{3}+c_{2}x^{2}+c_{1}x+c_{0}, (33) where c_{5,...,0} are fit parameters, x=\log(r/r_{\rm g}) , and r_{\rm g} is the gravitational radius, given as 8.87 AU for a solar mass star. The fit parameters are given in table 1 for a solar mass star. This model is only active in the range 0.1 r_{\rm g}\leq r\leq 20 r_{\rm g} . We show the resulting surface densities for a few different snpshots in time in Fig. 19 . Clearly, a gap opens up after \sim 3 Myr. Parameter Value c_{5} 0.131 c_{4} -0.465 c_{3} 0.451 c_{2} 0.0.376 c_{1} -1.67 c_{0} -12.6 Table 1: Fit parameters in the Komaki et al. (2021) model for photoevaporation of a protoplanetary disc around a solar mass star. Figure 19: The evolution of the gas surface density using the viscous evolution in chemcomp for a few different snapshots in time. The gap opens up after \sim 3 Myr, after which the disc is swiftly cleared. Given that chemcomp has a different planet growth model than our work, we tabulate the evolution of the surface density both with and without photoevaporation. We then grow 2000 protoplanets using our nominal dust- and planet growth model while reading off the surface density of the gas from the tabulated values at each time step. The resulting planet populations can be seen in Fig. 20 . Both models yield very similar planet populations as the gap opens up very late during the disc lifetime, indicating that including the formation of a gap in the protoplanetary disc has a small effect on the resulting planet population. Figure 20: The resulting planet populations using our dust- and planet growth model but using the gas surface densities from Fig. 19 . The difference in the planet masses are insignificant, because the photoevaporative gap opens up too late in the life-time of the protoplanetary disc to significantly affect the migration and growth of the planets. Appendix E Energy of the core The specific thermal energy of the core is u_{\rm c}=\frac{k_{\rm B}}{\mu_{\rm c}m_{\rm H}}\frac{1}{\gamma_{\rm c}-1}T_{\rm c}, (34) where \mu_{\rm c} and \gamma_{\rm c} are the mean molecular weight and polytropic index of the core, respectively. Given typical temperatures at the bottom of the atmosphere ( \sim 10^{4} K, see figure 1 in Piso & Youdin (2014) ) the core is supercritical, convective and assumed to be nearly incompressible and therefore nearly isothermal. By inserting T_{\rm c}=T(R_{\rm c}) from ( 25 ), we get \begin{split}&u_{\rm c}=\frac{T_{\rm RCB}k_{\rm b}}{\mu_{\rm c}m_{\rm H}(\gamma_{\rm c}-1)}\\ &+\frac{\mu}{\mu_{\rm c}}\frac{1}{\gamma}\frac{\gamma-1}{\gamma_{\rm c}-1}\frac{GM_{\rm pl}}{R_{\rm c}}-\frac{\mu}{\mu_{\rm c}}\frac{1}{\gamma}\frac{\gamma-1}{\gamma_{\rm c}-1}\frac{GM_{\rm pl}}{R_{\rm RCB}}\\ &=\frac{T_{\rm RCB}k_{\rm b}}{\mu_{\rm c}m_{\rm H}(\gamma_{\rm c}-1)}+GM_{\rm pl}\frac{\mu}{\mu_{\rm c}}\frac{1}{\gamma}\frac{\gamma-1}{\gamma_{\rm c}-1}\left(\frac{1}{R_{\rm c}}-\frac{1}{R_{\rm RCB}}\right).\end{split} (35) The total thermal energy of the core is then just u_{\rm c}M_{\rm c} . Clearly, when R_{\rm RCB}\gg R_{\rm c} , this term is constant with respect to R_{\rm RCB} and can therefore be omitted in our contraction model. Appendix F Including photoevaporation Given that some of the highly inflated planets that form in our models are expected to lose their atmospheres through e.g. photoevaporation, it is likely that the radius valley in our model will become partially filled in by more massive cores hosting light H/He atmospheres that were lost due to photoevaporation. We therefore test the effects of X-ray photoevaporation on the final radius distribution. During the protoplanetary disc lifetime, we used the simple relation from Bae et al. (2013) to calculate the photoevaporative loss of the gas disc. However, in order to fully capture the effects of photoevaporation over Gyr timescales, we instead turn to the work by Johnstone et al. (2021) , which includes tabulated values for the X-ray luminosity for different stellar masses and rotation rates. The input rotation rates given in the tables of Johnstone et al. (2021) can either be the initial rotation rate or the percentile of a distribution of rotation rates at an age of 150 Myr. For our photoevaporation model, we therefore choose the flux from a star with rotation equal to the 50th percentile, which we choose to denote ”50% rotator”. We show the temporal evolution of XUV-fluxes for different percentiles in Fig. 21 . Figure 21: XUV-fluxes for stars with rotation rates equal to different percentiles of the total distribution at 150 Myr, from Johnstone et al. (2021) . For example, the 50% rotator then has a rotation rate equal to the 50 percentile at an age of 150 Myr. We include a simple prescription of photoevaporation rates of the planet given by Owen & Wu (2017) where the mass-loss from photoevaporation can be given as \dot{M}_{\rm PE}=\eta\frac{R_{\rm pl}^{3}L_{\rm XUV}}{4a^{2}GM_{\rm pl}}, (36) where \eta is an efficiency factor that captures the efficiency of atmosphere removal. Similarly to Owen & Wu (2017) , we adopt \eta=0.1 . We show the final radius distribution after 3 Gyr using the model where we vary the inner edge of planets in Fig. 22 . We also correct the radii for planets with masses below pebble isolation mass as well as completely stripped planets, taking into account the fact that any water present would exists as a steam atmosphere. We describe this correction in Appendix H . When comparing to our nominal model without any mass loss, several of the inflated planets in our nominal model lost most of their atmospheres and shrunk, filling up parts of the radius valley. However, the radius valley persists. We note that the second peak lies at \sim 2 R_{\oplus} , which is close to the observed peak, which lies at \sim 2.1 R_{\oplus} ( Fulton & Petigura 2018 ) . We find however that there is a steep drop-off after \sim 2 R_{\oplus} compared to the observed drop-off at 2.4 R_{\oplus} . This could be caused by the fact that our model lacks planets with masses > 7 M_{\oplus} . These planets would be mostly resistant to photoevaporation and would therefore fill up the tail end of the distribution. It is also possible that including the boil-off effect could cause planets with sizes \gtrsim 3 R_{\oplus} to shrink further and shrink to \sim 2-2.5 R_{\oplus} . However, we would like to stress that we are not aiming to fit the observed radius distribution but rather try to understand whether the radius valley is primordial or a result from mass-loss processes. The inclusions of these larger planets or the boil-off effect would therefore not have a significant effect on the conclusions of this work. Figure 22: Radius distribution after 3 Gyr when taking into account photoevaporative mass loss. We only show the results for the migration model where we vary the inner edge. Further, for planets below the pebble isolation mass or planets where the atmosphere was completely stripped, we recalculate the radii by including a steam atmosphere as described in Appendix H . Several of the planets with sizes > 2 R_{\oplus} lost a significant part of their atmosphere, filling up the radius valley slightly. However, the valley persists even after photoevaporation. Appendix G The effect of atmosphere opacity on contraction rate The opacity in the atmosphere determines how fast energy can be radiated away and therefore how quickly the atmosphere contracts. In the main text, we used the opacity law from Bell & Lin (1994) . In Fig. 23 we show the resulting radius distribution using the same planet population from the three models in the main text but where we modify the atmosphere opacity during contraction by a factor of 0.1 and 10 respectively. Clearly, for a low opacity, contraction is significantly more efficient compared to when the opacity is increased. For lower opacities, the maximum size in all models is \sim 3 R_{\oplus} while in the case with increased opacities, the maximum planet size is \gtrsim 4 R_{\oplus} . Figure 23: The resulting radius distribution for all of our models for two different opacities after 3 Gyr evolution. The top row shows the resulting distribution after contraction with \kappa=0.1\kappa_{\rm BL} while the bottom row shows the resulting distribution with \kappa=10\kappa_{\rm BL} . Decreasing the opacity with a factor of 0.1 does not affect the final distribution significantly as contraction is already efficient in our nominal case. In contrast, increasing the opacity significantly slows down contraction such that a significant fraction of planets remain large at \sim 3-4 R_{\oplus} . Appendix H Steam atmosphere model As previously shown by Venturini et al. (2020) and Burn et al. (2024) , allowing water to exist in the form of vapour as a steam atmosphere can lead to larger radii of planets with small or absent H/He atmospheres. This effect could cause several of the smaller planets in this work to become inflated and fill in the radius valley. In order to test the effect of water in the planet radii, we need a model for planets below the pebble isolation mass (i.e. without a significant H/He atmosphere) but with some amount of accreted water. We employ an advanced interior model that is based on Dorn et al. (2017) with recent adaptations as in Luo et al. (2024) . For this application, we focus on interiors with Earth-like rocky interiors without H/He atmospheres and only pure steam atmospheres. Water can be present in the core, the mantle, and at the surface, depending on the specific thermal state of the planets. We consider a core made of Fe with the light alloy elements H and O. For solid Fe, we use the equations of state for hexagonal close packed (hcp) iron ( Hakim et al. 2018 ) . For liquid iron and the iron alloys, we use Luo et al. (2024) . The core thermal profile is assumed to be adiabatic throughout the core. At the core-mantle boundary (CMB), there is a temperature jump as the core can be hotter than the mantle due to the residual heat released during core formation following Stixrude (2014) . The mantle is assumed to be made up of three major constituents, i.e., MgO, SiO 2 , FeO. Here, we assume Earth-like composition. For the solid mantle, we use the thermodynamical model Perple X Connolly (2009) , to compute stable mineralogy and density for a given composition, pressure, and temperature, employing the database of Stixrude & Lithgow-Bertelloni (2022) . For pressures higher than \sim 125 GPa, we define stable minerals a priori and use their respective equation of states from various sources ( Fischer et al. 2011 ; Faik et al. 2018 ; Hemley et al. 1992 ; Musella et al. 2019 ) . For the liquid mantle, we calculate its density assuming an ideal mixture of main components (Mg 2 SiO 4 ,SiO 2 ,FeO) and add them using the additive volume law. Note that we use Mg 2 SiO 4 instead of MgO since the data for forsterite has been recently updated for the high-pressure temperature regime, which is not available for MgO to our knowledge. The mantle is assumed to be fully adiabatic. Water can be present in mantle melts, while the solid mantle is assumed to be dry. The addition of water reduces the density, for which we follow Bajgain et al. (2015) . For small water mass fractions, this reduction is nearly independent of pressure and temperature. The melting curve of mantle material is calculated for dry and pure MgSiO 3 to which the addition of water ( Katz et al. 2003 ) and iron ( Dorn et al. 2018 ) can lower the melting temperatures. Water that is added to the core, will also lower its melting temperature, for which we follow ( Luo et al. 2024 ) . Water that is present in the core, can be present in both liquid and solid phase. The partitioning between mantle melts and the water layer is determined by Henry’s law, for which we use the fitted solubility function of ( Dorn & Lichtenberg 2021 ) . For the partitioning of water between iron and silicates, we follow Luo et al. (2024) . For the equilibration pressure of water to partition between iron and silicates, we use half of the core-mantle boundary pressure. For the planets of interest, water is in steam or supercritical phase, for which we use the EoS compilation AQUA ( Haldemann et al. 2020 ) . For pressures below 0.1 bar, we assume an isothermal profile and switch to an adiabatic profile.