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

gamma-ReTheta turbulence model for predicting transitional flows

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

Like Tree23Likes

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   June 9, 2016, 06:41
Default
  #81
Senior Member
 
Join Date: Mar 2016
Posts: 133
Rep Power: 10
giammy92 is on a distinguished road
--> FOAM Warning :
From function dlOpen(const fileName&, const bool)
in file POSIX.C at line 1179
dlopen error : /home/tesisti/OpenFOAM/tesisti-2.3.1/platforms/linux64GccDPOpt/lib/libGammaReThetatSST.so: undefined symbol: _ZTIN4Foam14incompressible8RASModelE
--> FOAM Warning :
From function dlLibraryTable:pen(const fileName&, const bool)
in file db/dynamicLibrary/dlLibraryTable/dlLibraryTable.C at line 99
could not load "libGammaReThetatSST.so"

i'm using version 2.3.1 i have implemented with wmake libso and add libs ("libGammaReThetatSST.so"); in controlDict.
This are my files in Make:

Files

gammaReThetatSST/gammaReThetatSST.C
derivedFvPatchFields/ReThetatTildaInlet/ReThetatTildaInletFvPatchScalarField.C

LIB = $(FOAM_USER_LIBBIN)/libGammaReThetatSST

Options

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 = \
-lincompressibleTransportModels \
-lincompressibleTurbulenceModels \
-lturbulenceModels \
-lfiniteVolume \
-lmeshTools

The original Options was without any library under LIB_LIBS = and I have had same error.
Could you find error in Make please?
giammy92 is offline   Reply With Quote

Old   June 9, 2016, 06:45
Default
  #82
Senior Member
 
Artur's Avatar
 
Artur
Join Date: May 2013
Location: Southampton, UK
Posts: 372
Rep Power: 20
Artur will become famous soon enough
Hi,

Are you sure it compiled correctly? Otherwise the issue could be that you usually need to include both the custom library and libOpenFOAM.so so that all the environment variables etc. get set up properly, like so:

Code:
libs ("libgammaReThetatSSTModel.so" "libOpenFOAM.so");
Hope this helps,

A
Artur is offline   Reply With Quote

Old   June 9, 2016, 07:13
Default
  #83
Senior Member
 
Join Date: Mar 2016
Posts: 133
Rep Power: 10
giammy92 is on a distinguished road
Sorry Artur but doesn't work with your suggest. Now I have recompiled it and this compare me:

tesisti@ime042:~/OpenFOAM/tesisti-2.3.1/gammaReThetatSST-master/src/turbulenceModels/incompressible/RAS> wmake libso
wmakeLnInclude: linking include files to ./lnInclude
Making dependency list for source file gammaReThetatSST/gammaReThetatSST.C
Making dependency list for source file derivedFvPatchFields/ReThetatTildaInlet/ReThetatTildaInletFvPatchScalarField.C
SOURCE=gammaReThetatSST/gammaReThetatSST.C ; g++ -m64 -Dlinux64 -DWM_DP -Wall -Wextra -Wno-unused-parameter -Wold-style-cast -Wnon-virtual-dtor -O3 -DNoRepository -ftemplate-depth-100 -I/home/tesisti/OpenFOAM/OpenFOAM-2.3.1/src/turbulenceModels -I/home/tesisti/OpenFOAM/OpenFOAM-2.3.1/src/transportModels -I/home/tesisti/OpenFOAM/OpenFOAM-2.3.1/src/finiteVolume/lnInclude -I/home/tesisti/OpenFOAM/OpenFOAM-2.3.1/src/meshTools/lnInclude -I/home/tesisti/OpenFOAM/OpenFOAM-2.3.1/src/turbulenceModels/incompressible/RAS/lnInclude -IlnInclude -I. -I/home/tesisti/OpenFOAM/OpenFOAM-2.3.1/src/OpenFOAM/lnInclude -I/home/tesisti/OpenFOAM/OpenFOAM-2.3.1/src/OSspecific/POSIX/lnInclude -fPIC -c $SOURCE -o Make/linux64GccDPOpt/gammaReThetatSST.o
SOURCE=derivedFvPatchFields/ReThetatTildaInlet/ReThetatTildaInletFvPatchScalarField.C ; g++ -m64 -Dlinux64 -DWM_DP -Wall -Wextra -Wno-unused-parameter -Wold-style-cast -Wnon-virtual-dtor -O3 -DNoRepository -ftemplate-depth-100 -I/home/tesisti/OpenFOAM/OpenFOAM-2.3.1/src/turbulenceModels -I/home/tesisti/OpenFOAM/OpenFOAM-2.3.1/src/transportModels -I/home/tesisti/OpenFOAM/OpenFOAM-2.3.1/src/finiteVolume/lnInclude -I/home/tesisti/OpenFOAM/OpenFOAM-2.3.1/src/meshTools/lnInclude -I/home/tesisti/OpenFOAM/OpenFOAM-2.3.1/src/turbulenceModels/incompressible/RAS/lnInclude -IlnInclude -I. -I/home/tesisti/OpenFOAM/OpenFOAM-2.3.1/src/OpenFOAM/lnInclude -I/home/tesisti/OpenFOAM/OpenFOAM-2.3.1/src/OSspecific/POSIX/lnInclude -fPIC -c $SOURCE -o Make/linux64GccDPOpt/ReThetatTildaInletFvPatchScalarField.o
'/home/tesisti/OpenFOAM/tesisti-2.3.1/platforms/linux64GccDPOpt/lib/libGammaReThetatSST.so' is up to date.
tesisti@ime042:~/OpenFOAM/tesisti-2.3.1/gammaReThetatSST-master/src/turbulenceModels/incompressible/RAS>

