CFD Online Discussion Forums

CFD Online Discussion Forums (https://www.cfd-online.com/Forums/)
-   OpenFOAM Running, Solving & CFD (https://www.cfd-online.com/Forums/openfoam-solving/)
-   -   DNS of duct flow (https://www.cfd-online.com/Forums/openfoam-solving/134478-dns-duct-flow.html)

andersn April 30, 2014 05:33

DNS of duct flow
 
2 Attachment(s)
Hello everyone
I have successfully make a DNS of channel flow with the solver given here:
http://www.cfd-online.com/Forums/ope...s-2-1-0-a.html
The result is good.
But when I use the solver(ico—DNS)to simulate a duct flow(all the boundarys I set as wall except the inlet and outlet which I set as periodic boundary).And the value of dp/dx is 2 times of the value of channel flow case.
I have changed the scheme of ddt to Euler/CN/backward.All the results are not good compared to results of Gavrilakis(1992,Direct numerical simulation of turbulent flow in a square duct).
I also have refined my mesh but still failed getting a good result.

Can you give me some advice?
Thank you very much!

I have attached my case here.

regards!

andersn

Z.Q. Niu May 3, 2014 09:14

Hi, andersn! I'm working in a duct of 1mm X 1mm, maybe there are some difference from yours . I found that the boundary condition of U in your dictionary of 0 is set as cyclic. should it be wall? i.e. fixedvalue? I have another question, How did you get the initial condition of p and U when your simulation parameters such as geometry size, and gradP changes?

andersn May 3, 2014 21:19

1 Attachment(s)
hello Niu
To my case,the flow direction I set as periodic boundary condition.As for the initial condition of p and U,I set it according http://www.cfd-online.com/Forums/ope...s-2-1-0-a.html using the tool perturbU.what kind of your case?Are you working on duct DNS also?

I have update my meshes.
Code:

Domain size:6.4X1X1
grid:60*80*80
distance between first grid to wall:  0.002
the  stretching ratio:1.06

but the result seems worse.

Can anyone give me some suggestion?

regards!

andersn

Z.Q. Niu May 6, 2014 21:14

Hello, anderson, in a duct flow , the boundary layer of wall of normal and that of wall of spanwise is superposed at the four corner, maybe the character of turbulence here don't agree the character of channel flow, not duct flow. How much is your duct flow and men velocity streamwise?

huangxianbei May 14, 2014 20:53

is the flow direction the only homogenous direction in the duct flow?As in channel flow, the homogenous directions are streamwise and spanwise

andersn May 15, 2014 20:57

Thank you for your suggestion.what do you mean by that"only homogenous direction".In my case,the duct flow direction is along x-axis, while the other four boundaries are wall(no-slip).

huangxianbei May 15, 2014 21:31

Quote:

Originally Posted by andersn (Post 492199)
Thank you for your suggestion.what do you mean by that"only homogenous direction".In my case,the duct flow direction is along x-axis, while the other four boundaries are wall(no-slip).

That means the statistics in this direction won't vary.

andersn May 15, 2014 22:04

2 Attachment(s)
yes,The flow direction is the only homogenous direction which I use periodic boundary condition.
I have try some numerical scheme,but the rms of velocity in the flow direction is not good either(the attached files).Is it the problem of fvScheme or PISO method?
why are DNS of channel flow and duct flow so different?
I have been confused by it for a few weeks.


regards!

andersn

huangxianbei May 15, 2014 22:19

Quote:

Originally Posted by andersn (Post 492210)
yes,The flow direction is the only homogenous direction which I use periodic boundary condition.
I have try some numerical scheme,but the rms of velocity in the flow direction is not good either(the attached files).Is it the problem of fvScheme or PISO method?
why are DNS of channel flow and duct flow so different?
I have been confused by it for a few weeks.


regards!

andersn

Perhaps, I see your scheme is quite different from the channel one. Have you tried the default schemes in channel flow as in tutorial?
Are you sure your simulation reached fully developed?

andersn May 15, 2014 22:35

yes.this scheme is quite different from the channel one.
But at first I use the same scheme as the channel flow.I didn't change anything except the boundary condition of spanwise which I modified to wall.And I have refined my grid also.The flow time is so long and I am sure it has reached fully developed.

I have simulated the channel flow case also. And the result is good enough.

huangxianbei May 15, 2014 22:49

Quote:

Originally Posted by andersn (Post 492214)
yes.this scheme is quite different from the channel one.
But at first I use the same scheme as the channel flow.I didn't change anything except the boundary condition of spanwise which I modified to wall.And I have refined my grid also.The flow time is so long and I am sure it has reached fully developed.

I have simulated the channel flow case also. And the result is good enough.

ummm, I have no idea about this now:(
In my simulation, the steady state was reached after about 160000s while the deltaT=0.5s, so it's quite long

andersn May 15, 2014 23:04

what kind of problem of yours? a duct flow or a channel flow?Can you share it with us.which solver did you use?Maybe the problem exist in fvSheme or polyMesh or something else.

huangxianbei May 16, 2014 01:27

Quote:

Originally Posted by andersn (Post 492221)
what kind of problem of yours? a duct flow or a channel flow?Can you share it with us.which solver did you use?Maybe the problem exist in fvSheme or polyMesh or something else.

Channel flow. I use the icoFoam changed as a DNS solver from the idea of Steven.

Z.Q. Niu May 16, 2014 04:43

Hello Xianbei,
There are not homogenous in the two direction in duct flow(spanwise and normal wall).

Z.Q. Niu May 16, 2014 04:48

Quote:

Originally Posted by andersn (Post 492214)
yes.this scheme is quite different from the channel one.
But at first I use the same scheme as the channel flow.I didn't change anything except the boundary condition of spanwise which I modified to wall.And I have refined my grid also.The flow time is so long and I am sure it has reached fully developed.

I have simulated the channel flow case also. And the result is good enough.

Dear andersn,
Did you initialize your U filed with perturbU or other ways when simulating channel flow?

Best Regards!
Z.Q. Niu

huangxianbei May 18, 2014 21:05

Quote:

Originally Posted by andersn (Post 492221)
what kind of problem of yours? a duct flow or a channel flow?Can you share it with us.which solver did you use?Maybe the problem exist in fvSheme or polyMesh or something else.

Code:

ddtSchemes
{
    default        backward;
}

gradSchemes
{
    default        Gauss linear;
    grad(p)        Gauss linear;
    grad(U)        Gauss linear;
    grad(UMean)    Gauss linear;//in order to calculate vt
}

divSchemes
{
    default        none;
    div(phi,U)      Gauss linear;
    div(phi,k)      Gauss limitedLinear 1;
    div(phi,B)      Gauss limitedLinear 1;
    div(B)          Gauss linear;
    div(phi,nuTilda) Gauss limitedLinear 1;
    div((nuEff*dev(T(grad(U))))) Gauss linear;

}

laplacianSchemes
{
    default        none;
    laplacian(nu,U) Gauss linear corrected;
    laplacian((1|A(U)),p) Gauss linear corrected;
    laplacian(DkEff,k) Gauss linear corrected;
    laplacian(DBEff,B) Gauss linear corrected;
    laplacian(DnuTildaEff,nuTilda) Gauss linear corrected;
}

interpolationSchemes
{
    default        linear;
    interpolate(U)  linear;
}

snGradSchemes
{
    default        corrected;
}

fluxRequired
{
    default        no;
    p              ;
}

Code:

convertToMeters 1;

vertices
(
    (0 0 0)
    (12.56 0 0)
    (0 1 0)
    (12.56 1 0)
    (0 2 0)
    (12.56 2 0)
    (0 0 6.28)
    (12.56 0 6.28)
    (0 1 6.28)
    (12.56 1 6.28)
    (0 2 6.28)
    (12.56 2 6.28)
);

blocks
(
    hex (0 1 3 2 6 7 9 8)  (128 64 128) simpleGrading (1 10 1)
    hex (2 3 5 4 8 9 11 10) (128 64 128) simpleGrading (1 0.1 1)
);

edges
(
);

boundary
(
    bottomWall
    {
        type            wall;
        faces          ((0 1 7 6));
    }
    topWall
    {
        type            wall;
        faces          ((4 10 11 5));
    }

    sides1_half0
    {
        type            cyclic;
        neighbourPatch  sides1_half1;
        faces          ((0 2 3 1));
    }
    sides1_half1
    {
        type            cyclic;
        neighbourPatch  sides1_half0;
        faces          ((6 7 9 8));
    }

    sides2_half0
    {
        type            cyclic;
        neighbourPatch  sides2_half1;
        faces          ((2 4 5 3));
    }
    sides2_half1
    {
        type            cyclic;
        neighbourPatch  sides2_half0;
        faces          ((8 9 11 10));
    }

    inout1_half0
    {
        type            cyclic;
        neighbourPatch  inout1_half1;
        faces          ((1 3 9 7));
    }
    inout1_half1
    {
        type            cyclic;
        neighbourPatch  inout1_half0;
        faces          ((0 6 8 2));
    }

    inout2_half0
    {
        type            cyclic;
        neighbourPatch  inout2_half1;
        faces          ((3 5 11 9));
    }
    inout2_half1
    {
        type            cyclic;
        neighbourPatch  inout2_half0;
        faces          ((2 8 10 4));
    }
);

mergePatchPairs
(
);

Sorry for forgotting. here is the blockmesh and fvscheme

huangxianbei May 20, 2014 21:01

I have just got to know that the fvm used in DNS is not as accurate as spectral method. So if a fvm is used in DNS ,the mesh should be much finer. I got this from a doctor, and I want to confirm the message, if you know something about the accuracy of the two methods, please show to me:)

mgg June 16, 2014 10:09

Quote:

Originally Posted by huangxianbei (Post 493226)
I have just got to know that the fvm used in DNS is not as accurate as spectral method. So if a fvm is used in DNS ,the mesh should be much finer. I got this from a doctor, and I want to confirm the message, if you know something about the accuracy of the two methods, please show to me:)

http://www.mcs.anl.gov/~fischer/nek5...00_dec2010.pdf

Is that helpful? I am using OpenFOAM for DNS pipe flow. I am also interested in this topic.

itchy June 17, 2014 03:23

Hi,

why everybody use ico-DNS instead of pisoFoam, pimpleFoam or icoFoam for DNS in channel-flow??
These solvers should give the same results and their are still implemented in OF.

kind regards
Florian

mgg June 17, 2014 03:52

Quote:

Originally Posted by itchy (Post 497321)
Hi,

why everybody use ico-DNS instead of pisoFoam, pimpleFoam or icoFoam for DNS in channel-flow??
These solvers should give the same results and their are still implemented in OF.

kind regards
Florian

I do pipe flow with pimplefoam, as it has fvOptions, which I can make pressure compensation for cyclic bc.

itchy June 17, 2014 04:35

Hi mgg,
me too :)

Concerning the accuracy please read this:
Quasi-DNS capabiltities of OpenFOAM for different mesh types. Ed Komen

very interessting ;)

