# Astronomy

## Cloud Speed Simulation | ScienceLog #5

One of our recent improvements to Universe Sandbox includes realistically simulating the speed at which clouds rotate around objects, like planets and moons. While our in-game guide, which can be found under Guides > Science > Clouds, shows off these new features, we wanted to explain them in a little more depth.

To simulate completely realistic clouds, we would need to do a full weather simulation, including the water cycle. As we talk about in our Snow Simulation ScienceLog, this isn’t currently possible without a supercomputer, so for now our clouds are drawn from pre-made cloud pictures. However, we determine the speed at which clouds rotate around an object’s surface from two simulated effects.

### Creating Wind

In reality wind is initially created going in an unexpected direction – it travels outwards from the equator to the poles instead of rotating around the equator.

This is because objects are (generally) warmer at their equator and colder at their poles. The higher temperatures at the equator lead to a higher air pressure (essentially the weight of the atmosphere) at the equator, while colder temperatures at the poles lead to lower air pressure. The high pressure air at the equator moves to the lower pressure air at the poles, creating a wind that moves the clouds with it.

This wind moves faster, increasing the cloud speed, the larger the temperature difference between the equator and the poles is, since this will create a larger air pressure difference. In Universe Sandbox we simulate this difference in air pressure between an object’s equator and its poles based on the difference between its Minimum and Maximum Temperature, which are usually at the poles and equator.

### Changing the Wind’s Direction

So if wind, and clouds, starts out moving from the equator to the poles, why is it that in reality (and in Universe Sandbox) the wind and clouds move around the Earth’s equator?

This has to do with something called the Coriolis effect – the second effect we simulate for our cloud rotation speeds – which is an effect that occurs on any object that rotates. The Coriolis effect creates a force, called the Coriolis force, that pushes the wind around the Earth’s (or any object’s) equator. The strength of this force increases the faster the object is rotating.

### The Resulting Rotation (Speed)

So we now have two effects pushing the winds, and thus clouds, in two different directions:

1. The difference in air pressure (and temperature) between the equator and the poles of the object forces the winds to move outwards from the equator to the poles.
2. The Coriolis Effect pushes the winds around the equator of an object.

So how do we arrive at the final wind, and cloud, rotation speed? The wind speed will increase until the strength of both effects on the wind is the same. When this happens, the wind and clouds end up rotating around the equator of the object at a constant, unchanging speed. In Universe Sandbox this speed is taken as the Cloud Rotation Speed.

### Manipulating the Winds

A really interesting effect that happens when our two simulated effects have the same strength is that the faster an object rotates, the slower the cloud speed will be.

A faster object Rotation Speed creates a stronger force from the Coriolis effect, which allows the two effects to reach an equal strength more quickly. This means that the wind speed has less time to increase before it becomes constant. The result is that the final wind, and Cloud Rotation Speed, is slower.

In addition to Rotation Speed and the Minimum and Maximum Temperature, the strength of the wind that is created from the temperature difference also depends on the Atmosphere Mass, the Surface Gravity, and the Radius of the object (see the Bonus Math section below for details). This is because a more massive atmosphere will slow down the Cloud Rotation Speed, since it is harder to move, and a smaller object radius will increase the Cloud Rotation Speed, since it is easier to move air around a smaller object.

While simulating these effects is a welcomed advancement in our cloud simulation, there are still many improvements we would like to make. This includes dynamically generating clouds and giving them more realistic material compositions. For now, try experimenting with different object properties to see how they affect the Cloud Rotation Speed. We recommend the object’s Rotation Speed, since we can’t slow down the Earth in real life (nor would we want to), this is a great way to see some amazing science at work!

This blog post is part of our ongoing series of ScienceLog articles, intended to share the science behind some of Universe Sandbox’s most interesting features. If you would love to learn about the real-life science powering our simulator, please stay tuned and let us know what you would like to read about next.

To join our community discussions, please join us on our Steam Forum and our official Discord community.

### Bonus Math

If you’re interested in exactly how different object properties relate to both the force from the difference in the air pressure between the equator and the poles (called the pressure gradient) and the force from the Coriolis effect (called the Coriolis force) then you’ll enjoy this extra little bit of math.

When we simulate the cloud rotation speed we figure out the pressure difference, ΔP, which is based on the maximum atmosphere surface pressure, Pmax. This is the surface pressure at the equator, and depends on the Atmosphere Mass, M, the Surface Gravity, g, and the radius of the planet, R,

P_{\rm{max}} = Mg/(4 \pi R^{2}).

The pressure and temperature of a gas are related (by something called the Ideal Gas Law), so we can compute ΔP using just Pmax and the maximum and minimum temperature, Tmax and  Tmin , of the object,

\Delta P = P_{\rm{max}} \left(\frac{T_{\rm{max}}}{T_{\rm{min}}} - 1 \right).

Now that we have this pressure difference, we can compute the force, F, that this pressure gradient applies over a certain amount of air mass, m. This force per mass is what causes winds and clouds to move and depends on ΔP (and a few other less important things). That means that this force can change depending on M, g, R, Tmax and  Tmin , (that is Atmosphere Mass, Surface Gravity, Radius, Maximum Temperature, and Minimum Temperature respectively) so all of these properties affect the cloud rotation speed,

\frac{F}{m} \propto \Delta P \propto P_{\rm{max}} \times \frac{T_{\rm{max}}}{T_{\rm{min}}} \propto
\frac{Mg}{R^{2}} \times \frac{T_{\rm{max}}}{T_{\rm{min}}}.

Here the ∝ symbol means “proportional to,” which is similar to an equals sign, “=”, but leaves out some of the less important values. The Coriolis Force also provides a force per mass in order to move clouds. This force is dependent on a few different things, but in particular it depends on the rotation speed of the planet, Ω, and the speed that the wind is already moving due to the pressure gradient, v,

\frac{F}{m} \propto \Omega v.

To reach a balanced state where the wind, and clouds, are moving around the equator of an object at a constant speed, the two forces must be equal, leading to the relationship

\Omega v \propto  \frac{Mg}{R^{2}} \times \frac{T_{\rm{max}}}{T_{\rm{min}}}.

Now the value we want is the wind, or cloud, rotation speed, v. Rearranging the above equation gives us

v \propto \frac{Mg}{\Omega R^{2}} \times \frac{T_{\rm{max}}}{T_{\rm{min}}}.

