
[Sponsors] 
April 2, 2017, 05:58 
Time required for RANS vs. LES vs. DNS

#1 
Member
William
Join Date: Aug 2016
Posts: 56
Rep Power: 3 
Hi,
I know that RANS is computationally more efficient than LES and DNS. And I also know that LES is computationally more efficient than DNS. I've read allot about the difference between the methods. But I've never seen how much the computational time difference is. Let's say I've modeled an Airfoil using RANS (kwSST). The solution has converged and I've ensured grid independence. The solution took exactly one hour.  How much time could I expect for the LES simulation/modeling?  How much time could I expect for the DNS simulation? 

April 2, 2017, 08:12 

#2 
Senior Member
Filippo Maria Denaro
Join Date: Jul 2010
Posts: 3,638
Rep Power: 41 
It it not comparable, several order of magnitude of difference...just think that RANS is a steady formulation (in statistical sense) and can be run in 2D. Conversely, LES/DNS are 3D and unsteady formulations.


April 2, 2017, 09:02 

#3 
Senior Member
Alex
Join Date: Jun 2012
Location: Germany
Posts: 1,579
Rep Power: 25 
Plus it depends on the Reynolds Number. If it is too high, DNS might be completely out of reach for any computer available today.
Without any information about the case, "several orders of magnitude higher" is really the only reasonable estimate.
__________________
Please do not send me CFDrelated questions via PM 

April 6, 2017, 18:02 

#4 
Senior Member
Lucky Tran
Join Date: Apr 2011
Location: Orlando, FL USA
Posts: 1,919
Rep Power: 26 
There are Reynolds number comparisons you can do to get the scaling for LES and DNS. But for RANS vs a timeresolved simulation it is extremely hard to give a general answer except to say several orders of magnitude. One reason is it depends on the separation of timescales, i.e. Reynolds number. Laminar flows can be solved with an unsteady laminar solver and this is cheap (RANS and DNS are the same thing and they are equally cheap/expensive). With higher Reynolds numbers, you hit turbulence, and there's separation, which increases with Re and it becomes increasingly more costly to solve with LES/DNS with higher Re.
Another reason it's very tough to compare is that "my RANS took 1 hour to solve" is not a good benchmark. In principle, if there is no nonlinear coupling between equations, you can solve a RANS problem using only a few iterations. That is, the solution time is highly dependent on your initial guess. So even for RANS, there is probably a 34 order of magnitude variation in time to solve depending on the userskill (i.e. between 1 hr and 1000 hours). LES & DNS typically run for compute years, decades, or centuries. The reason they stop is because they can't afford to run any longer. 

April 6, 2017, 18:45 