kind regards
Florian

mgg June 17, 2014 04:56

Quote:

Originally Posted by itchy (Post 497332)
Hi mgg,
me too :)

Concerning the accuracy please read this:
Quasi-DNS capabiltities of OpenFOAM for different mesh types. Ed Komen

very interessting ;)

kind regards
Florian

I have read it before. It is an interesting work! In my case, I always use structed mesh. I think for his Re, it is a huge mesh number, it that because of unstructed mesh? I am also curious about the scalability in his work. :)

huangxianbei June 17, 2014 09:59

Quote:

Originally Posted by mgg (Post 497237)
http://www.mcs.anl.gov/~fischer/nek5000/sprague_nek5000_dec2010.pdf

Is that helpful? I am using OpenFOAM for DNS pipe flow. I am also interested in this topic.

In fact, when applying 2nd-order schemes with FVM,the accuracy can be close to spectral method under low Re. Just as the document said,with Ret=180. When using the same mesh with DNS of spectral, the result is with significant deviation.

itchy June 17, 2014 15:09

hi mgg,

not sure if structured or unstructed grid make a major difference.
In my pipe-flow simulation I used similar amount of cells (structured mesh). The problem is the numerical diffusivity. With OpenFOAM the numerical diffusivity is very high in my opinion, especially if the grid is "coarse" (if we can say coarse for DNS ;) ).