So what does this mean? First, the larger the difference between the minimum and maximum temperature, the faster the clouds will move. This is because a larger temperature difference means a larger pressure difference, thus faster winds.

It also shows mathematically why a more massive atmosphere slows the cloud rotation speed and a smaller radius can dramatically increase the cloud rotation speed like we discussed above.

But the most interesting consequence of this relationship is that it shows why it is that the faster an object rotates, the slower the cloud speed will be. This result was so surprising to us at first that we had to triple check it (we’re convinced it is correct now, don’t worry). While it’s impossible to slow down the Earth’s rotation in reality (not to mention the immense destruction that would cause if we could), exploring in Universe Sandbox allows you to see the consequences of some beautiful math for yourself.

## Simulating Snow | ScienceLog #4

It turns out it’s a lot harder to simulate snow, or any weather for that matter, than it is to simulate regular surface water. In Universe Sandbox the phases of water on the surface of an object depend just on the sea level temperature, and we even make sure to conserve the total surface water mass in all of its phases, which you can find under Properties > Surface > Total Water Mass. However, because snow depends on so many other conditions we don’t keep track of it in the same way.

Like all phases of water, snow is also tracked with surface grids, which we discussed in our first ScienceLog. We simulate snow by checking if each point on the surface grid has the right elevation, amount of water vapor, and surface temperature, needed for snow to form. If the point meets all of our checks, we know snow needs to be added to that point. This is much more complex than how we simulate ice, which only depends on whether the sea level temperature of a point on the surface grid is below freezing.

As of Update 27 we’re also keeping a record of where snow is being formed. One thing this allows us to do now is add and remove snow more realistically. This is a big improvement over our previous snow simulation where snow would just appear and disappear instantaneously depending on the properties of each point on the surface grid at any given time. We’re also doing a better job of simulating snow and ice on random planets by stabilizing the water phases and then running our snow checks when the planet is created.

### At the Speed of Snow

Now, you may be wondering why we don’t just simulate snow with the rest of the phases of water. To do that, we would need to simulate the entire water cycle, which we just can’t do accurately at simulation speeds faster than about one second per second on a desktop computer (yet). Even organizations like NASA need supercomputers to accurately simulate weather! This limitation comes from how fast we can allow water to flow through the points on a surface grid and maintain a stable surface simulation. In the water cycle, the phases change much faster than we can simulate the flow rate of water. This means we can’t keep track of which points should have which phases. For simulating the phase changes of water on the surface of a planet, like liquid water to ice, we aren’t limited because the flow rate of water is faster than the phase changes of this surface water. However, as consumer computers get faster, our snow simulation has the potential to become more realistic. So while we may not have personal supercomputers anytime soon, you can still check out how much better snow looks by checking out the Tidally Locked Earth or Mars Collisions Sims.

This blog post is part of our ongoing series of ScienceLog articles, intended to share the science behind some of Universe Sandbox’s most interesting features. If you would love to learn about the real-life science powering our simulator, please stay tuned and let us know what you would like to read about next.

To join our community discussions, please join us on our Steam Forum and our official Discord community.

## The End of the World: Slower Than You Expected | ScienceLog #3

Sure, the Sun’s pretty useful, we guess. It feeds Earth’s plant life, keeps us warm, and helps people see where they’re going when they walk around outside. If the Sun suddenly disappeared from the Solar System (which you can do with the click of a button in Universe Sandbox!), we’d be in big trouble.* In fact, right now you’re probably imagining the desolate, frozen landscape that our planet would become without its Sun. But this apocalypse wouldn’t happen quite as fast as you probably think:

If the Sun disappeared, it would take
over a century for the Earth’s oceans to completely freeze solid!

Universe Sandbox lets you perform this kind of catastrophic experiment from the safety and comfort of your own home by simulating three phases of water (solid, liquid, and gas), and how they react to the changing environment. As a planet cools, its surface water will freeze into ice. Heat that planet back up with a laser, and the ice will melt and even vaporize into gas.

But you might have noticed that some of these phase changes take longer than you expect them to. If you’ve found yourself wondering “Why is it taking so long for the oceans to freeze?” or “I’ve been waiting for ages for the ice caps to melt, what’s going on??”, read on to learn more about the physics (and speed) of phase changes.

### Energy Flow… Again

In ScienceLog #1, we explained how the flow of energy into and out of a planet will affect that planet’s temperature. In fact, the flow of energy also affects the phase of water.

As you know if you’ve ever boiled a pot of water, you need to add energy to turn water from a liquid to a gas. The opposite phase change— condensing water vapor into a liquid— involves the release of energy into the cooler environment surrounding the water. Similarly, energy needs to flow into a block of ice to melt it into water, but energy must flow out of a pool of water in order to turn it into ice. We can figure out how fast a phase change is occurring based on the speed at which energy is flowing into or out of the water.

The key point here is that phase changes are not instantaneous. You’ve probably already noticed that, if you pay attention to phase changes in your daily life: It can take a few days for snow to melt after a big blizzard, even if the temperature rises above freezing. Even ice doesn’t melt instantly in your drink on a hot day. And of course, we all know that water never boils as fast as we want it to, even if we set it on high heat.

The speed of a phase change of surface water in Universe Sandbox will depend on the temperature of the surface, the freezing or boiling point of water, and the mass of water that you’re trying to change. This last factor, the mass of the water, is probably the source of most of the confusion about this issue in Universe Sandbox. Since we’re all used to seeing phase changes in our everyday lives, we have some intuition for how fast we think they should happen. But the masses of the Earth’s ice caps or oceans are much, much larger than an ice cube or a kettle of water, and this significantly slows down the rate of boiling, melting, and any other phase change.

The heat from the too-close Sun is melting the Earth’s ice quickly, as you can see in the Total Ice Mass graph on the left, but not instantly.

That’s why you might have to wait a while for your simulated planet’s oceans to freeze or boil (depending on what you’ve done to that poor planet). Of course, if you get impatient, you can always use the new Stabilize Phases button in the Surface tab to instantly change the surface water to the correct phase based on the local temperature. What a convenient apocalypse!

…What’s that? You still don’t believe us that it would take a century to freeze the Earth’s oceans?

…You want some proof in the form of equations and hard numbers?

…All right, you asked for it. If you’re still with us, read on for the juicy, math-y details:

