|
[Sponsors] |
Implementing SIMPLE for unstructured, collocated grid |
![]() |
|
LinkBack | Thread Tools | Search this Thread | Display Modes |
![]() |
![]() |
#1 |
New Member
Martijn
Join Date: Dec 2016
Posts: 2
Rep Power: 0 ![]() |
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. |
|
![]() |
![]() |
![]() |
![]() |
#2 |
Senior Member
Filippo Maria Denaro
Join Date: Jul 2010
Posts: 6,830
Rep Power: 73 ![]() ![]() ![]() |
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.
|
|
![]() |
![]() |
![]() |
![]() |
#3 |
New Member
Martijn
Join Date: Dec 2016
Posts: 2
Rep Power: 0 ![]() |
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).
|
|
![]() |
![]() |
![]() |
![]() |
#4 |
Senior Member
Filippo Maria Denaro
Join Date: Jul 2010
Posts: 6,830
Rep Power: 73 ![]() ![]() ![]() |
check the code for the Poiseuille solution, this way you can control the setting of inflow, outflow and wall BC.s
|
|
![]() |
![]() |
![]() |
![]() |
#5 | |
Senior Member
Arjun
Join Date: Mar 2009
Location: Nurenberg, Germany
Posts: 1,282
Rep Power: 34 ![]() ![]() |
Quote:
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. |
||
![]() |
![]() |
![]() |
![]() |
#6 |
New Member
Stira
Join Date: May 2017
Posts: 1
Rep Power: 0 ![]() |
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. ![]() |
|
![]() |
![]() |
![]() |
Tags |
collocated grid, implementing new solver, simple algorithm, triangular mesh |
|
|
![]() |
||||
Thread | Thread Starter | Forum | Replies | Last Post |
SIMPLER Pressure boundray condition for collocated grid | fard | Main CFD Forum | 0 | September 26, 2011 10:16 |
SIMPLE on collocated grid | dshawul | Main CFD Forum | 1 | August 17, 2010 21:31 |
First order upwind on collocated grid arrangement | Hooman | Main CFD Forum | 1 | July 13, 2010 08:46 |
Please help: SIMPLE algorithm on staggered grid | cfd_guy | Main CFD Forum | 3 | January 12, 2010 12:03 |
Simple grid check query | Ken | FLUENT | 0 | March 27, 2007 00:47 |