FLUX: Field Line Universal relaXer
- FLUX is a computational framework that discretizes magnetic field lines as 'fluxons' to simulate magnetostatic equilibria and solar wind solutions.
- It employs a variational principle and artificial magnetofriction to achieve force-free states while strictly preserving magnetic topology.
- FLUX integrates efficient pipelines, advanced discretization, and GPU acceleration to deliver rigorous, topology-preserving solutions with reduced computational cost.
The Field Line Universal relaXer (FLUX) is a computational framework for simulating magnetostatic equilibria and solar wind solutions by evolving discrete, topology-preserving representations of magnetic fields to nonlinear, force-free configurations. FLUX utilizes a semi-Lagrangian or "fluxon" approach, in which magnetic field lines are discretized into individually preserved entities, thereby furnishing physically rigorous solutions at a computational cost intermediate between analytic extrapolation and volumetric 3D magnetohydrodynamics (MHD) (Candelaresi et al., 2014, Lowder et al., 2024).
1. Theoretical Foundations
The FLUX methodology is grounded in the variational principle of magnetic energy minimization under ideal evolution. The energy functional,
is minimized subject to the constraint that the magnetic field remains the pullback of an initial field under a diffeomorphic (smooth and invertible) Lagrangian mapping . The induced evolution, following the ideal induction equation, ensures that the field topology is strictly preserved. The associated Euler–Lagrange equation yields the Beltrami (force-free) condition:
where is constant along field lines but may vary across them (Candelaresi et al., 2014).
FLUX employs an artificial magnetofrictional dynamics to monotonically drive the system towards equilibrium:
which guarantees energy dissipation and convergence to a state where is parallel to (Candelaresi et al., 2014).
2. Discrete Fluxon Representation and Topology Preservation
FLUX discretizes magnetic fields using "fluxons," each representing a finite quantum of magnetic flux. A fluxon is composed of linear segments ("fluxels") joined at vertices, with physical quantities and force calculations defined at these points (Lowder et al., 2024). The key features of this representation are:
- Fluxon: Discrete analogue of a field line, spanning the domain with topology inherited directly from boundary conditions.
- Fluxel: Linear segment between two adjacent vertices, used as the fundamental unit for computing field strength and geometric relations.
- Vertex: Discrete points where forces (tension, pressure gradients) are evaluated and spatial positions are updated.
The topology of the fluxon ensemble is exactly preserved during force-free relaxation. Unless reconnection is explicitly invoked, the neighbor relationships and connectivities of fluxons remain fixed, ensuring that field-line connectivity is governed entirely by boundary conditions and initial configuration rather than numerical diffusion (Lowder et al., 2024).
3. Force-Free Relaxation Algorithm
FLUX enforces force-free equilibrium using discretized analogues of magnetic tension and pressure gradient forces, iteratively relocating vertices to achieve net force balance (Lowder et al., 2024):
- Curvature (Tension) Force: For vertex , the local bending angle 0 between adjacent fluxels quantifies the curvature, directly yielding the tension force:
1
- Pressure-Gradient Force: Each fluxel's local hull is formed by neighboring fluxons, defining tessellated regions. For wedge 2 with angle 3, radius 4, and outward normal 5,
6
- Vertex Displacement: The net force at each vertex,
7
determines the update,
8
where 9 is a global timestep and 0 the local minimum neighbor spacing. The squared force ratio dynamically throttles motions to ensure numerical stability as equilibrium is approached.
FLUX adaptively adds or removes vertices according to local curvature, maintaining geometric resolution only where field structure demands. This process is iterated until the per-vertex force falls below user-specified thresholds (Lowder et al., 2024).
4. Computational Pipeline and Physical Modeling
FLUXPipe orchestrates the end-to-end modeling workflow, from magnetogram ingestion through force-free relaxation to wind solution mapping (Lowder et al., 2024):
- Magnetogram Preprocessing: HMI magnetograms are reduced to manageable resolution via block-reduction, retaining total unsigned flux.
- Equal-Flux Footpoint Seeding: A Hilbert space-filling curve distributes fluxon roots such that each corresponds to identical net flux 1.
- Initial Topology via PFSS: Potential-field source-surface (PFSS) extrapolation guides the initial placement of fluxons (field lines) to the source surface, partitioning open and closed regions.
- Nonlinear Relaxation: Fluxons are iteratively relaxed by the force-free algorithm to obtain a nonlinear equilibrium.
- Wind Solution: For each open fluxon, the local cross-sectional area 2 defines the expansion factor
3
The isothermal Parker wind ODE
4
with 5, 6, is solved to generate one-dimensional, transonic wind solutions via bisection for unique critical-point crossing per fluxon.
- Outer Boundary Assembly: The wind speeds at 7 (typically 8) across all open fluxons are interpolated to a uniform spherical shell to yield global wind maps.
Boundary conditions are handled via anchored fluxon footpoints at the inner magnetogram boundary and free passage through the outer spherical shell, with closed fluxons excluded from the wind solution (Lowder et al., 2024).
5. Mimetic Lagrangian Scheme and GPU Acceleration
An alternative instantiation of FLUX adopts a Lagrangian grid in which mesh nodes represent co-moving plasma elements, and the magnetic field is updated according to the pull-back under the moving grid. Mimetic differential operators are used to compute derivatives such as 9 with higher accuracy and exact preservation of key vector calculus identities (e.g., 0):
- Mimetic Curl: The discrete curl at each node enforces Stokes' theorem exactly on mesh loops, using linear interpolation of 1 to edge midpoints. This approach yields divergence-free fields to machine precision and maintains constant magnetic flux through co-moving cell faces—ensuring strict topology preservation and eliminating numerical diffusion or artificial reconnection.
- GPU Parallelization: The Lagrangian FLUX algorithm is parallelized on graphical processing units (GPUs) using CUDA, assigning one thread per mesh node and exploiting shared memory for neighbor data. Mimetic curl evaluation is approximately 2 faster than direct finite-difference approaches, as benchmarked on representative hardware (Candelaresi et al., 2014).
6. Benchmarking, Diagnostics, and Physical Limitations
FLUX and its variants have been validated against analytic and well-studied test fields, such as the IsoHelix (analytically force-free) and Pontin09 (twisted, non-analytic) configurations (Candelaresi et al., 2014):
- Force-free Error: 3, where 4.
- Lorentz-force Norm: 5.
- Deviation from Analytic Solutions: 6.
- Grid-deformation Error: 7, analogous to 8.
Mimetic-curl FLUX achieves force-free errors 9 at 0, representing an improvement of more than four orders of magnitude versus classical finite-difference curl. The magnetic energy decays monotonically toward the analytic value only under mimetic curl. Stability requires cell convexity; extreme field-line twist on coarse grids may render the mimetic approach unstable. Direct finite-difference schemes are more robust to these deformations but at the cost of significantly diminished force-free accuracy (Candelaresi et al., 2014).
Physical limitations include the neglect of plasma pressure in the relaxation step (zero-beta assumption) and restriction of wind modeling to 1D, steady-state, isothermal solutions. Cross-fluxon MHD effects and time-dependent dynamics (e.g., CMEs, shocks) are not represented. Field-line connectivity is preserved absolutely during relaxation unless reconnection is explicitly enforced (Lowder et al., 2024).
7. Implementation, Efficiency, and Practical Utility
The core FLUX solver is implemented in C for computational efficiency, with pipeline orchestration and data management provided by Perl and Python interfaces. Parallel, topology-preserving force-free relaxation and wind solution mapping are performed at speeds orders of magnitude greater than those attainable by full 3D MHD, with typical runs (for 1 footpoints and 2 vertices per fluxon) requiring 3–4 seconds on commodity multicore hardware (Lowder et al., 2024). Output formats include 3D field data, wind maps, and field-line traces for direct integration with comparative and observational workflows.
FLUX occupies a unique position among global coronal models: it delivers nonlinear, current-carrying, topology-preserving field solutions far more efficiently than volumetric MHD, while surpassing analytic schemes such as PFSS or WSA by admitting force-free nonlinearity and maintaining explicit field-line connectivity (Lowder et al., 2024). As open-source software, FLUX extends practical access to physically rigorous but computationally tractable models for solar and astrophysical applications.