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/)
-   -   LES of turbulent channel flows (https://www.cfd-online.com/Forums/openfoam-solving/57889-les-turbulent-channel-flows.html)

adambarfi July 18, 2016 00:23

Quote:

Originally Posted by Elham (Post 609910)
Hi every body,

I am simulating turbulent flow inside a channel. The channel size is 60*10*10(mm) and number of mesh are 300*80*80. I want to produce fully turbulent flow by means of mapping method. I produced a relatively good result with RAS. When I map data to LES the results get worse and not turbulent at all. And it takes so long time to proceed, eg. a full week just to proceed 0.2 sec.

I will appreciate if anyone can give me a clue.

Regards,

Elham

Hi Elham,

I think the reason you cannot see the turbulent regime in your solution is that you just solve it for 0.2 s!

- what is the range of the Courant number and time step during the solution process?

- which LES subgrid model did you used?

Mostafa

adambarfi July 18, 2016 00:35

Hi guys,

I'm really struggling with the mapped boundary condition in OF. I'm using it to reach a fully developed turbulent flow inside a channel with square cross-section and also using LES to model it.

from the beginning I used the Smagorinsky model.

During the first 50s of the solution process everything sounds normal. the velocity field shows it reached to its fully developed state. but when I let it solve to 100 s, the secondary flows got disappeared. they were dissipated! and I don't know what leads to this solution? Is it due to the boundary conditions or it is natural (though, I don't think so).

Best regards,
Mostafa

Elham July 18, 2016 01:28

RAS better than LES
 
Quote:

Originally Posted by adambarfi (Post 609913)
Hi Elham,

I think the reason you cannot see the turbulent regime in your solution is that you just solve it for 0.2 s!

- what is the range of the Courant number and time step during the solution process?

- which LES subgrid model did you used?

Mostafa

Dear Adambarfi,

The max courant number is 0.4 and maxAlphaCo is 0.35. The time step is around 10e-6.
I use homogeneousDynSmagorinsky for LES modeling.
It takes a week just for 0.2 sec so I suppose there is something wrong with my case.

Cheers,

Elham

tiam July 18, 2016 04:14

Quote:

Originally Posted by Elham (Post 609910)
Hi every body,

I am simulating turbulent flow inside a channel. The channel size is 60*10*10(mm) and number of mesh are 300*80*80. I want to produce fully turbulent flow by means of mapping method. I produced a relatively good result with RAS. When I map data to LES the results get worse and not turbulent at all. And it takes so long time to proceed, eg. a full week just to proceed 0.2 sec.

I will appreciate if anyone can give me a clue.

Regards,

Elham

Hello!
The depth of your domain looks a bit small, but that is probably no the main reason for things going bad.
I suppose you have a good reason for not using cyclic b.c.s?
What do you mean by "mapping method", do you recycle a velocity profile from downstream of the channel?
You may need to take more special care of the initial conditions, i.e introduce meaningfull perturbations. Use the perturbU utility, it works just fine.

Also, not to get dissipation that kills turbulence, use second order schemes for everything. For SGS modelling, pick up a dynamic model, or simply no model at all -- that works quite fine for me. If you use Smagorinsky or oneEqEddy, van Driest damping is a must.

Regaring performance, it is hard to say anything, it all depends on how many cores you use given your meshsize, which is around 2 million.
For such a mesh it would take one to three days to get a result using something like 64 cores. This is *very* approximate, since it all depends on how much time you want to sample your statistics. And this depends on what order statistics you want etc etc :). The solver setting also play a role, e.g. the numre of inner/outer corrector loops.

Hope this helps!

Best,
Timofey

tiam July 18, 2016 04:22

Quote:

Originally Posted by adambarfi (Post 609917)
Hi guys,

I'm really struggling with the mapped boundary condition in OF. I'm using it to reach a fully developed turbulent flow inside a channel with square cross-section and also using LES to model it.

from the beginning I used the Smagorinsky model.

