|
[Sponsors] |
Source Code for Spalart-Allmaras (2012) and a Rotation/Curvature Correction Variant |
|
LinkBack | Thread Tools | Search this Thread | Display Modes |
September 6, 2013, 19:02 |
Source Code for Spalart-Allmaras (2012) and a Rotation/Curvature Correction Variant
|
#1 |
Senior Member
Robert
Join Date: Sep 2010
Posts: 158
Rep Power: 15 |
Hello all,
I have attached the source code for the Spalart-Allmaras (SA) model as detailed in "Modifications and Clarifications for the Implementation of the Spalart-Allmaras Turbulence Model" (Allmaras, Johnson, Spalart, 2012). It differs quite a bit from the default in OpenFOAM in these advantageous ways: -Does not use fv3. -Provides a calculation method for the modified vorticity (Stilda) to prevent negative values of Stilda. -Solves a separate transport equation when nuTilda goes below zero. Details for the items listed above can be found at the NASA Turbulence Modeling Resource Website for the SA model. What is much more exciting is that I have also included a Spalart-Allmaras model with Rotation/Curvature Correction (RCC), as detailed in "A New, Simpler Rotation/Curvature Correction Method for the Spalart-Allmaras Turbulence Model" (Qiang, Yong, 2012). I have tested both implementations on my own incompressible flow turbomachinery simulations, and the results are promising. Please, look through the code and let me know of any possible improvements. I did not delete any of the original OpenFOAM code and left them in as comments, to make comparisons easier. Also I would like to hear your thoughts on the validity of the particular RCC method I used. The code is attached below, or you can find it at: https://github.com/lordvon/OpenFOAM_Additions TO USE ON YOUR MACHINE: 1. 'sudo bash' and login 2. Go to $FOAM_SRC/turbulenceModels/incompressible/RAS/SpalartAllmaras 3. Replace files in this directory with the files of the model you want 4. Go to $FOAM_SRC/turbulenceModels/incompressible/RAS 5. 'wmake' 6. After compiling is finished, the turbulence model should be active and ready to use. Last edited by lordvon; September 24, 2013 at 00:56. |
|
April 24, 2014, 10:25 |
|
#2 |
New Member
Marian Fuchs
Join Date: Dec 2010
Location: Berlin, Germany
Posts: 9
Rep Power: 15 |
Dear Robert,
thanks for sharing your code. I had a quick look at your source code for the new SA-model variant from the 2012 Allmaras et al. paper and have a few questions concerning some implementation details: - in the referenced paper, it is said that eddy viscosity nu_t is 0 if negative nuTilde is produced. So, when computing nut (lines 397 and 447), there should be another pos-function which ensures nut = 0 if nuTilde < 0, right? - the clipping of nuTilde is still active in your code (line 443). I think this should be deactivated to allow nuTilde to become negative, otherwise adding the negative SA-model is not necessary. You wrote that you already tested the new model for an incompressible turbomachinery case. Did you also test the standard Spalart-Allmaras model? (you can find the model equations for the standard model here: http://turbmodels.larc.nasa.gov/spalart.html) As numerical stability issues for the SA model occur only for some cases, it would be interesting to know if the standard model can handle your turbomachinery case. If so, the case is not really suitable to assess the improvement achieved by using the new variant. A comparison to the SA-variant of OpenFOAM is also difficult, as this variant features additional non-physical behaviour such as undesired pseudo-transition. best regards, Marian |
|
April 25, 2014, 01:10 |
|
#3 |
Senior Member
Robert
Join Date: Sep 2010
Posts: 158
Rep Power: 15 |
Thanks for taking the time to look at my code. Your two points may be correct; I will have a look at my code and the paper.
I tested both standard and curvature correction (CC) models on the same setup. What I was looking for was the over-prediction of nut with the standard model in regions of high streamline curvature. With the CC model, the over-prediction was alleviated in the expected regions, which I took to be an affirmation of its superiority over the standard model. |
|
January 20, 2015, 23:13 |
Spalart Allmaras turbulence model
|
#4 |
New Member
Venkatesh Devaraj
Join Date: Jan 2015
Posts: 8
Rep Power: 11 |
Hi, I am trying to write a fortran code for SA model. Can u give some suggestion or hint to start with?
|
|
January 21, 2015, 13:42 |
|
#5 |
Senior Member
Robert
Join Date: Sep 2010
Posts: 158
Rep Power: 15 |
Sure, just copy the formulas in the source and tweak it to be consistent with Fortran syntax.
|
|
January 22, 2015, 08:27 |
|
#6 |
New Member
Venkatesh Devaraj
Join Date: Jan 2015
Posts: 8
Rep Power: 11 |
Thanks Robert. I will try
|
|
October 24, 2016, 09:39 |
|
#7 |
Member
Peter
Join Date: Nov 2015
Location: Hamburg, Germany
Posts: 57
Rep Power: 10 |
Dear Foamers,
unfortunately, I am facing problems implementing the SpalartAllmaras turbulence model with Rotation/Curvature correction into OF 3.0.1. I wrote a post here: http://www.cfd-online.com/Forums/ope...tml#post622754 It would be very cool, if someone could help me out! |
|
December 26, 2016, 07:56 |
|
#8 |
New Member
chengzhonglin
Join Date: Dec 2016
Posts: 1
Rep Power: 0 |
||
January 1, 2024, 05:33 |
|
#9 |
Senior Member
Michael Alletto
Join Date: Jun 2018
Location: Bremen
Posts: 615
Rep Power: 15 |
There is a paper with the spalart allmaras model with RC published along with the source code https://journal.openfoam.com/index.p...rticle/view/97
|
|
February 8, 2024, 03:32 |
|
#10 | |
Senior Member
Join Date: Dec 2019
Location: Cologne, Germany
Posts: 355
Rep Power: 8 |
Quote:
|
||
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
AMI speed performance | danny123 | OpenFOAM | 21 | October 24, 2020 04:13 |