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

Using pre-accumulation SU2

Register Blogs Members List Search Today's Posts Mark Forums Read

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   September 11, 2022, 06:21
Default Using pre-accumulation SU2
  #1
New Member
 
Join Date: Sep 2022
Location: France
Posts: 4
Rep Power: 2
Jsembla is on a distinguished road
Hello all! I hope your're doing well.

I'm trying to add a turbulence model correction to Menter's SST that works in a very similar manner to Spalar-Allmaras' QCR but uses the specific dissipation rate as a parameter. Thus, I'm coding the model on flow_diffusion.cpp but I can't seem to find a way to bring omega into it. I see that SU2 uses pre-accumulation to store variables and bring them when in need (as far as I understand), for example, in that same script we have:

AD::StartPreacc();
AD::SetPreaccIn(V_i, nDim+9); AD::SetPreaccIn(V_j, nDim+9);
AD::SetPreaccIn(Coord_i, nDim); AD::SetPreaccIn(Coord_j, nDim);
AD::SetPreaccIn(PrimVar_Grad_i, nDim+1, nDim);
AD::SetPreaccIn(PrimVar_Grad_j, nDim+1, nDim);
AD::SetPreaccIn(turb_ke_i); AD::SetPreaccIn(turb_ke_j);
AD::SetPreaccIn(TauWall_i); AD::SetPreaccIn(TauWall_j);
AD::SetPreaccIn(Normal, nDim);

Therefore, think I should achieve something like:

AD::SetPreaccIn(omega_i); AD::SetPreaccIn(omega_j);

However, my attempts to do so have not yet been successful. Is there a way to do this? Maybe not by the means of pre-accumulation but by any other.

Thank you in advance, I hope you have a nice day.

Jsembla.
Jsembla is offline   Reply With Quote

Old   September 11, 2022, 14:29
Default
  #2
Senior Member
 
bigfoot
Join Date: Dec 2011
Location: Netherlands
Posts: 181
Rep Power: 13
bigfootedrockmidget is on a distinguished road
The pre-accumulation is for the algorithmic differentiation. If you are only interested in turbulence modeling at this moment, then do not worry about this. For a quick intro, please read this:

https://su2code.github.io/docs/Advanced-AD-Techniques/


If your model is similar to QCR, then in vscode, simply search for qcr2000 to get an overview of the SA implementation, and try to mimick this behavior.
bigfootedrockmidget is offline   Reply With Quote

Old   September 11, 2022, 17:25
Default
  #3
New Member
 
Join Date: Sep 2022
Location: France
Posts: 4
Rep Power: 2
Jsembla is on a distinguished road
Thank you very much for your answer and for the link. I've looked for QCR's implementation and I see that it is used in flow_difsusion.cpp to add the correction to the stress tensor tau. I'd like to do something similar but my model makes use of omega as a function parameter to correct the stress tensor. This is a difficulty because I do not seem to find a way to make omega appear in this script, as it happens with the turbulent kinetic energy, for instance, where a mean kinetic energy is computed:

Mean_turb_ke = 0.5*(turb_ke_i + turb_ke_j);

I'd like to have sth like:

Mean_omega = 0.5*(omega_i + omega_j);

Any ideas on how to make this happen?

Thank you in advance.

Jsembla.

Quote:
Originally Posted by bigfootedrockmidget View Post
The pre-accumulation is for the algorithmic differentiation. If you are only interested in turbulence modeling at this moment, then do not worry about this. For a quick intro, please read this:

https://su2code.github.io/docs/Advanced-AD-Techniques/


If your model is similar to QCR, then in vscode, simply search for qcr2000 to get an overview of the SA implementation, and try to mimick this behavior.
Jsembla is offline   Reply With Quote

Old   September 12, 2022, 06:51
Default
  #4
Senior Member
 
bigfoot
Join Date: Dec 2011
Location: Netherlands
Posts: 181
Rep Power: 13
bigfootedrockmidget is on a distinguished road
search for Mean_turb_ke instead and you will get an overview of all the places where this variable is used. You should then also see where this variable is allocated. Then add Mean_Dissipation at that location as well.
Then check where turb_ke_i gets its values from. There is already a variable Dissipation_i defined for you that you could make use of, make sure that this variable is updated (SetDissipation).



For more detailed code discussions and code review, it is better to use github.
bigfootedrockmidget is offline   Reply With Quote

Old   September 12, 2022, 06:56
Default
  #5
New Member
 
Join Date: Sep 2022
Location: France
Posts: 4
Rep Power: 2
Jsembla is on a distinguished road
Thank you very much for your help, I hope you have a nice day.

Regards,

Jsembla.
Jsembla is offline   Reply With Quote

Reply

Tags
model correction, sst k-w, su2, turbulence modelling

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

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
Tutorials not working abby10 SU2 Installation 1 December 28, 2021 07:35
SU2 7.0.7 Built on CentOS 7, parallel computation pyscript mpi exit error? EternalSeekerX SU2 3 October 9, 2020 19:28
Introducing SU2 International Developers Society (IDS) fpalacios SU2 News & Announcements 1 June 17, 2019 23:38
Official release of SU2 V3.0 and SU2 Educational V1.0 fpalacios SU2 News & Announcements 2 January 22, 2014 06:28
Welcome to the Stanford University Unstructured (SU2) forum! economon SU2 0 January 7, 2013 03:48


All times are GMT -4. The time now is 18:08.