Geometry: the circular torus surface¶
torus-solver uses a circular torus surface as the winding surface.
Parameterization¶
We use:
\(\theta \in [0, 2\pi)\): poloidal angle (around the small circle)
\(\phi \in [0, 2\pi)\): toroidal angle (around the large circle)
with:
major radius \(R_0\)
minor radius \(a\)
\(R(\theta) = R_0 + a\cos\theta\)
The surface embedding is
Tangent vectors and metric¶
The tangent vectors are
For the circular torus, the metric coefficients are:
The surface area element is:
Unit normal¶
We define the (outward) unit normal
The sign of \(\hat{\mathbf n}\) matters for conventions (e.g. the sign of \(B\cdot \hat{\mathbf n}\)), but the common objective uses \(|B\cdot\hat{\mathbf n}|/|B|\), which is sign-invariant.
Where this lives in the code¶
Surface construction:
src/torus_solver/torus.pymake_torus_surface(...)produces:r,r_theta,r_phimetric/area quantities like
sqrt_g,G,area_weights