# Problem with calculation of k

 User Name Remember Me Password
 Register Blogs Members List Search Today's Posts Mark Forums Read

 LinkBack Thread Tools Display Modes
January 28, 2013, 17:20
Problem with calculation of k
#1
Member

Suranga Dharmarathne
Join Date: Jan 2011
Location: TX, USA
Posts: 39
Rep Power: 6
Hi all,

I am using modified simpleFoam (including temperature equation) solver in OF 2.1.1 to simulate film cooling problem. I use k-epsilon model. My boundary conditions are shown below.
Code:
```/*--------------------------------*- C++ -*----------------------------------*\
| =========                 |                                                 |
| \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox           |
|  \\    /   O peration     | Version:  2.1.1                                 |
|   \\  /    A nd           | Web:      www.OpenFOAM.org                      |
|    \\/     M anipulation  |                                                 |
\*---------------------------------------------------------------------------*/
FoamFile
{
version     2.0;
format      ascii;
class       volScalarField;
location    "0";
object      epsilon;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //

dimensions      [0 2 -3 0 0 0 0];

internalField   uniform 2.3;

boundaryField
{
INLET1
{
type            fixedValue;
value           uniform 0.023;
}
INLET2
{
type            fixedValue;
value           uniform 0.023;
}
OUTLET
{
type            zeroGradient;
}
SYMP
{
type            symmetryPlane;
}
WALL1
{
type            zeroGradient;/*epsilonWallFunction;
Cmu             0.09;
kappa           0.41;
E               9.8;
value           uniform 0.00011;*/
}
WALL2
{
type            zeroGradient;/*epsilonWallFunction;
Cmu             0.09;
kappa           0.41;
E               9.8;
value           uniform 0.00011;*/
}
WALL3
{
type            zeroGradient;/*epsilonWallFunction;
Cmu             0.09;
kappa           0.41;
E               9.8;
value           uniform 0.00011;*/
}
HOLEWALL
{
type            zeroGradient;/*epsilonWallFunction;
Cmu             0.09;
kappa           0.41;
E               9.8;
value           uniform 0.00011;*/
}
FREE
{
type            slip;
}
}

// ************************************************************************* //

/*--------------------------------*- C++ -*----------------------------------*\
| =========                 |                                                 |
| \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox           |
|  \\    /   O peration     | Version:  2.1.1                                 |
|   \\  /    A nd           | Web:      www.OpenFOAM.org                      |
|    \\/     M anipulation  |                                                 |
\*---------------------------------------------------------------------------*/
FoamFile
{
version     2.0;
format      ascii;
class       volScalarField;
location    "0";
object      k;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //

dimensions      [0 2 -2 0 0 0 0];

internalField   uniform 0.01;

boundaryField
{
INLET1
{
type            fixedValue;
value           uniform 0.01;
}
INLET2
{
type            fixedValue;
value           uniform 0.01;
}
OUTLET
{
type            zeroGradient;
}
SYMP
{
type            symmetryPlane;
}
WALL1
{
type            fixedValue;/*kqRWallFunction;*/
value           uniform 0;
}
WALL2
{
type            fixedValue;/*kqRWallFunction;*/
value           uniform 0;
}
WALL3
{
type            fixedValue;/*kqRWallFunction;*/
value           uniform 0;
}
HOLEWALL
{
type            fixedValue;/*kqRWallFunction;*/
value           uniform 0;
}
FREE
{
type            slip;
}
}

// ************************************************************************* //
/*--------------------------------*- C++ -*----------------------------------*\
| =========                 |                                                 |
| \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox           |
|  \\    /   O peration     | Version:  2.1.1                                 |
|   \\  /    A nd           | Web:      www.OpenFOAM.org                      |
|    \\/     M anipulation  |                                                 |
\*---------------------------------------------------------------------------*/
FoamFile
{
version     2.0;
format      ascii;
class       volScalarField;
location    "0";
object      p;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //

dimensions      [0 2 -2 0 0 0 0];

internalField   uniform 0;

boundaryField
{
INLET1
{
type            zeroGradient;
}
INLET2
{
type            zeroGradient;
}
OUTLET
{
type            fixedValue;
value           uniform 0;
}
SYMP
{
type            symmetryPlane;
}
WALL1
{
type            zeroGradient;
}
WALL2
{
type            zeroGradient;
}
WALL3
{
type            zeroGradient;
}
HOLEWALL
{
type            zeroGradient;
}
FREE
{
type            slip;
}
}

// ************************************************************************* //

/*--------------------------------*- C++ -*----------------------------------*\
| =========                 |                                                 |
| \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox           |
|  \\    /   O peration     | Version:  2.1.1                                 |
|   \\  /    A nd           | Web:      www.OpenFOAM.org                      |
|    \\/     M anipulation  |                                                 |
\*---------------------------------------------------------------------------*/
FoamFile
{
version     2.0;
format      ascii;
class       volVectorField;
location    "0";
object      U;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //

dimensions      [0 1 -1 0 0 0 0];

internalField   uniform (0 0 0);

boundaryField
{
INLET1
{
type            fixedValue;
value           uniform (100 0 0);
}
INLET2
{
type            fixedValue;
value           uniform (0 2.182 0);
}
OUTLET
{
type            zeroGradient;

}
SYMP
{
type            symmetryPlane;
}
WALL1
{
type            fixedValue;
value           uniform (0 0 0);
}
WALL2
{
type            fixedValue;
value           uniform (0 0 0);
}
WALL3
{
type            fixedValue;
value           uniform (0 0 0);
}
HOLEWALL
{
type            fixedValue;
value           uniform (0 0 0);
}
FREE
{
type            slip;
}
}

// ************************************************************************* //```
Here you can see that I have explicitly assign k=0 at the wall. Then the simulation was converged and velocity profiles and temperature profiles look good. But I have the problem with the value of k at the wall1. You can see this in the attached picture. Please help me to find the fault in here.

