Plasma physics formulas (plasmapy.physics)¶
Introduction¶
plasmapy.physics provides theoretical formulas for calculation of physical quantities helpful for plasma physics.
The layout of the subpackage is still in flux.
The subpackage makes heavy use of astropy.units.Quantity for handling conversions between different unit systems.
This is especially important for electron volts, commonly used in plasma physics to denote temperature, although
it is technically a unit of energy.
Most functions expect astropy.units.Quantity as input, however some will use the plasmapy.utils.check_quantity decorator
to automatically cast arguments to Quantities. If that happens, you will be notified via an astropy.units.UnitsWarning.
For a general overview of how unit-based input works, take a look at the following example:
Reference/API¶
plasmapy.physics.parameters Module¶
Functions to calculate plasma parameters.
Functions¶
Alfven_speed(B, density[, ion, z_mean]) |
Return the Alfven speed. |
Debye_length(T_e, n_e) |
Calculate the characteristic decay length for electric fields, due to charge screening. |
Debye_number(T_e, n_e) |
Return the number of electrons within a sphere with a radius of the Debye length. |
Hall_parameter(n, T, B, ion_particle[, …]) |
Calculate the ratio between the particle gyrofrequency and the particle-`ion_particle collision rate. |
gyrofrequency(B[, particle, signed, Z]) |
Calculate the particle gyrofrequency in units of radians per second. |
gyroradius(B[, particle, Vperp, T_i]) |
Return the particle gyroradius. |
inertial_length(n[, particle]) |
Calculate the particle inertial length. |
ion_sound_speed(T_e, T_i[, gamma_e, …]) |
Return the ion sound speed for an electron-ion plasma. |
kappa_thermal_speed(T, kappa[, particle, method]) |
Return the most probable speed for a particle within a Kappa distribution. |
lower_hybrid_frequency(B, n_i[, ion]) |
Return the lower hybrid frequency. |
magnetic_energy_density(B) |
Calculate the magnetic energy density. |
magnetic_pressure(B) |
Calculate the magnetic pressure. |
mass_density(density, particle, z_mean) |
Utility function to merge two possible inputs for particle charge. |
plasma_frequency(n[, particle, z_mean]) |
Calculate the particle plasma frequency. |
thermal_speed(T, particle[, method, mass]) |
Return the most probable speed for a particle within a Maxwellian distribution. |
upper_hybrid_frequency(B, n_e) |
Return the upper hybrid frequency. |
plasmapy.physics.dielectric Module¶
Functions to calculate plasma dielectric parameters
Functions¶
cold_plasma_permittivity_LRP(B, species, n, …) |
Magnetized Cold Plasma Dielectric Permittivity Tensor Elements. |
cold_plasma_permittivity_SDP(B, species, n, …) |
Magnetized Cold Plasma Dielectric Permittivity Tensor Elements. |
plasmapy.physics.dimensionless Module¶
Module of dimensionless plasma parameters.
These are especially important for determining what regime a plasma is in. (e.g., turbulent, quantum, collisional, etc.).
Functions¶
quantum_theta(T, n_e) |
Compares Fermi energy to thermal kinetic energy to check if quantum effects are important. |
plasmapy.physics.distribution Module¶
Functions to deal with distribution : generate, fit, calculate
Functions¶
Maxwellian_1D(v, T[, particle, V_drift, …]) |
Returns the probability at the velocity v in m/s to find a particle particle in a plasma of temperature T following the Maxwellian distribution function. |
Maxwellian_speed_1D(v, T[, particle, …]) |
Return the probability of finding a particle with speed v in m/s in an equilibrium plasma of temperature T which follows the Maxwellian distribution function. |
Maxwellian_speed_3D(vx, vy, vz, T[, …]) |
Return the probability of finding a particle with speed components vx, vy, and vz`in m/s in an equilibrium plasma of temperature `T which follows the 3D Maxwellian distribution function. |
Maxwellian_velocity_3D(vx, vy, vz, T[, …]) |
Return the probability of finding a particle with velocity components vx, vy, and vz`in m/s in an equilibrium plasma of temperature `T which follows the 3D Maxwellian distribution function. |
kappa_velocity_1D(v, T, kappa[, particle, …]) |
Return the probability at the velocity v in m/s to find a particle particle in a plasma of temperature T following the Kappa distribution function. |
kappa_velocity_3D(vx, vy, vz, T, kappa[, …]) |
Return the probability of finding a particle with velocity components v_x, v_y, and v_z`in m/s in a suprathermal plasma of temperature `T and parameter ‘kappa’ which follows the 3D Kappa distribution function. |
plasmapy.physics.quantum Module¶
Functions for quantum parameters, including electron degenerate gases and warm dense matter.
Functions¶
Fermi_energy(n_e) |
Calculate the kinetic energy in a degenerate electron gas. |
Thomas_Fermi_length(n_e) |
Calculate the exponential scale length for charge screening for cold and dense plasmas. |
Wigner_Seitz_radius(n) |
Calculate the Wigner-Seitz radius, which approximates the inter- particle spacing. |
chemical_potential(n_e, T) |
Calculate the ideal chemical potential. |
chemical_potential_interp(n_e, T) |
Fitting formula for interpolating chemical potential between classical and quantum regimes. |
deBroglie_wavelength(V, particle) |
Calculates the de Broglie wavelength. |
minimize(fcn, params[, method, args, kws, …]) |
Perform a fit of a set of parameters by minimizing an objective (or cost) function using one of the several available methods. |
thermal_deBroglie_wavelength(T_e) |
Calculate the thermal deBroglie wavelength for electrons. |
plasmapy.physics.relativity Module¶
Functions¶
Lorentz_factor(V) |
Return the Lorentz factor. |
Notes for developers¶
Values should be returned as an Astropy Quantity in SI units.
If a quantity has several names, then the function name should be the one that provides the most physical insight into what the quantity represents. For example, ‘gyrofrequency’ indicates gyration, while Larmor frequency indicates that this frequency is somehow related to a human (or perhaps a cat?) named Larmor. Similarly, using omega_ce as a function name for this quantity will make the code less readable to people who are unfamiliar with the notation or use a different symbol.
The docstrings for plasma parameter methods should describe the physics associated with these quantities in ways that are understandable to students who are taking their first course in plasma physics while still being useful to experienced plasma physicists.