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

Best-Practices for LES

Register Blogs Community New Posts Updated Threads Search

Like Tree8Likes

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   December 22, 2017, 13:33
Default Best-Practices for LES
  #1
gu1
Senior Member
 
Guilherme
Join Date: Apr 2017
Posts: 231
Rep Power: 10
gu1 is on a distinguished road
Hi,

I was reading the file "BEST-PRACTICES FOR LES IN FLUENT", the file recommends:

Quote:
Recommended Procedure:

1. Compute the mean flow with steady RANS;
k-ε model is sufficient
The RANS solution doesn’t have to be fully converged

2. Superimpose the synthesized turbulence on the mean flow;

3. Switch to LES, select the SGS turbulence model of your choice.
For the same geometry (and mesh), how would the procedure in OpenFOAM be?
- MapFields?! (I believe it is for different geometries...but, needed in case there is a change in the mesh?)

- once you've finished modeling the field using RANS, switch to LES and overwrite existing files (from RANS results)?! But if you take a non-ideal approach to the problem (fvSquemes, fvSolution), you would have to redo the whole process (RANS -> LES ...)?

The intention of the post is not only to answer my question, but also to serve as a guide for future adventurers in LES.
cshsgy, AshaEgreck and allanZHONG like this.
gu1 is offline   Reply With Quote

Old   January 9, 2018, 23:16
Default
  #2
Senior Member
 
Gerhard Holzinger
Join Date: Feb 2012
Location: Austria
Posts: 339
Rep Power: 28
GerhardHolzinger will become famous soon enoughGerhardHolzinger will become famous soon enough
mapFields works perfectly well for identical geometries.
GerhardHolzinger is offline   Reply With Quote

Old   January 10, 2018, 07:57
Default
  #3
Senior Member
 
Robert
Join Date: May 2015
Location: Bremen, GER
Posts: 292
Rep Power: 12
RobertHB is on a distinguished road
Quote:
Originally Posted by gu1 View Post
For the same geometry (and mesh), how would the procedure in OpenFOAM be?
- MapFields?! (I believe it is for different geometries...but, needed in case there is a change in the mesh?)
mapFields can also be used for identical geometries. You can specify which parameters you want to copy from your RANS case to your LES case.
OR you simple copy the case and the latest timestep Can work, doesnt have to.

Quote:
- once you've finished modeling the field using RANS, switch to LES and overwrite existing files (from RANS results)?!
If you copy your case or map the final results onto a new case you do not overwrite the results from your RANS simulation.

Quote:
But if you take a non-ideal approach to the problem (fvSquemes, fvSolution), you would have to redo the whole process (RANS -> LES ...)?
For trial&error purposes your RANS simulations should be quick. You do not need the finest refinement or full convergence at a residual value of 1e-6 to check your setup. I'd suggest you figure out your schemes and solution settings first. If you have a stable model, make a save of your case.
If your RANS is fine, you shouldnt need to much adjustments to make your LES run. And if RANS is fine, you will only need to tweak your LES, not both.
RobertHB is offline   Reply With Quote

Old   January 11, 2018, 04:18
Default
  #4
Senior Member
 
Santiago Lopez Castano
Join Date: Nov 2012
Posts: 354
Rep Power: 15
Santiago is on a distinguished road
How would you get a turbulent flow in OF with only a RANS field? You need means to trigger instabilities.
AshaEgreck likes this.
Santiago is offline   Reply With Quote

Old   January 11, 2018, 04:29
Default
  #5
Senior Member
 
Robert
Join Date: May 2015
Location: Bremen, GER
Posts: 292
Rep Power: 12
RobertHB is on a distinguished road
Quote:
Originally Posted by Santiago View Post
How would you get a turbulent flow in OF with only a RANS field? You need means to trigger instabilities.
How about having a high Re flow and a long simulation runtime? Or inducing the turbulence using perturbU or the turbulentInlet boundary condition. Having a solid object in your domain can cause turbulence behing/around your object.
RobertHB is offline   Reply With Quote

Old   January 11, 2018, 04:46
Default
  #6
Senior Member
 
