CFD Online Logo CFD Online URL
www.cfd-online.com
[Sponsors]
Home > Forums > General Forums > Main CFD Forum

How to compute residuals in SIMPLE alghoritm

Register Blogs Community New Posts Updated Threads Search

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   March 14, 2018, 05:54
Default How to compute residuals in SIMPLE alghoritm
  #1
Senior Member
 
Join Date: Dec 2017
Posts: 153
Rep Power: 8
AliE is on a distinguished road
Dear All,

I am implementing the SIMPLE alghoritm and I have a couple of questions about the calculation of residuals:

1) The residual is usually computed as the L-2 norm of the vector (Ax-b), where A is the momentum matrix for the ith velocity component, b is the rhs and x is the ith component of velocity vector computed at the previous iteration. A and b are the updated matrix and rhs at the current iteration. Is that right?

2) How do you scale the residuals?

Thank you for the help,

AliE
AliE is offline   Reply With Quote

Old   March 14, 2018, 06:30
Default
  #2
Senior Member
 
Filippo Maria Denaro
Join Date: Jul 2010
Posts: 6,773
Rep Power: 71
FMDenaro has a spectacular aura aboutFMDenaro has a spectacular aura aboutFMDenaro has a spectacular aura about
Quote:
Originally Posted by AliE View Post
Dear All,

I am implementing the SIMPLE alghoritm and I have a couple of questions about the calculation of residuals:

1) The residual is usually computed as the L-2 norm of the vector (Ax-b), where A is the momentum matrix for the ith velocity component, b is the rhs and x is the ith component of velocity vector computed at the previous iteration. A and b are the updated matrix and rhs at the current iteration. Is that right?

2) How do you scale the residuals?

Thank you for the help,

AliE

To define exactly the residual you should consider all components at that same iteration

r_k =(A.x)_k - b_k


Scaling is general done using the residual at the guess iteration k=0
FMDenaro is offline   Reply With Quote

Old   March 14, 2018, 06:42
Default
  #3
Senior Member
 
Join Date: Dec 2017
Posts: 153
Rep Power: 8
AliE is on a distinguished road
Quote:
Originally Posted by FMDenaro View Post
To define exactly the residual you should consider all components at that same iteration

r_k =(A.x)_k - b_k


Scaling is general done using the residual at the guess iteration k=0
Hello Filippo,

Yes, I have just realized that we are talking about the same thing. So the first point is ok.

Using the first value of the residual as reference is good, but I have seen around that people uses also aC*vel, where the aC is the diagonal coef. related to the ith equation and vel the corresponding velocity component... So which one select?
AliE is offline   Reply With Quote

Old   March 14, 2018, 06:49
Default
  #4
Senior Member
 
Filippo Maria Denaro
Join Date: Jul 2010
Posts: 6,773
Rep Power: 71
FMDenaro has a spectacular aura aboutFMDenaro has a spectacular aura aboutFMDenaro has a spectacular aura about
From a theoretical point of view, I prefer to scale the residual using a homogeneous quantity, that is the residual at the zero-th iteration...

However, if the original problem is correctly scaled by a proper non-dimensionalization, I think that there is no need to scale the residual. I mean that the norm of the residual (that we can practically compute) is comparable to the norm of the error (that we cannot compute) if the matrix is well-conditionated, that is a spectral norm ||A||=O(1).
FMDenaro 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
[Tutorials] Tutorial of how to plot residuals ! wolle1982 OpenFOAM Community Contributions 171 February 20, 2024 02:55
under-relaxation factors -> level of residuals Zigainer FLUENT 19 July 21, 2017 16:53
Strange residuals of the Density Based Solver Pat84 FLUENT 0 October 22, 2012 15:59
Convergence - scaled vs unscaled residuals HS FLUENT 1 November 7, 2005 05:45
residuals Karl CFX 2 June 24, 2003 23:13


All times are GMT -4. The time now is 21:06.