List of Variables ################# The table below contains a list of variables that are used in the code and that are available for plotting / analysis. * **Name** : Name of the variable as it appears in the code. Pass a string with this name to any of the plotting functions to plot, or to the relevant ``.compute()`` method to return the calculated quantity. * **Label** : TeX label for the variable. * **Units** : Physical units for the variable. * **Description** : Description of the variable. * **Aliases** : Alternative names of the variable that are equivalent to the primary name. * **kwargs** : Optional keyword arguments that can be supplied when computing the variable. See the bottom of this page for detailed descriptions and default values of each argument. The only keyword argument that is valid for all variables is 'basis' (see explanation below). All vector quantities are computed in toroidal coordinates :math:`(R,\phi,Z)` by default. The keyword argument ``basis='xyz'`` can be used to convert the variables into Cartesian coordinates :math:`(X,Y,Z)`. ``basis`` must be one of ``{'rpz', 'xyz'}``. Our convention to denote partial derivatives is an underscore followed by the first letter of the coordinate that the partial derivative is taken with respect to. Unless otherwise specified or implied by the variable name, these partial derivatives are those of the DESC :math:`\rho, \theta, \zeta` coordinate system. For example, ``|B|_z`` is :math:`(\partial \vert B \vert / \partial\zeta)|_{\rho, \theta}`. Many quantities require special grids to compute accurately. To not burden users with such bookkeeping, when an object method such as ``eq.compute(...,override_grid=True)`` is called, DESC will automatically use a set of best grids for the computation. However, when writing objectives developers must perform the bookkeeping and ensure everything can be computed accurately on the chosen grid. desc.equilibrium.equilibrium.Equilibrium ---------------------------------------- .. csv-table:: List of Variables: desc.equilibrium.equilibrium.Equilibrium :file: desc.equilibrium.equilibrium.Equilibrium.csv :widths: 23, 15, 15, 60, 15, 15 :header-rows: 1 desc.geometry.curve.FourierRZCurve ---------------------------------- .. csv-table:: List of Variables: desc.geometry.curve.FourierRZCurve :file: desc.geometry.curve.FourierRZCurve.csv :widths: 23, 15, 15, 60, 15, 15 :header-rows: 1 desc.geometry.curve.FourierXYZCurve ----------------------------------- .. csv-table:: List of Variables: desc.geometry.curve.FourierXYZCurve :file: desc.geometry.curve.FourierXYZCurve.csv :widths: 23, 15, 15, 60, 15, 15 :header-rows: 1 desc.geometry.curve.FourierPlanarCurve -------------------------------------- .. csv-table:: List of Variables: desc.geometry.curve.FourierPlanarCurve :file: desc.geometry.curve.FourierPlanarCurve.csv :widths: 23, 15, 15, 60, 15, 15 :header-rows: 1 desc.geometry.curve.FourierXYCurve ---------------------------------- .. csv-table:: List of Variables: desc.geometry.curve.FourierXYCurve :file: desc.geometry.curve.FourierXYCurve.csv :widths: 23, 15, 15, 60, 15, 15 :header-rows: 1 desc.geometry.curve.SplineXYZCurve ---------------------------------- .. csv-table:: List of Variables: desc.geometry.curve.SplineXYZCurve :file: desc.geometry.curve.SplineXYZCurve.csv :widths: 23, 15, 15, 60, 15, 15 :header-rows: 1 desc.geometry.surface.FourierRZToroidalSurface ---------------------------------------------- .. csv-table:: List of Variables: desc.geometry.surface.FourierRZToroidalSurface :file: desc.geometry.surface.FourierRZToroidalSurface.csv :widths: 23, 15, 15, 60, 15, 15 :header-rows: 1 desc.geometry.surface.ZernikeRZToroidalSection ---------------------------------------------- .. csv-table:: List of Variables: desc.geometry.surface.ZernikeRZToroidalSection :file: desc.geometry.surface.ZernikeRZToroidalSection.csv :widths: 23, 15, 15, 60, 15, 15 :header-rows: 1 desc.coils.FourierRZCoil ------------------------ .. csv-table:: List of Variables: desc.coils.FourierRZCoil :file: desc.coils.FourierRZCoil.csv :widths: 23, 15, 15, 60, 15, 15 :header-rows: 1 desc.coils.FourierXYZCoil ------------------------- .. csv-table:: List of Variables: desc.coils.FourierXYZCoil :file: desc.coils.FourierXYZCoil.csv :widths: 23, 15, 15, 60, 15, 15 :header-rows: 1 desc.coils.FourierPlanarCoil ---------------------------- .. csv-table:: List of Variables: desc.coils.FourierPlanarCoil :file: desc.coils.FourierPlanarCoil.csv :widths: 23, 15, 15, 60, 15, 15 :header-rows: 1 desc.coils.FourierXYCoil ------------------------ .. csv-table:: List of Variables: desc.coils.FourierXYCoil :file: desc.coils.FourierXYCoil.csv :widths: 23, 15, 15, 60, 15, 15 :header-rows: 1 desc.magnetic_fields._current_potential.CurrentPotentialField ------------------------------------------------------------- .. csv-table:: List of Variables: desc.magnetic_fields._current_potential.CurrentPotentialField :file: desc.magnetic_fields._current_potential.CurrentPotentialField.csv :widths: 23, 15, 15, 60, 15, 15 :header-rows: 1 desc.magnetic_fields._current_potential.FourierCurrentPotentialField -------------------------------------------------------------------- .. csv-table:: List of Variables: desc.magnetic_fields._current_potential.FourierCurrentPotentialField :file: desc.magnetic_fields._current_potential.FourierCurrentPotentialField.csv :widths: 23, 15, 15, 60, 15, 15 :header-rows: 1 desc.coils.SplineXYZCoil ------------------------ .. csv-table:: List of Variables: desc.coils.SplineXYZCoil :file: desc.coils.SplineXYZCoil.csv :widths: 23, 15, 15, 60, 15, 15 :header-rows: 1 desc.magnetic_fields._core.OmnigenousField ------------------------------------------ .. csv-table:: List of Variables: desc.magnetic_fields._core.OmnigenousField :file: desc.magnetic_fields._core.OmnigenousField.csv :widths: 23, 15, 15, 60, 15, 15 :header-rows: 1 desc.magnetic_fields._laplace.SourceFreeField --------------------------------------------- .. csv-table:: List of Variables: desc.magnetic_fields._laplace.SourceFreeField :file: desc.magnetic_fields._laplace.SourceFreeField.csv :widths: 23, 15, 15, 60, 15, 15 :header-rows: 1 desc.magnetic_fields._laplace.FreeSurfaceOuterField --------------------------------------------------- .. csv-table:: List of Variables: desc.magnetic_fields._laplace.FreeSurfaceOuterField :file: desc.magnetic_fields._laplace.FreeSurfaceOuterField.csv :widths: 23, 15, 15, 60, 15, 15 :header-rows: 1 Optional Keyword arguments -------------------------- .. list-table:: kwargs :widths: 25 100 :header-rows: 1 * - Name - Description * - ``B0`` - _MagneticField : Field object to compute with. * - ``B_coil`` - _MagneticField : Field object to compute with. * - ``H_ISS04`` - float: ISS04 confinement enhancement factor. Default 1. * - ``M_booz`` - int: Maximum poloidal mode number for Boozer harmonics. Default 2*eq.M * - ``N_booz`` - int: Maximum toroidal mode number for Boozer harmonics. Default 2*eq.N * - ``Neigvals`` - int: number of largest eigenvalues to return, default value is 1.`If `Neigvals=2` eigenvalues are `[-1, 0, 1]` we get `[1, 0]` * - ``Y_B`` - int : Desired resolution for algorithm to compute bounce points. A reference value is ``(grid.num_theta+grid.num_zeta)//2``. If the option ``spline`` is ``True``, the bounce points are found with 𝒪(Y_B⁻¹²) error. In this case, the final error will be of order 𝒪(Y_B⁻¹⁸) in bounce integrals with (v_∥)¹ and 𝒪(Y_B⁻⁶) in bounce integrals with (v_∥)⁻¹. If the option ``spline`` is ``False``, the bounce points are found such that the bounce integrals have exponential accuracy in this parameter. * - ``_vander`` - dict[str,jnp.ndarray] : Precomputed transform matrix "dct spline". This private parameter is intended to be used only by developers for objectives. * - ``alpha`` - jnp.ndarray : Shape (num alpha, ). Starting field line poloidal labels. Default is single field line. On irrational magnetic surfaces, it is sufficient to integrate along a single field line. On a rational or near-rational surface in non-axisymmetric configurations, it is necessary to integrate along multiple field lines until the surface is covered sufficiently. * - ``angle`` - jnp.ndarray : Shape (num rho, X, Y). Angle returned by ``Bounce2D.angle``. * - ``basis_in`` - {'rpz', 'xyz'}: Basis for input params vectors, Default 'xyz' * - ``binormal_scale`` - float : Multiplier for the binormal correlation length. * - ``degree`` - int: Degree of polynomial used for fitting current profile. Default grid.num_rho-1 * - ``energy_quad`` - tuple : Optional nodes and weights for fixed energy quadrature. * - ``eval_interpolator`` - _BIESTInterpolator : Interpolator from source grid to evaluation grid on boundary. If not given, default is to interpolate to source grid. * - ``field_grid`` - Grid : Source grid used to compute magnetic field. * - ``fuel`` - str: Fusion fuel, assuming a 50/50 mix. One of {'DT'}. Default is 'DT'. * - ``gamma`` - float: Adiabatic index. Default 0 * - ``gamma_threshold`` - float : Threshold for superbanana classification. Must be in (0,1). Default is 0.2. * - ``helicity`` - tuple: Type of quasisymmetry, (M,N). Default (1,0) * - ``iota`` - float: Value of rotational transform on the Omnigenous surface. Default 1.0 * - ``method`` - Interpolation type, Default 'cubic'. See SplineXYZCurve docs for options. * - ``n_gauss`` - int: Number of quadrature points to use for estimating trapped fraction. Default 20. * - ``nufft_eps`` - float : Precision requested for interpolation with non-uniform fast Fourier transform (NUFFT). If less than ``1e-14`` then NUFFT will not be used. * - ``num_field_periods`` - int : Number of field periods to follow field line. In axisymmetric configurations, integration along the field line for a single poloidal transit between two global maxima of B is sufficient for convergence. For a 3D configuration, the magnetic surface should be covered sufficiently. * - ``num_pitch`` - int : Resolution for quadrature over velocity coordinate. * - ``num_quad`` - int : Resolution for quadrature of bounce integrals. Default is 32. This parameter is ignored if given ``quad``. * - ``num_well`` - int : Maximum number of wells to detect for each pitch and field line. Giving ``-1`` will detect all wells but due to current limitations in JAX this will have worse performance. Specifying a number that tightly upper bounds the number of wells will increase performance. In general, an upper bound on the number of wells per toroidal transit is ``Aι+C`` where ``A``, ``C`` are the poloidal and toroidal Fourier resolution of B, respectively, in straight-field line PEST coordinates, and ι is the rotational transform normalized by 2π. A tighter upper bound than ``num_well=(Aι+C)*num_transit`` is preferable. The ``check_points`` or ``plot`` methods in ``desc.integrals.Bounce2D`` are useful to select a reasonable value. This is the most important parameter to specify for performance. * - ``on_boundary`` - bool : Whether RpZcoords are on boundary surface. * - ``options`` - Laplace solver options. * - ``pitch_batch_size`` - int : Number of pitch values with which to compute simultaneously. If given ``None``, then ``pitch_batch_size`` is ``num_pitch``. Default is ``num_pitch``. * - ``potential_grid`` - LinearGrid : Grid to evaluate potential on boundary. If not given, default is to interpolate to source grid. * - ``q`` - int : Order of quadrature in polar domain. * - ``quad`` - tuple[jnp.ndarray] : Used to compute bounce integrals. Quadrature points xₖ and weights wₖ for the approximation of the integral ∫₋₁¹ f(x) dx ≈ ∑ₖ wₖ f(xₖ). * - ``quad_atol`` - float : Absolute tolerance for adaptive energy quadrature. If ``quad_atol=0.0``, then this is interpreted as a flag to use a fixed quadrature, which is faster, but less accurate. Default is 1e-6. * - ``quad_rtol`` - float : Relative tolerance for adaptive energy quadrature. * - ``radial_scale`` - float : Multiplier for the radial correlation length. * - ``shard_input_data`` - bool : Whether to shard batched input data across devices before applying chunked batching. * - ``spline`` - bool : Whether to use cubic splines to compute initial guess for bounce points instead of Chebyshev series. Default is ``True``. It can be preferable to set to ``False`` on equilibria with high ``NFP``, (such cases make smaller ``Y_B`` feasible), or on GPUs where eigenvalue solves are fast. * - ``surf_batch_size`` - int : Number of flux surfaces with which to compute simultaneously. If given ``None``, then ``surf_batch_size`` is ``grid.num_rho``. Default is ``1``. Only consider increasing if ``pitch_batch_size`` is ``None``. * - ``warn_fft`` - bool : Whether to warn if the interpolation will be lossy. Default is ``True``. * - ``zeta0`` - array: points of vanishing integrated local shear to scan over. Default 15 points linearly spaced in [-π/2,π/2]. The values ``zeta0`` correspond to values of ι ζ₀ and not ζ₀.