### Bonus Math: How Long Does It Take to Freeze the Earth’s Oceans?

We’re going to put our money where our math is and walk through an example. Suppose we want to freeze all the water on Earth into ice. We could do this by deleting the Sun in the Solar System, although then we’d have to wait for the Earth to slowly cool down. If we’re impatient, we can skip ahead by just setting the Earth’s Average Surface Temperature to the lowest possible temperature: -273°C, or zero Kelvin (also known as “absolute zero”).

If you try this in Universe Sandbox, you’ll notice that after you change the temperature, the oceans are still made of liquid water. How long should we expect it to take to freeze all that water into ice: Days? Weeks? Months?

Let’s start by asking how much water we’re trying to freeze. Earth’s oceans have a mass of roughly 1.4 thousand billion billion kilograms. In scientific notation, that’s 1.4 x 1021 kg of water. To turn the liquid water into a solid, we need to remove energy from it. Since the water hasn’t frozen yet, its temperature is sitting at the freezing point, around 273 Kelvin. Since the Earth itself is at zero Kelvin, the heat energy in the water will flow into the Earth (and then out into space).

Our next question is: How much energy needs to flow out of the water in order to freeze it? To answer this question, we use a property of water called the Heat of Fusion. This property represents how much energy, in Joules, is required to melt one kilogram of ice into water, or, conversely, how much energy must be removed to freeze one kilogram of water into ice. You can look up the Heat of Fusion for many different materials online— For water, it’s about 3.3 x 105 Joules per kilogram.

This means that the amount of energy that must be removed from Earth’s oceans to freeze them entirely into water is:

\text{Energy} = \text{Mass} \times \text{Heat of Fusion} = (1.4 \times 10^{21} \text{kg}) \times (3.3 \times 10^5 \frac{\text{J}}{\text{kg}}) = 4.62 \times 10^{26} \text{J}

That’s roughly the amount of energy that would be released by two billion Tsar Bomba hydrogen bombs, the most powerful nuclear weapon ever created.

Now we need to know the speed at which energy is flowing out of the water, and into its zero Kelvin environment. For this, we can use the Stefan-Boltzman law, which says that an object with temperature T will lose energy through its surface at a rate of

\text{Rate} = \sigma T^{4}A

where σ, the Greek letter “sigma”, represents the Stefan-Boltzmann constant, and the A is the surface area of the object.

The surface area of the Earth is about 5.1 x 1014 m2, so the rate at which the oceans are losing energy is roughly

\text{Rate} = (5.7 \times 10^{-8} \frac{\text{J}}{\text{s m}^{2}~\text{K}^{4}}) \times (273~\text{K})^{4} \times (5.1 \times 10^{14}~\text{m}^{2}) = 1.61 \times 10^{17}~\text{J/s}

We can actually double-check this number in the game: First, put the Earth in an empty simulation. Then set Earth’s Average Surface Temperature to 273 Kelvin and look at the Energy Radiation Rate property. As expected, it shows that this Earth is losing energy at a rate of 1.61 x 1017 W (the Watts unit is equivalent to Joules per second).

Back to our zero-Kelvin Earth: you probably know that only about 70% of our planet’s surface is covered in water. Since we’re only interested in how fast the oceans are losing heat, we should use a reduced rate of

\text{Rate} = 1.61 \times 10^{17}~\text{J/s} * 0.70 = 1.13 \times 10^{17}~\text{J/s}

We now know how much energy we need the oceans to lose in order to freeze them all, and how fast they are losing energy to their surroundings. Now we can easily calculate the time it will take for the oceans to lose the required amount of energy:

\text{Time} = \text{Energy / Rate} = (4.62 \times 10^{26}~\text{J}) / (1.13 \times 10^{17}~\text{J/s}) = 4.09 \times 10^{9}~\text{s}

There are about 3.15 x 107 seconds in a year, so that’s

\text{Time} = (4.09 \times 10^{9}~\text{s}) / (3.15 \times 10^{7}~\text{s/yr}) = 132~\text{yr}

In other words, we estimate that it would take over 100 years(!) for the Earth’s oceans to completely freeze if the Earth’s temperature suddenly dropped to absolute zero. In real life, it would likely take even longer: The layer of ice that would form on top of the oceans would insulate the liquid water underneath, keeping it from freezing from much longer. Geothermal vents at the bottom of the oceans could also keep temperatures cozy for the microorganisms that live down there, possibly for billions of years.

If you’d rather go in the opposite direction and try to boil away Earth’s oceans by heating up the planet, you might find that it takes even more energy! That’s because the energy needed to change water from a liquid to a gas, known as the Heat of Vaporization, is almost ten times its Heat of Fusion. You can explore exactly this scenario in our Welcome | Part 2 guide, which you can find in Home > Guides > Tutorials. You can also learn more about how Universe Sandbox simulates the surface temperatures of objects in the Surface Simulation or the Energy & Heating tutorials.

### Assumptions Addendum

Based on some comments we’ve received about the assumptions we made for this calculation, we wanted to go into a bit more depth about what they are, and why they may (or may not) be important. You’ll notice that because of these assumptions, the 132 years that we come up with really represents a minimum amount of time it would take for the oceans to freeze solid.

• Space is actually 3°K, not 0°K:

Yes, that’s true, the ambient temperature of empty space is around 2.7°K due to the cosmic microwave background. However, after the Sun disappears, the Earth is still much hotter than the temperature of space, and the difference between 0°K and 2.7°K is small, so this would not notably affect the speed of cooling.

• We didn’t consider atmospheric heating (the greenhouse effect):

No we didn’t, though it is included in the Energy Absorption Rate in Universe Sandbox, so you can go see how large an effect this is by running the simulation for yourself! This effect actually makes the largest difference in the time it would take for the oceans to freeze. This Atmosphere Power is actually based on the infrared emissivity, ε, of Earth, a measure of how efficiently it emits infrared radiation. For Earth this is about 0.78 on a scale of 0-1 (1 being very efficient). The energy radiated back at Earth by the atmosphere is then calculated as:
P_{\rm{atm}} = \frac{\epsilon}{2}  \sigma T^4 A

where again σ, the Greek letter “sigma”, represents the Stefan-Boltzmann constant, and the A is the surface area of the object, and T is the temperature. Which works out to be 39% of the Energy Radiation Rate of Earth. So this means that the cooling rate is significantly slower when you take atmospheric heating into effect, adding another 83 years or so to the time it would take for Earth’s oceans to freeze solid.

