Showing posts with label gravity simulator. Show all posts
Showing posts with label gravity simulator. Show all posts

Saturday, April 11, 2009

I am moving my blog to Orinetz

I want to tell readers of my blog that I am going to move my major blogging effort to Orinetz Network. Blogspot is a nice place for blogging, however a web-programmer and linguist need more freedom to express himself. I need a place where I can effectively express myself in more than one language.

That is why I decided to purchase a domain and start a new website there. I had uploaded several web application to orinetz. In the mean time, there are Blog, Question and Answer Forum, Online Gravity Simulator and Programmable Comics in Orinetz Network.

I am especially proud of the new Gravity Simulator. Compared to the old one mentioned several times in this blog, the new Gravity simulator have many advantages:

  • It is browser based, you only need your browser to run it
  • It is collision capable simulator
  • It is multilingual - at the moment there are only two languages in Orinetz Network though
  • Space objects are drawn to scale
  • Anyone may make their planetary system there


All in all, I believe that this Gravity Simulator is already far more realistic than its older counterpart. This is my first step toward making Orinetz as a multilingual science fiction directory. In the future I plan to make more browser-based applications related to science fiction and applications related to learning new languages. This also add something in the list of programming languages I ever used to make gravity simulators.

Saturday, April 26, 2008

Mathematical Artwork Thumbnails

The images below are thumbnails of mathematical artworks I had made. Click the image for greater resolution.


























Friday, March 21, 2008

What will happen if moon have its own moon ?

There was a question back in Yahoo!Answer, which catch my interest. The question was, what will happen if the Moon have a moon. Actually there can be more than one answer to this question, or may be there are unlimited number of answer to this question, since there are so many possibilities on the mass, the initial position vector and the initial velocity vector of the moon of the Moon.


For the sake of simplicity lets assume, that the name of the moon of Moon is Usagi( うさぎ , means rabbit, refering to old belief that there are rabbits in the moon ), which mass is 2.3221E20 kg, or about 3.88688E-5 Earth Mass. Then we can predict what is going to happen by using NCGS or PPNCGS Gravity Simulator


Stable moon of Moon

For Usagi to orbit Moon in stable orbit, it may not be too far from the Moon, or Earth gravity field is going to disrupt the orbit.




For example, if the distance of Usagi and Moon is about 24544 km, and the orbital velocity of Usagi is 447.559 m/s, the orbit of Usagi around Moon is going to be stable.



Geocentric orbit path



Lunacentric orbit path


Unstable moon of Moon (Newtonian Simulation)

1. Geocentric Trajectory

But if Usagi is too close to Earth, then Moon is not going to have its own moon for a long time, since the orbit of Usagi is not going to be stable.




For example, if the distance of Usagi and Moon is about 64544 km, and the orbital velocity of Usagi is 275.991595 m/s, the orbit of Usagi around Moon is going to be unstable.




Usagi is going to escape it's Lunacentric orbit right away, since earth have higher mass and thus, stronger gravity field. Between time 0 until month 8 day 22, Usagi will orbit Earth twice in not so eccentric orbit, and twice in highly eccentric orbit.




Then between month 8 day 22 to year 1 month 7 day 5, Usagi will orbit Earth several time, inside the Earth-Lunar space, then move to higher orbit, and orbiting earth 5 times.




During the period between year 1 month 7 day 5 to year 2 month 9 day 22, Usagi will continue to orbit earth chaotically, moving between orbits in Earth-Lunar space.




During the period between year 2 month 9 day 22 to year 3 month 5 day 20, Usagi will orbit earth, as high as the Moon itself.


2. Lunacentric Trajectory

In order to gain more understanding about what is happening, we should see it from different point of view, that is why we need to see the orbit of Usagi, from Moon's point of view.




As we could see, Usagi is going to be pulled right away by earth gravity, form its Lunacentric orbit. Notice that the path of Usagi is chaotic since the first time, up to month 2, until it escape to higher orbit, with higher eccentricity.




Since between month 2 and month 8, Usagi didn't orbit Moon anymore, but orbit Earth in highly eccentric orbit, while the Moon continue to orbit Earth as if nothing happened, the path of Usagi relative to Moon, show retrograde motions, just like the path of any bodies relative to other bodies in a celestial sisterhood.




