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

OpenFOAM Residuals - LES Convergence

Register Blogs Members List Search Today's Posts Mark Forums Read

Like Tree1Likes
  • 1 Post By atmcfd

Reply
 
LinkBack Thread Tools Display Modes
Old   January 13, 2013, 04:47
Default OpenFOAM Residuals - LES Convergence
  #1
Senior Member
 
atmcfd's Avatar
 
ATM
Join Date: May 2009
Location: United States
Posts: 104
Rep Power: 8
atmcfd is on a distinguished road
Hi all,

I am doing an LES of channel flow on a very coarse grid ( with perturbU utility) , and I am plotting Residuals using the gnuplot script provided in one of the threads in the forum earlier.

I am not sure how exactly to monitor convergence in an LES, when the flow is transiently trying to develop into a fully turbulent flow. My understanding is Residual = Change in solution from one time step to the next, on a given point (cell). Since the nature of turbulence is the flow parameters rapidly changing, Is the residual a good indicator? what should I ideally monitor in OpenFOAM to see if a fully developed Turbulence ( or even close enough) has been achieved?

I'v read that fully developed turbulence can be statistically stationary.... And hence I guess this definition of Residual can be erroneous. Is it so?

Currently, in my simulation the residuals X,Y,Z velocities are below 10^-3, but steadily climbing. Please see image - I do not know why this happening, is it a case setup error or just that its not a good indicator of the turbulence in the flow.



Any help would be appreciated!

Thanks.

Last edited by atmcfd; January 13, 2013 at 04:50. Reason: Added picture
atmcfd is offline   Reply With Quote

Old   January 13, 2013, 16:55
Default
  #2
Senior Member
 
Lieven
Join Date: Dec 2011
Location: Mol, Belgium
Posts: 295
Rep Power: 13
Lieven will become famous soon enough
Hi atmcfd

The (initial) residuals are not a good indicator for the convergence for LES simulations because of the unsteadiness of the flow.
Instead, you should monitor a certain parameter which characterizes your flow situation etc. drag coefficient, total kinetic energy, mean frictional velocity etc...

Kind regards,

L
Lieven is offline   Reply With Quote

Old   March 18, 2013, 22:19
Default
  #3
Senior Member
 
atmcfd's Avatar
 
ATM
Join Date: May 2009
Location: United States
Posts: 104
Rep Power: 8
atmcfd is on a distinguished road
Thanks Lieven ! I discovered that most LES give flat or oscillating - flat residuals if done right...So its not a very good parameter to observe.
atmcfd is offline   Reply With Quote

Old   March 19, 2013, 03:21
Default
  #4
Senior Member
 
Lieven
Join Date: Dec 2011
Location: Mol, Belgium
Posts: 295
Rep Power: 13
Lieven will become famous soon enough
Isn't that exactly what I said in my previous post
Quote:
The (initial) residuals are not a good indicator for the convergence for LES simulations because of the unsteadiness of the flow
A common way to assess convergence with LES is to monitor the resolved kinetic energy in the field (= sum(U & U)). I don't know if it is the case for all types of simulations, but for plenty this parameter will converge to a steady value.

Cheers,


Lieven
Lieven is offline   Reply With Quote

Old   March 19, 2013, 03:30
Default
  #5
Senior Member
 
atmcfd's Avatar
 
ATM
Join Date: May 2009
Location: United States
Posts: 104
Rep Power: 8
atmcfd is on a distinguished road
Lol Lieven, yes. I was just stating that I observed what you said - I am a newcomer to LES .
Lieven likes this.
atmcfd is offline   Reply With Quote

Old   May 15, 2014, 11:33
Default
  #6
New Member
 
Rhys Hunter
Join Date: Jul 2012
Posts: 12
Rep Power: 5
prezza is on a distinguished road
Quote:
Originally Posted by Lieven View Post
Isn't that exactly what I said in my previous post

A common way to assess convergence with LES is to monitor the resolved kinetic energy in the field (= sum(U & U)). I don't know if it is the case for all types of simulations, but for plenty this parameter will converge to a steady value.

Cheers,


Lieven
Dear Lieven,