• We didn’t discuss tidal forces:

True, we did not discuss tidal forces, but they are also computed in Universe Sandbox as part of the Energy Absorption Rate. However, once you get rid of the Sun, the additional heating from tidal forces is over a million times smaller than the Energy Radiation Rate. The main source of tidal heating once the Sun is gone is the Moon, which adds about 2 terawatts of constant power (though it varies very slightly). This additional energy would only delay Earth’s oceans from freezing over for another day or so.

• We didn’t consider geothermal (internal) heating:

Geothermal vents are mentioned in the last sentence of the second-to-last paragraph, but you’re right that we did not include them in our calculations. In fact, that property is not simulated in Universe Sandbox. However, assuming this rate is constant at providing 47 terawatts of power, this is still about 1000 times smaller than the Energy Radiation Rate, and would only add about 20 more days to the total time that it would take to freeze the Oceans.

• Earth is not a perfect blackbody:

That’s also true. In many astronomical fields, celestial objects are approximated as blackbodies not only because it makes the math much easier, but also because we don’t know their exact emission and absorption properties, and it tends to be a pretty accurate approximation. This is why we approximate all of our objects as blackbodies to compute the Energy Radiation Rate in Universe Sandbox. Even though Earth is not a perfect blackbody,  the difference between it’s blackbody temperature and measured temperature is only a few degrees Celsius (not including the greenhouse effect).

Another assumption we made was that the surface temperature of the Earth would be starting at 0°K. As we mentioned, if we don’t start Earth at 0 °K, then we need to wait for it to cool off enough that it’s oceans would start to freeze, making it take even longer for Earth’s oceans to freeze solid. We dynamically compute the temperature of an object and its subsequent Energy Absorption and Radiation Rates in Universe Sandbox each second, so you can actually watch it cool in real time. Computing the exact amount of additional time this cooling would add is quite complicated. But we can run the simulation in Universe Sandbox and find that this will add another 100 years or so to the total time that it will take Earth’s oceans to freeze solid.

Since we do include atmospheric and tidal heating in Universe Sandbox, I encourage you to go and delete the Sun yourselves and see how long it takes for the oceans to freeze solid!

*So how long would you survive after the Sun disappeared? It would depend a lot on where you live and how much food you have on hand. The crops we depend on for food need sunlight to grow, although larger plants like trees can have enough energy stored to last for years without the Sun. Many people would probably freeze to death before they starved. Some people might last for a few months, especially those living in places like Yellowstone or Iceland with a lot of geothermal activity. After a few years, though, the Earth’s surface would grow so cold that the atmosphere would condense, and there’d be nothing left to breathe. It really makes you appreciate our nearest star, doesn’t it?

This blog post is part of our ongoing series of ScienceLog articles, intended to share the science behind some of Universe Sandbox’s most interesting features. If you would love to learn about the real-life science powering our simulator, please stay tuned and let us know what you would like to read about next.

To join our community discussions, please join us on our Steam Forum and our official Discord community.

Updated April 30, 2021

## Tidal Heating | ScienceLog #2

Simulation in which the Moon orbits way too close to the Earth. Tidal forces from the Earth’s gravity rip fragments from the Moon, tearing it apart.

New and Improved Tidal Heating

Our first ScienceLog explained how the flow of energy into and out of an object is responsible for heating or cooling the object. If you look at the sources of energy in a simulation, listed in the Energy Flow section of the object’s Surface tab, you’ll see Tidal Power listed. Unlike some of the other heat sources, like stars or impacts, tidal heating originates inside the object itself.

Tidal heating has been a part of Universe Sandbox for some time, but after the release of our new Surface Grids feature in Update 24, we noticed that tidal heating wasn’t changing the temperature of planets the way we expected. We traced this unusual behavior back to some errors in our tidal heating calculations, and then we fixed those bugs while we prepared the energy flow tools for Update 25

Now that we’re more confident in our tidal heating simulation, we thought that for this ScienceLog, we’d dive a little deeper into tidal heating, where it comes from, and how it works in Universe Sandbox. It may not be as flashy as other heating sources, like supernovas or lasers, but tidal heating can create some unexpected and interesting effects, and even determine the habitability of a planet or moon!

What is Tidal Heating?

As usual, it all comes back to gravity. The force of gravity depends on the distance between objects. For example, the strength of Earth’s gravitational pull on the Moon is stronger on the side of the Moon that’s facing the Earth than on the far side of the Moon. This difference, called the tidal force, can stretch the Moon out of its normally spherical shape. If the tidal forces are strong enough, they can even rip an object apart through a process called Roche fragmentation.

Jupiter’s moon Io orbiting the gas giant in a simulation with just Jupiter and its moons. Io’s eccentric orbit creates tidal friction inside the moon, and the graph of Tidal Power on the left shows how the incoming rate of tidal energy changed over time. In real life, astronomers believe this tidal heating is the source of energy for Io’s many volcanoes.

Smaller tidal forces will leave the object intact, and the “squishing” of the object’s spherical shape is usually too small to see. But if the tidal forces change over time— say, because the object is spinning, or its orbit is non-circular (elliptical)— all this squishing and un-squishing will create friction inside the object, which will add heat energy.

How Does Tidal Heating Work in Universe Sandbox?

As the simulation runs, Universe Sandbox is constantly calculating the gravitational forces pulling on every object. We use these calculations to determine where each object will move next, and how fast, but we can also use them to calculate the strength of the tidal forces inside the object. If these forces are strong enough, the simulation produces fragments to simulate Roche fragmentation tearing the object apart. It also calculates how much heating is produced by tidal friction, and sends that information into the energy flow calculations that control the object’s temperature.

With the improvements in Update 25, we’re now much more confident in our tidal heating model. We even made a new simulation to show it off: A Tidally Heated Habitable Moon. This sim demonstrates a scenario predicted by some astronomers: a moon orbiting a gas giant outside of its star’s habitable zone. Normally this distance would make the moon’s surface too cold to support liquid water, but tidal forces from the gas giant heat the moon’s surface to a balmy, habitable 14.9°C.

A tidally heated habitable moon located outside of the habitable zone. The warmer surface temperature, due to tidal heating, allows liquid water to flow on this moon.

