#### Examples

Here is a gif showing roughly our current situation:

I set it so that each frame has the Sun at the center, and includes the Sun, Earth, Mars, and Jupiter over 36,500 days (~100 years) of orbit. I'll list all initial conditions at the end of the post. This is the track of each of them:

The first thing I wanted to find out is what happens if Jupiter is big. The result depends on exactly how big Jupiter is. My favorite occurs on this time scale when Jupiter's mass is roughly 1/4 of the sun's mass. The Sun and Jupiter trade Mars back and forth for a bit:

If Jupiter is big but not that big, everything is pretty stable on this time scale. For example, here are the results if Jupiter is 10 times as massive as it actually is:

I set it so that each frame has the Sun at the center, and includes the Sun, Earth, Mars, and Jupiter over 36,500 days (~100 years) of orbit. I'll list all initial conditions at the end of the post. This is the track of each of them:

The first thing I wanted to find out is what happens if Jupiter is big. The result depends on exactly how big Jupiter is. My favorite occurs on this time scale when Jupiter's mass is roughly 1/4 of the sun's mass. The Sun and Jupiter trade Mars back and forth for a bit:

If Jupiter is big but not that big, everything is pretty stable on this time scale. For example, here are the results if Jupiter is 10 times as massive as it actually is:

We can do the same with Mars. If we increase the mass of Mars, things stay pretty stable until we get to 1/10 to 1/100 the mass of the Sun. We start seeing Earth's orbit fluctuating in distance from the Sun, and we can see Jupiter's orbit get more eccentric and Earth get thrown out of the solar system. Here are the results if Mars is ~80,000 times as massive as it actually is:

You can do a lot with these, and I've attached code to play with in both MATLAB and Python (I used MATLAB for these visualizations). Switching gears, another interesting phenomenon is Lagrange points. Of particular interest in our solar system are the L4 and L5 points. When you have two masses in orbit where one is <25 times as massive as the other, you get stable orbits for additional small masses at 60 degrees before and after the smaller mass on its same orbit. The most striking example are the Trojan asteroids for the Jupiter/Sun pair. I ran some examples of those also.

You can do a lot with these, and I've attached code to play with in both MATLAB and Python (I used MATLAB for these visualizations). Switching gears, another interesting phenomenon is Lagrange points. Of particular interest in our solar system are the L4 and L5 points. When you have two masses in orbit where one is <25 times as massive as the other, you get stable orbits for additional small masses at 60 degrees before and after the smaller mass on its same orbit. The most striking example are the Trojan asteroids for the Jupiter/Sun pair. I ran some examples of those also.

First, I moved Mars to be in Jupiter's orbit but at a 45 degree angle. That is, Mars is 1/8 of the orbit ahead of Jupiter. Here is a gif of the situation:

You can probably notice that the distance between Mars and Jupiter seems to fluctuate. If we plot the angle vs time, we can see that that's exactly what is happening:

It seems to bounce around 60 degrees or so. If it just starts at 60 degrees (L4), you get the following gif and angle vs time plot:

Little things lead to perturbations in the orbit. Here, there's the Earth that has a tiny effect. I also don't have exactly perfect initial conditions. The problem is also chaotic so the errors can blow up over time. Since this is a stable Lagrange point though, Mars will tend to move around that stable point as long as nothing really big perturbs it. I first encountered this midway through mechanics in college and remember it being really fascinating.

Anyway...that's it. If you want to see other simulations, feel free to edit the code posted below and/or ask me to run something.

code here

You can probably notice that the distance between Mars and Jupiter seems to fluctuate. If we plot the angle vs time, we can see that that's exactly what is happening:

It seems to bounce around 60 degrees or so. If it just starts at 60 degrees (L4), you get the following gif and angle vs time plot:

Little things lead to perturbations in the orbit. Here, there's the Earth that has a tiny effect. I also don't have exactly perfect initial conditions. The problem is also chaotic so the errors can blow up over time. Since this is a stable Lagrange point though, Mars will tend to move around that stable point as long as nothing really big perturbs it. I first encountered this midway through mechanics in college and remember it being really fascinating.

Anyway...that's it. If you want to see other simulations, feel free to edit the code posted below and/or ask me to run something.

code here

#### Background

The gravitational force between two masses is approximately G*m1*m2/r^2 where m1 and m2 are the masses and r is the distance between them. It is an attractive force so it pulls the masses together. When you have more than two objects, there is no general solution so you have to solve it numerically. Wikipedia has a good introduction to the problem.

There are a lot of paths to solve it. A very simple method is:

- setup initial conditions
- step forward a tiny amount of time
- calculate the forces between all pairs of objects
- approximate the solution to the equations of motion for each object using that force
- repeat for the next time interval

I used that simple method here. For reference, the basic equations of motion are final position = initial position + velocity*(change in time) and final velocity = initial velocity + acceleration*(change in time).

#### Initial conditions

mass of sun = 2E30 kg

mass of earth = 6E24 kg

mass of mars = 6E23 kg

mass of jupiter = 2E27 kg

orbital distance of earth = 1 AU

orbital distance of mars = 1.52 AU

orbital distance of jupiter = 5.2 AU

orbital period of earth = 1 year

orbital period of mars = 1.88 years

orbital period of jupiter = 11.86 years

This is such a great resource that you are providing and you give it away for free. I love seeing blog that understand the value. Im glad to have found this post as its such an interesting one! I am always on the lookout for quality posts and articles so i suppose im lucky to have found this! I hope you will be adding more in the future... Solceller med batteri

ReplyDeleteThanks so much with this fantastic new web site. I’m very fired up to show it to anyone. It makes me so satisfied your vast understanding and wisdom have a new channel for trying into the world. 10kw solar system

ReplyDeleteThank you for very usefull information.. בדיקת לחות

ReplyDeleteWith the ability to mount over 100m off the ground, HOMMIIEE high mast lighting poles can take your project to new heights. high mast led flood light manfuacturers

ReplyDeleteThe photons at that point move their capacity to electrons in the lower layer of the cell. Zonnepanelen

ReplyDeleteOn the off chance that we set enough sun oriented boards in the Sahara desert to cover only one percent of it, we could create enough power to control the whole planet. Zonnepanelen kopen

ReplyDeleteGet huge discount on Home and Kitchen Appliances,Split and Window Air Conditioner, Mobiles & Laptops online , Television, Speakers & more electronics at best price.

ReplyDeletevoltas refrigerator

We are also noticing that traditional medical doctors are also recognizing the increased interest in holistic healing and are finally starting to incorporate these healing methods into their practice to keep up with the current trends. There are many ways to obtain a construction job interview, but some are more effective than others. porno

ReplyDeleteI enjoy you because of all of your effort on this website.All of us hear all relating to the medium you give simple tips on your web blog.

ReplyDeletehome automation service

This is the reason solar boards were created - to change over the sun's force into a structure we can utilize, similar to power. batteryless

ReplyDeleteThe solar panels therefore maintain a clean setting and they leave the air fresh. More importantly they help in prevention of many cancer incidences. solar companies in Dallas Tx

ReplyDelete