Create Your Own Constrained Transport Magnetohydrodynamics Simulation (With Python)

<p>In today&rsquo;s recreational coding exercise, we will simulate the&nbsp;<strong>Orszag-Tang</strong>&nbsp;vortex &mdash; a demonstration of supersonic 2D magnetohydrodynamics (MHD) turbulence &mdash; using a constrained transport finite volume algorithm. This tutorial builds on our&nbsp;<a href="https://levelup.gitconnected.com/create-your-own-finite-volume-fluid-simulation-with-python-8f9eab0b8305" rel="noopener ugc nofollow" target="_blank">Finite Volume tutorial</a>&nbsp;for the compressible Euler equations. Here, we will add a&nbsp;<em>magnetic field</em>&nbsp;coupled to the fluid flow.</p> <p>You may find the accompanying&nbsp;<a href="https://github.com/pmocz/constrainedtransport-python" rel="noopener ugc nofollow" target="_blank">Python code on github</a>.</p> <p>Before we begin, below is a gif of what running our simulation looks like:</p> <p><a href="https://levelup.gitconnected.com/create-your-own-constrained-transport-magnetohydrodynamics-simulation-with-python-276f787f537d"><strong>Click Here</strong></a></p>
Tags: Constrained