CFD Online Logo CFD Online URL
www.cfd-online.com
[Sponsors]
Home > Forums > General Forums > Main CFD Forum

Time required for RANS vs. LES vs. DNS

Register Blogs Community New Posts Updated Threads Search

Like Tree8Likes
  • 2 Post By flotus1
  • 6 Post By LuckyTran

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   April 2, 2017, 06:58
Post Time required for RANS vs. LES vs. DNS
  #1
Member
 
William
Join Date: Aug 2016
Posts: 56
Rep Power: 10
Wingman is on a distinguished road
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 (kw-SST). 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?
Wingman is offline   Reply With Quote

Old   April 2, 2017, 09:12
Default
  #2
Senior Member
 
Filippo Maria Denaro
Join Date: Jul 2010
Posts: 6,896
Rep Power: 73
FMDenaro has a spectacular aura aboutFMDenaro has a spectacular aura aboutFMDenaro has a spectacular aura about
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.
FMDenaro is offline   Reply With Quote

Old   April 2, 2017, 10:02
Default
  #3
Super Moderator
 
flotus1's Avatar
 
Alex
Join Date: Jun 2012
Location: Germany
Posts: 3,427
Rep Power: 49
flotus1 has a spectacular aura aboutflotus1 has a spectacular aura about
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.
lcarasik and Chris2337 like this.
flotus1 is offline   Reply With Quote

Old   April 6, 2017, 19:02
Default
  #4
Senior Member
 
Lucky
Join Date: Apr 2011
Location: Orlando, FL USA
Posts: 5,761
Rep Power: 66
LuckyTran has a spectacular aura aboutLuckyTran has a spectacular aura aboutLuckyTran has a spectacular aura about
There are Reynolds number comparisons you can do to get the scaling for LES and DNS. But for RANS vs a time-resolved 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 time-scales, 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 non-linear 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 3-4 order of magnitude variation in time to solve depending on the user-skill (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.
LuckyTran is offline   Reply With Quote

Old   April 6, 2017, 19:45
Default
  #5
Senior Member
 
Lucky
Join Date: Apr 2011
Location: Orlando, FL USA
Posts: 5,761
Rep Power: 66
LuckyTran has a spectacular aura aboutLuckyTran has a spectacular aura aboutLuckyTran has a spectacular aura about
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 wall-bounded flows of LES and RANS, the requirement for y+=1 near walls pretty much dominants your grid requirements. For non wall-bounded 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 time-steps you need to get a desired result. It's typical to perform say 10 iterations per time-step to get a converged result at one time-step (or 5 or 20, just pick a number) for LES & DNS. So the 1st question is how many time-steps 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 time-steps 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+ = 1-4 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+ = 5-10 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+ ~ 50-100). You can roughly estimate the LES grid as 10-100x 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 50-80% 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 10-100x 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 time-steps. For numerical stability reasons the size of your grid often dictates the largest time-step you can take. The DNS time-step is roughly 1/2 or 1/10th the LES time-step because of the grid size so that DNS takes roughly 5x-10x more time-steps 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 time-steps needed to have a time-resolved 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. Near-wall structures in wall-bounded flows are decorrelated after Lx+ ~ 1000, so at the minimum you need 10x1,000 time-steps 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 100-1000x bigger and therefore you need 100,000-1,000,000 time-steps 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!
LuckyTran is offline   Reply With Quote

Old   September 25, 2021, 09:28
Default
  #6
New Member
 
Join Date: Jul 2017
Posts: 14
Rep Power: 9
kooki_13 is on a distinguished road
Quote:
Originally Posted by LuckyTran View Post
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 wall-bounded flows of LES and RANS, the requirement for y+=1 near walls pretty much dominants your grid requirements. For non wall-bounded 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 time-steps you need to get a desired result. It's typical to perform say 10 iterations per time-step to get a converged result at one time-step (or 5 or 20, just pick a number) for LES & DNS. So the 1st question is how many time-steps 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 time-steps 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+ = 1-4 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+ = 5-10 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+ ~ 50-100). You can roughly estimate the LES grid as 10-100x 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 50-80% 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 10-100x 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 time-steps. For numerical stability reasons the size of your grid often dictates the largest time-step you can take. The DNS time-step is roughly 1/2 or 1/10th the LES time-step because of the grid size so that DNS takes roughly 5x-10x more time-steps 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 time-steps needed to have a time-resolved 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. Near-wall structures in wall-bounded flows are decorrelated after Lx+ ~ 1000, so at the minimum you need 10x1,000 time-steps 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 100-1000x bigger and therefore you need 100,000-1,000,000 time-steps 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!
Hi
Thank you for the clear statement.
If there is LES simulation for the jet flow in Re=10^4, where the total injection time is about 200 ms, and it needs to be solved for the total duration of 30s to 1 min:

Can you estimate the run-time duration of turbulent jet flow with time step of 1e-6?
I mean on a normal system with 32GB RAM and 16 core, is it possible to get any result?
If the inlet injection is about 2cm in diameter, what is the best size of dx?
I will really appreciate to have your idea.
kooki_13 is offline   Reply With Quote

Reply

Tags
dns, les, rans, time


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are On


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 06:49
[solidMechanics] solidMechanics gear contact in rotation nlc OpenFOAM CC Toolkits for Fluid-Structure Interaction 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 10:34
Could anybody help me see this error and give help liugx212 OpenFOAM Running, Solving & CFD 3 January 4, 2006 19:07


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