So seems that compilation is correct.
giammy92 is offline   Reply With Quote

Old   June 9, 2016, 08:01
Default
  #84
Senior Member
 
Artur's Avatar
 
Artur
Join Date: May 2013
Location: Southampton, UK
Posts: 372
Rep Power: 20
Artur will become famous soon enough
Yes, the compilation seems to work OK. The error you are getting is due to some sort of mix-up of library names, difficult to say for sure without diving into the code. My advice would be to see if the turbulence model actually gets used the way you intended (it should). If yes then you can probably ignore the warning or go through the code very carefully and make sure you are not re-defining any class or namespace names and stuff like that. You are not the only one with similar issues, if that's of any comfort:
http://www.cfd-online.com/Forums/ope...ed-symbol.html

Good luck,

A
Artur is offline   Reply With Quote

Old   June 9, 2016, 08:25
Default
  #85
Senior Member
 
Join Date: Mar 2016
Posts: 133
Rep Power: 10
giammy92 is on a distinguished road
Artur i have been able to resolve that error changing options like this:

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

And adding in controlDict these libraries:

libs
(
"libGammaReThetatSST.so"
"libOpenFOAM.so"
"libincompressibleTurbulenceModel.so"
"libincompressibleRASModels.so"
);

But now controlling residuals I have noted a strange thing: gamma's residual is always 0
I have set gamma at farfield to fixedValue 0 and at walls to zeroGradient...could be this the problem?
giammy92 is offline   Reply With Quote

Old   June 9, 2016, 08:33
Default
  #86
Senior Member
 
Artur's Avatar
 
Artur
Join Date: May 2013
Location: Southampton, UK
Posts: 372
Rep Power: 20
Artur will become famous soon enough
Great, thanks for sharing the solution.

As for your question, to be perfectly honest I haven't used the model for over a year now but looking at my old T3 case I see that I used:

gamma:
fV 1 at the inlet, zeroGradient/symmetryPlane everywhere else

