Planetary differentiation
In planetary science, planetary differentiation is the process of separating out the different components within a planetary body as a consequence of their physical or chemical behavior (e.g. density and chemical affinities). The process of planetary differentiation is mediated by partial melting with heat from radioactive isotope decay and planetary accretion. Planetary differentiation has occurred on planets, dwarf planets, the asteroid 4 Vesta, and natural satellites (such as the Moon). Physical differentiation. Gravitational separation. High-density materials tend to sink through lighter materials. This tendency is affected by the relative structural strengths, but such strength is reduced at  temperatures where both materials are plastic or molten. Iron, the most common element that is likely to form a very dense molten metal phase, tends to congregate towards planetary interiors. With it, many siderophile elements (i.e. materials that readily alloy with iron) also travel downward. However, not all heavy elements make this transition as some chalcophilic heavy elements bind into low-density silicate and oxide compounds, which differentiate in the opposite direction. The main compositionally differentiated zones in the solid Earth are the very dense iron-rich metallic core, the less dense magnesium-silicate-rich mantle and the relatively thin , light crust composed mainly of silicates of aluminium, sodium, calcium and potassium. Even lighter still are the watery liquid hydrosphere and the gaseous, nitrogen-rich atmosphere. Lighter materials tend to rise through material with a higher density. A light mineral such as plagioclase would rise. They may take on dome-shaped forms called diapirs when doing so. On Earth, salt domes are salt diapirs in the crust which rise through surrounding rock. Diapirs of molten low-density silicate rocks such as granite are abundant in the Earth's upper crust. The hydrated, low-density serpentinite formed by alteration of mantle  material at subduction zones can also rise to the surface as diapirs. Other materials do likewise: a low-temperature, near-surface example is provided by mud volcanoes. Chemical differentiation. Although bulk materials differentiate outward or inward according to their density, the elements that are chemically bound in them fractionate according to their chemical affinities, "carried along" by more abundant materials with which they are associated. For instance, although the rare element uranium is very dense as a pure element, it is chemically more compatible as a trace element in the Earth's light, silicate-rich crust than in the dense  metallic core. Heating. When the Sun ignited in the solar nebula, hydrogen, helium and other volatile materials were evaporated in the region around it. The solar wind and radiation pressure forced these low-density materials away from the Sun. Rocks, and the elements comprising them, were stripped of their early atmospheres, but themselves remained, to accumulate into protoplanets. Protoplanets had higher concentrations of radioactive elements early in their history, the quantity of which has reduced over time due to radioactive decay. For example, the hafnium-tungsten system demonstrates the decay of two unstable isotopes and possibly forms a timeline for  accretion. Heating due to radioactivity, impacts, and gravitational pressure melted parts of protoplanets as they grew toward being planets. In melted zones, it was possible for denser materials to sink towards the center, while lighter materials rose to the surface. The compositions of some meteorites (achondrites) show that differentiation also took place in some asteroids (e.g. Vesta), that are parental bodies for meteoroids. The short-lived radioactive isotope Al was probably the main source of heat. When protoplanets accrete more material, the energy of impact causes local heating. In addition to this temporary heating, the gravitational force in a sufficiently  large body creates pressures and temperatures which are sufficient to melt some of the materials. This allows chemical reactions and density differences to mix and separate materials, and soft materials to spread out over the surface. Another external heat source is tidal heating. On Earth, a large piece of molten iron is sufficiently denser than continental crust material to force its way down through the crust to the mantle. In the outer Solar System, a similar process may take place but with lighter materials: they may be hydrocarbons such as methane, water as liquid or ice, or frozen carbon dioxide . Fractional melting and crystallization. Magma in the Earth is produced by partial melting of a source rock, ultimately in the mantle. The melt extracts a large portion of the "incompatible elements" from its source that are not stable in the major minerals. When magma rises above a certain depth the dissolved minerals start to crystallize at particular pressures and temperatures. The resulting solids remove various elements from the melt, and melt is thus depleted of those elements. Study of trace elements in igneous rocks thus gives us information about what source melted by how much to produce a magma, and  which minerals have been lost from the melt. Thermal diffusion. When material is unevenly heated, lighter material migrates toward hotter zones and heavier material migrates towards colder areas, which is known as thermophoresis, thermomigration, or the Soret effect. This process can affect differentiation in magma chambers. A deeper understanding of this process can be drawn back to a study done on the Hawaiian lava lakes. The drilling of these lakes led to the discovery of crystals formed within magma fronts. The magma containing concentrations of these large crystals or phenocrysts demonstrated differentiation through the chemical melt of crystals. Moon's  KREEP. On the Moon, a distinctive basaltic material has been found that is high in "incompatible elements" such as potassium, rare earth elements, and phosphorus and is often referred to by the abbreviation KREEP. It is also high in uranium and thorium. These elements are excluded from the major minerals of the lunar crust which crystallized out from its primeval magma ocean, and the KREEP basalt may have been trapped as a chemical differentiate between the crust and the mantle, with occasional eruptions to the surface. Differentiation through collision. Earth's Moon probably formed out of material splashed into orbit  by the impact of a large body into the early Earth. Differentiation on Earth had probably already separated many lighter materials toward the surface, so that the impact removed a disproportionate amount of silicate material from Earth, and left the majority of the dense metal behind. The Moon's density is substantially less than that of Earth, due to its lack of a large iron core. On Earth, physical and chemical differentiation processes led to a crustal density of approximately 2700 kg/m compared to the 3400 kg/m density of the compositionally different mantle just below, and the average  density of the planet as a whole is 5515 kg/m. Core formation mechanisms. Core formation utilizes several mechanisms in order to control the movement of metals into the interior of a planetary body. Examples include percolation, diking, diapirism, and the direct delivery of impacts are mechanisms involved in this process. The metal to silicate density difference causes percolation or the movement of a metal downward. Diking is a process in which a new rock formation forms within a fracture of a pre-existing rock body. For example, if minerals are cold and brittle, transport can occur through fluid cracks . A sufficient amount of pressure must be met for a metal to successfully travel through the fracture toughness of the surrounding material. The size of the metal intruding and the viscosity of the surrounding material determines the rate of the sinking process. The direct delivery of impacts occurs when an impactor of similar proportions strikes the target planetary body. During the impact, there is an exchange of pre-existing cores containing metallic material. The planetary differentiation event is said to have most likely happened after the accretion process of either the asteroid or a planetary body. Terrestrial bodies and iron  meteorites consist of Fe-Ni alloys. The Earth's core is primarily composed Fe-Ni alloys. Based on the studies of short lived radionuclides, the results suggest that core formation process occurred during an early stage of the solar system. Siderophile elements such as, sulfur, nickel, and cobalt can dissolve in molten iron; these elements help the differentiation of iron alloys. The first stages of accretion set up the groundwork for core formation. First, terrestrial planetary bodies enter a neighboring planet's orbit. Next, a collision would take place and the terrestrial body could either grow or shrink. However, in  most cases, accretion requires multiple collisions of similar sized objects to have a major difference in the planet's growth. Feeding zones and hit and run events are characteristics that can result after accretion.