NAME

Physics::CPD::Stellarator - Stellarator fusion-reactor modelling for Physics::CPD

SYNOPSIS

use Physics::CPD::Stellarator;

my $w7x = Physics::CPD::Stellarator->new(
    electron_density     => 8e19,    # m^-3
    electron_temperature => 4000,    # eV
    ion_temperature      => 2000,    # eV
    magnetic_field       => 2.5,     # T
    heating_power        => 10,      # MW
);

print $w7x->device_report;

printf "ISS04 tau_E = %.3f s\n", $w7x->confinement_time_iss04;
printf "stored W    = %.1f MJ\n", $w7x->stored_energy_MJ;

# Theoretical fusion power if this design were fuelled with D-T:
$w7x->ion_temperature(15000);        # 15 keV
$w7x->electron_density(2e20);
print $w7x->power_report;
printf "P_fusion = %.1f MW,  Q = %.1f\n",
    $w7x->fusion_power_MW, $w7x->fusion_gain_Q;

# visualisations (written to PNG files)
$w7x->plot_3d( output => 'w7x_3d.png' );
$w7x->plot_cross_sections( output => 'w7x_cross.png' );
$w7x->plot_profiles( output => 'w7x_profiles.png' );
$w7x->plot_confinement_scan( parameter => 'heating_power',
                             from => 1, to => 20 );

DESCRIPTION

Physics::CPD::Stellarator is the stellarator fusion-reactor modelling submodule for Physics::CPD. It extends the generic computational-plasma dynamics engine with the geometry and engineering/plasma parameters needed to simulate a stellarator, using the Wendelstein 7-X (W7-X) device at IPP Greifswald as its default configuration. It inherits every plasma calculation of the base class and adds:

  • device parameters - major/minor radius, five field periods, coil counts, rotational transform iota, design beta limit, pulse length;

  • derived physics - aspect ratio, plasma volume and surface, the ISS04 international stellarator confinement-time scaling, stored thermal energy, the Sudo density limit, plasma-beta and density-limit fractions, the Lawson triple product, and the electron-cyclotron-heating resonant field;

  • theoretical fusion power - Bosch-Hale D-T reactivity, fusion power density and total fusion power, the neutron/alpha split, neutron wall loading and the fusion gain Q, for evaluating the design as a hypothetical D-T reactor;

  • three-dimensional geometry - the last-closed flux surface described as a VMEC-style Fourier series R(u,v), Z(u,v), the helical magnetic axis, nested flux surfaces and a set of tilted modular field coils; and

  • plotting - 3-D design diagrams, poloidal cross sections through a field period, radial profiles and confinement-scaling scans, rendered with PDL::Graphics::Gnuplot.

Geometry accessors (boundary_point, magnetic_axis, cross_section, surface_grid, modular_coils) are pure Perl and return array references, so they can be used and tested without PDL. Only the plot_* methods require PDL and PDL::Graphics::Gnuplot; they are loaded on demand and render to an image file (default terminal pngcairo), so they work on headless machines.

KEY ATTRIBUTES

config_name, major_radius (5.5 m), minor_radius (0.53 m), num_field_periods (5), iota (0.96), magnetic_field (2.5 T), heating_power (10 MW), num_nonplanar_coils (50), num_planar_coils (20), beta_limit (0.05), pulse_length (1800 s), gyrotron_frequency (140 GHz), dt_fuel_fraction (1.0, the D-T fuel-ion fraction of n_e used by the fusion-power methods), and boundary_coeffs (the Fourier boundary, overridable to model any stellarator equilibrium).

PHYSICS METHODS

aspect_ratio, plasma_volume, plasma_surface_area, rotational_transform, safety_factor, confinement_time_iss04, stored_energy / stored_energy_MJ, sudo_density_limit, beta_fraction, density_fraction, triple_product, ecrh_resonance_field, density_profile, temperature_profile, device_report.

FUSION POWER METHODS

These estimate the fusion power a stellarator of this design would produce if fuelled with a 50:50 deuterium-tritium mix. W7-X itself runs hydrogen or deuterium and produces negligible fusion power, so the numbers are a theoretical figure of merit for the geometry and operating point. The model is 0-D (it treats electron_density and ion_temperature as uniform over plasma_volume).

dt_reactivity([$Ti_keV])

Maxwell-averaged D-T reactivity <sigma v> in m^3/s at ion temperature $Ti_keV (defaults to the model ion_temperature), via the Bosch-Hale parametrisation (valid 0.2-100 keV).

fuel_ion_density

Total D-T fuel-ion density dt_fuel_fraction * electron_density [m^-3].

fusion_power_density

Volumetric fusion power (n_fuel/2)^2 <sigma v E_DT> [W/m^3].

fusion_power / fusion_power_MW

Total fusion power over the plasma volume, in W and MW.

neutron_power_MW / alpha_power_MW

The 14.07 MeV neutron power (to the blanket) and 3.52 MeV alpha power (retained to heat the plasma), in MW.

neutron_wall_load

Average neutron loading over the plasma surface [MW/m^2].

fusion_gain_Q

Fusion energy gain Q = fusion_power_MW / heating_power.

power_report

A formatted multi-line summary of the operating point and fusion output.

GEOMETRY METHODS

boundary_point($u,$v,$scale), surface_point_xyz, magnetic_axis($n), cross_section($v,$nu,$scale), surface_grid($nu,$nv,$scale), modular_coils($count,$npts).

PLOTTING METHODS

plot_3d, plot_cross_sections, plot_profiles, plot_confinement_scan. Each accepts an output filename (and optional terminal, size and method-specific options) and returns the filename it wrote.

SEE ALSO

Physics::CPD, PDL::Graphics::Gnuplot.

W7-X reference: Klinger et al., "Overview of first Wendelstein 7-X high- performance operation", Nucl. Fusion 59 (2019). ISS04 scaling: Yamada et al., Nucl. Fusion 45 (2005) 1684. D-T reactivity: H.-S. Bosch & G.M. Hale, "Improved formulas for fusion cross-sections and thermal reactivities", Nucl. Fusion 32 (1992) 611.

AUTHOR

Generated for the Physics-CPD project.

LICENSE

Copyright (C) 2026 the Physics-CPD authors.

This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. See https://www.gnu.org/licenses/gpl-3.0.html.