Giant Planet Formation and Migration

Planets form in circumstellar discs around young stars. Starting with sub-micron sized dust particles, giant planet formation is all about growing 14 orders of magnitude in size. It has become increasingly clear over the past decades that during all stages of giant planet formation, the building blocks are extremely mobile and can change their semimajor axis by substantial amounts. In this chapter, we aim to give a basic overview of the physical processes thought to govern giant planet formation and migration, and to highlight possible links to water delivery.


Introduction
For many centuries, ideas of how planets come into being were necessarily aimed at explaining the Solar system. The observation that the orbits of the planets in the Solar system lie more or less in a single plane led to the Nebular hypothesis, developed originally by Emanuel Swedenborg and Immanuel Kant and independently by Pierre-Simon Laplace in the 18th century: the planets were born in a cloud of gas around the Sun that we now identify with protoplanetary discs observed around young stars. The wealth of data available on bodies in the Solar system and their histories shaped the ideas of planet formation into very detailed scenarios and explanation as to why the architecture of our planetary system looks the way it does. One example is the separation between the inner Solar system with the terrestrial planets close to the Sun, while gas giant planets can be found further out. The classical explanation for this dichotomy has been that further out, especially beyond the water ice line at a few Astronomical Units (AU) from the Sun, much more material was available in the form of solids to rapidly build big objects.
This made the discovery of the first extrasolar planet around a Solar-type star, the hot Jupiter 51 Peg b (Mayor and Queloz 1995), all the more a surprise. Here we have a gas giant planet like Jupiter, but not in an orbit of 12 years, but 5 days. It was soon realised away that the most straightforward explanation for this class of planets was that they were formed further out in colder regions and subsequently migrated inward due to interaction with the disc (Lin et al. 1996). Since then, migration has become an essential ingredient in planet formation theory. Interestingly, the ideas that are now invoked for the migration of hot Jupiters long predate the discovery of 51 Peg b (Lin and Papaloizou 1979;Goldreich and Tremaine 1980), but they never made it into the standard picture because there was no evidence for large-scale inward migration in the Solar system.
However, while simple models of migration can explain the existence of hot Jupiters, from the population of extrasolar planets it is clear that there is a wide possible range of outcomes in terms of final orbital periods. Most giant planets do not become hot Jupiters, and in general planets are found in orbits that range from less than a day all the way up to several 100s of years. Clearly, some planets have migrated inward over vast distances, while others appear to have experienced little or no migration. Over the past decades, various models of disc migration have become more and more sophisticated in an attempt to account for this diversity (for a recent review see Baruteau et al. 2014).
It is now becoming more and more clear that growth and migration are intimately linked. This is why in this chapter, rather than treating formation and migration separately, we go through the story of planet formation roughly in chronological order, and for each stage highlight the migration processes that are important and how they may affect further growth. We will discuss the two main scenarios for giant planet formation: core accretion and disc fragmentation. At all times, we focus on the basic physical concepts only, in the hope to keep the text accessible for those not familiar with planet formation and migration.
This chapter is organised as follows: we start in Sect. 2 with an introduction to the birth environment of planets, namely protoplanetary discs. We focus only on the ingredients we need in order to discuss planet formation and migration; a more detailed introduction on the subject can be found elsewhere in this volume. We go on in Sect. 3 to describe the first steps in the two competing models of core accretion and disc fragmentation. As it turns out, the first step in disc fragmentation leaves us already with massive planets, while core accretion needs a few more steps to catch up, building large objects from initially small solid particles. These steps are discussed in Sects. 4-8, starting with a discussion on the migration of small solid bodies in Sect. 4, followed by an overview of how massive solid cores could form in Sect. 5. Section 6 considers the migration of such cores. Migration of massive planets, formed by either core accretion or disc fragmentation, is dealt with in Sect. 7. In Sect. 8 we discuss gas accretion and show maps for the formation of planets that include pebble accretion and planetary migration. We finally discuss in Sect. 9 how all these processes affect possible water delivery to terrestrial planets, before we end with concluding remarks in Sect. 10.

Protoplanetary Discs
The discs around young stars that are the birthplace of planetary systems are discussed in detail elsewhere in this volume. Here, we introduce a very simple, axisymmetric toy model of a disc that we will use to introduce giant planet formation and migration.

Global Disc Properties
First of all, consider the mid plane (z = 0) of the disc. Discs are known to survive for many dynamical time scales (one dynamical time scale is basically a local orbit), which means they must be close to equilibrium with respect to gravitational and centrifugal forces, where r is the radial distance to the central star, Ω is the angular velocity and M * is the mass of the central star. In other words, the angular velocity Ω must be close to its Keplerian value This immediately leads to the very important observation that Keplerian discs rotate differentially, and one can define a shear rate the last approximation holding for discs that are almost Keplerian. The Keplerian angular velocity, as given by (2), is an exact equilibrium solution if no other forces besides gravity act on the disc. It could represent a circular disc of noninteracting particles (any non-circular motion is excluded by the assumption of axisymmetry). Real protoplanetary discs consist of gas and dust, where both components interact with themselves and with each other, and the simple picture above has to be modified accordingly.
During most of the lifetime of the disc, the gaseous component is dynamically the most important since it contains most of the mass. The most obvious modification of the Keplerian picture concerns gas pressure since it can affect the radial force balance. For gas of density ρ and pressure p, the equilibrium angular velocity is found from Therefore, any radial pressure gradient modifies the local angular velocity. For a gaseous disc to be in equilibrium in the vertical direction, the vertical component of the stellar gravity has to be balanced by a pressure gradient, where Φ indicates the gravitational potential. If we take the disc to be vertically isothermal, which is usually a good approximation in the bulk of the disc where most of the mass resides the last approximation being valid in the limit z r. Therefore, the vertical profile of the disc is roughly a Gaussian, and one can define a disc thickness H , and an aspect ratio h = H/r. The disc thickness is determined by the local temperature through c s , and for protoplanetary discs we usually expect h ∼ 0.03-0.1, depending on the radial location and the evolutionary stage of the disc. In all cases, the disc can be assumed to be thin, i.e. h 1, which means that the angular velocity is close to Keplerian, see (4). Protoplanetary discs are also observed to accrete, or, more accurately, a signature of ongoing accretion is regularly observed on the central star (Ménard and Bertout 1999). If disc material is to flow onto the central star, it has to somehow lose its angular momentum. The exact mechanisms of angular momentum transport in protoplanetary discs are subject of very active research, but here we restrict ourselves to the standard α-prescription: we assume that angular momentum transport can be modelled as a viscous process, with a kinematic viscosity that is set by a parameter α, where α is usually taken to be 0.001-0.01 to explain observed accretion rates.