I use only Gauss linear schemes, poorly 2nd order.

I will see next week the result of my DNS, then I can tell you more about accuracy of FVM DNS.

kind regards
Florian

mgg July 11, 2014 08:51

Hi Florian,

long time no see. How does your results look?

regards,
mgg

Quote:

Originally Posted by itchy (Post 497446)
hi mgg,

not sure if structured or unstructed grid make a major difference.
In my pipe-flow simulation I used similar amount of cells (structured mesh). The problem is the numerical diffusivity. With OpenFOAM the numerical diffusivity is very high in my opinion, especially if the grid is "coarse" (if we can say coarse for DNS ;) ).

I use only Gauss linear schemes, poorly 2nd order.

I will see next week the result of my DNS, then I can tell you more about accuracy of FVM DNS.

kind regards
Florian


Z.Q. Niu November 29, 2014 08:25

Hi andersn,
How about your DNS of duct flow? have you compared your results with other papers' results?

tzqfly December 1, 2014 01:20

Quote:

Originally Posted by andersn (Post 489665)
hello Niu
To my case,the flow direction I set as periodic boundary condition.As for the initial condition of p and U,I set it according http://www.cfd-online.com/Forums/ope...s-2-1-0-a.html using the tool perturbU.what kind of your case?Are you working on duct DNS also?

I have update my meshes.
Code:

Domain size:6.4X1X1
grid:60*80*80
distance between first grid to wall:  0.002
the  stretching ratio:1.06

but the result seems worse.

Can anyone give me some suggestion?

regards!

andersn

Hi,

What I'm doing now is duct flow. And I met some problems in it. I don't know how to use the perturbU to initial U fields, I think the block is the setting of perturbUDict. At present, all the perturbU files are about channel flow. Did you use the perturbU to initial your U fields?And How?
Best wishes.


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