Formulary (plasmapy.formulary
)
plasmapy.formulary
provides theoretical formulas for calculation of
physical quantities helpful for plasma physics. 🧮
The subpackage makes heavy use of 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 Quantity
objects as inputs, however some will
use the validate_quantities
decorator to automatically cast arguments to Quantity
objects with the
appropriate units. If that happens, you will be notified via a
astropy.units.UnitsWarning
.
Please note that well-maintained physical constant data with units and
uncertainties can be found in astropy.constants
.
Examples
For a general overview of how unit-based input works, take a look at the following examples:
API
The formulary
subpackage contains commonly used formulae
from plasma science.
Sub-Packages & Modules
Functions to calculate classical transport coefficients. |
|
The |
|
Functions to calculate plasma density parameters. |
|
Functions to calculate plasma dielectric parameters. |
|
Module of dimensionless plasma parameters. |
|
Common distribution functions for plasmas, such as the Maxwellian or Kappa distributions. |
|
Functions for calculating particle drifts. |
|
Functions to calculate fundamental plasma frequency parameters. |
|
Functions related to ionization states and the properties thereof. |
|
Functions to calculate fundamental plasma length parameters. |
|
Define MagneticStatics class to calculate common static magnetic fields as first raised in issue #100. |
|
Mathematical formulas relevant to plasma physics. |
|
Functions for miscellaneous plasma parameter calculations. |
|
Functions for quantum parameters, including electron degenerate gases and warm dense matter. |
|
Functions for calculating quantities associated with electromagnetic radiation. |
|
Functionality for calculating relativistic quantities. |
|
Functions to calculate fundamental plasma speed parameters. |
Classes
|
Circular wire (coil) class. |
|
Classical transport coefficients (e.g. Braginskii, 1965). |
|
Finite length straight wire class. |
|
General wire class described by its parametric vector equation. |
|
Infinite straight wire class. |
|
Simple magnetic dipole — two nearby opposite point charges. |
Abstract class for magnetostatic fields. |
|
Compute collision frequencies between two slowly flowing Maxwellian populations. |
|
|
A physical body that is moving at a velocity relative to the speed of light. |
|
Output type for |
Compute collision frequencies between test particles (labeled 'a') and field particles (labeled 'b'). |
|
|
Output type for |
|
Abstract wire class for concrete wires to be inherited from. |
Functions
|
Calculate the Alfvén speed 🏎️💨. |
|
Compute the ratio of thermal pressure to magnetic pressure. |
|
The theoretical electronic stopping power for swift charged particles calculated from the Bethe formula. |
|
The lite-function version of |
|
Return the Bohm diffusion coefficient. |
|
Return the Buchsbaum frequency for a two-ion-species plasma. |
|
Calculate the ideal chemical potential. |
|
Magnetized cold plasma dielectric permittivity tensor elements. |
|
Magnetized cold plasma dielectric permittivity tensor elements. |
|
Collision frequency of particles in a plasma. |
|
Cross-section for a large angle Coulomb collision. |
|
Compute the Coulomb logarithm. |
|
Ratio of the Coulomb energy to the kinetic (usually thermal) energy. |
|
Calculate the plasma critical density for a radiation of a given frequency. |
|
Return the de Broglie wavelength. |
|
Calculate the exponential scale length for charge screening in an electron plasma with stationary ions. |
|
Return the number of electrons within a sphere with a radius of the Debye length. |
|
Calculate the diamagnetic fluid perpendicular drift. |
|
Calculate the thermal conductivity for electrons. |
|
Calculate the electron viscosity. |
|
Calculate the "electric cross magnetic" particle drift. |
|
Calculate the kinetic energy in a degenerate electron gas. |
|
Calculate the complete Fermi-Dirac integral. |
|
Calculate the general force drift for a particle in a magnetic field. |
|
Average momentum relaxation rate for a slowly flowing Maxwellian distribution of electrons. |
|
Average momentum relaxation rate for a slowly flowing Maxwellian distribution of ions. |
|
Calculate the particle gyrofrequency in units of radians per second. |
|
Calculate the radius of circular motion for a charged particle in a uniform magnetic field (including relativistic effects by default). |
|
Calculate the |
|
Impact parameters for classical and quantum Coulomb collision. |
|
Distance of the closest approach for a 90° Coulomb collision. |
|
Calculate a charged particle's inertial length. |
|
Return the ion sound speed for an electron-ion plasma. |
|
Calculate the thermal conductivity for ions. |
|
Calculate the ion viscosity. |
|
Return the average ionization state of ions in a plasma assuming that the numbers of ions in each state are equal. |
|
Return the most probable speed for a particle within a kappa distribution. |
|
Return the probability density at the velocity |
|
Return the probability density function for finding a particle with velocity components |
|
Knudsen number (dimensionless). |
Return the Lorentz factor. |
|
|
Return the lower hybrid frequency. |
|
Compute the ratio of the Alfén wave crossing timescale to the magnetic diffusion timescale. |
|
Compute the magnetic Reynolds number. |
Calculate the magnetic energy density. |
|
Calculate the magnetic pressure. |
|
|
Calculate the mass density from a number density. |
|
Probability distribution function of velocity for a Maxwellian distribution in 1D. |
|
Probability distribution function of speed for a Maxwellian distribution in 1D. |
|
Probability distribution function of speed for a Maxwellian distribution in 2D. |
|
Probability distribution function of speed for a Maxwellian distribution in 3D. |
|
Probability distribution function of velocity for a Maxwellian distribution in 2D. |
|
Probability distribution function of velocity for a Maxwellian distribution in 3D. |
|
Collisional mean free path (m). |
|
Return the electrical mobility. |
|
Compute the classical dielectric permittivity for a 1D Maxwellian plasma. |
|
Calculate the particle plasma frequency. |
|
Compare Fermi energy to thermal kinetic energy to check if quantum effects are important. |
|
Calculate the sum of the mass energy and kinetic energy of a relativistic body. |
|
Calculate the resistivity. |
|
Compute the Reynolds number. |
|
Calculates the 3D rotation matrix that will rotate vector |
|
Return the ratio of populations of two ionization states. |
|
Spitzer resistivity of a plasma. |
|
Calculate the thermalization ratio for a plasma in transit. |
|
Calculate the bremsstrahlung emission spectrum for a Maxwellian plasma in the Rayleigh-Jeans limit \(ℏ ω ≪ k_B T_e\). |
Calculate the thermal de Broglie wavelength for electrons. |
|
|
Return the thermal pressure for a Maxwellian distribution. |
|
Calculate the speed of thermal motion for particles with a Maxwellian distribution. |
|
Get the thermal speed coefficient corresponding to the desired thermal speed definition. |
|
Calculate the thermoelectric conductivity. |
|
Calculate the exponential scale length for charge screening for cold and dense plasmas. |
|
Return the upper hybrid frequency. |
Calculate the Wigner-Seitz radius, which approximates the inter-particle spacing. |
Aliases
PlasmaPy provides aliases of the most common plasma
functionality for user convenience. Aliases in PlasmaPy are
denoted with a trailing underscore (e.g., alias_
). For
further details, please refer to the contributor
guide’s section on aliases.
|
Alias to |
|
Alias to |
|
Alias to |
|
Alias to |
|
Alias to |
|
Alias to |
|
Alias to |
|
Alias to |
|
Alias to |
|
Alias to |
|
Alias to |
|
Alias to |
|
Alias to |
|
Alias to |
|
Alias to |
|
Alias to |
|
Alias to |
|
Alias to |
|
Alias to |
|
Alias to |
|
Alias to |
|
Alias to |
|
Alias to |
|
Alias to |
|
Alias to |
|
Alias to |
|
Alias to |
|
Alias to |
|
Alias for |
Lite-Functions
Lite-functions are optimized versions of existing
plasmapy
functions that are intended for applications where
computational efficiency matters most. Lite-functions accept
numbers and NumPy arrays that are implicitly assumed to be
in SI units, and do not accept Quantity
objects as inputs.
For further details, please refer to the contributor
guide’s section on lite-functions.
Caution
Lite-functions do not include the safeguards that are
included in most plasmapy.formulary
functions. When
using lite-functions, it is vital to double-check your
implementation!
|
The lite-function for |
|
The lite-function for |
|
The lite-function for |