Local Disc Model
It is often useful to consider a local model of a protoplanetary disc, often called the shearing sheet or the shearing box, see Fig. 1. Consider a small patch of the disc, rotating at r = r 0 at the local angular velocity Ω 0 . Now define a local Cartesian coordinate system The effective potential, with contributions from gravity due to the central star and a centrifugal potential from orbital motion, acting on the patch is where the approximation is obtained by expanding the effective potential up to second order in x and z. Particle motion in the rotating patch under the influence of this effective potential plus the contribution from a massive perturber takes the form of Hill's lunar problem, where Φ p is the gravitational potential due to a planet. Unperturbed motion in the patch, corresponding to Keplerian rotation in the full disc, is given byẋ =ż = 0 andẏ = −S 0 x (setting Φ p = 0). Therefore, the Keplerian shear of the full disc is replaced by a linear shear in the local patch. One can either take the sheet to be unbounded in the horizontal directions or apply modified periodic boundary conditions. 1 While the shearing sheet or box makes the analysis of several problems much easier, the simplicity comes at a price: for example, it is impossible to determine the direction to the central star (it is located on the x-axis, but both directions are equivalent). Therefore, there can be no accretion flow through the patch. Despite such limitations, the shearing sheet/box is a very powerful tool to analyse and simulate the dynamics of protoplanetary discs.

The First Steps of Growing Giant Planets
There are two competing scenarios of how giant planets form. The standard model, referred to as the core accretion model, builds giant planets from the bottom up: first, a core of typically a few Earth masses is built out of the solids present in the disc, in a similar way as terrestrial planets are formed, after which large amounts of gas are accreted on top of this core. In an alternative model, referred to as the disc instability model, giant planets collapse directly from the disc through a gravitational instability.

Gravitational Instabilities
The two competing scenarios of how giant planets are formed therefore diverge from the very start. In the disc instability model, we start from a massive protoplanetary disc, relatively early in the lifetime of the disc. The simplest possible setup in which to study gravitational instabilities is the periodic shearing sheet, where we neglect any variation in y, so that the governing equations become where the velocity v = (u, v) T and the gravitational potential of the disc Φ d is calculated from Poisson's equation, assuming all mass is concentrated in the plane z = 0, For simplicity, we take the equation of state to be barotropic, i.e. p = p(Σ). As the basic state, take a constant surface density, u = 0 and v = −Sx, the latter representing Keplerian shear. Assume small perturbations Σ , u and v , all ∝ exp(i(kx − ωt)). The gravitational potential perturbation can be found from using a Gaussian surface of vanishing height, Using the above expression, evaluated at z = 0, together with only linear terms in Σ , u and v , and p = c 2 s Σ , we find the following relations for the amplitudes, from which we can deduce the dispersion relation for density waves, where κ = 2Ω(2Ω − S) is the epicyclic frequency. In the dispersion relation, we see the stabilising effects of rotation (κ 2 ) and pressure (c 2 s ) and the destabilising effect of self-gravity. The most unstable wavelength is given by for which where is the Toomre Q parameter (Safronov 1960;Toomre 1964). The disc is unstable to axisymmetric (i.e., no y dependence) perturbations for Q < 1. Therefore, in order for density perturbations to grow large, we need a disc that is massive (large Σ ) and cold (low c s ). Note that this Q-criterion only applies to axisymmetric, razor-thin discs. Discs of finite thickness tend to be more stable for a given Σ and c s (Mamatsashvili and Rice 2010). Non-axisymmetric razor-thin discs show instability at larger values of Q. This can be understood qualitatively from the fact that an axisymmetric setup necessarily involves conservation of angular momentum, which substantially limits the ability of material to move radially. This may seem good news if we want to build giant planets, in the sense that it is easier to get large density perturbations, but at the same time non-axisymmetry unlocks a defence mechanism of the disc against collapse: spiral density waves. These waves dissipate energy, increasing the temperature and hence Q.
It is therefore not straightforward to make a disc unstable. If we for example extract energy from the sheet at a specified rate where U is the internal energy of the gas and β is a constant, and thereby lowering Q, taking the disc towards instability, this cooling can in principle be balanced by heating through wave dissipation, leading to a quasi-steady state often referred to as gravito-turbulence. In order to beat the disc's defences so that it fragments into bound objects, cooling needs to be rapid enough so that the heating can not keep up (Gammie 2001). The exact limit is difficult to establish because the problem is fraught with numerical difficulties (Meru and Bate 2011;Paardekooper et al. 2011b), and, at least for razor-thin discs, there is a stochastic element to disc fragmentation (Paardekooper 2012). However, since realistic calculations make the cooling time fall off very rapidly with distance to the central star, it is clear that disc fragmentation will only occur in the outer parts of protoplanetary discs, typically beyond 50 AU (Rafikov 2005). Examples of local simulations of gravitationally unstable discs are shown in Fig. 2, for two values of the dimensionless cooling rate β. The left panel (β = 10) shows steady gravito-turbulence, while the right panel (β = 3) shows a fragmented disc. From (26), we can deduce that for Q ∼ 1, the most unstable wavelength is H . Therefore, fragment masses will be For Q ∼ 1, and approximating κ ≈ Ω, we get In the outer regions of protoplanetary discs, h is probably at least 0.1, so that fragments will initially have at least the mass of Jupiter. A more realistic calculation by Rafikov (2005) results in fragment masses of at least 5 times the mass of Jupiter. And this is only the initial mass of the fragment: it is embedded in a massive disc (by construction), which may still be experiencing infall from the surrounding molecular cloud. It is very difficult to stop any of this material from accreting onto the fragment, and for example Kratter et al. (2010) conclude that if discs fragment, they are more likely to produce brown dwarfs rather than Left panel: β = 10 leads to quasi-steady gravito-turbulence. Right panel: at β = 3, the disc fragments into bound objects giant planets. A possible solution is to move these planets inward so that they overflow their Roche lobe and lose mass (Boley et al. 2010;Nayakshin 2010). Despite these problems, and in addition the many uncertainties that haunt the thermal evolution of fragments (for a recent review see Kratter and Lodato 2016), disc fragmentation is still on the table as a possible way to form giant planets; its appeal coming mainly from the short time scale on which it can generate planets: since it is a dynamical instability, planets form roughly on a dynamical time scale. This is of particular interest for giant planets observed at very large distances from their central star (Marois et al. 2008), where dynamical time scales are long and core accretion would take much longer than the disc life time. This rapid formation mechanism is also appealing because it appears to be able to jump over many difficult problems that the core accretion model has (see however Sect. 7.4).

Dust Coagulation
The core accretion model starts with the smallest solid building blocks that are present in the disc, namely sub-micron dust particles that are present in the interstellar medium as well. In this scenario, the first step is to grow these particles by sticking them together whenever they meet. Modelling this growth process is complicated by the fact that a particle of given size can collide with another particle of any size: in other words, the process in non-local in size space. Some insight can be gained though by considering monodisperse growth: at all times, all particles are assumed to have the same size.
If the particles of size a have number density n and geometrical cross-section σ , then the average time between collisions is given by where v is the relative velocity between particles. This relative velocity can for example come from Brownian motion where m is the mass of a single particle. Other sources of relative velocities include turbulence and dust drift (see below).
Assuming perfect sticking, every collision leads to a doubling in the mass, so where ρ d = mn is the (constant) mass density of dust particles. Focusing on Brownian motion only, which is typically the dominant contribution to relative velocities up to particle sizes of ∼ 1 µm (Dullemond and Dominik 2005), we find that for some constant K, which can be integrated to where m 0 is the mass of the particles at t = 0. Similar calculations can be done for other sources of relative velocities, and they tend to reproduce the early phases of full numerical simulations quite well (e.g. Ormel et al. 2009;Birnstiel et al. 2010). While perfect sticking is quite a good approximation early on, when particles grow and relative velocities increase at some point collisions start to have a different outcome, from bouncing (Zsom et al. 2010), where particles just bounce off each other without any mass transfer, or even fragmentation, where a collision results in particles that are all smaller in size than the original particles. For silicate grains, the "bouncing barrier" occurs at sizes of roughly one millimetre. However, at this stage the composition of the particles matters a lot; for example, for particles made of water ice the velocity at which they fragment is an order of magnitude larger than for silicate grains (Gundlach and Blum 2015). It therefore helps to have water ice around to grow beyond one millimetre, as anyone who has seen golf-ball-sized hail stones can appreciate.
There is much more to say about these early stages of planet formation, see for example the recent reviews , Birnstiel et al. (2016). Growing to larger sizes brings new problems as well, which we discuss next.

