Particle motion
The motion provides functions for representation of charged particle motion in electric and magnetic field.
- Main Features:
Oscilation frequencies (gyro, bounce, and drift)
Angular Frequencies (gyro, bounce, and drift)
Motion period (gyro, bounce and drift)
Drift velocities calculation [TBD]
|
Calculate the bounce period of a trapped charged particle in a dipolar magnetic field. |
|
Calculate the drift period. |
|
Calculate the gyro period of a charged particle in a magnetic field. |
|
Calculate the bounce frequency of a charged particle in a dipolar magnetic field. |
|
Calculate the drift frequency. |
|
Calculate the oscillation gyro (cyclotron) frequency for a charged particle. |
|
Calculate the angular bounce frequency for a trapped charged particle in a dipolar magnetic field. |
|
Calculate the angular drift frequency. |
|
Calculate the angular gyro (cyclotron) frequency for a charged particle in a magnetic field. |
Functions
- rbamlib.motion.f_gyro(B=None, L=None, en=None, planet='Earth', q=4.803e-10, m=9.1e-28)
Calculate the oscillation gyro (cyclotron) frequency for a charged particle.
It accounts for the relativistic correction when the particle’s kinetic energy is provided.
- Parameters:
B (float or ndarray, optional) – Magnetic field strength, in Gauss. Either B or L must be provided.
L (float or ndarray, optional) – McIlwain L-shell parameter (dimensionless). Used to compute B if it is not provided.
en (float or ndarray, optional) – Kinetic energy of the particle, in MeV. When provided, a relativistic correction via the Lorentz factor is applied.
planet (str, optional, default = 'Earth') – Name of the planet for which the magnetic field is calculated.
q (float, optional) – Particle charge, in statcoulombs (SGS units). Default is electrons.
m (float, optional) – Particle mass, in grams. Default is electrons.
- Returns:
Gyro frequency, in Hertz (Hz).
- Return type:
float or ndarray
Notes
For a non-relativistic particle, the gyro frequency is given by
\[f = \frac{|q| B}{2 \pi m c}\]For a relativistic particle with kinetic energy (en), the Lorentz factor is
\[\gamma = 1 + \frac{en}{m \cdot c^2}\]and the gyro frequency becomes [Roederer and Zhang, 2016]
\[f = \frac{|q| B}{2 \pi \gamma m c}\]
- rbamlib.motion.omega_gyro(B=None, L=None, en=None, planet='Earth', q=4.803e-10, m=9.1e-28)
Calculate the angular gyro (cyclotron) frequency for a charged particle in a magnetic field.
- Parameters:
B (float or ndarray, optional) – Magnetic field strength, in Gauss. Either B or L must be provided.
L (float or ndarray, optional) – McIlwain L-shell parameter (dimensionless). Used to compute B if it is not provided.
en (float or ndarray, optional) – Kinetic energy of the particle, in MeV. When provided, a relativistic correction via the Lorentz factor is applied.
planet (str, optional, default = 'Earth') – Name of the planet for which the magnetic field is calculated.
q (float, optional) – Particle charge, in statcoulombs (SGS units). Defaults is for electrons.
m (float, optional) – Particle mass, in grams. Defaults is for electrons.
- Returns:
Angular gyro frequency, in radians per second (rad/s).
- Return type:
float or ndarray
Notes
The angular gyro frequency is calculated from the standard gyro frequency f [Koskinen and Kilpua, 2022]:
\[\omega = 2 \pi f\]
- rbamlib.motion.T_gyro(B=None, L=None, en=None, planet='Earth', q=4.803e-10, m=9.1e-28)
Calculate the gyro period of a charged particle in a magnetic field.
- Parameters:
B (float or ndarray, optional) – Magnetic field strength, in Gauss. Either B or L must be provided.
L (float or ndarray, optional) – McIlwain L-shell parameter (dimensionless). Used to compute B if it is not provided.
en (float or ndarray, optional) – Kinetic energy of the particle, in MeV. When provided, a relativistic correction via the Lorentz factor is applied.
planet (str, optional, default = 'Earth') – Name of the planet for which the magnetic field is calculated.
q (float, optional) – Particle charge, in statcoulombs (SGS units). Defaults is for electrons.
m (float, optional) – Particle mass, in grams. Defaults is for electrons.
- Returns:
Gyro period, in seconds (s).
- Return type:
float or ndarray
Notes
The gyro period is defined as the inverse of the angular gyro frequency [Koskinen and Kilpua, 2022]:
\[T = \frac{2\pi}{\omega}\]
- rbamlib.motion.f_bounce(L, al, en, planet='Earth', m=9.1e-28)
Calculate the bounce frequency of a charged particle in a dipolar magnetic field.
- Parameters:
L (float or ndarray) – L-shell parameter (dimensionless).
al (float or ndarray) – Equatorial pitch angle of the particle, in radians.
en (float or ndarray) – Kinetic energy of the particle, in MeV.
planet (str, optional, Default = 'Earth'.) – Name of the planet.
m (float, optional) – Particle mass, in grams. Default is electrons.
- Returns:
Bounce frequency, in Hertz (Hz).
- Return type:
float or ndarray
Notes
The bounce frequency is defined as the inverse of the bounce period [Schulz and Lanzerotti, 1974].
\[f_{bounce} = \frac{1}{T_{bounce}}\]
- rbamlib.motion.omega_bounce(L, al, en, planet='Earth', m=9.1e-28)
Calculate the angular bounce frequency for a trapped charged particle in a dipolar magnetic field.
- Parameters:
L (float or ndarray) – L-shell parameter (dimensionless).
al (float or ndarray) – Equatorial pitch angle of the particle, in radians.
en (float or ndarray) – Kinetic energy of the particle, in MeV.
planet (str, optional, Default = 'Earth'.) – Name of the planet.
m (float, optional) – Particle mass, in grams. Default is electrons.
- Returns:
Angular bounce frequency, in radians per second (rad/s).
- Return type:
float or ndarray
Notes
The angular bounce frequency is obtained by Schulz and Lanzerotti [1974]:
\[\omega_{bounce} = \frac{2\pi}{T_{bounce}}\]where \(T_{bounce}\) is the bounce period calculated by T_bounce function.
- rbamlib.motion.T_bounce(L, al, en, planet='Earth', m=9.1e-28)
Calculate the bounce period of a trapped charged particle in a dipolar magnetic field.
- Parameters:
L (float or ndarray) – L-shell parameter (dimensionless).
al (float or ndarray) – Equatorial pitch angle of the particle, in radians.
en (float or ndarray) – Kinetic energy of the particle, in MeV.
planet (str, optional, Default = 'Earth'.) – Name of the planet.
m (float, optional) – Particle mass, in grams. Default is electrons.
- Returns:
Bounce period, in seconds (s).
- Return type:
float or ndarray
Notes
The bounce period is calculated using the following Schulz and Lanzerotti [1974]:
\[\begin{split}T_{bounce} = \left( \frac{4r}{v} \right) T(\alpha) \\\end{split}\]v is the effective particle velocity computed using the conversion of energy to momentum,
\[v = \frac{pc}{m\gamma}\]\[r = L \cdot r_0\]T(alpha) is a factor dependent on the equatorial pitch angle provided by rbamlib.models.dip.T.
- rbamlib.motion.f_drift(L, en, al=1.5707963267948966, planet='Earth', m=9.1e-28, q=4.803e-10)
Calculate the drift frequency.
- Parameters:
L (float or ndarray) – L-shell parameter.
en (float or ndarray) – Particle kinetic energy in MeV.
al (float or ndarray, optional, default=pi/2) – Pitch angle in radians.
planet (str, optional, default='Earth') – Name of the planet.
m (float, optional) – Particle mass in grams. Default is electrons.
q (float, optional) – Particle charge in statcoulombs (CGS units). Default is electrons.
- Returns:
Drift frequency in Hertz (Hz).
- Return type:
float or ndarray
Notes
The drift frequency is given by the combined equation [Schulz and Lanzerotti, 1974]:
\[f_{drift} = \left[ \frac{L}{2\pi} \cdot \frac{3 m c^3}{|q| B_0 r_0^2} \cdot \frac{\gamma^2 - 1}{\gamma} \right] \cdot \frac{6 - \frac{Y(\alpha)}{T(\alpha)}}{12}\]\(\gamma\) is the relativistic Lorentz factor,
\(B_0\) is the magnetic field for the specified planet,
\(r_0\) is the planetary radius,
\(Y(\alpha)\) and \(T(\alpha)\) are functions from the dipole model.
- rbamlib.motion.omega_drift(L, en, al=1.5707963267948966, planet='Earth', m=9.1e-28, q=4.803e-10)
Calculate the angular drift frequency.
- Parameters:
L (float or ndarray) – L-shell parameter.
en (float or ndarray) – Particle kinetic energy in MeV.
al (float or ndarray, optional, default=pi/2) – Pitch angle in radians.
planet (str, optional, default='Earth') – Name of the planet.
m (float, optional) – Particle mass in grams. Default is electrons.
q (float, optional) – Particle charge in statcoulombs (CGS units). Default is electrons.
- Returns:
Angular drift frequency in radians per second (rad/s).
- Return type:
float or ndarray
Notes
The angular drift frequency is calculated using [Schulz and Lanzerotti, 1974]:
\[\omega_{drift} = 2\pi f_{drift}\]
- rbamlib.motion.T_drift(L, en, al=1.5707963267948966, planet='Earth', m=9.1e-28, q=4.803e-10)
Calculate the drift period.
- Parameters:
L (float or ndarray) – L-shell parameter.
en (float or ndarray) – Particle kinetic energy in MeV.
al (float or ndarray, optional, default=pi/2) – Pitch angle in radians.
planet (str, optional, default='Earth') – Name of the planet.
m (float, optional) – Particle mass in grams. Default is electrons.
q (float, optional) – Particle charge in statcoulombs (CGS units). Default is electrons.
- Returns:
Drift period in seconds (s).
- Return type:
float or ndarray
Notes
The drift period is the reciprocal of the drift frequency [Schulz and Lanzerotti, 1974]:
\[T_{drift} = \frac{1}{f_{drift}}\]