Santiago Lopez Castano
Join Date: Nov 2012
Posts: 354
Rep Power: 15
Santiago is on a distinguished road
1. Having just a high Re doesnt guarantee obtaining a turbulent field. In an error-free numerical solver, an initially laminar Poiseuille flow with Re*=1000000 will stay laminar, unless you introduce an instability.

2. Having obstacles in the flow may or may not trigger turbulence. It depends on many things. Besides, it may triggers turbulence in the wake generated by the blockage.

3. You could perfectly perturb a potential field with perturbU, if youre modelling wall bounded channels. I dont know whether extrapolating this method to any sort of flow will render useful. I remember that perturbU is an implementation of the work of Schoppa & Hussain, which provides an unstable mode for channel flows.
Santiago is offline   Reply With Quote

Old   January 11, 2018, 16:30
Default Hi,
  #7
gu1
Senior Member
 
Guilherme
Join Date: Apr 2017
Posts: 231
Rep Power: 10
gu1 is on a distinguished road
Quote:
Originally Posted by RobertHB View Post
mapFields can also be used for identical geometries. You can specify which parameters you want to copy from your RANS case to your LES case.
OR you simple copy the case and the latest timestep Can work, doesnt have to.

If you copy your case or map the final results onto a new case you do not overwrite the results from your RANS simulation.

For trial&error purposes your RANS simulations should be quick. You do not need the finest refinement or full convergence at a residual value of 1e-6 to check your setup. I'd suggest you figure out your schemes and solution settings first. If you have a stable model, make a save of your case.
If your RANS is fine, you shouldnt need to much adjustments to make your LES run. And if RANS is fine, you will only need to tweak your LES, not both.
Thanks Robert.

I've been trying to do what you mentioned, I do not know if it's ''working''. I start the field in RANS (steadyState - simpleFOAM) and later make a copy of the folder with the intention of starting the simulations in LES (pisoFOAM). That is ... the folders generated are: 100, 200 (simple), ..., 0,01; 0.02; ... (piso). I get the convergence of my model in RANS, but unfortunately I'm not getting success in LES. I've attached my file, I hope you can advise me.

pipe_internal_flow
gu1 is offline   Reply With Quote

Old   January 12, 2018, 03:37
Default
  #8
Senior Member
 
Robert
Join Date: May 2015
Location: Bremen, GER
Posts: 292
Rep Power: 12
RobertHB is on a distinguished road
Hello gu1,
i cant run your case as there is no blockMeshDict included. As such i cant run your simulation.
If you can run your RANS simulation, thats a good start.
1) Now make a new folder for your LES and copy only the 0, constant and system folder.
2) Make your changes to the turbulenceProperties, fvSolution and fvSchemes files to set up a LES simulation.
3) Inside your LES folder create a folder called 300* (*or the name of your last RANS timestep if it doesnt run to 300).
4) Find out which 0/ files (U, p, nut) are used by your RANS as well as your LES simulation.
5) Inside your LES case copy these files from 0/ to 300*/.
6) Change your start time to 300* and run mapFields to map your RANS results to your LES case.
7) Move the mapped files back to 0/
Now your RANS results are used as a starting point for your LES case.

If you still struggle with your LES simulation, please provide me with a complete, unmeshed, case. As written above, i cant do alot with single files.
RobertHB is offline   Reply With Quote

Old   January 12, 2018, 07:31
Default Thanks
  #9
gu1
Senior Member
 
Guilherme
Join Date: Apr 2017
Posts: 231
Rep Power: 10
gu1 is on a distinguished road
Quote:
Originally Posted by RobertHB View Post
Hello gu1,
i cant run your case as there is no blockMeshDict included. As such i cant run your simulation.
If you can run your RANS simulation, thats a good start.
1) Now make a new folder for your LES and copy only the 0, constant and system folder.
2) Make your changes to the turbulenceProperties, fvSolution and fvSchemes files to set up a LES simulation.
3) Inside your LES folder create a folder called 300* (*or the name of your last RANS timestep if it doesnt run to 300).
4) Find out which 0/ files (U, p, nut) are used by your RANS as well as your LES simulation.
5) Inside your LES case copy these files from 0/ to 300*/.
6) Change your start time to 300* and run mapFields to map your RANS results to your LES case.
7) Move the mapped files back to 0/
Now your RANS results are used as a starting point for your LES case.

