desc.geometry.ZernikeRZToroidalSection

class desc.geometry.ZernikeRZToroidalSection(R_lmn=None, Z_lmn=None, modes_R=None, modes_Z=None, spectral_indexing='ansi', sym='auto', L=None, M=None, zeta=0.0, name='', check_orientation=True)Source

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

Parameters:
  • R_lmn (array-like, shape(k,)) – zernike coefficients

  • Z_lmn (array-like, shape(k,)) – zernike coefficients

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

  • modes_Z (array-like, shape(k,2)) – radial and poloidal mode numbers [l,m] for Z_lmn. If None defaults to modes_R.

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

  • spectral_indexing ({'ansi', 'fringe'}) –

    Indexing method, default value = 'ansi'

    For L=0, all methods are equivalent and give a “chevron” shaped basis (only the outer edge of the zernike pyramid of width M). For L>0, the indexing scheme defines order of the basis functions:

    'ansi': ANSI indexing fills in the pyramid with triangles of decreasing size, ending in a triangle shape. For L == M, the traditional ANSI pyramid indexing is recovered. For L>M, adds rows to the bottom of the pyramid, increasing L while keeping M constant, giving a “house” shape

    'fringe': Fringe indexing fills in the pyramid with chevrons of decreasing size, ending in a diamond shape for L=2*M where the traditional fringe/U of Arizona indexing is recovered. For L > 2*M, adds chevrons to the bottom, making a hexagonal diamond

  • L (int or None) – Maximum radial and poloidal mode numbers. Defaults to max from modes_R and modes_Z.

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

  • zeta (float [0,2pi)) – toroidal angle for the section.

  • 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 radial and poloidal resolution.

compute(names[, grid, params, transforms, ...])

Compute the quantity given by name on grid.

copy([deepcopy])

Return a (deep)copy of this object.

equiv(other)

Compare equivalence between DESC objects.

get_coeffs(l[, m])

Get Zernike 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(l[, m, R, Z])

Set specific Zernike 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.

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.

spectral_indexing

Type of spectral indexing for Zernike basis.

sym

Whether or not the surface is stellarator symmetric.

x_idx

arrays of indices for each parameter in concatenated array.

zeta

Toroidal angle.