Skip to content

Commit 18397a5

Browse files
committed
More changes and changing subtitles
1 parent 7674883 commit 18397a5

File tree

1 file changed

+42
-29
lines changed

1 file changed

+42
-29
lines changed

_docs_v7/Gradients-Limiters.md

Lines changed: 42 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,8 @@ Write a brief summary once we are done with most of this.
77
Generally, the documenation is written with one sentence per line.
88

99
---
10-
10+
<!-- TODO: add/update a table of contents -->
11+
- [Available Limiter Options](#available-limiter-options)
1112

1213
---
1314
<!--
@@ -24,7 +25,7 @@ Kal will work on:
2425
* general documentation logistics, formatting, CURC navigation -->
2526

2627

27-
## Basics of describing what options are available and providing some references for them
28+
## Available Limiter Options
2829
<!-- Also we assume that the user will know the theory, and that they are just looking for the limiters that are available in SU2 first. -->
2930

3031

@@ -33,8 +34,8 @@ The [Laminar Cylinder](https://su2code.github.io/tutorials/Laminar_Cylinder/) sh
3334
The [Turbulent Flat Plate example](https://su2code.github.io/tutorials/Turbulent_Flat_Plate/) sets `SLOPE_LIMITER_TURB`, which is used for the turbulence equations, rather than for the flow equations.
3435
More possible applications of limiters are listed below.
3536

36-
<!-- Do I need this as a title? -->
37-
Slope Limiter Fields
37+
38+
### Slope Limiter Fields
3839

3940
| Configuration Field | Description | Notes |
4041
| --- | --- | --- |
@@ -49,61 +50,72 @@ Slope Limiter Fields
4950
CLimiterDetails.hpp:
5051
computeLimiters.hpp uses computeLimiters_impl.hpp and really just sets the limiter
5152
computeLimiters_impl.hpp passes computation of field values (cell averages), gradients, and to the limiter
52-
5353
also check out
54-
computeGradientsGreenGauss.hpp
55-
54+
computeGradientsGreenGauss.hpp (and the least squares one)
5655
-->
5756

5857
The `SLOPE_LIMITER_` options above may each be changed to use different limiters, which are listed and explained below.
58+
<!-- Add a note about the DG solver -->
59+
**Note:** the Discontinuous-Galerkin methods (DG) / Higher-order methods (HOM) do not use limiters.
60+
<!-- Maybe should point to somewhere that explains why not / what is done instead -->
5961

6062

61-
Available Limiters
63+
### Available Limiters
6264

63-
| Type | Description | Note |
65+
| Type | Description | Notes |
6466
| --- | --- | --- |
6567
| `NONE` | No limiter | |
6668
| `BARTH_JESPERSEN` | Barth-Jespersen | |
6769
| `VENKATAKRISHNAN` | Venkatakrishnan | |
6870
| `VENKATAKRISHNAN_WANG` | Venkatakrishnan-Wang | |
69-
| `SHARP_EDGES` | Venkatakrishnan with sharp-edge modification | |
70-
| `WALL_DISTANCE` | Venkatakrishnan with wall distance modification | |
71-
| `VAN_ALBADA_EDGE` | Van Albada (edge formulation) | This limiter may or may not be implemented for certain solvers [^1] |
71+
| `SHARP_EDGES` | Venkatakrishnan with sharp-edge modification | This limiter should not be used for flow solvers |
72+
| `WALL_DISTANCE` | Venkatakrishnan with wall distance modification | This limiter should not be used for flow solvers |
73+
| `VAN_ALBADA_EDGE` | Van Albada (edge formulation) | This limiter may or may not be implemented for certain solvers, and it may also suffer from other issues, such as not outputing limiter values |
7274

73-
[^1]: It may also suffer from problems of not outputing limiter values.
74-
<!-- TODO: Kal, maybe clarify / add some details to the above? -->
75+
<!-- TODO: Kal, maybe clarify / add some details to the above? For van albada -->
76+
<!-- ??? Van Albada. It's possible that we actually have this backward and Van Albada is the only limiter that works for other solvers??? -->
77+
<!-- We're currently investigating if Barth-Jespersen is Venkat with K=0 -->
7578

79+
The default limiter is `VENKATAKRISHNAN`.
80+
81+
### Limiter Parameters and Further Details
7682

7783
The `VENKAT_LIMITER_COEFF` parameter is generally a small constant, defaulting to $$0.05$$, but its specific definition depends on the limiter being used.
78-
This is different than the small constant used to prevent division by zero, which is used for all limiters.
84+
This is different than the small constant used to prevent division by zero, which is used in all these limiters.
85+
<!-- ^ I'm refering to: `static Type epsilon() {return std::numeric_limits<passivedouble>::epsilon();}` in CLimiterDetails.hpp -->
7986

8087
For the `VENKATAKRISHNAN`, `SHARP_EDGES`, and `WALL_DISTANCE` limiters, the `VENKAT_LIMITER_COEFF` parameter refers to $$K$$ in $$\epsilon^2=\left(K\bar{\Delta} \right)^3$$, where $$\bar{\Delta}$$ is an average grid size.
8188
The $$K$$ parameter defines a threshold, below which oscillations are not damped by the limiter, as described by [Venkatakrishnan](https://doi.org/10.1006/jcph.1995.1084).
82-
Thus, a large value will approach the case of using no limiter, while too small of a value will slow the convergence.
83-
This value depends on both the mesh and the flow variable.
89+
Thus, a large value will approach the case of using no limiter with undamped oscillations, while too small of a value will slow the convergence and add extra diffusion.
90+
This value depends on both the mesh and the flow variable and thus should be reduced if the mesh is refined.
8491
<!-- maybe change wording from flow variable to "field variable being limited" -->
8592

86-
<!-- ??? should this section be included ??? -->
93+
<!-- ??? should we include the definition of the venkat limiter (Delta -, Delta +, eps function) from the paper ??? -->
94+
<!-- ^^^ then we would also need to define Delta - and Delta +, which gets tricky. -->
95+
96+
<!-- ??? should this section on Ref_Elem_Length be included ??? -->
8797
<!-- so, \bar{\Delta} is actually config.GetRefElemLength(), which refers to RefElemLength -->
8898
Similarly, the parameter `REF_ELEM_LENGTH` controls $$\bar{\Delta}$$, but the behavior of the limiter should be controlled through `VENKAT_LIMITER_COEFF`.
89-
This parameter is also used in the geometric factor of the `SHARP_EDGES` and `WALL_DISTANCE` limiters.
99+
The `REF_ELEM_LENGTH` parameter is also used in the geometric factor of the `SHARP_EDGES` and `WALL_DISTANCE` limiters.
90100

91101
When using the `VENKATAKRISHNAN_WANG` limiter, `VENKAT_LIMITER_COEFF` is instead $$\varepsilon '$$ in $$\varepsilon = \varepsilon ' (q_{max} - q_{min})$$, where $$q_{min}$$ and $$q_{max}$$ are the respective *global* minimum and maximum of the field variable being limited.
92102
Note that this global operation may incur extra time costs due to communication between MPI threads.
93-
Based on the original work by [Wang](https://doi.org/10.2514/6.1996-2091) introducing this limiter suggests using `VENKAT_LIMITER_COEFF` in the range of $$[0.01, 0.20]$$, where again larger values approach the case of using no limiter.
103+
The original work by [Wang](https://doi.org/10.2514/6.1996-2091) suggests using `VENKAT_LIMITER_COEFF` in the range of $$[0.01, 0.20]$$, where again larger values approach the case of using no limiter.
94104

95105
The `NONE`, `BARTH_JESPERSEN`, `VENKATAKRISHNAN`, and `VENKATAKRISHNAN_WANG` limiter options all have no **geometric modifier**.
96106
A geometric modifier increases limiting near walls or sharp edges. This is done by multiplying the limiter value by a **geometric factor**.
97107

98108
For both the `SHARP_EDGES` and `WALL_DISTANCE` limiters, the influence of the geometric modifier is controlled with `ADJ_SHARP_LIMITER_COEFF` which defaults to 3.0.
109+
**Note:** these limiters should not be used for flow solvers.
110+
<!-- ??? If they're not used for flow solvers, when are they used? Just for adjoints, or also for Turbulent equations or species ???-->
111+
<!-- Based on the answer above, we need to change things to add more info. -->
99112
Increasing this parameter will decrease the value of the limiter and thus make the field more diffusive and less oscillatory near the feature (sharp edge or wall).
100113

101114
In the `SHARP_EDGES` limiter, the qualification of what makes an edge "sharp" is described by the parameter `REF_SHARP_EDGES` (defaults to 3.0). Increasing this will make more edges qualify as "sharp".
102115
Other than the addition of this geometric factor, these limiters are the same as the `VENKATAKRISHNAN` limiter and should also use `VENKAT_LIMITER_COEFF` (given by $$K$$ below).
103116

104-
<!-- ??? Are these limiters only for adjoints???!!! -->
105-
106117
Specifically, given the distance to the feature, $$d_{\text{feature}}$$, an intermediate measure of the distance, $$d$$, is calculated. The parameter $$c$$ is set by `ADJ_SHARP_LIMITER_COEFF`.
118+
<!-- ??? Might need to change notation here. Couldn't find any resources to match their notation, so I chose my own.??? -->
107119

108120
$$ d(d_{\text{feature}}; c, K) = \frac{d_{\text{feature}}} { (c \cdot K \bar{\Delta}) } - 1$$
109121

@@ -126,7 +138,7 @@ The option `FROZEN_LIMITER_DISC` tells whether the slope limiter is to be frozen
126138
<!-- We can specify which limiters are applied through the fields
127139
constexpr size_t MAXNVAR = 32; -->
128140
<!--
129-
Should I mention some possible errors
141+
???Should I mention some possible errors???
130142
131143
SU2_MPI::Error("Too many dimensions to compute limiters.", CURRENT_FUNCTION);
132144
SU2_MPI::Error("Unknown limiter type.", CURRENT_FUNCTION);
@@ -138,7 +150,7 @@ SU2_MPI::Error("Unknown limiter type.", CURRENT_FUNCTION);
138150
139151
-->
140152

141-
## Why are slope limiters used in a Finite Volume Method?
153+
## Theory: Purpose of Slope Limiters
142154
For many studying compressible flow or high-speed aerodynamics, the formation of shock discontinuities are a common occurrence. The use of high-order numerical schemes are desired to resolve these regions as the strength of the shock largely governs the behavior of the downstream flowfield. However, linear high-resolution schemes often result in numerical oscillations near the shock due to high-frequency content associated with the shock. These oscillations can result in non-physical values (e.g. negative density) that greatly degrade the accuracy of your solution and pollute the domain. An example of this phenomena is shown below with the Lax-Wendroff scheme for scalar advection. Although the Lax-Wendroff method is second-order, note that it introduces numerical oscillations that result in the state value of $$u$$ becoming negative.
143155

144156
<!-- high order == high accuracy, maybe change wording KM: changed wording -->
@@ -190,11 +202,12 @@ The inclusion of a slope limiter into a TVD scheme accomplishes this idea.
190202

191203

192204

205+
<!-- ## Mathematically describe limiters available to user in SU2 -->
206+
<!-- ??? do we need to include this section??? -->
207+
<!-- It would make more sense to include the limiters in the section above -->
193208

194-
## Mathematically describe limiters available to user in SU2
195-
Also discuss their properties.
196-
197-
<!-- TODO: Reorganize -->
209+
<!-- TODO: Reorganize? -->
210+
<!-- Maybe change transition above if we remove this section. -->
198211

199212

200213
<!-- TODO: Kal and Grant need to resolve notation, ex: k vs. K -->
@@ -214,6 +227,6 @@ From the above example we note:
214227
* The **Lax-Wendroff** scheme produces oscillations near sudden gradients due to dispersion errors. From Godunov's theorem this is expected as the scheme is second-order accurate and does not utilize a limiter.
215228
* The **Barth-Jespersen** limiter performs well for most of the waveforms. However, the Barth-Jespersen limtier is known to be compressive and will turn smooth waves into square waves. This is best seen with the value discontinuity on the very left.
216229
* The **Van-Albada** limiter also performs well. It is slightly more diffusive than Barth-Jespersen but has robust convergence properties.
217-
* The **Venkatakrishnan** limiter is similar to the Barth-Jespersen and has significantly improved convergence properties. However, it is more diffusive and does require a user-specified parameter $$k$$ that is flow dependent.
230+
* The **Venkatakrishnan** limiter is similar to the Barth-Jespersen and has significantly improved convergence properties. However, it is more diffusive and does require a user-specified parameter $$K$$ that is flow dependent.
218231

219232
<!-- Maybe we should add a small conclusion too? KM: agreed. Talk on Thursday. -->

0 commit comments

Comments
 (0)