#5 
Senior Member
Lucky Tran
Join Date: Apr 2011
Location: Orlando, FL USA
Posts: 1,919
Rep Power: 26 
Okay but let's say we have a fixed case like your example. There are a lot of assumptions or simplifications you can make that makes the comparison doable. I've seen these types of estimates in various places, but off the top of my head cannot produce the citations for them. So I can at least outline the idea. For wallbounded flows of LES and RANS, the requirement for y+=1 near walls pretty much dominants your grid requirements. For non wallbounded flows, you don't have this constraint and you can get wildly different estimates.
On the same grid, iteration per iteration LES & DNS is often of comparable solution time comparable to RANS because you solve roughly the same number of equations (mass, momentum). Except in RANS you also usually solve extra transport equations for the turbulence models (i.e. 1, 2, 4, & 6 are popular), so that RANS is actually slower. However, it's really important to consider whether the turbulence models are algebraic models or differential equations. For simplicity, you can assume there is no need for a turbulence model. This also makes the comparison more fair for LES because there are algebraic models and models involving transport equations for the subgridscale model. You can refine the estimate later and account for these. The real question is how many iterations and how many timesteps you need to get a desired result. It's typical to perform say 10 iterations per timestep to get a converged result at one timestep (or 5 or 20, just pick a number) for LES & DNS. So the 1st question is how many timesteps you need to solve. The 2nd question is how many cells are in your grid, which determines how much more expensive your LES and DNS (per iteration) compared to your RANS. That is, for your RANS simulation you have N cells with dx,dy,dz spatial resolution. This grid is probably too coarse for LES or DNS. So you need to consider how many more cells are in your LES grid and then how many more is in a DNS grid for the same problem. The computational cost of solving the system of linear equations likely no more than O(N^3) w/ Gaussian elimination but no less than O(N^2). So if you know the grid disparity, you know how much more expensive it is to calculate 1 iteration in DNS or LES vs RANS. It is tempting to assume that you do RANS on a DNS quality grid so that all three grids are the same and equally costly. This might lead you to think that you only need to determine how many timesteps are needed. But you should avoid this, because doing LES and DNS both on a DNS grid will make the LES just as good as DNS (but LES will tend to be more expensive because of the subgridscale model). Ok so for DNS you need to resolve down to the Kolmogorov length scale everywhere (i.e. dx+=dy+=dz+ = 14 everywhere). So for a certain Reynolds number you need a certain grid resolution. Btw most DNS done today is not yet in the dx+=dy+=dz+ = 1 level but closer to the dx+=dy+=dz+ = 510 level. That is, the resolve to the Kolmogorov scale but do not completely resolve the Kolmogorov scale. So assuming walls, for LES you will be doing something like (dy+ = 1, dx=dz+ ~ 10) whereas for RANS you would normally have say (dy+ = 1, dx=dz+ ~ 50100). You can roughly estimate the LES grid as 10100x more cells as the RANS grid. Of course you are poor so you use bigger cells far away from walls. You can estimate that roughly 5080% of your cells are packed in the near wall region, which doesn't really affect the grid cell much (a factor of 2x or so) and you probably do the same stretching in DNS. So anway the DNS grid is anywhere from 10100x more than LES. If you don't like my ranges, then just pick solid numbers. Ok finally we know how much more expensive it is to do 1 iteration in RANS/LES/DNS (roughly 10^2 to 100^3 each time). So back to the number of timesteps. For numerical stability reasons the size of your grid often dictates the largest timestep you can take. The DNS timestep is roughly 1/2 or 1/10th the LES timestep because of the grid size so that DNS takes roughly 5x10x more timesteps for the same period. On the other hand, you need to average over a certain time period to get temporal statistics. So from here you can get the total number of timesteps needed to have a timeresolved simulation that gets you mean flow. Unfortunately this averaging time really depends on what your problem is but it is like a large eddy turnover time. Nearwall structures in wallbounded flows are decorrelated after Lx+ ~ 1000, so at the minimum you need 10x1,000 timesteps to get an average, but what about the large eddies? This is where the Reynolds number and scale separation comes in. At large Re, there is more scale separation. But you can take a guess that the large eddies are 1001000x bigger and therefore you need 100,0001,000,000 timesteps total. You will have a similar period for LES & DNS so they are the same. You have no explicit time period for RANS. Unfortunately this is only the averaging time. You also need to consider the computational cost of setting up the correct flowfield to even begin averaging. I.e. how long it takes your initial guess to develop into the proper flowfield. For LES & DNS of some problems, this is where 90% of the computational cost is expended. This is like guessing the wrong initial solution in RANS (i.e. you need 1000 iterations to converge a RANS, this is where your 1 hour comes from). So you can pad the total cost by a factor of 10x or 100x to your RANS/LES/DNS. But since it's roughly the same for all of them, you can probably neglect this effect. I hope this gives you ideas! 

Tags 
dns, les, rans, time 
Thread Tools  
Display Modes  


Similar Threads  
Thread  Thread Starter  Forum  Replies  Last Post 
pressure in incompressible solvers e.g. simpleFoam  chrizzl  OpenFOAM Running, Solving & CFD  13  March 28, 2017 05:49 
solidMechanics gear contact in rotation  nlc  OpenFOAM Running, Solving & CFD  3  January 11, 2015 07:41 
Micro Scale Pore, icoFoam  gooya_kabir  OpenFOAM Running, Solving & CFD  2  November 2, 2013 14:58 
mixerVesselAMI2D's mass is not balancing  sharonyue  OpenFOAM Running, Solving & CFD  6  June 10, 2013 09:34 
Could anybody help me see this error and give help  liugx212  OpenFOAM Running, Solving & CFD  3  January 4, 2006 19:07 