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

simple algorithm method with colocated mesh and steady flow

Register Blogs Community New Posts Updated Threads Search

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   May 23, 2016, 09:42
Default simple algorithm method with colocated mesh and steady flow
  #1
Member
 
sajad
Join Date: Apr 2014
Location: Iran
Posts: 46
Rep Power: 11
sajad6 is on a distinguished road
Hi
I've written a code for solving flow field by applying simple colocated algorithm. I have a problem with coefficient matrix of pressure correction equations. You know in steady flow for pressure correction equation we have:

Ap=-Aw-Ae-An-As

So we will have a matrix with zero determinant.In this situation, pressure correction equations is impossible to be solved:

[A][PP]=[B] => DET[A]=0 => PP EQUATIONS IS UNSOLVABLE

is there anyone who can help me with this dilemma?
sajad6 is offline   Reply With Quote

Old   May 23, 2016, 11:19
Default
  #2
Member
 
Mohammad Reza Hadian
Join Date: Mar 2009
Location: Yazd, Iran
Posts: 52
Rep Power: 17
hadian is on a distinguished road
note that for internal nodes A_{p}=\sum A_{nb}. at the boundaries you will have nodes that A_{p}>\sum A_{nb}. so there is no problem for solving the equation.
hadian is offline   Reply With Quote

Old   May 23, 2016, 11:24
Default
  #3
Senior Member
 
Michael Prinkey
Join Date: Mar 2009
Location: Pittsburgh PA
Posts: 363
Rep Power: 25
mprinkey will become famous soon enough
I assume that you are working with incompressible flow, and are building the pressure equation to enforce div(U) = 0.

The system of equations that you get is indeterminate ONLY if you are not enforcing a fixed pressure boundary condition. The pressure is this case is a gauge variable because it can get zero-shifted and the physics will not change. The typical solution is to pick a cell and set the pressure in that cell to a fixed value (like zero). That make the system determinate. Note that this is exactly what OpenFOAM does with a line like:

pEqn.setReference(pRefCell, pRefValue);

Good luck.
mprinkey is offline   Reply With Quote

Old   May 23, 2016, 11:57
Default
  #4
Senior Member
 
Filippo Maria Denaro
Join Date: Jul 2010
Posts: 6,768
Rep Power: 71
FMDenaro has a spectacular aura aboutFMDenaro has a spectacular aura aboutFMDenaro has a spectacular aura about
I agree with mprinkey that fixing a value in an arbitrary node makes resolvable the problem, however that is not necessary as a fixed value will be implied in the iterative solution algorithm provided that the compatibility condition is fulfilled. The compatibility relation is the integral of the Poisson equation over the computational domain, hence if your BC.s are well posed, that relation will be satisfied
FMDenaro is offline   Reply With Quote

Old   May 23, 2016, 16:33
Default I got all of these points but ...
  #5
Member
 
sajad
Join Date: Apr 2014
Location: Iran
Posts: 46
Rep Power: 11
sajad6 is on a distinguished road
points of mprinkey and FMdinaro are correct but it will not change system of pressure correction eequations to make it solvable.because determinant of coefficient matrix is zero.

but Hadian's point can help my problem but I have a question about it.According to Hadian,I should add neighbour coefficient to Ap. consider I want to calculate Ap and B(source term) of a cell at inlet boundary:

Ap=-Aw(neighbour)-Ae-As-An

after that, should I add below term to cell's source term?

B=B+Aw(neighbour)*pp

If yes how can I apply it to my code while I haven't pp(pressure correction) before solving?
sajad6 is offline   Reply With Quote

Old   May 23, 2016, 16:46
Default
  #6
Senior Member
 
Filippo Maria Denaro
Join Date: Jul 2010
Posts: 6,768
Rep Power: 71
FMDenaro has a spectacular aura aboutFMDenaro has a spectacular aura aboutFMDenaro has a spectacular aura about
Quote:
Originally Posted by sajad6 View Post
points of mprinkey and FMdinaro are correct but it will not change system of pressure correction eequations to make it solvable.because determinant of coefficient matrix is zero.

but Hadian's point can help my problem but I have a question about it.According to Hadian,I should add neighbour coefficient to Ap. consider I want to calculate Ap and B(source term) of a cell at inlet boundary:

Ap=-Aw(neighbour)-Ae-As-An

after that, should I add below term to cell's source term?

B=B+Aw(neighbour)*pp

If yes how can I apply it to my code while I haven't pp(pressure correction) before solving?

no, you are wrong, if the compatibilty relation is satisfied, even if det(A)=0 you got an indeterminate solution. In other words, you have a solution determined apart an arbitrary constant.
FMDenaro is offline   Reply With Quote

Old   May 23, 2016, 21:48
Default
  #7
Member
 
Mohammad Reza Hadian
Join Date: Mar 2009
Location: Yazd, Iran
Posts: 52
Rep Power: 17
hadian is on a distinguished road
at inlet (that usually the zero gradient is used for velocity) and walls again A_{p}=\sum {A_{nb}}. But point you have reference pressure, the pressure correction is zero and then A_{p}>\sum {A_{nb}}. for example if the point is at east boundary, you will have P'_E=0 so after calculating A_{p} using A_{p}=\sum {A_{nb}}, you implement the boundary condition by setting A_{E}=0 at this point. and this point solve the problem!!!
hadian is offline   Reply With Quote

Reply


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
Keeping intermediate files OVS SU2 5 December 5, 2021 11:41
Issues on the simulation of high-speed compressible flow within turbomachinery dowlee OpenFOAM Running, Solving & CFD 11 August 6, 2021 06:40
SIMPLE algorithm SamR Main CFD Forum 19 April 26, 2019 13:06
parallel code samiam1000 SU2 3 March 25, 2013 04:55
Discussion about Mesh independant solution Seb Main CFD Forum 13 May 22, 2001 13:37


All times are GMT -4. The time now is 22:28.