Closed JulesL2 closed 1 year ago
Hello,
Thanks for the report and fix.
I have applied the fix to the master branch (commit bf9c55e6). I'll double-check with a colleague to see which validation cases may need to be re-run, then apply it to the v8.0 branch this week.
Hi Yvan,
To let you know for the - sign in the Rij function it seems that the fix worked only for the square duct and the good sign seem to be effectively the +. However a strange behavior can be observed on secondary flows -> the code find put the flow in the good direction for the first iterations and then converge to the wrong solution with secondary flows going in the opposite direction. As it needs more investigation. I think that only the x2 should be fixed. Therefore in the rij function, the edit is just the x4. Do you need that I open another pull request with just the x2/x4 modification ?
Hi Jules,
A pull request should not be necessary. I'll revert the sign part tomorrow morning, and ping you here when it is done.
Hello, I've reverted the sign change.
Hi, Thank you. I am investigating the behevior of secondary flows with the non linear stresses. I will open an issue/pull request when I find the cause of the strange behavior / have run enough test cases.
As the changes have been applied, I close the pull request
In the model CS_TURB_K_ESPILON_QUAD:
In the 2006 paper from Baglietto & Ninokata, (Anisotropic Eddy Viscosity Modeling for Application to Industrial Engineering Internal Flows) Sij = (dui/dxj + duj/dxi) Whereas in src/turb/cs_turbulence_ke.c Sij = 0.5*(dui/dxj + duj/dxi)
To have the values proposed in the 2006 article, S and the quadratic terms need to be corrected
Therefore as in the article
S=k/eps*sqrt(0.5*Sij*Sij)
with Sij in the article =2*Sij
in CS, In Code_Saturne for the quadratic model S needs to be equal toS=k/eps*sqrt(2*Sij*Sij)
And the same applies for the production term which is multiplied 2 times by Sij so we need to multiply this term by 4.Moreover, as in Code_Saturne the quadratic model takes into account the non linear term in the N-S momentum equations via the addition of an rij matrix with the cs_turbulence_ke_q function.
There is an issue with the Rij sign, when looking at the secondary flows inside a square pipe, the flows do not match published paper with the + sign and here are the a screenshot of the results with the - sign which put the flow in the good direction. It needs further investigation as I do not understand why it behaves the good way with the opposite sign (Experiment comes from here NASA_Square_duct)![secondary_flows](https://github.com/code-saturne/code_saturne/assets/38831521/e2a0f6f2-2baa-4019-8900-9c01291d78cf)