CFD Online Logo CFD Online URL
www.cfd-online.com
[Sponsors]
Home > Forums > OpenFOAM Programming & Development

kOmegaSST Transition Model in OF 3.0.1

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

Like Tree3Likes
  • 3 Post By HelioVillanueva

Reply
 
LinkBack Thread Tools Display Modes
Old   March 10, 2016, 11:12
Default kOmegaSST Transition Model in OF 3.0.1
  #1
Member
 
Alex
Join Date: Jan 2014
Posts: 94
Rep Power: 4
Kina is on a distinguished road
Hi there,
I am currently doing some analysis of airfoils and I have read about the transition formulation for the OF kOmegaSST model here:
http://www.tfd.chalmers.se/~hani/kur...transition.pdf

Unfortunately, the tutorial is written for OF 2.0 while I am running 3.0.1. I can't compile the turbulence model because some data simply isn't there or has significantly changed during the updates. Thus, I have 2 questions:

1. Does a newer version of this transition model implementation exist somewhere?
2. In what way is the kkLOmega-model similar to this and is it possible to generate this transition model from the kkLOmega and kOmegaSST source files?

I am thankful for any kind of help!
Cheers
Alex
Kina is offline   Reply With Quote

Old   March 17, 2016, 21:27
Default kOmegaSST Transition Model in OF 3.0.x
  #2
New Member
 
Helio Villanueva
Join Date: Apr 2013
Location: Brazil
Posts: 14
Rep Power: 5
HelioVillanueva is on a distinguished road
Just did and you can find the code here: https://github.com/HelioVillanueva/helio-3.0.x.git

I used the material of prof. Hakan Nillson and Ayyoob Zarmehri and tried to change as little as possible starting from the kOmegaSST. What significantly changed was the transitionDict file which is no longer needed. The freeStreamU parameter is provided inside the turbulenceProperties and has a standard value of 5.4 (used in the flatPlate tutorial).

The code seems to work as expected for the tutorial presented in the report. Please, help validate the code and share your experience with it.

The tutorial case reported is also in the link above (flatPlate). Note that to plot the last figure of the report in paraview I used the Plot Over Line filter with the points (0.05,1e-6,0.05) and (2.95,1e-6,0.05) in the internal mesh.

To use this code clone the repository and copy the contents of helio-3.0.x to your OpenFOAM user folder. Then compile the 'findroot' codes in src/findroot by
Code:
wmake libso
inside findroot folder.

For the turbulence models, just run the Allwmake scrip in src/TurbulenceModels and it should compile well.
Kina, tilasoldo and Aaron_L like this.

Last edited by HelioVillanueva; March 18, 2016 at 08:04. Reason: I moved the findroot from run/ to src/. To me it gets the user folder better organized...
HelioVillanueva is offline   Reply With Quote

Old   March 20, 2016, 07:36
Default
  #3
Member
 
Alex
Join Date: Jan 2014
Posts: 94
Rep Power: 4
Kina is on a distinguished road
Hi Helio,

thank you very much for the implementation of the code for OF 3.0.1! I will do extensive testing in the following days and report back to you how well it compares to CFX transition data.

Cheers
Alex
Kina is offline   Reply With Quote

Old   May 12, 2016, 15:50
Default
  #4
Senior Member
 
Join Date: Mar 2016
Posts: 133
Rep Power: 2
giammy92 is on a distinguished road
Hi Elio!
How do you have calculated Ret to inlet?
giammy92 is offline   Reply With Quote

Old   May 13, 2016, 10:23
Default
  #5
New Member
 