The path of Usagi relative to Moon, during month 8 to month 12, take my interests, since the plot result of Usagi's motion, somehow draw a face in the space between moon and earth. Looks like the face of a cute dog to me.




Between month 12 and year 1 month 11, Usagi orbit earth in relatively stable orbit. In that period, the path of Usagi relative to Moon, show common retrograde motion.






Instability begin to occur in Usagi's path after year 1 month 11. During the period between year 1 month 11 and year 3 month 5, Usagi continue to exhibit chaotic movement, sometimes dangerously close to Moon.


Unstable moon of Moon (Post-Parameterized Newtonian Simulation)

After trying to simulate what is going to happen using NCGS, I am curious abuot what is going to happen if I use my other Gravity Simulator, the PPNCGS which take relativistic effect into account.




Just link the simulation result of NCGS, the PPNCGS simulation result also shows, that Usagi is going to "take off" to higher Geocentric orbit, in month 2.




But the simulation result after that predict different movement of Usagi. PPNCGS simulation result, predicts that Usagi is going to orbit Earth in highly eccentric orbit, for about 5 times, during the period of time between month 2 to year 1 month 3.




Then PPNCGS simulation result, predicts that Usagi is going to orbit Earth in close orbit, during the period of time between year 1 month 3 to year 1 month 7, Moon gravity field, throw Usagi away from its orbit.




Between year 1 month 7 and year 2 month 9, Usagi is going to occupy different orbit, around Earth, changing its path as it encounter Moon in close distance, and being thrown by Moon's gravity field.




After year 2 month 9, Usagi is going to orbit earth in close distance, until the 2.3221E20 kg object finally collide with Earth in year 3 month 3.

Thursday, January 24, 2008

Parameterized Post Newtonian Collision less Gravity Simulator

Parameterized Post Newtonian Collision less Gravity Simulator (PPNCGS) is a program made to simulate the interaction between celestial bodies due to a force called gravity. The principal gravitational force on the celestial bodies is modeled by considering those bodies to be point masses in the isotropic, parameterized post-Newtonian (PPN) n-body metric. The equation used in PPNCGS is written in my previous posting "Plan 1 for Parameterized Post Newtonian Collision less Gravity Simulator" derived from equation [8-1] from http://iau-comm4.jpl.nasa.gov/XSChap8.pdf .

Collisions between bodies is assumed do not occur, for the same reason stated in NCGS design.

In addition to the usual information needed to run a simulation with NCGS, PPNCGS need several more information, they are :
- Speed of Light ( c )
- PPN parameter measuring the nonlinearity in superposition of gravity (Beta).
- PPN parameter measuring space curvature produced by unit rest mass (Gamma).
- For general relativity the value of Beta=Gamma=1.0

Comparative Study in Weak Gravity Field

The first comparative study of PPNCGS and NCGS will involve a planetary system with weak gravity field. The fictional system that we use to study is Erinton system. Erinton System consists of a star Erinton with mass of 1.5076 Solar Mass, and a planet named Eivalia with mass of 5.7665 Earth Mass orbiting it from a distance of 1 AU. The Initial orbital speed of Eivalia is 0.0003849 c. (see or click image for more detail)

Erinton System initial condition

Both NCGS and PPNCGS simulations are run to simulate the system for time length of 1 years, with time-step accuracy of 360 seconds.

Comparison between the simulation result
of NCGS and PPNCGS in weak gravity field.

Since the gravity field is weak, there is almost no difference between two simulation, although if we view the result in detail below, there is small difference between the position predicted by NCGS and PPNCGS.

Small difference in prediction position


Comparative Study in Strong Gravity Field

The next comparative study of PPNCGS and NCGS will involve a planetary system with strong gravity field. The fictional system that we use to study is Incada system. Incada System's primary star is Incada with mass of 1507.6 Solar Mass, which is orbited by a planet named Incada B with mass of 5.7665 Earth Mass, from a distance of 0.000733 AU. The Initial orbital speed of Incada B is 0.3 c. (see or click image for more detail)

Incada System initial condition

Since the gravity field of Incada is strong, and Incada B is orbiting its primary in very close orbit in relativistic speed, the simulations have to be run with time step accuracy of 0.003 seconds, to simulate the system behavior in a time length of 4 minutes 22.8 seconds.

Comparison between the simulation result
of NCGS and PPNCGS in strong gravity field.

