The equations of simgeometry.objects.fourier_surface, declared on the code that implements them and checked by the tests.
A closed toroidal surface as a Fourier series, with nfp field periods.
- surface
- X(θ,φ)=(Rcosφ,Rsinφ,Z),R=m,n∑rmnccos(mθ−Nfpnφ)+rmnssin(⋅),Z=m,n∑zmnssin(mθ−Nfpnφ)+zmnccos(⋅)
- normal
- n=σ∣Xθ×Xφ∣Xθ×Xφ,σ=sign∮X⋅(Xθ×Xφ)dθdφ
- hit
- a+td=X(θ,φ):(d−Xθ−Xφ)δ=−(a+td−X),(t,θ,φ)+=δ
- closest
- θ,φmin21∣X−p∣2:Hδ=−((X−p)⋅Xθ,(X−p)⋅Xφ),Hij=Xi⋅Xj+(X−p)⋅Xij
- offset
- X′=X+δn,(R′,Z′) at φ′=φj refitted by least squares
- volume
- V=31∮X⋅ndA,A=∮∣Xθ×Xφ∣dθdφ(trapezoidal rule)
- Order
- 2
- Assumes
- VMEC's and ConStellaration's
SurfaceRZFourier: m=0…M, n=−N…N, φ the cylindrical angle; each cross-section at constant φ a simple closed curve - membership and the hit search on the triangulation of
resolution (nθ,nφ) points per poloidal turn and per field period, exact for the triangles (TriangleMesh) refine: hits moved onto the surface by Newton steps on (t,θ,φ) from the triangle's angles, to 10−12 of the surface's size; kept on the triangle if a step fails or leaves (10−12,1]- whether a segment hits is decided by the triangles: grazing segments within
triangulation_error of the surface may differ from the exact surface - offset: the normal offset is a surface at distance ∣δ∣ while ∣δ∣ is below the smallest radius of curvature of the concave parts; refitted with 2M poloidal and 2N toroidal modes by default
- the order is that of the hit fractions from the triangles alone in the angular spacing
- Built from