CFD Online Logo CFD Online URL
www.cfd-online.com
[Sponsors]
Home > Forums > Software User Forums > SU2

Inlet profile for SST with nondimensional treatment

Register Blogs Community New Posts Updated Threads Search

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   October 31, 2021, 06:27
Default Inlet profile for SST with nondimensional treatment
  #1
Member
 
Zhen ZHANG
Join Date: Jun 2018
Location: Beijing, China
Posts: 56
Rep Power: 7
Zhen ZHANG is on a distinguished road
Hi all,

I am trying the SST turbulence model with an inlet profile and the nondimensional treatment (FREESTREAM_VEL_EQ_ONE).

I am wondering whether the TKE and Omega in the inlet profile should be nondimensionalized when making the profile. With the dimensional values, the solver does not converge well.

The inlet profile for the SA model seems not to be affected by the nondimensional treatment, is that right?

Thanks

Zhen
Zhen ZHANG is offline   Reply With Quote

Old   November 1, 2021, 11:05
Default
  #2
Member
 
na
Join Date: Jul 2018
Posts: 83
Rep Power: 7
TKatt is on a distinguished road
Hi,
from a short look into the code I would say they have to be nondimensional. Which your findings support.



A way to check could be via the automatic example_file writing when no inlet is present. If those values are non-dim then you can be pretty sure that you have to feed non-dim values as well.


The Treatment for SA and SST looks very similar as well ... and there is non-Dimensionalization for nu-tilde so that should apply as well. For the non-dim Factor please see the the Reference value section which is written in the screen output at simulation beginning



Good point btw, I'll take a look how and where we could document that .


Best, Tobi
TKatt is offline   Reply With Quote

Old   November 1, 2021, 22:06
Default
  #3
Member
 
Zhen ZHANG
Join Date: Jun 2018
Location: Beijing, China
Posts: 56
Rep Power: 7
Zhen ZHANG is on a distinguished road
Hi Tobi,

Thank you for the reply.

I checked the CSolver::LoadInletProfile and find the following:

Code:
//for SA
columnValue << config->GetNuFactor_FreeStream()*config->GetViscosity_FreeStreamND()/config->GetDensity_FreeStreamND() <<"\t";
//for SST
columnValue << config->GetTke_FreeStream() << "\t" << config->GetOmega_FreeStream() <<"\t";
So in the example_file the TKE and omega are dimensional, while the SA nu_tilde is nondimensional. I agree that a document is helpful.

Zhen
Zhen ZHANG is offline   Reply With Quote

Old   November 3, 2021, 11:23
Default
  #4
Member
 
na
Join Date: Jul 2018
Posts: 83
Rep Power: 7
TKatt is on a distinguished road
Nice find!


Also dont hesitate to change bits of the code, compile and see how the results turn out. In case that helps you could even open a new PR on github (but I recall you mentioned some difficulties with working on github).


I am currently also debugging some things for multiple inlet markers with specified inlet profiles (inc flow + sst + species transport) so I hope to fix that any problems soon.



In any case I'll let you know here
TKatt is offline   Reply With Quote

Old   November 4, 2021, 01:35
Default
  #5
Member
 
Zhen ZHANG
Join Date: Jun 2018
Location: Beijing, China
Posts: 56
Rep Power: 7
Zhen ZHANG is on a distinguished road
Thanks and good luck!
Zhen ZHANG is offline   Reply With Quote

Old   November 10, 2021, 08:19
Default
  #6
Member
 
na
Join Date: Jul 2018
Posts: 83
Rep Power: 7
TKatt is on a distinguished road
Hi Zhen,


the issue will be fixed in develop with https://github.com/su2code/SU2/pull/1427
(Edit: it is now merged into develop, so I hope this fixes it for you)




So what made me state that the values from the inlet file have to be non-dimensional (in case of a non-dim simulation of course) is that after reading the inlet values they are never non-dimensionalized... so they would have worked in case they were non-dimensionalized. The problem is now, that for SST, TKE and Omega are written dimensional for the example file but the solver expects non-dimensional values.


