Difference between revisions of "RDYNLAB"
Line 1: | Line 1: | ||
− | This is a library for modeling Relativistic DYNamics in the LAB frame. | + | This is a library for modeling Relativistic DYNamics in the LAB frame. |
+ | |||
+ | '''The General Problem of Relativistic Particle Dynamics''' | ||
The general problem of modeling relativistic particle trajectories for a given force boils down to solving the following system of six differential equations: | The general problem of modeling relativistic particle trajectories for a given force boils down to solving the following system of six differential equations: | ||
Line 36: | Line 38: | ||
This now gives us | This now gives us | ||
− | <math> \frac{E}{c^2}\frac{d\vec{v}}{dt}=\left(\vec{F}_{\parallel}+\vec{F}_{\perp}\right)-\frac{\vec{v}}{c}\left[\frac{\vec{v}}{c}\cdot\left(\vec{F}_{\parallel}+\vec{F}_{\perp}\right)\right]</math> | + | <math> \frac{E}{c^2}\frac{d\vec{v}}{dt}=\left(\vec{F}_{\parallel}+\vec{F}_{\perp}\right)-\frac{\vec{v}}{c}\left[\frac{\vec{v}}{c}\cdot\left(\vec{F}_{\parallel}+\vec{F}_{\perp}\right)\right]</math>. |
+ | |||
+ | The scalar product of the velocity and the perpendicular component of the force is zero. Furthermore the scalar product involving the velocity and the parallel component of the force, when multiplied again by the velocity, gives us <math>v^2/c^2\vec{F}_{\parallel}</math>, and thus | ||
+ | |||
+ | <math> \frac{E}{c^2}\frac{d\vec{v}}{dt}=\left(\vec{F}_{\parallel}+\vec{F}_{\perp}\right)-\frac{v^2}{c^2}\vec{F}_{\parallel}</math>. | ||
+ | |||
+ | Combining the terms with respect to the force vectors, we get | ||
+ | |||
+ | <math> \frac{E}{c^2}\frac{d\vec{v}}{dt}=\vec{F}_{\perp}+\left(1-\frac{v^2}{c^2}\right)\vec{F}_{\parallel}=\vec{F}_{\perp}+\frac{1}{\gamma^2}\vec{F}_{\parallel}</math>. | ||
+ | |||
+ | Last of all, noting that <math>E/c^2=\gamma m_0</math> | ||
+ | |||
+ | where <math>m_0</math> is the rest energy of the particle, and <math>\gamma</math> is the usual relativistic factor, we obtain | ||
+ | |||
+ | <math> \frac{d\vec{v}}{dt}=\frac{1}{\gamma m_0}\vec{F}_{\perp}+\frac{1}{\gamma^3 m_0}\vec{F}_{\parallel}</math>. | ||
+ | |||
+ | This completes (almost) our set of differential equations. | ||
+ | |||
+ | |||
+ | '''Power Loss for Accelerated Charges''' | ||
+ | |||
+ | |||
+ | |||
+ | '''Summary of Relevant Formulae''' | ||
+ | |||
+ | |||
+ | '''Numerical Method of Solving the Differential Equations''' | ||
+ | These equations are solved subject to an appropriate set of boundary conditions, usually the initial position and momentum of the particle. | ||
− | , | + | In simple cases, such as when a charged particle travels through uniform electromagnetic fields, the set of dynamical equations can be solved analytically. In more complex cases, the system must be solved numerically. |
− | + | The solver uses | |
I am unable to post code to the wiki, so I have copied and pasted it all here. You will need all of these files in order to compile the code. GSL must be installed before you can compile this library. | I am unable to post code to the wiki, so I have copied and pasted it all here. You will need all of these files in order to compile the code. GSL must be installed before you can compile this library. |
Revision as of 17:42, 18 June 2009
This is a library for modeling Relativistic DYNamics in the LAB frame.
The General Problem of Relativistic Particle Dynamics
The general problem of modeling relativistic particle trajectories for a given force boils down to solving the following system of six differential equations:
where
is the position of the particle, is the momentum of the particle, and is the acceleration of the particle which can be derived from the force. Classically, we would just use . Such a description, however, is not consistent with special relativity. Indeed, starting from the relativistic relations,
and taking the time derivatives of both, we find
.
Solving this second equation for
and plugging into the first, also noting that , we obtain.
Noting that
, we find.
We now decompose the force into pieces that are parallel and perpendicular to the velocity of the particle, i.e.
where
.
This now gives us
.
The scalar product of the velocity and the perpendicular component of the force is zero. Furthermore the scalar product involving the velocity and the parallel component of the force, when multiplied again by the velocity, gives us
, and thus.
Combining the terms with respect to the force vectors, we get
.
Last of all, noting that
where
is the rest energy of the particle, and is the usual relativistic factor, we obtain.
This completes (almost) our set of differential equations.
Power Loss for Accelerated Charges
Summary of Relevant Formulae
Numerical Method of Solving the Differential Equations
These equations are solved subject to an appropriate set of boundary conditions, usually the initial position and momentum of the particle.
In simple cases, such as when a charged particle travels through uniform electromagnetic fields, the set of dynamical equations can be solved analytically. In more complex cases, the system must be solved numerically.
The solver uses
I am unable to post code to the wiki, so I have copied and pasted it all here. You will need all of these files in order to compile the code. GSL must be installed before you can compile this library.
The code can be compiled into a shared object library using the autoconf, automake, and libtool tools. Optionally, you could just compile these source files into other programs.
Return to Simulating Particle Trajectories