Try creating your own tidal heating simulations, and experiment with the masses and orbits of objects (especially the orbital eccentricity) to see how these properties affect the amount of tidal power added to an object. Can you make a habitable moon or planet outside the habitable zone?

Note: You may have noticed the odd looking spike in the “Jupiter’s moon Io orbiting the gas giant” graph. One of the challenges that comes with simulating complex features like tidal heating in Universe Sandbox is that when you increase the speed of the simulation, accuracy in the calculations can decrease. These abnormalities occur because there are less points of data to reference. The graph could be smoothed out by estimating data points in between, but that would introduce inaccurate data, and we’re all about accuracy here.

This blog post is part of our ongoing series of ScienceLog articles, intended to share the science behind some of Universe Sandbox’s most interesting features. If you would love to learn about the real-life science powering our simulator, please stay tuned and let us know what you would like to read about next.

To join our community discussions, please join us on our Steam Forum and our official Discord community.

## Energy and Heating | ScienceLog #1

Jupiter orbiting a mere 0.04 AU from the Sun, heating quickly under the intense stellar energy it receives at this distance.

It’s Getting Hot in Here…

One of the many important astrophysical processes that Universe Sandbox simulates is the changing temperature of an object as it is warmed by nearby stars and other sources of heat. Thanks to our new Surface Grids feature, introduced in Update 24, Universe Sandbox can now simulate the heating of each point on an object’s surface, to create a 2D map of a planet or moon’s surface temperature.

In addition to the Surface Grids simulation in Update 24, we also added new properties and tools related to heat and temperature in Update 25, so we wanted to take this opportunity to explain what makes planets get so hot (or cold!), and how you can use Universe Sandbox to explore the flow of energy through your objects.

Go with the Flow: Energy Flow and Temperature

So what makes the temperature of an object change? It all comes down to energy. An object like a planet or moon is continuously absorbing energy from its surroundings (like the heat from nearby stars) and radiating energy out into space. If the object is absorbing more energy than it is radiating away, that extra energy is used to raise the temperature of the object. On the other hand, if the object is radiating more energy than it’s receiving, that lost energy causes the object’s temperature to drop.

Universe Sandbox simulates the temperature of an object based on the flow of energy into and out of the object. You can see the data related to this “Energy Flow” in the Surface tab in the object’s properties panel. The first two properties, Energy Absorption Rate and Energy Radiation Rate, show the speed at which the object is gaining and losing energy. The Heating Rate tells you how fast the object’s surface temperature is expected to change based on this energy flow. If the object is absorbing more energy than it’s radiating, the Heating Rate will be positive, and the object will heat up. If it’s radiating more energy than it’s absorbing, the Heating rate will be negative, and the object will cool down.

Try experimenting with properties like the object’s Average Albedo or Surface Heat Capacity to see how they affect the energy flow rates and surface temperature (or check out our Energy Flow guide in Home > Guides > Tutorials > 14 – Energy and Heating).

The Earth in the Solar System, with the Energy Flow section displayed in its properties panel.

Heat Wave: Sources of Heat Energy

What are these sources of energy that can heat an object in Universe Sandbox? Energy from stars is the major source of heat in most simulations. These heat sources are directional: they only heat the part of the object’s surface facing the star. Heating from supernova explosions is also directional, not to mention extremely powerful.

The Earth, heated by a recently exploded Sun. The directional heating from the supernova causes the side of the Earth facing the supernova to receive all the heat energy. Eventually, the Earth absorbs too much energy, too fast, and it is vaporized away.

Other sources of heat come from all directions at once, or from inside the object, so the heat energy is evenly distributed over the object’s surface. For example, objects with atmospheres are heated by energy that the atmosphere radiates back down towards the surface. (This is the mechanism that causes the greenhouse effect leading to the climate crisis here on real-life Earth.)

All these contributions to the heating of an object are listed in the Energy Flow section, and can be seen by expanding the Energy Absorption Rate property (by selecting the list icon on the right side of the property).

Temperature Simulation in Two Dimensions

The properties in the Energy Flow section are used to estimate the change in the object’s Average Surface Temperature, a single value that represents the temperature of the object as a whole. The Surface Grids feature also allows us to simulate this energy flow and heating process at every point on an object’s surface. You can see the object’s 2D temperature map at the top of the Surface tab. Hovering over a pixel on the map will display the temperature at that point.

This temperature map is especially useful for seeing the effects of directional heating. For example, selecting Tidally Lock in an object’s Motion tab will change the object’s rotation period such that one side of the object always faces its star and the other always faces away from the star. If we tidally lock the Earth, the hemisphere facing away from the Sun will get so cold that the ocean freezes over, while the side facing the Sun gets uncomfortably warm. Even though the Earth as a whole is receiving the same amount of energy from the Sun, the conditions on the surface, simulated by Surface Grids, have changed a lot!

A tidally-locked Earth, spinning so slowly that one side always faces the Sun and the other always faces away. The “night” side gets so cold that it freezes over, while the “day” side continues to heat in the constant, direct sunlight.

This blog post is the first in our new series of ScienceLog articles, intended to share the science behind some of Universe Sandbox’s most interesting features. If you would love to learn about the real-life science powering our simulator, please stay tuned and let us know what you would like to read about next.

To join our community discussions, please join us on our Steam Forum and our official Discord community.

## SPH Fluid Simulation | DevLog

Video: Simulating a planetary collision using a new method called smoothed-particle hydrodynamics (SPH).

Hopefully by now you’ve had time to check out Surface Grids & Lasers | Update 24 of Universe Sandbox. If you haven’t, time to get out from that rock you’ve been living under and start terraforming all those other rocks floating through space.

We plan to continue to add to the Surface Grids feature with even more detailed surface simulation through next year and beyond. Surface Grids is a massive new feature that changes a lot with the core simulation of objects in Universe Sandbox, and so far we’ve just scratched the surface of what it can do. We’re excited to explore its possibilities even more.

But right now, let’s turn our attention to something our physics developer, Alexander, has been working on. Introducing… smoothed-particle hydrodynamic fluid simulation. Let’s just call it SPH for now.

SPH is NOT included in Universe Sandbox yet. This is a behind-the-scenes look at a feature that we are still working on.

## What is SPH and how does it work?

For a deep dive into the mechanics of SPH, check out this paper from our very own physics developer, written back in 2010 (interestingly, not written in relation to Universe Sandbox, but for another project that was similar in many ways — there’s a reason why we hired him many years ago to help build this new version of Universe Sandbox, and it had more to do with relevant experience than it did with his propensity for typos… *wink*).

