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

simpleFoam with Launder-Sharma Model

Register Blogs Community New Posts Updated Threads Search

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   March 1, 2010, 11:53
Default simpleFoam with Launder-Sharma Model
  #1
New Member
 
June
Join Date: Dec 2009
Posts: 18
Rep Power: 17
examosty is on a distinguished road
Hello everyone,
I'm a new user with openfoam. Now i want to use simpleFoam with Launder-Sharma Low-Re Model. There's only one time step calculated. Then a erro as below is displayed.

// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
Create time

Create mesh for time = 0

Reading field p

Reading field U

Reading/calculating face flux field phi

Selecting incompressible transport model Newtonian
Selecting RAS turbulence model LaunderSharmaKE
LaunderSharmaKECoeffs
{
Cmu 0.09;
C1 1.44;
C2 1.92;
sigmaEps 1.3;
}


Starting time loop

Time = 0.1

DILUPBiCG: Solving for Ux, Initial residual = 1, Final residual = 0.0606568, No Iterations 1
DILUPBiCG: Solving for Uy, Initial residual = 0.995352, Final residual = 0.0222388, No Iterations 1
DICPCG: Solving for p, Initial residual = 1, Final residual = 0.00735996, No Iterations 6
DICPCG: Solving for p, Initial residual = 0.00365507, Final residual = 3.33199e-05, No Iterations 63
DICPCG: Solving for p, Initial residual = 2.37913e-05, Final residual = 8.92903e-07, No Iterations 30
time step continuity errors : sum local = 4.57548e-05, global = -4.42317e-06, cumulative = -4.42317e-06
#0 Foam::error:rintStack(Foam::Ostream&) in "/usr/local/OpenFOAM/1.6/lib/linux64GccDPOpt/libOpenFOAM.so"
#1 Foam::sigFpe::sigFpeHandler(int) in "/usr/local/OpenFOAM/1.6/lib/linux64GccDPOpt/libOpenFOAM.so"
#2 __restore_rt at sigaction.c:0
#3 Foam::divide(Foam::Field<double>&, Foam::UList<double> const&, Foam::UList<double> const&) in "/usr/local/OpenFOAM/1.6/lib/li
#4 void Foam::divide<Foam::fvPatchField, Foam::volMesh>(Foam::GeometricField<double, Foam::fvPatchField, Foam::volMesh>&, Foam::sh> const&, Foam::GeometricField<double, Foam::fvPatchField, Foam::volMesh> const&) in "/usr/local/OpenFOAM/1.6/lib/linux64GccDPO
#5 Foam::tmp<Foam::GeometricField<double, Foam::fvPatchField, Foam::volMesh> > Foam:perator/<Foam::fvPatchField, Foam::volMeshField, Foam::volMesh> > const&, Foam::GeometricField<double, Foam::fvPatchField, Foam::volMesh> const&) in "/usr/local/OpenFOAM/1
#6 Foam::incompressible::RASModels::LaunderSharmaKE:: correct() in "/usr/local/OpenFOAM/1.6/lib/linux64GccDPOpt/libincompressible
#7 main in "/usr/local/OpenFOAM/1.6/applications/bin/linux64GccDPOpt/simpleFoam"
#8 __libc_start_main in "/lib64/libc.so.6"
#9 _start at /usr/src/packages/BUILD/glibc-2.9/csu/../sysdeps/x86_64/elf/start.S:116
Floating exception


I cann't get any useful information from the erro.
The p, U, k, nut, epsilon are gaven as boundary condition.
My question is, can simpleFoam be used with LS Model or did I do something wrong?
examosty is offline   Reply With Quote

Old   March 2, 2010, 04:07
Default
  #2
Senior Member
 
Join Date: Apr 2009
Location: Karlsruhe, Germany
Posts: 104
Rep Power: 17
Thomas Baumann is on a distinguished road
Hi,

simpleFoam is able to use LaunderSharma,

look at following posting:
http://www.cfd-online.com/Forums/ope...us-values.html

You must be careful with your inlet bc's for k and epsilon.

Regards Thomas
Thomas Baumann is offline   Reply With Quote