Helio Villanueva
Join Date: Apr 2013
Location: Brazil
Posts: 14
Rep Power: 5
HelioVillanueva is on a distinguished road
Hi!
You can find in the report by prof. Hakan Nillson (http://www.tfd.chalmers.se/~hani/kur...transition.pdf, same link Alex pointed) on page 22 that the inlet condition for Ret was calculated using eqs 3.24-3.28 on page 16. You can also find these eqs on page 14 (eqs 24-25) in Malan, Paul, Keerati Suluksna, and Ekachai Juntasaro. "Calibrating the γ-Reθ transition model for commercial cfd." 47th AIAA Aerospace Sciences Meeting. 2009.
HelioVillanueva is offline   Reply With Quote

Old   May 18, 2016, 06:20
Default
  #6
Senior Member
 
Join Date: Mar 2016
Posts: 133
Rep Power: 2
giammy92 is on a distinguished road
Hi Helio, i have a problem in compilation. For compilation in findroot all ok, but when i run allwmake from directory bin a i type:
wmake $targetType ../findroot/
the terminal is closed and i can't conclude compilation. Could you help me to resolve this error?
giammy92 is offline   Reply With Quote

Old   May 18, 2016, 08:07
Default compilation kOmegaSST Transition Model in OF 3.0.x
  #7
New Member
 
Helio Villanueva
Join Date: Apr 2013
Location: Brazil
Posts: 14
Rep Power: 5
HelioVillanueva is on a distinguished road
Hi giammy92!

It was a little confusing to have to compile the findroot folder first and then the turbulence models, so I included in the Allwmake a line to compile it automatically. In summary after cloning the repository and copying the files to your OF user folder, you just have to run the Allwmake in a terminal to compile all. Could you please try it again and see if it works.
HelioVillanueva is offline   Reply With Quote

Old   May 18, 2016, 08:30
Default
  #8
Senior Member
 
Join Date: Mar 2016
Posts: 133
Rep Power: 2
giammy92 is on a distinguished road
I have proper follow instructions in your Allwmake file:

#!/bin/sh
cd ${0%/*} || exit 1 # Run from this directory

# Parse arguments for library compilation
targetType=libso
. $WM_PROJECT_DIR/wmake/scripts/AllwmakeParseArguments
set -x
wmake $targetType ../findroot/
#wmake $targetType turbulenceModels
wmake $targetType incompressible
wmake $targetType compressible

but when i arrive to type wmake $targetType ../findroot/ the terminal is closed inexplicably.
giammy92 is offline   Reply With Quote

Old   May 18, 2016, 10:21
Default
  #9
New Member
 
Helio Villanueva
Join Date: Apr 2013
Location: Brazil
Posts: 14
Rep Power: 5
HelioVillanueva is on a distinguished road
Hi giammy92!

Sorry but I don't actually know why it is happening. If you managed to compile the findroot separately (going to the folder and wmake libso there), you could try to skip this line of the Allwmake and jump to the compilation of the models. Please see if it works.
HelioVillanueva is offline   Reply With Quote

Old   May 18, 2016, 13:48
Default
  #10
Senior Member
 
Join Date: Mar 2016
Posts: 133
Rep Power: 2
giammy92 is on a distinguished road
sorry helio, could show me how to compile a turbulence model? i need SST transition gamma-theta
giammy92 is offline   Reply With Quote

Old   May 19, 2016, 08:53
Default
  #11
New Member
 
Helio Villanueva
Join Date: Apr 2013
Location: Brazil
Posts: 14
Rep Power: 5
HelioVillanueva is on a distinguished road
It should be as simple as open a terminal in yourOFuser-3.0.x/src/TurbulenceModels and run the Allwmake (like this ./Allwmake). I assumed that this way didn't work for you since you were typing line by line of the Allwmake, so if this is really the case, type the lines and skip the one for the findroot (but this way you have to compile findroot separately before). The commands to compile the turbulence models are
Code:
wmake $targetType incompressible
wmake $targetType compressible
HelioVillanueva is offline   Reply With Quote

Old   June 8, 2016, 09:57
Default
  #12
Senior Member
 
Join Date: Mar 2016
Posts: 133
Rep Power: 2
giammy92 is on a distinguished road
Hi Helio! i have compiled with Allwmake in src/turbulencemodels and it seems that has compiled with Allwmake but in the end tell me that miss findRoot.H:

gianmichele@gianmichele-K52Jc:~/OpenFOAM/gianmichele-3.0.1/helio-3.0.x-master/src/TurbulenceModels$ ./Allwmake
+ wmake libso ../findroot/
wmakeLnInclude: linking include files to ./lnInclude
Making dependency list for source file findRoot.C
g++ -m64 -Dlinux64 -DWM_ARCH_OPTION=64 -DWM_DP -DWM_LABEL_SIZE=32 -Wall -Wextra -Wold-style-cast -Wnon-virtual-dtor -Wno-unused-parameter -Wno-invalid-offsetof -O3 -DNoRepository -ftemplate-depth-100 -I/opt/openfoam30/src/finiteVolume/lnInclude -I/opt/openfoam30/src/meshTools/lnInclude -IlnInclude -I. -I/opt/openfoam30/src/OpenFOAM/lnInclude -I/opt/openfoam30/src/OSspecific/POSIX/lnInclude -fPIC -c findRoot.C -o Make/linux64GccDPInt32Opt/findRoot.o
g++ -m64 -Dlinux64 -DWM_ARCH_OPTION=64 -DWM_DP -DWM_LABEL_SIZE=32 -Wall -Wextra -Wold-style-cast -Wnon-virtual-dtor -Wno-unused-parameter -Wno-invalid-offsetof -O3 -DNoRepository -ftemplate-depth-100 -I/opt/openfoam30/src/finiteVolume/lnInclude -I/opt/openfoam30/src/meshTools/lnInclude -IlnInclude -I. -I/opt/openfoam30/src/OpenFOAM/lnInclude -I/opt/openfoam30/src/OSspecific/POSIX/lnInclude -fPIC -shared -Xlinker --add-needed -Xlinker --no-as-needed Make/linux64GccDPInt32Opt/findRoot.o -L/opt/openfoam30/platforms/linux64GccDPInt32Opt/lib \
-lfiniteVolume -o /home/gianmichele/OpenFOAM/gianmichele-3.0.1/platforms/linux64GccDPInt32Opt/lib/libfindroot.so
'/home/gianmichele/OpenFOAM/gianmichele-3.0.1/platforms/linux64GccDPInt32Opt/lib/libfindroot.so' is up to date.
+ wmake libso incompressible
Make/options:13:34: warning: backslash-newline at end of file [enabled by default]
LIB_LIBS = -L$(FOAM_USER_LIBBIN) \
^
wmakeLnInclude: linking include files to ./lnInclude
Making dependency list for source file makeMyIncompressibleTurbulenceModel.C
could not open file findRoot.H for source file makeMyIncompressibleTurbulenceModel.C due to No such file or directory
g++ -m64 -Dlinux64 -DWM_ARCH_OPTION=64 -DWM_DP -DWM_LABEL_SIZE=32 -Wall -Wextra -Wold-style-cast -Wnon-virtual-dtor -Wno-unused-parameter -Wno-invalid-offsetof -O3 -DNoRepository -ftemplate-depth-100 -I../turbulenceModels/RAS/kEpsilonPANS -I../turbulenceModels/RAS/kOmegaSSTSASnew -I../turbulenceModels/RAS/kOmegaSSTPANS -I../turbulenceModels/RAS/kOmegaSSTgammaReTheta -I/opt/openfoam30/src/transportModels -I/opt/openfoam30/src/finiteVolume/lnInclude -I/opt/openfoam30/src/meshTools/lnInclude -I/opt/openfoam30/src/TurbulenceModels/turbulenceModels/lnInclude -I/opt/openfoam30/src/TurbulenceModels/incompressible/lnInclude -I/home/gianmichele/OpenFOAM/gianmichele-3.0.1/run/../src/findroot -IlnInclude -I. -I/opt/openfoam30/src/OpenFOAM/lnInclude -I/opt/openfoam30/src/OSspecific/POSIX/lnInclude -fPIC -c makeMyIncompressibleTurbulenceModel.C -o Make/linux64GccDPInt32Opt/makeMyIncompressibleTurbulenceModel.o
In file included from makeMyIncompressibleTurbulenceModel.C:74:0:
../turbulenceModels/RAS/kOmegaSSTgammaReTheta/kOmegaSSTgammaReTheta.H:124:22: fatal error: findRoot.H: File o directory non esistente
#include "findRoot.H"
^
compilation terminated.
make: *** [Make/linux64GccDPInt32Opt/makeMyIncompressibleTurbulenceModel.o] Errore 1
gianmichele@gianmichele-K52Jc:~/OpenFOAM/gianmichele-3.0.1/helio-3.0.x-master/src/TurbulenceModels$
giammy92 is offline   Reply With Quote

Old   June 8, 2016, 11:02
Default
  #13
Senior Member
 
Join Date: Mar 2016
Posts: 133
Rep Power: 2
giammy92 is on a distinguished road
Ok i have been able to compiled incompressible turbulence models, adding missing files in lnInclude of incompressible's directory.
So now i can use komegaSSTRetheta but i can't give a value to Ret in inlet because by equation that you have suggested Ret = (1173.51 - 589.428Tu + 0.2196 / (Tu)^2) * F(lambatheta) when turbulence intensity Tu < 1.3
So i have to know function F(lambdatheta) but i don't know the value of lambdatheta...do you know how i can determine it?
giammy92 is offline   Reply With Quote

Old   June 17, 2016, 15:51
Default new transition model
  #14
New Member
 
Alberto
Join Date: Sep 2013
Posts: 24
Rep Power: 5
malv83 is on a distinguished road
After 8 years, there is a new version (or new model) of the k-kl-omega model.

There are a few problems with the k-kl-omega model in the farfield. One of them is the growth of Laminar Kinetic energy when separation occurs. Lopez and Walters have a paper (have not been published yet) correcting this issue:

Maurin Lopez. D. K. Walters. “A recommended correction to the k-kl-omega transition sensitive eddy-viscosity model”. Journal of Fluid Engineering.

This correction has to be made to the 2008 k-kl-omega model from now on.

Now, Lopez and Walters also developed a new transitional model (k-omega-v2) as an alternative to the k-kl-omega one. This new model has more capabilities (it is more reliable) than the k-kl-omega model, especially in the farfield computations. Fortunately the paper for this new model is already publish.

Maurin Lopez. D. K. Walters. “Prediction of transitional and fully turbulent free shear flows using an alternative to the laminar kinetic energy approach”. Journal of Turbulence, Vol 17, Iss. 3, 2016.

If you see the papers, you will immediately see how the k-kl-omega model is not good for free shear flows, and how the new model corrects all those issues. From now on, k-kl-omega users have to start using the new k-omega-v2 model.
malv83 is online now Add to malv83's Reputation Report Post Edit/Delete Message Reply With Quote Multi-Quote This Message Quick reply to this message
malv83 is offline   Reply With Quote

Old   June 17, 2016, 17:57
Default BCs
  #15
New Member
 
Helio Villanueva
Join Date: Apr 2013
Location: Brazil
Posts: 14
Rep Power: 5
HelioVillanueva is on a distinguished road
Hi giammy92!

By the log you posted and your directory structure (gianmichele@gianmichele-K52Jc:~/OpenFOAM/gianmichele-3.0.1/helio-3.0.x-master/src/TurbulenceModels$) the make files won't work properly. Your directory structure should be like this:

Code:
gianmichele@gianmichele-K52Jc:~/OpenFOAM/gianmichele-3.0.1/src/TurbulenceModels$
You see, the files from the repo should be copied to your OF user folder (without the directory with the repos name). This way I think the compilation by just "./Allmake" should work.

Concerning the BCs, in prof. Hakan Nillson report you find in page 15 eq. 3.21 the way to calculate lambdaTheta. If you read the report on page 22 you will see how they used this equation

Code:
The inlet boundary condition for Ret should be calculated by Eq.s 3.24-3.28 based on zero velocity
gradient and free stream turbulent velocity which in this case becomes 171.
HelioVillanueva is offline   Reply With Quote

Old   November 6, 2016, 13:07
Default
  #16
Member
 
Jack
Join Date: May 2015
Posts: 91
Rep Power: 3
Jack001 is on a distinguished road
Hello,

I followed the steps above and running the Allwmake proceeded without any problems. However when running the flatplate test case I get the following error. This is despite the fact that the library libmyincompressibleturbulenceModels.so is found in

/home/foamusr/OpenFOAM/foamusr-3.0.0/platforms/linux64GccDPInt32Opt/lib

Code:
/*---------------------------------------------------------------------------*\
| =========                 |                                                 |
| \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox           |
|  \\    /   O peration     | Version:  3.0.0                                 |
|   \\  /    A nd           | Web:      www.OpenFOAM.org                      |
|    \\/     M anipulation  |                                                 |
\*---------------------------------------------------------------------------*/
Build  : 3.0.0-6abec57f5449
Exec   : simpleFoam
Date   : Nov 06 2016
Time   : 17:04:29
Host   : "loginusr"
PID    : 109472
Case   : /home/foamusr/OpenFOAM/foamusr-3.0.0/run/flatplate
nProcs : 1
sigFpe : Enabling floating point exception trapping (FOAM_SIGFPE).
fileModificationChecking : Monitoring run-time modified files using timeStampMaster
allowSystemOperations : Allowing user-supplied system call operations

// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
Create time

--> FOAM Warning : 
    From function dlOpen(const fileName&, const bool)
    in file POSIX.C at line 1179
    dlopen error : libmyincompressibleturbulenceModels.so: cannot open shared object file: No such file or directory
--> FOAM Warning : 
    From function dlLibraryTable::open(const fileName&, const bool)
    in file db/dynamicLibrary/dlLibraryTable/dlLibraryTable.C at line 99
    could not load "libmyincompressibleturbulenceModels.so"
Create mesh for time = 0


SIMPLE: convergence criteria
    field p	 tolerance 0.01
    field U	 tolerance 0.001
    field "(k|omega|Ret|intermittency)"	 tolerance 0.001

Reading field p

Reading field U

Reading/calculating face flux field phi

Selecting incompressible transport model Newtonian
Selecting turbulence model type RAS
Selecting RAS turbulence model kOmegaSSTgammaReTheta


--> FOAM FATAL ERROR: 
Unknown RASModel type kOmegaSSTgammaReTheta

Valid RASModel types:

17
(
LRR
LamBremhorstKE
LaunderSharmaKE
LienCubicKE
LienLeschziner
RNGkEpsilon
SSG
ShihQuadraticKE
SpalartAllmaras
kEpsilon
kOmega
kOmegaSST
kOmegaSSTSAS
kkLOmega
qZeta
realizableKE
v2f
)


    From function RASModel::New(const volScalarField&, const volVectorField&, const surfaceScalarField&, transportModel&, const word&)
    in file ../turbulenceModels/lnInclude/RASModel.C at line 161.

FOAM exiting
Jack001 is offline   Reply With Quote

Old   November 21, 2016, 09:34
Default The same for 4.x
  #17
New Member
 
Xavier Lamboley
Join Date: Jan 2015
Posts: 4
Rep Power: 3
tilasoldo is on a distinguished road
Hello,

Thanks Helio Villanueva for your work, I just did the same for OpenFoam 4.x in this thread. It has changed again because kOmegaSST is now also a template, and the files to modify are now in TurbulenceModels/turbulenceModels/Base.
tilasoldo is offline   Reply With Quote

Reply

Thread Tools
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 On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Superlinear speedup in OpenFOAM 13 msrinath80 OpenFOAM Running, Solving & CFD 18 March 3, 2015 06:36
SST transition model mb.pejvak Main CFD Forum 0 August 27, 2012 02:41
Viscosity ratio in gamma-theta transition model based on k-w sst turb model Qiaol618 Main CFD Forum 8 June 9, 2012 06:43
where to set CFX Transition Model? steven CFX 6 January 17, 2007 12:19
model transition nico FLUENT 0 February 8, 2004 10:04


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