desc.geometry.FourierRZToroidalSurface

class desc.geometry.FourierRZToroidalSurface(R_lmn=None, Z_lmn=None, modes_R=None, modes_Z=None, NFP=1, sym='auto', rho=1, grid=None, name='', check_orientation=True)[source]

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

Parameters:
  • R_lmn (array-like, shape(k,)) – Fourier coefficients for R and Z in cylindrical coordinates

  • Z_lmn (array-like, shape(k,)) – Fourier coefficients for R and Z in cylindrical coordinates

  • modes_R (array-like, shape(k,2)) – poloidal and toroidal mode numbers [m,n] for R_lmn.

  • modes_Z (array-like, shape(k,2)) – mode numbers associated with Z_lmn, defaults to modes_R

  • NFP (int) – number of field periods

  • sym (bool) – whether to enforce stellarator symmetry. Default is “auto” which enforces if modes are symmetric. If True, non-symmetric modes will be truncated.

  • rho (float (0,1)) – flux surface label for the toroidal surface

  • grid (Grid) – default grid for computation

  • name (str) – name for this surface

  • check_orientation (bool) – ensure that this surface has a right handed orientation. Do not set to False unless you are sure the parameterization you have given is right handed (ie, e_theta x e_zeta points outward from the surface).

Methods

change_resolution(*args, **kwargs)

Change the maximum poloidal and toroidal resolution.

compute_coordinates([R_lmn, Z_lmn, grid, ...])

Compute values using specified coefficients.

compute_curvature([R_lmn, Z_lmn, grid])

Compute gaussian and mean curvature.

compute_normal([R_lmn, Z_lmn, grid, basis])

Compute normal vector to surface on default grid.

compute_surface_area([R_lmn, Z_lmn, grid])

Compute surface area via quadrature.

copy([deepcopy])

Return a (deep)copy of this object.

eq(other)

Compare equivalence between DESC objects.

from_input_file(path)

Create a surface from Fourier coefficients in a DESC or VMEC input file.

from_near_axis(aspect_ratio, elongation, ...)

Create a surface from a near-axis model for quasi-poloidal/quasi-isodynamic.

get_coeffs(m[, n])

Get Fourier coefficients for given mode number(s).

load(load_from[, file_format])

Initialize from file.

save(file_name[, file_format, file_mode])

Save the object.

set_coeffs(m[, n, R, Z])

Set specific Fourier coefficients.

Attributes

L

Maximum radial mode number.

M

Maximum poloidal mode number.

N

Maximum toroidal mode number.

NFP

Number of (toroidal) field periods.

R_basis

Spectral basis for R.

R_lmn

Spectral coefficients for R.

Z_basis

Spectral basis for Z.

Z_lmn

Spectral coefficients for Z.

grid

Nodes for computation.

name

Name of the surface.

sym

Whether or not the surface is stellarator symmetric.