Outputs and Functions

List of main outputs provided by pyQsc and functions that can be used. Some of the functions have links to their definitions in the code in order to get more details.

Functions

  • from_paper: create a stellarator from a known configuration.

  • get_boundary: obtain the \((x,y,z)\) arrays of a boundary shape at a specific radius.

  • plot: Generate a matplotlib figure with an array of plots, showing the toroidally varying properties of the configuration.

  • plot_axis: Plot axis shape and the Frenet-Serret frame along the axis (optional).

  • plot_boundary: Plot the boundary of the near-axis configuration.

  • B_contour: Plot contours of B in the \((\vartheta,\varphi)\) plane with \((\vartheta,\varphi)\) Boozer angles

  • B_fieldline: Plot the modulus of the magnetic field B along a field line.

  • B_mag: Calculate the modulus of the magnetic field for a given set of coordinates \((r,\theta,\phi)\)

  • Bfield_cartesian: magnetic field vector in cartesian coordinates

  • Bfield_cylindrical: magnetic field vector in cylindrical coordinates

  • grad_B_tensor_cartesian: grad B tensor in cartesian coordinates

  • grad_B_tensor_cylindrical: grad B tensor in cylindrical coordinates

  • grad_grad_B_tensor_cylindrical: grad grad B tensor in cartesian coordinates

  • grad_grad_B_tensor_cartesian: grad grad B tensor in cartesian coordinates

Outputs

Scalars

  • iota: rotational transform on-axis (iota)

  • iotaN: iota-N where N is the helicity of the axis

  • axis_length: total length of the magnetic axis

  • Bbar: magnetic field normalization \(=s_\psi \times B_0\)

  • G0: lowest order Boozer function \(G_0\)

  • G2: higher order Boozer function \(G_0\)

  • beta_1s: Boozer function \(\beta_{1s}\)

  • lasym: true if stellarator-asymmetric, false otherwise

  • max_elongation: maximum elongation of the first order solution

  • mean_elongation: mean elongation of the first order solution

  • min_R0: minimum radial location of the axis

Arrays

  • sigma: sigma function related to the first-order solution

  • torsion: torsion of the axis

  • curvature: curvature of the axis

  • varphi: toroidal Boozer angle

  • phi: toroidal cylindrical angle

  • d_l_d_phi: derivative of the arclength with respect to phi

  • d_l_d_varphi: derivative of the arclength with respect to varphi

  • elongation: elongation of the first order elliptical shape

  • B20: solution of the second order magnetic field B20

  • DGeod_times_r2: DGeod term of the Mercier criterion times r2

  • DMerc_times_r2: DMerc term of the Mercier criterion times r2

  • DWell_times_r2: DWell term of the Mercier criterion times r2

  • d2_volume_d_psi2: Magnetic well

  • r_singularity: proxy for the maximum acceptable radius

Position Vector

  • Z0

  • R0

  • X1c

  • X1s

  • Y1c

  • Y1s

  • X20

  • X2c

  • X2s

  • Y20

  • Y2c

  • Y2s

  • Z20

  • Z2c

  • Z2s

  • X3c1

  • X3c3

  • X3s1

  • X3s3

  • Y3c1

  • Y3c3

  • Y3s1

  • Y3s3

  • Z3c1

  • Z3c3

  • Z3s1

  • Z3s3

Grad B

  • grad_B_tensor_cylindrical

  • grad_B_colon_grad_B

  • L_grad_B

  • L_grad_grad_B

  • inv_L_grad_B

  • min_L_grad_Bmin_L_grad_B>

  • grad_grad_B_inverse_scale_length_vs_varphi

  • L_grad_grad_B

  • grad_grad_B_inverse_scale_length

  • grad_grad_B