coconut_tools.pyTDM.core_td.COCONUT.RBSL_util

Module to construct a Regularized Biot–Savart Law (RBSL) flux rope for COCONUT and EUHFORIA simulations in spherical coordinates.

This implementation follows the formulation from Titov et al. (2018) and builds a discrete flux rope loop plus its mirror, from which the magnetic field is derived via Biot–Savart integrals.

Typical usage:

Br, Bth, Bph = RBSL_setup(…)

Author:

Jinhan Guo (KU Leuven & Nanjing University) Adapted and integrated by Luis Linan

Functions

RBSL_flux_rope(a, F_flx, nc, nr, nth, nph, ...)

RBSL_setup(nfr, nb_r, nb_th, nb_phi, x1, x2, ...)

cart_to_sph(Ax_in, Ay_in, Az_in, xx2, xx3)

cartesian_to_spherical(x, y, z)

compute_Is(B_p, R, a)

Compute the shafranov intensity according to Titov et al. 2014 (Equation 14).

flux_rope_path(cen_lon_fr, cen_lat_fr, xc, ...)

get_lon_lat(x_in, y_in, z_in)

get_mirror_path(nfr, lon_fr, lat_fr, r_fr)

to_spheric(A, rr, tt, pph)

Transform each components of the vector potential in spherical system

x_Sph2Car(r0, theta0, phi0)

y_Sph2Car(r0, theta0, phi0)

z_Sph2Car(r0, theta0, phi0)

coconut_tools.pyTDM.core_td.COCONUT.RBSL_util.RBSL_flux_rope(a, F_flx, nc, nr, nth, nph, x_car, y_car, z_car, fr_x_ca, fr_y_ca, fr_z_ca)[source]
coconut_tools.pyTDM.core_td.COCONUT.RBSL_util.RBSL_setup(nfr, nb_r, nb_th, nb_phi, x1, x2, x3, X1, X2, X3, grid_x, grid_y, grid_z, cen_lon_fr, cen_lat_fr, xc, xh, angle_fr, hh_fr, ll_fr, a, F_flx)[source]
coconut_tools.pyTDM.core_td.COCONUT.RBSL_util.cart_to_sph(Ax_in, Ay_in, Az_in, xx2, xx3)[source]
coconut_tools.pyTDM.core_td.COCONUT.RBSL_util.cartesian_to_spherical(x, y, z)[source]
coconut_tools.pyTDM.core_td.COCONUT.RBSL_util.compute_Is(B_p, R, a)[source]

Compute the shafranov intensity according to Titov et al. 2014 (Equation 14)

Inputs

B_p : ambiant magnetic field R : major radius of the torus a : minor radius of the torus

Output

Is : Shafranov intensity

coconut_tools.pyTDM.core_td.COCONUT.RBSL_util.flux_rope_path(cen_lon_fr, cen_lat_fr, xc, xh, angle_fr, hh_fr, ll_fr, nfr, lon_fr, lat_fr, r_fr)[source]
coconut_tools.pyTDM.core_td.COCONUT.RBSL_util.get_lon_lat(x_in, y_in, z_in)[source]
coconut_tools.pyTDM.core_td.COCONUT.RBSL_util.get_mirror_path(nfr, lon_fr, lat_fr, r_fr)[source]
coconut_tools.pyTDM.core_td.COCONUT.RBSL_util.to_spheric(A, rr, tt, pph)[source]

Transform each components of the vector potential in spherical system

coconut_tools.pyTDM.core_td.COCONUT.RBSL_util.x_Sph2Car(r0, theta0, phi0)[source]
coconut_tools.pyTDM.core_td.COCONUT.RBSL_util.y_Sph2Car(r0, theta0, phi0)[source]
coconut_tools.pyTDM.core_td.COCONUT.RBSL_util.z_Sph2Car(r0, theta0, phi0)[source]