su2code / SU2

SU2: An Open-Source Suite for Multiphysics Simulation and Design
https://su2code.github.io
Other
1.31k stars 836 forks source link

SST(m) implementation is inconsistent with literature #1551

Closed pcarruscag closed 1 year ago

pcarruscag commented 2 years ago

TLDR: There is SST and SSTm, the latter drops the tke term from the viscous stress tensor AND from the production term. Currently we do the former (because it was found beneficial here #797) but not the latter, which leaves the implementation in some kind of limbo state.

Discussed in https://github.com/su2code/SU2/discussions/1483

Originally posted by **sun5k** January 10, 2022 Question about Menter's SST model on SU2 Hello! This post is my first Q&A for SU2; happy new Year everyone. I have two questions about the SST model for the SU2. The abbreviation is referred from the [SST Turbulence model of NASA TMR](https://turbmodels.larc.nasa.gov/sst.html), [Compressible RANS of NASA TMR](https://turbmodels.larc.nasa.gov/sst.html) , and [Running cases with CFD of NASA TMR](https://turbmodels.larc.nasa.gov/noteonrunning.html). Briefly 1. In SU2, The production term of the SST model uses incompressible assumptions. Is there some special reason? 2. Always ignore the turbulence kinetic energy to compute the stress tensor for the momentum and energy equation, is it a bug? Here is the detail! 1. The Boussinesq relation of RANS is ![image](https://user-images.githubusercontent.com/50565314/148731113-5d141cd0-bea0-4bc4-8f2a-e40932645844.png) Form [Running cases with CFD of NASA TMR](https://turbmodels.larc.nasa.gov/noteonrunning.html): "In the equation above, the![image](https://user-images.githubusercontent.com/50565314/148731540-ace2cac5-4168-48d8-9125-c053806ba463.png) term is sometimes ignored for non-supersonic speed flows, and the **second term in parentheses is identically zero for incompressible flows**." The production term of SST model is : ![image](https://user-images.githubusercontent.com/50565314/148771167-b96d6d8f-b638-4efd-a6a3-6731ddb4f4a0.png) Rewrite the first term of the above equation : ![image](https://user-images.githubusercontent.com/50565314/148731731-23cdd717-28d1-453c-a867-77c99494f86f.png) ![image](https://user-images.githubusercontent.com/50565314/148771466-f1613617-0502-4809-9861-a64f4ce0dee7.png) Finally, the production term becomes : ![image](https://user-images.githubusercontent.com/50565314/148732458-c5d7bbd7-bd68-4416-bac2-979aa006512e.png) This term( ![image](https://user-images.githubusercontent.com/50565314/148732925-d66edf19-484a-4c4e-b518-3cff8ef935f0.png) ) becomes zero in incompressible flow(from continuity equation ![image](https://user-images.githubusercontent.com/50565314/148760571-f54c54eb-a897-4786-a859-c40aee873792.png) ), but the compressible flow is not zero. In the SU2 source code( line 849 in [SU2_CFD/src/numerics/turbulent/turb_sources.cpp](https://github.com/su2code/SU2/blob/master/SU2_CFD/src/numerics/turbulent/turb_sources.cpp)), the production term of SU2's SST model is "pk = Eddy_Viscosity_i*StrainMag_i*StrainMag_i - 2.0/3.0*Density_i*ScalarVar_i[0]*diverg;" Rewrite above code to equation : ![image](https://user-images.githubusercontent.com/50565314/148732626-7160aca1-11be-4754-8e7d-cb3a8af7dfa5.png) The omit of ![image](https://user-images.githubusercontent.com/50565314/148760652-ba17b0d5-c6fe-4169-81e5-8797b1d67dc1.png) term is a bug, or has some special reason? ![image](https://user-images.githubusercontent.com/50565314/148732925-d66edf19-484a-4c4e-b518-3cff8ef935f0.png) term is not an issue in incompressible flow like low Mach number simulation. But, in a high Mach number simulation, it may make a noticeable difference. Q.2) The stress tensor in RANS simulation is following : ![image](https://user-images.githubusercontent.com/50565314/148759208-effb0643-a903-48d4-9ef2-3b46162ad5f8.png) From [Running cases with CFD of NASA TMR](https://turbmodels.larc.nasa.gov/noteonrunning.html) : "In the equation above, the![image](https://user-images.githubusercontent.com/50565314/148731540-ace2cac5-4168-48d8-9125-c053806ba463.png) term is **sometimes ignored for non-supersonic speed flows**, and the second term in parentheses is identically zero for incompressible flows." And, from [SST Turbulence model of NASA TMR](https://turbmodels.larc.nasa.gov/sst.html) : "**When the ![image](https://user-images.githubusercontent.com/50565314/148762159-e2b08305-e205-4ffd-9ec1-e9de19cda42d.png) term is ignored in ![image](https://user-images.githubusercontent.com/50565314/148762216-7e565ca3-856d-4c18-8e16-c9ad780452b8.png) in the momentum and energy equations** and the production term is approximated by ![image](https://user-images.githubusercontent.com/50565314/148762331-d102ea3b-b5fe-42d3-aa83-ffa0f18e3104.png), a modified naming convention should be employed : **SSTm**" In the SU2 source code( line 142 in [SU2_CFD/src/numerics/flow/flow_diffusion.cpp](https://github.com/su2code/SU2/blob/master/SU2_CFD/src/numerics/flow/flow_diffusion.cpp)), The turbulence kinetic energy of the stress tensor is always calculated as 0. I don't know who, someone comments as "// TODO why ignore turb_ke?" This comment existed until SU2 v.7.1.0 to SU2 v.7.2.1(I'm not sure the same about the bellow SU2 v710). I guess the SST model of SU2 is 'SST' not 'SSTm'. Then, it should be used ![image](https://user-images.githubusercontent.com/50565314/148767053-79a012e3-1061-46b9-b432-359b7b04969f.png) in the stress tensor of the momentum and energy equations. The code always ignores the turbulence kinetic energy to compute the stress tensor for the momentum and energy equation. Is it under maintenance? Extra question) Someone working to implement for other kinds of SST(like SST-V, SST-Vm, SST-2003, SST-2003m, ... )? Thank you for reading.
clarkpede commented 2 years ago

I'm not active in development anymore, but I do remember some of the history. Some of these decisions came from #797 . @economon specifically said (in that issue):

I removed the term involving the TKE from the viscous stress tensor in the mean flow equations, as this is often ignored in codes (and omitting it gives better results, including the pressure field). I also fixed a bug in the definition of the eddy viscosity, where strain magnitude was being used when it should be the vorticity magnitude.

You can see the motivation, regression testing, and explanations on that issue page.

clarkpede commented 2 years ago

The "Why ignore turb_ke?" comment originated in the refactoring effort of #1127 .

pcarruscag commented 2 years ago

For a consistent implementation with SSTm (no tke in stress tensor) the production term should be P = mu_t S^2. Our production term is in no man's land, I'm suggesting we should complete the SST -> SSTm transition.

bigfooted commented 2 years ago

I also suggest to move to the 2003 version, where rate of strain is used in the eddy viscosity instead of vorticity.

pcarruscag commented 2 years ago

And a few other changes in constants. I am absolutely fine with that but I do not have bandwidth to update all the regression tests, re-run validation tests, etc.