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

kOmegaSST with lowRe-damping (as in Fluent)

Register Blogs Community New Posts Updated Threads Search

Like Tree21Likes

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   April 24, 2014, 09:31
Default kOmegaSST with lowRe-damping (as in Fluent)
  #1
Senior Member
 
RodriguezFatz's Avatar
 
Philipp
Join Date: Jun 2011
Location: Germany
Posts: 1,297
Rep Power: 27
RodriguezFatz will become famous soon enough
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
and "options" looks like:
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
For compiling I go into the main directory and type "wmake libso".
Then, in my OpenFoam case I change the controlDict libs to
Code:
libs
(
    "libOpenFOAM.so"
    "libincompressibleTurbulenceModel.so"
    "libMyIncompressibleRASModels.so"
    "libincompressibleRASModels.so"
);
and the RASProperties to
Code:
RASModel        kOmegaSST_lowRe;
k at the wall is set to 1e-12, nut to calculated and omega to omegaWallFunction.


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
jherb, lt.quibbler, xpqiu and 4 others like this.
__________________
The skeleton ran out of shampoo in the shower.
RodriguezFatz is offline   Reply With Quote

Old   May 7, 2014, 12:55
Default
  #2
New Member
 
Park sangbin
Join Date: Dec 2013
Location: South Korea
Posts: 3
Rep Power: 12
sangbin.hana is on a distinguished road
Thank you for your help thanks
sangbin.hana is offline   Reply With Quote

Old   May 13, 2014, 04:25
Default
  #3
Senior Member
 
RodriguezFatz's Avatar
 
Philipp
Join Date: Jun 2011
Location: Germany
Posts: 1,297
Rep Power: 27
RodriguezFatz will become famous soon enough
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.
RodriguezFatz is offline   Reply With Quote

Old   May 13, 2014, 04:26
Default
  #4
Senior Member
 
RodriguezFatz's Avatar
 
Philipp
Join Date: Jun 2011
Location: Germany
Posts: 1,297
Rep Power: 27
RodriguezFatz will become famous soon enough
Pipe Flow:
pipe_U.png

pipe_k.png

pipe_nut.png

pipe_omega.png
__________________
The skeleton ran out of shampoo in the shower.
RodriguezFatz is offline   Reply With Quote

Old   May 13, 2014, 04:29
Default
  #5
Senior Member
 
RodriguezFatz's Avatar
 
Philipp
Join Date: Jun 2011
Location: Germany
Posts: 1,297
Rep Power: 27
RodriguezFatz will become famous soon enough
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!
Ohbuchi, kiddmax, fumiya and 10 others like this.
__________________
The skeleton ran out of shampoo in the shower.
RodriguezFatz is offline   Reply With Quote

Old   May 13, 2014, 04:52
Default
  #6
New Member
 
hana
Join Date: May 2014
Posts: 23
Rep Power: 12
bluenail is on a distinguished road
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
bluenail is offline   Reply With Quote

Old   May 13, 2014, 05:07
Default
  #7
Senior Member
 
RodriguezFatz's Avatar
 
Philipp
Join Date: Jun 2011
Location: Germany
Posts: 1,297
Rep Power: 27
RodriguezFatz will become famous soon enough
Hi, I use gedit in ubuntu.
__________________
The skeleton ran out of shampoo in the shower.
RodriguezFatz is offline   Reply With Quote

Old   May 13, 2014, 05:16
Default
  #8
Senior Member
 
sivakumar selvaraju
Join Date: Mar 2009
Location: India
Posts: 205
Rep Power: 18
sivakumar is on a distinguished road
Send a message via Skype™ to sivakumar
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
sivakumar is offline   Reply With Quote

Old   May 13, 2014, 05:30
Default
  #9
Senior Member
 
RodriguezFatz's Avatar
 
Philipp
Join Date: Jun 2011
Location: Germany
Posts: 1,297
Rep Power: 27
RodriguezFatz will become famous soon enough
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.
RodriguezFatz is offline   Reply With Quote

Old   June 1, 2014, 14:34
Default
  #10
Senior Member
 
Pete Bachant
Join Date: Jun 2012
Location: Boston, MA
Posts: 173
Rep Power: 14
pbachant is on a distinguished road
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.
__________________
Home | Twitter | GitHub
pbachant is offline   Reply With Quote

Old   June 2, 2014, 03:54
Default
  #11
Senior Member
 
RodriguezFatz's Avatar
 
Philipp
Join Date: Jun 2011
Location: Germany
Posts: 1,297
Rep Power: 27
RodriguezFatz will become famous soon enough
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.
RodriguezFatz is offline   Reply With Quote

Old   November 16, 2015, 03:03
Default
  #12
Senior Member
 
akidess's Avatar
 
Anton Kidess
Join Date: May 2009
Location: Germany
Posts: 1,377
Rep Power: 30
akidess will become famous soon enough
For anyone interested, Pete put the code on Github

https://github.com/petebachant/kOmegaSSTLowRe
ms.hashempour likes this.
__________________
*On twitter @akidTwit
*Spend as much time formulating your questions as you expect people to spend on their answer.
akidess is offline   Reply With Quote

Old   April 27, 2016, 07:37
Default
  #13
Senior Member
 
Join Date: Mar 2016
Posts: 133
Rep Power: 10
giammy92 is on a distinguished road
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?
giammy92 is offline   Reply With Quote

Old   April 27, 2016, 08:13
Default
  #14
Senior Member
 
Pete Bachant
Join Date: Jun 2012
Location: Boston, MA
Posts: 173
Rep Power: 14
pbachant is on a distinguished road
Yep, that means the lib isn't loading. Did you get any errors when compiling?
__________________
Home | Twitter | GitHub
pbachant is offline   Reply With Quote

Old   April 27, 2016, 08:57
Default
  #15
Senior Member
 
Join Date: Mar 2016
Posts: 133
Rep Power: 10
giammy92 is on a distinguished road
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.
giammy92 is offline   Reply With Quote

Old   April 27, 2016, 17:57
Default
  #16
Senior Member
 
Pete Bachant
Join Date: Jun 2012
Location: Boston, MA
Posts: 173
Rep Power: 14
pbachant is on a distinguished road
I was able to reproduce the warning and just pushed a commit to GitHub that should fix it. Good luck!
__________________
Home | Twitter | GitHub
pbachant is offline   Reply With Quote

Old   April 27, 2016, 18:49
Default
  #17
Senior Member
 
Join Date: Mar 2016
Posts: 133
Rep Power: 10
giammy92 is on a distinguished road
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
giammy92 is offline   Reply With Quote

Old   April 27, 2016, 20:10
Default
  #18
Senior Member
 
Join Date: Mar 2016
Posts: 133
Rep Power: 10
giammy92 is on a distinguished road
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?
giammy92 is offline   Reply With Quote

Old   June 1, 2016, 09:15
Default
  #19
New Member
 
Lee Yachao
Join Date: Dec 2015
Location: Beijing,China
Posts: 12
Rep Power: 10
iLyrics is on a distinguished road
I have met the same question. How do you overcome the mistake?
iLyrics is offline   Reply With Quote

Old   June 1, 2016, 09:27
Default
  #20
Senior Member
 
RodriguezFatz's Avatar
 
Philipp
Join Date: Jun 2011
Location: Germany
Posts: 1,297
Rep Power: 27
RodriguezFatz will become famous soon enough
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.
RodriguezFatz 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
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


All times are GMT -4. The time now is 00:20.