  The confinement of heat in the core of a magnetic fusion reactor is optimised
using a multidimensional optimisation algorithm. For the first time in such a
study, the loss of heat due to turbulence is modelled at every stage using
first-principles nonlinear simulations which accurately capture the turbulent
cascade and large-scale zonal flows. The simulations utilise a novel approach,
with gyrofluid treatment of the small-scale drift waves and gyrokinetic
treatment of the large-scale zonal flows. A simple near-circular equilibrium
with standard parameters is chosen as the initial condition. The figure of
merit, fusion power per unit volume, is calculated, and then two control
parameters, the elongation and triangularity of the outer flux surface, are
varied, with the algorithm seeking to optimise the chosen figure of merit. A
two-fold increase in the plasma power per unit volume is achieved by moving to
higher elongation and strongly negative triangularity.
