CFD Online Discussion Forums (http://www.cfd-online.com/Forums/)
-   Main CFD Forum (http://www.cfd-online.com/Forums/main/)
-   -   Mesh size for DNS and LES (http://www.cfd-online.com/Forums/main/904-mesh-size-dns-les.html)

 Glenn Horrocks June 10, 1999 19:52

Mesh size for DNS and LES

Hi all,

I've been doing some reading into DNS and LES techniques, and I have been having some problems finding how you can determine what mesh size you require for the two approaches.

The papers I have seen just say "we used a mesh of x by y by z", with no justification that the mesh they used is fine enough to resolve the turbulence scale structures. Does anyone have any references on how fine a mesh is required for DNS or LES? Or am I missing something?

Regards, Glenn

 andy June 11, 1999 06:00

Re: Mesh size for DNS and LES

For DNS the requirement to avoid aliasing will fix the maximum Reynolds number for a given mesh. Usually, external publications would assume all this and not refer to it. If you wish to learn about this sort of thing the best source is almost certainly internal reports and I would highly recommend those from Stanford.

Strictly, the same should apply to LES but a large proportion of LES codes are starting to be developed to solve engineering problems where it is sensible (essential?) to accept a solution that is modestly affected by numerical error (although not to the degree of typical RANS predictions). The key, as ever, seems to be to avoid forms of numerical error that seriously impact the physics.

In an LES prediction the size of the mesh defines the size of the resolved scales. Then, I am afraid, it is the physics (fluid mechanics) of the problem being studied and not something convenient like mathematics that dictates whether the information lost in the unresolved scales will adversely affect the solution. Conveniently some of the classes of flows that RANS methods cannot predict reliably like recirculations and separations (inappropriate assumptions about physics) are reliably simulated by LES on viable grids whereas many well behaved boundary layers require too high a grid resolution to obtain accurate LES predictions yet they can be reliably predicted with RANS predictions using modest resources. Then again, there are phenomena like trip wires, laminar separation bubbles, flame fronts, etc... where lots of physics resides in unresolved scales and simple sub grid turbulence closures based on gradient diffusion fail badly. DNS is a solution but is usually not viable.

 Jonas Larsson June 11, 1999 07:07

Re: Mesh size for DNS and LES

I'm not that aware of DNS and LES, but isn't it possible to say something more general than that it "depends on the physics"? I would guess that DNS generally needs to resolve a certain factor of the smallest Kolmogorov scale and that LES needs to resolves scales down to a certain part of the intertial sublayer or something like that.

I've also wondered several times if there is a simple estimate that you can do based on Reynold number etc. of how many nodes an LES/DNS simulation generally would require. It's always good to have that kind of estimates in your pocket when someone start advocating that you should do a DNS...

 andy June 11, 1999 10:38

Re: Mesh size for DNS and LES

The usual test for a fully valid DNS simulation is to check that no energy is aliasing back from the highest resolvable wavenumbers and distorting the low wavenumbers. This is a nice simple mathematical test equivalent to saying that the Kolmogorov scales (all the scales) are fully resolved. A very solid and simple check.

The often quoted guide for LES to resolve the turbulent motion "well into" the inertial sub-range where it is amenable to simulation by a simple sub-grid model is not as useful as it may first appear. The problem is that the physics/fluid mechanics/reality (the inconvenient truth) is that the turbulent motion in several flow regions does not have a nice well behaved intertial sub-range sitting between the interesting anisotropic large scale motions and the smallest dissipating motions. Then what do you do? DNS? - probably impractical. How do you know when you have a nice inertial sub-range and when you do not? It very hard to avoid the conclusion that one must know something about the physics of the problem being solved, how the physics is represented numerically and therefore what is likely to be reliably captured by the simulation and what is not.

 D.Reynolds June 11, 1999 17:07

Re: Mesh size for DNS and LES

DNS directly solves the Navier-Stokes equations capturing all eddies from the length scale of the grid geometry right down to the Kolmogorov length scales (relating to the smallest eddies). The dx,dy,dz (=dL) of the mesh needs to be small enough to capture eddies down to the Kolmogorov length scale.

The argument for the cell resolution, (and thus dL) goes something like this:

computational box of length L

number of grid points in ONE direction, N

grid spacing dL

Kolmogorov length scale, eta

Molecular viscosity, mu

Energy dissipation rate, epsilon

rms turbulent velocity scale, u'

-------------------

For a box of length L, the number of points depends on dL:

N = L / dL --------------(1)

dL must be small enough to resolve the smallest eddies, which have the length scale eta. Thus dL=eta is the maximum value for dL to capture the smallest eddies without them `dropping through' the grid (idealy dL= 0.5 * eta for better resolution).

Thus (1) becomes:

N(min) = L / dL(max) = L / eta --------(2)

Eta is defined as: eta = ( mu^3 / epsilon )^(1/4) --------(3)

Epsilon defined as: epsilon = u'^3 / L --------(4)

Substituting (3) & (4) into (2) gives:

N = ( u' * L / mu )^(3/4)

Noting that u'L/mu is a form of Reynolds Number this gives: N^3 = Re^(9/4)

Knowing the Reynolds number, Re and the geometry size, L enables you to make a rough estimate of dL.

---------------------------

The papers I've seen are concerned with making the cell size near the wall small enough to get the first few mesh points (this is related to pi*eta (or pi*dL) thus the first 3 points) in the viscous sub-layer. This is why they are always mentioning the y+ values of the near wall cells.

(3)&(4) See standard turbulence textbooks for definitions.

For papers discussing this matter:

Eggels et al JOURNAL OF FLUID MECH. VOL 268 pp175-209 (page 179 specifically). A paper on DNS of turbulent pipe flow

Kim, Moin, Moser JOURNAL OF FLUID MECH. VOL 177 pp133-166 (p135, there is also a reference to Moser&Moin 1984 (internal Stanford report)). A paper on DNS of channel flow

An LES computational grid only needs a dL small enough to resolve the large scale flow structures (e.g a recirculation bubble). Any structures smaller than this are passed on to the subgrid scale (SGS) model.

Hope this helps, Denver

 gebreeg June 12, 1999 15:58

Re: Mesh size for DNS and LES

Hi,

I do not have sufficient experience in this DNS and LES stuff. However, it must be clear for any user that the convergence of the solution to a problem could be a good clue as to how good one's selection of the mesh size would be. On the other hand starting with a small mesh size would be advisable and keep on increasing until the there is no variation in the solution from the previously selected mesh size.

Regards,

gebreeg

 Sridar.D June 14, 1999 04:09

Re: Mesh size for DNS and LES

hello,

iam writing this response after going throught all the reply. out of the information here i found one is good as far as DNS is concerned. before talking about DNS and LES, let's first talk about our core problem - turbulent flows.

As every one of us konw that a turbulent flow is characterised with wide range of variation in scales. one can see almost all scales being excited in the Energy spectrum. so what does the enegy spectrum of turbulent flow say to us. The energy is being added by body force at lower k's. cascaded to the higer k's by the convection term and dissipated to heat at much higher k's by the dissipation term. if you want to have much more infomation please refer to the ref. 1.

so if one wishes to do DNS, the he has to go all the way up to dissipation scale given by Kolmogorov dissipation length scale. as far as this is concerned the explanation given by Mr. D. Reylond is ok!.

the real play comes when we do LES. first of all what is LES?. Instead of going all the way up to molecular dissipation level (which is at much higher k) we simulate at lower k. this value, one fixes, in the inertial subrange and greater then value at which the body forces are dominant. it will be much more clear if you can see the energy spectrum graph. i couln't provide the graph here as i don't how to get the fig on to this message. that's why i request you guy's to take a look at the ref. 1 or any book on turbulence. so the key here is, i fix my value of k for any LES computaion in inertial subrange and provide and drain there. so i simulate right up to that k and thereafter i model the flow using sub-grid scale models. there SGS model are such that they dissipate what ever the energy comes on the cut-off point (the point up to which one solves the complete NS eqn.) so that there is no pile of energy - which will make the system unsable. once i define my cut-off point, that gives me the wavenumber i can resolve and from that the grid size is calculated - which is half of the wavelength. please not here, that this value of cut-off wave number is also depends on the numerical scheme one is going to use for his computation.

As iam doing my research in this field i have lot more specific information to share. if any one intrested can contact me. i will be happy to have more discussion on this area.

regards,

Sridar. D.

ref: 1. C. R. Doering & J. D. Gibbson, Applied Analysis of the Navier-Stokes Equation, Cambridge University Press.

2. Thomas B. Gatski, M. Yousuff Hussaini & J. L. Lumley, Simulation and Modeling of Turbulent flows.

3. Pierre Sagaut, Report 98 FM 10 (internal report), Indian Institute of Science.

 John C. Chien June 14, 1999 09:10

Re: Mesh size for DNS and LES

(1). The fundamental problem I have is " What is the difference between the time accurate solution of Navier-Stokes equations and the DNS solution? " In the laminar, time accurate solution, I think the solution is unique and repeatable. Is this also true for DNS solution? (2). Modeling of turbulent flow is definite and repeatable. The results may not be exact as the test data. But this is all right, because everyone using the same model will get the same result. (3). When you talked about the scale in the turbulent flow, what is the population of turbulence in the scale? Can you reproduce the exact population in scale? and in time? If you re-run the calculation, are you going to get the same time accurate solution for turbulent flow? If not, are these two solutions acceptable? Is this the reason why people use the word "simulation" instead of "numerically accurate" solutions? (4). Do you think two sets of turbulent flows with identical boundary conditions have the identical same solution? (5). I think, this is the fundamental problem in extending the unique, time accurate Navier-Stokes solutions into the turbulent flow domain. (6). And somewhere along the way, the inaccuracy sets in , the time accurate solution gradually becomes "simulation". ?? Or, when the Navier-Stokes solutions become no longer accurate and repeatable, it will be called "turbulent flow simulation?"

 andy June 14, 1999 10:21

Re: Mesh size for DNS and LES

DNS is CFD jargon for an accurate laminar solution. When possible, this is usually done with spectral methods but where boundary conditions prohibit, high order finite difference methods (6th order and above) are typically used. The label DNS is typically used when you know (or are pretty sure) the numerical error is not significantly influencing the prediction.

All computer simulations are repeatable, even those using series of random numbers.

Laminar solutions are not necessarily unique whether real or computer simulated. This follows from the convection term (at least) being non-linear.

A problem with a given set of boundary conditions can result in different solutions if the initial conditions differ and there is more than one solution (e.g. which wall a stalled diffuser attaches to, whether a swirling flow attaches to a container or not, ...).

When one tries to impose representative time varying boundary conditions the word "simulation" does spring naturally to mind! It is also a more natural word to describe something that is often closer to a computational experiment than a RANS prediction.

I am not sure I fully understood the question at the end concerning Navier-Stokes solutions (but I won't let that stop me!). If a DNS run is not the best solution to the Navier-Stokes equations what is?

 D. Reynolds June 14, 1999 13:25

Time accurate solution vs. DNS

In response to J. Chien who wrote:

" What is the difference between the time accurate solution of Navier-Stokes equations and the DNS solution? "

I'm not sure I understand this question correctly, but as far as I am aware DNS (Direct Numerical Simulation) is defined as a time accurate solution of the Navier-Stokes equations.

Perhaps you mean "What is the difference between laminar & turbulent DNS?" ? Believing this to be so from reading the rest of your message I wrote the following:

When the DNS is of turbulence rather than a laminar flow the turbulence requires initialization in some way. The same is true of LES (LES is always turbulent, because laminar LES = DNS by definition). I have found little reported work on the proceedures used to accomplish this turbulence initialization.

I can only speak for the LES code I use (and the generations of code that preceded it). The turbulence is initialized by setting an initial flow field that has a random fluctation velocity component added to the inital mean velocity.

-----------------

For example:

U_initial_cell =

U_initial_mean + (Random_number * U_initial_mean * 0.20)

( Random_number has a value in the range -1 to +1 )

This function sets the initial cell velocity to that of the initial_mean with a tolerance of 20% (i.e. + or - 20%). So if the U_initial_mean was 1.0 then the initial velocity of the cell could be anywhere between 0.8 and 1.2 depending on the Random_number (an intrinsic computer function).

-----------------

The value for initial fluctuation (20% etc) is a fairly arbitrary value just required to `kick-start' the turbulence. Once the simulation has been kick-started and run sufficiently long enough for the correct energy cascade to be observed (by monitoring k.e. of the flow) the statistics data from that point onward is o.k to be used for results. This accumulation of statistical data is one of the reasons why LES/DNS turbulent simulations require so much more time to run.

Providing the same random_number is used on the same cells during initialization the computations of two DNS cases will be exactly* the same when all other conditions (boundary, geometry, etc) are equivalent.

*exactly is defined as Phi(x,t)_simulation_A = Phi(x,t)_simulation_B

If different random_numbers are used then the flow solution would be expected to be slightly numerically different from a previous run, but statistically the same. This would be similar to the case where two experimental turbulent simulations in a wind tunnel do not have exactly* the same flow field, but are expected to be statistically the same and have the same coherent structures in the flow.

LES, or turbulent DNS is like journeying along a road. The intial fluctations imposed pre-determine which exact roads you will travel on, and the other boundary conditions determine the general direction in which you will be heading. In industrial problems the concern is with the direction you are heading, N,E,S, or West, and not so much if you are on a particular road at a particular time, e.g. walking by 43 Accacia Road at 5pm.

This idea may be seen in the definition of turblence by Hinze (1959) "...so that statistically distinct average values can be discerned." For if Taylor & Von Karman's 1937 definition was taken literally CFD shouldn't exist!

Regards, Denver

 John C. Chien June 14, 1999 14:52

Re: Mesh size for DNS and LES

(1). Let me ask a simple question. If I run a transient calculation of Navier-Stokes equations, using identical initial conditions, can I always get the same solution at a time t for a separated diffuser flow with these highly accurate methods. For the time t equal to 100 time steps, I can see that this could be possible. But if time t is large, say 4 weeks into the calculation, can we still get the exactly same solution at that time step? If we can't get the identical solution at the end of 4 weeks ( with identical initial flow field), is the results still useful? (2). If the solution at the end of 4 weeks is not unique and decide to branch out, for example, the flow originally separated from the upper diffuser wall now moves to the lower wall, should one stop the calculation or continue on to include the lower wall separation in the simulation? (3). At high Reynolds number, because of flow instability, the flow will branch out and moves into a different acceptable solution in a random fashion. In this case, no two solutions will be identical even with identical initial conditions. In this case, do we have to consider a group of these solutions , or just one solution is enough?

 John C. Chien June 14, 1999 15:10

Re: Time accurate solution vs. DNS

(1). There is no question about the case that initially different random consitions will result in different flow solution at a later time t. (2). In this case, the question is at the end of time t, will the two solutions statistically the same? (2). The second question is, for initially same random conditions will the two solutions develops in the identically manner, that is identical at any time t? Is it possible that the solutions will be different at any different time, even with identically same initial conditions because of the random nature of the high Reynolds number flow? ( in other word, each case is doing its own thing.) (3). Can one run a series of calculations with different initial conditions and carry out ensemble average over these solutions? Is this result different from the single case statistical average?

 D. Reynolds June 14, 1999 16:17

Re: Time accurate solution vs. DNS

"Can the flow solution be different from a previous simulation in the case of a High Reynolds number flow when the same random intial fluctations are used (& all other parameters are the same)?"

my reply is as follows: ------------------ No.

But why?

Well, lets look at what the solution actually is:

Definition (1) It is a discrete representation of a continuous phenonmena being modeled on digital machine.

Defintion (2) It is SOFTWARE running on HARDWARE started off with INPUT.

Going by Definition (2) we conclude: If any of these three change then your solution can change because: SOLUTION = f( SOFTWARE, HARDWARE, INPUT) only!

----------------------

-------QUOTE-BLOCK----------

(1). There is no question about the case that initially different random consitions will result in different flow solution at a later time t. (2). In this case, the question is at the end of time t, will the two solutions statistically the same?

---END-QUOTE-BLOCK----------

Yes, the general trends should be the same when slightly different initial random numbers are used. Anything else says there is a mistake (in SOFTWARE, HARDWARE, INPUT ) waiting to be found.

-------QUOTE-BLOCK----------

The second question is, for initially same random conditions will the two solutions develops in the identically manner, that is identical at any time t?

---END-QUOTE-BLOCK----------

Yes. As stated in my previous posting: Phi(x,t)_simulationA = Phi(x,t)_simulationB.

-------QUOTE-BLOCK----------

Is it possible that the solutions will be different at any different time, even with identically same initial conditions because of the random nature of the high Reynolds number flow?

---END-QUOTE-BLOCK----------

No. This is because of the definition of what a solution is. (See above Definitions)

-------QUOTE-BLOCK----------

<1>Can one run a series of calculations with different initial conditions and carry out ensemble average over these solutions? <2>Is this result different from the single case statistical average?

---END-QUOTE-BLOCK---------- If the only difference is v.slightly different random fluctuations then I believe so, <1> yes. <2> Yes (if only slightly, and in a similar way to experimental turbulence statistical measurements). See "Turbulence Modeling for CFD" by Wilcox pp11-14 (published by DCW Industries) for more info. on averaging. (http://www.dcwindustries.com/)

Regards, Denver

 andy June 15, 1999 05:29

Re: Mesh size for DNS and LES

(1) If one repeats a calculation with the same initial conditions and the same boundary conditions then a digital computer should produce the same answer. (I say should because many years ago I used the above to prove to a supplier of a small parallel computer system that they had a hardware problem. When running identical predictions on all the processors after a few hours one value at one grid point on one of the processors would be incorrectly evaluated. It was very hard work to convince the supplier that it was not a bug in the software! I believe one of the Intel x86 processors had a similar problem at one stage).

(2) If the diffuser flowfield is intermittently stalling then an LES prediction should predict an intermittently stalling flowfield (and it probably will so long as the downstream (probably) mechanism that is preventing a stable stall is included in the simulation). A time varying prediciton using a RANS turbulence model (e.g. k-e) is unlikely to perform well because the large modelled Reynolds stresses will inhibit the turbulent motion (particularly the smaller scales).

This accurate simulation of the physical processes including the mechanics of moving between "multiple solutions" is one of the great benefits of LES but it has its downside. When one starts up a (real) flow through an aggressive diffusive (or compressor) great care has to be taken to avoid stalling the flow because you usually cannot reattach it once it has gone. The same is true of an LES prediction - all these start-up problems are accurately simulated! - and it can take a very long time before the flow settles down enough to start gathering statistics. Its very annoying "wasting" all that computer time.

(3) Do not like this word random. Stall is perfectly deterministic if you include the correct physical mechanisms in the simulation (and that's the interesting bit).

Your questions appear to be emanating from a RANS CFD view of the world. As I mentioned earlier to Jonas, when one performs LES much of ones RANS knowledge is still applicable but not particularly useful but what is always useful is an understanding of the physics (fluid mechanics).

 John C. Chien June 15, 1999 09:19

Re: Mesh size for DNS and LES

(1). I agree with you that the software with identical conditions should be repeatable. Does this mean that if one perform LES (or DNS) calculation for flow over a cylinder, the oscillation of the wake always start from one particular side? (2). If the numerical method is not 100% accurate in time, will the long time solution different from the real flow? That is , if one run numerical simulation and flow testing in parallel can we obtain the same physics from both sets of results? ( if after 4 weeks of calculation, one watch is ten seconds behind the other one, the total watch time will be different) (3). Back to the flow over the cylinder case, if the numerical simulation always predicts the separation starts from the left side, and on the other hand, the real test always shows the separation starts from the right side, can we still get the same conclusion from the both results? ( everything is symmetric in geometry). (4). I think, I don't feel comfortable about the accuracy (as compare to the test results) of DNS and LES simulation over a very long period of computing time. This is especially a problem when the numerical solution is always unique in time. The result accumulated over 4 weeks of time will be different form that obtained over one year of time. I don't know whether they can simulate the real physics or not . I mean in the real computing environment where there are always spatial and temporal errors in the solution, how do we address this types of errors? (5). Thank you very much for your time.

 andy June 15, 1999 10:29

Re: Mesh size for DNS and LES

(1) The side it starts from will be determined by the initial conditions.

(2) The flow will be different instantaneously after a long time. That is, a photograph of the flow may have most of the flow going over the top surface and the simulation at the same instant most of the flow passing over the bottom surface. This does not mean the time-averaged statistics of the real flow and the simulation are necessarily significantly different (but they may be if it is a poor simulation).

(3) If the flow is symmetric it does not matter whether one is on the left or one on the right.

(4) It depends on the time scales of the flow. After one week the sampling error associated with the time averaged (or ensemble averaged) statistics may have reduced to a negligible size, in which case, running on for a year will not change the answer at all.

In an LES or DNS simulation samples of the flow field are gathered in the same way as an LDA experiment. Typically one would gather something like 50 000 samples at each grid point to reduce the statistical error in the higher-order correlations to acceptable levels. This process can consume a significant amount of the computer time and memory.

 D.Reynolds June 15, 1999 10:32

DNS/LES vs Real life

Speaking of DNS/LES codes J.Chien wrote: "I don't know whether they can simulate the real physics or not "

It all depends on how you see CFD.

If CFD is seen as a method to calculate analytical solutions then it will never satisfy our requirements because we are already making an approximation to the true solution by using a grid (& digital computer).(i.e. a discretized representation of a continous phenomena is an *approximation* of the phenomena and thus can only yield an *approximate* solution)

If CFD is seen as a method to provide insight into what happens in various flows (e.g. being able to examine a flow from any view & run "what if...?" parameter influence simulations) then it is a very useful tool. In engineering we aren't so much interested in say, the particular velocity fluctuation, u' in a cell 4wks 21hrs 32mins 11s into a simulation, but rather the general trends.

Rather than asking "Does the flow separate on the left or right?" the engineer might ask "Does the flow separate?"

CFD is a design tool. It has many benefits, but also has limitations on what it may be used to predict, and to what degree of accuracy.

Regards,Denver

 John C. Chien June 15, 1999 11:21

Re: DNS/LES vs Real life

(1). Yes, that is exactly how I feel. (2). I think, in DNS or LES one is trying to get some statistical quantities ( depends on the sampling rate ) out of "approximate solutions". (3). Whether this "averaged" results of "approximate solutions" actually equal to the real physics or not probably depends on issues like mesh sizes, mesh size distributions, time steps and sub-scale models if required. (4). I don't have any basic doubt about the usefulness of DNS and LES. The uncertainty I have is more or less like " When ( what mesh size, and time step) can one say that his simulation ("averaged results" of "approximate solutions") really has some physics in it? I think it is related to the square-1 of this original posting question. (5). Thank you very much for your answer.

 Md. Ziaul Islam July 1, 1999 15:47

Re: Mesh size for DNS and LES

" Turbulence Modeling for Time-Dependent RANS and VLES: A Review ", AIAA Journal, Vol. 36, N0.2, February 1998

I would recommend everybody to go through the above journal. The research paper described about a new approach, which has the capability of bridging the gap between DES (direct numerical simulations), LES (large-eddy simulations), and RANS (Reynolds-averaged Navier-Stokes). The paper also describes the drawbacks of DNS(direct numerical simulations).

 juliom May 12, 2015 18:55

Dear Mr Sridar. I read you post from 1999. I am just starting my PhD work in LES but after reading a pile of paper I still have more questions than answers. First of all I am struggleing with the filter operation, although I understand the physics behind the filtering I do not visualize how to implement it from the numerical point of vie (code). I still see the LES like something very difficult to code, but after reading some papers from Moin I have the feeling that this is like a URANS with a different in the way I compute the SGS or its equivalent if I compaer it with URANS (turbulent viscosity).
Secondly, I have read about DNS and LES and everythime I read something about LES vs DNS I see that the solution from DNS is filters... WHYYYY????.. This question also complement my following question. Can I compare experimental data with raw data from LES. From the physics point of view the LES requires a filtering to define a kind of 'cut-off'. However, the SGS models models the eddies below the cut -off widht. It means that I am solving explicitly one portion of the energy spectrum and modeling another portion of the spectrum. It means, that my final flow field (pressure, velocity and so forth) represent the entire solution. From this point of view I could comapre LES solution with any CFD solution and even with experimental data withouth performing any filtering at all...
How lost am I?