Do orbital dynamics scale linearly?

In summary, the user is working on an augmented reality app that displays a sample solar system, but is having trouble scaling the solar system model to support the AR functionality. They have a planet in the center and smaller planets orbiting around it, but when they scale everything down by 50%, the orbits become unstable and the smaller planets crash into the center planet. The user is wondering if a solar system where everything is exactly 50% smaller would still produce stable orbits and if they are missing something with regards to scaling their physical model. They mention the Law of Gravitation and equations for circular motion and centripetal force, but are unsure how to properly scale the mass of the objects in their code. They also mention wanting the orbital
  • #1
Russell Patterson
Insights Author
12
6
I need to scale my solar system model and it's not working. I'm making an augmented reality app that shows a sample solar system rotating. It works great! (Thanks to this $7 program https://assetstore.unity.com/packages/tools/physics/gravity-and-orbits-solar-system-105300 . The Unity engine is free).

However I need to scale my solar system to support the AR functionality. I have a planet in the middle and smaller planets rotating in a semi-stable orbit. When I scale everything down by 50% (the objects, distances, mass, initial velocity) it's no longer a stable orbit. They crash into the center planet within one orbit. Should this work this way?

Would solar system where everything is exactly 50% smaller still produce stable orbits? Am I missing something with regards to scaling my physical model or should I not expect things to scale linearly?

Thanks!
 
Astronomy news on Phys.org
  • #3
Thanks for the cryptic non-answer. It "should" scale linearly or "should not" scale linearly?
 
  • #4
Did you look at the equation? Are you familiar with the equations for circular motion and centripetal force? Not trying to be cryptic -- if you do not know any of these things, it will be hard to explain the answer that you are looking for. It's not a straight scaling for everything all together. You want to scale things so the orbital dynamics look similar.
 
  • #5
BTW, how do you want to scale time in your scaling? Do you want the orbital periods to be the same even though things are smaller? Or can the orbital times scale with the orbital sizes?
 
  • #6
Hi and thanks for your replies. I will study up on circular motion and centripetal force. It's been a while since college physics class.

That's a good point about time. I want the orbital periods to be the same. I just need to be able to scale everything so the user can choose the right size based on their camera distance to the AR solar system I'm rendering.

Here's the code I'm using. The center planet is the only generator. The orbits were too chaotic if I let all the objects interact with each other. The "affected" List contains the rigidbodies of the orbiters.

Do you know how I should scale the mass of the objects?

newMass = orginalMass * scaleFactor; // this doesn't work

newMass = Math.Power(orginalMass * scaleFactor, 3); // cubing the products doesn't work either
JavaScript:
          // for each of the generators we create a force
         for (int ii=0; ii<generators.Count;ii++)
         {
             // for each of the affected objects
             for (int jj=0; jj<affected.Count;jj++)
             {
                 //check that is not the same object
                 if(generators[ii].name!=affected[jj].name)
                 {
                     //we obtain the force value and it vector
                     float distance= (generators[ii].position-affected[jj].position).magnitude;
                     Vector3 directionForce=(generators[ii].position-affected[jj].position)/distance;
                     float forceValue=(generators[ii].mass*affected[jj].mass)/Mathf.Pow(distance,2);

                     Debug.Log("Force "+generators[ii].name+"-->"+affected[jj].name+"  value = "+forceValue);

                     /*debug values for checking the force
                     Debug.Log (distance);
                     Debug.Log (directionForce);
                     Debug.Log (forceValue);
                     */
                     forces [jj] += Gfactor * forceValue * directionForce;
                 }
             }
         }

         // apply force
         for (int jj = 0; jj < affected.Count; jj++)
         {
             if (affected [jj]) {
                 affected [jj].AddForce (forces [jj]);
             }

             //reset force
             forces [jj] = new Vector3 ();
         }
     }
 
Last edited by a moderator:
  • #7
If you reduce all distances by a factor x, all velocities by a factor x and all masses by a factor x3 you should get the same result.
 
  • Like
Likes jedishrfu and berkeman
  • #8
Hi and thanks! That got the scaled down results much closer with the x3 !

I'm still missing something that I should be scaling though, as the 0.5 result orbits are still not stable as the 1.0 scale results. There seems to be too much force and they get sucked towards the center and go elliptical. Should Angular Drag be scaled too? It's a constant now.

The formula from that code is something like:

directionForce = centerPosition / distance;
forceValue = (centerMass * SatelliteMass) / Math.Pow(distance, 2);
force = GFactor * forceValue * directionForce;

Then apply force to the Unity physics engine's rigidbody for each orbiting object.Thanks for fixing the code formatting above!
 
Last edited:
  • #9
What is "angular drag"?

The scaling is designed to keep the laws of physics the same.

If something is "sucked into the center" then something else went wrong, because every scaling should still lead to conic sections (elliptical, circular, parabolic or hyperbolic).

Maybe a problem with the integration method?
 
  • #10
Angular Drag is a setting exposed on the Unity physics engine's Rigidbody component. https://docs.unity3d.com/ScriptReference/Rigidbody-angularDrag.html They also expose mass and drag. I have tried several values for it and it doesn't seem to change the path much. I tried scaling it and not much effect either way.

