FluidityProject/fluidity — pull request #8 by drhodrid (2014-07-14 04:28:29+00:00)
Title: Fluidity viscous dissipation

Correctly calculate the (shear) viscous dissipation for an incompressible/compressible fluid, in multi-dimensions.

Previously, there was a routine in Fluidity which claimed to calculate 2D viscous dissipation for a Bousinessq fluid in 2D. This routine had several issues:

1. Hard-coded for 2D .
2. Limited to incompressible fluids (i.e. did not account for divergence of velocity term).
3. Did not actually calculate viscous dissipation (no viscosity was involved!), but some sort of velocity gradient tensor squared.

The new routine is more general. It has been carefully validated in another branch of fluidity. In addition, with this merge request, I have modified the test_energy_stats tests to use it, as opposed to the original routines (which have all been removed).

Note that when correctly accounting for viscosity, the integral of viscous dissipation over the entire domain changes by several orders of magnitude in these tests. However, the tests still pass (which naturally concerns me!). Perhaps the test owner could take a quick look at this as a part of the review?