Or if you’re curious about SPH, but perhaps not curious enough to read 35 pages on it, here’s a crash course:

SPH is a computational method commonly used for modeling fluids (though it can also handle solids). That might make you think that we’d use this for simulating something like water flow on a planet’s surface, but “fluid” here actually has more to do with simulating much larger objects.

On an astronomical scale, many of the objects you can simulate, like stars and galaxies, behave like fluids. This is also true for planets, whether it’s a gas giant or a rocky planet with, or even without, a molten core. And even in the case of large chunks of solid rock colliding with each other, there is such intense temperature and pressure that the materials behave more like fluid rather than rigid solids: they’ll stretch and distort and be torn apart, rather than splinter, crack, and shatter.

So in short, SPH will help create more detailed, realistic simulations of collisions, fragmentation, and formation of different types of objects in Universe Sandbox.

How? First, the material, such as a planet, is broken into a number of “particles” that each have properties such as mass, temperature, velocity, and position. You can see these particles clearly in any of the videos in this post.

But the “smoothed” part of “smoothed-particle hydrodynamics” means that these particles are just sample points of what is actually a continuous material, where they each contribute to the properties at a given point based on a weighted, smoothed, average. Together, they describe the properties that exist at any given point in a flow of material, but they themselves are not the material. Think of it like buoys in an ocean: the buoys will each monitor the properties at their location, and they are distinct from the continuous fluid, ie the ocean, that they are monitoring. So for the future of SPH in Universe Sandbox, the current debugging visuals, where you can see individual particles, will ideally be replaced by something that better represents the continuous fluid that is actually being modeled.

By tracking how each of these particles move, and more importantly how they move in relation to their neighbors, you can calculate pressure and viscosity (friction) at any point in
the fluid. And then you can estimate how this will move over time under different forces. Combine this with gravity and you start to see a simulation with emergent behavior that matches what we observe in real life.

## Why SPH?

Because you get accurate simulation with emergent behavior, rather than disparate modeling of phenomena that needs to be stitched together. For example, with SPH, material will collect under the influence of gravity, but it will not all fall to the center of mass. Instead, as more material collects, the pressure increases and starts pushing out material, preventing a total collapse. The result is a spherical shape, and not because we specifically told it to become a sphere, but because that’s what happens when you simulate physics on a more granular level.

Or look at the case of Roche fragmentation, where a moon may be torn apart from the gravity of its host object “pulling” more on its near side than its far side. In our current simulation, pre-SPH, where we model how single points of mass move purely under the influence of gravity, we need special handling to calculate when and how this should happen, according to analytical models. But with SPH, this phenomenon just happens as the result of forces acting on the moon.

Why SPH specifically and not another method? When simulating space, there is more literal space than there is simulated material. SPH is great for handling cases like this where material is sparse. Other methods instead require simulating each point of space, seeing how each of these points changes (versus tracking only points specifically in a material), which would be very slow for anything like entire star systems.

Universe Sandbox is a unique physics simulator because we aim to make it an accessible, real-time, interactive experience. When compared to non-real-time simulations run on supercomputers, this presents a lot of limitations, and SPH is not immune to these. The biggest issue we will need to navigate as we continue development is the resolution of the model — to be really accurate and demonstrate smaller, local changes, you need a lot of sample points. But each point comes at the cost of a good chunk of computing power. So as with all features in Universe Sandbox, we’ll need to find a balance, with enough points to model things in interesting ways, but not so many that it becomes a slideshow.

## So… what does it do?

Technical explanations are fun (…did I get that right?), but what you really want to know is what does this SPH thing mean for me and my planets? That’s also answered above: it will help create more detailed, realistic simulations of collisions, fragmentation, and formation of different types of objects in Universe Sandbox. But what you really, really want is a bunch of videos of this is in action. Understandable.

Quick disclaimer: SPH is a feature in its early stages of development. Visuals are for debugging purposes. Anything shown many not be representative of how it’ll appear and behave when included in an official Universe Sandbox update.

Two equal-sized bodies showing pulsating behavior as pressure and gravity tries to find a balance.

Two earths spinning the same direction and colliding. The result is a combined body with non-zero angular momentum from the individual momentums adding together in the same direction.

Increasing the density and speed of Mars before it impacts Earth and shoots right through it.

The existing simulation “Earth & Moon x25 Offset” showing all Earths collapsing and combining.

Results of the Moon fragmenting around Earth.

So in short, SPH will improve or make possible simulations of the following:

• Total fragmentation
• Tidal deformation and Roche fragmentation
• Accretion disks / object formation from debris
• Giant-impact hypothesis (moon formation!)

And in the longer term, we hope to apply it elsewhere, including more accurate galaxy collisions and star formation.

## What’s Next

As you can see, SPH is already working pretty well within Universe Sandbox. But you can also see that it’s not exactly integrated with everything else yet. The visuals right now are intended solely for debugging purposes, and the transition from our standard planet visuals to the SPH particles is a little rough. Making visuals that look more like molten planets being torn apart will definitely take time, but we have some ideas in mind that we’re excited to explore.

The visuals are just one component of what we’ll need to work on to integrate SPH with Universe Sandbox. Making it work with other complex aspects of the simulation, like the new Surface Grids feature, will be its own can of worms. But we’re no strangers to technical challenges. And since we think SPH is worth experimenting with on its own, we hope to release an early version of it using the debug visuals and let you turn it on if you’re interested in checking it out. We don’t know when this will happen yet, but hopefully not too long into next year.

And hopefully before then, we’ll have a small update ready that will add some oft-requested color customization…

## Saturn’s New Moons | Update 23.2

Run Steam to download Update 23.2, or buy Universe Sandbox via our website or the Steam Store.

Introducing the new Moon Champion of the Solar System, with a total of 82 known moons, it’s the great ringed gas giant Saturn!

Take a tour through the discoveries of Saturn’s moons, from the first discovered moon, Titan, in 1655, to the latest discovery of 20 new moons in October 2019:

Home > Guides > Science > History of Saturn’s Moons

With 82 moons, Saturn now has the most known moons, surpassing the previous record holder Jupiter and its 79 known moons.

This update also includes a refresh of our database and Saturn simulations to add its new moons, plus a few smaller fixes and improvements.

