NEMO - Improvements on the Preprocessing phase and inclusion of Chapmann-Enskog for Mutation++#1343
NEMO - Improvements on the Preprocessing phase and inclusion of Chapmann-Enskog for Mutation++#1343fmpmorgado merged 12 commits intodevelopfrom
Conversation
|
|
||
| V[RHOCVTR_INDEX] = rhoCvtr; | ||
| V[RHOCVVE_INDEX] = rhoCvve; | ||
| V[RHOCVTR_INDEX] = fluidmodel->ComputerhoCvtr(); |
| fluidmodel->ComputedTdU (V, val_dTdU ); | ||
| fluidmodel->ComputedTvedU(V, eves, val_dTvedU); | ||
| if(implicit){ | ||
| fluidmodel->ComputedPdU (V, eves, val_dPdU ); |
There was a problem hiding this comment.
These may be required for some explicit schemes/viscous
There was a problem hiding this comment.
The rest of the code code seems okay, going to take a further look to see which schemes and routines use those quantities
There was a problem hiding this comment.
If in doubt and the computations are not expensive...
|
This pull request fixes 1 alert when merging 8450d94 into f47e22b - view on LGTM.com fixed alerts:
|
Co-authored-by: Pedro Gomes <38071223+pcarruscag@users.noreply.github.com>
|
@WallyMaier @CatarinaGarbacz just checked with the testcases Wally provided. All of them pass |
| unsigned short iDim, iSpecies; | ||
|
|
||
| /*--- Setting flags ---*/ | ||
| implicit = (config->GetKind_TimeIntScheme_Flow() == EULER_IMPLICIT); |
There was a problem hiding this comment.
something like this?
| implicit = (config->GetKind_TimeIntScheme_Flow() == EULER_IMPLICIT); | |
| bool implicit = (config->GetKind_TimeIntScheme_Flow() == EULER_IMPLICIT); |
There was a problem hiding this comment.
If I initialize the variable inside the CNEMOEulerVariable instantiaton function, it can't be used for other functions. If I am not mistaken, that variable will be deleted when the function returns
There was a problem hiding this comment.
is it used in other functions wuth the variable structure?
There was a problem hiding this comment.
Sorry @WallyMaier didn't get it. What variable structure are you mentioning ?
There was a problem hiding this comment.
If the boolean implicit is only used in this function in NEMOVariable, I dont think we should declare in the hpp.
There was a problem hiding this comment.
I don't think I can do it any other way, else the CConfig parameter would have to be passed as argument to the Cons2PrimVar function.
There was a problem hiding this comment.
Don't rely on passing the config around too much.
|
This pull request fixes 1 alert when merging fbbc6ee into f47e22b - view on LGTM.com fixed alerts:
|
|
This pull request fixes 1 alert when merging 0cd78e4 into f47e22b - view on LGTM.com fixed alerts:
|
|
This pull request fixes 1 alert when merging a8b0b93 into df2469f - view on LGTM.com fixed alerts:
|
| static const MapType<std::string, TRANSCOEFFMODEL> TransCoeffModel_Map = { | ||
| MakePair("WILKE", TRANSCOEFFMODEL::WILKE) | ||
| MakePair("GUPTA-YOS", TRANSCOEFFMODEL::GUPTAYOS) | ||
| MakePair("CHAPMANN-ENSKOG", TRANSCOEFFMODEL::CHAPMANN_ENSKOG) |
There was a problem hiding this comment.
Do you guys have these options documented somewhere? I don't see them in the config_template but maybe in one of NEMO testcases?
There was a problem hiding this comment.
I have now included this option in the config_template file. It's not used on NEMO test-cases though
|
This pull request fixes 1 alert when merging b2a783e into df2469f - view on LGTM.com fixed alerts:
|
TobiKattmann
left a comment
There was a problem hiding this comment.
Yeah I'm late to the party... but lgtm @fmpmorgado . Just 2 very little comments one might consider for the next PR
| if (V[T_INDEX] <= Tmin) { nonPhys = true; return nonPhys;} | ||
| else if (V[T_INDEX] >= Tmax) { nonPhys = true; return nonPhys;} | ||
| else if (V[T_INDEX] != V[T_INDEX]){ nonPhys = true; return nonPhys;} |
There was a problem hiding this comment.
Here I would have gone with sth like
if ((V[T_INDEX] <= Tmin) || condition2 || condition3) {
nonPhys = true; return nonPhys;
}The same below for Tve
There was a problem hiding this comment.
Thanks @TobiKattmann, I'll address your comments in #1347
| Gradient_Reconstruction(config->GetReconstructionGradientRequired() ? Gradient_Aux : Gradient_Primitive), | ||
| implicit(config->GetKind_TimeIntScheme_Flow() == EULER_IMPLICIT) { |
There was a problem hiding this comment.
here a little indentation more
There was a problem hiding this comment.
A little clang-format you mean? 😄
Proposed Changes
Optimization of the Preprocessing phase;
Inclusion of the Chapmann-Enskog option for Mutation++
Related Work
None
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.
Work Performed
I have reduced almost by half the time of the preprocessing phase, leading to a ~10% less time per iteration. This was done by:
Additionally, I have included the option of using Chapmann-Enskog for the calculation of transport equations and thermal conductivity using Mutation++