CFD Online Logo CFD Online URL
www.cfd-online.com
[Sponsors]
Home > Forums > Software User Forums > ANSYS > CFX

Initial Condition Dependence of Residuals

Register Blogs Community New Posts Updated Threads Search

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   July 16, 2014, 16:09
Default Initial Condition Dependence of Residuals
  #1
Member
 
Join Date: Jan 2012
Location: Edmonton, CA
Posts: 87
Rep Power: 14
Torque_Converter is on a distinguished road
Send a message via AIM to Torque_Converter
I have seen in many codes documentation that the orders of magnitude of residual drop depends on how close the initial condition is to the final answer. A 5 order of magnitude drop may not even be possible if the initial guess is practically at the solution somehow.

However, CFX documentation says that due to their residual normalization scheme the residual drop is initial guess independent. That seems to indicate that no matter how good your initial guess is you should expect the same order of magnitude drop. Is this true/possible? Is this due to normalization based on the initial guess values somehow so that even if u-momentum only needs to change by 0.00001 kg*m/s because of a good initial guess it will still show it has dropped by 5+ orders of magnitude when finally converged (quickly converged I imagine being that close to the final answer).
Torque_Converter is offline   Reply With Quote

Old   July 16, 2014, 17:10
Default
  #2
Senior Member
 
Join Date: Jun 2009
Posts: 1,804
Rep Power: 32
Opaque will become famous soon enough
Residuals drop does not say anything about convergence besides that the iterations are going in the right direction, i.e. it is not diverging.

For example, if you start from the exact solution, the residual drop would be 0 (or undefined) since the residual is already 0.
Opaque is offline   Reply With Quote

Old   July 16, 2014, 18:01
Default
  #3
Member
 
Join Date: Jan 2012
Location: Edmonton, CA
Posts: 87
Rep Power: 14
Torque_Converter is on a distinguished road
Send a message via AIM to Torque_Converter
Yes, I understand the definition and function of residuals academically as well as professionally. Documentation on other codes I have worked with (Numeca, Star-CCM+) make it clear that the residuals are initial guess sensitive. This only makes sense. How can an answer change by much if it is already incredibly close to the starting point?

However, CFX documentation states that the "residuals are initial guess independent". That would lead me to believe somehow, via some normalization, that no matter how close your initial is to the answer it will expect a big residual drop. Perhaps through division of the values by the initial, resulting in an artificially big number? I don't know, they don't detail all of their normalization methods, simply have that odd statement.

I am curious to know because many solutions drop to deep residual levels (below 1e-6 RMS) while some others, which have acceptable monitor point convergence only drop to 1e-4 RMS. I know the monitor points, and often imbalances are more important, however, it is something that confuses me about residuals in CFX.
Torque_Converter is offline   Reply With Quote

Old   July 17, 2014, 16:52
Default
  #4
Senior Member
 
Join Date: Jun 2009
Posts: 1,804
Rep Power: 32
Opaque will become famous soon enough
The residual normalization procedure is explained in the ANSYS CFX documentation

Chapter 11: Discretization and Solution Theory | 11.2. Solution Strategy - The Coupled Solver

Quote:
11.2.3. Residual Normalization Procedure

As described above, the raw residual, [r], is calculated as the imbalance in the linearized system of discrete equations. The raw residuals are then normalized for the purpose of solution monitoring and to obtain a convergence criteria. An overview of the normalization procedure is given below.

For each solution variable, , the normalized residual is given in general by:


(11–53)

where is the raw residual control volume imbalance, ap is representative of the control volume coefficient, and is a representative range of the variable in the domain. The exact calculation of ap and is not simple and is not presented here. However, some important notes are:

The normalized residuals are independent of the initial guess.

ap is the central coefficient of the discretized control volume equation and therefore includes relevant advection, diffusion, source linearization, and other terms.

For steady-state simulations, the time step is used only to underrelax the equations and is therefore excluded from the normalization procedure. This ensures that the normalized residuals are independent of the time step. The transient term is included in ap for transient simulations.

For multiphase, if equations are coupled through an interphase transfer process (such as interphase drag or heat transfer), the residuals are normalized by the bulk ap.
Unfortunately, the equation did not cut/paste properly.. But, you should be able to find it in the proper section..

Hope the above helps,
Opaque is offline   Reply With Quote

Old   July 17, 2014, 20:17
Default
  #5
Member
 
Join Date: Jan 2012
Location: Edmonton, CA
Posts: 87
Rep Power: 14
Torque_Converter is on a distinguished road
Send a message via AIM to Torque_Converter
That is the section I found as well. What I meant by not being fully explained is that while you learn the basic normalization procedure (which makes sense) you do not learn what the cell coefficient happens to be, for example.

But more importantly is the line "The normalized residuals are independent of the initial guess."

I may be missing something, I admit, but the other codes I have worked with said normalization was dependent on initial guess, meaning if the initial guess is good the residuals may not change much, so the best way to judge convergence is via monitor points of critical characteristics. Here appears to say the opposite, and via some proprietary item in the normalization variables the residuals should drop to some absolute point to be considered converged. I.e. 1e-5 or so.
Torque_Converter is offline   Reply With Quote

Old   July 18, 2014, 06:10
Default
  #6
Super Moderator
 
Glenn Horrocks
Join Date: Mar 2009
Location: Sydney, Australia
Posts: 17,703
Rep Power: 143
ghorrocks is just really niceghorrocks is just really niceghorrocks is just really niceghorrocks is just really nice
Yes, the exact details of the residuals calculation are propriety and are not disclosed (unfortunately). A better way of looking at the residuals is that for most steady state simulations residuals = 1e-4 means approximate convergence, 1e-5 means convergence good enough for most design purposes and 1e-6 means very tight convergence. This is what it means initial conditions independence (and independence from just about everything else too, actually).
ghorrocks 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
Floating point exception error Alan OpenFOAM Running, Solving & CFD 11 July 1, 2021 21:51
How to write k and epsilon before the abnormal end xiuying OpenFOAM Running, Solving & CFD 8 August 27, 2013 15:33
Extremely slow simulation with interDyMFoam jrrygg OpenFOAM Running, Solving & CFD 9 April 23, 2013 10:14
pisoFoam with k-epsilon turb blows up - Some questions Heroic OpenFOAM Running, Solving & CFD 26 December 17, 2012 03:34
Problems with simulating TurbFOAM barath.ezhilan OpenFOAM 13 July 16, 2009 05:55


All times are GMT -4. The time now is 00:49.