SolidWorks Motion – Planetary Motion

by Jeff Jensen

I’m a huge fan of Richard Feynman and I was recently reading from The Feynman Lectures on Physics Volume I about numerically solving planetary motion.  The goal of the analysis is to approximate the elliptical path that a planet would make around a star.  Feynman uses Newton’s laws of motion and gravitation to determine the force on the planet.  The force is split into its components (x and y) and these equations are solved in order to calculate the position of the planet with time intervals of 0.1 seconds.  Below are the laws that govern the motion of the planet. Planetary1Using the numerical method, you would need to tediously calculate the position, velocity and acceleration of the planet at each time interval based on the initial conditions and the previous time interval values.  I realized using SolidWorks Motion, the elliptical orbit could be approximated by simply applying the component forces on the planet and Motion would do all the tedious calculations.  Trace Path in Motion could then be used to visually see the elliptical orbit that the planet takes.  The position, velocity and acceleration for the planet could be easily plotted as well.

To do this we will use the same initial conditions that Feynman uses in order to reproduce his results.  These conditions and assumptions are listed below.  PM2 Our component forces that we need to enter into Motion are:  PM3Since the components forces are dependent on the location of the planet from the sun, we need a way to extract this information during the motion calculation in order for the expression of the forces to evaluate correctly.  This can be accomplished by creating positional plots for the planet as plots can be used in expressions in SolidWorks Motion.  I create three plots, one for the x displacement, y displacement and the magnitude of the displacement which corresponds to r in the force equations.  The origin of the assembly represents the location of the sun in our study.  I also create a Trace Path plot so that we get a visual representation of the elliptical orbit. X-DisplacmentI now create the component forces in SolidWorks and use the default planes to specify the direction that the forces are applied.  I select ‘Expression’ for force function and the ‘edit’ button to define the expression.  In order to select the plots to get the positional information needed, select ‘Motion Study Results’ from the drop down menu at the top right corner of the Function Builder Window.  Once the expression is enter in correctly, you should see the green check mark at the bottom left corner signaling that SolidWorks can evaluate the expression.

X Force Component

 Function BuilderNext I create the initial conditions for the study.  I use temporary mates to position the planet at .5 from the origin on the x-axis and -1.63 on the y-axis.  I use a linear motor that moves the planet in the positive y direction at a rate of 1.63 m/s.  At the start of the study the linear motor is on and at 1 second, it is turned off.  This will get our initial positions and velocity that is needed to match the conditions from The Feynman Lectures.  The forces will need to be disabled at the start of the study and enabled at 1 second.  This will keep the applied forces from changing the initial conditions.

Initial Velocity

We can now calculate the motion study and have SolidWorks animate the orbit of the planet around the sun.  Before calculating the motion study you will want to make sure the document units are meters otherwise the forces won’t be calculated correctly.


The Trace Path shows the elliptical orbit and playing the motion study even shows the planet moving slower when it is further from the sun.  But for more quantitative results we can compare to the results Feynman obtains, we can view the plots for the x, y, or radius values.  Here is the radius plot that shows the maximum and minimum distance from the sun.

Radius PlotThe plot shows the radius varying from a minimum of .5 and a maximum of approximately 1.  The plot can be exported as a CSV file and more precise maximum value can be determined.  I had a value of .988 with the motion study properties set to 100 frames per second which matches the value from the Feynman Lectures within 3%.

This demonstrates the versatility of SolidWorks Motion and that it can even be used to calculate planetary motion using some simple forces defined by equations.  I think it would be interesting to try to simulate a two-body system that orbits each other from the common center of mass.  I’ve included a copy of the assembly I created for the Motion Study that can be downloaded and played around with if you’re interested: Motion Study


What's on your mind?

Your email address will not be published. Required fields are marked *