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

kOmegaSST with lowRe-damping (as in Fluent)

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

Like Tree10Likes
  • 2 Post By RodriguezFatz
  • 8 Post By RodriguezFatz

Reply
 
LinkBack Thread Tools Display Modes
Old   April 24, 2014, 08:31
Default kOmegaSST with lowRe-damping (as in Fluent)
  #1
Senior Member
 
RodriguezFatz's Avatar
 
Philipp
Join Date: Jun 2011
Location: Germany
Posts: 1,097
Rep Power: 16
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
lt.quibbler and saimat like this.
__________________
The skeleton ran out of shampoo in the shower.
RodriguezFatz is offline   Reply With Quote

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

Old   May 13, 2014, 03:25
Default
  #3
Senior Member
 
RodriguezFatz's Avatar
 
Philipp
Join Date: Jun 2011
Location: Germany
Posts: 1,097
Rep Power: 16
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, 03:26
Default
  #4
Senior Member
 
RodriguezFatz's Avatar
 
Philipp
Join Date: Jun 2011
Location: Germany
Posts: 1,097
Rep Power: 16
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, 03:29
Default
  #5
Senior Member
 
RodriguezFatz's Avatar
 
Philipp
Join Date: Jun 2011
Location: Germany
Posts: 1,097
Rep Power: 16
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 5 others like this.
__________________
The skeleton ran out of shampoo in the shower.
RodriguezFatz is offline   Reply With Quote

Old   May 13, 2014, 03:52
Default
  #6
New Member
 
hana
Join Date: May 2014
Posts: 23
Rep Power: 3
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, 04:07
Default
  #7
Senior Member
 
RodriguezFatz's Avatar
 
Philipp
Join Date: Jun 2011
Location: Germany
Posts: 1,097
Rep Power: 16
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, 04:16
Default
  #8
Senior Member
 
sivakumar selvaraju
Join Date: Mar 2009
Location: Cape Town - South Africa
Posts: 186
Rep Power: 8
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, 04:30
Default
  #9
Senior Member
 
RodriguezFatz's Avatar
 
Philipp
Join Date: Jun 2011
Location: Germany
Posts: 1,097
Rep Power: 16
RodriguezFatz will become famous soon enough
Hi Sivakumar,

Please have a look here:
Implementing v2f turbulence model in 2.1.x - GName not declared error
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, 13:34
Default
  #10
Member
 
Pete Bachant
Join Date: Jun 2012
Location: NH, USA
Posts: 89
Rep Power: 5
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, 02:54
Default
  #11
Senior Member
 
RodriguezFatz's Avatar
 
Philipp
Join Date: Jun 2011
Location: Germany
Posts: 1,097
Rep Power: 16
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

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
heat transfer with RANS wall function, over a flat plate (validation with fluent) bruce OpenFOAM Running, Solving & CFD 5 September 25, 2013 04:40
Two questions on Fluent UDF Steven Fluent UDF and Scheme Programming 4 September 20, 2013 16:30
Connecting Fluent benefits and Injection Molding Software Jim87 FLUENT 0 May 21, 2013 17:55
Alias problem when starting FLUENT from command line batch_error FLUENT 0 May 24, 2012 08:20
Problems in lauching FLUENT Lourival FLUENT 3 January 16, 2008 17:48


All times are GMT -4. The time now is 21:19.