Newsletter #9, January 2026

Welcome to the first DREAM newsletter of 2026! A number of improvements to the code have now been made available on the master branch, and several exciting developments are ongoing in the spring of 2026!

The DREAM Developer Council

Latest DREAM release: version 26.01

I. Announcements

i. Publication of git guidelines

A set of guidelines for working with git and DREAM have been published to the repository. You can read them in full here.

II. New features

i. Disable solver statistics

by Mathias Hoppe

As reported in issue #462, certain information about the non-linear solver progress was always saved to the output file for every time step taken, regardless of whether the solution for that time step was saved or not. Considering that the solver information consists of simple integer arrays, it is typically negligibly small compared to other datasets in the output file. However, if the number of time steps is extremely large and only a small fraction of those steps are saved, the solver information can begin to take up an appreciable portion of the output file.

In this pull request, an option was added to the code to disable this solver information. Specifically, when disabled, the output file will not contain the solver/iterations and solver/backupinverter datasets. By default this information is saved, and to disable it you should use python ds.solver.setSaveStatistics(False)

This feature was added in pull request #465 and is now available on master.

ii. Support for multiple magnetic field max/min

by Mathias Hoppe

Since the original implementation of toroidal geometry in DREAM, the code has not allowed the use of magnetic fields which exhibit more than one minimum or maximum on one or more magnetic flux surfaces. The reason for this is that bounce averaging in such fields is complicated and requires a special numerical treatment, which DREAM at present does not provide. Until now, DREAM has therefore checked the input magnetic data for such non-monotonic magnetic fields and rejected them on initialization.

Recently, the need to run fluid simulations in non-monotonic magnetic fields arose, and it was realized that this limitation is not necessary if only flux surface averages need to be calculated. Hence, the restriction on the monotonicity of the magnetic field has been lifted in simulations which do not involve the kinetic grids. Additionally, the routines which are used to locate the minimum and maximum magnetic field points on each flux surface have been reinforced to guarantee that the global optima are recovered.

The FULL effective critical electric field model evaluates a bounce average even in fluid simulations, and so it has been restricted to only be usable in monotonic magnetic fields. In non-monotonic magnetic fields, we instead recommend the SIMPLE effective critical electric field model.

DREAM will automatically detect the properties of the magnetic field and handle it appropriately. Hence, no special setting is needed for this functionality to be used.

This feature was added in pull request #464 and is now available on master.

iii. Check for when DeltaY is invalid

by Lorenzo Votta

Until recently the code would allow non-positive values to be given for the plasmoid drift radius. Doing so would cause cryptic and difficult-to-debug error messages. In this pull request a check has been introduced in the settings part of the C++ code to ensure that the value of DeltaY is physically meaningful.

This feature was added in pull request #461 and is now available on master.

iv. Improved plotting in poloidal cross-section

by Oskar Vallhagen

The routines FluidQuantity.plotPoloidal() and SPIShardPositions.plotAtTime() have been updated. The former has been updated to allow plotting in the true poloidal cross section (previously the data was always mapped to and plotted in a circular cross section), while the latter has been updated to allow the simultaneous plotting of shards and a background fluid quantity.

An example of SPIShardPositions.plotAtTime() in an ITER simulation is shown below, and it was generated with the line

x_p.plotAtTime(
    t=20,
    backgroundQuantity=T_cold,
    displayGrid=False,
    shardColor='w',
    scaleShardsWithSize=True
)

in the py/cli/cli.py script.

Temperature in poloidal plane

This feature was added in pull request #459 and is now available on master.

v. Bootstrap current model implemented

by Peter Halldestam and Ida Ekmark

A implementation of the bootstrap current model by Redl et al. PoP 28 (2021) has been added. This model provides an analytical expression for the bootstrap current density that is fully consistent with the neoclassical conductivity formulation already available in DREAM. More details about its implementation is found in doc/notes/bootstrap_current.tex.

To include the bootstrap current density j_bs in the total current density j_tot, the following is added to the setup script

import DREAM.Settings.Equations.BoostrapCurrent as BootstrapCurrent

