<p>In order to describe a 3D kinetic system of particles (like planets or stars when only looking at gravitational interaction), you need knowledge of 6 independent variables, that is most commonly both : all their spacial coordinates and all their velocities. Thee are other coordinates in use when describing orbits around a known star, like semi major axis, point of ascending node, inclination or orbital period.</p>
<p>Dust and gas is also just particles, but many particles, especially the gas. So you easier treat them as continuum to account for pressure and hydrodynamic effects. You will also need to simulate other physics to account gas (disc) and planet interactions, e. g. drag or magnetic fields of the gas is ionised,or interaction of light with gas and dust.</p>

CC BY-SA 4.0
2021-10-28T06:23:24.877Z
2021-10-28T06:23:24.877Z
planetmaker
<p>I will try and be brief with this. I want to model a star system in a programming language. It has been a very long time since I did physics.</p>
<p><a href="https://coolcosmos.ipac.caltech.edu/ask/197-How-do-the-planets-stay-in-orbit-around-the-sun-" rel="nofollow noreferrer">This</a> says that planets have a speed given to them by the dust and gas that were orbiting the star, but I don't understand how that gas and dust get their orbital velocity. This will play a role in my following observation.</p>
<p>At first I thought &quot;okay I just need <span class="math-container">$m$</span>, <span class="math-container">$M$</span>, and <span class="math-container">$r$</span> (since <span class="math-container">$G$</span> is a constant that we know). But do I need <span class="math-container">$m_v$</span>?&quot;</p>
<p>If we assume for the sake of simplicity that we have a system that is 2D, that there's only the central star and an orbiting planet and nothing else in the universe, and both masses have zero velocity/acceleration, then I figure the planet and star would just fall towards each other using <a href="https://en.wikipedia.org/wiki/Newton%27s_law_of_universal_gravitation" rel="nofollow noreferrer">Newton's Universal Law of Gravitation</a>, and that simulation would end that quickly.</p>
<p>This means that an initial velocity is important for the planet, because like satellites that orbit Earth, we need some kind of velocity to keep them up as the pull of gravity allows the satellite to maintain its orbit if it's going fast enough.</p>
<p>Does this mean I would need <span class="math-container">$m$</span>, <span class="math-container">$M$</span>, <span class="math-container">$G$</span>, <span class="math-container">$r$</span>, and some <span class="math-container">$m_v$</span>, and then I could run a basic simulation?</p>
<p>Or are there more things that I need?</p>
<p>There are <a href="https://openstax.org/books/university-physics-volume-1/pages/13-5-keplers-laws-of-planetary-motion" rel="nofollow noreferrer">Kepler's Laws</a> which I could use, but I don't know if they require an acceleration like <span class="math-container">$m_a$</span> as well and I've got 7 variables now that I must start off with, or if that is something else that I need.</p>
<p>But this raises another question, what gives the dust and gas for a proto-star it's orbital speed? How do I know that whatever causes <em>that</em> movement is not something that starts the orbit of a planet in some star system? Because if that is the case, then maybe I don't need an <span class="math-container">$m_v$</span> or <span class="math-container">$m_a$</span> after all. Problem is, I don't know.</p>

CC BY-SA 4.0
2021-10-28T01:39:37.433Z
Yes, you need an initial velocity. A planet's orbit is fairly circular, so its orbital speed is approximately equal to the speed of a perfectly circular orbit, $v^2=G(M+m)/r$. For an elliptical orbit, you can use the [vis-viva equation](https://astronomy.stackexchange.com/a/36292/16685).
PM 2Ring
CC BY-SA 4.0
2021-10-28T01:45:54.247Z
How accurate do you want to make this simulation? In a simple sim, you assume that the central star is fixed, and each planet is following a simple Kepler ellipse, with no gravitational interaction between the planets. In a complex sim, you calculate the gravitational force between every pair of bodies in the system.
PM 2Ring
CC BY-SA 4.0
2021-10-30T13:52:35.907Z
@PM2Ring In terms of accuracy, lets say I would like to put in our own solar system for Mercury to Neptune, maybe Pluto to have a really odd orbit in there, and the top 3 largest objects in the asteroid belt, and the major moons from each planet, and my error of positional prediction if I run the simulation for 100 years would be 1% or less.
Water
<orbit><astrophysics>
What are the minimum variables that determines the orbital velocity of a planet?
Water
# What are the minimum variables that determines the orbital velocity of a planet?

