magnetic_pressure
- plasmapy.formulary.misc.magnetic_pressure(B: Quantity) Quantity [source]
Calculate the magnetic pressure.
Aliases:
pmag_
- Parameters:
B (
Quantity
) – The magnetic field in units convertible to tesla.- Returns:
p_B – The magnetic pressure in units in pascals (newtons per square meter).
- Return type:
- Raises:
UnitConversionError – If the input is not in units convertible to tesla.
ValueError – If the magnetic field strength is not a real number between \(±∞\).
- Warns:
UnitsWarning
– If units are not provided, SI units are assumed.
See also
magnetic_energy_density
returns an equivalent
Quantity
, except in units of joules per cubic meter.
Notes
The magnetic pressure is given by:
\[p_B = \frac{B^2}{2 μ_0}\]The motivation behind having two separate functions for magnetic pressure and magnetic energy density is that it allows greater insight into the physics that are being considered by the user and thus more readable code.
Examples
>>> import astropy.units as u >>> magnetic_pressure(0.1 * u.T).to(u.Pa) <Quantity 3978.87... Pa>