In order to support the new planet classification, SpaceEngine needed code that generates the bulk composition of a planet, as well as its atmosphere and possible liquids on the surface. So I upgraded the atmosphere composition code, which was first introduced in SE 0.980. It should be called the planetary chemical composition code now, because it computes not only the atmosphere, but the seas/oceans and frozen ices. It performs iterations of the global climate conditions on the planet, and computes the equilibrium amount of gaseous, liquid and frozen substances on the surface:

1) Take the initial albedo, distance to the sun and initial atmospheric composition.
2) Compute dissipation of gases by solar radiation, compute pressure of remaining gases and temperature on the surface.
3) Compute phase states: which substances freeze, which liquefy, and which remain in a gaseous state.
4) Estimate cloud and ocean coverage, and using those estimate the new planetary albedo.
5) Compute the greenhouse effect, new surface temperature and new atmospheric pressure.
6) Repeat from step 3 until temperature and pressure stop changing.

The code works with the same substances as before (H2, He, Ne, Ar, Kr, Xe, O2, N2, CO, CO2, SO2, Cl2, H2S, H2O, NH3, CH4, C2H2, C2H4, C2H6 and C3H8). I will add some heavy hydrocarbons like those comprising gasoline, which are expected to form seas on carbon planets. Depending on the initial condition (planet size, distance to the star, initial amount of substances), some of them are lost into space due to the weak gravity of a planet or proximity to the star, some freeze out, some remain in a gaseous phase, and some form seas. So now it’s possible to find exotic cases like a terra with carbon dioxide lakes or ammonia seas, or a frigid aquaria with neon seas. This is where the new planet classification shines: the old system simply had no place for such planets.

The Wiki now has a new tab – “Hydrosphere” (not sure what to call it in general – “liquisphere”?), where you can see the chemical composition of the generated seas. It shows also various parameters such as maximum depth, temperature and pressure on the surface, and pressure at the bottom.

Aquaria with hydrogen sulphide lakes

The amount of liquid also depends on the initial conditions: it is possible that a planet has just a few lakes, or a global ocean fully covering its surface. Their possible chemical composition is not limited to a single substance, so SE calculates the equilibrium between the gas and liquid phases for each substance independently. So it is possible to have mixtures of different substances, which have overlapping temperature ranges of their liquid phase: methane + ethane (like on Titan), SO2 + H2O (it can be treated as sulfurous acid), NH3 + H2O (ammonia water), and even SO2 + CO2. I am not a chemist, so I’m not sure if some of these mixtures are possible in reality. To solve this, I have to implement a chemical equilibrium/gradient calculation code, but it is a much more complex task than thermodynamics. Scientists use special software solutions to make such calculations, but it is redundant in SE. All that I can do for now, is fix obviously absurd results like flammable hydrocarbon seas in an oxygen atmosphere. This is done by adding a simple “flammability” flag to each substance and annihilating it with proportional amount of free oxygen, until all of the flammable substance or oxygen is gone (for simplicity, I am ignoring water, CO2 and other gases formed in this process).

There are much fewer Titan-like planets and moons generated now than in the previous version of SE, due to the accurate modeling of their physical conditions. They must be finely tuned to make possible the existence of liquid methane or ethane (their liquid phase temperature range is very narrow). Interestingly, seas made of liquid nitrogen are much more common on very cold planets. By the way, according to a new study, Titan’s methane-ethane seas could have a significant amount of nitrogen (up to 68% by mass!) dissolved in them. The dissolving of gases and solid substances in liquid ones is not modeled, nor are chemical reactions. It is also a very complex task, so SE can’t generate salty water seas for now (Earth’s oceans have 3% of dissolved NaCl and KCl salts). Another possible issue is mixed seas made of immiscible liquids like water and heavy hydrocarbons: SE doesn’t model this either.

Neon seas are surprisingly rare, despite the fact that neon is one of the most abundant elements in the Universe. This is because the temperature of liquid neon is extremely low – 24 to 44 K, much lower than that of liquid nitrogen. Such temperatures are possible only on some planets orbiting very far from cold red dwarf stars. Even Pluto is too warm for liquid neon.

Terra with a global carbon dioxide ocea

Accumulation of oxygen in the atmosphere is possible in two ways: photo-dissociation of water, and photosynthesis by organic life. The first one produces tiny amounts of oxygen, which could accumulate in noticeable amounts only on almost airless worlds like Europa (Jupiter’s moon Callisto actually has such an oxygen atmosphere). The second one is more aggressive. I added a simple profile of oxygen production over time, based on studies of the history of Earth’s atmosphere (0 to 2.5 Gyr – no oxygen, 2.5 to 2.8 Gyr – the Great Oxygenation Event). Interesting that after considering such evolution of the atmosphere, many procedural planets with life freeze because of a significantly decreased greenhouse effect – it looks like the Huronian glaciation on Earth. The planet must change its class to something like “cold desertic terra with (subglacial) life”, and the oceans must get removed. This is not modeled for now; SE just restores the initial atmosphere and wipes out life from the planet. This is an interesting field for future work. Also, alien biospheres could be non-oxygen-producing/breathing, but rather use hydrogen or some other gas instead of oxygen. But all of this is speculative for now (and probably for many decades to come).