Check out a full list of What’s New in Update 23.2

## Dark Matter & Galaxies in Universe Sandbox

You may notice that our new galaxy model (added in Update 23, released on June 25, 2019) no longer includes those bright red dots. The dots were how we represented dark matter in the old galaxy model (pre-Update 23), but we’ve decided not to include dark matter in the new model, for a number of reasons.

## Short Explanation

Here’s the TL;DR explanation of why we removed dark matter in our new galaxy model:

Dark matter is a theoretical particle proposed to explain the unexpected motion of stars in galaxies. Due to performance constraints, our simplified galaxy dynamics model can’t simulate these complex orbits, so we’ve decided to remove dark matter from our simulations for now.

If you’re looking for a more in-depth explanation, keep reading!

Left: Spiral galaxy with dark matter (pre-Update 23). Right: Spiral galaxy in Update 23.

## What is dark matter?

No one knows for sure what dark matter is, or even if it exists! But a number of different observations of our universe have revealed stars and galaxies moving under the gravitational influence of more mass than we can see. This hints at the presence of some kind of matter that affects stars and other bodies via gravity, but that can’t be observed directly. This proposed “dark matter” doesn’t produce light, but it also doesn’t block it, or we would be able to see it silhouetted against brighter stars and galaxies in the background (like we can see dust in the Milky Way).

We don’t know of a type of particle that has mass but that doesn’t interact with light, but a few ideas have been proposed. It may be a new type of particle that we haven’t discovered yet, and several ongoing experiments are trying to directly detect such a particle. Some scientists argue that dark matter does not exist at all, and that the “missing mass” in astronomical observations simply indicates that our mathematical description of gravity is not yet complete.

## What does this have to do with galaxies?

Spiral galaxies were one of the first examples of the missing mass problem. Astronomers discovered the problem while calculating the “rotation curve” for these galaxies: a plot of the velocity of a star orbiting in the galaxy, versus the distance of that star to the center of the galaxy. The speed at which an object orbits in space is related to the mass of everything inside its orbit, and the distance to the center of the orbit. In the Solar System, nearly all of the mass inside a planet’s orbit is made up of the mass of the Sun, so the difference in speeds of planet orbits is due mostly to their distance from the Sun. Thus, the rotation curve of planets in the Solar System starts with the high speed of Mercury’s orbit, and then drops off as you move outwards to Venus, Earth, and the rest of the planets.

But in a galaxy, most of the mass is distributed among the stars that make up the galaxy, so stars farther from the center are orbiting more mass than stars closer in. We can estimate the distribution of mass based on the stars that we see, and predict a slightly more complicated curve: First, the velocities of orbiting stars should increase as you move away from the center, as more and more mass is enclosed by the orbit. But eventually, the extra mass inside the orbit won’t be enough to make up for the increased distance from the center, and the velocities will start to decrease again. The predicted curve has a sort of hump shape, with a long, decreasing tail.

Rotation curve of the galaxy M33. The yellow and blue dots indicate the data, while the dashed line represents the curve you would expect based on the amount of visible mass in the galaxy. Instead, the velocity increases with distance, indicating that more mass is present than we can see. Credit: Mario De Leo

But when astronomers actually measure these velocities and create rotation curves of spiral galaxies, the curves don’t drop off with distance. Instead, the velocities get faster and faster as you move outwards, with stars on the outer edges moving so fast that you would expect them to fly off, pulling the galaxy apart. One explanation for this discrepancy is that some kind of unseen mass (“dark matter”) may be present in spiral galaxies, keeping those stars gravitationally bound to the galaxy despite their high speeds.

## Dark matter in Universe Sandbox

Since Universe Sandbox is at its core a gravity simulator, we tried to show the influence of dark matter in our previous galaxy model. For a given galaxy, we would calculate the distribution of dark matter that we would expect based on real observations of galaxy rotation curves. Specifically, we used what’s called the Navarro-Frenk-White (NFW) profile, after the astronomers who identified the distribution. We simulated the dark matter as points of mass scattered through the galaxy, and displayed them as bright red dots (because dark matter is invisible, we wanted to make it clear that we weren’t showing what dark matter “really” looks like!).

This model would give the “right” distribution of dark matter in a galaxy, but it couldn’t reproduce the most important feature of dark matter in galaxies: the rotation curve. This is because of the way that galaxy simulation works in Universe Sandbox.

## How galaxies are simulated in Universe Sandbox

In both the old and the new versions of our galaxy model, we represent the galaxy as a collection of non-attracting particles orbiting a single attracting body, the black hole at the center. Each particle represents a cloud of gas, dust, and stars, which we call a nebula. This means that to our physics engine, the nebulae have zero mass, and the only gravity in the galaxy comes from the black hole.

But wait, earlier we said that the mass in a galaxy is spread out among all the stars in the galaxy, instead of being concentrated in the center like the Solar System. Why don’t we make all the nebulae into attracting particles? This would certainly make the motion of the galaxy more accurate, but in any gravity simulator, the number of attracting particles significantly affects performance. (You can see this for yourself by opening a simulation with a lot of attracting bodies, like Earth & 50 Moons.) To make galaxies look as good as they do, we need to use hundreds or even thousands of nebulae. A simulation with a thousand attracting particles would run extremely slowly even on a very powerful gaming computer. So instead, we used a simplified model of non-attracting nebulae orbiting an attracting black hole.

In the old version of galaxies, nebulae moved on circular orbits around the black hole, and the initial structure of a galaxy, whether it was a spiral or elliptical, would quickly lose its distinctive shape. In our upgraded version, nebulae are given specific orbits to allow the galaxy to hold its shape over time. The presence of another attracting body besides the black hole will pull the galaxy out of shape. (You can watch this happen in any galaxy collision simulation, or just by adding multiple galaxies to one of your own simulations!) During the development of this upgrade, we realized that adding attracting particles to represent dark matter would make it difficult to maintain the shape of spiral and elliptical galaxies for the same reason.

Because we are using a simplified galaxy model, we can’t reproduce the galaxy rotation curves we would expect either with or without dark matter. Instead, the rotation curves for our galaxies look more like the Solar System’s: the velocities of the nebulae drop off quickly as you move outwards from the center. Since this model can’t demonstrate the major effect of dark matter in galaxies, we decided to remove it for now.

