CFD Online Logo CFD Online URL
www.cfd-online.com
[Sponsors]
Home > Forums > Software User Forums > OpenFOAM > OpenFOAM Running, Solving & CFD

About LES Smagorinsky Calibration

Register Blogs Community New Posts Updated Threads Search

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   March 2, 2022, 07:22
Lightbulb About LES Smagorinsky Calibration
  #1
New Member
 
Sophie
Join Date: Jan 2021
Posts: 11
Rep Power: 5
So_LL is on a distinguished road
Am completing a master thesis and there is no one at my university and department that knows CFD (not ideal, agreed), and so I am turning to your knowledge to help me confirm or infirm my thinking. All help would be greatly appreciated.

I need to complete a LES, because we are interested in the details surrounding turbulence behind a specific object in a straight canal. I am currently trying to calibrate the model based on measurements taken within the straight canal (no object in for now). And so : I have velocity measurements at three depths along the canal.

The setup is a canal with no slope and a pump activating the flow to a specific velocity and a specific water level. I therefore chose to use a one-phase transient solver, namely PimpleFoam. My model has the height (z) of the measured water depth, and I use the Newtonian transportModel with an average mean that I can calibrate on lab conditions. My reynold number is high: 3.1x10^5.

Because I am interested in turbulence, I am using the Smagorinsky model coupled with the Van Driest damping. I ensured a y+ value of 10 in all direction normal to walls (z and x), flow is in y-direction. My y+ value is a bit higher in the direction of flow, else my computation time would be too high for the computer's capacity.

I have cyclic BC upstream and dowstream, and my atmosphere is a slip wall with a zero gradient pressure to mimic open surface.

My model does converge but here's the thing:
Do I really need Vx and Vz to converge, considering my flow is only going in the Vy direction? and Vx and Vz are basically null, appart for turbulent eddies near the wall?

Note that convergence in my flow direction is obtained quite fast (Vx, Vz and p take a long time to converge, the lowest I have reached so far is 0.001...), but I observed velocity keeps decreasing near the wall and increasing in the middle of the canal depending on the time steps, and so what I gathered led me to this question:

Because LES offers a unique solution for every time step, and because there is basically an infinite number of u' arrangements that are compatible with the set Umean, could I just use the time step that best fit my lab data? Like a snap short of the turbulence for that specific velocity gradient...

This seems logical, albeit I cannot be sure if this is right. Any insight would be appreciated.

Thank you in advance, oh wise CFD kings and queens.
So_LL is offline   Reply With Quote

Old   March 2, 2022, 08:18
Default
  #2
Senior Member
 
Join Date: Apr 2020
Location: UK
Posts: 668
Rep Power: 14
Tobermory will become famous soon enough
Dear Sophie,

there is quite a lot to unpack from your post. Let me share my thoughts, and apologies if some of it sounds disheartening. I think you hit the hammer on the nail when you said is was "not ideal" that noone in your university/dept has any CFD knowledge - so congratulations on getting this far.

First up - interesting that you are using pimpleFoam. I guess you have a rigid, free slip upper boundary to represent the canal water surface? Note that this places a constraint on the model ... the water surface has to be exactly flat, even when a turbulent eddy passes. That's not realistic - just take a look at a river/canal surface and you can see the presence of eddies by the distortion of the free surface. Probably a minor effect for your simulation, let's move on.

You are trying to run an LES simulation of a wall bounded shear flow, where the turbulence is generated by the wall surface. Ok - this is ambitious (there is a LOT of domain knowldge that you need, to do this accurately). You need excellent wall resolution to do this (vertically and also laterally), otherwise you will not pick up the velocity shear correctly, nor the turbulent processes (streaks, ejections etc) close to the wall. You cannot rely on the Smagorinsky SGS model to model the latter, since they are not simple isotropic eddies. With your mesh spacing, you will be missing all of that. There are some blended, hybrid LES models that account for wall boundaries, that allow you to avoid the above constraints, but I am not sure that they are too helpful for your application.

Time step selection is also paramount - you must choose a value that keeps the maximum Courant number below 1, preferably in the range 0.3 to 0.5, otherwise you will generate temporal wiggles/inaccuracies (ie junk) and the solver may even crash at some point.

I am guessing from your reference to your computer's capacity that you probably do not have sufficient computing power to be able to run a simulation that is one or two magnitudes larger? This will prevent you from being able to do a properly resolved LES simulation.

Some other comments:
- you say "My model does converge" ... what does that mean? There is no convergence for an LES model; it is a transient simulation where the field is always changing. Steady state RANS models converge to steady solution; yours should be a constantly changing solution as the turbulence eddies pass along the canal.
- You also say that there are no eddies in the main part of the flow - that sounds like the solution is reverting to a laminar profile, and again is a sign that you have not resolved the turbulence generation at the wall.
- And yes, the X and Z directions are equally as important as the Y direction since turbulence is 3D.

My heartfelt suggestion is that you probably should concentrate on a RANS approach, unless you can find some significantly larger computing resources and have plenty of time to learn the fundamentals of LES modelling. I suspect that you want to focus on the physics, rather than the CFD science, so that's why I think a simpler, RANS approach would be more appropriate. But I wish you the best of luck!
Tobermory is offline   Reply With Quote