Old   March 2, 2010, 08:23
Default
  #3
New Member
 
June
Join Date: Dec 2009
Posts: 18
Rep Power: 17
examosty is on a distinguished road
Hi Thomas,
Thanks for the reply.
why cannot i set the k and epsilon not equal 0 for the boundary condition at wall? That was the problem of me.
Regards Yang

Last edited by examosty; March 2, 2010 at 12:07.
examosty is offline   Reply With Quote

Old   March 3, 2010, 03:35
Default
  #4
Senior Member
 
Join Date: Apr 2009
Location: Karlsruhe, Germany
Posts: 104
Rep Power: 17
Thomas Baumann is on a distinguished road
I think you are not allowed to divide through zero.
Thomas Baumann is offline   Reply With Quote

Old   March 3, 2010, 03:47
Default
  #5
Member
 
Primoz Ternik
Join Date: Apr 2009
Location: Maribor, Slovenia
Posts: 65
Rep Power: 17
ternik is on a distinguished road
Quote:
Originally Posted by examosty View Post
Hi Thomas,
Thanks for the reply.
why cannot i set the k and epsilon not equal 0 for the boundary condition at wall? That was the problem of me.
Regards Yang
Hi Examosty,

why would you set non-zero values at solid walls for k and epsilon? Launder-Sharma turbulence model is so called "low reynolds number" closure ad its damping function, values of constants, etc. are derived on the basis of zero values for k and epsilon (at solid walls)!

I really suggest that you grab your hands on the following book David C. Wilcox, Turbulence Modelling For CFD

Cheers,
Primoz
ternik is offline   Reply With Quote

Old   March 3, 2010, 07:16
Default
  #6
New Member
 
June
Join Date: Dec 2009
Posts: 18
Rep Power: 17
examosty is on a distinguished road
Quote:
Originally Posted by ternik View Post
Hi Examosty,

why would you set non-zero values at solid walls for k and epsilon? Launder-Sharma turbulence model is so called "low reynolds number" closure ad its damping function, values of constants, etc. are derived on the basis of zero values for k and epsilon (at solid walls)!

I really suggest that you grab your hands on the following book David C. Wilcox, Turbulence Modelling For CFD

Cheers,
Primoz
Hi Primoz,
that's what i thought and what i did, set k and epsilon at solid wall equal 0. Then the error as i've replayed in the beginning occurred. As Thomas said, it's a problem of dividing through zero.
Regards,
June
examosty is offline   Reply With Quote

Old   March 3, 2010, 08:01
Default
  #7
Member
 
Primoz Ternik
Join Date: Apr 2009
Location: Maribor, Slovenia
Posts: 65
Rep Power: 17
ternik is on a distinguished road
Quote:
Originally Posted by examosty View Post
Hi Primoz,
that's what i thought and what i did, set k and epsilon at solid wall equal 0. Then the error as i've replayed in the beginning occurred. As Thomas said, it's a problem of dividing through zero.
Regards,
June
now I am getting the point! I do not know exactly how the Launder-Shrama is incorporated in OpenFoam, but "the general" theory for solid wall behaviour is (at lest I think so):
  • since there are no velocity fluctuations in a near wall region (viscous forces are predominant) the turbulence kinetic energy is 0 at solid wall
  • for dissipation of turbulence kinetic energy "low Re" closures solves "modified" equation for epsilon
epsilon_mod=epsilon-D
  • so actually, you are prescribing boundary conditions for "modified epsilon", which is zero at solid wall
Hope this helps,
Primoz
ternik is offline   Reply With Quote

Old   May 30, 2015, 12:34
Default
  #8
New Member
 
Ricardo Ferreira
Join Date: May 2015
Posts: 16
Rep Power: 11
RLFerreira is on a distinguished road
Hello Foamers!
I'm a new user in OpenFoam. I appreciate your helps and tips and I'm gratefull for that. My problem is incompressible flow through radial diffuser with low Reynolds number. I want to use LaunderSharmaKE turb. model without wall functions.

