Default value of RefElemLength
snow54 opened this issue · 3 comments
What should the default value of RefElemLength in the code below be? The comment says it is 0.1 but the code says 1.0, which are inconsistent.
/*--- Length based parameter for slope limiters uses a default value of
0.1m ---*/
RefElemLength = 1.0;
if (SystemMeasurements == US) RefElemLength /= 0.3048;
Line 4696 in 9f082de
For shape optimization, when I set ADJ_SHARP_LIMITER_COEFF to default (3.0) and set SENS_REMOVE_SHARP to YES, surface sensitivity becomes zero within fairly large distance from the sharp edges. The cutoff distance is defined by the product of ADJ_SHARP_LIMITER_COEFF (AdjSharp_LimiterCoeff) and RefElemLength, so RefElemLength seems to be too large.
SU2/SU2_CFD/src/solvers/CDiscAdjSolver.cpp
Line 488 in 9f082de
Because of this, I'm assuming that the default value of RefElemLength should have been 0.1 instead of 1.0. However, I realized that RefElemLength is used by the slope limiters as well, and I'm currently not sure about the impact of changing this variable.
I am investigating myself but if someone knows the intent of this variable or the implementation of the slope limiters, I would like to ask for your help before I open PR.
It should be 1, if you have time please open a PR to fix the comment. You can adjust the sharp edge coefficient instead of changing the default.
Thank you for your quick response. I'll open a PR to fix the comment.
Do you happen to know why the default value of ADJ_SHARP_LIMITER_COEFF is set to 3? It makes surface sensitivity zero for large areas and screws up shape optimization. It took me a while to find out that this variable is the cause. I think the default value should be something that works for most users.
I don’t know, but we can change it to something else.