Skip to content

Commit b215642

Browse files
committed
Finished draft of describing SU2 options.
1 parent 8f08f9f commit b215642

File tree

2 files changed

+71
-34
lines changed

2 files changed

+71
-34
lines changed

_docs_v7/Gradients-Limiters-Grant.md

Lines changed: 69 additions & 34 deletions
Original file line numberDiff line numberDiff line change
@@ -18,17 +18,24 @@ Grant will work on:
1818
* general documenation logistics: building, markdown / html specifics, github pull requests
1919

2020
## Basics of describing what options are available and providing some references for them
21-
Do this before diving into the comparisons (which can be a lot more work)
22-
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.
21+
<!-- 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. -->
2322

2423

25-
The field `SLOPE_LIMITER_FLOW` in the `.cfg` file specifies which limiter to use, and defaults to `VENKATAKRISHNAN` (see below). Note that this option is only used if `MUSCL_FLOW = YES` (which specifies to use a second-order method).
26-
An example is shown here: https://su2code.github.io/tutorials/Laminar_Cylinder/. The [Turbulent Flat Plate example](https://su2code.github.io/tutorials/ Turbulent_Flat_Plate/) sets `SLOPE_LIMITER_TURB` (also defaulting to `VENKATAKRISHNAN`), which is used for the turbulence equations, rather than for the flow equations. Using a limiter similarly requires `MUSCL_TURB = YES` The settings `MUSCL_ADJFLOW`, `MUSCL_ADJTURB`, `SLOPE_LIMITER_ADJFLOW`, and `SLOPE_LIMITER_ADJTURB` set the corresponding options for the respective adjoint equations. For species transport, the options `MUSCL_SPECIES` and `SLOPE_LIMITER_SPECIES` are used.
24+
The field `SLOPE_LIMITER_FLOW` in the `.cfg` file specifies which limiter to use. Note that this option is only used if `MUSCL_FLOW = YES` (which specifies to use a second-order method).
25+
The [Laminar Cylinder](https://su2code.github.io/tutorials/Laminar_Cylinder/) shows an example of this.
26+
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.
27+
More possible applications of limiters are listed below.
2728

28-
<!-- There's also:
29-
% Frozen the slope limiter in the discrete adjoint formulation (NO, YES)
30-
FROZEN_LIMITER_DISC= NO
31-
-->
29+
<!-- Do I need this as a title? -->
30+
Slope Limiter Fields
31+
32+
| Configuration Field | Description | Notes |
33+
| --- | --- | --- |
34+
| `SLOPE_LIMITER_FLOW` | Flow equations | Need `MUSCL_FLOW = YES` |
35+
| `SLOPE_LIMITER_TURB` | Turbulence equations | Need `MUSCL_TURB = YES` |
36+
| `SLOPE_LIMITER_SPECIES` | Species evolution equations | Need `MUSCL_SPECIES = YES` |
37+
| `SLOPE_LIMITER_ADJFLOW` | Adjoint flow equations | Need `MUSCL_ADJFLOW = YES` |
38+
| `SLOPE_LIMITER_ADJTURB` | Adjoint turbulence equations | Need `MUSCL_ADJTURB = YES` |
3239

3340

3441
<!--
@@ -41,55 +48,77 @@ computeGradientsGreenGauss.hpp
4148
4249
-->
4350

44-
The `SLOPE_LIMITER_` options above may each be changed to use different limiters, as explained below.
51+
The `SLOPE_LIMITER_` options above may each be changed to use different limiters, which are listed and explained below.
4552

4653

47-
All of the limiters depend on variables `proj`, `delta`, and `eps`/`eps2` (and maybe `dist` for `raisedSine` in `SHARP_EDGES`)
54+
Available Limiters
4855

49-
Limiters
50-
51-
| Type | Description | Notes |
52-
| --- | --- | --- |
53-
| `NONE` | No limiter | |
54-
| `BARTH_JESPERSEN` | Barth-Jespersen | |
55-
| `VENKATAKRISHNAN` | Venkatakrishnan | |
56-
| `VENKATAKRISHNAN_WANG` | Venkatakrishnan-Wang | |
57-
| `SHARP_EDGES` | Venkatakrishnan with sharp edge modification | |
58-
| `WALL_DISTANCE` | Venkatakrishnan with wall distance modification | |
56+
| Type | Description |
57+
| --- | --- |
58+
| `NONE` | No limiter |
59+
| `BARTH_JESPERSEN` | Barth-Jespersen |
60+
| `VENKATAKRISHNAN` | Venkatakrishnan |
61+
| `VENKATAKRISHNAN_WANG` | Venkatakrishnan-Wang |
62+
| `SHARP_EDGES` | Venkatakrishnan with sharp-edge modification |
63+
| `WALL_DISTANCE` | Venkatakrishnan with wall distance modification |
64+
| `VAN_ALBADA_EDGE` | [^1] Van Albada (edge formulation) |
5965

6066

61-
The `VENKAT_LIMITER_COEFF` parameter is generally a small constant, defaulting to $0.05$, but its specific definition depends on the limiter being used.
67+
[^1]: This limiter may or may not be implemented for certain solvers. It may also suffer from problems of not outputing limiter values.
68+
<!-- TODO: Kal, maybe clarify / add some details to the above? -->
6269

63-
For the `VENKATAKRISHNAN` option, the `VENKAT_LIMITER_COEFF` parameter refers to $K$ in $\epsilon^2=\left(K\bar{\Delta} x\right)^3$, where $\bar{\Delta}$ is an average grid size. 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). Thus, a large value will approach the case of using no limiter, while too small of a value will slow the convergence.
6470

