|
[Sponsors] |
November 19, 2019, 15:04 |
How can I get the residual?
|
#1 |
New Member
Sicheng Sun
Join Date: Jun 2016
Posts: 9
Rep Power: 10 |
Hello everyone,
I am wondering how can I extract the residual of the solution? I found some information from Residuals for convergence of segregated solvers by using lduMatrix::solverPerformance sp = solve(... or lduMatrix::solverPerformance sp = xEqn.solve(); however, it seems not working for OpenFoam/7.0 since it was a poster 14 years ago. I tried Foam:: solverPerformance sp = xEqn.solve(); it seems to work but Foam:: solverPerformance sp = solve(...) does not work. so what's the correct function should I call? I am really appreciate for your help. |
|
November 19, 2019, 17:33 |
|
#2 |
New Member
Sicheng Sun
Join Date: Jun 2016
Posts: 9
Rep Power: 10 |
For people who meet the same problem,
I got the solution like: vector Uresidual; Uresidual = solve(UEqn == -fvc::grad(p)).initialResidual(); scalar presidual; presidual = pEqn.solve().initialResidual(); |
|
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
laplacianFoam with source term | Herwig | OpenFOAM Running, Solving & CFD | 17 | November 19, 2019 14:47 |
Segmentation fault when using reactingFOAM for Fluids | Tommy Floessner | OpenFOAM Running, Solving & CFD | 4 | April 22, 2018 13:30 |
chtMultiRegionSimpleFoam turbulent case | Aditya Patil | OpenFOAM Running, Solving & CFD | 6 | April 24, 2017 23:13 |
simpleFoam error - "Floating point exception" | mbcx4jc2 | OpenFOAM Running, Solving & CFD | 12 | August 4, 2015 03:20 |
calculation stops after few time steps | sivakumar | OpenFOAM Running, Solving & CFD | 7 | March 17, 2013 07:37 |