  Tokamak plasmas are confined by a magnetic field that limits the particle and
heat transport perpendicular to the field. Parallel to the field the ionised
particles can move freely, so to obtain confinement the field lines are
"closed" (ie. form closed surfaces of constant poloidal flux) in the core of a
tokamak. Towards, the edge, however, the field lines begin to intersect
physical surfaces, leading to interaction between neutral and ionised
particles, and the potential melting of the material surface. Simulation of
this interaction is important for predicting the performance and lifetime of
future tokamak devices such as ITER. Field-aligned coordinates are commonly
used in the simulation of tokamak plasmas due to the geometry and magnetic
topology of the system. However, these coordinates are limited in the geometry
they allow in the poloidal plane due to orthogonality requirements. A novel 3D
coordinate system is proposed herein that relaxes this constraint so that any
arbitrary, smoothly varying geometry can be matched in the poloidal plane while
maintaining a field-aligned coordinate. This system is implemented in BOUT++
and tested for accuracy using the method of manufactured solutions. A MAST edge
cross-section is simulated using a fluid plasma model and the results show
expected behaviour for density, temperature, and velocity. Finally, simulations
of an isolated divertor leg are conducted with and without neutrals to
demonstrate the ion-neutral interaction near the divertor plate and the
corresponding beneficial decrease in plasma temperature.
