# Residuals

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

 November 11, 2000, 03:15 Residuals #1 Rakib Guest   Posts: n/a What does convergence mean with reference to residual plotting of Velocity, Continuity and Pressure?

 November 11, 2000, 05:14 Re: Residuals #2 Chetan Kadakia Guest   Posts: n/a The residuals are the error magnitudes for equations as iterations progress. The equations include the governing equations; I.e. the Navier-Stokes momentum equations for each direction (x, y, and z if 3d, or just x and y if 2d), the continuity equation (conservation of mass), and if heat transfer is applicable, the energy equation. The equations may also include equations of the turbulence model defined under models-viscous. The residual is the difference between the previous result and the current result. As these errors are decreasing the equation results are reaching values that are changing less and less. This is what is known as convergence. That is the solutions are converging. If these errors begin to increase, the solution is then said to be diverging. Let me give a simplified example of convergence: Initial value = 2, 1st iteration value = 1.5 (residual value is equal to 2 - 1.5 = .5), 2nd iteration value = 1.2 (residual value = 1.5 - 1.2 = .3), 3rd iteration value = 1.05 (residual value = 1.2 - 1.05 = .15),... 1000th iteration value = 1.00001, and 1001th iteration value = 1.000005 (residual value = .00001 - .000005 = .000005). Perhaps the solution is converging to a value of 1. An opposite trend could be given as an example of divergence. A solution can converge and then diverge or vica versa. Does this help? Is my explanation clear and accurate? baineteo, faw, rgd and 1 others like this.

 November 11, 2000, 06:30 Re: Residuals #3 Rakib Guest   Posts: n/a Thanks.

 November 11, 2000, 10:53 Re: Residuals #4 Patchawat Guest   Posts: n/a HELLO CHETAN, SO..IF THE RESIDUAL PLOT LINE IS CONSTANT(SLOPE=0,NOT DECREASING(CONVERGING),NOT INCREASING(DIVERGING)),WHAT DOES IT MEAN? SORRY THAT I AM NOT CLEAR ABOUT THIS STUFF. DOES IT MEAN THAT THE ITERATION ARE STILL ON THE WAY BUT NOT CLOSE YET TO THE SOLUTION? THANK YOU, PATCHAWAT

 November 11, 2000, 14:12 Re: Residuals #5 Petr Guest   Posts: n/a Hello Patchawat, I think that the problem is in fact that you see summed "pointwise" residual for each equation you are solving. That means, that even low residual cannot quarantee small changes of solution everywhere. There could be regions with well settled solution, but also regions with quite considerable changes between iterations even with almost constant residual (the locations of such "problem" regions could change during the solution process). Moreover, when you solve sequentially more than one equation, you have changing coefficients which could also complicate the situation. It would be useful to see also the maximum "pointwise" residual for each equation beeing solved. Petr

 November 11, 2000, 14:38 Thank you #6 Patchawat Guest   Posts: n/a

 November 11, 2000, 19:19 Re: Residuals #8 Chetan Kadakia Guest   Posts: n/a Petr, Your idea of seeing the maximum pointwise residual makes sense if I understand it correctly. I'm guessing each equation solves for several values, each with its own residual. Instead of looking at the average residual for each equation, we should look a the maximum reisdual. Do I understand this correctly? The term "pointwise residual" is new to me. If I am incorrect please correct me. If I am correct, please tell me how to change my view to that of the maximum pointwise residual. Thanks, Chetan K.

 November 12, 2000, 03:36 Re: Residuals #9 Petr Guest   Posts: n/a Chetan, I used the term "pointwise residual" in order to distinguish the quantity that FLUENT produces from contributions of the individual computational cells (which are the "pointwise residuals" as I termed it). Both quantities are useful in my opinion, and the possibility to see also the maximum of the cell residuals (this is maybe a better term) could eliminate one possible source of user effects. In the present situation, when you have satisfactory low and slowly varying residuals, you nevertheless should check the places, where your solution still changes considerably. To find such place is not easy: you must select the variable you should check, judge which should be the right values at various places, etc. If you know beforehand that eg. turbulence energy still has high residual somewhere, you can concentrate yourself to this quantity. Of course, this only ensures that you have converged solution, but from this situation it is easier to check physical correctness of your solution. Regards. Petr

 November 14, 2000, 09:26 Re: Residuals #10 Patchawat Guest   Posts: n/a Thank Chetan, You and Petr seem to be helpful to me. Now I am facing the divergence problem when I try to do simulation of 2-phase(solid-water) stirred tank without baffle.....the divergence happen all the time eventhough I set the very small time step and quite low underrelaxation. I have to take time to check what's wrong with my model's parameters,etc...(i use mixsim and fluent4.5) During this time,soon, I will post my problem again in this discussion forum....please check it and take a look if you can suggest me anything or not. Thanks

 November 17, 2000, 02:46 Re: Residuals #11 Max Guest   Posts: n/a i'm doing the simulation on 2 phase(water & air) flow in a horizontal pipe.if my residual graph is going up(diverge),is that means i'm wrong?why my residual graph finally become constant but not zero?doesn't it in steady state,the velocity & pressure should converge to a constant value(residual value=0)? an additional question is the k-epsilon model can be used for steady state? Max

 November 17, 2000, 08:59 Re: Residuals #12 Patchawat Guest   Posts: n/a Hi Max, I also am having the same problem as you. I am simulating the system of "2D","one phase",no baffle, stirred tank. At first I though that the solution will converge easily but,in fact, I have the problem that all equation's residual plot have been narrowly oscillating forever(i mean very large number of iteration).....they oscillate in the range of about 1e-3 to 1e-4 except for pressure that oscillate in the range of 0 to 1e-1. I try to reduce underelaxation on pressure,increse its no. of sweep to 20,or turn on multigrid, but nothing improve. Regarding k-epsilon model....i am not sure about this but I think it can.....why not? So..let wait for the other to answer us for more accuate information.

 November 17, 2000, 10:39 Re: Residuals #13 Max Guest   Posts: n/a hi,Patchawat,my residual plot also shows narrowly oscillating forever during the very large number of iteration(500). my doubt is why the residual value is not converge to zero?(residual value=iteration 1- iteration 2,e.g. iteration 1-iteration 2=0.0001,iteration 2-iteration 3=0.00001, iteration 3-iteration 4=0.000001, iteration 4-iteration 5=0.0000001,.........iteration n-iteration n+1=0.000000........1=0(because the velocity value & pressure is converge to a constant value)). k-epsilon is only used for turbulent model.

 December 16, 2000, 02:32 Re: Residuals #14 Dan Williams Guest   Posts: n/a Hmm, funny how peoples understanding of residuals seem to be totally incorrect. Like many other CFD codes, Fluent uses a finite volume discretisation. For each finite volume a "control volume" or finite volume equation is assembled in the form: App*PHI + SUM(Anb*PHInb) = Residual So, when trying to converge to a steady state solution the residual is the amount by which the a local finite volume is out of balance. i.e., flow of stuff in - flow of stuff out = residual. When some of the people in this thread say look at the pointwise maximum residual they are simply asking "Which finite volume is most out of balance?". There are two things that the various codes do differently: 1) Normalise the local residuals. 2) Use a global RMS or Maximum residual to determine convergence. I'm not sure what exactly Fluent does, but on many problems, with a proper residual normalisation you should be able to obtain near round-off convergence given enough iterations (1.0E-7 RMS in single precision). The RMS value is simply the RMS average of all the residuals on the right hand side of your equations. Dan.

 December 18, 2000, 10:09 Re: Residuals #15 Petr Guest   Posts: n/a Hi Dan, you are of course right that I ask "which CV is most out of balance" in situation, when the residuals produced by FLUENT (which are sums, either unscaled or scaled or normalized, of residuals of the individual CVs over all control volumes) demonstrate a problem. Even when these "global" residuals are quite low, there could be regions with out-of-balance control volumes and I would like to know, where they are. The developers of FLUENT are aware of such difficulties, judging from the number of pages in User's Guide devoted to monitoring and judging convergence. Best regards Petr

 December 19, 2000, 00:35 Re: Residuals #16 Dan Williams Guest   Posts: n/a Seems to me that you just output the residuals and plot them in the post-processor? Can you do this with Fluent? Dan.

 December 19, 2000, 05:31 Re: Residuals #17 Petr Guest   Posts: n/a Dan, I can see the summed ("global") residuals during calculation or plot them in post-processing. When using coupled solver, the residuals are in fact changes in the variables between the current and previous iterations. When using the segregated solver, the residuals are the summed imbalances of the individual control volumes, as we have discussed. As to the value for an individual control volume, I can see in post-processing only mass imbalance as a histogram plot. I would like to have something similar to the tool for check of grid available in the GAMBIT (a preprocessor for FLUENT)where I can go through the solution domain eg. with a moving plane and see some parameters of the individual cells displayed in colours according to the ranges of their values. Petr

 December 20, 2000, 01:37 Re: Residuals #18 Dan Williams Guest   Posts: n/a What you mention about the residuals for the coupled solver seems odd. I'd be suprised if that were the case. A finite volume discretisation is what it is and a residual for a control volume is how much that control volume is out of balance, that's it. If Fluent is defining the residuals as the change in solution variables between iterations then this has nothing to do with the conservation balance, and in fact is a poor technique for defining a residual. This does not instill confidence, for me, in their coupled solver if they are using this approach. Another good example, mentioned elsewhere on this discussion group, is that they have to put all these damn Multigrid controls into their GUI because they can't figure out how to use the thing properly. Who cares how many smoother sweeps a you need on the coarse grid levels and so on. What exactly do you mean by a histogram plot of mass imbalance. What does this tell you. Surely the only numbers that matter are 1) The global conservation balance (which is what you mention you can get) and 2) Localised imbalances, or maximum residuals, that are large. If you can deal with a small localised regions of imbalance, then your solution is likely going to be fine if you've met a decent global conservation target. This is problem dependent of course. I'm very suprised that you cannot write the residuals out for post-processing. This can be very useful for diagnosing convergence problems. Later, Dan.

 December 20, 2000, 04:33 Re: Residuals #19 Petr Guest   Posts: n/a Dan, as to the definition of residuals for the coupled solver, I only cited the User's Guide, but it is possible that I misundersood it (I do not thnk so). I have used only the segregated solver so far. The plot of mass imbalance gives me information how much cells from the total number of cells have mass imbalance in a defined range. I wrote, that I can plot the (global)residuals in post-processing. That means, that they are written in the data file. Sorry that I did not mention it explicitly. Petr

 January 19, 2001, 16:57 Re: Residuals #20 cfd Guest   Posts: n/a

 Thread Tools Display Modes Linear Mode

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

 Similar Threads Thread Thread Starter Forum Replies Last Post wolle1982 OpenFOAM Running, Solving & CFD 112 June 3, 2015 07:50 franzdrs FLUENT 5 March 21, 2013 04:59 Scott CFX 5 December 15, 2008 18:10 HS FLUENT 1 November 7, 2005 06:45 Karl CFX 2 June 24, 2003 23:13

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