CFD Online Logo CFD Online URL
www.cfd-online.com
[Sponsors]
Home > Forums > General Forums > Main CFD Forum

SIMPLE inner iterations & residuals issue

Register Blogs Community New Posts Updated Threads Search

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   November 3, 2024, 05:47
Default SIMPLE inner iterations & residuals issue
  #1
New Member
 
Panagiotis Iatrou
Join Date: Oct 2024
Posts: 5
Rep Power: 2
panagiat is on a distinguished road
Hello!

I recently made a steady-state FVM Incompressible 2D Navier Stokes solver using the SIMPLE algorithm for a collocated cartesian orthogonal grid in C++ by following the lectures by Sandip Mazumder

For solving the momentum/pressure correction equations, I am using the Gauss Seidel algorithm.
As for the residual calculation, I am using the L^2 norm, adding the error of each node and at the end taking the square root

As far as my understanding of the SIMPLE algorithm goes this is the general structure:

Code:
while u, v, p are not converged (outer iteration):
    Solve X momentum (with inner iterations)
    Solve Y momentum (with inner iterations)
    Solve pressure correction equation
    Correct stuff
I am going to use the terms initial/final residuals which are explained here

I am calculating the initial residuals as follows:
- Velocity: After the 1st inner iteration of the Gauss seidel algorithm of the momentum equations.
- Pressure: Calculating the mass imbalance after calculating the pressure correction coefficients right before solving the equation.

I am calculating the final residuals as follows:
- Momentum equations: The residual values of the last iteration of the Gauss Seidel algorithm.
- Pressure correction equation: The residual values of the last iteration of the Gauss Seidel algorithm.

At the moment I am only doing 1 inner iteration for each equation and the code converges for the lid driven cavity problem I am solving. Though it seems that nobody is doing it this way seeing diagrams of residuals commercial products create.
(maybe because this way the coefficients are calculated more times than needed?)
Thus, I decided to start adding more inner iterations and this is where trouble began.

I am solving the momentum equations by reducing the initial residual I calculated on the first inner iteration by an amount of orders (set at 2 orders of magnitude).
As for the pressure correction equation, I am starting with 0 pressure correction everywhere and I am solving with a tolerance of 4 orders of magnitude.

The momentum equations seem to be converging, but something weird happens with the pressure correction equation. Instead of the pressure correction values converging, it seems that the difference between each inner iteration is converging while the correction values keep on getting larger. This is obviously not the expected behaviour. On a closer look, the first outer iteration goes by because it just happens that the difference is within the tolerance, but on the second outer iteration it is pretty clear that something's wrong (which is probably why I got away with just 1 inner iteration).

Have I understood something wrong or is it simply an error in the way I am solving the pressure equation (or the coefficients themselves)?
Any ideas?

Last edited by panagiat; November 4, 2024 at 05:18.
panagiat is offline   Reply With Quote

Reply

Tags
gauss seidel, simple algorithm


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
[solidMechanics] Support thread for "Solid Mechanics Solvers added to OpenFOAM Extend" bigphil OpenFOAM CC Toolkits for Fluid-Structure Interaction 686 December 22, 2022 10:10
#0 prinStack(Foam::Ostream&)sh:1 addr2lin: not found addr2line failed jerrry51 OpenFOAM Running, Solving & CFD 0 September 2, 2022 15:33
chtMultiRegionSimpleFoam: maximum number of iterations excedeed. Nkl OpenFOAM Running, Solving & CFD 19 October 10, 2019 03:42
Cannot run the code properly: very large time step continuity error crst15 OpenFOAM Running, Solving & CFD 9 December 14, 2014 19:17
pimpleFoam: turbulence->correct(); is not executed when using residualControl hfs OpenFOAM Running, Solving & CFD 3 October 29, 2013 09:35


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