<p>As noted by @MikeG in this <a href="https://astronomy.stackexchange.com/questions/26803/is-a-general-relativity-approximation-available-in-universe-sandbox-1-or-2#comment46449_26803">comment</a>, the Universe Sandbox 2 <a href="http://universesandbox.com/faq/#sim" rel="nofollow noreferrer">FAQ</a> addresses the question, but not in a satisfying or helpful way:</p>
<blockquote>
<p><strong>Does it account for relativity?</strong></p>
<p>No, the physics in Universe Sandbox² is currently only <a href="https://en.wikipedia.org/wiki/Classical_mechanics" rel="nofollow noreferrer">Newtonian</a>.</p>
<p>Why? The short answer is that <strong>you need a supercomputer to accurately simulate general relativity</strong>. (emphasis added)</p>
<p>Jenn, astrophysicist and Universe Sandbox² developer, <a href="http://universesandbox.com/blog/2016/02/gravitational-waves/" rel="nofollow noreferrer">explains more in a blog</a> post: &quot;General relativity requires simulating the spacetime itself. That is, taking your simulation space, discretizing it to a hi-res 3-D grid and checking the effect that each and every point in that grid has on all neighboring points at every timestep. Instead of simulating N number of bodies, you are simulating a huge number of points. You start with some initial data of the shape of your spacetime and then see how it evolves according to the Einstein equations, which are 10 highly non-linear partial differential equations.&quot;</p>
</blockquote>
<p><strong>Why do I say this is not very satisfying or helpful?</strong></p>
<p>Because it's quite easy to <em>nearly completely account</em> for General Relativity (GR) effects in the orbits of solar system bodies just by adding some terms to the <a href="https://en.wikipedia.org/wiki/Ordinary_differential_equation" rel="nofollow noreferrer">ODE</a>s that are integrated to propagate orbits.</p>
<p>Answers to the question <a href="https://space.stackexchange.com/q/23408/12102">How to calculate the planets and moons beyond Newtons's gravitational force?</a> (including mine) show how this is done all the time. I reproduced what's normally done in Python rather than in a compiled language for transparancy, it would be much faster if included in a reasonable simulator implementation.</p>
<p>As <a href="https://space.stackexchange.com/a/23409/12102">explained here</a>, to the Newtonian acceleration given by:</p>
<p><span class="math-container">$$\mathbf{a_{Newton}} = -GM \frac{\mathbf{r}}{|r|^3},$$</span></p>
<p>You can just add this expression:</p>
<p><span class="math-container">$$\mathbf{a_{GR}} = GM \frac{1}{c^2 |r|^3}\left(4 GM \frac{\mathbf{r}}{|r|} - (\mathbf{v} \cdot \mathbf{v}) \mathbf{r} + 4 (\mathbf{r} \cdot \mathbf{v}) \mathbf{v} \right),$$</span></p>
<p>To get close, you certainly don't need to evaluate these GR terms for every pair of objects. Interaction between the Moon and Ceres for example could still be Newtonian.</p>
<p>All approximations are approximate. The FAQ's suggestion that they don't do it because you need a supercomputer to be accurate is slightly misleading. Using this straightforward approximation is <em>much better</em> than not using it in this context.</p>
<p>Yes for <em>Gravitational Waves</em>, collapses, and other effects &quot;requires simulating the spacetime itself. That is, taking your simulation space, discretizing it to a hi-res 3-D grid and checking the effect that each and every point in that grid has on all neighboring points at every timestep&quot; but just adding the major GR effects to the propagation of solar system bodies certainly doesn't need anything more than  whatever computer you are already running your copy of Universe Sandbox 2 on already.</p>
<p><strong>EDIT:</strong></p>
<p>The FAQ answer continues:</p>
<blockquote>
<p>We are, however, interested in adding in a few features which would address some effects of relativity. One example is setting gravity to travel at the speed of light, instead of instantaneously taking effect as it currently does. You can read more about these in Jenn's blog post: <a href="http://universesandbox.com/blog/2016/02/gravitational-waves/" rel="nofollow noreferrer">Gravitational Waves &amp; Universe Sandbox².</a></p>
</blockquote>
<p>I had thought so as well, but according to @DavidHammen's <a href="https://space.stackexchange.com/a/21472/12102">thoughtful answer</a> this is probably not so. I haven't tested this yet, but since this comes from a reliable source, I tend to believe it. Retarding gravity alone, without these other terms, seems to be the <em>wrong thing to do</em> in this case.</p>

CC BY-SA 4.0
2018-07-02T08:05:02.373Z
2018-07-02T08:14:21.937Z
2020-06-17T09:47:40.653Z
uhoh
<p><a href="https://astronomy.stackexchange.com/a/16396/7982">This answer</a> points out that including General Relativity in a simulation can be computationally intensive and may not be present in Universe Sandbox.</p>

<p>However, answers to <a href="https://space.stackexchange.com/q/23408/12102">How to calculate the planets and moons beyond Newtons's gravitational force?</a> discuss approximations that go most of the way toward including main GR effects in a <em>typical</em> solar system simulation where the effects are small.</p>

<p>Are there any options to "turn on" an approximation to GR in Universe Sandbox and/or Universe Sandbox 2? Or plans to add it later? And to double check, is it absolutely certain that only Newtonian mechanics is used currently for propagating orbits?</p>

