irfpy.util.formula
¶
A collection of plasma physics related formulae.
Todo
Extended implementation should be done in
irfpy.util.physics
.
Collection of formulae which are really frequently used.
plasma frequency (
plasma_freq_mksa()
)gyro frequency
gyro radius
gyro period
Debye length
Ion acoustic velocity
Electron-volt to kelvin conversion (
eV2K()
)
The unit system is complecated.
MKSA is very useful for theory, but not for practical.
In this module, MKSA is used only when _mksa is specified in the method.
Practically, we uses km
, amu
, sec
, nT
, eV
, and so on.
Thus, most of functions uses the PPUS
(plasma physisist unit system).
For example, there are two methods to calculate Debye length.
debye_length_mksa()
is for MKSA, and debye_length()
is in PPUS.
This is for one of the typical solar wind conditon. Typical debye length is 10m.
>>> print('%.2f' % debye_length_mksa(1.6e-19, 3e6, 50000))
8.92
This is for similar condition in plasma physist unit, i.e. q=1, n=3 cm-3, and T=5eV. Returned unit is in km.
>>> print('%.4f' % debye_length(1, 3, 5))
0.0096
List of formulation¶
-
irfpy.util.formula.
plasma_afreq_mksa
(mass, charge, density)[source]¶ Returns the plasma angular frequency, wp=sqrt(n e**2)/(m eps0)
-
irfpy.util.formula.
plasma_afreq
(mass_amu, charge_qe, density__cm3)[source]¶ Returns the plasma angular frequency (wp) in plasma unit.
-
irfpy.util.formula.
plasma_afreq_el
(density__cm3)[source]¶ Returns the electron’s plasma angular frequency (wpe).
-
irfpy.util.formula.
plasma_afreq_pr
(density__cm3)[source]¶ Returns the proton’s plasma angular frequency (wppi).
-
irfpy.util.formula.
plasma_freq_mksa
(mass, charge, density)[source]¶ Returns the plasma frequency, fp = wp / 2 pi.
-
irfpy.util.formula.
gyro_afreq_mksa
(mass, charge, magfield)[source]¶ Return the gyro angular frequency in Hz, wg = qB / m.
-
irfpy.util.formula.
gyro_freq_mksa
(mass, charge, magfield)[source]¶ Return the gyro angular frequency in Hz, fg = qB / 2 pi m.
-
irfpy.util.formula.
gyro_radius_mksa
(mass, charge, magfield, velocity)[source]¶ Returns a gyro_radius, rg = v / wg = mv / qB
-
irfpy.util.formula.
gyro_radius
(mass_amu, charge_qe, magfield_nT, velocity_km_s)[source]¶ Returns a gyro_radius in the unit system of plasma scientist.
-
irfpy.util.formula.
debye_length_mksa
(charge, density, temperature)[source]¶ Returns the Debye length, Ld = sqrt( eps0 kB T / n e**2)
-
irfpy.util.formula.
debye_length
(charge_qe, density__cc, temperature_eV)[source]¶ Debye length in PPUS.
-
irfpy.util.formula.
ion_acoustic_speed_mksa
(temperature_el, mass_ion=1.67262192369e-27, gamma=3)[source]¶ Returns the ion acoustic speed in m/s.
The ion acoustic speed, S0, is calculated by S0 = sqrt( gamma * kB * Te / mi )
@param temperature_el electron temperature in K @param mass_ion Ion mass in kg @param gamma The ratio of specific heat for electrons.
-
irfpy.util.formula.
ion_acoustic_speed
(temperature_el_eV, mass_ion_amu, gamma=3)[source]¶ Returns the ion acoustic speed in km/s.
The ion acoustic speed, S0, is calculated by S0 = sqrt( gamma * kB * Te / mi )
@param temperature_el electron temperature in K @param mass_ion Ion mass in kg @param gamma The ratio of specific heat for electrons.
-
irfpy.util.formula.
eV2K
(temp_eV)[source]¶ Convert from eV to Kelvin
Electron volt is used to specify the temperature. Here the function provides the conversion from eV to K. The factor is \(q_e/k_B\sim 1.16\times 10^4\).
- Parameters
- temp_eVfloat
The temperature in electron volts.
- Returns
- temp_Kfloat
Corresponding temperature in Kelvins.