Impact Erosion
When a very large impact occurs on a planet with an atmosphere, it is possible for that impact to remove a sizable portion of the atmosphere simply by the energy released in the impact. Obviously this sets an upper limit on how much gas can be removed. This upper limit is a volume of gas with potential energy equal to the impact energy of the impactor. Because the impact energy is primarily released at the ground, at least part of this volume must be very deep in the potential well of the planet.
If an impactor is too small it doesn’t remove any of the atmosphere and instead its volatile content becomes part of the atmosphere. This process is described on a different page. At the other extreme is an impactor with enough energy to remove a very large fraction of the atmosphere. At this extreme another upper limit is imposed, and that limit is that the only gas above the tangent plane of the impact sight can be remove by the impact. The figure below shows this graphically.
Figure: A graphic illustration of how a large impact can remove all of the atmosphere above the tangent plane of the impact site.
From this image you can then calculate how much of the atmosphere is removed by each large impact. This image also makes it abundantly clear that a larger fraction of the upper atmosphere is removed than of the lower atmosphere.
In the model two impactor populations are considered: asteroids and comets. The impact rates for each as a function of time are adjustable parameters of the simulation. At each time step the number of impactors with sufficient energy to remove part of the atmosphere is calculated and the appropriate fraction of mass is removed from each altitude bin in the simulation.