71+
The `VENKAT_LIMITER_COEFF` parameter is generally a small constant, defaulting to $$0.05$$, but its specific definition depends on the limiter being used.
72+
This is different than the small constant used to prevent division by zero, which is used for all limiters.
6573

66-
[Wang](https://doi.org/10.2514/6.1996-2091)
67-
68-
<!-- Maybe a better way to word this. -->
69-
After the number of iterations given by `LIMITER_ITER` (default $999999$), the value of the limiter will be frozen.
70-
71-
72-
73-
<!-- We can specify which limiters are applied through the fields
74-
constexpr size_t MAXNVAR = 32; -->
75-
74+
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.
75+
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).
76+
Thus, a large value will approach the case of using no limiter, while too small of a value will slow the convergence.
77+
This value depends on both the mesh and the flow variable.
78+
<!-- maybe change wording from flow variable to "field variable being limited" -->
7679

80+
<!-- ??? should this section be included ??? -->
81+
<!-- so, \bar{\Delta} is actually config.GetRefElemLength(), which refers to RefElemLength -->
82+
Similarly, the parameter `REF_ELEM_LENGTH` controls $$\bar{\Delta}$$, but the behavior of the limiter should be controlled through `VENKAT_LIMITER_COEFF`.
83+
This parameter is also used in the geometric factor of the `SHARP_EDGES` and `WALL_DISTANCE` limiters.
7784

85+
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.
86+
Note that this global operation may incur extra time costs due to communication between MPI threads.
87+
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.
7888

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

92+
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.
93+
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).
8094

95+
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".
96+
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).
8197

98+
<!-- ??? Are these limiters only for adjoints???!!! -->
8299

100+
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`.
83101

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

104+
Then, the geometric factor is given by
85105

106+
$$ \gamma (d) = \frac{1}{2} (1+d+\sin(\pi \cdot d)/ \pi) $$
86107

108+
Note that the geometric factor is nonnegative and nondecreasing in $d_{feature}$.
87109

88110

111+
<!-- Maybe missing some subsection / transitions here. -->
89112

113+
<!-- Maybe a better way to word this. -->
114+
After the number of iterations given by `LIMITER_ITER` (default $$999999$$), the value of the limiter will be frozen.
90115

91116

117+
The option `FROZEN_LIMITER_DISC` tells whether the slope limiter is to be frozen in the discrete adjoint formulation (default is `NO`).
92118

119+
120+
<!-- We can specify which limiters are applied through the fields
121+
constexpr size_t MAXNVAR = 32; -->
93122
<!--
94123
Should I mention some possible errors
95124
@@ -103,8 +132,6 @@ SU2_MPI::Error("Unknown limiter type.", CURRENT_FUNCTION);
103132
104133
-->
105134

106-
107-
108135
## Why Slope Limiters are used in FVM
109136
* TVD
110137
* Monotonic
@@ -117,6 +144,14 @@ a subsection would go here
117144
## Mathematically describe limiters available to user in SU2
118145
Also discuss their properties.
119146

147+
<!-- We need to first figure out what is going on with:
148+
1) venkatFunction, missing '2'
149+
2) Barth-Jespersen using venkatFunction and not non-smooth min/max
150+
3) Van Albada... just... what?
151+
-->
152+
153+
<!-- TODO: Kal and Grant need to resolve notation, ex: k vs. K -->
154+
120155
## Empirical comparison of the available limiters on a test problem
121156
Flowfield colored by the limiter value.
122157
Link to the Documentation on how to generate these

_docs_v7/Gradients-Limiters-Kal.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,8 @@ For many studying compressible flow or high-speed aerodynamics, the formation of
2929
<!-- high order == high accuracy, maybe change wording KM: changed wording -->
3030
<!-- oscillations can result **in** non-physical values KM: fixed grammer-->
3131
<!-- second order to second-order ? KM: fixed to add hyphen -->
32+
<!-- ??? "second order" may actually be correct when "order" is used as a noun.
33+
Definitely "second-order" when used as an adjective, but not sure if "second-order" when used as a noun. -->
3234

3335
<img src="../../docs_files/LW_example.png" width="500">
3436

0 commit comments

Comments
 (0)