kOmegaSST Transition Model in OF 3.0.1
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 |
kOmegaSST Transition Model in OF 3.0.x
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 For the turbulence models, just run the Allwmake scrip in src/TurbulenceModels and it should compile well. |
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 |
Hi Elio!
How do you have calculated Ret to inlet? |
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. |
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?:confused: |
compilation kOmegaSST Transition Model in OF 3.0.x
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. |
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. |
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. |
sorry helio, could show me how to compile a turbulence model? i need SST transition gamma-theta
|
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 |
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$ |
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? |
new transition model
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 |
BCs
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$ 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 |
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:
/*---------------------------------------------------------------------------*\ |
The same for 4.x
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. |
Hi all
I have been going through the code for the 3.0 version and the original 2.0.x I am struggling with 1 line: In the git repository posted by HelioVillanueva, in src/TurbulenceModels/turbulenceModels/RAS/kOmegaSSTgammaReTheta/kOmegaSSTgammaReTheta.C on line 591: Code:
volScalarField Ptheta = 0.03*pow(mag(U),2.0)/(500.0*nu*(1.0-Ftheta,1.0)); Code:
0.03*pow(mag(U),2.0)/(500.0*nu*1.0); Also as an edit -> should the division not be just by 500*nu()? The 1.0-Ftheta should not be included in the division. I hope someone can help me with this. Regards |
All times are GMT -4. The time now is 08:16. |