1) I deleted nut file and k and epsilon files were setted with fixedValue for wall boundary conditions. The k and epsilon values on the wall I fixed with zero and close to zero (1e-10). In these two situations floting point exception ocurred.

2) Can someone check my attachement files to find out if I made a mistake?

3) I don't understand what "value" below Intensity really does mean. The value of turb. kinetic energy (k) will be calculated based on turb. intensity, so why set this value? Please, can someone clear it me?

inlet
{
type turbulentIntensityKineticEnergyInlet;
intensity 0.03;
value uniform 0.3;
}



Thanks!
Attached Files
File Type: zip LaunderSharmaKE.zip (26.7 KB, 67 views)

Last edited by RLFerreira; June 1, 2015 at 21:21.
RLFerreira is offline   Reply With Quote

Old   July 12, 2023, 15:10
Default
  #9
Member
 
Uttam
Join Date: May 2020
Location: Southampton, United Kingdom
Posts: 35
Rep Power: 6
openfoam_aero is on a distinguished road
Quote:
Originally Posted by examosty View Post
Hi Thomas,
Thanks for the reply.
why cannot i set the k and epsilon not equal 0 for the boundary condition at wall? That was the problem of me.
Regards Yang
You cannot set the epsilon to zero close to the wall for LaunderSharmaKE. I will try my best to explain.


LaunderSharmaKE is a low-RE turbulence model implemented in OpenFOAM. As such, the original formulation of k-epsilon turbulence model is meant as a high-Re model. Now by low and high-Re, I mean the local Reynolds number i.e. the Reynolds number at the first layer of cells that are in contact with the wall. When you have a very small value for the height of the first cell, your Reynolds number definition being Uy/\nu means that the value of Re is also low. Remember that the velocity U is also small close to the wall. These two small values makes the LOCAL reynolds number a small number and hence low-Re. For low-Re models, you need a y+ ~ 1 so that viscous sub-layer is resolved.


Now coming to epsilon. So epsilon is nothing but the turbulence dissipation. if you take a plot of the variation of dissipation as a function of y+, you will see that the dissipation actually decreases as you move away from the wall with the value being the highest at the wall and a small peak observed in the buffer layer. This makes sense right? Dissipation according to the turbulence energy cascade is caused by small scales and the small scales are present close to the wall. So by extension, you will have dissipation close to the wall. The small peak observed in the buffer layer is to balance the production of turbulent kinetic energy that peaks in the same region.


This now should answer your question - you cannot have epsilon (or turbulence dissipation) at the wall to be zero. This will cause an imbalance in your system where the excess production of kinetic energy is not dissipated. If you use a LaunderShamraKE which is a low-Re turbulence model, you need to explicitly specify the value of epsilon at the wall. In case of a high-Re turbulence model such as the regular formulation of the k-epsilon model, the point will lie somewhere in the log-law region (by point, i mean the height of the first cell adjacent to the wall). So in this case too you will have to specify the value and the wall-function will ensure the correct estimation of the epsilon in the region between the first cell-centroid and the wall.


In case of k, the production of turbulence kinetic energy is approximated as the product of the turbulent stress and the mean velocity gradient. Now in CFD codes, there is a hard limit that is set wherein, the turbulent kinetic energy is set to zero if it is below a y+ of 11.5 and it is set to the product of the wall shear stress and mean velocity gradient if y+ is greater than this value.
__________________
Best Regards
Uttam

-----------------------------------------------------------------

“When everything seem to be going against you, remember that the airplane takes off against the wind, not with it.” – Henry Ford.
openfoam_aero 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
Superlinear speedup in OpenFOAM 13 msrinath80 OpenFOAM Running, Solving & CFD 18 March 3, 2015 06:36
SimpleFoam case with SpalartAllmaras turbulence model implemented nedved OpenFOAM Running, Solving & CFD 2 November 30, 2014 23:43
Problems with Launder and Sharma model vertnik Main CFD Forum 1 May 20, 2009 12:40
LES and combustion model Margherita Cadorin CFX 0 October 29, 2008 06:24
Launder & Sharma model in combusion case Richard Carroni Main CFD Forum 1 November 17, 1998 19:59


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