Dust and Pebble Migration (Type 0)
Even the smallest dust particle interacts with the surrounding gas through frictional forces. The nature of the interaction depends on the size of the particle with respect to the mean free path of the gas molecules. Small particles (smaller than 1 cm in typical protoplanetary discs) feel free-streaming gas molecules and find themselves in the Epstein regime, where the drag force is given by (assuming subsonic relative velocities between gas and dust), where σ is the collisional cross-section of the dust particle and v is the relative velocity between gas and dust (Dullemond and Dominik 2004). One can define a friction time where m is the mass of the dust particle. This friction time is basically the time it takes for the dust particle to adjust to the motion of the gas. Since it is proportional to m/σ , which for spherical particles is proportional to the size of the particle, 2 the smallest particles are tightly coupled to the gas, while larger boulders can move relatively independently of the gas. Differently shaped particles will have different values of m/σ and will therefore the magnitude of the drag force will be different for a given size. For example, for fractal aggregates of fractal dimension 2, m/σ approaches a constant, and therefore the friction time becomes independent of size, which can have profound implications for coagulation (e.g. Okuzumi et al. 2012). By writing the equations in terms of t fric they become valid for any particle shape (Testi et al. 2014).
For dust particles that are large compared to the mean free path of the gas, drag occurs via gas molecular viscosity as a boundary layer forms around the particle and experimental results are available (e.g. Lain et al. 1999). The exact form of the drag force depends on whether the flow around the dust particle is laminar (Stokes friction) or turbulent (Newtonian friction). We refer the reader to the paper by Whipple (1972) for a discussion of these friction regimes.
The equations of motion of a dust particle with radial velocity v d and angular velocity Ω d , including friction, are where we have defined a Stokes number St = Ω K t fric and ignored any radial velocity of the gas. Two interesting limits are St 1 (tightly coupled particles) and St 1 (loosely coupled particles). Consider first the case St 1. From (40) we see that Ω d ≈ Ω. Inserting this in (39) and solving for the terminal radial velocity (i.e. dv d /dt = 0), we get, where in the last step we have used (4). Note that dust particles always move towards regions of highest gas pressure, and that for moderate gradients in pressure (|d log In the opposite limit of St 1, we have that dust particles stay close to their equilibrium orbit Ω d ≈ Ω K , but with a torque applied as given by (40). Assuming the orbit stays circular, this torque translates into a radial velocity where the last approximation is valid in the limit h 1. Again, dust particles drift towards regions of high pressure, but now v d ∼ h 2 rΩ K /St.
By ignoring dv d /dt and writing Ω d = Ω K + δΩ with δΩ Ω K one can solve for the radial drift speed for arbitrary values of St (Weidenschilling 1977), Therefore, we expect inward drift of dust, since in protoplanetary discs the pressures is generally higher in the inner regions, on time scales that can be as short as a few 100 dynamical time scales for particles that have St ∼ 1. This is an enormous challenge for planet formation theory, since as soon as particles grow to St ∼ 1 (1 cm-1 m in typical protoplanetary discs), you lose them through very efficient drift (Weidenschilling 1977). Dust drift occurs in the vertical direction as well, in which case it is usually called settling. Since the gas is completely pressure supported in the vertical direction, settling speeds can be quite fast (typically, the settling time scale is 1/St times the dynamical time scale for small particles). This allows for particles to grow by sweeping up smaller particles on their way to the mid plane of the disc, similar to what happens on Earth when raindrops form in clouds (Dullemond and Dominik 2005). If the gas disc is turbulent, dust settling will be reduced (e.g. Johansen and Klahr 2005;Fromang and Papaloizou 2006).

Forming Giant Cores
In this section we review the physics of forming the cores of giant planets by planetesimal accretion and pebble accretion. We also discuss the formation of planetesimals, as this stage has important implications for the growth rates of protoplanets.

Planetesimal Formation
Radial drift limits the particle sizes that can be obtained by dust coagulation. Very fluffy ice particles can in principle break through the drift barrier (Okuzumi et al. 2012), due to their low internal density of down to 10 −5 times the material density. The material density actually does not play a role in the growth time-scale in the Epstein drag force regime (see discussion in ), but fluffy grains enter the Stokes regime and increase their friction time, and hence the drift time-scale if the particle is already large, proportional to the squared size. However, this fluffy growth requires very small ice monomers, of 0.1 µm in size, in order to avoid compactification and allow sticking beyond 10 m/s. Another threat to fluffy ice growth is the erosion of the aggregates by small dust grains. Krijt et al. (2015) demonstrated that the fluffy ice particles do not grow beyond a Stokes number of unity, unless erosion by small dust grains is ineffective.
The streaming instability provides another avenue for making planetesimals (Youdin and Goodman 2005;. This instability feeds of the relative velocity between particles (moving sub-Keplerian in the orbit and radially inwards) and gas (moving strongly sub-Keplerian in the orbit and radially outwards). 3 Above a threshold metallicity the particles in the mid-plane layer form dense nearly axisymmetric filaments due to particle pile-ups (Johansen et al. 2009b;Bai and Stone 2010). The threshold metallicity is around 1.5% at a Stokes number of St ∼ 0.1, but increases towards both smaller and larger particles (Carrera et al. 2015). The case of marginally coupled particles (St ∼ 0.3) has been studied most extensively. These particles reach densities up to 10,000 times the local gas density in the absence of self-gravity . Including self-gravity leads to the formation of planetesimals of a wide range of sizes, following the approximate differential mass distribution dN/dM ∝ M −1.6 Simon et al. 2016). This distribution function is dominated in number by the smallest planetesimals and in mass by the largest. The characteristic sizes of the planetesimals that form following gravitational collapse are around 100 km. This planetesimal birth size is in good qualitative agreement with the observed steepening of the size distribution above 100 km sizes of both asteroids and Kuiper belt objects (Bottke et al. 2005;Morbidelli et al. 2009;Sheppard and Trujillo 2010).
The streaming instability scenario has mainly been tested under the assumption that there are no other sources of turbulence in the disc region under consideration. The streaming instability can actually interact constructively with turbulence driven by the magnetorotational instability. Some of the energy in the turbulence cascades to large scales where it organises into long-lived zonal flows, alternating axisymmetric regions of faster and slower orbital speed (Johansen et al. 2009a;Simon et al. 2012). The zonal flow forms a geostrophic structure in force balance with the pressure gradient from a pressure bump that peaks between the points of fastest and slowest orbital speed. These pressure bumps in turn can collect very large pebbles (boulders) of meter sizes (Johansen et al. 2006;Dittrich et al. 2013). The concentrations of boulders can in turn trigger the streaming instability by accelerating the gas towards the Keplerian speed inside of the pressure bump, leading to the formation of planetesimals ).
The dead zone extending out to several 10 AU has too high ohmic resistivity for the magnetorotational instability to grow. Exterior of this dead zone the development of the magnetorotational instability will be influenced by ambipolar diffusion. Bai and Stone (2014) demonstrated that turbulence can develop very strong pressure bumps and zonal flows in these regions. In the dead zone itself several hydrodynamical instabilities are currently under investigation to drive turbulence. The vertical shear instability arises as a consequence of radial temperature gradients, which induce vertical shear, but the instability furthermore requires a very low cooling time to suppress buoyancy oscillations (Nelson et al. 2013;Lin and Youdin 2015). In order to obtain the most realistic cooling times, Stoll and Kley (2014) performed radiative transfer simulations of turbulence driven by the vertical shear instability and found turbulent stresses on the order of 10 −4 in the mid-plane of the disc. This low level of turbulence is promising for a constructive interaction with the streaming instability, but simulations of the vertical shear instability including particle drag on the gas have not been reported in the literature yet. Richard et al. (2016) showed in simulations of relatively thick protoplanetary discs that the vertical shear instability can lead to the formation of longlived vortices, likely stabilised against destruction by the sub-critical baroclinic instability (Klahr and Bodenheimer 2003;Lesur and Papaloizou 2010;Raettig et al. 2013). Raettig et al. (2015) included the back-reaction of the pebbles in simulations of the baroclinic instability and found that the vortices are actually destroyed by the back-reaction, a result that is also known for single vortices that are set as an initial condition (Johansen et al. 2004;Crnkovic-Rubsamen et al. 2015). The relative roles of the streaming instability and the vertical shear and baroclinic instabilities in concentrating pebbles is still poorly understood and should be an important priority for future research.

