  The circumstellar medium around massive stars is strongly impacted by stellar
winds, radiation, and explosions. We use numerical simulations of these
interactions to constrain the current properties and evolutionary history of
various stars by comparison with observed circumstellar structures. Two- and
three-dimensional simulations of bow shocks around red supergiant stars have
shown that Betelgeuse has probably only recently evolved from a blue supergiant
to a red supergiant, and hence its bow shock is very young and has not yet
reached a steady state. We have also for the first time investigated the
magnetohydrodynamics of the photoionised H II region around the nearby runaway
O star Zeta Oph. Finally, we have calculated a grid of models of bow shocks
around main sequence and evolved massive stars that has general application to
many observed bow shocks, and which forms the basis of future work to model the
explosions of these stars into their pre-shaped circumstellar medium.
