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

Problem with calculation of k

Register Blogs Community New Posts Updated Threads Search

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   January 28, 2013, 17:20
Default Problem with calculation of k
  #1
Member
 
Suranga Dharmarathne
Join Date: Jan 2011
Location: TX, USA
Posts: 39
Rep Power: 15
sdharmar is on a distinguished road
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
File Type: jpg k.jpg (31.2 KB, 21 views)
sdharmar is offline   Reply With Quote

Old   January 28, 2013, 17:45
Default
  #2
Senior Member
 
immortality's Avatar
 
Ehsan
Join Date: Oct 2012
Location: Iran
Posts: 2,208
Rep Power: 27
immortality is on a distinguished road
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.
immortality is offline   Reply With Quote

Old   January 29, 2013, 08:12
Default Need to find this
  #3
Member
 
Suranga Dharmarathne
Join Date: Jan 2011
Location: TX, USA
Posts: 39
Rep Power: 15
sdharmar is on a distinguished road
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.
sdharmar is offline   Reply With Quote

Old   March 14, 2013, 21:13
Default
  #4
Member
 
sqing
Join Date: Sep 2012
Location: Dalian
Posts: 77
Rep Power: 14
Sunxing is on a distinguished road
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
Sunxing is offline   Reply With Quote

Old   March 20, 2013, 15:21
Default hi
  #5
Member
 
Suranga Dharmarathne
Join Date: Jan 2011
Location: TX, USA
Posts: 39
Rep Power: 15
sdharmar is on a distinguished road
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.

http://www.cfd-online.com/Forums/ope...implefoam.html

Thanks,

Suranga.
sdharmar is offline   Reply With Quote

Old   March 21, 2013, 09:47
Default
  #6
Senior Member
 
Dongyue Li
Join Date: Jun 2012
Location: Beijing, China
Posts: 849
Rep Power: 18
sharonyue is on a distinguished road
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,
sharonyue 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
Mixture model problem - could someone please advise? matlab_monkey FLUENT 2 July 26, 2012 09:20
History Convergence: Graphical problem Bedotto Fidelity CFD 1 March 18, 2010 00:40
[FloWorks] Request advice for an airfoil calculation problem Bogey Jammer Main CFD Forum 0 September 29, 2009 18:06
Parallel Calculation problem Paul CFX 0 August 11, 2003 23:45
how to solve this problem in CFX5 calculation? cfxbeginer CFX 2 May 1, 2003 09:55


All times are GMT -4. The time now is 21:17.