Planetesimal and Pebble Accretion
The largest planetesimals that form at the planetesimal formation stage will continue to grow towards planetary masses by accreting other planetesimals and the remaining pebbles. The accretion rate of a protoplanet is given by (Safronov 1969) Here M and R are the mass and the radius of the planetesimals, ρ pla is the spatial density of planetesimals, v pla is the approach speed of the planetesimals and v e is the escape speed from the surface of the core. The gravitational focusing term in the hard brackets can boost planetesimal accretion rates significantly if the random planetesimal speed is slower than the escape speed of the protoplanet. In the limit of strong gravitational focusing, we get the expression Here the parameter ζ ≡ v r /v H defines the random planetesimal speed relative to the Hill speed v H = ΩR H and p ≡ R/R H is the size of the protoplanet relative to its Hill radius. The expression is only valid when ζ > 1. The parameter p can be written as This allow us to write the growth rate as We have here scaled the planetesimal column density according to Σ pla = 10 g cm −2 f pla (r/AU) −1 . The value of ζ makes it tricky to evaluate the actual growth rate of planetesimal accretion. In principle, ζ can be less than unity if gas drag or mutual collisions damp the scale-height of the planetesimals (Rafikov 2004). However, planetesimals must be small (< 1 km) for this process to be efficient. Greenzweig and Lissauer (1990) found that a single scattering of a planetesimal increases its random motion to a few times the Hill speed. Realistic values of the planetesimal accretion rates can be obtained from simulations of a large number of protoplanets growing simultaneously. Levison et al. (2010) showed that the protoplanets excite the planetesimal orbits to very high random speeds and that planetesimals are transported rapidly away from the formation region of the giant planets. The pebbles left over from the planetesimal formation stage provide another source of planetary growth. Pebbles can be accreted very efficiently due to the friction with the gas. While most planetesimals are scattered by a growing protoplanet, pebbles of optimal sizes are accreted from the entire Hill radius (Johansen and Lacerda 2010;Ormel and Klahr 2010;Lambrechts and Johansen 2012). The optimally-accreted pebbles have a Stokes number of approximately ∼ 0.1, in good agreement with the results of coagulation models (Brauer et al. 2007;Birnstiel et al. 2012;.
The growth rate by pebble accretion in the Hill accretion regime can be written aṡ where Σ p is the pebble column density. This expression is valid above the transition mass from Bondi accretion to Hill accretion, which happens at around 10 −3 M E in the inner regions of the protoplanetary disc. We furthermore assumed that the accretion is in the 2-D regime, i.e. that the Hill radius is larger than the scale-height of the particle mid-plane layer. These two requirements are typically fulfilled at the same time . Scaling the pebble accretion rate with typical quantities giveṡ Here we incorporated the Stokes number dependence in the expression  and introduced a parameter f p that gives the pebble column density relative to a nominal value of Σ p = 10 g cm −2 f p (r/AU) −1 . The growth rates by pebble accretion is approximately two orders of magnitude higher than the planetesimal accretion rate (which is in itself in upper limit, given the uncertain value of ζ ). An advantage of the very high accretion rates obtainable with pebble accretion is that planets can outgrow Type I migration. We discuss this in Sect. 8. But first we will review the migration of planets.

Low Mass Planet Migration (Type I)
In this section we consider the migration of low-mass planets. We will give a precise definition of what constitutes a low-mass planet later on, but as a rough guide consider planets less massive than Neptune. While planets have a surface and are therefore subject to aerodynamic drag, when planets reach a mass of roughly 1% of that of the Earth, gravitational interactions will start to dominate. The resulting migration is usually referred to as Type I migration (Ward 1997). Below, we will introduce a simple toy model that highlights the physics of these gravitational interactions. For readers who want more details, Baruteau et al. (2014) provide a recent more in-depth review.
Consider the local, two dimensional shearing sheet introduced in Sect. 2.2, and put a planet of mass M p at the origin of the local coordinate system by adding a gravitational potential to the equations, where is a smoothing length which is at the moment added to keep all gravitational forces finite everywhere, but for which we will give a physical interpretation later on.

Scattering Torque
Particles streaming past the planet, on initially unperturbed orbits, feel the gravitational force from the planet and therefore change their trajectory. A simple model capturing this is the so-called impulse approximation (Lin and Papaloizou 1979), where it is assumed that the particle motion remains unperturbed until it reaches the planet, at which point it is scattered, see the left panel of Fig. 3. Throughout we assume that the interaction of the particle with the planet is weak. The total change in the x-component of the velocity is given by Fig. 3 Left: gravitational scattering of a particle by a planet in the local patch. The particle comes from the top, and its unperturbed Keplerian motion takes it past the planet, where it is scattered and put on a different trajectory. Right: horseshoe trajectories near the planet Taking y(t) = −S p x 0 t , where a subscript p means evaluation at the location of the planet, the integral evaluates in a straightforward way to, From Eqs. (13) and (14) we find that the total energy of the particle is conserved. Neglecting any changes in x coordinate, and evaluating E far away from the planet so that the contribution of Φ p can be neglected, energy conservation dictates that v 2 x + v 2 y = 0. Assuming the change in v y to be small compared to the unperturbed orbital motion, As a consequence of Newton's third law, the planet feels a force when it scatters a particle. The encounter rate of particles with impact parameter x is |S p x|, and if the disc has surface density Σ(x), the force per unit radius in the y-direction is and the total force on the planet can be found by integrating over x. Note that for constant Σ , f y is an odd function of x and therefore the total force evaluates to zero. This is a consequence of the simplification that is the shearing sheet compared to the full disc. We can restore some of the properties of the full disc by letting S be a function of x, 4 and approximate which is consistent with (3). Then, for constant surface density the total force is The torque due to such scattering events on the planet is given by Γ = r p F y , which then takes the form where γ s is a constant of order unity, and q is the planet-to-star mass ratio. It should be noted that although for simplicity we have focused on a simple shearing sheet disc model, the same functional form of the scattering torque is found in global cylindrical geometry, in which γ s depends on the radial gradients of the gas density and temperature (e.g. Tanaka et al. 2002).

Horseshoe Drag
The scattering analysis presented above is only valid for impact parameters that are large enough. Closer to the planet, the change in v y is large enough to change the sign of v y , and the result is material executing horseshoe orbits. The right panel of Fig. 3 shows particle trajectories close to the planet. These horseshoe turns are responsible for a different kind of torque: the horseshoe drag (Ward 1991). We can play the same game as in the previous section, by considering a particle with impact parameter x 0 (see the right panel of Fig. 3). Assuming the particle makes a symmetric turn, the change in y-velocity is and therefore the total force can be found from where w is the maximum impact parameter for which a horseshoe turn occurs, or, in other words, the half-width of the horseshoe region. As in the scattering calculation, the shearing sheet is too symmetric to yield a torque: we either have to allow S 2 to vary with x, or Σ . Expanding any of these quantities to first order in x, we get where f h is a constant of order unity and depends on the gradients in S and Σ . Interestingly, it is relatively straightforward to calculate w Paardekooper and Papaloizou 2009b). Equations (13) and (14) admit a Jacobi integral, Consider the particle orbit that gets closest to the planet. Clearly, the impact parameter of this orbit is the maximum impact parameter for which a horseshoe turn will occur. At x = y = 0, there is an X-point in the particle stream lines, and therefore all velocities must vanish. Therefore, the outermost horseshoe orbit has J = −Φ p (x = 0, y = 0). Far away from the planet, motion is purely Keplerian again, withẋ = Φ p = 0 andẏ = −S p x. Equating J for both locations gives Solving for x gives the half-width of the horseshoe region w, The final form of the horseshoe drag is then where γ h is a constant of order unity. Remarkably, the two types of torque (59) and (66) have exactly the same form and only differ by a numerical prefactor of order unity. As in the case of the scattering torque, it should be noted that although for simplicity we have focused on a simple shearing sheet disc model, the same functional form of horseshoe drag is found in global cylindrical geometry, in which γ h depends on the radial gradients of the gas density and temperature (e.g. Ward 1991;Paardekooper and Papaloizou 2008).
It should be noted that in a full disc, the horseshoe region is a closed system. Particles leaving the domain after a horseshoe turn at the bottom of the right panel of Fig. 3 come back at the top and make another horseshoe turn. Unless the particle loses its identity before returning, the total torque averaged over many encounters will be zero. This is a process that is called saturation. Another way of thinking about this is that the total angular momentum content of the closed system that is the horseshoe region is finite, and it therefore only has a finite amount of angular momentum to give to the planet. Unless 'fresh' angular momentum can be supplied to the horseshoe region, perhaps through viscous diffusion (e.g. Masset 2001), the horseshoe drag will only be a transient phenomenon. Fortunately, the conditions in typical protoplanetary discs allow for unsaturated horseshoe drag in large regions (Paardekooper et al. 2011a;Bitsch et al. 2013).