ds.eqsys.j_bs.setMode(BootstrapCurrent.BOOTSTRAP_MODE_ENABLED)

This will assume that the provided initial current density is the total current density. If it rather is the Ohmic current density that is provided, simply set the following initialisation mode

ds.eqsys.j_bs.setInitMode(BootstrapCurrent.BOOTSTRAP_INIT_MODE_OHMIC)

Note that as the bootstrap current depends on the radial derivatives of the various temperature and density profiles, accurately resolving it typically requires a finer radial grid than would otherwise be necessary. For SPI simulations performed at high radial resolution, it is recommended to use the Gaussian deposition kernel, as this smooths the deposited material and prevents large local gradients that could cause the bootstrap current to become unrealistically peaked.

This feature was added in pull request #478 and is now available on master.

vi. Plotting power balance for ions

by Linn Ekman

Ion power balance plots are now supported, in the same format as for electrons, but shown separately for each ion species.

do = DREAMOutput('output.h5')
do.eqsys.W_i.plotEnergybalance()

This feature was added in pull request #476 and is now available on master.

vii. Basic support for argon SPI

by Mathias Hoppe

The model used for pellet ablation in DREAM was developed for pellet consisting of mixtures of deuterium and neon. While this model contains a few basic material parameters, it is unclear if the model extrapolates well to other types of pellets. Since this is the only model available for DREAM at present, and since the need to deliver mixed deuterium and argon pellets in some simulations has arisen, it has been assumed that the model can be extrapolated and the required material parameters for argon have been implemented. This has removed the hard limitation encoded in DREAM to use argon, and therefore allows for the simulation of pellet injections with argon pellets.

We emphasize that argon pellet injections should be done with caution at this point, as we cannot guarantee the accuracy of the ablation rate for such simulations.

This feature was added in pull request #483 and is now available on master.

III. Bug fixes

i. Unintended cumulative plotting of radial/time profiles

by Mathias Hoppe

A bug was discovered in FluidQuantity.plotRadialProfile() and FluidQuantity.plotTimeProfile() which accidentally modified the data of the quantity. Subsequent calls to these routines would therefore further update the data and cause plots to change on each call. This fix ensures that data is copied before being modified so that the original data remains as in the output file.

This fix was added in pull request #467 and is now available on master.

ii. Make AnalyticB compatible with R0=inf again

by Mathias Hoppe

When implementing support for saving equilibrum contours to the output file, code had been introduced in the AnalyticB module which explicitly divided by the major radius R0. Previously, it has been possible to run the AnalyticB module with the major radius set to infinity (R0 = inf) such that the cylindrical limit is recovered. The purpose of this is to allow simulations of elongated cylindrical plasmas, such as in Fülöp et al, JPP 86 (2020).

This fix resolves the bug previously introduced, so that it is once more possible to run simulations with shaping and R0 = inf.

The fix was added in pull request #465 and is now available on master.

iii. Incorrect extrapolation of profiles with negative sign

by Peter Halldestam

Some input profiles, such as the current density or electric field, may take negative values. If such a profile is provided only for radii , and the radial grid includes one or more points between and , the profile is currently set to zero in this region when a minus sign is attached. The same is true for radial points towards the plasma edge . This behavior is appropriate for positive definite quantities (e.g. temperatures and densities), as it prevents unphysical negative values from appearing due to extrapolation.

To support profiles that can be negative, this zeroing will now be applied only when the extrapolation changes sign.

The fix was added in pull request #473 and is now available on master.

iv. Incompatibility with Python 3.14

by Mathias Hoppe

Recently Python 3.14 was released and removed the support for writing expressions such as

float(np.array([1]))

Doing so now raises an exception. Unfortunately we have relied on this type of expressions in a number of places in the code base where it must be ensured that quantities load from an HDF5 file are scalars of the appropriate type.

A new fix has been introduced to work around this problem. The function scal() has been introduced under DREAM.helpers and returns the given value as a true scalar, allowing it to be typecast into the desired type.

This fix was added in pull requests #475 and #481 and is now available on master.

IV. Recent publications