CC BY-SA 4.0
2018-06-29T02:22:57.807Z
See [their FAQ](http://universesandbox.com/faq/#sim).
Mike G
CC BY-SA 4.0
2018-06-29T04:29:02.373Z
@MikeG thanks! Why don't you (or someone else) consider posting a short answer with that, and I can accept it.
uhoh
CC BY-SA 4.0
2018-07-02T08:05:32.997Z
@MikeG I've gone ahead and posted an answer. Thanks for the tip!
uhoh
<space><n-body-simulations><universe-sandbox>
Is a General Relativity approximation available in Universe Sandbox (1 or 2)?
uhoh
# Is a General Relativity approximation available in Universe Sandbox (1 or 2)?

(Asked by: username_0 on 2018-06-28)

[This answer](https://astronomy.stackexchange.com/a/16396/7982) points out that including General Relativity in a simulation can be computationally intensive and may not be present in Universe Sandbox.

However, answers to [How to calculate the planets and moons beyond Newtons's gravitational force?](https://space.stackexchange.com/q/23408/12102) discuss approximations that go most of the way toward including main GR effects in a *typical* solar system simulation where the effects are small.

Are there any options to "turn on" an approximation to GR in Universe Sandbox and/or Universe Sandbox 2? Or plans to add it later? And to double check, is it absolutely certain that only Newtonian mechanics is used currently for propagating orbits?

**Tags:** space, n-body-simulations, universe-sandbox

> **Comments:**
> **username_1**: See [their FAQ](http://universesandbox.com/faq/#sim).  
> **username_0**: @MikeG thanks! Why don't you (or someone else) consider posting a short answer with that, and I can accept it.  
> **username_0**: @MikeG I've gone ahead and posted an answer. Thanks for the tip!  

---

## 1 answers

### Answer by username_0 on 2018-07-02. Score: 4 | Accepted answer

As noted by @MikeG in this [comment](https://astronomy.stackexchange.com/questions/26803/is-a-general-relativity-approximation-available-in-universe-sandbox-1-or-2#comment46449_26803), the Universe Sandbox 2 [FAQ](http://universesandbox.com/faq/#sim) addresses the question, but not in a satisfying or helpful way:

> **Does it account for relativity?**
>
> No, the physics in Universe Sandbox² is currently only [Newtonian](https://en.wikipedia.org/wiki/Classical_mechanics).
>
> Why? The short answer is that **you need a supercomputer to accurately simulate general relativity**. (emphasis added)
>
> Jenn, astrophysicist and Universe Sandbox² developer, [explains more in a blog](http://universesandbox.com/blog/2016/02/gravitational-waves/) post: "General relativity requires simulating the spacetime itself. That is, taking your simulation space, discretizing it to a hi-res 3-D grid and checking the effect that each and every point in that grid has on all neighboring points at every timestep. Instead of simulating N number of bodies, you are simulating a huge number of points. You start with some initial data of the shape of your spacetime and then see how it evolves according to the Einstein equations, which are 10 highly non-linear partial differential equations."

**Why do I say this is not very satisfying or helpful?**

Because it's quite easy to *nearly completely account* for General Relativity (GR) effects in the orbits of solar system bodies just by adding some terms to the [ODE](https://en.wikipedia.org/wiki/Ordinary_differential_equation)s that are integrated to propagate orbits.

Answers to the question [How to calculate the planets and moons beyond Newtons's gravitational force?](https://space.stackexchange.com/q/23408/12102) (including mine) show how this is done all the time. I reproduced what's normally done in Python rather than in a compiled language for transparancy, it would be much faster if included in a reasonable simulator implementation.

As [explained here](https://space.stackexchange.com/a/23409/12102), to the Newtonian acceleration given by:

$$\mathbf{a\_{Newton}} = -GM \frac{\mathbf{r}}{|r|^3},$$

You can just add this expression:

$$\mathbf{a\_{GR}} = GM \frac{1}{c^2 |r|^3}\left(4 GM \frac{\mathbf{r}}{|r|} - (\mathbf{v} \cdot \mathbf{v}) \mathbf{r} + 4 (\mathbf{r} \cdot \mathbf{v}) \mathbf{v} \right),$$

To get close, you certainly don't need to evaluate these GR terms for every pair of objects. Interaction between the Moon and Ceres for example could still be Newtonian.

All approximations are approximate. The FAQ's suggestion that they don't do it because you need a supercomputer to be accurate is slightly misleading. Using this straightforward approximation is *much better* than not using it in this context.

Yes for *Gravitational Waves*, collapses, and other effects "requires simulating the spacetime itself. That is, taking your simulation space, discretizing it to a hi-res 3-D grid and checking the effect that each and every point in that grid has on all neighboring points at every timestep" but just adding the major GR effects to the propagation of solar system bodies certainly doesn't need anything more than whatever computer you are already running your copy of Universe Sandbox 2 on already.

**EDIT:**

The FAQ answer continues:

> We are, however, interested in adding in a few features which would address some effects of relativity. One example is setting gravity to travel at the speed of light, instead of instantaneously taking effect as it currently does. You can read more about these in Jenn's blog post: [Gravitational Waves & Universe Sandbox².](http://universesandbox.com/blog/2016/02/gravitational-waves/)

I had thought so as well, but according to @DavidHammen's [thoughtful answer](https://space.stackexchange.com/a/21472/12102) this is probably not so. I haven't tested this yet, but since this comes from a reliable source, I tend to believe it. Retarding gravity alone, without these other terms, seems to be the *wrong thing to do* in this case.


---

