From 4dcff98256e61d9d478e5af677859cbcfc6c80f1 Mon Sep 17 00:00:00 2001
From: Guillermo Suarez <guillermo.suarez@scicomp.uni-kl.de>
Date: Thu, 30 Jun 2022 16:27:47 +0200
Subject: [PATCH 1/5] Update the documentation of Gradients-Limiters.md

Included a section dedicated only to the gradients and limiters.
---
 _data/docs_v7.yml              |  1 +
 _docs_v7/Convective-Schemes.md |  2 +-
 _docs_v7/Gradients-Limiters.md | 39 ++++++++++++++++++++++++++++++++++
 3 files changed, 41 insertions(+), 1 deletion(-)
 create mode 100644 _docs_v7/Gradients-Limiters.md

diff --git a/_data/docs_v7.yml b/_data/docs_v7.yml
index bcf13fe6..3b083ba2 100644
--- a/_data/docs_v7.yml
+++ b/_data/docs_v7.yml
@@ -40,6 +40,7 @@
   - Physical-Definition
   - Markers-and-BC
   - Convective-Schemes
+  - Gradients-Limiters
   - Custom-Output
   - Linear-Solvers-and-Preconditioners
   - Multizone
diff --git a/_docs_v7/Convective-Schemes.md b/_docs_v7/Convective-Schemes.md
index 0195cbe8..2161153c 100755
--- a/_docs_v7/Convective-Schemes.md
+++ b/_docs_v7/Convective-Schemes.md
@@ -24,7 +24,7 @@ The options listed here do not apply to the high order DG solver.
 Convective schemes are used in the FVM discretization of convective fluxes through the faces of the dual-grid control volumes.
 They are selected via option `CONV_NUM_METHOD_FLOW` and fall under the two broad categories of central and upwind.
 Central schemes tend to be more robust whereas second order upwind schemes can be more accurate (i.e. less dissipative).
-To achieve second order upwind schemes need to be used with MUSCL reconstruction (`MUSCL_FLOW = YES`), see the "gradients and limiters" page for the MUSCL-related options.
+To achieve second order upwind schemes need to be used with MUSCL reconstruction (`MUSCL_FLOW = YES`), see the [Gradients and Limiters](/docs_v7/Gradients-Limiters) page for the MUSCL-related options.
 
 **Note:** MUSCL options have no effect on central schemes or on coarse multigrid levels in general.
 
