Temperature Calculation

At every time step during the simulation, Universe Sandbox calculates the change in the surface temperature across the surface of every Planetary Body, Star, Black Hole, Fragment, and Human-Scale Object in the simulation. These calculations consider the effects of incoming heat from sources like nearby stars, the effects of cooling, and the spread of heat across the surface of the object.

## Related Properties & Settings

### Properties

* The temperature of each point on a Planetary Body object's surface can be seen by hovering over that spot on the Temperature surface map.
* The Average Temperature or Surface Temperature property of an object represents the average temperature over the entire surface of the object.
* The Minimum Temperature and Maximum Temperature represent the lowest and highest temperatures on the Temperature map, respectively.
* Several properties related to the movement of energy into and out of the object, and the effect of this energy flow on temperature, are listed in the Energy Flow section of the object's properties panel.

### Settings

* Tidal Heating can be turned off or increased in the Sim Settings Menu.
* Collision Heating can be turned off in the Sim Settings Menu.
* The Heat Diffusion Rate can be set in the Sim Settings Menu, or using the Heating button in the Sim menu in the bottom bar.

## Models

### Energy Flow

The temperature of an object depends on the flow of energy in and out of the object. The rate at which energy is absorbed and radiated by the object, also known as the power, will affect the rate at which the temperature changes.

For each object, or each point on the surface map of a Planetary Body object, Universe Sandbox performs the following calculations in each time step. First, Universe Sandbox calculates the rate of energy absorbed from various sources in the simulation (listed below). The total Energy Absorption Rate, or absorption power, is the sum of the the rates from each source:

P

a
b
s

=

P

f
u
s
i
o
n

P

s
t
a
r
s

P

a
t
m
o

P

t
i
d
a
l

P

n
o
v
a

P

c
l
o
u
d
s

.

{\displaystyle P\_{abs}=P\_{fusion}+P\_{stars}+P\_{atmo}+P\_{tidal}+P\_{nova}+P\_{clouds}.}

The power absorbed by an object can come from a number of sources, including:

* Fusion Heating due to fusion inside stars and larger planets
* Stellar Heating from stars in the simulation
* Atmosphere Heating from the object's atmosphere radiating heat back towards the surface
* Tidal Heating created by internal tidal forces from gravity
* Supernova Heating from supernovae in the simulation
* Supernova Drag Heating due to friction from passing Supernova Cloud objects

In each time step, each object or point on the object's surface will also radiate energy out into space. The Energy Radiation Rate, or radiation power, is calculated from the temperature of the object or point using the Stefan-Boltzmann law:

P

r
a
d

=
σ

T

4

4
π

R

2

,

{\displaystyle P\_{rad}=\sigma T^{4}4\pi R^{2},}

where σ is the Stefan-Boltzmann constant and *R* is the radius of the object.

### Surface Temperature

The change in the temperature of each object or point on the object's surface, Δ*T*, is calculated using the Energy Absorption Rate, *Pabs*, the Energy Radiation Rate, *Prad*, the time step, Δ*t*, and the object's Surface Heat Capacity, *C*, using

**Failed to parse (SVG with PNG fallback (MathML can be enabled via browser plugin): Invalid response ("Math extension cannot connect to Restbase.") from server "https://wikimedia.org/api/rest\_v1/":): {\displaystyle \Delta T = (P\_{abs} - P\_{rad})\Delta t / C. }**

The Surface Temperature of Stars, Black Holes, Fragments, and Human-Scale Objects is calculated at each time step using this change in temperature.

On the surfaces of Planetary Bodies, heat flows from areas of high temperature to areas of low temperature, so the heat in a single point on the surface map of a Planetary Body object may spread or diffuse into nearby points, and the heat in those points may spread to the first point. Universe Sandbox calculates this diffusion by using the FTCS method to solve the heat equation. The speed of diffusion, which in reality depends on the material that makes up the surface, is determined by the simulation's Heat Diffusion Rate. The temperatures of each point on the surface map are then corrected based on the results of this diffusion calculation.

The Average Temperature of a Planetary Body object is then calculated by averaging the surface temperatures of each point on the surface, weighted by the area of each point.

### Equilibrium and Effective Temperatures

As described above, the change of temperature in each time step depends on the flow of energy into and out of the object. When the absorbed power exactly equals the radiated power, the object is in thermal equilibrium, and its temperature will not change. Since the radiated power depends on the temperature of the object, there is a certain temperature where this equilibrium occurs,

T

e
q

{\displaystyle T\_{eq}}

. At the Equilibrium Temperature, the radiated power equals the absorbed power:

P

r
a
d

=

P

a
b
s

{\displaystyle P\_{rad}=P\_{abs}}

**Failed to parse (SVG with PNG fallback (MathML can be enabled via browser plugin): Invalid response ("Math extension cannot connect to Restbase.") from server "https://wikimedia.org/api/rest\_v1/":): {\displaystyle \sigma T\_{eq}^4 4 \pi R^2 = P\_{fusion} + P\_{stars} + P\_{atmo} + P\_{tidal} + P\_{nova} + P\_{clouds}}**

The Effective Temperature is the equilibrium temperature that the object would have if it were a perfect blackbody. In the case of the Universe Sandbox simulation, this means the equilibrium temperature the object would have without an atmosphere:

**Failed to parse (SVG with PNG fallback (MathML can be enabled via browser plugin): Invalid response ("Math extension cannot connect to Restbase.") from server "https://wikimedia.org/api/rest\_v1/":): {\displaystyle \sigma T\_{eff}^4 4 \pi R^2 = P\_{fusion} + P\_{stars} + P\_{nova} + P\_{tidal} + P\_{clouds}}**

If the object does not have an atmosphere, the Equilibrium Temperature will equal the Effective Temperature.

## Limitations

### Heating/Cooling

The rate at which an object radiates energy into space depends strongly on its temperature (in fact, it depends on temperature to the fourth power). But the rate at which the temperature changes depends on the energy radiation rate. This makes it challenging to accurately predict what the temperature of an object will be far in the future. Instead, Universe Sandbox approximates the temperature change as a linear change in each time step. This is similar to how Universe Sandbox approximates the motion of objects as being linear in each time step in the N-Body Simulation. As with the N-body simulation, this approximation works best for small time steps and slow rates of change.

At large time steps and/or large heating and cooling rates, the temperature calculations described above will become less accurate. Most notably, the errors in the temperature calculations for each point may affect the Average Surface Temperature, leading to errors in the Heating Rate.

### Heat Diffusion

The simulation of heat spreading from hotter regions of the surface to cooler regions also depends on the time step. At higher time steps, the FTCS method that Universe Sandbox uses to solve the heat equation becomes unstable and extremely inaccurate. At these higher time steps, Universe Sandbox will artificially lower the speed of heat diffusion to avoid instability in the solution.