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

area

aspect_ratio

Aspect ratio, \(R_\text{major} / R_\text{minor}\), using the VMEC definition.

drdtheta

drdzeta

dtheta

dzeta

major_radius

Major radius, \(R_\text{major} = V / (2 \pi^2 R_\text{minor}^2)\), where V is the enclosed volume.

mean_cross_sectional_area

Mean cross-sectional area, averaged over the physical toroidal angle:

minor_radius

Minor 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.

nzetal

r

(3, ntheta, nzetal) Cartesian position, all field periods.

theta

theta_map

The ThetaMap this surface was reparameterized by, or None if its poloidal angle is whatever its constructor produced.

volume

Enclosed 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).

zeta

One field period.

zetal

The full torus (all field periods).

nfp

stellarator_symmetric

ntheta

nzeta

standard_toroidal_angle

True 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.