Navier Stokes in Streamfunction Vorticity Formulation

Streamfunction Vorticity Navier Stokes Solver

This code solves the navier stokes equation in their stream vorticity formulation. It also solves an advection diffusion equation for a density-like tracer; the code can hence simulate variable density Boussinesq flows. The streamfunction and vorticity are solved with a traditional spectral element formulation, while the tracer is discretized with a Discontinuous Galerkin Method (DGM). DGM is the most appropriate formulation for advection dominated flows, such as those encoutered in the ocean and atmosphere. There is README documentation for the code. There is a postscript article describing the method, validation tests, notes on DGM, and experimentation on DGM discretization of the vorticity (which did not turn out to be as robust as the CGM version). The code is available upon request.

As an illustration of the model's capability we show a sample calculation of a gravity current in a straight-channel. The channel is occupied by two fluids whose density interface is initially vertical. As the heavy fluid slumps under the lighter one, Kelvin-Helmholtz rolls develop at the density and lead to vigorous mixing of the two fluids. For more details on the equations and expected behavior see for example à Tamay M. Ozgokmen, and Eric P. Chassignet, Dynamics of Two-Dimensional Turbulent Bottom Gravity Currents Journal of Physical Oceanography 2002 32 No 5: 1460-1478. The parameters for this simulation include a Prandtl number of 7 and Reynolds number of 10,0000 based on the aforementioned reference's definitions. There are 128x25 elements in the x-z directions using 14-th degree polynomials for the streamfunction and vorticity and 13-th degree polynomials for the density field. The two images below show high resolution snapshot of the density distribution before and after hitting the side-wall. Click here to see a cool low resolution (but nevertheless 87 MB) movie of the gravity current.

Hi resolution image of density front prior to hitting the side-walls.

Hi resolution image of density front after hitting the side-walls.