CFD Online Discussion Forums

CFD Online Discussion Forums (http://www.cfd-online.com/Forums/)
-   OpenFOAM Running, Solving & CFD (http://www.cfd-online.com/Forums/openfoam-solving/)
-   -   Problem with calculation of k (http://www.cfd-online.com/Forums/openfoam-solving/112431-problem-calculation-k.html)

sdharmar January 28, 2013 17:20

Problem with calculation of k
 
1 Attachment(s)
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.

immortality January 28, 2013 17:45

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.

sdharmar January 29, 2013 08:12

Need to find this
 
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.

Sunxing March 14, 2013 21:13

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

sdharmar March 20, 2013 15:21

hi
 
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.

sharonyue March 21, 2013 09:47

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,


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