{'fraction_non_alphanumeric': 0.028869304000176704, 'fraction_numerical': 0.014511960771320654, 'mean_word_length': 4.676278836509528, 'pattern_counts': {'":': 0, '<': 0, '<?xml version=': 0, '>': 1, 'https://': 0, 'lorem ipsum': 0, 'www.': 1, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
Atmospheric Erosion by Giant Impacts onto Terrestrial Planets

We examine the mechanisms by which atmosphere can be eroded by giant impacts onto Earth-like planets with thin atmospheres, using 3D smoothed particle hydrodynamics simulations with sufficient resolution to directly model the fate of low-mass atmospheres for the first time. We present a simple scaling law to estimate the fraction lost for any impact angle and speed in this regime. In the canonical Moon-forming impact, only around 10% of the atmosphere would have been lost from the immediate effects of the collision. There is a gradual transition from removing almost none to almost all of the atmosphere for a grazing impact as it becomes more head-on or increases in speed, including complex, non-monotonic behaviour at low impact angles. In contrast, for head-on impacts, a slightly greater speed can suddenly remove much more atmosphere. Our results broadly agree with the application of 1D models of local atmosphere loss to the ground speeds measured directly from our simulations. However, previous analytical models of shock-wave propagation from an idealised point-mass impact significantly underestimate the ground speeds and hence the total erosion. The strong dependence on impact angle and the interplay of multiple non-linear and asymmetrical loss mechanisms highlight the need for 3D simulations in order to make realistic predictions.


INTRODUCTION
Terrestrial planets form from tens of roughly Marssized embryos that crash into each other after accreting from a proto-planetary disk (Chambers 2001). At the same time, planets grow their atmospheres by accreting nebula gas from their surroundings and by outgassing volatiles from their interior (Massol et al. 2016).
For a young atmosphere to survive it must withstand radiation pressure of its host star, frequent impacts of small and medium impactors, and typically at least one late giant impact that could remove an entire atmosphere in a single blow (Schlichting & Mukhopadhyay 2018). In this paper, we focus on the direct, dynamical consequences of giant impacts onto planets like the early Earth.
Our own planet is a compelling example, since we can both observe an atmosphere that has survived to the present day and be confident that a giant impact took place late in its evolution -creating the Moon in the process. Several different Moon-formation scenarios have been proposed and revised, but no simulations have yet resolved a crust, ocean, or atmosphere for the proto-Earth (e.g. Lock et al. 2018;Ćuk & Stewart 2012).
Focusing on the atmosphere, the Earth's volatile abundances are remarkably different from those of chondrites (Halliday 2013), which act as a record of the early Solar System. Specifically, nitrogen and carbon are depleted compared with hydrogen, which could be explained by the loss of N 2 and CO 2 with an eroded atmosphere while retaining H 2 O in an ocean (Sakuraba et al. 2019). However, the isotope ratios match those of primordial chondrites. Hydrodynamic escape preferentially removes lighter isotopes, while impacts remove bulk volumes of atmosphere. This suggests that impacts (not necessarily giant ones) are the primary loss mechanism, driving fractionation by removing more atmosphere than ocean while preserving isotope ratios (Schlichting & Mukhopadhyay 2018).
Furthermore, the relative abundances of helium and neon in different-aged mantle reservoirs suggest that the Earth lost its atmosphere on at least two occasions (Tucker & Mukhopadhyay 2014). Fractionation of xenon also indicates a complicated history of atmospheric loss and the importance of ionic escape in addition to impact erosion and hydrodynamic escape (Zahnle et al. 2019).
Looking further afield, we have recently learnt not only that Earth-to Neptune-mass exoplanets are common, but that they host a remarkable diversity of atmospheric masses (Fressin et al. 2013;Petigura et al. 2013;Lopez & Fortney 2014). The stochastic nature of giant impacts makes them a strong candidate for explaining some of the differences between planets that would otherwise be expected to have evolved similarly (Liu et al. 2015;Bonomo et al. 2019). Irradiation and photoevaporation from stellar winds can significantly erode an atmosphere (Lopez et al. 2012;Zahnle & Catling 2017), but not enough to explain the diversity of planets around dim stars, where it should be much less effective.
Previous studies of giant-impact erosion have primarily used analytical approaches and 1D simulations to estimate atmospheric loss from a range of impact energies (e.g. Genda & Abe 2003;Inamdar & Schlichting 2015). The one-dimensional nature of these studies also means that little work has been done on grazing collisions, in spite of the fact that these are far more likely to occur. Some studies have investigated oblique impacts for much smaller (of order 10 km) objects (Shuvalov 2009), in which case the erosion is only ever in the local region and the planet's curvature is negligible. Their results showed a strong increase in local loss for more-oblique impacts, which is the opposite of the trend for giant impacts (Kegerreis et al. 2018). The typical approach for giant impacts is to estimate the ground velocities induced by the impact to study how much atmosphere is blown away. This misses out the complex details of a collision that can mix, deform, and remake both an atmosphere and core. Any precise study of the consequences of a giant impact therefore requires full 3D modelling of the planet and atmosphere at the same time.
Recent progress has been made in the regime of thick atmospheres by a small number of studies: two with 3D simulations of head-on collisions of large super-Earths (Liu et al. 2015;Bonomo et al. 2019), targeted at explaining a specific exoplanet system, and another with highly grazing impacts that do not interact the planets' cores (Hwang et al. 2018). This leaves serious gaps in our understanding of the formation and atmospheric evolution of planets in and outside the Solar System, both in terms of lower atmosphere masses and the effect of the impact angle.
The aim of this study is thus to begin the exploration of this almost uncharted parameter space, starting in the regime of thin atmospheres. For example: what does the impactor actually do to remove atmosphere in different scenarios? How easy it is to partially erode some atmosphere as opposed to all or none? And how do these answers change for head-on, grazing, slow, or fast impacts?
Giant impacts are most commonly studied using smoothed particle hydrodynamics (SPH) simulations, where planets are modelled with particles that evolve under gravity and material pressure. It was recently shown that at least 10 7 (equal-mass) SPH particles can be required to converge on even the large-scale results from simulations of giant impacts, and that the resolution requirements for reliable results depend strongly on the specific scenario and question (Kegerreis et al. 2019;Hosono et al. 2017).
Computational advances enable us for the first time to study the erosion of thin atmospheres with full, 3D simulations. In this paper, we present high-resolution simulations of giant impacts with a variety of impact angles and speeds onto the proto-Earth, hosting a range of low atmosphere masses. We study the detailed mechanisms of erosion, compare with previous analytical and 1D estimates, and present a simple scaling law for the fraction of lost atmosphere in this regime.

METHODS
In this section we describe the initial conditions for the model planets, the range of impact scenarios, and the previous models to which we compare our results. The SPH simulations are run using the hydrodynamics and gravity code SWIFT 1 (Kegerreis et al. 2019;Schaller et al. 2016).

Initial Conditions
As a recognisable starting point, we consider an impact similar to a canonical Moon-forming scenario, with a target proto-Earth of mass 0.887 M ⊕ and impactor of mass 0.133 M ⊕ . Both are differentiated into an iron core and rocky mantle, constituting 30% and 70% of the total mass, respectively, and have no pre-impact rotation. We use the simple Tillotson (1962) iron and granite equations of state (EoS) to model these materials (Kegerreis et al. 2019) For the atmospheres, we use Hubbard & MacFarlane (1980)'s hydrogen-helium EoS, as described in Kegerreis et al. (2018). An ideal gas would probably be sufficient for the smaller atmospheres, but larger ones stray into the more-dense regime that this EoS is designed to include.
The atmosphere is adiabatic above a 500 K surface, while the Tillotson iron and granite layers are given a simple temperature-density relation of T ∝ ρ 2 , chosen somewhat arbitrarily to produce a core temperature of ∼5000 K similar to the Earth today.
We test a range of atmosphere masses on the proto-Earth, namely 10 −1 , 10 −1.5 , 10 −2 , and 10 −2.5 M ⊕ , as the lowest mass that we might expect to resolve adequately with 10 7 equal-mass SPH particles. The Earth's atmosphere today has a mass of ∼10 −6 M ⊕ , though it may have been much thicker in the past.
To produce the radial density and temperature profiles for each atmosphere mass, the surface temperature is kept fixed at 500 K for simplicity while the surface pressure is varied until the desired atmospheric mass is obtained. In other words, the inner two layer profiles are integrated inwards from the surface (see Kegerreis et al. 2019, Appx. A), then the atmosphere layer profile is integrated outwards, until reaching a negligible minimum density of 10 kg m −3 . Separately, the total radius is also iterated to obtain the 30:70 mass ratio of iron to rock.
Particles are then placed to precisely match these profiles using the stretched equal-area (SEA) method 3 described in Kegerreis et al. (2019). This results in a relaxed arrangement of particles that have SPH densities within 1% of the desired profile values, mitigating the need for extra computation that is otherwise required to produce initial conditions that are settled and ready for a simulation.

Impact Simulations
We specify each impact scenario by the impact parameter, b = sin(β), and the speed, v c , at first contact of the impactor with the target's surface, as illustrated 2 Note that Appx. B of Kegerreis et al. (2019) has a typo in the sign of du = T dS − P dV = T dS + (P/ρ 2 ) dρ just after Eqn. B1. 3 The SEAGen code is publicly available at github.com/jkeger/seagen and the python module seagen can be installed directly with pip.  Figure 1. The initial conditions for an impact scenario, with the target (t) on the left and the impactor (i) on the right, in the target's rest frame. The angle of first contact, β, is set ignoring the atmosphere and neglecting any tidal distortion before the collision. The initial separation is set by the time to impact, as described in Appx. A.
in Fig. 1. The initial position of the impactor is set such that contact occurs 1 hour after the start of the simulation, to allow for some natural tidal distortion and to not disrupt the system by suddenly introducing the large impactor right next to the no-longer-in-equilibrium target, as described in Appx. A. Note that the speed at contact is always chosen in units of the mutual escape speed of the system, v esc , which is slightly faster for the planets with more massive atmospheres.
We run a primary suite of 74 simulations with ∼10 7 SPH particles, plus 10 of these scenarios re-simulated additionally with 10 6 , 10 6.5 , 10 7.5 , and 10 8 particles for convergence tests. To be precise, these stated particle numbers refer to the number of particles per Earth mass (the bare target plus impactor mass is 1.02 M ⊕ ). Thus, the numerical resolution stays the same for simulations with different-mass planets. For example, a '10 7 ' simulation that includes a 0.1 M ⊕ atmosphere actually contains a total of ∼1.12×10 7 particles. For most of the suite we focus on the 10 −2 M ⊕ atmosphere. Fig. 2 summarises the parameters for each simulation. Note that the v c = 0.75 v esc scenarios would require some third body to have slowed down the impactor during its approach to below the mutual escape speed. This is unlikely in the case of primary impactors falling in to the Earth in our solar system, but is a useful test for the consequences of a highly grazing impact resulting in a large bound fragment that will re-impact at a later time. It also lets us compare with other models, which predict little erosion in this regime.
At the high-speed end, given the Earth's position in the Solar System, 5 v esc is around the highest typical velocity that might be expected for an impact (Raymond et al. 2009). For context, the Earth's orbital speed around the Sun is about 3 v esc . The suite's extension to 8 v esc both allows us to test the extreme end of the parameter space and is a regime that could be more common in other planetary systems, for example with a more massive star or a target planet deeper in the star's potential well. Furthermore, in studies like that by Inamdar & Schlichting (2015) where erosion is estimated as a function of the impactor's momentum, using very high velocities will allow us to test the degeneracy between impactor mass and speed across a wide range of momenta in future suites with different impactor masses. For the relatively small impactor mass used here, even 8 v esc is not predicted by Inamdar & Schlichting (2015) to remove more than 3/4 of the atmosphere.
The simulations are run using SWIFT with a simple 'vanilla' form of SPH plus the Balsara (1995) switch for the artificial viscosity as described in Kegerreis et al. (2019) to a simulation time of 100,000 s (roughly 28 hours) in a cubic box of side 80 R ⊕ to allow the tracking of ejecta. Any particles that leave the box are removed from the simulation. Throughout the first 10 hours we record snapshots every 100 s, for high time resolution during the impact and its immediate aftermath. To reduce data storage requirements, we then output snapshots every 1000 s for the remainder.

Analytical and 1D Models
We use two previous erosion studies for comparison with our 3D simulations, both for the resulting loss of atmosphere and for the shock waves caused by the impact. Genda & Abe (2003) used 1D models to simulate the reaction of the atmosphere to a shock from vertical ground motion. Their results for the local fraction of lost atmosphere, X local , are fitted well by a simple lin-ear function of the ground speed, v gnd , in units of the escape velocity: X local = −1/3 + 4/3 (v gnd /v esc ) capped at zero and one (their Eqn. 17), which they conclude is largely insensitive to the initial conditions of the atmosphere. Inamdar & Schlichting (2015) performed similar 1D, Lagrangian, vertical-shock simulations, but extended them to include thicker atmospheres up to 10% of the solid mass of the planet. They agree with Genda & Abe (2003) for thin atmospheres. Schlichting et al. (2015) also created a model for predicting the ground speeds caused by a giant impact, by treating the collision as a point-mass explosion. They assumed momentum conservation with a uniform speed in the spherical region traversed by the shock front, which leads to the vertical ground speed as a function of distance, l, from the impact point: where v imp is the speed of the impactor and R t and M t are the radius and mass of the target planet. By combining their speed estimates with the 1D local erosion model, they presented predictions for the global atmospheric mass-loss fraction as a function of the impactor speed and velocity for different atmosphere masses (their Fig. 5).

RESULTS AND DISCUSSION
We begin investigating the simulations with an overview of the general features and consequences of these classes of impacts. Then, we focus on the isolated effects of changing the impact parameter, speed, or atmosphere mass, and examine the time at which material Figure 3. Illustrative early snapshot cross-sections from the four fiducial impact simulations -head-on and slow, grazing and slow, head-on and fast, grazing and fast -with b = 0 or 0.7, and vc = 1 or 3 (labelled throughout in units of vesc), with the 1% M⊕ atmosphere and ∼10 8 SPH particles. Grey and orange show the target's core and mantle material respectively, and brown and yellow show the same for the impactor. Blue is the target's atmosphere. The plotted luminosity varies slightly with the internal energy. Note that the snapshots are at different times for each simulation to show the evolution in each case. The impactors are travelling in the −x direction at the moment they contact the target (see Fig. 1).
is ejected. We consider the ground speeds and localised loss to compare our results with previous estimates, then collate all the simulation results to find a simple scaling law for the total atmospheric erosion from any scenario in this regime.

General Features of Impacts and Erosion
We choose four simulations to act as fiducial comparisons for the rest of the suite, demonstrating head-on and grazing, slow and fast scenarios. They stand out in Fig. 2 as the impacts for which we simulate multiple atmosphere masses and with multiple resolutions. Snapshots from these fiducial simulations are shown in Fig. 3, for a target with a 1% M ⊕ atmosphere, using ∼10 8 SPH particles.
The particles that will become unbound and escape the system, highlighted in purple on a pre-impact snapshot, for the four fiducial impacts and our standard ∼10 7 SPH particles. The other particle colours are muted versions of those in Fig. 3 as a background for the highlighted ones. Only a thin cross-section of the particles that are within one SPH smoothing length of z = 0 are shown for clarity. For grazing impacts, higher latitudes may suffer less erosion (see §3.3).
In general, the impactor merges with the target for head-on or slow cases, but may not for fast, grazing impacts. In addition to any differences in the resulting fraction of lost atmosphere, the timing and cause of loss can also vary significantly with the impact scenario. For example, atmosphere may be eroded by -in approximately chronological order: • Direct encounter with the very-much-not-a-pointmass impactor passing through, most dramatically demonstrated in the high-speed, grazing case (4 th row); • The shock wave travelling through the planet from the impact point, which even erodes some mantle as well in the high-speed, head-on case (3 rd row); • Subsequent oscillations of the planet, such as the plume of impactor mantle in the 3 rd snapshot of the low-speed, head-on case (1 st row) -much like the large splash created after dropping a stone into a pond; • The secondary impact of the impactor following an initial grazing collision, as in the 3 rd snapshot of the low-speed, grazing case (2 nd row).
All of these mechanisms may contribute to the total loss in a given scenario. This provides some context with which to consider the rest of the suite and some appreciation for the complexity created by all these processes intermingling.
The particles that are eroded by these four impacts are highlighted in Fig. 4, selected by being gravitationally unbound and remaining so until the end of the 10 5 s simulation or until the time the particle exits the 80 R ⊕wide simulation box. The resulting mass fractions of lost atmosphere are 0.15, 0.08, 1.0, and 0.39, respectively. We revisit these final loss results in the context of the whole suite after presenting the rest of the simulations and introducing the previous analytical and 1D estimates for comparison. For now, Fig. 4 demonstrates the expected qualitative results following the above discussion of Fig. 3: the head-on, slow case loses atmosphere around the impact point and the antipode; the grazing, slow case shows little antipode erosion, suggesting a weaker shock, and primarily loses atmosphere in the direct path of the impactor; the head-on, fast impactor has blasted off almost all the atmosphere and some mantle from the strong shock wave; and the grazing, fast case is similar to the grazing, slow one, but the impactor has taken some of the mantle in its path along with the atmosphere and blasted away some atmosphere around the antipode. The grazing, fast impactor itself also remains unbound in this hit-and-run collision.
Note that even head-on collisions are not perfectly rotationally symmetric in our simulations, because the system is represented using a finite number of particles. For example, in addition to the large plume of material ejected during the low-speed, head-on impact, a small blast occurs on the −y side (1 st row in Fig. 3). This is impactor material that initially plunges deep into the target's core. Being much less dense than the iron core, it gets rapidly forced back out in a random direction determined by the arrangement of the discrete particles. In our simulations of the same impact scenario using different numbers of particles, the same eruption of material is produced at the same time, but with different random orientations in the y-z plane. On the one hand, this highlights the imperfect symmetry of our SPH planets, which prevents the modelling of perfectly idealised head-on collisions. On the other hand, this also demonstrates the importance of using fully 3D hydrodynamical simulations to study realistically chaotic giant impacts, where we should expect some level of asymmetry and precisely head-on impacts have a probability of zero. At Figure 5. The particles that will become unbound and escape the system, as in Fig. 4, for example subsets of (top two rows) different impact parameters and (bottom two rows) different speeds at contact. any rate, this feature ejects negligible unbound material, so does not affect the overall results of this specific study.
We now turn to the rest of the suite in a similar manner, continuing this initial overview of general behaviour. The top two rows of Fig. 5 highlight the particles that become lost from subsets of changing-impactparameter scenarios, with either the low or high fiducial speeds and the same atmosphere and number of particles. Filling in the gaps between the fiducial examples, there is a trend from more global, shock-driven erosion for low impact parameters, to direct, localised erosion for high impact parameters. Fig. 5's bottom two rows show the eroded particles from subsets of changing-speed scenarios, with either the head-on or grazing fiducial impact parameters. Even though the slowest impactors make contact at below the escape speed, they still erode some atmosphere locally. For head-on impacts, by v c = 2 v esc , already almost all of the atmosphere is eroded. At higher speeds, more mantle is also lost, and v c = 8 v esc disintegrates the planet entirely. The faster grazing impacts can still deliver enough energy to drive some antipodal loss but remove systematically less atmosphere than head-on collisions, and even by v c = 5 v esc with b = 0.7 almost half of the atmosphere still survives.
We find broadly similar behaviour for different masses of atmosphere, in simulations with the same fiducial impact parameters and speeds. For slow, head-on impacts onto targets with atmospheres at and below ∼10 −2 M ⊕ , the mantle erosion is similar to the case with zero atmosphere. Thicker atmospheres begin to significantly  cushion the mantle from erosion. The low-and zeromass atmosphere cases are also similar in the other three fiducial scenarios, although for slow, grazing collisions the thicker atmospheres can affect the path of the impactor as it passes through, making the comparison less direct. At higher speeds, the atmosphere mass makes less difference, especially in the head-on case, because both any gravitational acceleration and hydrodynamical deceleration will have smaller effects.

Erosion Time Evolution
The time at which the lost atmosphere becomes unbound is shown in Fig. 6, for subsets of changing-impactparameter and changing-speed scenarios. Significant atmosphere can be eroded after the initial impact, espe-cially for slower collisions with low impact parameters. This corresponds to the potentially violent oscillations of the planet, shocking away surviving shells of atmosphere or even ejecting plumes of material, as seen in the slow, head-on fiducial example (Fig. 3). For high impact parameters, delayed erosion can also be caused by the secondary collision of grazing impactor fragments. However, given the low speeds required for a grazing fragment to return and the likely reduced mass of the fragment, this has a smaller effect.
The majority of loss has finished by 4-8 hours after contact in all cases, and the eroded mass remains constant to within a few percent up to the end of the 28 hour simulations. For impact speeds of 2 v esc , the erosion is completed almost immediately, with little change after only the first couple of hours. For low impact parameters, this is simply because the entire atmosphere is blown away by the initial shock. For grazing collisions, it is the lack of re-impacting fragments that reduces any later erosion. Fig. 7 shows the time evolution for the loss of the different-mass atmospheres. The qualitative evolution is similar in most cases, especially for the 10 −2 and 10 −2.5 M ⊕ atmospheres, and the total loss fraction is systematically lower for the thicker atmospheres. The drag of the atmosphere as the impactor passes through can reduce the erosion both immediately and by mitigating subsequent oscillations and secondary impacts. For the faster collisions, as before, the behaviour remains comparatively simple with more immediate erosion and the results are less affected by the atmosphere's mass in terms of timing.
To study the results of using different particle numbers, we duplicated each of the two slower fiducial simulations and the 10 −2 M ⊕ -atmosphere fast ones with 10 6 , 10 6.5 , 10 7.5 , and 10 8 SPH particles (per Earth mass). For this initial project, we used 10 7 particles for the main suite to explore this new parameter space. Kegerreis et al. (2019) showed that 10 7 particles are approximately the minimum number required to resolve all of the major processes in sufficient detail. That being said, for the atmospheric-erosion tests specifically, lower particles numbers still yielded results within 10% of the converged value. Fig. 7 shows that the number of particles required for convergence clearly depends on the scenario in addition v esc to the atmosphere mass. The thicker atmospheres appear well converged by only 10 6.5 particles, as are the 10 −2 M ⊕ atmospheres for the high-speed scenarios. For the thinner atmospheres in the slower scenarios, the final results differ by a few percent even between 10 7.5 and 10 8 particles. As found by Kegerreis et al. (2019), the discrepancies manifest primarily after the initial impact, when debris falls back in and other smaller-scale processes can affect the overall results. Furthermore, regions where the atmosphere is only partially lost require many layers of particles to resolve, which is exacerbated when additional atmosphere is eroded multiple times after the initial shock. While this lack of perfect convergence is important to note, we can constrain the resulting systematic uncertainty for the loss fraction across the suite of 10 −2 M ⊕ atmospheres to around 2% in slow scenarios and much smaller in more violent cases.

Ground Speed
The one-dimensional estimates of Genda & Abe (2003, hereafter GA03) predict the local atmospheric loss for a given vertical ground speed. By defining the 'ground' simulation particles as those in the outermost shell of the target's mantle, we can track their movement as shock waves (and the impactor itself) perturb them, as illustrated in Fig. 8. We define longitude = 0 • to be the point of contact with ±180 • the antipode, and latitude = 0 • is the impact (z = 0) plane. The maximum outwards radial speed at each location is given in Fig. 9 for the four fiducial simulations, and the times at which these peak speeds occur are shown in Fig. 10.
The two head-on impacts are symmetric in longitude and show high peak speeds near the impact point and the antipode. For the slower of the two, the target recoils following the initial collision to shoot a plume of material back through the point of impact and a slightly less dramatic ejection at the antipode, causing the peak velocities in Fig. 9 at those longitudes. Some earlier erosion around the antipode is also caused by the initial shock wave, which is the origin of the maximum velocities at most of the other longitudes and latitudes. As shown in Fig. 10, this occurs about an hour before the peak recoil.
For the faster head-on collision, the impact is more destructive and no such bounce-back plume is seen. Instead, almost the entire surface is kicked immediately by the shock wave to faster than the escape speed, explaining the near-total erosion of atmosphere plus some lost mantle that was highlighted in Fig. 4. In both head-on cases, the lower speeds at high latitudes simply reflect the rotational symmetry, evidenced by the equal peak speeds at equal times for ±90 • longitude.
The two grazing collisions show similar behaviour to each other with high speeds at positive longitudes, i.e. in the path of the impactor as it passes through the point of contact. The rest of the planet is hit by the shock wave, but not one nearly as strong as in the headon cases, and with only a mild peak at the antipode. Unlike the head-on impacts, the grazing scenarios are not rotationally symmetric. Higher latitudes are less affected by the relatively small impactor and show little longitudinal variation.
In the slower grazing collision, the local loss around the impact site happens quickly, but the peak speeds everywhere else occur up to an hour later, corresponding to the initial fall-back of some impactor fragments and the recoiling oscillation of the planet. In the faster grazing case, the shock wave quickly produces the peak speeds across most of the surface, with little significant fall-back of fragments. The late times around the impact site are less meaningful since most of this material is carried away with the surviving impactor at a roughly . The maximum outwards radial velocity of the outermost particles of the target's mantle as a function of longitude away from the impact point, in separate, similar-area |latitude| bins, for the four fiducial simulations. The times at which these peak velocities occur are shown in Fig. 10. The dashed lines show the estimated ground speeds at some latitudes from Inamdar & Schlichting (2015), based on conserving a point-mass impactor's momentum in a spherical shock wave.
constant speed slightly slower than the impactor's initial 3 v esc . The peak antipode speeds are caused by the violent sloshing of the target as it begins to resettle following the shock.
Also shown in Fig. 9 are the ground speeds predicted by Inamdar & Schlichting (2015, hereafter IS15). These are independent of the impact parameter so nominally correspond to head-on collisions. They assume that the impactor's momentum is transferred at the point of contact and is conserved with a constant speed of shocked material within the propagating spherical shock wave. While this inevitably overestimates the ground speed close to the point-mass impact, it also significantly underestimates the peak speed everywhere else and cannot reproduce the increase in speed at the antipode. This is unsurprising given their assumption that the entire volume of material traversed by the shock is all travelling at the same speed. In reality and in our simulations, the shock front moves much faster than the material behind it. The overprediction near the impact site has little effect on the results as all atmosphere is removed there regardless, but the low speeds elsewhere lead to significant underestimates for the erosion. IS15's model does not include the effects of gravity, the density profile, rarefaction waves after the shock reaches a surface, and the non-zero size and non-instant momentum transfer of the impactor. The internal structure of the planet changes dramatically as the large impactor plunges messily through the mantle; at high speeds, the impactor can even reach the core of the target well be-  Figure 10. The times at which the peak outwards ground velocities in Fig. 9 occur, as a function of longitude away from the impact point in separate |latitude| bins. The time 'resolution' between each snapshot is 100 s. The maximum velocities at low latitudes in the fast, head-on case occur at roughly the same times, so some lines are overlaid by the others.
fore the shock wave has reached the other side. It is possible that with additional modifications such models may be made useful, especially for fast, grazing impacts where the shock drives the majority of the loss in a simpler manner, though in that case an estimate for the fraction of the impactor's momentum that is transferred would also be required, dependent on the impact angle, speed, and planets' radii.

Local and Global Atmospheric Loss
Now that we have examined the ground speeds across the planet for the fiducial impacts and introduced 1D and analytical estimates for comparison, we show in Fig. 11 the local atmospheric mass loss in each region for three of the fiducial impacts -the fast, head-on impact would simply show total erosion everywhere, as expected from the global >v esc ground speeds.
The loss fractions broadly follow the distributions of peak ground speeds, and the GA03 results also match well the simulated loss in many places. Encouragingly, this implies that their 1D calculations and our SPH simulations reproduce the same results for a ground shock wave eroding the atmosphere above it once it arrives at the surface. This is not always the case for the more complicated scenarios we are dealing with here. Perhaps the most significant reason is that for these estimates we have taken a single value for the peak ground speed at each location, whereas in reality the atmosphere can be ejected at many points in time -as was shown in Fig. 10. We also cannot fix this simplification by applying GA03's  Figure 11. The loss fraction of local atmosphere, X, (solid lines) as a function of longitude away from the impact point, in separate |latitude| bins, for the fiducial simulations -missing the head-on, high-speed scenario, which has uninteresting X ≈ 1 everywhere. The dashed lines show the corresponding loss estimates from Genda & Abe (2003, GA03) using the peak ground speeds from our study that are shown in Fig. 9. Only a subset of latitude bins are shown for clarity. The top-left text shows the global loss fractions from our simulations and the GA03 estimates. estimates at, for example, all local-in-time maximum ground speeds, simply because the atmosphere must still be present above the ground for a shock to remove it. After the initial impact, some parts of the atmosphere could survive relatively undisturbed and be removed by subsequent shocks. However, other parts could be partially shocked away to fall back down at a later time, which may or may not coincide with later shocks. Thus, the assumption of a single ground speed could either over or underestimate the actual local loss. We also used the radial ground speeds rather than the total, which, if used instead, produce slightly different qualitative results but very similar values for the total erosion.
Another important issue is the large size of the impactor and its complicated interaction with the target, compared with a simple point-mass explosion that would better produce loss just from ground shocks. Significant amounts of material can thus be ejected directly by the impactor ploughing through the atmosphere and mantle, especially in grazing impacts.
Finally, there are the underlying assumptions made and discussed by GA03, such as their use of an ideal gas EoS and ignoring lateral motion of the atmosphere, both of which are likely to be more valid in their targeted regime of even thinner atmospheres. However, the fact that our simulations agree with theirs in many cases suggests that these simplifications are often not too important.
The overall results for the suite are presented in Fig. 12, showing how the fraction of lost atmosphere varies with atmosphere mass, impact parameter, and speed. We find that, unsurprisingly, more atmosphere is usually lost from smaller atmospheres, more-head-on collisions, and higher speeds. However, for slower collisions, the loss is not a monotonic function of the impact parameter, and a head-on collision does not cause the most erosion. By hitting slightly off-centre, the impactor can both deliver a strong shock through the planet while also encountering and eroding more atmosphere directly. Although more-grazing impacts can directly remove even more local material, they fail to deposit enough energy into the shock to erode as much atmosphere on the far side.
Apart from this, by following the same ground-speed analysis as for the fiducial impacts, the GA03 estimates continue to reproduce the results well in most cases. As indicated by the ground speeds in Fig. 9, the estimates from IS15 predict far less loss than most head-on collisions.
Bearing in mind that the results for the smallest atmospheres are not fully converged numerically, we find a relatively mild dependence on the initial atmosphere mass, partly depending on the specific scenario. This is supported by the good agreement of the GA03 estimates, which assumed a much thinner atmosphere than ours along the lines of the Earth's present-day, ∼10 −6 M ⊕ atmosphere.
In spite of the complicated details, including significant non-monotonic dependence on the angle at low speeds, we find that a single parameter can be used to estimate the erosion from any scenario. Fig. 13 shows the fraction of atmosphere lost, X, as a function of the  Figure 12. The lost mass fraction of the atmosphere for different: (left) atmosphere masses, in each of the fiducial impact scenarios; (middle) impact parameters, for three different speeds; and (right) speeds at contact, for each fiducial impact parameter; all with ∼10 7 particles. The error bars in the left panel show the approximate, conservative uncertainty due to incomplete numerical convergence, which becomes significant for the lowest atmosphere mass. The circles show the corresponding Genda & Abe (2003) estimates based on the peak ground speeds. For the head-on collisions, the crosses show the Inamdar & Schlichting (2015) estimates based solely on the impactor's mass and speed relative to the target (their Fig. 4). modified specific impact energy, based on the specific energy used by Leinhardt & Stewart (2012) to predict disruption. We find empirically that an additional fac-tor of (1 − b) 2 broadly accounts for the variation across the full range of head-on to highly grazing collisions: where v c is here the SI value not normalised by the escape speed, and µ r ≡ M i M t /M tot is the reduced mass. This allows a simple power-law fit for the loss fraction to be made, as shown in Fig. 13: capped at one for total erosion. Note that the effects of changing the impact angle will have an additional dependence on the impactor mass which should be tested in future studies, perhaps provided by the (1 − M i /M t ) factor suggested by Stewart et al. (2014).

CONCLUSIONS
We have presented the first 3D simulations of giant impacts onto terrestrial planets with thin atmospheres. We explored a wide variety of speeds and impact angles, as well as a small range of atmosphere masses, and found a simple scaling law to estimate the fraction of atmosphere lost in this regime.
Several different processes can dominate the atmospheric loss in different scenarios, depending on, for example, whether the impactor can deliver a strong shock wave to remove atmosphere on the far side, or whether impactor fragments fall back after the initial collision. The interplay of these and other processes affects the total fraction of eroded atmosphere, the local distribution of where atmosphere is lost, and the time at which it is removed.
For head-on collisions, there is a rapid change with increasing impact speed from very little erosion to total loss. However, for grazing impacts with changing speed -or for fixed speeds with changing impact angle -there is a much more gradual transition of partial erosion that also displays complex, non-monotonic behaviour at lowto-medium impact parameters.
We find that numerical convergence can require many more than 10 6 SPH particles, with a strong dependence on the specific impact scenario and the measurement in question, consistently with Kegerreis et al. (2019). The majority of our simulations used ∼10 7 particles, which agree with simulations using 10 7.5 and 10 8 on the fraction of atmosphere lost to within a few percent, with complete convergence in high-speed scenarios where more atmosphere is lost. We conclude that bespoke convergence tests continue to be crucial for any project using planetary SPH simulations. That being said, our results provide the rough rule of thumb that about ten layers of SPH particles are required to model the evolution of an atmosphere in these types of scenarios.
By tracking the ground movement throughout the simulations, we compared these 3D results with Inamdar & Schlichting (2015, IS15)'s analytical estimates for the propagation of shocks from a giant impact, Genda & Abe (2003, GA03)'s 1D models for local shock-driven erosion, and IS15's combined predictions for the global loss in a given scenario. IS15's ground velocities significantly underestimate the maximum ground speeds in head-on impacts due to the dramatic deformation of the planet and violent post-impact oscillations. For the same reasons, their global predictions underestimate the total loss. Using our simulated ground speeds, GA03's estimates match the localised loss fractions well in most cases, especially when the direct encounter of the impactor with the atmosphere is not too important.
In the context of the Earth and the canonical Moonforming impact, only around 10% of the atmosphere would have been lost from the immediate effects of the collision. This suggests that the canonical impact itself cannot single-handedly explain the discrepancies between the volatile abundances of the Earth and chondrites by eroding the early atmosphere, compared with alternative, more-violent Moon-forming scenarios. However, the caveat of 'immediate' erosion is important, because we have here only considered the direct, dynamical consequences of a giant impact. As examined by Biersteker & Schlichting (2019), the thermal effects of a giant impact heating the planet can erode comparable atmosphere to that ejected by shocks. In addition, we took the simple approach here of defining 'lost' atmosphere by particles that become gravitationally unbound, ignoring the fact that significant material can remain bound and still be ejected far away from the planet. In a real planetary system, whether by interaction with the solar wind or by leaving the target's Hill sphere of gravitational influence, much of the erodedbut-bound atmosphere could still be lost. As a separate point, Genda & Abe (2005) showed that the presence of an ocean can significantly enhance atmospheric loss, such that in the canonical Moon-forming scenario, closer to half the atmosphere could be immediately removed. Their models combined with our results could be used to estimate the amount of an ocean that would be removed in different scenarios, to constrain the extent of fractionation between volatiles. Future simulation studies could potentially resolve an ocean directly and test such erosion in more realistic detail.
The details of atmospheric erosion by giant impacts are complicated. These simulations provide a simple scaling law in this regime and form a starting point from which to explore the vast parameter space in detail. Promising targets for future study include: investigations of different impactor and target masses; extensions to both more massive and even thinner atmospheres; the inclusion of an atmosphere on the impactor as well as the target; and testing the dependence on the planets' materials and internal structures. This way, robust scaling laws could be built up to cover the full range of relevant scenarios in both our solar system and exoplanet systems for the loss and delivery of volatiles by giant impacts.

ACKNOWLEDGMENTS
This work was supported by the Science and Technology Facilities Council (STFC) grant ST/P000541/1, and used the DiRAC Data Centric system at Durham University, operated by the Institute for Computational Cosmology on behalf of the STFC DiRAC HPC Facility (www.dirac.ac.uk). This equipment was funded by BIS National E-infrastructure capital grant ST/K00042X/1, STFC capital grants ST/H008519/1 and ST/K00087X/1, STFC DiRAC Operations grant ST/K003267/1 and Durham University. DiRAC is part of the National E-Infrastructure. JAK is supported by the ICC PhD Scholarships Fund. RJM is supported by the Royal Society.