CFD Online Discussion Forums

CFD Online Discussion Forums (http://www.cfd-online.com/Forums/)
-   OpenFOAM (http://www.cfd-online.com/Forums/openfoam/)
-   -   simpleFoam with Launder-Sharma Model (http://www.cfd-online.com/Forums/openfoam/73175-simplefoam-launder-sharma-model.html)

examosty March 1, 2010 11:53

simpleFoam with Launder-Sharma Model
 
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::printStack(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::operator/<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?

Thomas Baumann March 2, 2010 04:07

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

examosty March 2, 2010 08:23

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

Thomas Baumann March 3, 2010 03:35

I think you are not allowed to divide through zero.

ternik March 3, 2010 03:47

Quote:

Originally Posted by examosty (Post 248110)
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

examosty March 3, 2010 07:16

Quote:

Originally Posted by ternik (Post 248258)
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

ternik March 3, 2010 08:01

Quote:

Originally Posted by examosty (Post 248312)
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

RLFerreira May 30, 2015 11:34

1 Attachment(s)
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!


All times are GMT -4. The time now is 06:36.