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

SIMPLE algorithm does not converge when using old pressure (correction) values

Register Blogs Members List Search Today's Posts Mark Forums Read

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   July 10, 2015, 10:12
Question SIMPLE algorithm does not converge when using old pressure (correction) values
  #1
New Member
 
Andreas P
Join Date: Sep 2010
Posts: 26
Rep Power: 12
andreasp is on a distinguished road
Hi everyone!

For demonstration purposes, I have implemented a little 2D incompressible flow solver using the SIMPLE(R) algorithm by Patankar on a staggered grid. My serial solver version seems to work fine, I can simulate lid-driven cavity and different channel flows.

Now my next step is to parallelize the code using a fairly simple OpenMP approach. So the major parts to parallelize are a couple of loops over all the grid cells and faces (purely cartesian mesh). For example, in the serial code version I have one loop over all cells to compute the pressure correction. The computation of pressure correction for each cell involves the pressure correction values of its four neighbor cells.

Code:
for all cells i:
    press_corr[i] = func( press_corr[west], press_corr[east], press_corr[south], press_corr[north] )
Typically, two of these neighbor values are the "old" values from last iteration, and the other two are already the new values (in those cells which have already been visited in the same loop). Parallelizing such a loop without care is not necessarily dangerous (because each value is modified by only one thread), but nevertheless can lead to non-deterministic results, because it is not clear in which order the cells are visited.

To circumvent this, I decided to introduce an intermediate storage which keeps the new values. These new values are now computed exclusively from old values, and then the new values are copied back to the actual pressure correction array in a second loop:

Code:
for all cells i:
    press_corr_intermediate[i] = func( press_corr[west], press_corr[east], press_corr[south], press_corr[north] )

for all cells i:
    press_corr[i] = press_corr_intermediate[i]
These two for-loops can be parallelized trivially without generating any non-deterministic results. So far, so good. However, here comes my problem:
With this modification, the numerical method does not converge anymore! My residuals blow up.
As long as the pressure correction calculation depends partially on new (current iteration) neighbor values, the method converges. But as soon as I use exclusively old neighbor values (from last iteration), it does not converge anymore. (This is completely independent of any parallelization! Just the same happens in serial execution.)

Can anyone give me a hint on what might be going on here?

Many thanks in advance!

Cheers,
Andreas
andreasp is offline   Reply With Quote

Old   July 10, 2015, 12:32
Default
  #2
Senior Member
 
Michael Prinkey
Join Date: Mar 2009
Location: Pittsburgh PA
Posts: 363
Rep Power: 21
mprinkey will become famous soon enough
The serial version is doing Gauss Seidel iteration. The two-loop parallel version is doing Jacobi iteration. These are not the same iterative scheme.

If you don't have a fixed pressure boundary condition, the pressure (correction) system will be formally indeterminate as I've discussed here a few months ago. GS iteration may converge while Jacobi may not. It might require you to fix one pressure value to make the system determined.

A better option is to do red/black Gauss Seidel. That avoids the parallel dependency issue and should give convergence more similar to the original.
mprinkey is offline   Reply With Quote

Old   July 13, 2015, 05:15
Default
  #3
New Member
 
Andreas P
Join Date: Sep 2010
Posts: 26
Rep Power: 12
andreasp is on a distinguished road
Thank you very much for your quick answer!
That totally makes sense. Indeed, the system that is not solvable is a lid-driven cavity problem which does not have any fixed pressure values.

I guess I will take a look at the red/black GS scheme.

Thanks again!
andreasp is offline   Reply With Quote

Old   February 9, 2016, 22:18
Default
  #4
New Member
 
Ramkumar
Join Date: Nov 2014
Location: pondicherry, India
Posts: 12
Rep Power: 8
Ramkumar21194 is on a distinguished road
Hi, i got similar problm while solving 2d viscid flow using simple algorithm, but the solution diverges and the values of pressure and temperature reaches higher values till infinity... plz suggest me on this anyone...the higher value arises from pressure correction equations...
Thanks in advance.
Ramkumar21194 is offline   Reply With Quote

Reply

Tags
convergence, parallelization, simple algorithm

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

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
pressure equation in PISO or SIMPLE algorithm mechy OpenFOAM 2 July 22, 2013 15:17
How to add correcting pressure equation in SIMPLE of MRFSimpleFOAM? renyun0511 OpenFOAM Programming & Development 0 November 4, 2010 02:38
Pressure correction problem richard_larson OpenFOAM Running, Solving & CFD 8 October 30, 2008 09:48
Pressure correction BC using SIMPLE André Gaathaug Main CFD Forum 2 August 3, 2007 02:38
SIMPLE algorithm Jonathan Castro Main CFD Forum 3 December 10, 1999 05:59


All times are GMT -4. The time now is 09:06.