# magnetic_pressure¶

plasmapy.formulary.parameters.magnetic_pressure(B: Unit("T")) -> Unit("Pa")

Calculate the magnetic pressure.

Aliases: pmag_

Parameters: B (Quantity) – The magnetic field in units convertible to tesla. p_B – The magnetic pressure in units in pascals (newtons per square meter). Quantity TypeError – If the input is not a Quantity. UnitConversionError – If the input is not in units convertible to tesla. ValueError – If the magnetic field strength is not a real number between +/- infinity. ~astropy.units.UnitsWarning – If units are not provided, SI units are assumed

Notes

The magnetic pressure is given by:

$p_B = \frac{B^2}{2 \mu_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.

magnetic_energy_density()
returns an equivalent Quantity, except in units of joules per cubic meter.
>>> from astropy import units as u