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

Pressure won't converge using SimpleFoam

Register Blogs Community New Posts Updated Threads Search

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   June 14, 2021, 08:02
Default Pressure won't converge using SimpleFoam
  #1
New Member
 
Join Date: Sep 2020
Posts: 3
Rep Power: 6
Richard97 is on a distinguished road
Hi All,

I'm running a case in simpleFoam and my pressure residuals won't converge. A similar case to this run a number of years ago had converged at this stage.

I have checked the mesh, and there are no issues with skewness or nonOrthogonality so I know the error doesn't lie there.

my fvScheme and fvSolution are as follows

fvSolution

solvers
{
p
{
solver GAMG;
tolerance 1e-6;
relTol 0.1;
smoother GaussSeidel;
nPreSweeps 0;
nPostSweeps 2;
cacheAgglomeration on;
agglomerator faceAreaPair;
nCellsInCoarsestLevel 10;
mergeLevels 1;
}

U
{
solver smoothSolver;
smoother GaussSeidel;
tolerance 1e-6;
relTol 0.1;
nSweeps 1;
}

k
{
solver smoothSolver;
smoother GaussSeidel;
tolerance 1e-6;
relTol 0.1;
nSweeps 1;
}

epsilon
{
solver smoothSolver;
smoother GaussSeidel;
tolerance 1e-6;
relTol 0.1;
nSweeps 1;
}
}

SIMPLE
{
nNonOrthogonalCorrectors 0;

residualControl
{
p 1e-3;
U 1e-4;
"(k|epsilon)" 1e-4;
}
}

relaxationFactors
{
fields
{
p 0.3;
}
equations
{
U 0.7;
k 0.7;
epsilon 0.7;
}
}

cache
{
grad(U);
}

fvScheme

ddtSchemes
{
default steadyState;
}

gradSchemes
{
default Gauss linear;
}

divSchemes
{
default none;
div(phi,U) bounded Gauss upwind;
div((nuEff*dev(T(grad(U))))) Gauss linear;
div(phi,epsilon) bounded Gauss upwind;
div(phi,k) bounded Gauss upwind;
div((nuEff*dev2(T(grad(U))))) Gauss linear;

}

laplacianSchemes
{
default Gauss linear limited corrected 0.333;
}

interpolationSchemes
{
default linear;
}

snGradSchemes
{
default limited corrected 0.333;
}

fluxRequired
{
default no;
p;
}

If anyone could advise, that would be greatly appreciated
Richard97 is offline   Reply With Quote

Old   June 14, 2021, 08:05
Default
  #2
New Member
 
Join Date: Sep 2020
Posts: 3
Rep Power: 6
Richard97 is on a distinguished road
This is the most recent time step of the output


smoothSolver: Solving for Ux, Initial residual = 6.26867549999e-05, Final residual = 4.83802208018e-06, No Iterations 4
smoothSolver: Solving for Uy, Initial residual = 4.91362392681e-05, Final residual = 3.40070029735e-06, No Iterations 4
smoothSolver: Solving for Uz, Initial residual = 0.000164303461286, Final residual = 9.92105112991e-06, No Iterations 4
GAMG: Solving for p, Initial residual = 0.00202976194843, Final residual = 0.000165595182502, No Iterations 2
time step continuity errors : sum local = 8.95914605453e-09, global = 2.94382119613e-10, cumulative = -2.68013954291e-06
smoothSolver: Solving for epsilon, Initial residual = 0.000134760412047, Final residual = 7.63620479172e-06, No Iterations 2
smoothSolver: Solving for k, Initial residual = 0.000571158570201, Final residual = 3.84860947038e-05, No Iterations 4
ExecutionTime = 88904.63 s ClockTime = 90881 s
Richard97 is offline   Reply With Quote

Old   June 15, 2021, 08:13
Default
  #3
Senior Member
 
Join Date: Apr 2020
Location: UK
Posts: 736
Rep Power: 14
Tobermory will become famous soon enough
Some suggestions:
- Check your boundary conditions. Are they identical to the previous set up? Has OF changed in its treatment of those boundary types since you last ran the case?
- do you get the same problem if you change the pressure solver from GAMG to PCG?
- How good is your mesh quality?

Maybe also look at the pressure field in paraview to see if there is a bump/discontinuity/irregularity in the pressure field - that might help you identify where the solution is stalling, and therefore help find the reason.

