CFD Online Discussion Forums

CFD Online Discussion Forums (https://www.cfd-online.com/Forums/)
-   Main CFD Forum (https://www.cfd-online.com/Forums/main/)
-   -   How to compute residuals in SIMPLE alghoritm (https://www.cfd-online.com/Forums/main/199745-how-compute-residuals-simple-alghoritm.html)

AliE March 14, 2018 05:54

How to compute residuals in SIMPLE alghoritm
 
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

FMDenaro March 14, 2018 06:30

Quote:

Originally Posted by AliE (Post 685139)
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

AliE March 14, 2018 06:42

Quote:

Originally Posted by FMDenaro (Post 685144)
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? :)

FMDenaro March 14, 2018 06:49

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).


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