Old   March 2, 2022, 09:09
Default
  #3
New Member
 
Sophie
Join Date: Jan 2021
Posts: 11
Rep Power: 5
So_LL is on a distinguished road
Thank you so very much for your answer Tobermory, I am a bit down, but still hopeful and not ready to give up just yet. If I could still pick your brain, I am desperate for some help right now.

I cannot use RANS, because we are researching the effect of turbulence on fish passage and I do need to properly assess the eddies forming around the objects, at the very least.

My thinking right now is to properly calibrate the effect of the walls and flow condition, and technically, those would hold true when the object is in? Does this hypothesis sound sensible or am I losing my time and should consider the object for initial calibration too?

Quote:
Originally Posted by Tobermory View Post

First up - interesting that you are using pimpleFoam. I guess you have a rigid, free slip upper boundary to represent the canal water surface? Note that this places a constraint on the model ... the water surface has to be exactly flat, even when a turbulent eddy passes. That's not realistic - just take a look at a river/canal surface and you can see the presence of eddies by the distortion of the free surface. Probably a minor effect for your simulation, let's move on.
I started with interFoam, and tried to force a water level by fixing the velocity at the downstream end of the canal and a set Q upstream to reproduce the effect of the pump. It successfully forced the measured water depth, but the impact of the downstream BC was significant.

Velocities went up and down with each time steps and along the canal, but kept within the recorded velocities we had, albeit somewhat far from the mean (up to +/-4cm/s) and they kept decreasing until the dowstream BC forced them up (not ideal, but the best I could get... that pump is killing me).

My director told me to get everything closer to the recorded mean, which is when I switched to pimpleFoam. Could I have been correct, though? That I cannot precisely reproduce the average velocity with LES? That we could consider those varying results close enough since they are within the recorded velocities?

The mesh was also much too big. I guess I could revert back to interFoam and maybe decrease the height of the air phase, only keeping one centimeters, as opposed to 15 to save computational time.

Maybe there is a more accurate way to force a specific water depth, like using the Newtonian model transport as in pimpleFoam, or by setting a specific water height upstream instead of downstream? A simple yes or no will do, I don't want to take up too much of your time, I can research it on my own.



Quote:
Originally Posted by Tobermory View Post

You are trying to run an LES simulation of a wall bounded shear flow, where the turbulence is generated by the wall surface. Ok - this is ambitious (there is a LOT of domain knowldge that you need, to do this accurately). You need excellent wall resolution to do this (vertically and also laterally), otherwise you will not pick up the velocity shear correctly, nor the turbulent processes (streaks, ejections etc) close to the wall. You cannot rely on the Smagorinsky SGS model to model the latter, since they are not simple isotropic eddies. With your mesh spacing, you will be missing all of that. There are some blended, hybrid LES models that account for wall boundaries, that allow you to avoid the above constraints, but I am not sure that they are too helpful for your application.
Currently, I set up a nutUSpaldingWall function near the wall to circumvent current mesh sizing of y+<=10. I am not that concern about the walls, more so by the object.

I am surprised about Smagorinsky, most research papers I read seemed to say this was the best one to assess turbulence motions and to define the reduced velocity zones behind objects, which is why I was concentrating on this specific model.

Quote:
Originally Posted by Tobermory View Post

Time step selection is also paramount - you must choose a value that keeps the maximum Courant number below 1, preferably in the range 0.3 to 0.5, otherwise you will generate temporal wiggles/inaccuracies (ie junk) and the solver may even crash at some point.
My courant number is currently kept around 0.24 - 0.25.


Quote:
Originally Posted by Tobermory View Post

I am guessing from your reference to your computer's capacity that you probably do not have sufficient computing power to be able to run a simulation that is one or two magnitudes larger? This will prevent you from being able to do a properly resolved LES simulation.
I have access to 8 cores right now, but could request some funds to use AWS. I was keeping the funds for after my calibration is done, to run the 20 scenarios I need data for, since we don't have that much money either.

Quote:
Originally Posted by Tobermory View Post

Some other comments:
- you say "My model does converge" ... what does that mean? There is no convergence for an LES model; it is a transient simulation where the field is always changing. Steady state RANS models converge to steady solution; yours should be a constantly changing solution as the turbulence eddies pass along the canal.
- You also say that there are no eddies in the main part of the flow - that sounds like the solution is reverting to a laminar profile, and again is a sign that you have not resolved the turbulence generation at the wall.
- And yes, the X and Z directions are equally as important as the Y direction since turbulence is 3D.
The model convergence sentence refer to the initial residuals value which keep decreasing.

It sounds like the results I had obtained via my interFoam model were more consistent with those of a LES...

Again, thank you so very much for taking of your time to help me out here, I really appreciated your answer, and it kept me from pushing in the wrong direction. Thank you.
So_LL is offline   Reply With Quote

Old   March 3, 2022, 06:24
Default
  #4
Senior Member
 
