|
[Sponsors] |
April 24, 2014, 09:31 |
kOmegaSST with lowRe-damping (as in Fluent)
|
#1 |
Senior Member
Philipp
Join Date: Jun 2011
Location: Germany
Posts: 1,297
Rep Power: 27 |
Dear all,
I added some functions to the kOmegaSST model, that are called "low Reynolds number corrections" in the Fluent manual. Unfortunately, I don't get the same results as in Fluent, so obviously I did something wrong . I tried to make everything as "fluent-like" as possible, so I used all the constant names and so on as in Fluent. I added a few functions (all these alphaStar, alphaStarZero, betaStar, ...) and changed a bit in the differential equations. For debugging I used a periodic pipe flow (3D). 1) In the standard OpenFoam kOmegaSST model, I get nearly exactly the same results for k,omega,nut and U, as for the Fluent version (with deactivated "low Re corrections"). 2) In the new lowRe model I get k-values and nut-values about a factor of 3 lower than in Fluent. I didn't compare omega and U here. If anyone also wants to use this model, I would be happy about any debugging help. I attached the files to this post. kOmegaSST_lowRe.C kOmegaSST_lowRe.H I could easily compile these functions by creating a directory "kOmegaSST_new" with the two sub-directories "k_omegaSST_lowRe" (<- place the .H and .C file here) and "Make". In "Make", create two files, one called "files" and one called "options". "files" looks like: Code:
kOmegaSST_lowRe/kOmegaSST_lowRe.C LIB = $(FOAM_LIBBIN)/libMyIncompressibleRASModels Code:
EXE_INC = \ -I$(LIB_SRC)/turbulenceModels \ -I$(LIB_SRC)/transportModels \ -I$(LIB_SRC)/finiteVolume/lnInclude \ -I$(LIB_SRC)/meshTools/lnInclude \ -I$(LIB_SRC)/turbulenceModels/incompressible/RAS/lnInclude LIB_LIBS = \ -lincompressibleTurbulenceModel \ -lincompressibleRASModels \ -lfiniteVolume \ -lmeshTools Then, in my OpenFoam case I change the controlDict libs to Code:
libs ( "libOpenFOAM.so" "libincompressibleTurbulenceModel.so" "libMyIncompressibleRASModels.so" "libincompressibleRASModels.so" ); Code:
RASModel kOmegaSST_lowRe; Edit: These are results for the regular OpenFoam model and Fluent without low-Re damping I am talking about at "1)". The grid size is y+ = 0.44 at the pipe wall. comp_k.png comp_mut.png comp_omega.png
__________________
The skeleton ran out of shampoo in the shower. |
|
May 7, 2014, 12:55 |
|
#2 |
New Member
Park sangbin
Join Date: Dec 2013
Location: South Korea
Posts: 3
Rep Power: 12 |
Thank you for your help thanks
|
|
May 13, 2014, 04:25 |
|
#3 |
Senior Member
Philipp
Join Date: Jun 2011
Location: Germany
Posts: 1,297
Rep Power: 27 |
Hey guys,
I am glad to tell you that it works now. I made two comparisons between Fluent and my low-Re version in OpenFoam and they match! After some debugging I found two errors in the Fluent manual but have a look: Channel Flow: Channel_U.png Channel_k.png Channel_nut.png Channel_omega.png
__________________
The skeleton ran out of shampoo in the shower. |
|
May 13, 2014, 04:26 |
|
#4 |
Senior Member
Philipp
Join Date: Jun 2011
Location: Germany
Posts: 1,297
Rep Power: 27 |
__________________
The skeleton ran out of shampoo in the shower. |
|
May 13, 2014, 04:29 |
|
#5 |
Senior Member
Philipp
Join Date: Jun 2011
Location: Germany
Posts: 1,297
Rep Power: 27 |
New version (1.0) of the OpenFoam model.
kOmegaSST_lowRe_V1.0.zip By the way: This is from Fluent version 15.0, incompressible flow, boundary conditions for walls are: U=(0,0,0), p=zeroGradient, k=1e-12, omega=omegaWallFunction, nut=calculated (or 0) If you use it and find some bugs, please post!
__________________
The skeleton ran out of shampoo in the shower. |
|
May 13, 2014, 04:52 |
|
#6 |
New Member
hana
Join Date: May 2014
Posts: 23
Rep Power: 12 |
I appreciate your support Thanks
k-w model is more powerful than k-e model in specific type of reactor So, I will use this. I have some question, During your work, what is tool to edit your code? Eclipse or Qt-creator or text based? I hope you post more valuable thing about openfoam. Thanks |
|
May 13, 2014, 05:07 |
|
#7 |
Senior Member
Philipp
Join Date: Jun 2011
Location: Germany
Posts: 1,297
Rep Power: 27 |
Hi, I use gedit in ubuntu.
__________________
The skeleton ran out of shampoo in the shower. |
|
May 13, 2014, 05:16 |
|
#8 |
Senior Member
|
Hi Philip,
I am trying to compile the code, its giving the error message. the message is: /kOmegaSST_lowRe$ wmake libso wmakeLnInclude: linking include files to ./lnInclude Making dependency list for source file kOmegaSST_lowRe/kOmegaSST_lowRe.C SOURCE=kOmegaSST_lowRe/kOmegaSST_lowRe.C ; g++ -m64 -Dlinux64 -DWM_DP -Wall -Wextra -Wno-unused-parameter -Wold-style-cast -Wnon-virtual-dtor -O3 -DNoRepository -ftemplate-depth-100 -I/home/cerecam/OpenFOAM/OpenFOAM-2.1.1/src/turbulenceModels -I/home/cerecam/OpenFOAM/OpenFOAM-2.1.1/src/transportModels -I/home/cerecam/OpenFOAM/OpenFOAM-2.1.1/src/finiteVolume/lnInclude -I/home/cerecam/OpenFOAM/OpenFOAM-2.1.1/src/meshTools/lnInclude -I/home/cerecam/OpenFOAM/OpenFOAM-2.1.1/src/turbulenceModels/incompressible/RAS/lnInclude -IlnInclude -I. -I/home/cerecam/OpenFOAM/OpenFOAM-2.1.1/src/OpenFOAM/lnInclude -I/home/cerecam/OpenFOAM/OpenFOAM-2.1.1/src/OSspecific/POSIX/lnInclude -fPIC -c $SOURCE -o Make/linux64GccDPOpt/kOmegaSST_lowRe.o kOmegaSST_lowRe/kOmegaSST_lowRe.C: In member function ‘virtual void Foam::incompressible::RASModels::kOmegaSST_lowRe:: correct()’: kOmegaSST_lowRe/kOmegaSST_lowRe.C:495:28: error: ‘GName’ was not declared in this scope make: *** [Make/linux64GccDPOpt/kOmegaSST_lowRe.o] Error 1 can you please tell me, what i need to change. Thanks, Sivakumar |
|
May 13, 2014, 05:30 |
|
#9 |
Senior Member
Philipp
Join Date: Jun 2011
Location: Germany
Posts: 1,297
Rep Power: 27 |
Hi Sivakumar,
Please have a look here: http://www.cfd-online.com/Forums/ope...tml#post469730 It seems that you are facing an error because you use version 2.1 and not 2.3 like me. I hope that helps.
__________________
The skeleton ran out of shampoo in the shower. |
|
June 1, 2014, 14:34 |
|
#10 |
Senior Member
Pete Bachant
Join Date: Jun 2012
Location: Boston, MA
Posts: 173
Rep Power: 14 |
This is great, thanks! Have you compared this to the foam-extend-3.0 kOmegaSST_lowRe model?
Also, you may want to put this up on GitHub or similar to make it easier to distribute new versions and collaborate on new developments. |
|
June 2, 2014, 03:54 |
|
#11 |
Senior Member
Philipp
Join Date: Jun 2011
Location: Germany
Posts: 1,297
Rep Power: 27 |
Pete, I didn't know they also have a version. But I just had a look and it is not the same. It seems that they integrated the omega boundary condition into the code. I don't see any big differences to the regular kOmegaSST model. Maybe someone should correct me.
In "my" (Fluent's) version, there are several damping functions as suggested by Wilcox in his paper "Simulation of Transition with a Two-Equation Turbulence Model", AIAA Journal Vol 32 No 2 February 1994. Equations 9 - 15. The exact values are slightly changed in Fluent.
__________________
The skeleton ran out of shampoo in the shower. |
|
April 27, 2016, 07:37 |
|
#13 |
Senior Member
Join Date: Mar 2016
Posts: 133
Rep Power: 10 |
Hi,
I have compiled K-Omega SST LowRe follwing instructions by github, but when I run renumberMesh or decomposePar, i have this warning: --> FOAM Warning : From function dlOpen(const fileName&, const bool) in file POSIX.C at line 1179 dlopen error : /home/gianmichele/OpenFOAM/gianmichele-3.0.1/platforms/linux64GccDPInt32Opt/lib/libmyIncompressibleRASModels.so: undefined symbol: _ZTIN4Foam29incompressibleTurbulenceModelE --> FOAM Warning : From function dlLibraryTable:pen(const fileName&, const bool) in file db/dynamicLibrary/dlLibraryTable/dlLibraryTable.C at line 99 could not load "libmyIncompressibleRASModels.so" Does it mean library isn't loaded? How resolve it? |
|
April 27, 2016, 08:57 |
|
#15 |
Senior Member
Join Date: Mar 2016
Posts: 133
Rep Power: 10 |
This compare me after compiling:
gianmichele@gianmichele-K52Jc:~/OpenFOAM/gianmichele-3.0.1/kOmegaSSTLowRe$ wmake libso wmakeLnInclude: linking include files to ./lnInclude Making dependency list for source file makeTurbulenceModels.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/turbulenceModels -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 -IlnInclude -I. -I/opt/openfoam30/src/OpenFOAM/lnInclude -I/opt/openfoam30/src/OSspecific/POSIX/lnInclude -fPIC -c makeTurbulenceModels.C -o Make/linux64GccDPInt32Opt/makeTurbulenceModels.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/turbulenceModels -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 -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/makeTurbulenceModels.o -L/opt/openfoam30/platforms/linux64GccDPInt32Opt/lib \ -lincompressibleTransportModels -lturbulenceModels -lfiniteVolume -lmeshTools -o /home/gianmichele/OpenFOAM/gianmichele-3.0.1/platforms/linux64GccDPInt32Opt/lib/libmyIncompressibleRASModels.so '/home/gianmichele/OpenFOAM/gianmichele-3.0.1/platforms/linux64GccDPInt32Opt/lib/libmyIncompressibleRASModels.so' is up to date. |
|
April 27, 2016, 18:49 |
|
#17 |
Senior Member
Join Date: Mar 2016
Posts: 133
Rep Power: 10 |
Thank you dear! Therefore there was an error on the library downloaded from GitHub and not an error of compilation. Now i try to recompile.
Cheers |
|
April 27, 2016, 20:10 |
|
#18 |
Senior Member
Join Date: Mar 2016
Posts: 133
Rep Power: 10 |
I don't have any warning now but my values of cl and cd are very instable and after a while my results explode. Do you recommend me particular schemes?
|
|
June 1, 2016, 09:15 |
|
#19 |
New Member
Lee Yachao
Join Date: Dec 2015
Location: Beijing,China
Posts: 12
Rep Power: 10 |
I have met the same question. How do you overcome the mistake?
|
|
June 1, 2016, 09:27 |
|
#20 |
Senior Member
Philipp
Join Date: Jun 2011
Location: Germany
Posts: 1,297
Rep Power: 27 |
Hey,
What schemes do you use right now? How does the log file look like? Philipp.
__________________
The skeleton ran out of shampoo in the shower. |
|
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Connecting Fluent benefits and Injection Molding Software | Jim87 | FLUENT | 1 | August 6, 2023 17:06 |
Two questions on Fluent UDF | Steven | Fluent UDF and Scheme Programming | 7 | March 23, 2018 04:22 |
heat transfer with RANS wall function, over a flat plate (validation with fluent) | bruce | OpenFOAM Running, Solving & CFD | 6 | January 20, 2017 07:22 |
Alias problem when starting FLUENT from command line | batch_error | FLUENT | 0 | May 24, 2012 09:20 |
Problems in lauching FLUENT | Lourival | FLUENT | 3 | January 16, 2008 17:48 |