Skip to content

Added missing features for shock capturing with NavierStokesCFE and NavierStokesImplicitCFE

Issue/feature addressed

Some calls to the shock capturing routines in the Compressible Flow Solver were missing. In particular, two features were missing:

  • The possibility to use the NonSmooth (Laplacian) shock capturing functionality with the explicit compressible Naiver-Stokes solver (class NavierStokesCFE)
  • The possibility to use the Physical shock capturing functionality with the implicit compressible Naiver-Stokes solver (class NavierStokesImplicitCFE)

This MR adds these missing features.

Proposed solution

Missing calls to the shock capturing functionality were added.

Implementation

To implement the NonSmooth shock capturing functionality for the NavierStokesCFE class, the function CompressibleFlowSystem::v_DoDiffusion() was first modified. Previously, this function included a call to the shock capturing routines, which meant that only the EulerCFE class used them because the NavierStokesCFE class overrides this function. To make things consistent, the CompressibleFlowSystem::v_DoDiffusion() was first flagged as non-implemented (CompressibleFlowSystem::v_DoDiffusion() = 0;). The function EulerCFE::v_DoDiffusion() was then added. This function now has the functionality that CompressibleFlowSystem::v_DoDiffusion() had before. Since EulerCFE::v_DoDiffusion() overrides CompressibleFlowSystem::v_DoDiffusion(), the shock capturing works the same was as before for the EulerCFE class. Finally, the same calls that are present in EulerCFE::v_DoDiffusion() were added to NavierStokesCFE::v_DoDiffusion().

To add the Physical shock capturing functionality to the NavierStokesImplicitCFE class, the function NavierStokesImplicitCFE::v_DoDiffusionCoeff() was modified to include the calls that update the artificial viscosity. The exact same calls are present in NavierStokesCFE::v_DoDiffusion(), i.e., for the explicit Naiver Stokes solver that already support physical shock capturing. It has been verified that, despite the naming convention, the input to NavierStokesImplicitCFE::v_DoDiffusionCoeff() is the same as to NavierStokesCFE::v_DoDiffusion(). Therefore, the same artificial viscosity is computed by the implicit and the explicit solvers (this has also been verified). It should be mentioned that the implicit solver does a Fwd/Bwd transform, i.e., a projection of the initial conditions onto the polynomial space that spans the solution. This is not done in the explicit solver. As a result, the two solvers will only compute the same artificial viscosity if the initial conditions are spanned by the polynomial space used to represent the solution. One way to guarantee this is to start both solvers from the same .rst file.

Tests

Tests should be added, but not before !1368 (merged) has been merged into master, and the latest master has been merged into source branch of this MR.

Notes

This merge request is linked to this issue: #296 (closed)

Checklist

  • Functions and classes, or changes to them, are documented.
  • User guide/documentation is updated.
  • Changelog is updated.
  • Suitable tests added for new functionality.
  • Contributed code is correctly formatted. (See the contributing guidelines).
  • License added to any new files.
  • No extraneous files have been added (e.g. compiler output or test data files).

Warning

On the 19.07 the code formatting (code style) was standardised using clang-format, over the whole Nektar++ code. This means changes in your branch will conflict with formatting changes on the master branch. To resolve these conflicts , see #295 (closed)

Edited by Spencer Sherwin

Merge request reports