Dynamic Torques (Type III Migration)
From the discussion above, it is clear that for the horseshoe drag to keep going, some form of asymmetry between the two horseshoe legs is needed. In the local model, a radial surface density gradient will do the trick; in a global isothermal gaseous disc, a gradient in specific vorticity ∇ × v/Σ is needed (Ward 1991;Paardekooper and Papaloizou 2009a;), while in a global adiabatic disc a gradient in entropy is important (Baruteau and Masset 2008;Paardekooper and Papaloizou 2008;). These results were all obtained by taking the orbit of the planet as fixed, and measuring or calculating the torque on the planet.
Interestingly, a migrating planet naturally introduces asymmetry between the two horseshoe legs. This is illustrated schematically in Fig. 4.The left panel shows the horseshoe (or corotation) region around a non-migrating planet in red. Note that the planet is shifted to the top (and bottom because the domain is periodic in ϕ) to show the full extent of the horseshoe Fig. 4 Schematic stream lines for a non-migrating (left panel) and a migrating (right panel) planet. The vertical coordinate is ϕ, for which the full 2π is shown, and the horizontal coordinate is r. The planet is denoted by the black circles, the blue arrows indicate the disc rotation in the frame of the planet, and the black arrows indicate the velocity of material in the corotation region, which is marked red. In the right panel, the planet is migrating to the left, which means that in the rest frame of the planet, unperturbed disc material moves outward. Material in the green region gets transported from one side of the planet to the other in a single horseshoe turn region. In the rest frame of the planet, material in the red region executes horseshoe turns all the time, while material outside the red region is on circular orbits (note that we neglect any effect of the scattering torque here), in the direction of the blue arrows.
The right panel of Fig. 4 shows the case of a migrating planet, with the planet moving towards the left. For the sake of definiteness, let us assume the planet is migrating inwards, so that the star is located far away to the left. In the rest frame of the planet, gas on circular orbits now moves to the right, again in the direction of the blue arrows. Note that the red corotation region gets deformed, one side getting thinner. This region in fact migrates inward together with the planet. On the thin side of the corotation region, material in the green region executes a single horseshoe turn. This material was on circular orbits before in the inner disc (left of the planet, outside the corotation region), and gets transferred to the outer disc (right of the planet, again outside the corotation region).
In this single horseshoe turn, the material exerts a torque on the planet as usual. However, note that there is no corresponding turn at the bottom of the figure, where only red material executes horseshoe turns. Therefore, all we need for the horseshoe legs to be asymmetric is a difference between the red and the green material. Such a torque can be called dynamic because it requires the planet to move through the disc. Suppose for example that the red region is underdense compared to the rest of the disc, perhaps through partial gap opening (see Sect. 7.1). Then the torque on the planet is negative, because of the green material getting pushed outward. Moreover, this torque is proportional to the migration rate: the faster the migration, the more green material, the stronger the torque. Hence there exists a positive feedback loop (e.g. Masset 2008) with the possibility of an instability, termed runaway migration by Masset and Papaloizou (2003). Since there exist steady forms of very fast migration, Artymowicz (2004) introduced the term Type III migration, since Type II migration is reserved for massive, gap-opening planets (see Sect. 7).
Originally, Type III migration was studied for intermediate-mass planets (roughly Saturn's mass) with a slight density depression in their corotation region (Masset and Papaloizou 2003), which naturally leads to an asymmetry between the red and green region in the right panel of Fig. 4. Such an asymmetry can also be imposed by placing the planet on a sharp density gradient initially, in which case even massive planets like Jupiter undergo Type III migration (Pepliński et al. 2008). Yet another way to introduce an asymmetry is through migration itself: since the planet takes with it the red region, if the planet migrates into a disc region with a different density this will again lead to a difference between the red and the green material and to a dynamic corotation torque (Paardekooper 2014). This has been studied both isothermal (Paardekooper 2014) and non-isothermal (Pierens 2015) discs.

Three Dimensions
So far, we have discussed only test particles in the two-dimensional shearing sheet. Real discs are of course three-dimensional and made of gas, but fortunately we can incorporate three-dimensional effects in an approximate way while at the same time fixing the free parameter , thereby killing two birds with one stone.
The idea is to view the two-dimensional governing equations as vertically integrated versions of their three-dimensional counterparts. For example, the continuity (or mass conservation) equation reads Integrating this equation from z = −∞ to z = ∞, assuming ρv z vanishes for large values of |z|, we get Defining a vertically averaged velocitȳ we get which is just the two-dimensional continuity equation. Things do not work out as nicely for the momentum equations, for example the x-component but following this idea of vertical integration suggests that in two dimensions, we should replace the last term on the right-hand side with (for a more detailed discussion see Müller et al. 2012), Recall from (6) that the vertical density profile is essentially a Gaussian of width H . This means that integrating vertically is the same as applying Gaussian smoothing with smoothing length H . Therefore, for consistency we must choose ∼ H , and our final expression for the total torque, adding the scattering torque and the horseshoe drag, becomes where γ is a constant of order unity, which, in the case of global cylindrical geometry, depends on local gradients in density and temperature.

Gas Pressure
While a full analysis including effects of gas pressure on the dynamics is much more complicated than our simple test particle approach, the resulting form of the torque is exactly that of (73). Most of the work goes into getting the numerical constant γ correct, but three important other effects of gas pressure must be mentioned first. First of all, in the scattering calculation, it may seem that the sign of the torque can be altered by choosing an appropriate surface density profile. In practice, this is not the case, since changing the density usually leads to a change in pressure, which in turn affects the rotation profile through (4). It turns out that any attempt to change the torque this way is doomed to fail, since changing the density in one side of the disc to affect the torque leads to a change in rotation profile that almost completely cancels any effect on the torque. This is called the pressure buffer effect (Ward 1986), and makes the scattering torque rather independent of local density gradients in the disc. Second, in the analysis of the horseshoe drag, we have taken the streamline pattern as given. Readers familiar with the restricted three-body problem will have noticed the absence of a Roche lobe and several Lagrange points. It can be shown that the configuration in the right panel of Fig. 3 is to be expected when all velocities are very subsonic (Paardekooper and Papaloizou 2009b), which essentially means that gas pressure dominates over gravity. This assumption breaks down for massive planets.
Finally, it can be shown that the scattering encounter with the planet leaves the test particles on eccentric orbits. The response of a gaseous disc is different: instead of eccentric particles we get coherent density wave emission (Ogilvie and Lubow 2002). We can therefore call the scattering torque the wave torque in gaseous discs. The left panel of Fig. 5 shows the surface density after 20 orbits of a planet with q = 10 −5 in a disc with constant h = 0.05. The disc response is dominated by an inner and an outer spiral density wave. Since the planet is moving in the positive ϕ-direction, it is clear from the picture that the gravitational field of the outer wave is trying to slow down the planet, while the inner wave is trying to speed it up. Therefore, the outer wave promotes inward migration, and the inner wave outward migration.
When doing the full calculation for isothermal discs, one usually finds negative torques and therefore inward migration (Tanaka et al. 2002), unless the surface density increases outward (Paardekooper and Papaloizou 2009a). When temperature fluctuations are allowed for, a much richer variety of migration behaviour can be seen, with possible outward migration Paardekooper et al. 2010). This rich behaviour is almost completely due to the action of the horseshoe drag: while the wave torque is usually negative, promoting inward migration, the horseshoe drag can be of either sign and often dominate over the wave torque, depending on local disc parameters, leading to complex migration maps for low-mass planets (e.g. Bitsch et al. 2013).

