Welcome, Guest. Please Login.
Gravity Simulator
11/20/17 at 09:13:28
News: Registration for new users has been disabled to discourage spam. If you would like to join the forum please send me an email with your desired screen name to tony at gravitysimulator dot com.
Home Help Search Login


Pages: 1 2 3 
Send Topic Print
Changing mass (Read 18771 times)
EDG
Ultimate Member
*****


oh, crumbs!!!

Posts: 611
Gender: male
Changing mass
06/04/07 at 11:17:51
 
Is it possible in GravSim to change the mass of the primary partway through the simulation? Even if it's just going instantly from 1.5 solar masses to 0.5 solar masses for example, though it'd be nice to specify a duration over which the mass drops linearly. If so, how does one do this?
Back to top
 
 

(formerly known as Mal)
View Profile WWW   IP Logged
Tony
YaBB Administrator
*****




Posts: 1051
Gender: male
Re: Changing mass
Reply #1 - 06/04/07 at 16:12:09
 
You can maunally do it.  Use Autopilot to pause the simulation at the desired time, then use menu Objects > Edit Objects to change the mass.  Then unpause the sim.
 
I toyed around with code to change it linearly, but never kept the changes.  It's not hard to do.  I can include it in the next Beta if you like.  I can give you linear, poly or exponential if you like.
Back to top
 
 
Email View Profile WWW   IP Logged
EDG
Ultimate Member
*****


oh, crumbs!!!

Posts: 611
Gender: male
Re: Changing mass
Reply #2 - 06/04/07 at 18:11:57
 
Would be nice to have... then we can change the mass of the central object (like say, when you go from a red giant to a white dwarf) and see what happens to the orbits.  
 
I'm kinda curious to see what happens to an asteroid belt if the central object drops in mass. I know the orbits will expand, but I'm guessing it'll do it messily...
Back to top
 
 

(formerly known as Mal)
View Profile WWW   IP Logged
Tony
YaBB Administrator
*****




Posts: 1051
Gender: male
Re: Changing mass
Reply #3 - 06/04/07 at 19:21:32
 
Quote from Mal on 06/04/07 at 18:11:57:
Would be nice to have... then we can change the mass of the central object (like say, when you go from a red giant to a white dwarf) and see what happens to the orbits.

I'm kinda curious to see what happens to an asteroid belt if the central object drops in mass. I know the orbits will expand, but I'm guessing it'll do it messily...

 
If the star gradually loses mass over a period of time >> periods of the asteroids, they they will smoothly spiral out.  If the star loses its mass instantly, then their orbits will gain eccentricity, and their positions at the mass moss moment will become their periastrons.  This you can do already by manually editing the star's mass.
 
I'll update the beta in a few days and include this.
 
btw, here's an animation that ties together the dynamic elements of asteroid Pallas and the Kozai mechanism:
 
http://orbitsimulator.com/gravity/images/PallasJupiter.GIF
Back to top
 
 
Email View Profile WWW   IP Logged
EDG
Ultimate Member
*****


oh, crumbs!!!

Posts: 611
Gender: male
Re: Changing mass
Reply #4 - 06/04/07 at 20:18:37
 
Quote from Tony on 06/04/07 at 19:21:32:
Quote from Mal on 06/04/07 at 18:11:57:
Would be nice to have... then we can change the mass of the central object (like say, when you go from a red giant to a white dwarf) and see what happens to the orbits.

I'm kinda curious to see what happens to an asteroid belt if the central object drops in mass. I know the orbits will expand, but I'm guessing it'll do it messily...


If the star gradually loses mass over a period of time >> periods of the asteroids, they they will smoothly spiral out. If the star loses its mass instantly, then their orbits will gain eccentricity, and their positions at the mass moss moment will become their periastrons. This you can do already by manually editing the star's mass.

I'll update the beta in a few days and include this.

 
Thanks!  
 
Quote:
btw, here's an animation that ties together the dynamic elements of asteroid Pallas and the Kozai mechanism:

http://orbitsimulator.com/gravity/images/PallasJupiter.GIF

 
Cool, that's just hypnotic Smiley
Back to top
 
 

(formerly known as Mal)
View Profile WWW   IP Logged
frankuitaalst
Ultimate Member
*****


Great site

