Editing User:MikeB/Symplectic Numeric Integration

Jump to navigation Jump to search

Warning: You are not logged in. Your IP address will be publicly visible if you make any edits. If you log in or create an account, your edits will be attributed to your username, along with other benefits.

The edit can be undone. Please check the comparison below to verify that this is what you want to do, and then save the changes below to finish undoing the edit.

Latest revision Your text
Line 30: Line 30:
 
(provided that <MATH>Q > Q^*</MATH>)
 
(provided that <MATH>Q > Q^*</MATH>)
  
where <MATH>\mu</MATH> is the gravitational constant for the body in question; 'm' is the mass of the object that we are modelling, and <MATH>Q^*</MATH> is the location of the source of the gravitational field (e.g., the centre of the Sun or the Earth).  If we work in Gaussian units where we measure distances in AU (Astronomical Units); velocity in AU/day; and mass in units of the mass of the Sun, then for an object moving in the gravitational potential of the Sun, <MATH>\mu = 0.00029591220828559115</MATH> and <MATH>m = 1</MATH>.  For an object moving in the gravitational field of the Earth, <MATH>m = 1/354710</MATH>.  To convert from AU and days to metres and seconds, one needs to know that 1 AU = 149597870700 metres; and that 1 day = 86400 seconds.  Unless the mass of the object that we are modelling is changing, it is convenient to set <MATH>m = 1</MATH>.
+
where <MATH>\mu</MATH> is the gravitational constant for the body in question; 'm' is the mass of the object that we are modelling, and <MATH>Q^*</MATH> is the location of the source of the gravitational field (e.g., the centre of the Sun or the Earth).  If work in Gaussian units where we measure distances in AU (Astronomical Units); velocity in AU/day; and mass in units of the mass of the Sun, then for an object moving in the gravitational potential of the Sun, <MATH>\mu = 0.00029591220828559115</MATH> and <MATH>m = 1</MATH>.  For an object moving in the gravitational field of the Earth, <MATH>m = 1/354710</MATH>.  To convert from AU and days to metres and seconds, one needs to know that 1 AU = 149597870700 metres; and that 1 day = 86400 seconds.  Unless the mass of the object that we are modelling is changing, it is convenient to set <MATH>m = 1</MATH>.
  
In this one-dimensional system, the object moving in a gravitational potential is a bit limited in terms of directional options.  It can either go up, or it can go down.  Clearly, as the object moves towards the location of the gravitational source, the force acting on the object is going to increase without limit and the integration is going to going hay-wire, but so long as we are a reasonable distance away from <MATH>Q^*</MATH> then the integration scheme given above will provide a reasonable description of the object's motion.
+
In this one-dimensional system, the object moving in a gravitational potential is a bit limited in terms of directional options.  It can either go up, or it can go down.  Clearly, as the object moves towards the location of the gravitational source, the force acting on the object is going to increase without limit and the integration is going to going hay-wire, but so long as we are a reasonable distance away from [MATH]Q^*[/MATH] then the integration scheme given above will provide a reasonable description of the object's motion.
  
 
=== In three dimensions ===
 
=== In three dimensions ===
 
In three dimensions, the integration scheme looks much the same.  But now we have to apply it to three spatial coordinates and three velocity components - i.e., the integration scheme becomes one that updates one set of 6 numbers <MATH>\left\{Q_{x,0},Q_{y,0},Q_{z,0},P_{x,0},P_{y,0},P_{z,0}\right\}</MATH> to a new set of six numbers <MATH>\left\{Q_{x,2},Q_{y,2},Q_{z,2},P_{x,2},P_{y,2},P_{z,2}\right\}</MATH>.  And the second order integration scheme that does this is as follows:
 
In three dimensions, the integration scheme looks much the same.  But now we have to apply it to three spatial coordinates and three velocity components - i.e., the integration scheme becomes one that updates one set of 6 numbers <MATH>\left\{Q_{x,0},Q_{y,0},Q_{z,0},P_{x,0},P_{y,0},P_{z,0}\right\}</MATH> to a new set of six numbers <MATH>\left\{Q_{x,2},Q_{y,2},Q_{z,2},P_{x,2},P_{y,2},P_{z,2}\right\}</MATH>.  And the second order integration scheme that does this is as follows:
  
