desc.geometry.FourierRZToroidalSurface

class desc.geometry.FourierRZToroidalSurface(R_lmn=None, Z_lmn=None, modes_R=None, modes_Z=None, NFP=1, sym='auto', M=None, N=None, rho=1, 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.

  • M (int or None) – Maximum poloidal and toroidal mode numbers. Defaults to maximum from modes_R and modes_Z.

  • N (int or None) – Maximum poloidal and toroidal mode numbers. Defaults to maximum from modes_R and modes_Z.

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

  • 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(names[, grid, params, transforms, ...])

Compute the quantity given by name on grid.

constant_offset_surface(offset[, grid, M, ...])

Create a FourierRZSurface with constant offset from the base surface (self).

copy([deepcopy])

Return a (deep)copy of this object.

equiv(other)

Compare equivalence between DESC objects.

from_input_file(path)

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

from_qp_model([major_radius, aspect_ratio, ...])

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

from_values(coords, theta[, zeta, M, N, ...])

Create a surface from given R,Z coordinates in real space.

get_coeffs(m[, n])

Get Fourier coefficients for given mode number(s).

load(load_from[, file_format])

Initialize from file.

pack_params(p)

Convert a dictionary of parameters into a single array.

save(file_name[, file_format, file_mode])

Save the object.

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

Set specific Fourier coefficients.

unpack_params(x)

Convert a single array of concatenated parameters into a dictionary.

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.

dim_x

total number of optimizable parameters.

dimensions

dictionary of integers of sizes of each optimizable parameter.

name

Name of the surface.

optimizable_params

string names of parameters that have been declared optimizable.

params_dict

dictionary of arrays of optimizable parameters.

rho

Flux surface label.

sym

Whether or not the surface is stellarator symmetric.

x_idx

arrays of indices for each parameter in concatenated array.