The difference between two simulation result are huge since the gravity field involved is strong. While Newtonian simulation result shows elliptic orbit, taking General Relativity into account somehow causing the orbit of Incada B to become chaotic.

Download (PPNCGS and NCGS)'s (Program and Source Code) here


Attention : I have made a 3D online simulator in Orinetz.com which is Newtonian and collision capable. Here's a link to Planets only Solar System Simulation and Planet and Satellites Solar System Simulation.

Monday, January 14, 2008

Plan 1 for Parameterized Post Newtonian Collision less Gravity Simulator

During the experiment “The effect of black hole passing by our solar” using NCGS, I was advised to include relativistic effect into the simulator, to see if something can be different. Therefore this blog is intended as a starting plan to make a new simulator called PPNCGS. Just to make sure I get the meaning of equation [8-1] from http://iau-comm4.jpl.nasa.gov/XSChap8.pdf right.

Parameterized Post Newtonian Collision less Gravity Simulator (PPNCGS), is an upgrade planned for simple Newtonian Collision less Gravity Simulator. By including the Parameterized Post Newtonian into the equation, the relativistic effect can be included into the n-body interaction in an NCGS. So, instead of only the value of G like in NCGS, the other cosmological constant, c will also be included in the simulator.

The original equation [8-1] from http://iau-comm4.jpl.nasa.gov/XSChap8.pdf is this :

Equation 8.1 from

Then we remove the asteroid calculation,

Equation A1. Asteroid removed

From here on this equation will be called equation A1

First we will need to make the equation, more computer friendly. Even if mathematically a*b+a*c = a*(b+c) , these two are not the same computationally. Multiplication need more time to process than addition, so a*b+a*c will need more time to process than a(b+c). Therefore, we simplify this equation to become equation A2, by collecting c from equation A1.

Equation A2

Then we by using the law of distribution, we simplify the red boxed part of equation A2, to become equation A3.

Equation A3

Equation A3 can further be simplified to become Equation A4.

Equation A4

In order to find the derivative of the function, we might need to use software called, Maple. In order to make the equation Maple readable, we must turn Equation A4 into Equation A5. Since Equation A5, is really complex (but Maple readable), I put some color on it to denote relationships between equation A4 and A5. (click image for detail)



Equation A5

After equation A5 have been checked for their compatibility with Equation A1, we will go further to the next step of making calculation network design (required to minimize the number of calculation required).

The other thing that must be done is to find the derivative of acceleration, as the numerical method used in the PPNCGS is Taylor Second Order.

Download NCGS Program and Source Code here

The Wobble of Star caused by Hot Jupiter class planets

Hot Jupiters are planets with mass of several Jupiter orbiting as close as Mercury or Venus to their primary star. Planets with such mass orbiting the primary at close distance, may disrupt the movement of the star, causing it to wobble relative to the star’s proper motion.

To show this effect in detail, we will conduct several experiments with a 1.1775 Solar Mass star called Eltera, by placing one or two Hot Jupiters in the system.

Single planet

The first Hot Jupiter we place in this system is a 4.3359 Jupiter Mass planet, called Sivatra. Sivatra is placed in an orbit, 0.3 AU from Eltera, with initial orbital speed of 59.022 km/s (relative to Eltera). The wobble caused by Sivatra is shown below.

The wobble of Eltera caused by single planet orbiting it is relatively simple, by calculating the period of a wobble, we can calculate the period of Sivatra orbit. Then if we know the mass of the star Eltera, we can work out the radius of Sivatra orbit. By analyzing the strength of the wobble and taking the radius of Sivatra orbit, we can derive the mass of Sivatra.

Two planets

Now, how if we add another Hot Jupiter called, Ertina, with mass of 2.7558 Jupiter Mass into the Eltera System ? How the shape of the wobble will be ?





It turns out that depending on the starting position of Ertina relative to Sivatra, the shape of the wobble will be different, but there is a clear clue in the plot result, hinting that there are two planets in the system. The clue is the fact that in all figure above, all plot results shows retrograde movement, with two different period.

By analyzing the time difference per two knots over different time ( with the same method used to examine the plot result of sin(a*t)+sin(b*t) to derive the value of 2*Pi/a and 2*Pi/b ), we can derive the period of each planets. If the mass of Eltera is known, we can later derive the distance of each planets from Eltera, which is the information needed to calculate the mass of each planets.


Download NCGS Program and Source Code here