Skip to content

Feature: Improve Navier-Stokes interior penalty implementation

Marian Piatkowski requested to merge feature/improve-ns-dg-penalty-impl into master
  • dgparameter.hh doesn't tell much what's contained in there, does it?

It contains the interior penalty parameter implementation for the Stokes / Navier-Stokes equations. Would you guess that?

Thing is, this implementation returns the wrong scaling of the face diameter in 3D. It computes the face diameter by ig.intersection().volume() which is correct in 2D but gives wrong powers in 3D. The penalty parameter also contains the scaling by the viscosity which is confusing when looking at the code in the local operators, especially at the consistency and symmetry term.

Therefore come up with a new filename, dginteriorpenaltyparameter.hh, and a new implementation that computes the face diameter from the formula derived by Paul Houston et al. (similar to convectiondiffusiondg.hh). The scaling by the viscosity is omitted, it is included in the local operators instead. Another change in the local operators is that the penalty factor is computed once outside the quadrature loop and not for every quadrature point (because there is no dependency on that). For efficiency reasons the overpenalized version of the interior penalty implementation has moved to separate class next to the non-overpenalized version.

  • changes in the user code (to avoid deprecation warnings and possibly undefined behaviour):
    • provide the type of interior penalty (overpenalized or not) to the parameter class but in contrast to before don't create an instance of it. This is done for you internally in the parameter class.

    • symmetric and non-symmetric interior penalty can now be specified through an ini-file. The same thing holds for the penalty parameter.

      See the dune-pdelab-howto for an example of changes (in a same named branch).

Merge request reports

Loading