BR ,
Suranga.
Attached Images
 k.jpg (31.2 KB, 20 views)

 January 28, 2013, 17:45 #2 Senior Member     Ehsan Join Date: Oct 2012 Location: Iran Posts: 2,205 Rep Power: 17 I know in kEpsilon setting the k=0 is incorrect and leads to physically invalid terms as i read in an article before.set it a low number like 1e-5 or zerogradient is better.

January 29, 2013, 08:12
Need to find this
#3
Member

Suranga Dharmarathne
Join Date: Jan 2011
Location: TX, USA
Posts: 39
Rep Power: 6
HI Ehsan and others,

Thank you very much for your reply. It seems like I need to know this perfect. Now the biggest question that I faced using k-epsilon method is this. I have heard 3 main possibilities for the BC of k at the wall. Here are they.

1. k=0 : This said to be used in low Reynolds number flows.
Quote:
 "But in Ferziger and Peric (second eddition, Springer 1999, p 282) In the k-epsilon model, it is appropriate to set k=0 at the wall but the dissipation is not zero there; instead one can use the conditions: zero gradient."
Then in the next page it says that
Quote:
 When this is done it is generally necessary to modify the model itself near the wall.
The modifications that the book has mentioned are the low Re number modifications.

What are the limit of low Re number?

2.Then I found from the OpenFoam 2.1.1 User's guide that we need to use specific wall functions to model the flow closer to the boundary.

And in an earlier version of the OpenFoam user's manual says we can use k=0 BC at the wall.

3.Finally some members in the forum has suggested to use zeroGradient condition for walls.

These are the three options we have and I need to know which one out of these would give us a better result.

And my other concern is that the DNS and experimental data tell that the value of k should be zero at the wall. I have seen this in almost every book.

Please give your comments. I need your expertise on this. Please help me to figure this our.

BR,
Suranga.

Last edited by sdharmar; January 29, 2013 at 08:31.

 March 14, 2013, 21:13 #4 Member   sqing Join Date: Sep 2012 Location: Dalian Posts: 77 Rep Power: 4 Hi Suranga, I suggest that you set k a low number, like 1e-10 or a more lower number. Now I want to konw how have you modified the simpleFoam solver? I'm also simulating a film cooling case with a modified pisoFoam solver. However I didn't get a good result in temperature. Best regards, Xing

 March 20, 2013, 15:21 hi #5 Member   Suranga Dharmarathne Join Date: Jan 2011 Location: TX, USA Posts: 39 Rep Power: 6 See this thread. It might help you. please let me know if this works for you. I am also doing a film cooling problem. We can collaborate more in the future. Another attempt at adding temperature to simpleFoam Thanks, Suranga.

 March 21, 2013, 09:47 #6 Senior Member   Dongyue Li Join Date: Jun 2012 Location: Torino, Italy Posts: 676 Rep Power: 8 Hi, I just translate what I see in my books: If the first node is in the viscous sub layer which is near enough to the wall.you can set the k is zero.but when you are using wall functions,this node should not be set in the viscous sublayer,so in this control volumn,the production and dissipation is larger than the diffusion.so you should set the B.C. is zerogradient. Wish this would help. Regards,

 Thread Tools Display Modes Linear Mode

 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 OffTrackbacks are On Pingbacks are On Refbacks are On Forum Rules

 Similar Threads Thread Thread Starter Forum Replies Last Post matlab_monkey FLUENT 2 July 26, 2012 08:20 Bedotto NUMECA 1 March 18, 2010 00:40 Bogey Jammer Main CFD Forum 0 September 29, 2009 17:06 Paul CFX 0 August 11, 2003 22:45 cfxbeginer CFX 2 May 1, 2003 08:55

All times are GMT -4. The time now is 13:05.

 Contact Us - CFD Online - Top