We are hoping that a future version of galaxies will use computational methods like Smoothed-Particle Hydrodynamics (SPH) that will allow us to simulate hundreds to thousands of attracting nebulae orbiting the galaxy. This even more accurate model will be able to produce realistic galaxy rotation curves, and at that point, we’ll add dark matter back in so users can see its observable effect. In the meantime, we hope you enjoy our improved, interactive galaxy model!

## Super Bowl of Astronomy

In early January we gathered some of our team in Seattle, Washington to show off Universe Sandbox at the 233rd meetup of the American Astronomical Society (AAS).

We’ve attended other conferences before that focus on video games, like PAX, but AAS gave us an opportunity to show Universe Sandbox to a different crowd. If you are a researcher, educator, science journalist, or student in the world of astronomy, then AAS is the go-to conference, what some call the “Super Bowl of Astronomy.” And while the government shutdown meant that hundreds of NASA employees who planned on attending couldn’t go, there was still plenty of folk there who had never heard of Universe Sandbox and wanted to learn more.

## Come for the Collisions, Stay for the Accurate Mass Loss

Drawing people into our booth was helped a bit by two gigantic TVs showing off some of the usual Universe Sandbox scenarios — you know the ones: Earth melting, stars exploding, moons ripping apart under massive tidal stress.

But what made many attendees stick around and talk to us was the fact that what we were showing not only looked great, but it was also based in science. Universe Sandbox: Come for the fiery collisions, stay for the accurate mass loss when Ceres makes a near pass of a white dwarf!

## Communicating with Universe Sandbox

In talking to AAS attendees, we hoped to show the potential for using Universe Sandbox for education and visualizations. While most Universe Sandbox players know and appreciate how useful it can be as an educational tool, we want to make sure it gets used in actual classrooms. We believe Universe Sandbox makes it quick and easy to demonstrate astronomy and physics concepts with intuitive and interactive experiments. But don’t take our word for it — here’s astronomy YouTuber Scott Manley with a similar message.

And beyond the classroom, it’s just as quick and easy to use Universe Sandbox for creating visualizations for research, lectures, and articles. There are more sophisticated tools for gathering data with the accuracy needed for research, but there’s nothing quite as convenient as Universe Sandbox for then using the data to create a visual representation, as shown here with the discovery of exoplanets around our nearby star Wolf 1061.

If you’re an educator, a researcher, or are otherwise curious how you can use Universe Sandbox for science communication, please get in touch!

## New Year, New Limits of our Solar System for New Horizons

Happy New Year!

While we celebrate one more trip of our beautiful planet around the Sun, the spacecraft New Horizons sets a record for traveling to the most distant object in our Solar System ever visited, 2014 MU69, nicknamed “Ultima Thule.” This object is currently 1 billion miles beyond Pluto, or more than 43 AU from the Sun, which means it is more than 43 times the distance between the Earth and the Sun. New Horizons is expected to make its closest approach to Ultima Thule shortly after midnight EST January 1, 2019.

Check out the flyby in Universe Sandbox:

Home > Open > New Horizons Ultima Thule Encounter in 2019

## New Limits for New Horizons

After the record-setting 2015 flyby of Pluto and its moons, the New Horizons spacecraft continued its journey through the outer reaches of the Solar System. In that same year, NASA selected a new target for New Horizons to observe: a Kuiper Belt object discovered by the Hubble Space Telescope the year earlier, known as 2014 MU69. Unofficially named Ultima Thule in 2018 based on a public vote, this object will be the most distant ever visited by a human spacecraft (breaking the record New Horizons itself set when it flew past Pluto).

The team says it hopes to set a new target for New Horizons once it passes Ultima Thule. With plenty of remaining fuel and equipment and instruments that remain in good condition, New Horizons is all set to head toward another distant object in the Kuiper Belt, arriving sometime in the 2020s, the team said.

## Simulation Limitations

Simulations in Universe Sandbox are not perfect representations of reality. Rather, they’re meant to provide a visual — and as a result, a more intuitive understanding — of what is happening farther away than we can see or even imagine. With that in mind, there are a couple of limitations currently in this simulation:

1 –  Trajectory

The trajectory shown is according to the NASA Jet Propulsion Laboratory’s orbital predictions as of September 2018. Additional maneuvering with thruster burns is expected, which would change the final trajectory. New Horizons will make an approach much closer than is represented in the simulation: it should pass about 3,500 km from 2014 MU69. Once actual trajectories have been recorded, we will update the simulation.

2 – Shape

Previous observations show that 2014 MU69 is likely not spherical, but rather cigar-shaped. Researchers suspect that Ultima Thule may even be two separate bodies that are either orbiting very closely as a binary or actually touching each other, which is called a contact binary. We should know more once New Horizons sends back data from its flyby! Right now, Ultima Thule is represented in Universe Sandbox as just a single, spherical body.

## Other Far Out Objects

Update 22.1 of Universe Sandbox added three other simulations that feature very distant objects in our Solar System.

1 – Voyagers 1 & 2 in Interstellar Space

In November 2018, more than 40 years after its launch, and long since trips past Jupiter, Saturn, Uranus, and Neptune, the Voyager 2 probe entered interstellar space. It now joins its twin, Voyager 1, in exploring beyond our Solar System. They are expected to continue to send back data until they run out of power in 2025.

Home > Open > Voyagers 1 & 2 Start 2019 Outside the Solar System

2 – 2018 VG18, “Farout”

On December 17, 2018, astronomers announced the discovery of the most distant known object in the Solar System, 2018 VG18. Nicknamed “Farout” (can you guess why they chose that name?), the trans-Neptunian object is currently around 120 AU (1 AU is the distance from the Sun to the Earth) from the Sun. While this object is the most distant ever observed, there are other known objects, like Sedna and the Goblin (see below), that have orbits that take them much farther from the Sun.

Farout’s orbit shown in this simulation is a preliminary estimate; its distance means it will take years of observation before its precise orbit is known.

Home > Open > 2018 VG18: The Most Distant Object in the Solar System

3 – 2015 TG387, “The Goblin”

On October 1, 2018, astronomers announced the discovery of the trans-Neptunian object 2015 TG387, which they nicknamed “The Goblin.” It was observed at about 80 AU from the Sun, but because of its extremely elongated orbit, it likely travels to a distance of more than 2300 AU at its farthest point.

Home > Open > 2015 TG387: A Goblin at the Edge of the Solar System