Join Date: Apr 2020
Location: UK
Posts: 668
Rep Power: 14
Tobermory will become famous soon enough
This is an interesting problem! On the solver choice, if the variations in water surface level are small and you are not too interested in the turbulence structure near the surface, then I would imagine that a single phase solver like pimpleFoam would be more efficient to run and easier to set boundary conditions for than interFoam.

One reminder though - for LES, you need to preserve temporal accuracy (it's as important as spatial accuracy). Good news about your Courant number (is that mean or max though?). You should not be running in pimple mode though - you can still use pimpleFoam, but you should set it up to run in PISO mode (ie set nOuterCorrectors to 1, ie one pimple iteration per time step, and set nCorrectors to 2, ie two inner loop pressure correctors). Or, just use pisoFoam instead.

On the discussion about the wall - if you want your canal to be fully turbulent, then you need to handle the resolution of the wall properly, otherwise you will just not generate realistic turbulence. If instead you have an object that is generating turbulence, and that turbulence is the key for your simulations, then have a think about using a DES approach (IDDES ideally), since that is much more computationally efficient. See for example, https://www.openfoam.com/documentati...nted-cube.html.

Indeed, perhaps the best advice I can give you is to have a good discussion with someone knowledgable about what the goal for the study is, and make sure that that is achievable ... really hard given your situation, but it will help you avoid dead-ends. All the best.
Tobermory is offline   Reply With Quote

Old   March 3, 2022, 08:46
Default
  #5
New Member
 
Sophie
Join Date: Jan 2021
Posts: 11
Rep Power: 5
So_LL is on a distinguished road
Quote:
Originally Posted by Tobermory View Post
This is an interesting problem! On the solver choice, if the variations in water surface level are small and you are not too interested in the turbulence structure near the surface, then I would imagine that a single phase solver like pimpleFoam would be more efficient to run and easier to set boundary conditions for than interFoam.

One reminder though - for LES, you need to preserve temporal accuracy (it's as important as spatial accuracy). Good news about your Courant number (is that mean or max though?). You should not be running in pimple mode though - you can still use pimpleFoam, but you should set it up to run in PISO mode (ie set nOuterCorrectors to 1, ie one pimple iteration per time step, and set nCorrectors to 2, ie two inner loop pressure correctors). Or, just use pisoFoam instead.
Mean is 0.2436 and max is 0.261802 right now.

Quote:
Originally Posted by Tobermory View Post

On the discussion about the wall - if you want your canal to be fully turbulent, then you need to handle the resolution of the wall properly, otherwise you will just not generate realistic turbulence. If instead you have an object that is generating turbulence, and that turbulence is the key for your simulations, then have a think about using a DES approach (IDDES ideally), since that is much more computationally efficient. See for example, https://www.openfoam.com/documentati...nted-cube.html.

Indeed, perhaps the best advice I can give you is to have a good discussion with someone knowledgable about what the goal for the study is, and make sure that that is achievable ... really hard given your situation, but it will help you avoid dead-ends. All the best.
Upon reading on IDDES, I will definitely give it a try. I read that for DES, it was difficult to connect the RANS and LES close to the wall, but the author do not mention IDDES. Which makes sense, CFD is a somewhat new technology in rapid evolution.

I think one of my issue right now is indeed my cell span in the flow direction, and it seems IDDES would allow me to keep a somewhat bigger cell parallel to flow, as long as the span of the cells normal to the walls meet the model criteria. This is very useful.

I gathered a few papers on IDDES, it seems very interesting for our case indeed! Thank you so very much for pointing me this way, I hadn't come across anything on this particular model yet.

Thank you for your guidance, much appreciated !
So_LL is offline   Reply With Quote

Old   March 3, 2022, 12:41
Default
  #6
Senior Member
 
Join Date: Apr 2020
Location: UK
Posts: 668
Rep Power: 14
Tobermory will become famous soon enough
No problem - glad to be of help.

A few more comments, to make sure that I am not sending you down a rabbit hole (!). I found the IDDES model to work really well in OpenFOAM (I used the kOMegaSSTIDDES model from ESI version v2012). It essentially frees you from resolving the wall boundary layer, and allows you to just model the turbulence generated from bluff body separation, eg the wake shed from the surface mounted cube example in that validation study that I linked. It wouldn't be much use for you if the turbulence that you are interested in is just the background turbulence in the channel flow, since that would be modelled by the simulation in RANS mode ...
Tobermory is offline   Reply With Quote

Reply


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
Smagorinsky LES: output and average k value pierellozzo OpenFOAM Running, Solving & CFD 22 August 20, 2019 20:09
Wall damping function in Fluent using LES with standard smagorinsky sgs model (Cs=1) lxlylzl FLUENT 4 October 13, 2018 18:35
Smagorinsky Problem - LES - Internal pipe flow gu1 OpenFOAM Running, Solving & CFD 2 December 29, 2017 17:54
LES Compressible Smagorinsky Model iyer_arvind OpenFOAM Running, Solving & CFD 26 September 9, 2014 07:22
dynamic Smagorinsky model for compressible LES in OF openfoammaofnepo OpenFOAM 1 September 7, 2013 11:22


All times are GMT -4. The time now is 10:44.