OpenCMISS/cm — pull request #80 by dladd (2012-02-08 06:19:04+00:00)
Title: Navier Stokes analytic routines and general clean-up; add SUPG type and routine

First off, apologies that this pull is unacceptably broad- I will definitely avoid doing this again in the future. There are some formatting fixes interspersed into actual functional changes, which I now also know is to be avoided. The changes to Navier_Stokes_equations_routines.f90 in particular are extensive and a pain to go through on Github. Chris, maybe we could go through the changes during our meeting time Thursday?

That said, this was one of my development branches for a while and there are 3 main changes I've added in this pull request. I've also run these changes with the nightly and weekly tests with only the same failures we've been getting for the master

1) Streamline Upwind Petrov-Galerkin (SUPG) formulation
Added stabilizing SUPG formulation for transient Navier-Stokes problems. Stabilization weights are based on element-wise metrics (length scale, cell Reynolds #) and added to the convective terms of the jacobian and residual calculations based on the dominant velocity direction (along the streamline). I've benchmarked this against a 2D lid driven cavity problem up to Re ~5000 with results in good agreement with classic literature values.

2) Analytic types
Previously, most of the analytic types for NSE were based on unit shapes (e.g. cube, square, tet) and solved with various mixed interpolations as part of the 42 testing steps. I've left these in as they are very useful for testing but also wanted analytic types with more classic analytic solutions. Currently the only new-style analytic types that are set up are 2D Poiseuille and Taylor-Green vortex types and I will add the corresponding examples to the examples repo. I also plan on adding a Womersley type and 3D types for these.

3) General clean-up
I've taken out the intermediate matrix allocations in the jacobian and residual evaluate routines, as this significantly reduces runtime (for instance it takes less than 1/2 the time to run a make test on the FluidMechanics directory examples). I have left them in the comments in case someone wants to use them for debug purposes in the future. I've also tried to make things a bit more readable, with the Equations_set_setup routines looking more like they do in the Burgers routines along with some formatting fixes throughout.