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

Implementing SIMPLE for unstructured, collocated grid

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

Like Tree3Likes
  • 1 Post By FMDenaro
  • 1 Post By FMDenaro
  • 1 Post By arjun

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   December 19, 2016, 05:28
Post Implementing SIMPLE for unstructured, collocated grid
  #1
New Member
 
Martijn
Join Date: Dec 2016
Posts: 2
Rep Power: 0
mnroelofs is on a distinguished road
I have been trying to implement the SIMPLE algorithm as described by Ferzinger and Peric in the book "Computational Methods for Fluid Dynamics".
I want to simulate thec2D airflow around an airfoil of which I can dynamically create the shape. I use a triangular mesh for the flow field and use collocated variables. To solve the linear systems of equations I implemented a SOR Gauss-Seidel algorithm (but actually underrelax).

I implemented the algorithm in a C# application and the good news is it runs. However, since I am getting wrong results, I want to pinpoint whether the solver diverges, oscillates or that I just have gotten the theory wrong and thus implemented it incorrectly.

So, here are two pictures in which I have written down my discretization for the momentum and pressure correction equations. Can you spot any mistakes? The code file where the matrices and RHS vectors are created is also included. I hope the code is self-explanatory, otherwise ask.

Furthermore, should the coefficient matrix for u and v momentum be the same?

Thanks in advance for your time.
Attached Images
File Type: jpg Picture2.jpg (68.1 KB, 51 views)
File Type: jpg Picture.jpg (81.9 KB, 46 views)
Attached Files
File Type: txt SIMPLESolver.txt (30.2 KB, 38 views)
mnroelofs is offline   Reply With Quote

Old   December 19, 2016, 06:12
Default
  #2
Senior Member
 
Filippo Maria Denaro
Join Date: Jul 2010
Posts: 5,513
Rep Power: 58
FMDenaro has a spectacular aura aboutFMDenaro has a spectacular aura aboutFMDenaro has a spectacular aura about
when you write a new code you MUST assess that it runs well in a controlled test-case. Check first the accuracy and the quality of the solution for a well known solution.
lcarasik likes this.
FMDenaro is offline   Reply With Quote

Old   December 19, 2016, 07:26
Default
  #3
New Member
 
Martijn
Join Date: Dec 2016
Posts: 2
Rep Power: 0
mnroelofs is on a distinguished road
Thanks for your response. I have run a lid driven cavity flow problem, and it seems like the solution is diverging. It is pointless to run an accuracy check at this point since I am not getting sensible results... I am at a loss of what is causing the issue, but my guess is I have misinterpreted the theory... I particularly struggle with the pressure correction equation (e.g. I have no clue what to do with the equations (8.56 and 8.59) in section 8.8 of the book).
mnroelofs is offline   Reply With Quote

Old   December 19, 2016, 09:30
Default
  #4
Senior Member
 
Filippo Maria Denaro
Join Date: Jul 2010
Posts: 5,513
Rep Power: 58
FMDenaro has a spectacular aura aboutFMDenaro has a spectacular aura aboutFMDenaro has a spectacular aura about
check the code for the Poiseuille solution, this way you can control the setting of inflow, outflow and wall BC.s
lcarasik likes this.
FMDenaro is offline   Reply With Quote

Old   December 20, 2016, 04:29
Default
  #5
Senior Member
 
Arjun
Join Date: Mar 2009
Location: Nurenberg, Germany
Posts: 927
Rep Power: 24
arjun will become famous soon enough
Quote:
Originally Posted by mnroelofs View Post
Thanks for your response. I have run a lid driven cavity flow problem, and it seems like the solution is diverging. It is pointless to run an accuracy check at this point since I am not getting sensible results... I am at a loss of what is causing the issue, but my guess is I have misinterpreted the theory... I particularly struggle with the pressure correction equation (e.g. I have no clue what to do with the equations (8.56 and 8.59) in section 8.8 of the book).

Construct the pressure equation from 1/Ap and not from 1/(Ap + SumApi) like simplec.

The SIMPLEC part is tricky and i would not advise you to try that first. Try the safer approach of simple ie 1/Ap.

Solver can diverge for lots of reasons and many times it could even if everything in code is right. So first find a case that is easy to do. You try lid driven cavity is good idea with cartesian type meshes.
mnroelofs likes this.
arjun is offline   Reply With Quote

Old   May 1, 2017, 21:51
Default
  #6
New Member
 
Stira
Join Date: May 2017
Posts: 1
Rep Power: 0
stirafira is on a distinguished road
Hi mnroelofs, would you be kind enough to send me a copy of your final code for the same problem, I need to compare this for my research.
I am also looking for a Matlab code for the same problem FVM collocated grid.
My mail id is srs83@psu.edu.
-Thank you.
stirafira is offline   Reply With Quote

Reply

Tags
collocated grid, implementing new solver, simple algorithm, triangular mesh

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
SIMPLER Pressure boundray condition for collocated grid fard Main CFD Forum 0 September 26, 2011 11:16
SIMPLE on collocated grid dshawul Main CFD Forum 1 August 17, 2010 22:31
First order upwind on collocated grid arrangement Hooman Main CFD Forum 1 July 13, 2010 09:46
Please help: SIMPLE algorithm on staggered grid cfd_guy Main CFD Forum 3 January 12, 2010 13:03
Simple grid check query Ken FLUENT 0 March 27, 2007 01:47


All times are GMT -4. The time now is 13:29.