ReThetaTilda:
fV 1.574098e+02 at the inlet (estimated using Langtry's thesis I'm sure, don't remember details), zeroGradient/symmetryPlane elsewhere

An yes, I expect residual of 0 is a problem, do any solver iterations run on the equation at all?
Artur is offline   Reply With Quote

Old   June 9, 2016, 08:41
Default
  #87
Senior Member
 
Join Date: Mar 2016
Posts: 133
Rep Power: 10
giammy92 is on a distinguished road
This is an output of iterations of solvers:

DILUPBiCG: Solving for Ux, Initial residual = 0.00101384, Final residual = 2.53875e-06, No Iterations 5
DILUPBiCG: Solving for Uy, Initial residual = 0.00372243, Final residual = 8.34491e-06, No Iterations 6
DICPCG: Solving for p, Initial residual = 0.158877, Final residual = 0.00157672, No Iterations 142
DICPCG: Solving for p, Initial residual = 0.00953748, Final residual = 9.4226e-05, No Iterations 242
DICPCG: Solving for p, Initial residual = 0.000902539, Final residual = 8.72116e-06, No Iterations 564
DICPCG: Solving for p, Initial residual = 0.000122209, Final residual = 1.19077e-06, No Iterations 196
time step continuity errors : sum local = 1.4866e-08, global = 3.47018e-16, cumulative = 3.4095e-13
DILUPBiCG: Solving for omega, Initial residual = 8.75562e-06, Final residual = 8.75562e-06, No Iterations 0
DILUPBiCG: Solving for k, Initial residual = 5.05121e-05, Final residual = 4.86721e-06, No Iterations 2
DILUPBiCG: Solving for ReThetatTilda, Initial residual = 0.00266045, Final residual = 0.000147846, No Iterations 2
DILUPBiCG: Solving for gamma, Initial residual = 0, Final residual = 0, No Iterations 0

In addition to gamma is worrying number of iterations of pressure.
giammy92 is offline   Reply With Quote

Old   June 9, 2016, 08:48
Default
  #88
Senior Member
 
Artur's Avatar
 
Artur
Join Date: May 2013
Location: Southampton, UK
Posts: 372
Rep Power: 20
Artur will become famous soon enough
Yup, definitely something fishy going on. Here's the setup I used in the past back when OF was at 2.2.2. This was based on one of the original test cases posted by Felix:
https://www.dropbox.com/s/ly0scvqgdh...3A.tar.gz?dl=0
Maybe have a look and see if there are any major differences between this and your setups.
Artur is offline   Reply With Quote

Old   June 9, 2016, 09:08
Default
  #89
Senior Member
 
Join Date: Mar 2016
Posts: 133
Rep Power: 10
giammy92 is on a distinguished road
Thank you Artur!
In my case have a O-grid so i have farfield. In this case is corrected set for ReThetatTilda bc ReThetatTildaInlet or i have set freestream?
Same thing for Gamma, now at farfield i have set fV, i have set freestream?
giammy92 is offline   Reply With Quote

Old   June 9, 2016, 09:11
Default
  #90
Senior Member
 
Artur's Avatar
 
Artur
Join Date: May 2013
Location: Southampton, UK
Posts: 372
Rep Power: 20
Artur will become famous soon enough
Yes, in the case of an O-grid I'd go for freeStream with similar values to mine (check out Langtry's thesis and lit review for how to estimate inlet conditions); optionally you could use inletOutlet since that will act in a similar fashion in this context, I expect.
Artur is offline   Reply With Quote

Old   June 9, 2016, 09:55
Default
  #91
Senior Member
 
Join Date: Mar 2016
Posts: 133
Rep Power: 10
giammy92 is on a distinguished road
About value of ReThetatTilda at farfield i have found a document in which there are equations to find Rethetat to page 16 from 3.24 to 3.28 bit isn't specified how find ReThetatTilda. Can I use the value obtained from these equations for ReThetatTilda?
giammy92 is offline   Reply With Quote

Old   June 9, 2016, 10:02
Default
  #92
Senior Member
 
Artur's Avatar
 
Artur
Join Date: May 2013
Location: Southampton, UK
Posts: 372
Rep Power: 20
Artur will become famous soon enough
I'll be perfectly honest, I don't remember how exactly this has to be done, sorry. Apart from Langtry's thesis I think this paper is quite useful to get your head around it:
http://cfd.mace.manchester.ac.uk/twi...a-re-theta.pdf

If I recall correctly, you have to assume a value for the pressure gradient coefficient and then compute one of the F(lambda) functions. This can then be used to yield ReThetaTilda value. At least this is what I appear to have done when I was working on the T3 case. Sadly I didn't make detailed notes so can't point you to the exact equations, they must be in the two references I shared though.

All the best,

A
Artur is offline   Reply With Quote

Old   June 9, 2016, 10:14
Default
  #93
Senior Member
 
Join Date: Mar 2016
Posts: 133
Rep Power: 10
giammy92 is on a distinguished road
So you are telling me that i have to use the last two equations in appendix 24 and 25? If they are, they are same that i have used to found Rethetat
giammy92 is offline   Reply With Quote

Old   June 9, 2016, 10:30
Default
  #94
Senior Member
 
Join Date: Mar 2016
Posts: 133
Rep Power: 10
giammy92 is on a distinguished road
And if I used for ReThetatTilda the bc, implemented with the turbulence model, RethetatTildaInlet, I'd avoid to calculate it. But the only doubt is if this bc is correct for farfield in a O-grid
giammy92 is offline   Reply With Quote

Old   June 9, 2016, 10:33
Default
  #95
Senior Member
 
Artur's Avatar
 
Artur
Join Date: May 2013
Location: Southampton, UK
Posts: 372
Rep Power: 20
Artur will become famous soon enough
From Langry's thesis, pp 42, below eq. 3.13:

Quote:
This term acts like a sink term and ensures that the intermittency remains close to zero in the laminar boundary layer (it is one in the freestream due to the inlet boundary condition and also due the presence of wall distance in Eq. 3.6).
which I interpret as: set gamma to 1 at the inlet, assign regular outlet or, in your case, use freeStreamValue of 1.

On the same page,

Quote:
The boundary condition for γ at a wall is zero normal flux while at an inlet the value of gamma is equal to 1.
which ties in with what I said above and tells you to use zeroGradient at the wall.

Moving on to ReTheta, on pp 45, last paragraph:

