coconut_tools.pyTDM.core_td.formula_TDm

Functions

TDm_setup(x1, x2, x3, alpha_0, theta_0, ...)

Set up in spherical coordinates of the flux-rope using TDm and its local coordinates.

base_rotation(X, Y, Z, alpha_0, theta_0, phi_0)

Perform the rotation of the base but in the inverse order with respect to the vector

cart_TDm_setup(x, y, z, d, a, R, I, zeta, ...)

Set up of the flux-rope using TDm and its local coordinates

compute_Is(B_p, R, a)

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

cube_rotation(x_comp, y_comp, z_comp, ...)

Performs the (de)rotation of the components using 3 cubes for each components

rotation_matrix(theta_0, phi_0)

rotation_matrix_axes(alpha, axe)

Compute the rotation of an angle alpha of a 3D vector around the axe 'axe' which can be x,y,z

to_spheric(A, rr, tt, pph)

Transform each components of the vector potential in spherical system

coconut_tools.pyTDM.core_td.formula_TDm.TDm_setup(x1, x2, x3, alpha_0, theta_0, phi_0, d, a, R, zeta, B_p, Delta, case, geometry)[source]

Set up in spherical coordinates of the flux-rope using TDm and its local coordinates.

The TDm is built on a cartesian geometry and, if needed, converted in spherical geometry.

Inputs:

r : radial distance theta : polar angle phi : azimuthal angle d : depth at which the torus is buried a : minor radius of the torus R : major radius of the torus B_p : ambiant magnetic field zeta : Modulation of Shafranov intensity I : Intensity of the torus Delta : case : TDm case (‘first’ or ‘second’) geometry : output geometry of B (‘spherical’ or ‘cartesian’)

Outputs

B : magnetic field in “geometry” coordinates

coconut_tools.pyTDM.core_td.formula_TDm.base_rotation(X, Y, Z, alpha_0, theta_0, phi_0)[source]

Perform the rotation of the base but in the inverse order with respect to the vector

Inputs:

X,Y,Z (3D meshgrid) coordinates in the local cartesian plane alpha_0,theta_0 and phi_0 are the angle of rotation to apply

Outputs:

new_x,new_y,new_y new axes with the “derotation” applied

coconut_tools.pyTDM.core_td.formula_TDm.cart_TDm_setup(x, y, z, d, a, R, I, zeta, Delta, case)[source]

Set up of the flux-rope using TDm and its local coordinates

Inputs:

x,y,z are in global cartesian system F = 3 / ( 5 * np.sqrt(2)) * I * a

Outputs

A_tot : vector potential

coconut_tools.pyTDM.core_td.formula_TDm.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.formula_TDm.cube_rotation(x_comp, y_comp, z_comp, alpha_0, theta_0, phi_0)[source]

Performs the (de)rotation of the components using 3 cubes for each components

coconut_tools.pyTDM.core_td.formula_TDm.rotation_matrix(theta_0, phi_0)[source]
coconut_tools.pyTDM.core_td.formula_TDm.rotation_matrix_axes(alpha, axe)[source]

Compute the rotation of an angle alpha of a 3D vector around the axe ‘axe’ which can be x,y,z

coconut_tools.pyTDM.core_td.formula_TDm.to_spheric(A, rr, tt, pph)[source]

Transform each components of the vector potential in spherical system