Fix axi auxvargrad - #1192
Conversation
pcarruscag
left a comment
There was a problem hiding this comment.
Thank you Florian, can you put the same fix in the NEMO numerics? (if @jtneedels agrees)
| const auto solution = base_nodes->GetAuxVar(); | ||
| auto gradient = base_nodes->GetAuxVarGradient(); | ||
| const auto& solution = base_nodes->GetAuxVar(); | ||
| auto& gradient = base_nodes->GetAuxVarGradient(); |
There was a problem hiding this comment.
indeed the not so auto thing about auto...
There was a problem hiding this comment.
Is there no regression for axisymmetric flow? One would think something like this could break something.
There was a problem hiding this comment.
I don't think there is but it did just set them to zero and we don't divide by them or anything so nothing broke just inaccurate results and perhaps not converging when it should in some cases. No compiler error or warning so i guess with auto one needs to be careful
There was a problem hiding this comment.
Can we have a regression that "exercises" this part of the implementation? Perhaps just modifying an existing case?
There was a problem hiding this comment.
@FlorianDm @pcarruscag believe there was another issue within NEMO axisymmetric that @jtneedels fixed. Maybe it would be a good time to merge that in as well?
There was a problem hiding this comment.
@FlorianDm Yes I agree with these changes, thanks for catching that! @pcarruscag Yes, as @WallyMaier mentioned I do have another small fix to pull in for axisymmetric in CNEMOEulerSolver, should I go ahead ad open a separate PR to merge that in?
There was a problem hiding this comment.
I will try to create a test/regression case after adding the k-omega source terms (almost done) because I think it is more useful if it is a rans case
This is a small fix of two bugs related to the viscous axisymmetric source terms.
AxiAuxVar_Grad_i[2][0]instead ofAxiAuxVar_Grad_i[2][1]. The book by Hoffman that was used as a reference actually contained an error. I am attaching a page from another edition of the book (thanks to @dbrezgin).auto¬ justauto. i found the bug after it was pointed out to me that it was always set to zero (thanks to @dbrezgin).