CFD Online Discussion Forums

CFD Online Discussion Forums (http://www.cfd-online.com/Forums/)
-   OpenFOAM Running, Solving & CFD (http://www.cfd-online.com/Forums/openfoam-solving/)
-   -   OpenFOAM Residuals - LES Convergence (http://www.cfd-online.com/Forums/openfoam-solving/111687-openfoam-residuals-les-convergence.html)

atmcfd January 13, 2013 04:47

OpenFOAM Residuals - LES Convergence
 
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.

http://dl.dropbox.com/u/37012034/Residuals.png

Any help would be appreciated!

Thanks.

Lieven January 13, 2013 16:55

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

atmcfd March 18, 2013 22:19

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.

Lieven March 19, 2013 03:21

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

atmcfd March 19, 2013 03:30

Lol Lieven, yes. I was just stating that I observed what you said - I am a newcomer to LES :).

prezza May 15, 2014 11:33

Quote:

Originally Posted by Lieven (Post 414878)
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

aylalisa May 22, 2014 07:28

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

prezza May 22, 2014 07:35

Quote:

Originally Posted by aylalisa (Post 493564)
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?

Lieven May 22, 2014 07:41

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

aylalisa May 22, 2014 10:00

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


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