ParaView outputs¶
This project can export results to VTK XML formats so you can inspect them in ParaView (or any VTK-capable tool) without running the interactive GUI.
File formats¶
We use a minimal, dependency-free writer (torus_solver.paraview) that produces ASCII VTK XML files:
.vtu:UnstructuredGrid(used for winding-surface meshes, point clouds, and polylines).vtm:vtkMultiBlockDataSet(a lightweight “scene” file that references multiple.vtublocks)
In most runs, you only need to open:
scene.vtm
What gets exported¶
Exact content depends on the script, but common blocks include:
winding_surface*.vtuQuad mesh of the circular torus winding surface
Typical point data:
V: surface electric potential (electrode model)s: injected current density (electrode model)K: surface current density vector (A/m)Ktheta,Kphi,|K|: decomposed components/magnitudePhi: current potential (current-potential / REGCOIL-like model)
electrodes*.vtuPoint cloud of electrode locations on the winding surface
Typical point data:
I_A: projected electrode currents (A) with net current constrained to zerosign_I:sign(I_A)for quick thresholding/selection
target_points.vtuPoint cloud of target surface points (e.g. a VMEC boundary)
Typical point data:
Bn_over_B: normalized normal field on the target surfacen_hat: unit normalsweight: area weights (discrete surface Jacobian)
fieldlines*.vtuPolyline cells representing traced field lines
Often includes
line_idands_indexas point data for coloringSome examples optionally superpose an external ideal toroidal field \(B_\phi\propto 1/R\) in the tracer. In that case, the exported field lines correspond to the total field used for tracing.
Recommended ParaView workflow¶
Open
scene.vtmFor surfaces:
Use Color By →
|K|,V, orBn_over_BAdd Contour filters to visualize level sets
For field lines:
Use Tube to get publication-quality 3D lines
Color by
line_idor by a scalar you compute in ParaView
Notes¶
Outputs are intended to be lightweight, portable, and scriptable.
The interactive GUIs use VTK for rendering; the exporters do not require
vtkto be installed.