gtsimulation.magnetic_field.heliosphere#

Classes

Parker([date, magnitude, polarity, ...])

Parker spiral model of the interplanetary magnetic field with optional heliospheric current sheet (HCS), corotating interaction regions (CIR), and turbulent fluctuations (slab + 2D components).

ParkerUniform(x, y, z[, t, coeff_noise, ...])

UniformHelio([use_noise, use_reg, use_slab, ...])

class gtsimulation.magnetic_field.heliosphere.Parker(date: date | int = 0, magnitude=2.09, polarity=-1, tilt_angle=None, use_reg=True, use_hcs=True, use_cir=False, use_noise=False, use_slab=True, use_2d=True, noise_num=256, log_kmin=1, log_kmax=6, coeff_noise=0.47, coeff_2d=2.9, **kwargs)[source]#

Parker spiral model of the interplanetary magnetic field with optional heliospheric current sheet (HCS), corotating interaction regions (CIR), and turbulent fluctuations (slab + 2D components).

The regular part is the classical Parker field with a possible HCS whose tilt angle varies with the solar cycle. Turbulence is simulated as a superposition of slab and 2D modes following the approach described in [1].

Parameters:
  • date (datetime.date or int, optional) – Initial epoch. If int, interpreted as seconds from an arbitrary reference; if datetime.date, converted to Unix time (seconds since 1970-01-01). Default 0.

  • magnitude (float, default=2.09) – Magnetic field magnitude at 1 AU (nT).

  • polarity (int, default=-1) – Polarity sign of the field (+1 or -1).

  • tilt_angle (float or None, optional) – Constant tilt angle of the heliospheric current sheet (radians). If None (default), the tilt angle varies with the 11‑year solar cycle according to an empirical fit.

  • use_reg (bool, default=True) – Whether to include the regular Parker field (including HCS if enabled).

  • use_hcs (bool, default=True) – Whether to include the heliospheric current sheet modulation.

  • use_cir (bool, default=False) – Whether to include CIR effects (not implemented yet).

  • use_noise (bool, default=False) – Whether to add turbulent fluctuations.

  • use_slab (bool, default=True) – Whether to include the slab component of turbulence.

  • use_2d (bool, default=True) – Whether to include the 2D component of turbulence.

  • noise_num (int, default=256) – Number of modes used in the turbulence spectrum.

  • log_kmin (float, default=1) – Decimal logarithm of the minimum wave number (AU⁻¹).

  • log_kmax (float, default=6) – Decimal logarithm of the maximum wave number (AU⁻¹).

  • coeff_noise (float, default=0.47) – Scaling factor for the turbulent component.

  • coeff_2d (float, default=2.9) – Scaling factor for the 2D component of turbulence.

  • **kwargs – Additional arguments passed to the base class AbsBfield.

Notes

The regular Parker field is given by:

B_r = A0 / r² * HCS B_φ = -A0 / r² * ((r - rs) ω / v_sw) sinθ * HCS

where HCS is the current sheet modulation (tanh profile).

Turbulence is simulated as a sum of slab and 2D modes following the synthetic turbulence model described in [1]. The implementation closely follows the formulas provided there.

References

Examples

>>> from gtsimulation.magnetic_field.heliosphere import Parker

Create a model with default parameters (regular field only, no noise). Compute the field at Earth’s orbit (1 AU along the X-axis).

>>> model = Parker()
>>> x, y, z = 1.0, 0.0, 0.0   # coordinates in AU
>>> Bx, By, Bz = model.CalcBfield(x, y, z)
>>> print(f"B = ({Bx:.2f}, {By:.2f}, {Bz:.2f}) nT")

Override the HCS tilt angle with a constant value (e.g., 0.5 rad).

>>> model_tilt = Parker(tilt_angle=0.5)
>>> Bx_t, By_t, Bz_t = model_tilt.CalcBfield(-x, y, z)
>>> print(f"B = ({Bx:.2f}, {By:.2f}, {Bz:.2f}) nT")
CalcBfield(x, y, z, **kwargs)[source]#
static CalcTiltAngle(t)[source]#
static HCS(theta, theta0, r)[source]#
ToMeters = 149597870700.0#
UpdateState(new_date)[source]#
classmethod a(theta)[source]#
km2AU = 6.6845871222684464e-09#
omega = 2.9088820866572157e-06#
rs = 0.0232523#
to_string()[source]#
static v_wind(theta, km2AU)[source]#
years11 = 347133600#
class gtsimulation.magnetic_field.heliosphere.ParkerUniform(x, y, z, t=None, coeff_noise=2, coeff_2d=2.1, *args, **kwargs)[source]#
CalcBfield(x=None, y=None, z=None, **kwargs)[source]#
to_string()[source]#
class gtsimulation.magnetic_field.heliosphere.UniformHelio(use_noise=True, use_reg=True, use_slab=True, use_2d=True, coeff_slab=0.4, coeff_2d=39000, q=1, nu=1.6666666666666667, p=2.61, **kwargs)[source]#
CalcBfield(x, y, z, **kwargs)[source]#
ToMeters = 149597870700.0#
UpdateState(new_date)[source]#
calc_spectrum_2d(k_perp)[source]#
calc_spectrum_slab(k_par)[source]#
to_string()[source]#