What do you mean by the integration method? What the Unity physics engine is doing with the force added to the Rigidbody?

I'm not sure what else might need to be scaled. Thanks for your help!
 
  • #11
do you know which ode solver is used by unity for this example?

There are several common ones chosen based on whether things are periodic or not. What sometimes happens is that error is introduced with each iteration either positive or negative. You see it as the planet spiraling inward or outward ie energy added or energy lost. By trying a solver that is geared for periodic motion the energy added and subtracted oscillates keeping the simulation relatively accurate.

Some of the ones I recall are Euler, Euler-Richardson..., Runge-Kutta ala ode45 or ode23...

Eulers method tends to add or take away energy with each iteration but with smaller steps the changes are correspondingly smaller ie it’s more accurate over time. Range-Kutta 4th order always seemed to be the most widely used one. I think it’s stepsize varied during the simulation though.
 
  • #12
I did some Googling and didn't come up with any specific about the Unity solver other than they have one and the recently rewrote the cloth solver.

Here's some info on it: https://docs.unity3d.com/Manual/class-PhysicsManager.html

There are settings for "default solver iterations" set to 6 and "default solver velocity iterations" set to 1.
 
  • #13
Problem solved. It was scaling mass by scaleFactor3 and not scaling the direction vector. Works great at any scale now. Thanks for everyone's help!
 
  • #14
That's great thanks for sharing your answer. It will help future posters with similar issues in the Unity world.

I had some students play with Unity a few years ago and its an awesome game engine. We simulated a trip flying through a deep water canyon using real ocean depth data using the Oculus Rift on a mac-mini and a variant on the Android tablet from pretty much the same code.

Perhaps you could write a PF Insights article on your implementation. I'm sure others here would be interested in reading it. There's no money in it only likes by happy readers.

https://www.physicsforums.com/insights/
 
  • #15
Sounds like a cool Unity project! It's really amazing how easy those types of simulations are with a game engine like Unity. In the old days of game programming it took a lot more work. It's hard to believe it's free to use. Thanks for the invitation to write an insights blog post. I'll take a stab at it. Where do I submit it?
 
  • #17
As a side remark: This scaling lead to an interesting problem in astronomy.

The mass of an object scales with the cube of its radius. If you change the distance and its radius by the same amount (as done here) you keep its angular diameter the same. The time stays the same as well, and the apparent magnitude doesn't change either. For a long time these two things were the only observables. So how do you measure distances, e. g. between Sun and Earth? None of the readily observable things depend on it!
Venus transits were the first reliable method - using parallax between two observers on Earth (where you know the distance between them). Today we can do direct measurements with radar and tons of spacecraft , of course.
 
  • #18
Hi Jedishrfu, I uploaded a couple messages to that application page. Including a link to a google doc with a draft of the blog post but have not heard anything back.
 
  • #19
I think the site owner does the approvals and he’s on extended travel this month.

You can PM him though at @Greg Bernhardt to see if it can be expedited. I will open a report for him as well.
 
  • #20
Ok, thanks for the info!
 
  • #21
Just to let you know I’m still waiting on Greg. I’m guessing will be end of July before we hear back. He was traveling overseas and said he’d have limited internet access.
 
  • #22
Ok, thanks for the info!
 
  • #24
Thanks, got it!
 

1. How does the scale of an orbit affect its dynamics?

The scale of an orbit does not have a significant effect on its dynamics. Orbital dynamics are governed by the laws of gravity and motion, which are independent of scale. This means that the behavior of an orbit will remain the same regardless of its size.

2. Can orbital dynamics be accurately described with linear equations?

Yes, orbital dynamics can be accurately described with linear equations. The laws of gravity and motion that govern orbital dynamics can be modeled using linear equations, making them a reliable tool for predicting and understanding the behavior of orbits.

3. Do small changes in orbital parameters have a significant impact on orbital dynamics?

Yes, small changes in orbital parameters can have a significant impact on orbital dynamics. While the laws of gravity and motion remain constant, even small changes in parameters such as speed, direction, or distance can result in different orbital paths and behaviors.

4. Is it possible for orbital dynamics to change over time?

Yes, orbital dynamics can change over time. Factors such as the gravitational pull of other objects and the effects of atmospheric drag can cause changes in an orbit's trajectory and speed. These changes can be predicted and accounted for using mathematical models.

5. How do orbital dynamics differ in different planetary systems?

Orbital dynamics can differ in different planetary systems due to variations in the mass, size, and composition of the objects involved. However, the fundamental principles of gravity and motion still apply, allowing for consistent and predictable behavior of orbits across different systems.

Similar threads

  • Astronomy and Astrophysics
2
Replies
47
Views
4K
Replies
12
Views
2K
Replies
10
Views
1K
  • Astronomy and Astrophysics
Replies
1
Views
855
  • Astronomy and Astrophysics
Replies
16
Views
2K
  • Astronomy and Astrophysics
Replies
4
Views
1K
Replies
17
Views
2K
  • Astronomy and Astrophysics
Replies
18
Views
3K
  • Astronomy and Astrophysics
Replies
3
Views
6K
Replies
1
Views
1K
Back
Top