[WIP] Implementation of Amplification Factor Transport(AFT) 2019b tranistion model#2422
[WIP] Implementation of Amplification Factor Transport(AFT) 2019b tranistion model#2422sun5k wants to merge 13 commits intosu2code:developfrom
Conversation
Primary back up
Test for SAAFT2019b
Renew_Min_Max
AFT2017b
Test_Strain
pcarruscag
left a comment
There was a problem hiding this comment.
Thanks 👍 Looks good but we can re-use a lot of code from the LM solver and see the question about the aux var gradient which looks suspicious.
SU2_CFD/include/numerics/turbulent/transition/trans_correlations.hpp
Outdated
Show resolved
Hide resolved
SU2_CFD/include/numerics/turbulent/transition/trans_diffusion.hpp
Outdated
Show resolved
Hide resolved
| switch (config->GetKind_Gradient_Method()) { | ||
| case GREEN_GAUSS: | ||
| SetAuxVar_Gradient_GG(geometry, config); | ||
| break; | ||
| case WEIGHTED_LEAST_SQUARES: | ||
| SetAuxVar_Gradient_LS(geometry, config); | ||
| default: | ||
| break; | ||
| } |
There was a problem hiding this comment.
Why are you computing the AuxVarGradient after you use it above instead of before?
There was a problem hiding this comment.
I wanted to discuss this with someone.
On the SA-AFT2019b model, HL is defined as follows :
where, d is the distance from the wall.
The AuxVar[0] is for the d and AuxVarGradient[0] is for the
. So, the d and
are the constant value when the geometry and mesh are not deformed.
And, the Auxvar[1] is for the
and AuxVarGradient[1] is for the
.
The velocity values change with each iteration. So, the Auxvar[1] and it's gradient must be redefined and calculated each iteration. Therefore, I decided to do the gradient calculation in the Postprocessing.
On second thought, the Auxvar assign in "trans_sources.hpp", or would you have any other ideas?
There was a problem hiding this comment.
In the paper it is mentioned that grad d is the wall-normal unit vector, don't we have that stored already? I remember seeing it in another PR, maybe it was not merged yet.
There was a problem hiding this comment.
In the paper it is mentioned that grad d is the wall-normal unit vector, don't we have that stored already? I remember seeing it in another PR, maybe it was not merged yet.
OK. I'll try to find it. :D
There was a problem hiding this comment.
I think it is in the simplified 2015 PR
There was a problem hiding this comment.
If I understood correctly then yes, it is in the simplified transition model PR #1901. The branch is still under development (currently working on the validation on T3 series flat plates and Eppler airfoil) but that part has already been implemented and verified.
There was a problem hiding this comment.
Yes, it sets at each point in the mesh the wall normal of the associated point on a viscous surface.
| su2double Temp3 = flowNodes->GetVelocity(iPoint, 0) * nodes->GetAuxVarGradient(iPoint, 0, 0); | ||
| su2double Temp4 = flowNodes->GetVelocity(iPoint, 1) * nodes->GetAuxVarGradient(iPoint, 0, 1); |
There was a problem hiding this comment.
Add some documentation please, if the initial aux var grad is 0 then you set the aux var to 0, then its gradient is 0 and this remains 0 forever? Looks like a bug.
|
|
||
| /*-- destruction term of Intermeittency(Gamma) --*/ | ||
| const su2double Dg = c_2 * Density_i * VorticityMag * F_turb * (c_3 * exp(lnIntermittency) - 1.0); | ||
| nodes -> SetAFT_Wonder_Func(iPoint, HL, H12, dNdRet, Ret0, D_H12, l_H12, m_H12, kv, Rev, Rev0, F_growth, F_crit, PAF, Pg, Dg); |
There was a problem hiding this comment.
This is a lot of memory and these variables are only used for post processing (output) right?
If so these can be computed in the output class when setting the output values.
That saves doing this work every iteration and storing all these variables.
There was a problem hiding this comment.
Thank you for your advise.
Current class, this function is for debugging. Later, I'll change to compute in the output class.
Thank you for comment @pcarruscag. I'll try to address each of your comments one by one. For now, the SA-AFT2017b model is for testing purposes, so I'll delete the relevant parts. |
Common/src/CConfig.cpp
Outdated
| case TURB_MODEL::NONE: SU2_MPI::Error("No turbulence model has been selected but AFT transition model is active.", CURRENT_FUNCTION); break; | ||
| case TURB_MODEL::SST: SU2_MPI::Error("k-w SST turbulence model has been selected but AFT transition model is active.", CURRENT_FUNCTION); break; | ||
| } | ||
| cout << "-2017b" << endl; break; |
Check warning
Code scanning / CodeQL
Dead code due to goto or break statement
Common/src/CConfig.cpp
Outdated
| case TURB_MODEL::NONE: SU2_MPI::Error("No turbulence model has been selected but AFT transition model is active.", CURRENT_FUNCTION); break; | ||
| case TURB_MODEL::SST: SU2_MPI::Error("k-w SST turbulence model has been selected but AFT transition model is active.", CURRENT_FUNCTION); break; | ||
| } | ||
| cout << "-2017b" << endl; break; |
Check warning
Code scanning / CodeQL
Dead code due to goto or break statement
|
The original plan was to finish it before the new version (v8.2.0) was released, but I was busy and couldn't manage it. Now that I have some spare time, I'll start working on it again next week! |
Decided to exclude AFT2017b
…ture_AFT_2019_Model
…into feature_AFT_2019_Model

Proposed Changes
Hi, all.
This PR is for implementing well known subsonic transition model (SA-AFT2019b).
Coder's SA-AFT2019b model is composed of the amplification factor and the logarithmic intermittency transport equation as shown below.

Current State
The primary implementation of the model has been completed and is now in the validation. The validation problems are refer : https://doi.org/10.2514/6.2023-3530 and https://doi.org/10.2514/6.2019-0039.
The transition onset location and the amplification factor field are slightly different. I'm still debugging and checking various things.
Validation Problem of Current State
Firstly, I'm trying the validation problem for 2-D problems (flat plate and NLF-0416 airfoil).
The current results are shown below.
S&K Flat plate from https://doi.org/10.2514/6.2023-3530
NLF-0416 airfoil from https://doi.org/10.2514/6.2023-3530

PR Checklist
Put an X by all that apply. You can fill this out after submitting the PR. If you have any questions, don't hesitate to ask! We want to help. These are a guide for you to know what the reviewers will be looking for in your contribution.
pre-commit run --allto format old commits.