CFD Online Logo CFD Online URL
www.cfd-online.com
[Sponsors]
Home > Forums > Software User Forums > OpenFOAM > OpenFOAM Running, Solving & CFD

p_rgh residuals

Register Blogs Community New Posts Updated Threads Search

Like Tree4Likes
  • 2 Post By mm66
  • 2 Post By mm66

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   November 7, 2013, 10:01
Default p_rgh residuals
  #1
fee
New Member
 
Join Date: Aug 2013
Posts: 1
Rep Power: 0
fee is on a distinguished road
Hi,
I have a problem with compressibleInterFoam (probably also with the other solvers).
In my case I have a rectangular mesh and set all fields to fixedValue (U to zero, p_rgh to 1e5, alpha to 1) on the boundary (same as internal value), such that actually each solver has nothing to do. However the output looks like

MULES: Solving for alpha1
Liquid phase volume fraction = 1 Min(alpha1) = 1 Min(alpha2) = 0
diagonal: Solving for rho, Initial residual = 0, Final residual = 0, No Iterations 0
DILUPBiCG: Solving for T, Initial residual = 0.2561283, Final residual = 6.2762823e-15, No Iterations 1
GAMG: Solving for p_rgh, Initial residual = 0.61205684, Final residual = 0.64939008, No Iterations 1000
max(U) 1.6479872e-15
min(p_rgh) 100000
GAMGPCG: Solving for p_rgh, Initial residual = 0.48389343, Final residual = 1.2801586e-08, No Iterations 7
max(U) 2.6078623e-15
min(p_rgh) 100000
ExecutionTime = 1.97 s ClockTime = 2 s


If I look into the solution for each time step, the values actually do not change.
Except for the velocity, which looks like random noise with amplitude of 1e-13.
When I change the solver from

p_rgh
{
solver GAMG;
tolerance 1e-07;
relTol 0;
smoother DIC;
nPreSweeps 0;
nPostSweeps 2;
nFinestSweeps 2;
cacheAgglomeration true;
nCellsInCoarsestLevel 10;
agglomerator faceAreaPair;
mergeLevels 1;
}

to

p_rgh
{
solver PCG;
preconditioner
{
preconditioner GAMG;
tolerance 1e-07;
relTol 0;
nVcycles 2;
smoother DICGaussSeidel;
nPreSweeps 2;
nPostSweeps 2;
nFinestSweeps 2;
cacheAgglomeration true;
nCellsInCoarsestLevel 10;
agglomerator faceAreaPair;
mergeLevels 1;
}
tolerance 1e-07;
relTol 0;
maxIter 20;
}

i get now

MULES: Solving for alpha1
Liquid phase volume fraction = 1 Min(alpha1) = 1 Min(alpha2) = 0
diagonal: Solving for rho, Initial residual = 0, Final residual = 0, No Iterations 0
DILUPBiCG: Solving for T, Initial residual = 0.2561283, Final residual = 6.2762823e-15, No Iterations 1
GAMGPCG: Solving for p_rgh, Initial residual = 0.61205684, Final residual = 8.4709971e-08, No Iterations 5
max(U) 1.8399522e-15
min(p_rgh) 100000
GAMGPCG: Solving for p_rgh, Initial residual = 0.48273501, Final residual = 1.2982136e-08, No Iterations 7
max(U) 2.4301619e-15
min(p_rgh) 100000
ExecutionTime = 0.34 s ClockTime = 0 s

Does anybody know why the "Initial residual" is always so large and why are so many iterations are required to basically do nothing?
How are residuals computed and how to avoid this behavior?
fee is offline   Reply With Quote

Old   September 10, 2019, 13:46
Default
  #2
Member
 
Join Date: Mar 2019
Posts: 81
Rep Power: 7
mm66 is on a distinguished road
Quote:
Originally Posted by fee View Post
Hi,
I have a problem with compressibleInterFoam (probably also with the other solvers).
In my case I have a rectangular mesh and set all fields to fixedValue (U to zero, p_rgh to 1e5, alpha to 1) on the boundary (same as internal value), such that actually each solver has nothing to do. However the output looks like

MULES: Solving for alpha1
Liquid phase volume fraction = 1 Min(alpha1) = 1 Min(alpha2) = 0
diagonal: Solving for rho, Initial residual = 0, Final residual = 0, No Iterations 0
DILUPBiCG: Solving for T, Initial residual = 0.2561283, Final residual = 6.2762823e-15, No Iterations 1
GAMG: Solving for p_rgh, Initial residual = 0.61205684, Final residual = 0.64939008, No Iterations 1000
max(U) 1.6479872e-15
min(p_rgh) 100000
GAMGPCG: Solving for p_rgh, Initial residual = 0.48389343, Final residual = 1.2801586e-08, No Iterations 7
max(U) 2.6078623e-15
min(p_rgh) 100000
ExecutionTime = 1.97 s ClockTime = 2 s