Quote:
The boundary condition for Reθt at a wall is zero flux. The boundary condition for Reθt at an inlet is calculated from the empirical correlation based on the inlet turbulence intensity.
so zeroGradient at the wall and an approximate expression at the inlet. Now, his thesis is all about correlations, pretty much, so difficult to pick any specific lines to focus on but this one from pp 44 is particularly:

Quote:
This is possible because the empirical correlations are defined as Reθt = f(Tu, dp/ds), and since Tu and dp/ds (streamwise pressure gradient) are defined in the freestream, Reθt is the only unknown quantity in the equation.
which tells you straight away that if you make the same assumptions as Langtry did you may use the correlations he derived in order to use the pressure gradient coefficient and inlet turbulence intensity to compute ReTheta value at the inlet, which is what I appear to have done.

Mind you, I could be misinterpreting this so use at your own risk

A
stingph and hesheng like this.
Artur is offline   Reply With Quote

Old   June 9, 2016, 10:36
Default
  #96
Senior Member
 
Artur's Avatar
 
Artur
Join Date: May 2013
Location: Southampton, UK
Posts: 372
Rep Power: 20
Artur will become famous soon enough
Quote:
Originally Posted by giammy92 View Post
And if I used for ReThetatTilda the bc, implemented with the turbulence model, RethetatTildaInlet, I'd avoid to calculate it. But the only doubt is if this bc is correct for farfield in a O-grid
I haven't looked at the BC developed by Felix so I don't know if it'll work. Judging from the name "ReThetatTildaInlet" I assume it's only valid for an inlet but would have to look at the code to be sure. I suggest you try doing that, I'm sure there's some documentation inside. Otherwise have a go with what I picked out from the thesis by Langtry and try the T3 and Aerospatiale A foils, or maybe something from the database by Selig, like SD7003, to validate your setup.

A
Artur is offline   Reply With Quote

Old   June 9, 2016, 10:52
Default
  #97
Senior Member
 
Join Date: Mar 2016
Posts: 133
Rep Power: 10
giammy92 is on a distinguished road
I really appreciate your help Artur. Now i'm going to try with ReThetatTildaInlet at farfield and using other bc you have suggested me, then I will notice about my results.
Best Regards!
giammy92 is offline   Reply With Quote

Old   July 1, 2016, 04:13
Default
  #98
Senior Member
 
Join Date: Mar 2016
Posts: 133
Rep Power: 10
giammy92 is on a distinguished road
Quote:
Originally Posted by Artur View Post
I'll be perfectly honest, I don't remember how exactly this has to be done, sorry. Apart from Langtry's thesis I think this paper is quite useful to get your head around it:
http://cfd.mace.manchester.ac.uk/twi...a-re-theta.pdf

If I recall correctly, you have to assume a value for the pressure gradient coefficient and then compute one of the F(lambda) functions. This can then be used to yield ReThetaTilda value. At least this is what I appear to have done when I was working on the T3 case. Sadly I didn't make detailed notes so can't point you to the exact equations, they must be in the two references I shared though.

All the best,

A
In this paper bc for k at wall is zeroGradient but usually k is a very small value at wall with wall function disabled. Even in flat plate simulation k is set to 1e-12.
giammy92 is offline   Reply With Quote

Old   July 1, 2016, 04:52
Default
  #99
Senior Member
 
Artur's Avatar
 
Artur
Join Date: May 2013
Location: Southampton, UK
Posts: 372
Rep Power: 20
Artur will become famous soon enough
Well spotted, I don't know why they used zeroGradient. I tend to use fixedValue 0 on the wall for k and zeroGradient for omega with the kkl model built-in OpenFOAM as well as for the gamma-Re-theta model.
Artur is offline   Reply With Quote

Old   July 1, 2016, 05:09
Default
  #100
Senior Member
 
Join Date: Mar 2016
Posts: 133
Rep Power: 10
giammy92 is on a distinguished road
Mmm, for omega at wall i'm using fixedValue ω = 6ν/(βy2) like in the paper. In my past simulation I used for wall k 1e-12 but my results were wrong and I had a flux without separation because my Cl was growing instead stall should occurs.
Currently I'm performing a simulation with k zeroGradient and it seems going better at the moment
giammy92 is offline   Reply With Quote

Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
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 Off
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Low Reynolds k-epsilon model YJZ ANSYS 1 August 20, 2010 13:57
Centrifugal Pump and Turbulence Model Michiel CFX 12 January 25, 2010 03:20
RSM & Transitional Flows!!! Erika FLUENT 0 March 31, 2006 10:56
Turbulence model Herry Phoenics 1 May 29, 2003 13:19
turbulent separated flows Yin Fidelity CFD 9 February 19, 2003 11:50


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