Draft: Add positivity-preserving entropy-based adaptive filtering for Euler and NS equations
Issue/feature addressed
This merge request introduces the positivity-preserving entropy-based adaptive filtering method for the 1D Euler equation. The method is designed to function both as a shock-capturing mechanism and as a stabilization technique, particularly useful for initialising challenging flow conditions.
Proposed solution
An adaptive filtering method for shock capturing for the compressible flow solver is implemented. This methodology does not require problem-dependent parameter tuning.
Implementation
In this code, an abstract base class called Filtering
is implemented, which serves as an interface for different filtering methods. The Filtering
class provides a common encapsulation for filtering, allowing derived classes to implement specific filtering techniques. A derived class called PositivityPreservingEntropy
is created, which inherits from Filtering
and provides a specific filtering implementation. The derived class overrides and implements the pure virtual functions v_Apply
defined in Filtering through polymorphism, allowing different filtering techniques to be utilized interchangeably through the base Filtering interface.
In order to be able to apply the filtering technique, two pure virtual functions (methods) are implemented in the UnsteadySystem
class. The functions are v_PreIntegrateFiltering
and v_PostIntegrateFiltering
. The v_PreIntegrateFiltering
is implemented since the filtering method needs to obtain the entropy constraint minimum before the time integration. Then after the integration the v_PostIntegrateFiltering
is called to filter the solution. Note that the implementation of these methods happen in the CompressibleFlowSymtem
class because we need access to the VariableConverter
class.
Tests
The test case below were added
solvers/CompressibleFlowSolver/Tests/SodShockTube1D_filtering_PPEB.xml
- This test case checks the filtering method for the explicit Euler solver.
Notes
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).