If you still struggle with your LES simulation, please provide me with a complete, unmeshed, case. As written above, i cant do alot with single files.
Hi Robert, thank you for your patience.

My case with mesh:
CASE

I believe that based on the settings (Allrun) I created for my case, your recommendations are being made (at least I hope, if not, please ... help me), except for mapFields (whose I do not know how to do ).

I'm following some recommendations about 'dissipative terms' in fvSchenes, so I've tried using LUST. I still have not figured out if it's a good choice.
gu1 is offline   Reply With Quote

Old   January 12, 2018, 09:02
Default
  #10
Senior Member
 
Robert
Join Date: May 2015
Location: Bremen, GER
Posts: 292
Rep Power: 12
RobertHB is on a distinguished road
Hey gu1,
i started your case and i will let it run over the weekend. I'll come back to you next week.
RobertHB is offline   Reply With Quote

Old   January 12, 2018, 09:31
Default
  #11
Senior Member
 
Robert
Join Date: May 2015
Location: Bremen, GER
Posts: 292
Rep Power: 12
RobertHB is on a distinguished road
Quick feedback. Solution is converged. Copying and mapping the RANS onto the LES case wasn't a problem. LES simulation runs fine at Co = 0.24.
Residuals @ convergence:
Code:
# Time           p                Ux               Uy               Uz               k                omega       
2020             2.676000e-06    9.205660e-07    8.977710e-06    7.257140e-06    4.958210e-06    4.850250e-08
Where ist the problem??
RobertHB is offline   Reply With Quote

Old   January 12, 2018, 10:38
Default
  #12
gu1
Senior Member
 
Guilherme
Join Date: Apr 2017
Posts: 231
Rep Power: 10
gu1 is on a distinguished road
Quote:
Originally Posted by RobertHB View Post
Quick feedback. Solution is converged. Copying and mapping the RANS onto the LES case wasn't a problem. LES simulation runs fine at Co = 0.24.
Residuals @ convergence:
Code:
# Time           p                Ux               Uy               Uz               k                omega       
2020             2.676000e-06    9.205660e-07    8.977710e-06    7.257140e-06    4.958210e-06    4.850250e-08
Where ist the problem??
OMG. I did not understand anything, seriously. KKK
Were you able to converge the simulation on LES ?! HOW ?! I've been trying for weeks, believing my setup was flawed. Yesterday, using this same setup, I could not. I did not do mapFields ... but ... please teach me (if possible attach the case that converged with you) !!

Just one question, using the Smagorinsky model, the log (pisoFoam), does not display the values of 'k', 'omega' ... So I did not understand what you had attached (led me to believe you were talking about RANS ).

My RESIDUAL in LES is attached in the image.
Attached Images
File Type: png residual.png (47.7 KB, 73 views)
gu1 is offline   Reply With Quote

Old   January 12, 2018, 12:00
Default
  #13
Senior Member
 
Robert
Join Date: May 2015
Location: Bremen, GER
Posts: 292
Rep Power: 12
RobertHB is on a distinguished road
Hey gu1,
that is in fact the convergence data for the RANS simulation. The LES is running and i will post my results on Monday. But it started without problems after mapping the data from the RANS case. The code snippet is from the residual data your RANS simulation writes to the folder "postProcessing". The simulation converged to a residual value of 1e-6 after 2020 iterations.
gu1 likes this.
RobertHB is offline   Reply With Quote

Old   January 12, 2018, 12:26
Default
  #14
gu1
Senior Member
 
Guilherme
Join Date: Apr 2017
Posts: 231
Rep Power: 10
gu1 is on a distinguished road
Okay. I'll continue my attempts to understand my problem and find a solution. I look forward to your contact.
gu1 is offline   Reply With Quote

Old   January 15, 2018, 04:25
Default
  #15
Senior Member
 
Robert
Join Date: May 2015
Location: Bremen, GER
Posts: 292
Rep Power: 12
RobertHB is on a distinguished road
Hey gu1,
feedback as promised. The LES simulation finished over the weekend, and here are the (residual) results:

Certainly not perfectly converged, but i'm not even sure if that is to be expected during an transient simulation.
You can download the case file HERE. I've uploaded it to the cloud storage of my university ("seafile.zfn.uni-bremen"), as it was to large for the attachments. The upload contains the case, the postProcessing folder as well as the last timestep, 0.24 s.

/edit: Heres another explanation on how to use mapFields: How to mapFields @ cfd.online
RobertHB is offline   Reply With Quote

Old   January 16, 2018, 07:36
Default Thanks
  #16
gu1
Senior Member
 
Guilherme
Join Date: Apr 2017
Posts: 231
Rep Power: 10
gu1 is on a distinguished road
Quote:
Originally Posted by RobertHB View Post
Hey gu1,
feedback as promised. The LES simulation finished over the weekend, and here are the (residual) results:
Hi Robert,

I believe that mapFields led you to have better results than mine, in the same setup (see the image I attached in the post above - of my redisual). I'll do other tests. By the way, do you believe that there is a need for modifications in the setup? According to your experience ... your opinion would be of great help.
gu1 is offline   Reply With Quote

Old   January 16, 2018, 08:51
Default
  #17
Senior Member
 
Robert
Join Date: May 2015
Location: Bremen, GER
Posts: 292
Rep Power: 12
RobertHB is on a distinguished road
Hey Gui,
the only "modification" i made was running the RANS case with my fvSolution dictionary (s. attachments) because it provides convergence for my, more complicated, cases. And then running mapFields.
For the LES simulation i used the files you provided in the download. So, for the moment, i don't see any necessary changes you should make.
Attached Files
File Type: c fvSolution.c (2.7 KB, 52 views)
RobertHB is offline   Reply With Quote

Old   January 16, 2018, 10:04
Default OK
  #18
gu1
Senior Member
 
Guilherme
Join Date: Apr 2017
Posts: 231
Rep Power: 10
gu1 is on a distinguished road
Quote:
Originally Posted by RobertHB View Post
Hey Gui,
the only "modification" i made was running the RANS case with my fvSolution dictionary (s. attachments) because it provides convergence for my, more complicated, cases. And then running mapFields.
For the LES simulation i used the files you provided in the download. So, for the moment, i don't see any necessary changes you should make.
OK... I'll get in touch as soon as I finish some tests. About mapFields ... I just need to run it once, or whenever I make modifications to the LES files, do I need to run it again?
gu1 is offline   Reply With Quote

Old   January 16, 2018, 10:07
Default
  #19
Senior Member
 
Robert
Join Date: May 2015
Location: Bremen, GER
Posts: 292
Rep Power: 12
RobertHB is on a distinguished road
Whenever you create a new mesh, e.g. run blockMesh: yes.
For changes to e.g. turbulenceProperties, fvOptions, fvSchemes, fvSolution: no.
gu1 likes this.
RobertHB is offline   Reply With Quote

Old   January 16, 2018, 10:44
Default mapFields
  #20
gu1
Senior Member
 
Guilherme
Join Date: Apr 2017
Posts: 231
Rep Power: 10
gu1 is on a distinguished road
Quote:
Originally Posted by RobertHB View Post
Whenever you create a new mesh, e.g. run blockMesh: yes.
For changes to e.g. turbulenceProperties, fvOptions, fvSchemes, fvSolution: no.
I have one more question: According to the 'User Guide':

"First, we say that the data is mapped from the source to the target. The fields are deemed consistent if the geometry and boundary types, or conditions, of both source and target fields are identical. The field data that mapFields maps are those fields within the time directory specified by startFrom/startTime in the controlDict of the target case."

mapFields <source dir> -consisten
t

So, I would not need to use mapFieldsDict
Right?
gu1 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
Best practices for performing an analysis on a supersonic C-D nozzle in Star-CCM jonny_b STAR-CCM+ 1 August 9, 2010 11:06
Best Practices for Internal Compressible Flows jason.ryon OpenFOAM 0 June 11, 2010 11:47
CFD Practices Isaac Newton FLUENT 0 December 7, 2008 14:14
One question about the cfx 5 best practices John CFX 3 August 18, 2005 18:39
CFD best practices Dave Main CFD Forum 0 November 3, 2004 11:33


All times are GMT -4. The time now is 17:29.