Posts: 1507
Gender: male
Re: Changing mass
Reply #5 - 06/05/07 at 10:24:05
 
I simulated this once for our solar system ( gradually decreasing the mass of the sun ) . There's normally less influence for the inner planets , but the outer planets are indeed spiralling outwards, so the farther the bigger the influence ( seen on screen) . Be carefull however not to exagerate... I once read that during the lifetime of our sun it burns about less than 1% of its mass over billions of years ..
Back to top
 
 
Email View Profile   IP Logged
Tony
YaBB Administrator
*****




Posts: 1051
Gender: male
Re: Changing mass
Reply #6 - 06/21/07 at 21:07:57
 
I've got a new Beta that incorporates this into the Autopilot, but I can't upload it until Sun or Mon, as I'm out of town. Smiley
Back to top
 
 
Email View Profile WWW   IP Logged
EDG
Ultimate Member
*****


oh, crumbs!!!

Posts: 611
Gender: male
Re: Changing mass
Reply #7 - 06/22/07 at 02:12:52
 
I haven't had a chance to set this up in Grav Sim yet. I'd just be changing the mass pretty suddenly (dropping it from say 1.5 to 0.5 solar masses as it goes from AGB giant to whit dwarf) and seeing what happens. I'm just wondering how "messy" the change in the asteroid orbits would be. Would the whole belt just slowly move out, or would there be asteroids flung around all over the place?
Back to top
 
 

(formerly known as Mal)
View Profile WWW   IP Logged
EDG
Ultimate Member
*****


oh, crumbs!!!

Posts: 611
Gender: male
Re: Changing mass
Reply #8 - 06/24/07 at 22:24:26
 
Quote from Mal on 06/22/07 at 02:12:52:
I haven't had a chance to set this up in Grav Sim yet. I'd just be changing the mass pretty suddenly (dropping it from say 1.5 to 0.5 solar masses as it goes from AGB giant to whit dwarf) and seeing what happens. I'm just wondering how "messy" the change in the asteroid orbits would be. Would the whole belt just slowly move out, or would there be asteroids flung around all over the place?

 
So I just had a chance to set this up, and something's going wrong. I set up 100 asteroids going around a 1.5 solar mass star with 50 solar radii.  
 
