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

kOmegaSST-SAS RAS turbulence model

Register Blogs Community New Posts Updated Threads Search

Like Tree4Likes
  • 3 Post By zordiack
  • 1 Post By zordiack

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   May 2, 2014, 03:36
Default kOmegaSST-SAS RAS turbulence model
  #1
Member
 
Pekka Pasanen
Join Date: Feb 2012
Location: Finland
Posts: 87
Rep Power: 14
zordiack is on a distinguished road
Hi, I recently implemented the kOmegaSST-SAS model to RAS turbulence model side, so one can use wall functions if desired. It's based on the paper

"Development and Application of SST-SAS Turbulence Model in the DESIDER
Project"
(C) Springer-Verlag Heidelberg 2008
Y. Egorov and F. Menter

and the existing kOmegaSST turbulence model. I didn't know exactly where to put it so I created a new directory called OpenFOAM-2.3.x/src/turbulenceModels/incompressible/RAS/mykOmegaSSTSAS and added mykOmegaSSTSAS/mykOmegaSSTSAS.C to OpenFOAM-2.3.x/src/turbulenceModels/incompressible/RAS/Make/files.

Feel free to test it if you like
Attached Files
File Type: c mykOmegaSSTSAS.C (12.4 KB, 172 views)
File Type: h mykOmegaSSTSAS.H (7.5 KB, 120 views)
FrankFlow, mj.foamer and hesheng like this.
zordiack is offline   Reply With Quote

Old   May 5, 2014, 14:46
Default
  #2
New Member
 
Join Date: Mar 2009
Posts: 21
Rep Power: 18
fsaltara is on a distinguished road
Very good idea, but what about the .dep file?
fsaltara is offline   Reply With Quote

Old   May 5, 2014, 15:01
Default
  #3
New Member
 
Join Date: Mar 2009
Posts: 21
Rep Power: 18
fsaltara is on a distinguished road
Sorry, the .dep file was not necessary. Compiled it and it is runing.

I wrote the delta option in the RASProperties file:

delta cubeRootVol;

cubeRootVolCoeffs
{
deltaCoeff 1;
}

Am I doing the right thing?

thanks

Fabio
fsaltara is offline   Reply With Quote

Old   May 7, 2014, 02:18
Default
  #4
Member
 
Pekka Pasanen
Join Date: Feb 2012
Location: Finland
Posts: 87
Rep Power: 14
zordiack is on a distinguished road
As this is a RAS implementation, you don't need the delta option in RASproperties, it's only needed for the LES model. The cubic root of cell volumes is calculated in the code.

Code:
    // Set the internal field values. 
    hInternal = pow(mesh_.V(), 1.0 / 3.0);
zordiack is offline   Reply With Quote

Old   May 12, 2014, 05:54
Default
  #5
New Member
 
Join Date: Mar 2009
Posts: 29
Rep Power: 17
ayoros is on a distinguished road
Hi pekka,

Great job with this kOmegaSSTSAS !

Unfortunately, I have a problem when I come to run in parallel.

The same case is running fine in serial (1 processor) but crashes in parallel at the very first turbulence iteration.

Do you have any idea about this ?

Best regards,
Fabien

Edit : After looking at it, it seems that the volScalarField h is not filled correctly. It takes the correct value for the first processor I think, but stays at a value of 0 for the others, generating a floating point exception.

Last edited by ayoros; May 12, 2014 at 09:31.
ayoros is offline   Reply With Quote

Old   May 12, 2014, 11:33
Default
  #6
Member
 
Pekka Pasanen
Join Date: Feb 2012
Location: Finland
Posts: 87
Rep Power: 14
zordiack is on a distinguished road
Ok, that is weird. I tried it with the first case that I had about (centrifugal fan with AMI) and it doesn't crash. I'm using 4 processors at the moment and it's been running for 20 iterations now.

If it has problems with zero fields, then maybe adding ROOTVSMALL into strategic places could fix it? I'm also wondering how could h field be zero, since it's the cubic root of cell volumes? It would mean that you have zero volume cells in your mesh.
zordiack is offline   Reply With Quote

Old   May 12, 2014, 12:23
Default
  #7
New Member
 
Join Date: Mar 2009
Posts: 29
Rep Power: 17
ayoros is on a distinguished road
Ok, looks like my problem comes from the cellLimited I apply to grad(U) in my fvSchemes.

When I set grad(U) to cellLimited Gauss linear 1, the case crashes.

When I set grad(U) to Gauss linear, it runs fine (at least for a few time steps).

This looks strange to me, but that's how it goes with my case.
ayoros is offline   Reply With Quote

Old   May 22, 2014, 00:40
Default Test Case
  #8
New Member
 
Frank
Join Date: Oct 2013
Location: Germany
Posts: 2
Rep Power: 0
FrankFlow is on a distinguished road
Quote:
Originally Posted by zordiack View Post
Feel free to test it if you like
Hi Pekka,

great contribution, I highly appreciate that. Would it it possible for you to also attach a little working case to make testing and usage of your code easier?

