regcoil.FourierSurface¶
- class regcoil.FourierSurface(xm, xn, rmnc, zmns, rmns=None, zmnc=None, *, nfp, ntheta=64, nzeta=64, stellarator_symmetric=None, standard_toroidal_angle=True, numns=None, numnc=None)¶
A toroidal surface given by a double Fourier series in theta/zeta (see the module docstring for the exact R/Z/nu expansion and the standard_toroidal_angle convention).
- Parameters:
nfp (int)
ntheta (int)
nzeta (int)
stellarator_symmetric (bool)
standard_toroidal_angle (bool)
- __init__(xm, xn, rmnc, zmns, rmns=None, zmnc=None, *, nfp, ntheta=64, nzeta=64, stellarator_symmetric=None, standard_toroidal_angle=True, numns=None, numnc=None)¶
Methods
__init__(xm, xn, rmnc, zmns[, rmns, zmnc, ...])circular_torus(R0, a, nfp[, ntheta, nzeta])A plain circular-cross-section torus of major radius R0, minor radius a.
cross_section([phi])Surface cross section(s) at fixed physical toroidal angle(s).
evaluate_at(theta_pts, zeta_pts)Evaluate the surface (and its first theta/zeta derivatives) at arbitrary paired (theta, zeta) points, rather than the tensor-product grid _evaluate/r use.
plot([ax])Minimal 3D wireframe/surface plot (matplotlib).
plot_cross_section([other, phi, ax])Convenience delegate.
reparameterize_theta(scheme, *[, mpol, ...])Return a FourierSurface describing the same physical surface as self, with its poloidal angle reparameterized according to scheme (see regcoil.reparameterize).
scale(*[, length_factor, minor_radius, ...])Return a new surface, geometrically similar to self, with every length multiplied by a common factor.
scale_length(factor)Return a new surface with every length multiplied by factor.
Attributes
areaaspect_ratioAspect ratio, \(R_\text{major} / R_\text{minor}\), using the VMEC definition.
drdthetadrdzetadthetadzetamajor_radiusMajor radius, \(R_\text{major} = V / (2 \pi^2 R_\text{minor}^2)\), where V is the enclosed volume.
mean_cross_sectional_areaMean cross-sectional area, averaged over the physical toroidal angle:
minor_radiusMinor radius, \(R_\text{minor} = \sqrt{\overline{A} / \pi}\), where \(\overline{A}\) is mean_cross_sectional_area.
norm_normal(ntheta, nzeta) |N|, one field period.
normal(3, ntheta, nzetal) un-normalized surface normal, N = dr/dzeta x dr/dtheta.
nzetalr(3, ntheta, nzetal) Cartesian position, all field periods.
thetatheta_mapThe ThetaMap this surface was reparameterized by, or None if its poloidal angle is whatever its constructor produced.
volumeEnclosed volume via the coordinate-free surface integral V = |int Z (dr/dzeta x dr/dtheta)_z dtheta dzeta| (the divergence theorem applied to the field (0, 0, Z), whose divergence is 1).
zetaOne field period.
zetalThe full torus (all field periods).
nfpstellarator_symmetricnthetanzetastandard_toroidal_angleTrue if the surface's zeta parameter is the standard toroidal angle (atan2(y, x)), so a constant-zeta slice of r is a constant physical-toroidal-angle cross section.