I now changed it that all values in the inlet file are dimensional (and the example writes dimensional values only) and the values are non-dimensionalized directly when they are used in the inlet. That is consistent with the mean flow quantities.


If you can test it and tell me whether that worked for you, that would be awesome. Note that I only tested incompressible flow, but it should have fixed compressible as well

Last edited by TKatt; November 10, 2021 at 10:37.
TKatt is offline   Reply With Quote

Old   November 16, 2021, 02:12
Default
  #7
Member
 
Zhen ZHANG
Join Date: Jun 2018
Location: Beijing, China
Posts: 56
Rep Power: 7
Zhen ZHANG is on a distinguished road
Hi Tobi,

Sorry for late reply. I pulled the develop branch to test it, but the compile failed.
Code:
../SU2_CFD/src/numerics/turbulent/turb_sources.cpp:764:62: error: invalid initializer for array member ‘su2double CSourcePieceWise_TurbSST<CEulerVariable::CIndices<short unsigned int> >::Jacobian_Buffer [4]’
idx(val_nDim, config->GetnSpecies()) {
I think the ref values for nu_tilde, TKE, and Omega are correct. And I believe that length_Ref/VelocityRef = ViscRef/(rhoRef*VelocityRef^2). So I think this will work well with my compressible problem.

Zhen
Zhen ZHANG is offline   Reply With Quote

Old   November 16, 2021, 03:52
Default
  #8
Member
 
na
Join Date: Jul 2018
Posts: 83
Rep Power: 7
TKatt is on a distinguished road
Do you use gnu/4.8.5 by any chance? I suspect the
Code:
Jacobian_Buffer[4] = {0.0};
part to be the baddy. There was a recent fix https://github.com/su2code/SU2/pull/1421 (There an issue is linked with a similar error message). "Newer" compilers (e.g. 5.3.0 works) do not have that problem.



So a quick test would be to just make it

Code:
Jacobian_Buffer[4];
and try to compile again. If that helps either you can push a small fix that moves this initial zeroing to the constructor or I can do it. Note though without zeroing in the constructor you might get bad results but for a compilation stuff the removal test should be fine
TKatt is offline   Reply With Quote

Old   November 17, 2021, 15:02
Default
  #9
Member
 
na
Join Date: Jul 2018
Posts: 83
Rep Power: 7
TKatt is on a distinguished road
Little update:

If you now pull the very latest my suggested change is already incorporated.
See https://github.com/su2code/SU2/pull/1445


So I hope this fixes it for you. It would be great to hear if the compiling and inlet files now work for you
TKatt is offline   Reply With Quote

Old   November 18, 2021, 08:54
Default
  #10
Member
 
Zhen ZHANG
Join Date: Jun 2018
Location: Beijing, China
Posts: 56
Rep Power: 7
Zhen ZHANG is on a distinguished road
Hi Tobi,
Thank you for your help.

Yes, I am using 4.8.5. I tried several times these days but cannot pull the code from Github. So I just modified the code to
Code:
Jacobian_Buffer[4];
as you suggested.

Now both the compiling and inlet profile work well for me. The dimensional value in the example_inlet.dat is very convenient.

Thanks again
Zhen
Zhen ZHANG is offline   Reply With Quote

Old   November 18, 2021, 12:25
Default
  #11
Member
 
na
Join Date: Jul 2018
Posts: 83
Rep Power: 7
TKatt is on a distinguished road
Awesome, That is good to hear that it now works for you Thanks for your debugging work !
TKatt is offline   Reply With Quote

Reply


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Parabolic Velocity inlet profile error guerillagecko SU2 1 April 16, 2021 17:09
Spatio-temporal Inlet Velocity Profile from measurements for LES MariosReizo Main CFD Forum 9 March 5, 2021 05:23
Defining 2D Temperature Profile for two inlet patches afzaal Fidelity CFD 0 April 12, 2017 00:48
How to obtain a fully-developed profile in a inlet? (ANSYS WORKBENCH) Il_cardozo ANSYS 0 November 21, 2016 08:40
Inlet Boundary profile for compressible flow uday sarkar FLUENT 1 November 20, 2015 09:24


All times are GMT -4. The time now is 23:42.