During the first 50s of the solution process everything sounds normal. the velocity field shows it reached to its fully developed state. but when I let it solve to 100 s, the secondary flows got disappeared. they were dissipated! and I don't know what leads to this solution? Is it due to the boundary conditions or it is natural (though, I don't think so).

Best regards,
Mostafa

Hi!

Ditch Smagorinsky, it is very dissiaptive. You can start with no SGS model a t all, to make sure you don't get dissipation from that. Once things work, you can test different models, but don't count on a lot of improvement.
Make sure you use second order discretization.

Best,
Timofey

Elham July 18, 2016 21:47

Quote:

Originally Posted by tiam (Post 609953)
Hello!
The depth of your domain looks a bit small, but that is probably no the main reason for things going bad.
I suppose you have a good reason for not using cyclic b.c.s?
What do you mean by "mapping method", do you recycle a velocity profile from downstream of the channel?
You may need to take more special care of the initial conditions, i.e introduce meaningfull perturbations. Use the perturbU utility, it works just fine.

Also, not to get dissipation that kills turbulence, use second order schemes for everything. For SGS modelling, pick up a dynamic model, or simply no model at all -- that works quite fine for me. If you use Smagorinsky or oneEqEddy, van Driest damping is a must.

Regaring performance, it is hard to say anything, it all depends on how many cores you use given your meshsize, which is around 2 million.
For such a mesh it would take one to three days to get a result using something like 64 cores. This is *very* approximate, since it all depends on how much time you want to sample your statistics. And this depends on what order statistics you want etc etc :). The solver setting also play a role, e.g. the numre of inner/outer corrector loops.

Hope this helps!

Best,
Timofey

Dear Tiam,

I think mapping is the same as cyclic b.c as it maps from some where inside the domain to the inlet during the solution.
I also mapped inlet condition from RAS results. I haven't used perturbU and supposed it will produce turbulence itself due to turbulent Re number.
Does it necessory to have perturbU? What is a meaningful perturbation?

Cheers,

Elahm

Elham August 31, 2016 05:59

channel395 with different dimension
 
Hi everybody,

I want to use channel395 to produce a fully turbulent channel flow. Size of the channel is 4*2*2(mm). So I need to change initial velocity to have a turbulent flow. I tried purturbedU utility for Retau 395 and changed the internal flow velocity at zero time but I got a small perturbation. I tried to manipulate with all parameters but the solver stopped running. I even tried to decrease time step to have Co<1 that didn't work. I tried to map channel395 to my case but it crashed may be due to very different mesh size. Would you please let me know how I can set a turbulent initial flow for channel395 while dimension of channel is different.

Regards,

Elham

tiam August 31, 2016 06:03

Quote:

Originally Posted by Elham (Post 616086)
Hi everybody,

I want to use channel395 to produce a fully turbulent channel flow. Size of the channel is 4*2*2(mm). So I need to change initial velocity to have a turbulent flow. I tried purturbedU utility for Retau 395 and changed the internal flow velocity at zero time but I got a small perturbation. I tried to manipulate with all parameters but the solver stopped running. I even tried to decrease time step to have Co<1 that didn't work. I tried to map channel395 to my case but it crashed may be due to very different mesh size. Would you please let me know how I can set a turbulent initial flow for channel395 while dimension of channel is different.

Regards,

Elham

Hi Elham,

What do you mean by getting a "small perturbation". It got difffused out in the solution process and you didn't get turbulence? Or what was the problem?

Timofey

Elham August 31, 2016 22:04

Quote:

Originally Posted by tiam (Post 616088)
Hi Elham,

What do you mean by getting a "small perturbation". It got difffused out in the solution process and you didn't get turbulence? Or what was the problem?

Timofey

I mean the flow is not fully turbulent from the beginning to the end.
Another question: I am wondering if the initial flow field in channel395 is not turbulent, after some iteration the solution tends to turbulence or no?

Thanks,

Elham

cedric_duprat September 1, 2016 03:17

