viscid.calculator.plasma module

some equations that are useful for plasmas

viscid.calculator.plasma.calc_psi(B, rev=False)[source]

Calc Flux function (only valid in 2d)

Parameters:
  • B (VectorField) – magnetic field, should only have two spatial dimensions so we can infer the symmetry dimension
  • rev (bool) – since this integration doesn’t like going through undefined regions (like within 1 earth radius of the origin for openggcm), you can use this to start integrating from the opposite corner.
Returns:

2-D scalar flux function

Return type:

ScalarField

Raises:

ValueError – If B has <> 2 spatial dimensions

viscid.calculator.plasma.calc_beta(pp, B, scale=1.0)[source]

Calc plasma beta (2.0 * p / B^2)

Parameters:
  • pp (ScalarField or ndarray) – pressure
  • B (VectorField) – magnetic field
  • scale (float, optional) – overall scale factor
Returns:

Plasma beta

Return type:

ScalarField

Note

For OpenGGCM, where pp is in pPa and B is in nT, scale should be 40.0.