Migration Time Scale
The torque given by (73) enters the angular momentum equation of the planet, Assuming the planet stays on a circular orbit with Ω p = Ω K (r p ), we find that the radial migration speed of the planet is given by Ignoring factors of order unity, this leads to a migration time scale For a typical protoplanetary disc this suggests migration time scales at 1 AU of ∼ 10 6 years for Earth and ∼ 10 5 years for Neptune. Since these time scales are shorter than the life times of protoplanetary discs, this means that Type I migration should be an important ingredient in any planet formation theory. It is clearly not easy to prevent planets from migrating very close to the central star, unless planetary growth rates are as high as in the pebble accretion scenario (see Sect. 5) so that they grow out of the Type I migration regime before migrating all the way in. This only applies to planets that end up as gas giants: the population of Super-Earths and mini-Neptunes are usually thought to be subject to Type I migration.

Recent Results
Early models of Type I migration were constructed for isothermal discs, notably the semianalytical work of Tanaka et al. (2002). It was realised quickly that the resulting inward migration time scales as quoted above were too short to be compatible with planets ending up at several astronomical units from their star, which led to investigations of more complex discs in search of stopping and slowing down mechanisms. The discovery of rapid planet formation by pebble accretion has alleviated some of the concerns about rapid migration (Sect. 5) for gas giant planets, but the problem of Type I migration persists for Neptunes and Super-Earths. Here we briefly mention some of the progress that has been made, as well as some recent results.
One of the first extensions of the isothermal model was the inclusion of magnetic fields. This leads to additional torques on the planet (Terquem 2003; Guilet et al. 2013), but also allows the disc to be naturally turbulent because of the magnetorotational instability (MRI Balbus and Hawley 1991). Type I migration in such a turbulent disc has a stochastic character, but in the end drives planets inward on too short time scales still (Nelson and Papaloizou 2004).
Most recent progress has come from releasing the isothermal assumption, and take care of the energy budget in a more realistic way. Paardekooper and Mellema (2006) found outward migration in three-dimensional, radiation-hydrodynamical simulations; an effect that was later found to be due to a radial entropy gradient in the disc (Baruteau and Masset 2008;Paardekooper and Papaloizou 2008).
Recently, several groups have reported interesting effects on Type I migration originating very close to the planet itself. Fung et al. (2015) found that in three-dimensional, isothermal simulations, for low values of the viscosity there exists what they call a transient horseshoe flow, much like the green region in the right panel of Fig. 4, but three-dimensional in nature and for a static (i.e. non-migrating) planet. Material on these orbits goes very close to the planet (well within its Bondi sphere) and appears to slow down migration by a factor of 3. For three-dimensional non-isothermal simulations,  found that very close to the planet, again well within the Bondi sphere, an asymmetry in cooling leads to an additional torque. Finally, Benítez-Llambay et al. (2015) reported that heating due to planetesimal accretion can change the sign of the torque on rapidly accreting low-mass planets.
These recent results indicate that the region very close to the planet and what happens there thermally is extremely important. Future numerical models can hopefully zoom in on the planet sufficiently with all necessary physics included (radiative cooling, self-gravity, magnetic fields) so that an ever more realistic picture of Type I migration can emerge.

