low reynolds re turbulence boundary and yPlus values
I'm solving with the buoyantBoussinesqSimpleFoam solver with low-re turbulence models, so I don't use any wall-functions.
So I'm using for my k field e.d.:
value uniform 0.00000001;
for the epsilon field:
value uniform 0.000001;
and for the nut field:
Is it right to set the nut field to calculated? The simulations works great, the residuals are ca. 10-9.
When trying to plot the yPlus values with yPlusRAS I get following message:
no nutWallFunction patches
Writing yPlus to field yPlus
Plotting them in paraview I see only yPlus = 0.
So do I need a wallfunction in my nut-field? Or did I set the case wrong?
Thanks a lot,
shouldn't the yPlus value be calculated without using wallfunctions by:
y+ = (y*u_tau)/nu
Tau_wall = mu du/dz at the nearest cell to the wall.
so Tau_wall = mu * u_cell/y_cell
y+=sqrt (y * u_cell/nu)
So I'm not sure, but in the RAsModel.C and in the yPlusRAS.C data should be modified to calculate the yPlus-values for low-reynolds turbulence models.
I am not sure about this but interested.
First of all I think you still have to use a low re turbulence model in 1.6 for low-re calculations. Afaik it is not possible to use one of the high-reynolds models and only set nut to calculated. I guess you did this?
I think calculation of y+ is independend of high or low re model always done by the formula you have given. So this should be ok.
I don't kow if setting nut to calculated is right for low-re-turbulencemodels, maybe someone can help us about that.
Hi Thomas and bastil,
I had exactly the same issue, for my (periodic) pipe flow with RANS models. For obatining fields of u+ and y+ (especially for plotting u+ over y+ velocity profiles) I created a new utility which does the job for me.
Since its really an ugly piece of code, I would prefer to send it to you via eMail then uploading it here or posting the entire code, so if you are still interested, please tell me and provide me with your eMail adress.
Hallo basil and Florian,
firstly I'm using real low-reynolds turbulence models e.d. LaunderSharmaKE and LamBremhorstKE.
For high reynolds-number models you calculate the y+ values in an different way, because you are modelling the velocity-profil in the wall-next-cell. So you have to get the real wall-velocity-gradient, using the velocity-field values give you too low gradients.
The y-plus value is calculated in the RASModel.C with the log-law:
Yp = pow(Cmu, 0.25)
So you can only use it for high-reynolds-turbulence-models.
So Florian, it would be very kind of you to send me your code. I will send you my e-mail adress.
In fact, my utility is intended for the use of low-Re RANS models. I myself use the LaunderSharmaKE model.
What is the correct way to set-up a low-reynolds case in 1.6? Is it to set type calculated; for nut? Is there an example out there for this?
please can someone check if this is correct?
PS: this will answer to a similar question I posted some days ago here as well...
al you write makes perfectly sence to me. However I am not sure about the exact of 1.6. Maybe one of the developers can comment on this since there are many similar threads around there at the moment.
yes, it would be great if the developers could comment on that!
Some more observations:
setup 1 - for my high-Re kEpsilon simulations I also use wall function for nut, I have no problems with instability and exploding k and epsilon values.... (might be a flaw somewhere else in your setup)
setup 3 - why should it be neccesary to use calculated for nut? I use zeroGradient and the simulation results are quite good (look at attached uPlus yPlus plot), I just made a test using calculated and its not changing considerably.
1. is right. This is the traditional "Hi-Re" modelling.
2. I do not think you should do this.
3. I think we must not set nut for that case. Set k end epsilon as "zeroGradient". Look at the tutorial compressible/sonicFoam/ras/nacaAirfoil (uses LaunderSharmaKE). This is the traditional "Low-Re" modelling.
4. is right
to add 5. If you have a hybrid/all yplus model OpenFOAM 1.6 offers kind of a hybrid wall function. This seems to work quite fine at least for komega-Turbulence. You need to set nut to "nutSpalartAllmarasWallFunction" even though this name is quite confusing. It is intended as kind of a general purpose blending function... (http://www.cfd-online.com/Forums/ope...tml#post244144). Sometimes I simply wish the documentation to be better....
To come to an end I have posted a bug report to get the yPlus-calculation fixed.
I am trying to simulate an impingingjet using the simpleFoam in OF1.6.x. I am trying to follow the threads and tried different things. But I am still getting the same error. I am posting my error and attaching my initial bc. Your support will be greatly appreciated.
Time = 759
DILUPBiCG: Solving for Ux, Initial residual = 0.364807, Final residual = 0.0331038, No Iterations 1
DILUPBiCG: Solving for Uy, Initial residual = 0.401396, Final residual = 0.0185339, No Iterations 1
DILUPBiCG: Solving for Uz, Initial residual = 0.439448, Final residual = 0.0046591, No Iterations 1
GAMG: Solving for p, Initial residual = 0.569614, Final residual = 0.00428777, No Iterations 66
time step continuity errors : sum local = 3.14096e+42, global = 3.09629e+39, cumulative = 6.80133e+40
DILUPBiCG: Solving for epsilon, Initial residual = 1.08298e-09, Final residual = 1.08298e-09, No Iterations 0
DILUPBiCG: Solving for k, Initial residual = 0.000115294, Final residual = 2.84805e-06, No Iterations 2
ExecutionTime = 47327.3 s ClockTime = 48069 s
Time = 760
DILUPBiCG: Solving for Ux, Initial residual = 0.506818, Final residual = 0.00973123, No Iterations 2
DILUPBiCG: Solving for Uy, Initial residual = 0.603294, Final residual = 0.0122224, No Iterations 2
DILUPBiCG: Solving for Uz, Initial residual = 0.280386, Final residual = 0.00518198, No Iterations 2
GAMG: Solving for p, Initial residual = 0.0695246, Final residual = 0.000686704, No Iterations 30
time step continuity errors : sum local = 1.41992e+43, global = 4.71133e+41, cumulative = 5.39147e+41
DILUPBiCG: Solving for epsilon, Initial residual = 3.87187e-11, Final residual = 3.87187e-11, No Iterations 0
DILUPBiCG: Solving for k, Initial residual = 1, Final residual = 0.0894909, No Iterations 1
bounding k, min: -7.27376e+51 max: 5.05817e+89 average: 5.17561e+84
ExecutionTime = 47386.5 s ClockTime = 48159 s
Time = 761
DILUPBiCG: Solving for Ux, Initial residual = 0.417362, Final residual = 0.0145424, No Iterations 1
DILUPBiCG: Solving for Uy, Initial residual = 0.51114, Final residual = 0.0224704, No Iterations 1
DILUPBiCG: Solving for Uz, Initial residual = 0.376437, Final residual = 0.0288099, No Iterations 1
GAMG: Solving for p, Initial residual = 0.629327, Final residual = 0.00528483, No Iterations 8
time step continuity errors : sum local = 1.11456e+78, global = 4.87405e+75, cumulative = 4.87405e+75
DILUPBiCG: Solving for epsilon, Initial residual = 4.23728e-09, Final residual = 4.23728e-09, No Iterations 0
#0 Foam::error::printStack(Foam::Ostream&) in "/home/jish/OpenFOAM/OpenFOAM-1.6.x/lib/linux64GccDPOpt/libOpenFOAM.so"
#1 Foam::sigFpe::sigFpeHandler(int) in "/home/jish/OpenFOAM/OpenFOAM-1.6.x/lib/linux64GccDPOpt/libOpenFOAM.so"
#2 ?? in "/lib/libc.so.6"
#3 Foam::PBiCG::solve(Foam::Field<double>&, Foam::Field<double> const&, unsigned char) const in "/home/jish/OpenFOAM/OpenFOAM-1.6.x/lib/linux64GccDPOpt/libOpenFOAM.so"
#4 Foam::fvMatrix<double>::solve(Foam::dictionary const&) in "/home/jish/OpenFOAM/OpenFOAM-1.6.x/lib/linux64GccDPOpt/libfiniteVolume.so"
#5 Foam::lduMatrix::solverPerformance Foam::solve<double>(Foam::tmp<Foam::fvMatrix<doubl e> > const&) in "/home/jish/OpenFOAM/OpenFOAM-1.6.x/lib/linux64GccDPOpt/libincompressibleRASModels.so"
#6 Foam::incompressible::RASModels::kEpsilon::correct () in "/home/jish/OpenFOAM/OpenFOAM-1.6.x/lib/linux64GccDPOpt/libincompressibleRASModels.so"
#7 main in "/home/jish/OpenFOAM/OpenFOAM-1.6.x/applications/bin/linux64GccDPOpt/simpleFoam"
#8 __libc_start_main in "/lib/libc.so.6"
#9 _start at /build/buildd/eglibc-2.10.1/csu/../sysdeps/x86_64/elf/start.S:116
Floating point exception
i am new in openFoam and at the moment also trying to make a low-Reynolds-Model work.
I use the LamBremhorstKE with the pisoFoam solver. I think that k and epsilon explode, and i get this error message:
| ========= | |
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
| \\ / O peration | Version: 1.6 |
| \\ / A nd | Web: www.OpenFOAM.org |
| \\/ M anipulation | |
Build : 1.6-f802ff2d6c5a
Exec : pisoFoam
Date : Apr 12 2010
Time : 17:38:30
Host : itb15
PID : 13551
Case : /CFD/Moritz/ahmed_low_re_2
nProcs : 1
SigFpe : Enabling floating point exception trapping (FOAM_SIGFPE).
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
Create mesh for time = 0
Reading field p
Reading field U
Reading/calculating face flux field phi
Selecting incompressible transport model Newtonian
Selecting turbulence model type RASModel
Selecting RAS turbulence model LamBremhorstKE
--> FOAM Warning :
From function GeometricField<Type, PatchField, GeoMesh>::readIfPresent()
in file /CFD/Daniel/src-openfoam/install/OpenFOAM-1.6/src/OpenFOAM/lnInclude/GeometricField.C at line 107
read option IOobject::MUST_READ suggests that a read constructor for field epsilon would be more appropriate.
Starting time loop
Time = 1e-07
Courant Number mean: 0 max: 0
DILUPBiCG: Solving for Ux, Initial residual = 1, Final residual = 1.31903e-16, No Iterations 1
DILUPBiCG: Solving for Uy, Initial residual = 0, Final residual = 0, No Iterations 0
DILUPBiCG: Solving for Uz, Initial residual = 0, Final residual = 0, No Iterations 0
DICPCG: Solving for p, Initial residual = 1, Final residual = 0.0978004, No Iterations 297
time step continuity errors : sum local = 5.58285e-08, global = -1.88251e-10, cumulative = -1.88251e-10
DICPCG: Solving for p, Initial residual = 0.0402446, Final residual = 9.95978e-07, No Iterations 367
time step continuity errors : sum local = 8.99511e-11, global = 1.63882e-14, cumulative = -1.88235e-10
#0 Foam::error::printStack(Foam::Ostream&) in "/usr/local/OPENFOAM/OpenFOAM-1.6/lib/linux64GccDPOpt/libOpenFOAM.so"
#1 Foam::sigFpe::sigFpeHandler(int) in "/usr/local/OPENFOAM/OpenFOAM-1.6/lib/linux64GccDPOpt/libOpenFOAM.so"
#2 ?? in "/lib64/libc.so.6"
#3 Foam::divide(Foam::Field<double>&, Foam::UList<double> const&, Foam::UList<double> const&) in "/usr/local/OPENFOAM/OpenFOAM-1.6/lib/linux64GccDPOpt/libOpenFOAM.so"
#4 void Foam::divide<Foam::fvPatchField, Foam::volMesh>(Foam::GeometricField<double, Foam::fvPatchField, Foam::volMesh>&, Foam::GeometricField<double, Foam::fvPatchField, Foam::volMesh> const&, Foam::GeometricField<double, Foam::fvPatchField, Foam::volMesh> const&) in "/usr/local/OPENFOAM/OpenFOAM-1.6/lib/linux64GccDPOpt/libincompressibleRASModels.so"
#5 Foam::tmp<Foam::GeometricField<double, Foam::fvPatchField, Foam::volMesh> > Foam::operator/<Foam::fvPatchField, Foam::volMesh>(Foam::tmp<Foam::GeometricField<doub le, Foam::fvPatchField, Foam::volMesh> > const&, Foam::GeometricField<double, Foam::fvPatchField, Foam::volMesh> const&) in "/usr/local/OPENFOAM/OpenFOAM-1.6/lib/linux64GccDPOpt/libincompressibleRASModels.so"
#6 Foam::incompressible::RASModels::LamBremhorstKE::c orrect() in "/usr/local/OPENFOAM/OpenFOAM-1.6/lib/linux64GccDPOpt/libincompressibleRASModels.so"
#7 main in "/usr/local/OPENFOAM/OpenFOAM-1.6/applications/bin/linux64GccDPOpt/pisoFoam"
#8 __libc_start_main in "/lib64/libc.so.6"
#9 __gxx_personality_v0 in "/usr/local/OPENFOAM/OpenFOAM-1.6/applications/bin/linux64GccDPOpt/pisoFoam"
I also ran the model with a coarser mesh, there it started calculating but k and epsilon went to -e12 to e12 and it finally crashed.
by the way, is it allowed that those values become negative?
Does anybody know if the LamBremhorst-Model is working in the actual version?
If yes, could you give me a hint, which initial conditions you use?
As boundary cond. i use
k fixed value 0.000000001
all surfaces are defined as patch.
it would be great if somebody could explain experiences maybe already made.
all the best,
after reporting a bug the Problem has been fixed in 1.6.x. Since I sometimes still use 1.5-dev I am wondering if the problem with yPlusRAS exists there, too. As far as I see - yes. Right? If yes, Florian could you please send me your fixed version? Thanks.
Edit: To make it clear: My older post was generally right (saying that yplus should be calculated identially for all turbulence models). The fact ist that yPlusRAS calculates a value that FLUENT refers to as ySTAR:
yPLUS is defined here:
http://www.cfd-online.com/Wiki/Dimensionless_wall_distance_(y_plus) and is independant of turbulence modelling (however, you have to get the wall shear stress right)
I am having the same problem as Thomas had. If it is possible would you mind make the code to calculate yPlusRAS publicly available?
Thanks and regards,
I am sorry but I have no access to any data at the moment (vacation!)
Thomas, didn't I send you my utility to calculate y-plus for low-Re RANS models once. If so, maybe you could send it to Robert.
Since so many prople are asking for it, I will review it and make it public after my vacation in mid of March.
thank you florian, that would just be great.
Concerning the turbulent viscosity mut or nut, I have tested a calculated as well as a zeroGradient boundary condition. There was no difference difference in both calculations.
Just for a comparison I have tested k and epsilon with a zeroGradient bc. This results in an unphysical thickening of the boundary layer.
|All times are GMT -4. The time now is 17:31.|