Thanks a lot and kind regards,
Frank
FrankFlow is offline   Reply With Quote

Old   May 22, 2014, 06:22
Default
  #9
Member
 
Pekka Pasanen
Join Date: Feb 2012
Location: Finland
Posts: 87
Rep Power: 14
zordiack is on a distinguished road
It should work with any existing kOmegaSST case by just replacing kOmegaSST with mykOmegaSSTSAS in the file constant/RASproperties. The instructions for compiling are in the first post.

The real benefits of the SAS formulation are in the time dependent computations (URANS), as can be seen from the papers.
mj.foamer likes this.
zordiack is offline   Reply With Quote

Old   March 3, 2015, 12:17
Default
  #10
Member
 
Pekka Pasanen
Join Date: Feb 2012
Location: Finland
Posts: 87
Rep Power: 14
zordiack is on a distinguished road
There seems to be an "official" implementation of this in the upcoming OpenFOAM-dev repository, so maybe we should all switch to using that one once it becomes available. Just a heads up for people if someone comes across this thread
zordiack is offline   Reply With Quote

Old   December 18, 2015, 09:50
Default
  #11
Member
 
Pekka Pasanen
Join Date: Feb 2012
Location: Finland
Posts: 87
Rep Power: 14
zordiack is on a distinguished road
I'm going to post a little update to this old thread, because the kOmegaSSTSAS version which is implemented in OpenFOAM-dev and OpenFOAM-3.0.x is still using to old formulation from 2008. I made a new version of the model and it can be downloaded from here:

https://github.com/zordiack/foam-dev

It compiles a user lib so it doesn't mess up original source code. This implementation is based on the paper:

Egorov, Y., & Menter F.R. (2009). Formulation of of the Scale-Adaptive Simulation (SAS) Model during the DESIDER Project. DESider – A European Effort on Hybrid RANS-LES Modelling, Notes on Num. Fluid Mech. And Multidisciplinary Design, Volume 103, 19-67.

which is reference by the 2010 SAS papers by Menter & Egorov. The L_vk field calculation and model coefficients are different compared to the 2008 model.

PS. If someone could provide a simple tutorial for making an own turbulence model for this new (-dev 3.0.x) system, that would be really great. I'm certain the way I did it is not practical, but it works. But using the custom model produces these kind of nasty error messages:

Create time

Duplicate entry laminar in runtime selection table TurbulenceModel
#0 /home/pppekkapa/OpenFOAM/OpenFOAM-dev/platforms/linux64GccDPInt32Opt/lib/libOpenFOAM.so(_ZN4Foam5error14safePrintStackERSo+ 0x27) [0x7f8030a82337]
..

and the same for LES and RAS. I just don't know how to not make duplicate entries in my custom libraries.

Last edited by zordiack; December 18, 2015 at 11:08.
zordiack is offline   Reply With Quote

Old   December 19, 2015, 14:37
Default
  #12
Senior Member
 
M. C.
Join Date: May 2013
Location: Italy
Posts: 286
Blog Entries: 6
Rep Power: 16
student666 is on a distinguished road
Hi, can you please share the two papers you're talking about?I mean the one from your last post and the one in your cirst thread, thank you
student666 is offline   Reply With Quote

Old   December 20, 2015, 10:03
Default
  #13
Senior Member
 
Joachim Herb
Join Date: Sep 2010
Posts: 650
Rep Power: 21
jherb is on a distinguished road
Y. Egorov, F. Menter
Development and Application of SST-SAS Turbulence Model in the DESIDER Project
http://link.springer.com/chapter/10....540-77815-8_27
http://cfd.mace.manchester.ac.uk/des...3-1-Egorov.pdf
jherb is offline   Reply With Quote

Old   December 21, 2015, 11:50
Default
  #14
Member
 
Pekka Pasanen
Join Date: Feb 2012
Location: Finland
Posts: 87
Rep Power: 14
zordiack is on a distinguished road
There is now an updated version available which no longer complains about duplicate entries. For details see here:

https://github.com/zordiack/foam-dev...abaaaa6f86c197

Links to the relevant papers:

The original SAS paper from 2008 (already in the previous post):

http://link.springer.com/chapter/10....540-77815-8_27

The updated version from 2009 (referenced by the 2010 paper):

http://link.springer.com/chapter/10....-540-92773-0_2

The more comprehensive papers describing the SAS model in more detail from 2010:

http://link.springer.com/article/10....494-010-9264-5
http://link.springer.com/article/10....494-010-9265-4
zordiack is offline   Reply With Quote

Old   February 23, 2016, 06:44
Default error: ‘FatalErrorInFunction’ was not declared in this scope
  #15
Senior Member
 
Join Date: Jul 2009
Posts: 260
Rep Power: 17
kingjewel1 is on a distinguished road
Hi

Thanks for writing this, it looks like it will be very useful.

I tried to compile the turbulence model in 3.0.0 and it is coming up with this error, any ideas why that might be, i have to say it isn't one I've come up against before and I'm not sure how to go about finding the source to fix it.

