  The interstellar medium in the Milky Way's Central Molecular Zone (CMZ) is
known to be strongly magnetised, but its large-scale morphology and impact on
the gas dynamics are not well understood. We explore the impact and properties
of magnetic fields in the CMZ using three-dimensional non-self gravitating
magnetohydrodynamical simulations of gas flow in an external Milky Way barred
potential. We find that: (1) The magnetic field is conveniently decomposed into
a regular time-averaged component and an irregular turbulent component. The
regular component aligns well with the velocity vectors of the gas everywhere,
including within the bar lanes. (2) The field geometry transitions from
parallel to the Galactic plane near $z=0$ to poloidal away from the plane. (3)
The magneto-rotational instability (MRI) causes an in-plane inflow of matter
from the CMZ gas ring towards the central few parsecs of $0.01-0.1$ M$_\odot$
yr$^{-1}$ that is absent in the unmagnetised simulations. However, the magnetic
fields have no significant effect on the larger-scale bar-driven inflow that
brings the gas from the Galactic disc into the CMZ. (4) A combination of bar
inflow and MRI-driven turbulence can sustain a turbulent vertical velocity
dispersion of $\sigma_z \simeq 5$ km s$^{-1}$ on scales of $20$ pc in the CMZ
ring. The MRI alone sustains a velocity dispersion of $\sigma_z \simeq 3$ km
s$^{-1}$. Both these numbers are lower than the observed velocity dispersion of
gas in the CMZ, suggesting that other processes such as stellar feedback are
necessary to explain the observations. (5) Dynamo action driven by differential
rotation and the MRI amplifies the magnetic fields in the CMZ ring until they
saturate at a value that scales with the average local density as $B \simeq 102
(n/10^3 cm^{-3})^{0.33}$ $\mu$G. Finally, we discuss the implications of our
results within the observational context in the CMZ.
