Simulation of hypersonic flow within electromagnetic fields