desc.geometry.FourierRZToroidalSurface.from_shape_parameters
- classmethod FourierRZToroidalSurface.from_shape_parameters(major_radius=10.0, aspect_ratio=10.0, elongation=1.0, triangularity=0.0, squareness=0.0, eccentricity=0.0, torsion=0.0, twist=0.0, NFP=1, sym=True)Source
Create a surface using a generalized Miller parameterization.
- Parameters:
major_radius (float > 0) – Average major radius.
aspect_ratio (float > 0) – Ratio of major radius / minor radius.
elongation (float > 0) – Elongation of the cross section = major axis / minor axis. Value of 1 gives a circular cross section. Value > 1 gives vertical elongated cross section, value < 1 gives horizontally elongated section.
triangularity (float) – Positive triangularity makes a “▷” like cross section, negative triangularity makes a “◁” like cross section. Surface may self-intersect if abs(triangularity) > 1
squareness (float) – Positive squareness makes a “□” type cross section. Negative squareness makes a “+” like cross section. Surface may self-intersect if abs(squareness) > 0.5
eccentricity (float in [0, 1)) – Eccentricity of the magnetic axis. Value of 0 gives circular axis, value of 1 gives infinitely elongated axis.
torsion (float) – How non-planar the magnetic axis is.
twist (float) – How many times the cross section rotates per field period. For integer values it is a rigid rotation in phi, for non-integer values it also deforms as it goes around toroidally. Values > 0 give a CCW rotation, values < 0 give CW rotation. Cross section has zero volume if abs(twist)%1 == 1/2.
NFP (int) – Number of field periods.
sym (bool (optional)) – Whether to enforce stellarator symmetry.
- Returns:
surface (FourierRZToroidalSurface) – Surface with given geometric properties.