Gap Formation
As mentioned in Sect. 6.5, gas pressure does not fundamentally alter the physics of Type I migration, and therefore we could get reasonable estimates of the migration rates through a ballistic approach. Moreover, there is the assumption that the interaction with the planet does not significantly change the properties of the disc. This works well if velocity perturbations are small compared to the sound speed. Otherwise, we expect shock waves that will make order unity changes to the region around the planet.
Setting v x < c s in (52), together with = H as argued in Sect. 6.4, in order for Type I migration to be valid leads to a condition on the mass sometimes called the thermal criterion for gap-opening (e.g. Bryden et al. 1999). For the canonical value of h = 0.05 the boundary lies at 60 Earth masses. This means that roughly any planet up to the mass of Neptune is safely in the Type I regime. Note that the thermal criterion is roughly equivalent to demanding that the Hill radius of the planet is smaller than the scale height of the disc. In the shearing sheet, the quantity playing the role of angular momentum is Note that in the unperturbed disc, this quantity changes sign at x = 0. Since v y changes sign as well (see (55)), this means that particles with initially p y > 0 will experience an increase in p y , while particles with initially p y < 0 will experience a decrease in p y . If these particles, by some damping process, return to equilibrium orbits with their new p y , we have that particles with initial x > 0 will move to larger values of x, while particles with initial x < 0 will move to a position with x even more negative. In other words, the gravitational pull of the planet is repulsive: it is pushing material away from its orbit.
In the linear regime, where the waves seen in the left panel of Fig. 5 are of small amplitude, the flux of angular momentum is constant, and therefore no surface density evolution is expected unless the waves shock far away from the planet (Goodman and Rafikov 2001). If the waves start out as shock waves, as is the case for q > h 3 , angular momentum is deposited locally leading to dramatic evolution of the surface density. Since the planet is pushing material away from its orbit, the result is an annular gap, as can be seen in the right panel of Fig. 5, which shows a Jupiter mass planet embedded in a disc with h = 0.05 after 100 orbits.
An estimate for the gap formation time scale can be obtained by integrating |f y | from (56) times r p to get the total absolute torque exerted on the disc, where we have substituted = H as before. Taking the half-width of the gap to be w, the total angular momentum of the gap region is initially The time scale for removing this amount of angular momentum through the torque |Γ tot | is which, for a gap width of 2H , gives a gap opening time scale of ∼ 100 orbits for Jupiter in a disc with H/r = 0.05, consistent with numerical simulations. While q > h 3 is a necessary condition for local non-linear waves and therefore gap formation, if the disc is viscous it is also necessary to make sure viscosity is not able to close the gap. Suppose we impose a gap of width 2H in the disc. The total gravitational torque on one side of the disc is given by Demanding this to be larger in magnitude than the viscous torque (e.g Lin and Papaloizou 1993) leads to the following condition on the viscosity in order for the planet to open a gap, where C = 0.0034. For a Jupiter mass planet in a disc with h = 0.05, we must have ν < 2.7× 10 −5 . Therefore, for canonical disc parameters h = 0.05 and ν = 10 −5 , both the thermal and viscous criteria yield similar minimum planetary masses for gap opening. Combining both requirements, Crida et al. (2006) found a general criterion where r Hill = r p (q/3) 1/3 is the radius of the Hill sphere, and R = r 2 p Ω p /ν denotes the Reynolds number.

Migration Inside Gaps
When a planet is able to open up a gap, its interaction with the disc changes fundamentally. Consider the very much idealised case of a planet orbiting in a completely empty gap, and that the gap is wide enough so that the planet does not interact with the disc when it is in the centre of the gap (note that the planet does need to be able to interact with the gap region itself, otherwise there would be no gap in the first place). Now displace the planet inward by a small amount dr. It can now interact with an annulus of disc material just inside the inner edge of the gap. This interaction, through the wave (or scattering) torque, will push the planet outward, back to the centre of the gap. The opposite situation arises if we displace the planet outward. In other words, the edges of the gap repel the planet.
This means that the planet is locked inside the gap: it can not move with respect to the gap. If we now bring in global disc evolution, where the disc as a whole is slowly draining onto the central star, this means that the gap will try to accrete with the rest of the disc, taking the planet with it. In effect, the planet acts as a normal disc particle, accreting onto the central star. This is called Type II migration (Lin and Papaloizou 1986;Ward 1997), and it necessarily occurs on the viscous time scale.
Several modifications have to be made to this simple picture. First of all, consider again a planet in a gap but displaced inward by a small amount dr. The annulus it interacts with at radial location r in has total angular momentum To take the planet back to the centre of the gap requires a change in angular momentum of the planet of Therefore, the annulus only has enough angular momentum to push the planet back if In other words, only if the local disc mass is larger than the planet mass does the planet behave like a disc particle, otherwise it can move with respect to the gap. This is why very massive planets migrate on time scales larger than the viscous time scale (Syer and Clarke 1995;Ivanov et al. 1999). A second important modification concerns the implicit assumption in the simple picture of Type II migration that no material can cross the gap. Suppose for example that the annulus interacting with the inward-displaced planet as described above is not 'scattered' away by the planet, but instead is transferred outward in a single horseshoe turn, much like in the case of dynamic corotation torques. The back reaction on the planet now takes it even further inward towards the inner edge of the gap. In this case, therefore, the gap edges attract the planet rather than repel it. In reality, a combination of these two extremes probably occurs, which means that gap-opening planets do in general not migrate on the viscous time scale (Edgar 2007;Duffell et al. 2014;Dürmann and Kley 2015).