The opposite scenario of planetary evolution, not always related to life, is a runaway greenhouse. If a planet has a significant amount of some greenhouse substances, like CO2 or water, and is located close to its star, it could start to warm itself up, releasing more gas into the atmosphere and warming itself up even more. The process stops when all of the substance get evaporated into the atmosphere, or at some equilibrium pressure and temperature, if the planet has too much of such a substance or is relatively cool. The first scenario often occurs with CO2 or SO2, forming a planet with a dense atmosphere and CO2 or SO2 seas. The second one is very common on a temperate/warm aquaria, the “oceania” planets in the old classification. They have a virtually unlimited amount of water (up to 50% of the entire planet’s mass), so the process of a runaway greenhouse stops at a temperature of hundreds of degrees and a pressure of thousands of bars on the “surface”. Actually, there is no surface: under such conditions water vapor is a hot supercritical fluid, so there is no sharp boundary between the H2O atmosphere and H2O mantle. Such a planet is now classified as a minineptune: a planet with an atmospheric pressure greater than 1000 bars and a mass lower than 4 Earth masses. This term is often used by planetary scientists nowadays for exactly such “gas dwarf” planets. So there will be no more terra planets with 1000+ bars of pressure: those are minineptunes now. The atmosphere of a minineptune could also contain other gases than water vapor. More massive planets (4 to 10 Earth masses) are classified as subneptunes in SE. Some of them are evolved from a very large superaquaria which falls into a runaway greenhouse (megaaquaria, according to the mass prefixes in the new planet classification). And some subneptunes are just tiny ice giants like Uranus with a H/He atmosphere. Minineptunes are expected to look like Venus, with clouds twisted into a single supercell, while more massive subneptunes should resemble Uranus and Neptune. I have not started work on updating planetary textures yet, but this will be taken into account.

Comparison of a minineptune (planet 6) with a normal neptune (planet 2) and super-earths (planets 1 and 7). To scale. Because a minineptune does not have a surface, the stats display its effective temperature, as with gas giants.

In a rare cases, a temperate aquaria ends up with moderate conditions, retaining its liquid ocean with a water surface. Its atmosphere is usually thick (tens of bars) and warm (50-80 °C), and made predominantly of water vapor and carbon dioxide. The ocean is usually 100-200 km deep and has ice VI or ice VII on its bottom. Such exotic forms of ice form under a pressure of about 109 Pa (10,000 bar). SE calculates the ocean depth using this limiting pressure, liquid density and gravity on the planet. Then it calculates the water volume and compares it with the total amount of water in the bulk composition of the planet. If the first is lower than the last, this means that the planet has too much water, and ice VI/VII on its floor; such planets are classified as superoceanic. The opposite case is very rare, but more interesting: the ocean has a rocky bottom, which enables the possibility of developing of life. The Wiki uses this fact to show the information about bottom composition – ice VI/VII or rock. Such planets are usually classified as oceanic terra/carbonia/ferria, not as aquaria, because they have a relatively small amount of water. But superoceanic terra planets are also generated (i.e. a planet with a rocky bulk composition, but with enough water to form ice VI on the ocean bottom). Similar calculation of the bottom composition is used on frozen aquarias for their subglacial oceans, although they are not modeled directly.

Superoceanic aquaria

Cold bodies with a large amount of frozen volatiles should have bright “snowy” areas or even large active glaciers on their surface. Examples are Pluto with its nitrogen glaciers in Tombaugh Regio, Mars with its H2O and CO2 polar caps, and even Earth with ice polar caps and glaciers on top of mountains. So a planet can have seas made of one substance and glaciers of the same or another substance simultaneously. Because of this, it is difficult to add the glacier info into the classification string, this is why the new planet classification does not use the “glacial” word.

I also upgraded the Star browser to allow using the new planet classification. Three subclasses are selectable – temperature, volatiles, and bulk class (the size prefix could also be added). I also implemented simple filters to find planets with a specific composition of its atmosphere and hydrosphere. There are 3 modes for these filters: “Any of” searches a planet/moon with any of the specified substances present, “All of” – with all of them present, and “In order” – with all of them, but sorted by amount in decreasing order. So if you want to find for example an Earth-like atmosphere, choose the “In order” mode and select the substances N2, O2 and Ar. And of course the composition of seas is now possible to define in the planet script, pretty similar to how it is done for the atmosphere.