<MATH>Q_{x,1} \leftarrow Q_{x,0}+\frac{1}{2}\,\delta t\, P_{x,0}</MATH>
+
<MATH>Q_{x,1} \leftarrow Q_{x,0}+\frac{1}{2}\,\delta t\, P_{x,0}[/MATH>
 
+
<MATH>Q_{y,1} \leftarrow Q_{y,0}+\frac{1}{2}\,\delta t\, P_{y,0}[/MATH>
<MATH>Q_{y,1} \leftarrow Q_{y,0}+\frac{1}{2}\,\delta t\, P_{y,0}</MATH>
+
<MATH>Q_{z,1} \leftarrow Q_{z,0}+\frac{1}{2}\,\delta t\, P_{z,0}[/MATH>
 
 
<MATH>Q_{z,1} \leftarrow Q_{z,0}+\frac{1}{2}\,\delta t\, P_{z,0}</MATH>
 
 
 
  
 
<MATH>P_{x,2} \leftarrow P_{x,0}+\delta t\, F_x\left(Q_{x,1},Q_{y,1},Q_{z,1}\right)</MATH>
 
<MATH>P_{x,2} \leftarrow P_{x,0}+\delta t\, F_x\left(Q_{x,1},Q_{y,1},Q_{z,1}\right)</MATH>
 
 
<MATH>P_{y,2} \leftarrow P_{y,0}+\delta t\, F_y\left(Q_{x,1},Q_{y,1},Q_{z,1}\right)</MATH>
 
<MATH>P_{y,2} \leftarrow P_{y,0}+\delta t\, F_y\left(Q_{x,1},Q_{y,1},Q_{z,1}\right)</MATH>
 
 
<MATH>P_{z,2} \leftarrow P_{z,0}+\delta t\, F_z\left(Q_{x,1},Q_{y,1},Q_{z,1}\right)</MATH>
 
<MATH>P_{z,2} \leftarrow P_{z,0}+\delta t\, F_z\left(Q_{x,1},Q_{y,1},Q_{z,1}\right)</MATH>
  
 
<MATH>Q_{x,2} \leftarrow Q_{x,1}+\frac{1}{2}\,\delta t\, P_{x,2}</MATH>
 
<MATH>Q_{x,2} \leftarrow Q_{x,1}+\frac{1}{2}\,\delta t\, P_{x,2}</MATH>
 
 
<MATH>Q_{y,2} \leftarrow Q_{y,1}+\frac{1}{2}\,\delta t\, P_{y,2}</MATH>
 
<MATH>Q_{y,2} \leftarrow Q_{y,1}+\frac{1}{2}\,\delta t\, P_{y,2}</MATH>
 
 
<MATH>Q_{z,2} \leftarrow Q_{z,1}+\frac{1}{2}\,\delta t\, P_{z,2}</MATH>
 
<MATH>Q_{z,2} \leftarrow Q_{z,1}+\frac{1}{2}\,\delta t\, P_{z,2}</MATH>
  
 
Each step of the integrator is the same - except now we apply it three times - once for each spatial coordinate.
 
Each step of the integrator is the same - except now we apply it three times - once for each spatial coordinate.
  
You should note that we now have three force functions rather than just one.  This is because force is really a 'vector' rather than 'scalar' quantity.  <MATH>F_x\left(Q_{x},Q_{y},Q_{z}\right)</MATH> is the force acting in the x-direction on the object located at position <MATH>{Q_x, Q_y, Q_z}</MATH>; <MATH>F_y\left(Q_{x},Q_{y},Q_{z}\right)</MATH> is the force acting in the y-direction on the object located at position <MATH>{Q_x, Q_y, Q_z}</MATH>; and <MATH>F_z\left(Q_{x},Q_{y},Q_{z}\right)</MATH> is the force in the x-direction acting on the object located at position <MATH>{Q_x, Q_y, Q_z}</MATH>.  And if we are in the gravitational field of a single body, then these functions become:
+
You should not that we now have three force functions rather than just one.  This is because force is really a 'vector' rather than 'scalar' quantity.  <MATH>F_x\left(Q_{x},Q_{y},Q_{z}\right)</MATH> is the force acting in the x-direction on the object located at position <MATH>{Q_x, Q_y, Q_z}</MATH>; <MATH>F_y\left(Q_{x},Q_{y},Q_{z}\right)</MATH> is the force acting in the y-direction on the object located at position <MATH>{Q_x, Q_y, Q_z}</MATH>; and <MATH>F_z\left(Q_{x},Q_{y},Q_{z}\right)</MATH> is the force in the x-direction acting on the object located at position <MATH>{Q_x, Q_y, Q_z}</MATH>.  And if we are in the gravitational field of a single body, then these functions become:
  
 
<MATH>F_x\left(Q_{x},Q_{y},Q_{z}\right) = - \frac{\mu\,m\,\left(Q_{x}-Q_x^*\right)}{\left(\left(Q_{x}-Q_x^*\right)^2+\left(Q_{y}-Q_y^*\right)^2+\left(Q_{z}-Q_z^*\right)^2\right)^{3/2}}</MATH>
 
<MATH>F_x\left(Q_{x},Q_{y},Q_{z}\right) = - \frac{\mu\,m\,\left(Q_{x}-Q_x^*\right)}{\left(\left(Q_{x}-Q_x^*\right)^2+\left(Q_{y}-Q_y^*\right)^2+\left(Q_{z}-Q_z^*\right)^2\right)^{3/2}}</MATH>

Please note that all contributions to OrbiterWiki are considered to be released under the GNU Free Documentation License 1.2 (see OrbiterWiki:Copyrights for details). If you do not want your writing to be edited mercilessly and redistributed at will, then do not submit it here.
You are also promising us that you wrote this yourself, or copied it from a public domain or similar free resource. Do not submit copyrighted work without permission!

To protect the wiki against automated edit spam, we kindly ask you to solve the following hCaptcha:

Cancel Editing help (opens in new window)