pyrfu.pyrf.shock_normal module#

pyrfu.pyrf.shock_normal.shock_normal(spec, leq90: bool = True)[source]#

Calculates shock normals with different methods. Normal vectors are calculated by methods described in [1] and references therein.

The data can be averaged values or values from the time series in matrix format. If series is from time series all parameters are calculated from a random upstream and a random downstream point. This can help set errorbars on shock angle etc. The time series input must have the same size (up- and downstream can be different), so generally the user needs to resample the data first.

Parameters:
  • spec (dict) –

    Hash table with:
    • b_u : Upstream magnetic field (nT).

    • b_d : Downstream magnetic field.

    • v_u : Upstream plasma bulk velocity (km/s).

    • v_d : Downstream plasma bulk velocity.

    • n_u : Upstream number density (cm^-3).

    • n_d : Downstream number density.

    • r_xyz : Spacecraft position in time series format of 1x3 vector. Optional.

    • d2u : Down-to-up, is 1 or -1. Optional.

    • dt_f : Time duration of shock foot (s). Optional.

    • f_cp : Reflected ion gyrofrequency (Hz). Optional.

    • n : Number of Monte Carlo particles. Optional, default is 100.

  • leq90 (bool, Optional) – Force angles to be less than 90 (default). For leq90 = 0, angles can be between 0 and 180 deg. For time series input and quasi-perp shocks,leq90 = 0 is recommended.

Returns:

out

Hash table with:
  • n : Hash table containing normal vectors (n always points toward the

upstream region). From data:

  • mc : Magnetic coplanarity (10.14)

  • vc : Velocity coplanarity (10.18)

  • mx_1 : Mixed method 1 (10.15), [2]

  • mx_2 : Mixed method 2 (10.16), [2]

  • mx_3 : Mixed method 3 (10.17), [2]

From models (only if r_xyz is included in spec):
  • theta_bn : Angle between normal vector and b_u, same fields as n.

  • theta_vn : Angle between normal vector and v_u, same fields as n.

  • v_shHash table containing shock velocities:
    • gt : Using shock foot thickness (10.32). [8]

    • mf : Mass flux conservation (10.29).

    • sb : Using jump conditions (10.33). [9]

    • mo : Using shock foot thickness

  • infoHash table containing some more info:
    • msh : Magnetic shear angle.

    • vsh : Velocity shear angle.

    • cmat : Constraints matrix with normalized errors.

    • sig : Scaling factor to fit shock models to sc position. Calculated

    from (10.9-10.13) in [1]

Return type:

dict

References

[1] (1,2)

Schwartz, S. J. (1998), Shock and Discontinuity Normals, Mach Numbers, and Related Parameters, ISSI Scientific Reports Series, vol. 1, pp. 249–270.

[2] (1,2,3)

Abraham-Shrauner, B. (1972), “Determination of magnetohydrodynamic shock normals”, Journal of Geophysical Research, vol. 77, no. 4, p. 736. doi:10.1029/JA077i004p00736.

[3]

Farris, M. H., Petrinec, S. M., and Russell, C. T. (1991), The thickness of the magnetosheath: Constraints on the polytropic index”, Geophysical Research Letters, vol. 18, no. 10, pp. 1821–1824. doi:10.1029/91GL02090.

[4]

Slavin, J. A. and Holzer, R. E. (1981), Solar wind flow about the terrestrial planets, 1. Modeling bow shock position and shape, Journal of Geophysical Research, vol. 86, no. A13, pp. 11401–11418. doi:10.1029/JA086iA13p11401.

[5]

Peredo, M., Slavin, J. A., Mazur, E., and Curtis, S. A. (1995), Three-dimensional position and shape of the bow shock and their variation with Alfvénic, sonic, and magnetosonic Mach numbers and interplanetary magnetic field orientation, Journal of Geophysical Research, vol. 100, no. A5, pp. 7907–7916. doi:10.1029/94JA02545.

[6] (1,2)

Fairfield, D. H. (1971), Average and unusual locations of the Earth’s magnetopause and bow shock, Journal of Geophysical Research, vol. 76, no. 28, p. 6700, 1971. doi:10.1029/JA076i028p06700.

[7]

Formisano, V. (1979), Orientation and Shape of the Earth’s Bow Shock in Three Dimensions, Planetary and Space Science, vol. 27, no. 9, pp. 1151–1161. doi:10.1016/0032-0633(79)90135-1.

[8]

Gosling, J. T. and Thomsen, M. F. (1985), Specularly reflected ions, shock foot thicknesses, and shock velocity determination in space, Journal of Geophysical Research, vol. 90, no. A10, pp. 9893–9896. doi:10.1029/JA090iA10p09893.

[9]

Smith, E. J. and Burton, M. E. (1988), Shock analysis: Three useful new relations, Journal of Geophysical Research, vol. 93, no. A4, pp. 2730–2734. doi:10.1029/JA093iA04p02730.