derivedFvPatchFields/wallFunctions/omegaWallFunctions/omegaKnoppWallFunction/omegaKnoppWallFunctionFvPatchScalarField.C:50:9: error: ‘FatalErrorInFunction’ was not declared in this scope

Thanks

EDIT: This has been fixed by altering the Error check as follows:

// * * * * * * * * * * * * Protected Member Functions * * * * * * * * * * * //

void omegaKnoppWallFunctionFvPatchScalarField::checkTyp e()
{
if (!isA<wallFvPatch>(patch()))
{
FatalErrorIn
(
"omegaKnoppWallFunctionFvPatchScalarField::checkTy pe()"
) << "Invalid wall function specification" << nl
<< " Patch type for patch " << patch().name()
<< " must be wall" << nl
<< " Current patch type is " << patch().type() << nl << endl
<< abort(FatalError);
}
}



This compiles and runs fine in serial but not in parallel...

Last edited by kingjewel1; February 23, 2016 at 10:30.
kingjewel1 is offline   Reply With Quote

Old   March 21, 2016, 10:00
Default
  #16
Member
 
Pekka Pasanen
Join Date: Feb 2012
Location: Finland
Posts: 87
Rep Power: 14
zordiack is on a distinguished road
Knopp wall function compilation in -dev is fixed in commit https://github.com/zordiack/foam-dev...a633c983e327e1
zordiack is offline   Reply With Quote

Old   March 21, 2016, 10:04
Default
  #17
Member
 
Pekka Pasanen
Join Date: Feb 2012
Location: Finland
Posts: 87
Rep Power: 14
zordiack is on a distinguished road
Quote:
Originally Posted by kingjewel1 View Post
Hi

Thanks for writing this, it looks like it will be very useful.

I tried to compile the turbulence model in 3.0.0 and it is coming up with this error, any ideas why that might be, i have to say it isn't one I've come up against before and I'm not sure how to go about finding the source to fix it.

derivedFvPatchFields/wallFunctions/omegaWallFunctions/omegaKnoppWallFunction/omegaKnoppWallFunctionFvPatchScalarField.C:50:9: error: ‘FatalErrorInFunction’ was not declared in this scope

Thanks

EDIT: This has been fixed by altering the Error check as follows:

// * * * * * * * * * * * * Protected Member Functions * * * * * * * * * * * //

void omegaKnoppWallFunctionFvPatchScalarField::checkTyp e()
{
if (!isA<wallFvPatch>(patch()))
{
FatalErrorIn
(
"omegaKnoppWallFunctionFvPatchScalarField::checkTy pe()"
) << "Invalid wall function specification" << nl
<< " Patch type for patch " << patch().name()
<< " must be wall" << nl
<< " Current patch type is " << patch().type() << nl << endl
<< abort(FatalError);
}
}



This compiles and runs fine in serial but not in parallel...
This is propably caused by differences between 3.0.0 and -dev branches, I'm not experienced enough to figure out the serial/parallel problem, sorry
zordiack is offline   Reply With Quote

Old   March 21, 2016, 10:53
Default
  #18
Senior Member
 
Join Date: Jul 2009
Posts: 260
Rep Power: 17
kingjewel1 is on a distinguished road
Hello Pekka,

Many thanks for your hard work. Could you clarify what the fundamental difference between your formulation and that by Erogov and Menter? Or between yours and the inbuilt OF version?

cheers
kingjewel1 is offline   Reply With Quote

Old   March 22, 2016, 02:11
Default
  #19
Member
 
Pekka Pasanen
Join Date: Feb 2012
Location: Finland
Posts: 87
Rep Power: 14
zordiack is on a distinguished road
This is the formulation by Egorov and Menter, and more specifically the later formulation described in the 2010 papers. Official OpenFOAM version is also using the Egorov and Menter formulation, but from year 2008. The main difference is in the calculation of Lvk term and also some constants have different values. There is no dramatic difference between the models in calculations (I think), I just wanted to use the model formulation from the more recent papers.
zordiack is offline   Reply With Quote

Old   June 10, 2016, 02:09
Default
  #20
Senior Member
 
M. Montero
Join Date: Mar 2009
Location: Madrid
Posts: 153
Rep Power: 17
be_inspired is on a distinguished road
Should it work ok with extended version?
What about wall function and y+ requirements?
Did you validate the model against a cylinder test case?
be_inspired 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
Confusion with magSqr in turbulence model kOmegaSST - OpenFOAM 2.2.x A_Pete OpenFOAM Programming & Development 4 September 18, 2014 04:52
An error has occurred in cfx5solve: volo87 CFX 5 June 14, 2013 17:44
Problem running simpleFoam with kOmegaSST turbulence model matzbanni OpenFOAM Running, Solving & CFD 5 November 3, 2012 06:45
question about turbulence model selection and sensitivity karananand Main CFD Forum 1 February 26, 2010 04:41
How can run MRFSimpleFoam with KOmegaSST turbulence model waynezw0618 OpenFOAM Running, Solving & CFD 0 April 21, 2008 04:40


All times are GMT -4. The time now is 03:13.