CFD Online Discussion Forums

CFD Online Discussion Forums (https://www.cfd-online.com/Forums/)
-   Main CFD Forum (https://www.cfd-online.com/Forums/main/)
-   -   Best way to calculate residuals (https://www.cfd-online.com/Forums/main/12024-best-way-calculate-residuals.html)

Morteza August 17, 2006 09:24

Best way to calculate residuals
 
Hi Guys,

What is the best way to calculate residuals of U, V and Pressure correction equations in SIMPLE algorithm. I have developed a Code that gives correct values but the amount of residuls for each equation in each iteration is so high! I guess that something wrong in the way for calculation of residuals. Now, my code calculates the difference between LHS and RHS of discretized equation for each grid point and the absolute values of this difference for all grid points are added to each other as the value of residual in each iteration. Thank you in adavnce for your comments and ideas.

Morteza

student August 19, 2006 23:44

Re: Best way to calculate residuals
 
Hi , my suggestion is residual= RHS - LHS let sum=sum+pow(residual,2);(i.e add all the square of the residuals for all grid points) at the end of each iteration find the squareroot.. that gives the correct solution.but urs procedure all rite. still u r getting wrong result , ur code might be wrong. all the best



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