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.
Convert a single array of concatenated parameters into a dictionary.
Attributes
Maximum radial mode number.
Maximum poloidal mode number.
Maximum toroidal mode number.
Number of (toroidal) field periods.
Spectral basis for R.
Spectral coefficients for R.
Spectral basis for Z.
Spectral coefficients for Z.
total number of optimizable parameters.
dictionary of integers of sizes of each optimizable parameter.
Name of the surface.
string names of parameters that have been declared optimizable.
dictionary of arrays of optimizable parameters.
Flux surface label.
Whether or not the surface is stellarator symmetric.
arrays of indices for each parameter in concatenated array.