diff --git a/_docs_v7/Gradients-Limiters.md b/_docs_v7/Gradients-Limiters.md
new file mode 100644
index 00000000..5c1d4cdb
--- /dev/null
+++ b/_docs_v7/Gradients-Limiters.md
@@ -0,0 +1,39 @@
+---
+title: Gradients and Limiters
+permalink: /docs_v7/Gradients-Limiters/
+---
+
+This page lists the gradient of the space computation methods and the limiter functions in SU2 as well as their associated options, it is not meant as a detailed theory guide but some application guidance is given nonetheless. The options listed here do not apply to the high order DG solver.
+
+---
+
+
+---
+
+## Gradient Computation ##
+The numerical method for the computation of the spatial gradients used for viscous fluxes and source terms is specified by the `NUM_METHOD_GRAD` field. The list of available options is given below:
+- `GREEN_GAUSS`: Classic gradient reconstruction based on the Green-Gauss theorem (edge-based).
+- `WEIGHTED_LEAST_SQUARES`: Compute the gradient of a field using inverse-distance-weighted approximation.
+The default option is set to `WEIGHTED_LEAST_SQUARES`.
+
+The spatial gradients method used only for upwind reconstruction is specified by the `NUM_METHOD_GRAD_RECON` field. An additional method is available:
+- `LEAST_SQUARES`: Compute the gradient of a field using unweighted Least- Squares approximation.
+
+If the `NUM_METHOD_GRAD_RECON` field is left empty or set to `NONE` it defaults to `NUM_METHOD_GRAD`.
+
+Thin Shear Layer gradient reconstruction is always used for the construction of the Jacobian.
+
+## Limiters ##
+SU2 implements limiter functions to prevent the generation of oscillations when using upwind spatial discretisations. These are specified by the config field `SLOPE_LIMITER_FLOW`. The available options are:
+- `NONE`                 : No limiter
+- `VENKATAKRISHNAN`      : Slope limiter using Venkatakrisnan method.
+- `VENKATAKRISHNAN_WANG` : Slope limiter using Venkatakrisnan method, with the small non-vanishing bias to prevent divisions by zero based on the min-to-max range of the solution.
+- `BARTH_JESPERSEN`      : Slope limiter using Barth-Jespersen method.
+- `VAN_ALBADA_EDGE`      : Slope limiter using Van Albada method.
+- `SHARP_EDGES`          : Slope limiter based on the distance to the nearest sharp edge.
+- `WALL_DISTANCE`        : Slope limiter based on wall distance.
+With the `VENKATAKRISHNAN` being the default option.
+
+The `VENKAT_LIMITER_COEFF` tunable field is used to compute the small non-vanishing bias to prevent divisions by zero, $\epsilon$. Depending on the limiter to be used this field has different interpretations. For the `VENKATAKRISHNAN` limiter it represents the constant $K$ in $\epsilon^2=\left(K\Delta x\right)^3$. We refer to [Venkatakrishnan](https://doi.org/10.1006/jcph.1995.1084) for further details. For the `VENKATAKRISHNAN_WANG` limiter it represents the constant $\epsilon^{\prime}$ in $\epsilon = \epsilon^{\prime}(q^{\text{\max}}-q^{\text{\min}})$. We refer to [Wang](https://doi.org/10.2514/6.1996-2091) for further details. For both limiters larger values of `VENKAT_LIMITER_COEFF` decrease the extent of limiting, while values approaching zero cause lower-order approximation to the solution. Larger values of `VENKAT_LIMITER_COEFF` will reduce the high frequency oscillations of the sulition making it more stable and attaining better convergence properties. On expense, the accuracy of the solution will be typycally affected. The dafault value is 0.05.
+
+The value of the limiter can be frozen after a certain amount of iterations, which can be specified in the `LIMITER_ITER`. The default value is $999999$.
\ No newline at end of file

From 1f21d6d8a0aa7ab61cb688c64abc5420d784455e Mon Sep 17 00:00:00 2001
From: suargi <64904120+suargi@users.noreply.github.com>
Date: Tue, 5 Jul 2022 14:11:41 +0200
Subject: [PATCH 2/5] Update _docs_v7/Gradients-Limiters.md

Co-authored-by: Pedro Gomes <38071223+pcarruscag@users.noreply.github.com>
---
 _docs_v7/Gradients-Limiters.md | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/_docs_v7/Gradients-Limiters.md b/_docs_v7/Gradients-Limiters.md
index 5c1d4cdb..e2b563c7 100644
--- a/_docs_v7/Gradients-Limiters.md
+++ b/_docs_v7/Gradients-Limiters.md
@@ -14,7 +14,7 @@ This page lists the gradient of the space computation methods and the limiter fu
 The numerical method for the computation of the spatial gradients used for viscous fluxes and source terms is specified by the `NUM_METHOD_GRAD` field. The list of available options is given below:
 - `GREEN_GAUSS`: Classic gradient reconstruction based on the Green-Gauss theorem (edge-based).
 - `WEIGHTED_LEAST_SQUARES`: Compute the gradient of a field using inverse-distance-weighted approximation.
-The default option is set to `WEIGHTED_LEAST_SQUARES`.
+The default value is `WEIGHTED_LEAST_SQUARES`.
 
 The spatial gradients method used only for upwind reconstruction is specified by the `NUM_METHOD_GRAD_RECON` field. An additional method is available:
 - `LEAST_SQUARES`: Compute the gradient of a field using unweighted Least- Squares approximation.

From ce4ed39a46b45de86f389a3df66f824feccca9ab Mon Sep 17 00:00:00 2001
From: suargi <64904120+suargi@users.noreply.github.com>
Date: Tue, 5 Jul 2022 14:12:10 +0200
Subject: [PATCH 3/5] Update _docs_v7/Gradients-Limiters.md

Co-authored-by: Pedro Gomes <38071223+pcarruscag@users.noreply.github.com>
---
 _docs_v7/Gradients-Limiters.md | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/_docs_v7/Gradients-Limiters.md b/_docs_v7/Gradients-Limiters.md
index e2b563c7..1b9afd14 100644
--- a/_docs_v7/Gradients-Limiters.md
+++ b/_docs_v7/Gradients-Limiters.md
@@ -24,7 +24,7 @@ If the `NUM_METHOD_GRAD_RECON` field is left empty or set to `NONE` it defaults
 Thin Shear Layer gradient reconstruction is always used for the construction of the Jacobian.
 
 ## Limiters ##
-SU2 implements limiter functions to prevent the generation of oscillations when using upwind spatial discretisations. These are specified by the config field `SLOPE_LIMITER_FLOW`. The available options are:
+SU2 implements limiter functions to prevent the generation of oscillations when using second order upwind spatial discretisations. These are specified by the config field `SLOPE_LIMITER_FLOW`. The available options are:
 - `NONE`                 : No limiter
 - `VENKATAKRISHNAN`      : Slope limiter using Venkatakrisnan method.
 - `VENKATAKRISHNAN_WANG` : Slope limiter using Venkatakrisnan method, with the small non-vanishing bias to prevent divisions by zero based on the min-to-max range of the solution.

From 85ec5fc36663fb50cbc014b32b5b87dc220156d7 Mon Sep 17 00:00:00 2001
From: suargi <64904120+suargi@users.noreply.github.com>
Date: Tue, 5 Jul 2022 14:12:19 +0200
Subject: [PATCH 4/5] Update _docs_v7/Gradients-Limiters.md

Co-authored-by: Pedro Gomes <38071223+pcarruscag@users.noreply.github.com>
---
 _docs_v7/Gradients-Limiters.md | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/_docs_v7/Gradients-Limiters.md b/_docs_v7/Gradients-Limiters.md
index 1b9afd14..ceb7545b 100644
--- a/_docs_v7/Gradients-Limiters.md
+++ b/_docs_v7/Gradients-Limiters.md
@@ -32,7 +32,7 @@ SU2 implements limiter functions to prevent the generation of oscillations when
 - `VAN_ALBADA_EDGE`      : Slope limiter using Van Albada method.
 - `SHARP_EDGES`          : Slope limiter based on the distance to the nearest sharp edge.
 - `WALL_DISTANCE`        : Slope limiter based on wall distance.
-With the `VENKATAKRISHNAN` being the default option.
+With `VENKATAKRISHNAN` being the default option.
 
 The `VENKAT_LIMITER_COEFF` tunable field is used to compute the small non-vanishing bias to prevent divisions by zero, $\epsilon$. Depending on the limiter to be used this field has different interpretations. For the `VENKATAKRISHNAN` limiter it represents the constant $K$ in $\epsilon^2=\left(K\Delta x\right)^3$. We refer to [Venkatakrishnan](https://doi.org/10.1006/jcph.1995.1084) for further details. For the `VENKATAKRISHNAN_WANG` limiter it represents the constant $\epsilon^{\prime}$ in $\epsilon = \epsilon^{\prime}(q^{\text{\max}}-q^{\text{\min}})$. We refer to [Wang](https://doi.org/10.2514/6.1996-2091) for further details. For both limiters larger values of `VENKAT_LIMITER_COEFF` decrease the extent of limiting, while values approaching zero cause lower-order approximation to the solution. Larger values of `VENKAT_LIMITER_COEFF` will reduce the high frequency oscillations of the sulition making it more stable and attaining better convergence properties. On expense, the accuracy of the solution will be typycally affected. The dafault value is 0.05.
 

From ff2c5939af3557703c19f633bc1ff0b5b7c751d1 Mon Sep 17 00:00:00 2001
From: suargi <64904120+suargi@users.noreply.github.com>
Date: Tue, 5 Jul 2022 14:13:19 +0200
Subject: [PATCH 5/5] Apply suggestions from code review

Co-authored-by: Pedro Gomes <38071223+pcarruscag@users.noreply.github.com>
---
 _docs_v7/Gradients-Limiters.md | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/_docs_v7/Gradients-Limiters.md b/_docs_v7/Gradients-Limiters.md
index ceb7545b..d5a8ef69 100644
--- a/_docs_v7/Gradients-Limiters.md
+++ b/_docs_v7/Gradients-Limiters.md
@@ -26,8 +26,8 @@ Thin Shear Layer gradient reconstruction is always used for the construction of
 ## Limiters ##
 SU2 implements limiter functions to prevent the generation of oscillations when using second order upwind spatial discretisations. These are specified by the config field `SLOPE_LIMITER_FLOW`. The available options are:
 - `NONE`                 : No limiter
-- `VENKATAKRISHNAN`      : Slope limiter using Venkatakrisnan method.
-- `VENKATAKRISHNAN_WANG` : Slope limiter using Venkatakrisnan method, with the small non-vanishing bias to prevent divisions by zero based on the min-to-max range of the solution.
+- `VENKATAKRISHNAN`      : Slope limiter using Venkatakrisnan method, with reference length of 1.
+- `VENKATAKRISHNAN_WANG` : Slope limiter using Venkatakrisnan method, with a small non-vanishing bias proportional to the min-to-max range of the solution, to avoid limiting in small regions.
 - `BARTH_JESPERSEN`      : Slope limiter using Barth-Jespersen method.
 - `VAN_ALBADA_EDGE`      : Slope limiter using Van Albada method.
 - `SHARP_EDGES`          : Slope limiter based on the distance to the nearest sharp edge.