If I look into the solution for each time step, the values actually do not change.
Except for the velocity, which looks like random noise with amplitude of 1e-13.
When I change the solver from

p_rgh
{
solver GAMG;
tolerance 1e-07;
relTol 0;
smoother DIC;
nPreSweeps 0;
nPostSweeps 2;
nFinestSweeps 2;
cacheAgglomeration true;
nCellsInCoarsestLevel 10;
agglomerator faceAreaPair;
mergeLevels 1;
}

to

p_rgh
{
solver PCG;
preconditioner
{
preconditioner GAMG;
tolerance 1e-07;
relTol 0;
nVcycles 2;
smoother DICGaussSeidel;
nPreSweeps 2;
nPostSweeps 2;
nFinestSweeps 2;
cacheAgglomeration true;
nCellsInCoarsestLevel 10;
agglomerator faceAreaPair;
mergeLevels 1;
}
tolerance 1e-07;
relTol 0;
maxIter 20;
}

i get now

MULES: Solving for alpha1
Liquid phase volume fraction = 1 Min(alpha1) = 1 Min(alpha2) = 0
diagonal: Solving for rho, Initial residual = 0, Final residual = 0, No Iterations 0
DILUPBiCG: Solving for T, Initial residual = 0.2561283, Final residual = 6.2762823e-15, No Iterations 1
GAMGPCG: Solving for p_rgh, Initial residual = 0.61205684, Final residual = 8.4709971e-08, No Iterations 5
max(U) 1.8399522e-15
min(p_rgh) 100000
GAMGPCG: Solving for p_rgh, Initial residual = 0.48273501, Final residual = 1.2982136e-08, No Iterations 7
max(U) 2.4301619e-15
min(p_rgh) 100000
ExecutionTime = 0.34 s ClockTime = 0 s

Does anybody know why the "Initial residual" is always so large and why are so many iterations are required to basically do nothing?
How are residuals computed and how to avoid this behavior?
After 6 years of this post I am facing the same problem using chtMultiRegionSimpleFoam solver. Any recommendations?
Akimlav and mengge like this.

Last edited by mm66; September 10, 2019 at 15:05.
mm66 is offline   Reply With Quote

Old   December 7, 2021, 03:32
Smile
  #3
New Member
 
lee wei
Join Date: Dec 2020
Posts: 11
Rep Power: 5
KKlee is on a distinguished road
Another two years later, I also face the same problem as the former encountered. Any idea? thanks.
KKlee is offline   Reply With Quote

Old   December 7, 2021, 10:55
Default
  #4
Member
 
Join Date: Mar 2019
Posts: 81
Rep Power: 7
mm66 is on a distinguished road
Quote:
Originally Posted by KKlee View Post
Another two years later, I also face the same problem as the former encountered. Any idea? thanks.
Hi,

Please make sure of a good mesh quality. If no help, then try something like:

Code:
    p_rgh
    {
        solver          PCG;
        preconditioner
        {
                preconditioner  GAMG;
                smoother        DICGaussSeidel;
                tolerance       1e-6;
        }
        tolerance       1e-6;
    }
Let me know if it worked

Cheers,
MJ
SHUBHAM9595 and mengge like this.

Last edited by mm66; December 7, 2021 at 15:13.
mm66 is offline   Reply With Quote

Old   December 9, 2021, 07:36
Default
  #5
New Member
 
lee wei
Join Date: Dec 2020
Posts: 11
Rep Power: 5
KKlee is on a distinguished road
Quote:
Originally Posted by mm66 View Post
Hi,

Please make sure of a good mesh quality. If no help, then try something like:

Code:
    p_rgh
    {
        solver          PCG;
        preconditioner
        {
                preconditioner  GAMG;
                smoother        DICGaussSeidel;
                tolerance       1e-6;
        }
        tolerance       1e-6;
    }
Let me know if it worked

Cheers,
MJ
Hi, MJ,
thanks for your help, it works well when I changed the solver as you mentioned, but the simulation runs slower than before, can you tell me why if you do not mind.
KKlee 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
motorBike Residuals for SST k-omega... and mine JR22 OpenFOAM Running, Solving & CFD 6 August 1, 2013 09:08
judging convergence through residuals MachZero Main CFD Forum 7 December 25, 2012 12:18
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


All times are GMT -4. The time now is 07:36.