Good luck & let us know when you find the solution!
Tobermory is offline   Reply With Quote

Old   June 15, 2021, 08:31
Default
  #4
Member
 
Daniel
Join Date: Jan 2021
Posts: 39
Rep Power: 5
DevilX is on a distinguished road
Hey Richard,

I think here lies the problem:

relaxationFactors
{
fields
{
p 0.3;
}
equations
{
U 0.7;
k 0.7;
epsilon 0.7;
}
}

At first, 0.3 in fields for p is low, try a higher one. Your residuals look good, so this hould help. Also put a factor in Equations for p in, like this:

relaxationFactors
{
fields
{
p 0.7;
}
equations
{
U 0.7;
k 0.7;
p 0.7;
epsilon 0.7;
}
}
DevilX is offline   Reply With Quote

Old   June 24, 2022, 09:28
Default
  #5
Senior Member
 
Join Date: Dec 2019
Location: Cologne, Germany
Posts: 367
Rep Power: 8
geth03 is on a distinguished road
Quote:
Originally Posted by DevilX View Post
Hey Richard,

I think here lies the problem:

relaxationFactors
{
fields
{
p 0.3;
}
equations
{
U 0.7;
k 0.7;
epsilon 0.7;
}
}

At first, 0.3 in fields for p is low, try a higher one. Your residuals look good, so this hould help. Also put a factor in Equations for p in, like this:

relaxationFactors
{
fields
{
p 0.7;
}
equations
{
U 0.7;
k 0.7;
p 0.7;
epsilon 0.7;
}
}
1. how do you know that p-field URF is too low? there is no general rule to that, but the industry standard is 0.3. the better value might be problem dependent, but how will you know that?

2. it is the first time i hear that p-Eqn should be underrelaxed. where did you get that one?
geth03 is offline   Reply With Quote

Old   June 24, 2022, 12:17
Default
  #6
Senior Member
 
Domenico Lahaye
Join Date: Dec 2013
Posts: 798
Blog Entries: 1
Rep Power: 17
dlahaye is on a distinguished road
For relaxation, see e.g. https://en.wikipedia.org/wiki/SIMPLE_algorithm and references cited.
dlahaye is offline   Reply With Quote

Old   July 4, 2022, 06:17
Default
  #7
Senior Member
 
Join Date: Dec 2019
Location: Cologne, Germany
Posts: 367
Rep Power: 8
geth03 is on a distinguished road
Quote:
Originally Posted by dlahaye View Post
For relaxation, see e.g. https://en.wikipedia.org/wiki/SIMPLE_algorithm and references cited.
this is not a good reference when you consider how the simple algorithm is constructed in openfoam. the implementation is different from what the sources suggest.

URF for p-equation in OF will violate the mass conservation, so only the p-Field should be underrelaxed.

p_field_URF + U_eqn_URF = 1, this is a good rule.

@Richard97
stalling residuals are not telling if a solution is converging or not, i know that this behaviour is annoying. you should place samplePoints in your domain and track the iteration behaviour of those points. if they are not changing much, probably your problem is converged, considering your flow physics and numerics.
geth03 is offline   Reply With Quote

Old   February 22, 2023, 01:50
Default My p_rgh is not converging when using temperature
  #8
New Member
 
stoic
Join Date: Feb 2023
Posts: 2
Rep Power: 0
puneesh is on a distinguished road
Hi all,
I am having a similar issue with pressure(p_rgh). I ran a simplefoam case without temperature, only for flow, and it converged. Then using that case I created buyoantboussinesqsimplefoam case for temperature but my p_rgh is not converging. My flow is incompressible.
puneesh is offline   Reply With Quote

Reply

Tags
convergence, pressure, simple foam


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
Wind tunnel Boundary Conditions in Fluent metmet FLUENT 6 October 30, 2019 13:23
Pressure Inlet Boundary Conditions Mr.Goodcat FLUENT 5 June 20, 2019 02:47
CFX Solver stopped with error when requested for backup during solver running Mfaizan CFX 40 May 13, 2016 07:50
Setting up the pressure variation due to tornado in a duct(UDF)+animation guillaume1990 FLUENT 0 March 3, 2014 12:59
Pressure BC for combustion chamber Giuki FLUENT 1 July 19, 2011 12:35


All times are GMT -4. The time now is 15:02.