(Asked by: username_0 on 2021-10-27)

I will try and be brief with this. I want to model a star system in a programming language. It has been a very long time since I did physics.

[This](https://coolcosmos.ipac.caltech.edu/ask/197-How-do-the-planets-stay-in-orbit-around-the-sun-) says that planets have a speed given to them by the dust and gas that were orbiting the star, but I don't understand how that gas and dust get their orbital velocity. This will play a role in my following observation.

At first I thought "okay I just need $m$, $M$, and $r$ (since $G$ is a constant that we know). But do I need $m\_v$?"

If we assume for the sake of simplicity that we have a system that is 2D, that there's only the central star and an orbiting planet and nothing else in the universe, and both masses have zero velocity/acceleration, then I figure the planet and star would just fall towards each other using [Newton's Universal Law of Gravitation](https://en.wikipedia.org/wiki/Newton%27s_law_of_universal_gravitation), and that simulation would end that quickly.

This means that an initial velocity is important for the planet, because like satellites that orbit Earth, we need some kind of velocity to keep them up as the pull of gravity allows the satellite to maintain its orbit if it's going fast enough.

Does this mean I would need $m$, $M$, $G$, $r$, and some $m\_v$, and then I could run a basic simulation?

Or are there more things that I need?

There are [Kepler's Laws](https://openstax.org/books/university-physics-volume-1/pages/13-5-keplers-laws-of-planetary-motion) which I could use, but I don't know if they require an acceleration like $m\_a$ as well and I've got 7 variables now that I must start off with, or if that is something else that I need.

But this raises another question, what gives the dust and gas for a proto-star it's orbital speed? How do I know that whatever causes *that* movement is not something that starts the orbit of a planet in some star system? Because if that is the case, then maybe I don't need an $m\_v$ or $m\_a$ after all. Problem is, I don't know.

**Tags:** orbit, astrophysics
> **Comments:**
> **username_1**: Yes, you need an initial velocity. A planet's orbit is fairly circular, so its orbital speed is approximately equal to the speed of a perfectly circular orbit, $v^2=G(M+m)/r$. For an elliptical orbit, you can use the [vis-viva equation](https://astronomy.stackexchange.com/a/36292/16685).  
> **username_1**: How accurate do you want to make this simulation? In a simple sim, you assume that the central star is fixed, and each planet is following a simple Kepler ellipse, with no gravitational interaction between the planets. In a complex sim, you calculate the gravitational force between every pair of bodies in the system.  
> **username_0**: @PM2Ring In terms of accuracy, lets say I would like to put in our own solar system for Mercury to Neptune, maybe Pluto to have a really odd orbit in there, and the top 3 largest objects in the asteroid belt, and the major moons from each planet, and my error of positional prediction if I run the simulation for 100 years would be 1% or less.  

---

## 1 answers

### Answer by username_2 on 2021-10-28. Score: 2

In order to describe a 3D kinetic system of particles (like planets or stars when only looking at gravitational interaction), you need knowledge of 6 independent variables, that is most commonly both : all their spacial coordinates and all their velocities. Thee are other coordinates in use when describing orbits around a known star, like semi major axis, point of ascending node, inclination or orbital period.

Dust and gas is also just particles, but many particles, especially the gas. So you easier treat them as continuum to account for pressure and hydrodynamic effects. You will also need to simulate other physics to account gas (disc) and planet interactions, e. g. drag or magnetic fields of the gas is ionised,or interaction of light with gas and dust.


---