Accretion Inside Gaps
Since mass flows continuously through the gaps opened by massive planets, gap formation does not spell the end of gas accretion onto the planet. In fact, the mass flow to the planet is hardly diminished by the presence of a gap (Bryden et al. 1999;Kley 1999;Lubow et al. 1999;Lubow and D'Angelo 2006). This raises the question of what determines the final mass of a giant planet. In fact, even if a gap really meant a stop to accretion, the existence of Saturn-mass planets would still be a problem. Clearly, if the planet would be able to accept a large amount of the mass available through the flow across the gap, it would always end up far more massive than Jupiter, unless the disc disappears at exactly the right time. This seems inconsistent with the mass distribution of exoplanets, with ubiquitous Jupiter-and Saturn-mass planets.
Therefore, a mechanism is needed to limit the accretion onto a gap-opening planet. It may be that zooming in onto the planet (e.g. D' Angelo et al. 2003) with all the necessary physics included (radiation, self-gravity, realistic equation of state, magnetic fields) will reveal plausible mechanisms for stopping accretion at various points in the life of the planet. Another possibility is that accretion is regulated by the circumplanetary disc that forms around high-mass planets (Ayliffe and Bate 2009a,b;Ward and Canup 2010). These subdiscs are discussed in detail elsewhere in this volume; here we just mention that recent simulations show that the circumplanetary disc may indeed be a bottleneck (Rivier et al. 2012;Szulágyi et al. 2014).

Migration of Planets Formed by Disc Instability
Now we finally return to the disc instability scenario outlined in Sect. 3.1, where giant planets were formed directly from a gravitationally unstable disc. Since these planets have gap-opening masses, one might expect that the appropriate migration mechanism is Type II. However, an implicit assumption in the derivation of Type II migration is that the gap formation time scale is smaller than other important time scales such as the migration time scale and gas accretion time scale. With the gap formation time scale ∼ 100 orbits, this is always the case in the core accretion scenario, and as a result a growing planet always has the gap consistent with its current mass and migrates at a rate that does not depend on its history (an exception is Type III migration).
In the disc instability model, planets form on a dynamical time scale. Therefore, the formation time scale is much shorter than the gap opening time scale and we have a situation of a giant planet fully embedded in a massive disc. Next, we have to compare the migration time scale across the with of the gap τ m,w to the gap formation time scale τ gap . If τ gap < τ m,w , a gap will form and the planet will enter the Type II migration regime. For this to be the case we need Rearranging we get a condition on q, Therefore, we need the mass of the fragment to be at least 18/h times bigger than expected from (30). Therefore, rather surprisingly, planets formed by disc instability migrate in the fast Type I regime (Baruteau et al. 2011). Migration time scales can indeed be very short.
Using the Q parameter instead of the surface density, we get that Substituting q = h 3 from (31) and h = 0.1 as the aspect ratio in the outer parts of the disc, we expect migration time scales to be in the tens of orbits. Such fast migration is indeed observed in simulations in the context of accretion outburst Basu 2006, 2010b;Machida et al. 2011) and giant planet formation (Vorobyov and Basu 2010a; Baruteau et al. 2011). This means that the disc instability model suffers from similar migration perils as the core accretion model; in particular, it is difficult to see how to keep fragments at large radii where planets are observed (Marois et al. 2008).

Gas Accretion and Growth Maps
Growing protoplanets acquire gaseous envelopes that are in both hydrostastic and thermal balance. At the early growth stages of the core the gaseous envelope grows together with the core, but does not experience independent accretion. Mizuno (1980) showed that the thermal equilibrium breaks down approximately when the envelope grows more massive than the core, which occurs for nominal conditions in the protoplanetary disc at around 10 Earth masses. This breakdown is followed by a run-away contraction of the gaseous envelope as the energy released by accretion can not replace the energy lost by cooling to the surroundings. Mizuno (1980) considered core growth rates relevant for planetesimal accretion. However, for pebble accretion the core can grow several orders of magnitude faster. This implies that the critical core mass of run-away contraction is several hundred Earth masses ). However,  also demonstrated that the flow of pebbles on to the core is stopped at a mass of around 10 Earth masses, as such a massive protoplanet carves a partial gap in the protoplanetary disc and pebbles are trapped at the outer edge of the gas where the gas orbits at the Keplerian speed. The termination of heating by the infalling pebbles allows the envelope to contract. Initially, the contraction is slow as the gravity is dominated by the mass of the solids core. Piso and Youdin (2014) considered the contraction of an envelope that is only supported by the heat of the adiabatic contraction. This yields an envelope growth rate of Here κ is the opacity of the envelope material. Contraction continues until the envelope mass M e is equal to the core mass M c . After that the self-gravity of the envelope leads to accretion of gas from the disc. Machida et al. (2010) calculated the accretion rate of planets using hydrodynamical simulations with nested grids. They find that the accretion rate follows the minimum of the two functions Gas accretion is an area of active research. Recent findings indicate that low-mass planets do not possess bound envelopes at all, but rather experience a recycling of gas through the envelope that is more rapid than the contraction . This may help explain how some super-Earths do not undergo rapid run-away accretion of gas. Nevertheless, the existing prescriptions for pebble accretion, gas accretion and planetary migration allow us to construct growth maps of planetary populations. Two examples of such maps are shown in Fig. 6, a plot taken from Bitsch and Johansen (2016). The maps show the final planetary mass and semi-major axis as a function of the starting location and starting time of the protoplanet. Figure 6 demonstrates that all the major classes of planets can form by a combination of pebble accretion and planetary migration, including hot, warm and cold gas giants (red and yellow contours), super-Earths and ice giants (green contours) and low-mass ice planets (blue contours). Migration of planets is not a nuisance in this picture, but rather a necessary (and elegant) ingredient in defining the final orbits of the planets. The price for the high migration rates is nevertheless that planets must form much further out than their final position.

Interaction with Water
There are several interesting links between the story of giant planet formation and migration as told above and the delivery of water to planets. First of all for the giant planets themselves: in the simplest picture, their water content is the sum of the water content of their building blocks. Therefore, we need to know at what stage in their evolution the planet gets most of its mass (and in what form, solid or gaseous), and exactly where it is in the disc at the time.
Measuring carbon-to-oxygen and carbon-to-hydrogen ratios may provide important insights into the formation history of a planet (Öberg et al. 2011). One simple example could be trying to constrain planet migration by looking at its water content. When confronted by a planet rich in water, but located too close to the central star for water to have accreted locally, it seems likely that inward migration has taken place. In principle, all migration could have Fig. 6 Growth maps of planets that form by pebble accretion and undergo Type I and Type II, from Bitsch and Johansen (2016). The plot shows the planetary mass (coloured contours) and final semi-major axis (black contour lines) as a function of the starting position r 0 and the starting time t 0 . The top plot has only gas giants inside of 0.5 AU-this is due to the outwards migration zone that prevents low mass cores from migrating interior of the ice line. The bottom plot shows the result of lowering the water contents of the disc (w:s denotes the water-to-silicates ratio). The lowered water abundance leads to a less pronounced outwards migration zone and hence transport of icy super-Earths to warm and hot orbits close to the star happened while the building blocks were still small: inward drift of dust particles may lead to enough transport of solids to build the planet locally. However, it is unlikely that these small particles can keep their water for long enough in a water-hostile region in order to build a water-rich planet. It seems more likely that migration has taken place while the object was already of planetary-size.
However, it must be noted that this reverse engineering of the process of planet formation can be hopelessly degenerate. Madhusudhan et al. (2014) suggests a possible way to distinguish planet migration through the protoplanetary disc from migration processes after the disc has gone (e.g. Rasio and Ford 1996) might be to look at the metallicity of the atmospheres of extrasolar giant planets, since migration through the disc would lead to accretion of more solids. However, it is easy to come up with a scenario where disc migration would lead to no accretion of solids at all: since solids react strongly to any pressure gradient (see Sect. 4), when a planet starts to open up a gap, it very effectively pushes solids away from its orbit, much more efficiently than the gas (e.g. Paardekooper and Mellema 2004). Nevertheless, it can be hoped that these kind of observations can at least point towards more likely scenarios so that the story of giant planet formation can be updated and refined.
There is also a strong connection that works the other way: local abundance of water can have strong effects on the migration processes, in particular Type I migration. Because of its effect on the local temperature gradient, the water ice line is usually a region of outward Type I migration (Kretke and Lin 2007;. Moreover, the overall water abundance in the disc influences the regions of outward Type I migration and therefore the final orbital distance of for example super Earths (Bitsch and Johansen 2016), as discussed in the previous section.
Finally, it is important to realise that since giant planets make up most of the mass and usually angular momentum in planetary systems, they can profoundly influence the evolution of and water delivery to other planets in the system. Any formation scenario of terrestrial or Super-Earth planets including their water content needs to include the position of any giants in the system, and therefore the migration history of these giant planets (e.g. Walsh et al. 2011;O'Brien et al. 2014).

Concluding Remarks
The aim of this review was to give an overview of the basic formation and migration mechanisms for giant planets. During all stages of giant planet formation, some form of migration seems to be inevitable: small solid particles undergo radial drift, low-mass planets and cores of giant planets undergo Type I migration, and giant planets undergo Type II migration. These migration types affect all stages of planet formation. Hence an increased understanding of migration will be crucial for gaining insight into the formation of the planets in the Solar System and in the multitudes of observed exoplanetary systems.