CFD Online Discussion Forums

CFD Online Discussion Forums (https://www.cfd-online.com/Forums/)
-   OpenFOAM (https://www.cfd-online.com/Forums/openfoam/)
-   -   Comments on LES calculations (https://www.cfd-online.com/Forums/openfoam/106126-comments-les-calculations.html)

Djub August 20, 2012 06:25

Comments on LES calculations
 
Hi every body!
I have run a "validation case", and I would like to get better understanding of the differences between simulated and experimental data.

Here the case (from AGARD AR 345 , CMP20 by Lyn, Einav, Rody and Park):
It is a long square cylinder mounted transversaly to a uniform flow at Re=22000.
The experimental Strouhal number is found to be St=0.133.

Here is a view of the mean flow around this cylinder:
http://www.cfd-online.com/Forums/mem...r-st-0-133.png




I ran an fully 3D OpenFOAM equivalent case.
  • Mesh: the side length is divided in 10 cells, with little expanding around the cylinder.
  • The SGS model is oneEqEddy with cubeRootVol delta.
  • Schemes:
    • Time: CrankNicholson 1/2,
    • Grad et div: Gauss linear (everywhere but grad(U): cellLimited Gauss linear 1, div(phi,U) Gauss linearUpwindV grad(U),
    • Laplacian: Gauss Linear Corrected
    • Interp: linear
    • snGrad: corrected
  • Solution: "classical" PCG/DIC tol 1e-6 for p, PBiCG/DILU tol 1e-5 for others
  • PISO 2 correctors and 1 nonOrthoCorrector.
  • Cache: grad(U)
During calculation, the maximum current flow Cfl is about one. The calculated Strouhal Number is St=0,15.
Here is the numerical mean flow:
http://www.cfd-online.com/Forums/mem...nd-st-0-15.png

Does anybody has any comment about this? Is it a nice calculation from your point of view?




My principal interrogations are:
  1. Why the Strouhal number is so high (deviation +13%) ?
  2. Why the mean wake is so short in the calculation, compared with experimental data? (at 5 diameters, numerical mean flow is more than 90% of V(infinite), while experimental data is no more than 60% of V(inf)...)
Any suggestion to improve my results?

Thanks in advance to share your comments,

Djub

timo_IHS August 20, 2012 09:56

Hi,

so is your mesh fine enough? Can you describe it more in details?
Which SGS-model do you use?
What inlet BC are you using?

Djub August 20, 2012 11:18

Some precisions
 
Here's my blockMeshDict:

Code:

vertices
(
(-.3 -.7 0) (-.05 -.7 0) (.05 -.7 0) (.8 -.7 0) (2 -.7 0)
(-.3 -.05 0) (-.05 -.05 0) (.05 -.05 0) (.8 -.05 0) (2 -.05 0)
(-.3 .05 0) (-.05 .05 0) (.05 .05 0) (.8 .05 0) (2 .05 0)
(-.3 .7 0) (-.05 .7 0) (.05 .7 0) (.8 .7 0) (2 .7 0)
 
(-.3 -.7 .49) (-.05 -.7 .49) (.05 -.7 .49) (.8 -.7 .49) (2 -.7 .49)
(-.3 -.05 .49) (-.05 -.05 .49) (.05 -.05 .49) (.8 -.05 .49) (2 -.05 .49)
(-.3 .05 .49) (-.05 .05 .49) (.05 .05 .49) (.8 .05 .49) (2 .05 .49)
(-.3 .7 .49) (-.05 .7 .49) (.05 .7 .49) (.8 .7 .49) (2 .7 .49)
);
blocks
(
hex (0 1 6 5 20 21 26 25) (20 45 25) simpleGrading (.66 .5 1)
hex (1 2 7 6 21 22 27 26) (10 45 25) simpleGrading ( 1 .5 1)
hex (2 3 8 7 22 23 28 27) (60 45 25) simpleGrading (1.5 .5 1)
hex (3 4 9 8 23 24 29 28) (50 45 25) simpleGrading (2.5 .5 1)
hex (5 6 11 10 25 26 31 30) (20 10 25) simpleGrading (.66 1 1)
hex (7 8 13 12 27 28 33 32) (60 10 25) simpleGrading (1.5 1 1)
hex (8 9 14 13 28 29 34 33) (50 10 25) simpleGrading (2.5 1 1)
hex (10 11 16 15 30 31 36 35) (20 45 25) simpleGrading (.66 2 1)
hex (11 12 17 16 31 32 37 36) (10 45 25) simpleGrading ( 1 2 1)
hex (12 13 18 17 32 33 38 37) (60 45 25) simpleGrading (1.5 2 1)
hex (13 14 19 18 33 34 39 38) (50 45 25) simpleGrading (2.5 2 1)
);

The complete mesh:
http://www.cfd-online.com/Forums/mem...nato-mesh1.png


A zoom near the square cylinder:
http://www.cfd-online.com/Forums/mem...nato-mesh2.png

So I have only 10 cells along my square side. Maybe it's not enough, but I don't "feel" why? Do you think the upstream distance (between the inlet and the cylinder) is too short?

The SGS model is oneEqEddy with cubeRootVol delta.

My inlet is uniform u=3.3, k=0.1 and nuSGS=0.1 .

Bernhard August 21, 2012 03:06

What are your boundary conditions on the far sides? You also did not mention what solver you are using?

I am quite sure the inlet section is too short. If you really apply a uniform inlet velocity, then this is way to short. You will probably see the difference if you extend it a bit. To get flow with the right statistics, you need a really long inlet section, I don't remember the rule of thumb, but it scales with the characteristic size and the Reynolds number. In your case, this will be exessively long. Therefor, I'd advise to extend your domain a bit, and use the directMapped (or mapped from 2.1) boundary condition. This constructs a periodic inlet section, where structures looking like turbulence will soon develop after a few flow through times. The length of the inlet domain does have an influence of the size of turbulent structures, but I think it is a better alternative.

Something else you can check, is how large the modelled turbulent kinetic is compared to the resolved part. This gives you a qualitative idea whether your mesh is sufficiently fine. You should search for papers by Cilic or Geurts, giving quality measures for LES simulations. Also, realize that a grid independency study by mesh refinement for LES simulations does not make completely sense, as the model is highly mesh dependent (via the filter width).

Furthermore, you may want to check the time integration, and check out the effect of using a second order (backward) scheme.

Djub August 21, 2012 03:54

Thanks !
 
@Bernhard
Thanks for your attention.
BC: Top, bottom and left side, I use walls. Right side, I use symmetry plane (actually, this is a mystake 'cause the flow is not symmetric due to large scale turbulence in the cylinder's wake). At the end, I use "outlet" with 0 pressure condition.
Solver: pisoFoam with 2 correctors and 1 nonOrthoCorrector.

I think I don't need a really developed turbulenct inlet: the experiment was drawn with very few turbulence, and the vortex shedding is strong enough to be independent on a little turbulence. But maybe the inlet distance is too short to allow a good flow separation upstream of the cylinder.
I will try to map a little cyclic region in order to developp this turbulence, but I am quite sure it doesnot affect the vortex shedding.

I will make the comparatives about kSGS and resolved fluctuations, read a bit, and then give you my thoughts about the LES-quality.

Could you tell me a bit more about the "time integration" and the use of a "second order (backward) scheme" ? I don't understand what you mean...

Bernhard August 21, 2012 04:10

With respect to your last question, I would like to refer you to section 4.2.3 in Eugene de Villiers thesis http://foamcfd.org/resources/theses.html

Djub August 21, 2012 04:18

WHOUA !!!
I didn't know about this webpage... A real Treasure ! Aladdin's cave ! The Great Library of Alexandria !

Thanks a lot.

(now, I need at least half a year to read and understand all this !)

Djub August 21, 2012 04:38

(actually, there is not so much about air turbulent flow around bluff bodies, but at least Eugene's PhD, so... Thanks again!)

niaz August 21, 2012 14:02

Hi Foamers
it is clear why your St. is high. the LES calculation is very sensitive to the near wall resolution. you have a uniform mesh and it is not suitable for LES.
secondly, based on a paper from sanjey mittal the distance from boundaries is very important in calculation of bluff bodies.
hope it is useful for you

Djub August 22, 2012 05:51

@Niaz,

Thanks for you comments. Could you develop a bit more your thoughts?
I really do not understand you:
1/ "LES is sensisitve to mesh resolution". Let's admit this. But how to tune it? How to simulate correctly? Having a thinner mesh? 'till where? Why a uniform mesh is not suitable for LES? The wall treatment I used is the "basic" one (kqRWallFunction with default parameters). Do you think this can affect the vortex shedding? On the other hand, in exepriments, roughness surface does not affect the Strouhal number... I thought it could be the same here, the details in the wall function being equivalent to the roughness of cylinder.
2/ I suppose you are speaking about "Flow past bluff bodies: effect of blockage" ? My blockage ratio is 7%, which not so small, you are right. Nevertheless, the experiment (which is for me the reference) was conducted also with this 7% blockage! Do you think blockage effect is wider in numerical calculation than in windtunnel experimentations? The Eurocode I provides another value of Strouhal number in this case: 0,12 (now without blockage).

(please, excuse my poor English skills. Most of all, I woudln't like to appear agressive because of my formulations.)

@Bernhard
I compared the standard deviation of Ux and the SubGridScale kenetic turbulent energy k (actually, the square root of the mean kSGS). Just to remind, my inlet is 3.3m/s:
* in the wake, sigmaUx is about 3 at 1 diameter downstream, and vanishes with distance.
* in the wake "suburbs" (about 1 diameter around, in all direction even upstream), sigmaUx lies between 0 and 1
* outside the wake, it is close to 0.
* sqrt(mean(k)) is quite constant in the wake, about 0.2 m/s
* outside the wake it is quite nul.
The only region where sigmaUx and sqrt(mean(k)) is close one to another is near the two upwind corners, where detachement is strong. both are around 0.6 ~> 0.8 m/s.
Here some pictures to illustrate my statements:

http://www.cfd-online.com/Forums/mem...e-kenitics.png

http://www.cfd-online.com/Forums/mem...separation.png



What about the Backward scheme? I understood that it is simpler to code, faster to run, but I did not read it was more accurate than CrankNicholson. I think I will use it to have quicker results, but are you sure the scheme will improve the quality of the results???

Thanks again for your kind help and comments!

niaz August 22, 2012 13:51

Dear Djub
firstly, LES is not as clear as RANS. your question about How much you should refine the mesh is a big question in LES. but as I said before refinement near the wall is very important. if you have a good computer you can test it. when you refine mesh near the wall you can see that LES can capture many tiny eddies near the wall. and these eddies can affect your strouhal number.
you said that you use wall function these wall functions eat the boundary layer near the wall which is very important in your case.
Djub can I ask you how or which method you use for fft to calculate St.?
Do you give enough time to your solution to go through a periodic answer?

Djub August 23, 2012 04:25

Hi Niaz,
Thanks for your help. In fact, I ran another similar case, but with a 2:1 cylinder. The result, in terms of St, was awfull (nearly 0.2 instead of 0.06 from Eurocode 1 -with no blockage). And zooming close to the corners, I was able to "see" the mesh in the color-interpolated result maps, indicating -in my opinion- an obvious mesh resolution problem. So now, my computer is working on a raffined mesh. 'hope it will enhance my results quality!

Concerning my post-work: first, I put a probe in my wake (function "probe" in my controldict). Then I switch on Octave/MatLab/SciLab... I have two methods to estimate the frequency. Both start with a visual control of the data to put away the transient section. Then:
* with a manualy chosen threeshold value, count the time between two crossing of this threeshold (with same derivative sign). This is made by diff(sign(Ux-lvl))) which is +2 (resp. -2) when the curves cross each other in one direction (resp. other direction). Then take the mean value of these durations. You can do the same on Uy, and then take the average. See fig1:
http://www.cfd-online.com/Forums/mem...al-version.png

* taking the simple fft of the Ux signal, and peak-picking the first harmonics. Then take the weighted average (saying (f1+f2+f3)/(1+2+3)). This is made to take into account the poor frequency resolution in low frequency region (delta.nu / f1 is much greater than delta.nu / f3). See fig2:
http://www.cfd-online.com/Forums/mem...cy-version.png

About the stability of the solution: actually, the wake is never periodic; only pseudo-periodic as you can see in the fig1. But I think this is a correct feature of the simulation because the real wake is not periodic neither.

I hope refinning my mesh near my cylinder will solve my Strouhal problems.

One question more: I think I did not understand correctly the wall functions. In fact, these are made only for Rans calculations, aren't they? In this case, which BC to use near my bluff body in terms of k (and/or nuSGS)?

niaz August 23, 2012 12:43

Dear djub
implement fft on lift coef. instead of velocity. it is more acurate.

Djub August 24, 2012 04:48

lift coef, velocity, or pressure... It won't change drasticaly the Strouhal number! For sure I need first to solve the fluid problem (before to gain accuracy in my estimators...)

Djub August 24, 2012 06:31

Hi evereybody!
You were a lot of nice people telling me that I have to refine my mesh close to my cylinder. Thus, I am working in this direction.
Nevertheless, my cells will be smaller, and thus I will have to decrease my time step in order to limit my Current Flow less than 1...

Am I right? My time is allready about some ms. It seems to me already very short. By refinning my mesh, lest say 3 levels, my cell size will be 2^3=8 times thiner, and my time step 8 time larger. Thus, my calculation will be 8 times slower...

Yesterday, with my coarse mesh, it longed 1 day for 1 second calculated. Thus I will have to wait one week for one second calculated. With about 4 seconds minimum to establish stationarity, and some seconds to make the estimations in the flow. About two month for 1 simple case. Am I right?

Is it to say that this kind of very simple cases is still reserved to super computers ?

Djub

Bernhard August 24, 2012 06:59

This is not a simple case. Yes, the formulation is simple, but that is about it.
But you can run this code on multiple processors. Also, you can initialize the fine mesh with the results from the coarse mesh (using mapFields) that will save you some timesteps.

niaz August 24, 2012 07:02

Dear Djub
you are right:D:D:D:D:D. that`s why LES is not very suitable and wide-used between scientists.
you can estimate your time step from kolmogrov law.:cool:

Djub August 24, 2012 08:59

:( I feel depressed now ... :(

@niaz
"... Kolmogorov law...": are you thinking about this:
The smallest eddies will be about l=nu/V . In my case, nu=15e-6 V=3.3m.s thus l is about 4e-6 m , ie several microns ? Do you mean I should refine my mesh around my object so that the first layers are this size?
Using this limit, a volcity of 2.V (acceleration of the incident velocity near the bluff body), and a maximum current of 1, I would need a time step of 6e-7, ie half a nanosecond?

Another question. I think I would have the same rough estimations for DNS. So where is the specifics of LES? Isn't it to modelized small eddies, in order to avoid going too deep in the fluid?

@Bernhard
I am desappointed. If this case is not simple, what about a bridge, with
- more complicated shape,
- any kind of wind incidence,
- turbulent inflow with characteristic lengths (specially in the flow direction and along the bridge span)
- porosity (road barreers)
And I don't mention the dynamics of the deck!
Nevertheless, thanks for advices. It is true than Foam is nice, 'cause I allready run this case in parallel (very simply in fact!), and mapping the result of the coarse mesh on a finer mesh was straitforward! :cool: Bravo OpenCFD team!

Bernhard August 24, 2012 09:37

Then you need to switch to RANS (which for your case is also quite heavy), or make a compromise for the quality of your LES simulation. In any case you need to perform the calculation on a huge amount of CPUs. In those case you should also always consider the amount of details you include, making rough assumptions at one point, but demanding a lot of details elsewhere, does not make sense.

Djub August 24, 2012 10:18

@Bernhard
"switch to RANS" ?
OK. But how to estimate the Strouhal number and the size of the vortices in RANS modelizations?

Bernhard August 24, 2012 10:19

Maybe T-RANS?

Djub August 24, 2012 10:21

I have heard about U-RANS (for Unsteady RANS), but never about T-RANS. What is this?

Bernhard August 24, 2012 10:24

Transient RANS, I think in general they refer to the same thing. However, long ago I have seen a paper with a triple decomposition with a third, periodic term.

niaz August 24, 2012 13:10

Dear Djub
there is 3 formula for kolmogorv laws and one of them is about time.
if you have mesh smaller then kolmogrov, you will approach to DNS
but you should maintain time step small.
you should look to that it is worth to simulate your case with LES
LES is very expensive model.

Djub August 27, 2012 04:35

Sorry Niaz,
I can perceive very interesting features in your message, but I didn't fully catch them...
May I ask you to remind me these Kolmogorov laws? I know one aout the -5/3 slope in the intertial domain; another one, something as I mentioned (shortest eddies corresponding to Re=1, so l=nu/V). Could you tell me about what you are thinking exactly?
"you should maintain time step small". How to do this ??? I thought the Cfl number (Current Flow, maybe noted Co elsewhere) could not be greater than 1 in LES?
Remark: in fact PISO is implicit so it is not an obligation of PISO. But I use Central Differenciating for diffusion scheme which requires Cfl<~1 . Using Backward would not solve the problem, because it adds temporal diffusion so delta t has to be small. Small but larger than Cfl = 1? Thus it could be interesting! Thanks both of you, Niaz and Bernhard... I will try!
Do you think I should use LES in this kind of case? So what else are you thinking about? U-RANS or T-RANS, as Bernhard 's advices ?

Bernhard August 27, 2012 04:45

Niaz is referring to the Kolmogorov scales: http://en.wikipedia.org/wiki/Kolmogorov_microscales
It your mesh is as fine as the smallest scales in the flow, there is no need for modelling the turbulence of course.

Also, CFL stands for Courant-Friedrichs-Lewy.

Djub August 27, 2012 05:12

Thanks Bernhard, you are a very wise and knowing people (and I apologize to M. Courant, M. Friedrichs and M. Lewy for my mystake...).
But what about epsilon? Nobody knows its value in my problem!!!
How to "estimate [my] time step from kolmogrov law" in this case?
Excuse me: I thought a bit and find out the solution: exploiting law 1/ and 2/, I found delta T = (delta x)² / nu . Thanks Bernhard and Niaz! Nevertheless, it is mush more "expensive" than the limitation with Cfl (or Co ) !!! Here refining delta x costs the square for delta T !!!
And if I go deep to these small scales, what is the difference between LES and DNS ?

I feel uncumfortable: Bernhard seems to guide me to "simplier" solution, with RANS, while NIAZ's direction seems to be going deeper in the fluid, something closer to DNS, thus more complicated features...
Isn't LES exactely designed for this: an interscale between DNS and RANS ?

Bernhard August 27, 2012 05:26

Computational resources often dictate what kind of treating turbulence you use. It also depends on what you want to know. I don't advise against Large Eddy Simulations, but you have to realize that due to different mesh requirements, LES will be more expensive. You can perform LES on a RANS mesh, then your LES results will be bogus.

The dissipation rate of turbulent kinetic energy can be estimated, to get the right order of magnitude. See e.g. Chapter 5 in the book by Pope there should be some copies in your department)

niaz August 27, 2012 08:10

Dear Djub
I did not conduct you to go to DNS. I said if you create smaller mesh, your solution will go near the DNS solution. I only guide you to refine mesh near the square.
it is obvious that URANS is very cheaper than LES specifically in higher Reynolds. and in your case, I decide you to use SpalartAllmaras.
and also be aware, sometimes numerical dissipation is more than your nuSGS and you should use ILES instead of LES.
but Bernard suggestion is very good, if you do not have to use LES, it will be better to use URANS.

Djub August 27, 2012 10:45

" if you do not have to use LES" ?
I do not HAVE to use LES, or URANS, or DNS or whatever. I have to compute vortex shedding the more acurately possible with low computing capabilities ( about 8 cores 2GHz5).
I thought LES was the best compromise. But if you think I need DNS or U-RANS, I will fallow your advices...

I am just surprised that a quite simple question (well, in my scientific background, which is not yet Computational Fluid Dynamics...) has no answer for the moment. This question beeing: how to model the vortex shedding of a simple geometry. The Eurocode I (2005) gives:
http://www.cfd-online.com/Forums/mem...pect-ratio.png
Note: for round cylinder, it seems simplier since St is constant 0,18, but everybody knows the the round surface is incredibly difficult to model because of Reynolds problems. Thue I think the rectangular shape is the simpliest...

niaz August 27, 2012 14:37

if you don`t have to, I think it was better to start with URANS

Djub August 28, 2012 03:57

Maybe you are right. Is there a Foam Tuto ? I ran LES 'cause I found Motorbike and it seems OK for me. How to run URANS with OpenFoam? PIMPLEFOAM with RANS turbulent model?

niaz August 28, 2012 07:03

yes of course. you can find many cases in tut. of openfoam.

Djub February 11, 2013 06:55

I managed with LES.
Some news about this thread: see
http://www.cfd-online.com/Forums/ope...tml#post407110


All times are GMT -4. The time now is 03:20.