Skip to content
Projects

Full examples

Complete Python examples are listed below. Each page shows the script and its plots.

  • The ASCOT5 benchmark: deposition, shine-through, heating and current.: The case of freeofcharge.ascot5.benchmark_case, an ASDEX Upgrade-sized Solov’ev equilibrium with a 2.5 MW beam of 60 keV deuterium, computed by freeofcharge and compared with the ASCOT5 results stored in benchmarks/ascot5/ascot5_results.json. BBNBI5 gives the birth profile and the shine-through along the same lines (one beamlet per freeofcharge marker) with the same stopping cross sections (Suzuki’s fit), so the deposition agrees to within its Monte Carlo noise. ascot5_main slows the ions down twice, as guiding centres with Monte Carlo Coulomb collisions until 2 T_i: once following their orbits, and once without orbits, the markers staying where they were born as in freeofcharge’s local model. The heating agrees with both to 4%; the fast-ion current agrees with the run without orbits to 15% and is 2.7 times that of the run with orbits, since about 40% of the ions are born on trapped orbits (see the documentation page “ASCOT5 benchmark”).
  • An injector from source to plasma: RF power and neutralizer gas against current drive.: A negative-ion neutral-beam injector of ITER’s size, one stage per max-models code. The deuterium RF source is a wellbalanced global model: more RF power gives a denser plasma at the same electron temperature, and the extracted D- current density is taken as 30 % of the positive-ion Bohm flux to the plasma grid, from 78 A/m^2 at 200 kW to 430 A/m^2 at 1.1 MW. Against the Child-Langmuir limit of a 9 kV first gap of 6 mm, 914 A/m^2, that is a normalized perveance from 0.09 to 0.47, and over 0.2 m^2 of apertures a D- current from 16 to 86 A. The beamlet optics come from tree-d-3d: a slit extraction gap, solved with boundary-integral electrodes and meshless space charge, gives the classic V-curve of the divergence against the perveance, smallest near 0.15, and the acceleration to 1 MeV shrinks the angles by sqrt(9 kV / 1 MV), to 1.3-7 mrad. A fixed 70 % of the extracted ions survive the accelerator. The gas neutralizer is plasmacoll’s charge-state solution, whose neutral share peaks at 57.5 % near 1.4e20 m^-2 (and agrees with the closed form to 1e-14), and a 23 m duct of 0.5 m passes a share of the Gaussian beam that falls with its divergence. The neutral beam enters freeofcharge’s ITER-like plasma at a central density of 5e19 m^-3.
  • A 1 MeV deuterium beam in an ITER-like plasma: shine-through, heating, current.: One 16.5 MW beam of 1 MeV atoms, tangent to R = 5.3 m, enters a Solov’ev equilibrium of ITER’s size (R0 = 6.2 m, outboard minor radius 1.8 m, elongation 1.7, 5.3 T) filled with deuterium and 2% helium. Each marker is a straight line attenuated with Suzuki’s stopping cross sections; the fast ions it leaves slow down on their flux surface (Stix), heating mostly the electrons at this energy and driving a current along the field. The density scan shows why a beam may only be switched on above a minimum density: the shine-through onto the inboard wall falls from 40% of the power at a central density of 1.5e19 m^-3 to 4% at 5e19 and below 0.1% at 1e20. The Solov’ev shape is wider inboard than ITER’s, and the trapped-electron correction of the current is a fit still to be checked, so the numbers show what the model computes rather than ITER’s.