I cannot understand what you meant by "field (= sum(U & U))". Would you please help me with the implementation. Should it be added as a fieldaverage in controlDict? If so how? If not what should a gnuplot script contain for monitoring TKE. Thanks
prezza is offline   Reply With Quote

Old   May 22, 2014, 07:28
Default
  #7
Senior Member
 
Join Date: Nov 2012
Location: Bavaria
Posts: 144
Rep Power: 4
aylalisa is on a distinguished road
Dear prezza, Dear Lieven,

why is in the formula for computation of kinetic energy factor 1/2 missing???
Quote:
"field (= sum(U & U))"
Where could I do best field operations like computation of TKE after the run has converged if I did not create a function object to do that operation during runtime?

I can't use sum() with foamCalc. Is there another option in OF beside foamCalc and paraview where I can directly use functions like sum() ?


Aylalisa
aylalisa is offline   Reply With Quote

Old   May 22, 2014, 07:35
Default
  #8
New Member
 
Rhys Hunter
Join Date: Jul 2012
Posts: 12
Rep Power: 5
prezza is on a distinguished road
Quote:
Originally Posted by aylalisa View Post
Dear prezza, Dear Lieven,

why is in the formula for computation of kinetic energy factor 1/2 missing??? Where could I do best field operations like computation of TKE after the run has converged if I did not create a function object to do that operation during runtime?

I can't use sum() with foamCalc. Is there another option in OF beside foamCalc and paraview where I can directly use functions like sum() ?


Aylalisa
Regarding your first question:
Because it is only meant to be used as a convergence monitor, so a constant factor won't change the behaviour.

Whenever I don't include something as a funcitonobject, I do calculations in Paraview. Can't you use foamCalc and perform averaging on k? Instead of averaged velocity field?
prezza is offline   Reply With Quote

Old   May 22, 2014, 07:41
Default
  #9
Senior Member
 
Lieven
Join Date: Dec 2011
Location: Mol, Belgium
Posts: 295
Rep Power: 13
Lieven will become famous soon enough
Hi aylalisa,

I didn't add the factor 1/2 simply because it doesn't matter for the purpose you use it here. Ek is simply computed to check if it already converged to a constant value or not. Whether this value is Ek or 2*Ek does not change anything. So feel free to add it if you like...

Regarding the field operations, you have plenty of options if you ask me. I don't really know why you would not like to use foamCalc or paraview (both valid options if you ask me) but nothing stops you from writing your own tool for it, add it as a coded function object in the controlDict, use Python (i.e. pyFoam) for it, ...

Cheers,

Lieven
Lieven is offline   Reply With Quote

Old   May 22, 2014, 10:00
Default
  #10
Senior Member
 
Join Date: Nov 2012
Location: Bavaria
Posts: 144
Rep Power: 4
aylalisa is on a distinguished road
Hi Lieven and prezza,

thank you very much for fast and informative reply!

foamCalc offers these operations:
addSubtract
components
div
interpolate
mag
magGrad
magSqr
randomise

I used foamCalc magSqr U to compute k=\sqrt{u_1^2 + u_2^2 + u_3^2}^2. But if I would like to add a factor like 0.5 or if I would like to use sum() I think I can't do that with foamCalc.

In paraview I can compute K=0.5*(mag(U)^2) but sum() neither.

Therefore I thought I have to either create a function object or, in case computation has already finished, I must create a utility (then I could use functions like sum()). Is that right?

Is there (beside PyFoam) any other option?

Aylalisa

Last edited by aylalisa; May 23, 2014 at 11:10.
aylalisa is offline   Reply With Quote

Reply

Thread Tools
Display Modes

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 On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
New OpenFOAM Forum Structure jola OpenFOAM 2 October 19, 2011 06:55
Cross-compiling OpenFOAM 1.7.0 on Linux for Windows 32 and 64bits with Mingw-w64 wyldckat OpenFOAM Announcements from Other Sources 3 September 8, 2010 06:25
Serious bug in LES interface fs82 OpenFOAM Bugs 21 November 16, 2009 09:15
Modified OpenFOAM Forum Structure and New Mailing-List pete Site News & Announcements 0 June 29, 2009 05:56
Convergence of CFX field in FSI analysis nasdak CFX 2 June 29, 2009 01:17


All times are GMT -4. The time now is 09:23.