The asteroid parameters are : size = 10 km radius +/- 100%, semimajor axis = 10 AU +/- 20%, eccentricity = 0.2 +/- 100%, inclination = 2 degrees +/- 100%, mass 0.001 Earths +/- 0% (so they're superdense asteroids Wink), and the longitude/argument/mean anomaly at 180 +/- 100%.  
 
I set this going at timestep 8192 and I see a nice belt of asteroids going round the star. I then pause the simulation and change the mass of the star to 0.5 sols and the radius down to 10,000 km. Then I restart it at 8192.  
 
What happens next is that all the asteroids are immediately "cut loose" - they just fly off in a straight line at a tangent to their earlier orbit, and don't come back.  
 
Any idea what is going wrong here? I don't think this is supposed to happen.  
 
P.S. This is with GravitySimulatorBeta17Apr2007.exe
Back to top
 
 

(formerly known as Mal)
View Profile WWW   IP Logged
Tony
YaBB Administrator
*****




Posts: 1051
Gender: male
Re: Changing mass
Reply #9 - 06/25/07 at 11:07:17
 
Quote from Mal on 06/24/07 at 22:24:26:

Any idea what is going wrong here? I don't think this is supposed to happen.

 
Look at the relationship between circular velocity formula and escape velocity formula:
 
Vc=sqrt(GM/r)
Ve=sqrt(2GM/r)
 
The only difference is the 2.  So any time you reduce the star's mass by less than half, you will put all objects in circular orbits onto elliptical orbits.  If you reduce it by more than half, you will put all objects in circular orbits on hyperbolic orbits.  They will never return.
 
Try it.  In Gravity Simulator:
 
File > New
Objects > Create Objects.  Semi-major axis = 0.1 AU.  Leave all other values at their defaults.
Zoom out so you can see your orbiting object.
View > Add Orbital Elements box.  Set to Object.  Notice its eccentricity is very close to 0.
Objects > Edit Objects.  Change the mass of Object 1 from 1 solar mass to 0.5001 solar masses.
Notice the eccentricity for Object is just under 1.  It has a very long elliptical orbit and will take many years to r
 
Try this again, except instead change the mass of Object 1 to 0.4999 solar masses.
Notice the eccentricity for Object is greater than 1.  It will never return.
 
You are making your object 0.3333 times its original value, way below the 0.5 threshold required to keep the object in orbit.
This was a fun little exercise in celestial mechanics Smiley.
 
I uploaded the latest beta.  "Dynamic Mass" is available through the Autopilot.  Let me know what you think.
 
*** edit ***
removed link to this beta.  It had a bug in it.  The link for the updated beta is my post below.
Back to top
 
« Last Edit: 06/27/07 at 17:28:07 by Tony »  
Email View Profile WWW   IP Logged
EDG
Ultimate Member
*****


oh, crumbs!!!

Posts: 611
Gender: male
Re: Changing mass
Reply #10 - 06/25/07 at 18:34:40
 
Quote from Tony on 06/25/07 at 11:07:17:
Quote from Mal on 06/24/07 at 22:24:26:

Any idea what is going wrong here? I don't think this is supposed to happen.


Look at the relationship between circular velocity formula and escape velocity formula:

Vc=sqrt(GM/r)
Ve=sqrt(2GM/r)

The only difference is the 2. So any time you reduce the star's mass by less than half, you will put all objects in circular orbits onto elliptical orbits. If you reduce it by more than half, you will put all objects in circular orbits on hyperbolic orbits. They will never return.

 
*blink* Crap! That could be awkward Sad.  
 
Though wait a minute... what happens if they're in an elliptical orbit to start with, not a circular one?  
 
And does this only happen if you suddenly reduce the mass? If you reduce it slowly over time (even over say a hundred years or so) then would they just spiral out but still be orbiting the star?
Back to top
 
 

(formerly known as Mal)
View Profile WWW   IP Logged
EDG
Ultimate Member
*****


oh, crumbs!!!

Posts: 611
Gender: male
Re: Changing mass
Reply #11 - 06/25/07 at 18:45:29
 
Also, I downloaded the new beta but have no clue how to use Autopilot. The new Dynamic Mass thing doesn't make much sense to me right now... why are there four text boxes there?  
 
Any explanation would be appreciated Smiley.
Back to top
 
 

(formerly known as Mal)
View Profile WWW   IP Logged
Tony
YaBB Administrator
*****




Posts: 1051
Gender: male
Re: Changing mass
Reply #12 - 06/26/07 at 00:31:02
 
Quote from Mal on 06/25/07 at 18:34:40:
*blink* Crap! That could be awkward Sad.

Though wait a minute... what happens if they're in an elliptical orbit to start with, not a circular one?

And does this only happen if you suddenly reduce the mass? If you reduce it slowly over time (even over say a hundred years or so) then would they just spiral out but still be orbiting the star?

 
The circular orbit is the ideal case.  In real life, there are no circular orbits.  But orbits close to circular, such as the orbits of the planets, will behave like the ideal case.  For an object in an elliptical orbit, you need to set escape velocity to your current velocity, then compute the mass of a star needed to achieve that escape velocity using M=(Ve^2*r)/(2G)
 
The 4 boxes allow you to enter a polynomial, where t is the amount of time elapsed, in seconds since the Autopilot command was executed.  The boxes are the coefficients for: t4, t3, t2, and t.  If you want linear, just leave the 1st 3 boxes set to 0.  If you want only a quadratic, leave the 1st 2 boxes set to 0.  If you want a 3rd degree polynomial, leave the 1st box set to 0.  The object's mass at each time step is defined by your polynomial.  To turn off, just us Autopilot again to set the 4 boxes to 0.
Back to top
 
 
Email View Profile WWW   IP Logged
EDG
Ultimate Member
*****


oh, crumbs!!!

Posts: 611
Gender: male
Re: Changing mass
Reply #13 - 06/26/07 at 23:35:34
 
I think you may have to walk me through this a bit. Smiley
 
So let's say i want to go from 1.5 solar masses to 0.5 solar masses over a fixed period of time (eg 1000 years). How do I start and stop that? There's an "execution time" that is presumably when it starts decreasing, but how do you stop it? What are the units of whatever goes in those four boxes?  
 
(I thought you had a tutorial for the autopilot somewhere on the site??)
Back to top
 
 

(formerly known as Mal)
View Profile WWW   IP Logged
Tony
YaBB Administrator
*****




Posts: 1051
Gender: male
Re: Changing mass
Reply #14 - 06/27/07 at 17:26:28
 
There was a bug that kept it from working under certain circumstances.  Download this and use it instead:
http://orbitsimulator.com/gravity/beta/GravitySimulatorBeta27June2007.exe .  Also, see if there is a file on your computer called c:\test.txt .  If there is, you can delete it.  Gravity Simulator created it for my debugging purposes, and I forgot to delete it from the last beta.
 
Quote from Mal on 06/26/07 at 23:35:34:
I think you may have to walk me through this a bit. Smiley

So let's say i want to go from 1.5 solar masses to 0.5 solar masses over a fixed period of time (eg 1000 years). How do I start and stop that? There's an "execution time" that is presumably when it starts decreasing, but how do you stop it? What are the units of whatever goes in those four boxes?

(I thought you had a tutorial for the autopilot somewhere on the site??)

 
Just hit the Help menu in Gravity Simulator, and it will jump you to the help page, or you can go directly:  http://orbitsimulator.com/gravity/tutorials/tutorials.html
 
The numbers in the boxes are the coefficients of the polynomial that will define the rate of mass change.  Their units are mass/time.
 
If we want it to drop the mass of an object linearly from 1.5 solar masses to 0.5 solar masses over 1000 years, we need to do a little computing:
 
We want a line that describes the mass as a function of time.  For a linear change, use the basic equation of a line:  y = mx + b.  We want this line to pass through the points ( 0, 1.5 ) and ( 1000, 0.5 ).  These points represent the star's mass at t=0 and at t=1000 years.
 
But Gravity Simulator likes units of Earth masses and seconds, not Solar masses and years, and in this beta version I don't allow you to choose units, so you have to transform these points.  1 solar mass = 332983.46 Earth masses, and 1000 years = 31557600000 seconds.  So our transformed points are ( 0, 499475.19 ) and ( 31557600000, 166491.73).  These points represent the star's mass in Earth masses at t=0 seconds and the star's mass in Earth masses at t=31557600000 seconds.
 
Returning to the basic equation of a line, y = mx + b,  y = mass (Earth masses),  m = slope of the line (mass/time), x = time(seconds), and b = the y-intercept which is the value of y (mass in Earth masses) when x (time in seconds) = 0, which is the original mass, in this case 499475.19 Earth masses.
 
y is what we want Gravity Simulator to compute with each time step.  We know x and b.  They are 31557600000 seconds and 499475.19 Earth masses.  We need to solve for m, the slope of the line.  Slope = rise over run: ( y2 - y1 ) / ( x2 - x1 ).  We can use our 2 points  ( 0, 499475.19 ) and ( 31557600000, 166491.73) to compute the slope, m.
 
 
( 166491.73 - 499475.19) / ( 31557600000 - 0 ) = -1.055E-05
 
So our equation of the line becomes:
y = -1.055E-05 x + 499475.19
 
Just to double check, plug in 31557600000 for x
 
 -1.055E-05 * 31557600000 + 499475.19 = 166542.51 which is the correct value for final mass after 1000 years (slightly off since I rounded my numbers).
 
Plugging this into Autopilot:
menu Autopilot...
In the Command list, choose Dynamic mass.
Choose the time and date when the mass decline is to begin.
Choose the object whose mass you would like to alter.
Leave the t4, t3, and t2 boxes at 0 since we want a linear decline.  In the t box put the value of the slope:  -1.055e-05.  Press Add >>.
 
In the Command list, choose Dynamic mass again.
Add 1000 years to the date when the mass decline begins.
Choose the object whose mass is being altered.
 
Enter 0 for all 4 boxes.
Press Add >>.  
Press OK.
 
Your object should spend the 1000 years as defined by your 2 autopilot commands decreasing linearly in mass from 1.5 to 0.5 solar masses.  If you want a polynomial decrease, then use the values for  t4, t3, and t2.
 
 
 
 
 
 
 
 
 
Back to top
 
 
Email View Profile WWW   IP Logged
Pages: 1 2 3 
Send Topic Print