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 anglesB_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 coordinatesBfield_cylindrical: magnetic field vector in cylindrical coordinatesgrad_B_tensor_cartesian: grad B tensor in cartesian coordinatesgrad_B_tensor_cylindrical: grad B tensor in cylindrical coordinatesgrad_grad_B_tensor_cylindrical: grad grad B tensor in cartesian coordinatesgrad_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 axisaxis_length: total length of the magnetic axisBbar: 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 otherwisemax_elongation: maximum elongation of the first order solutionmean_elongation: mean elongation of the first order solutionmin_R0: minimum radial location of the axis
Arrays
sigma: sigma function related to the first-order solutiontorsion: torsion of the axiscurvature: curvature of the axisvarphi: toroidal Boozer anglephi: toroidal cylindrical angled_l_d_phi: derivative of the arclength with respect to phid_l_d_varphi: derivative of the arclength with respect to varphielongation: elongation of the first order elliptical shapeB20: solution of the second order magnetic field B20DGeod_times_r2: DGeod term of the Mercier criterion times r2DMerc_times_r2: DMerc term of the Mercier criterion times r2DWell_times_r2: DWell term of the Mercier criterion times r2d2_volume_d_psi2: Magnetic wellr_singularity: proxy for the maximum acceptable radius
Position Vector
Z0R0X1cX1sY1cY1sX20X2cX2sY20Y2cY2sZ20Z2cZ2sX3c1X3c3X3s1X3s3Y3c1Y3c3Y3s1Y3s3Z3c1Z3c3Z3s1Z3s3
Grad B
grad_B_tensor_cylindricalgrad_B_colon_grad_BL_grad_BL_grad_grad_Binv_L_grad_Bmin_L_grad_Bmin_L_grad_B>grad_grad_B_inverse_scale_length_vs_varphiL_grad_grad_Bgrad_grad_B_inverse_scale_lengthgrad_grad_B