Dear Elham,

"I tried perturbU utility for Retau 395 and changed the internal flow velocity at zero time but I got a small perturbation"
Yes, that is the all idea of PerturbU utility, adding "nice" perturbations close to the wall, where the shear stress is high to trigg you laminar profile to a turbulent one (please have a look on this thread : http://www.cfd-online.com/Forums/ope...-perturbu.html for more information).
Then, you have to run the calculation using periodic BC. After few cross channel time, you should see you flow becoming turbulent. By checking you statistics you'll see when it is fully converged.

I hope this will help you

Cedric

tiam September 1, 2016 03:46

Quote:

Originally Posted by Elham (Post 616187)
I mean the flow is not fully turbulent from the beginning to the end.
Another question: I am wondering if the initial flow field in channel395 is not turbulent, after some iteration the solution tends to turbulence or no?

Thanks,

Elham

Not necessarily. If the numerics you using are diffusive enough and you don't have an intiialy well-perturbed field, you might not get turbulence.

/Timofey

Elham September 1, 2016 08:43

Quote:

Originally Posted by cedric_duprat (Post 616212)
Dear Elham,

"I tried perturbU utility for Retau 395 and changed the internal flow velocity at zero time but I got a small perturbation"
Yes, that is the all idea of PerturbU utility, adding "nice" perturbations close to the wall, where the shear stress is high to trigg you laminar profile to a turbulent one (please have a look on this thread : http://www.cfd-online.com/Forums/ope...-perturbu.html for more information).
Then, you have to run the calculation using periodic BC. After few cross channel time, you should see you flow becoming turbulent. By checking you statistics you'll see when it is fully converged.

I hope this will help you

Cedric

Dear Cedric,

Did you use a DNS result for initial condition.

"you have to run the calculation using periodic BC. After few cross channel time, you should see you flow becoming turbulent. " I am not at the office today and tomorrow. When I come back there I will check it.

Thanks

Elham

Elham September 1, 2016 08:44

Quote:

Originally Posted by tiam (Post 616219)
Not necessarily. If the numerics you using are diffusive enough and you don't have an intiialy well-perturbed field, you might not get turbulence.

/Timofey

Dear Timofey,

How can I know that the numerics that I am using is diffusive enough?

Regards,

Elham

tiam September 1, 2016 08:46

Quote:

Originally Posted by Elham (Post 616260)
Dear Timofey,

How can I know that the numerics that I am using is diffusive enough?

Regards,

Elham

Elham,

With OpenFoam your limit is second-order accuracy. To have that use central differencing and a second-order time-stepping scheme. That is about as much as you can do.

/Timofey

Elham September 1, 2016 08:48

Quote:

Originally Posted by tiam (Post 616261)
Elham,

With OpenFoam your limit is second-order accuracy. To have that use central differencing and a second-order time-stepping scheme. That is about as much as you can do.

/Timofey

Ok. I will try it.

Thanks,

Elham

cedric_duprat September 1, 2016 08:57

Dear Elham,

To initialize my calculation, I've only used PertrubU (parabolic profile for the streamwise velocity + perturbation close to the wall on different velocity component). Note that you can change the size (amplitude, frenquency, ...) of these perturbations in perturbU.

If I remember correctly, you could "map fields" the channel395 velocity field to your channel, even if the size is not the same.

Timofey has also done a nice work on channel flow (@Timofey; by the way, which version of OF had you used ?) that you can find online including a report and datas. I'm sure you'll find cooking receipe to run your LES calculations.

Last point, in the forum I've also described quite a lot how I did do run LES calculations in pipes and channels.

I hope this will help you,

Best regards

Cedric

tiam September 1, 2016 09:37

Quote:

Originally Posted by cedric_duprat (Post 616263)
Dear Elham,

To initialize my calculation, I've only used PertrubU (parabolic profile for the streamwise velocity + perturbation close to the wall on different velocity component). Note that you can change the size (amplitude, frenquency, ...) of these perturbations in perturbU.

If I remember correctly, you could "map fields" the channel395 velocity field to your channel, even if the size is not the same.

Timofey has also done a nice work on channel flow (@Timofey; by the way, which version of OF had you used ?) that you can find online including a report and datas. I'm sure you'll find cooking receipe to run your LES calculations.

Last point, in the forum I've also described quite a lot how I did do run LES calculations in pipes and channels.

I hope this will help you,

Best regards

Cedric

Hi Cedric! I used 2.2.0.

Elham September 2, 2016 02:00

Quote:

Originally Posted by cedric_duprat (Post 616263)
Dear Elham,

To initialize my calculation, I've only used PertrubU (parabolic profile for the streamwise velocity + perturbation close to the wall on different velocity component). Note that you can change the size (amplitude, frenquency, ...) of these perturbations in perturbU.

If I remember correctly, you could "map fields" the channel395 velocity field to your channel, even if the size is not the same.

Timofey has also done a nice work on channel flow (@Timofey; by the way, which version of OF had you used ?) that you can find online including a report and datas. I'm sure you'll find cooking receipe to run your LES calculations.

Last point, in the forum I've also described quite a lot how I did do run LES calculations in pipes and channels.

I hope this will help you,

Best regards

Cedric


Thanks Cedric. I will try all your comments.

Regards,

Elham

Elham September 5, 2016 22:10

y+ for whole channel width
 
Quote:

Originally Posted by cedric_duprat (Post 616263)
Dear Elham,

To initialize my calculation, I've only used PertrubU (parabolic profile for the streamwise velocity + perturbation close to the wall on different velocity component). Note that you can change the size (amplitude, frenquency, ...) of these perturbations in perturbU.

If I remember correctly, you could "map fields" the channel395 velocity field to your channel, even if the size is not the same.

Timofey has also done a nice work on channel flow (@Timofey; by the way, which version of OF had you used ?) that you can find online including a report and datas. I'm sure you'll find cooking receipe to run your LES calculations.

Last point, in the forum I've also described quite a lot how I did do run LES calculations in pipes and channels.

I hope this will help you,

Best regards

Cedric

Dear Cedric and Timofey,

I have used perturbU and run my case. It is working well. I also read Timofey report about LES in the channel. It is really great. Thanks for all.

My new issue is calculating y+ and u_tau. I looked at Timofey controlDict. He used the following command for y+:

yPlus
{
type patchExpression;
autowrite true;
patches ( bottomWall topWall);
outputControlMode timeStep;
outputInterval 1;
expression "dist()/nu*sqrt((nu+nuSgs)*mag(snGrad(U)))";
verbose true;
accumulations ( average );
}

and I developed the following one for u_tau myself:

uTau
{
type patchExpression;
autowrite true;
patches ( bottomWall topWall);
outputControlMode timeStep;
outputInterval 1;
expression "sqrt((nu+nuSgs)*mag(snGrad(U)))";
verbose true;
accumulations ( average );
}

Both of them generate y+ and u_tau just for the first cell near the wall. How can I have y+ and u_tau for the whole channel width, something similar to the one that Timofey has shown in figure 4.1 or Cedric at the very first post of this topic. I am also wondering if u_tau that I have developed is correct?

Cheers,

Elham

cedric_duprat September 6, 2016 02:52

Dear Elham,

You should have a look at the postChannel tool in applications/utilities/postProcessing/miscellaneous/postChannel
http://cpp.openfoam.org/v4/a04646.html

"
Post-processes data from channel flow calculations.
Original source file postChannel.C
For each time: calculate: txx, txy,tyy, txy, eps, prod, vorticity, enstrophy and helicity. Assuming that the mesh is periodic in the x and z directions, collapse Umeanx, Umeany, txx, txy and tyy to a line and print them as standard output.
"
I guess you'll find a usage of this tool in the tutorial related to channelFlow.


Best Regards,


Cedric


All times are GMT -4. The time now is 12:23.