|
[Sponsors] |
![]() |
![]() |
#1 |
Member
Join Date: Sep 2011
Posts: 45
Rep Power: 14 ![]() |
Hi all,
Does anybody know how the residuals displayed when running simpleFoam are calculated in OpenFoam 1.7.1 ? I can't find any precise info on this ... I'm solving a problem where the pressure should converge to 0, but I'm wondering if the solver normalises the residuals by some factor like the mean pressure for example, if this is the case, it would explain why I obtain quite high residuals. Thank you |
|
![]() |
![]() |
![]() |
![]() |
#2 |
Member
Join Date: Sep 2011
Posts: 45
Rep Power: 14 ![]() |
Nobody knows how exactly they are calculated ??
|
|
![]() |
![]() |
![]() |
![]() |
#3 |
Senior Member
Paulo Vatavuk
Join Date: Mar 2009
Location: Campinas, Brasil
Posts: 200
Rep Power: 18 ![]() |
Hi ic3wall,
There is an old thread that has the information you want: http://www.cfd-online.com/Forums/ope...d-solvers.html I hope this helps |
|
![]() |
![]() |
![]() |
![]() |
#4 |
Member
Join Date: Sep 2011
Posts: 45
Rep Power: 14 ![]() |
Cool, thank you very much, exactly what I was looking for!
|
|
![]() |
![]() |
![]() |
![]() |
#5 |
Member
Join Date: Sep 2011
Posts: 45
Rep Power: 14 ![]() |
Sorry to bring back this thread up but I think it's an interesting topic that many could benefit from...
---------------------------------------------------------- According to hjasak, residuals are calculated as follow: For matrix A x = b, residual is defined as res = b - Ax We then apply residual scaling with the following normalisation factor procedure: Type xRef = gAverage(x); wA = A x; pA = A xRef; normFactor = gSum(cmptMag(wA - pA) + cmptMag(source - pA)) + matrix.small_; and the scaled residual is: residual = gSum(cmptMag(source - wA))/normFactor; ------------------------------------------------------------------- My situation: I'm modeling an atmospheric boundary layer over a flat terrain using k-eps RANS. The flow is driven by a shear stress applied at the top boundary. I set the pressure to 0 at one point in my domain and apply zeroGradient at every boundary. The velocity components (V & W) perpendicular to the flow should be zero (coriolis is ignored) as well as the pressure. My problem is that residuals for V,W and P won't go down (please see attached images). I'm suspecting that the normFactor is responsible for that. What happen to the normFactor when wA, pA and source approaches 0, normFactor also approaches 0 ? The consequence is high residuals ... In my case, the results agree with the analytical solutions, but accoding to residuals convergence is not reached. In the pictures attached, you'll find the standard residuals calculated by OpenFoam, the residuals multiplied by the normFactor which are "absolute residuals" and finally the normFactor alone. Everything is plotted versus iterations. According to "absolute residuals", I'm very close to the solution. I'd like to have opinions of others on that ? |
|
![]() |
![]() |
![]() |
![]() |
#6 |
Member
Ben 017
Join Date: Nov 2017
Posts: 70
Rep Power: 8 ![]() |
Hello ic3wall,
Did you find the answer to that? May you help to know what is happening on this simulation(attache plot of residuals). Is there a way i can calculate the average of residuals so that i can plot residuals in a good way. Thank you! |
|
![]() |
![]() |
![]() |
![]() |
#7 |
New Member
He Shang
Join Date: Nov 2023
Posts: 6
Rep Power: 2 ![]() |
I have met a similar problem. The residuals of p can not continue to decrease at an order of 2e-2. So I installed the v-2312 version of OpenFOAM, it can give the residuals filed of U and p. By looking the residuals field of p, the real value is really small, the maximum value is about 5e-5 and absolute average value is about 3.3e-8. So I am very confused why the OpenFOAM normalized the residuals....
![]() |
|
![]() |
![]() |
![]() |
|
|
![]() |
||||
Thread | Thread Starter | Forum | Replies | Last Post |
[Tutorials] Tutorial of how to plot residuals ! | wolle1982 | OpenFOAM Community Contributions | 171 | February 20, 2024 02:55 |
MRF and Heat transfer calculation | Susan YU | FLUENT | 0 | June 2, 2010 08:46 |
Need Help Understanding RMS residual calculation | TWaung | CFX | 1 | September 22, 2009 18:21 |
Convergence - scaled vs unscaled residuals | HS | FLUENT | 1 | November 7, 2005 05:45 |
Warning 097- | AB | Siemens | 6 | November 15, 2004 04:41 |