Equilibrium, Surfaces, and Profile classes

Equilibrium

The Equilibrium is the core class representing an MHD equilibrium configuration. An EquilibriaFamily is a list like object for storing multiple equilibria.

desc.equilibrium.Equilibrium([Psi, NFP, L, ...])

Equilibrium is an object that represents a plasma equilibrium.

desc.equilibrium.EquilibriaFamily(*args)

EquilibriaFamily stores a list of Equilibria.

The Equilibrium class may be instantiated in a couple of ways in addition to providing inputs to its constructor. - from an existing DESC or VMEC input file with its from_input_file method - from a pyQSC Qsc or pyQIC Qic near-axis equilibrium with the Equilibrium’s from_near_axis method

Geometry

The desc.geometry module contains important classes such as FourierRZToroidalSurface for representing the shape of the plasma boundary, as well as classes for representing the magnetic axis, cross section, and various space curves.

desc.geometry.FourierRZToroidalSurface([...])

Toroidal surface represented by Fourier series in poloidal and toroidal angles.

desc.geometry.FourierRZCurve([R_n, Z_n, ...])

Curve parameterized by Fourier series for R,Z in terms of toroidal angle phi.

desc.geometry.FourierXYZCurve([X_n, Y_n, ...])

Curve parameterized by Fourier series for X,Y,Z in terms of an arbitrary angle s.

desc.geometry.FourierPlanarCurve([center, ...])

Curve that lies in a plane.

desc.geometry.FourierXYCurve([center, ...])

Curve that lies in a plane.

desc.geometry.SplineXYZCurve(X, Y, Z[, ...])

Curve parameterized by spline knots in X,Y,Z.

desc.geometry.ZernikeRZToroidalSection([...])

A toroidal cross section represented by a Zernike polynomial in R,Z.

The FourierRZToroidalSurface and the FourierRZCurve classes may be instantiated from an existing DESC or VMEC input file with their from_input_file method.

Profiles

desc.profiles contains objects representing 1-D flux functions such as pressure, current, rotational transform, temperature, or density. It is also possible to combine profiles together by addition, multiplication, or scaling.

desc.profiles.PowerSeriesProfile([params, ...])

Profile represented by a monic power series.

desc.profiles.SplineProfile([values, knots, ...])

Radial profile represented by a piecewise cubic spline.

desc.profiles.MTanhProfile([params, name])

Profile represented by a modified hyperbolic tangent + polynomial.

desc.profiles.TwoPowerProfile([params, name])

Profile represented by two powers.

desc.profiles.HermiteSplineProfile(f, df[, ...])

Radial profile represented by a piecewise cubic Hermite spline.

desc.profiles.ScaledProfile(scale, profile, ...)

Profile times a constant value.

desc.profiles.ProductProfile(*profiles, **kwargs)

Product of two or more Profiles.

desc.profiles.SumProfile(*profiles, **kwargs)

Sum of two or more Profiles.

desc.profiles.PowerProfile(power, profile, ...)

Profile raised to a power.

desc.profiles.FourierZernikeProfile([...])

Possibly anisotropic profile represented by Fourier-Zernike basis.

Utilities

desc.compat has utility functions for enforcing sign conventions or rescaling equilibria to a given size and/or field strength.

desc.compat.ensure_positive_jacobian(eq)

Convert an Equilibrium to have a positive coordinate Jacobian.

desc.compat.flip_helicity(eq)

Change the sign of the helicity of an Equilibrium.

desc.compat.flip_theta(eq)

Change the gauge freedom of the poloidal angle of an Equilibrium.

desc.compat.rescale(eq[, L, B, ...])

Rescale an Equilibrium in size L and magnetic field strength B.

desc.compat.rotate_zeta(eq, angle[, copy])

Rotate the equilibrium about the toroidal direction.

desc.compat.contract_equilibrium(eq, inner_rho)

Contract an equilibrium so that an inner flux surface is the new boundary.