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

Poisson equation with periodic and zero gradient boundary conditions

Register Blogs Community New Posts Updated Threads Search

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   August 25, 2022, 03:20
Default Poisson equation with periodic and zero gradient boundary conditions
  #1
Member
 
Divyaprakash
Join Date: Jun 2014
Posts: 75
Rep Power: 12
Divyaprakash is on a distinguished road
Hi


I am trying to solve the following problem.


A 2D rectangular domain, with walls boundary condition at the top and bottom and periodic boundary conditions at left and right.




I started by first implementing the pressure-Poisson solver



The boundary condition applied at the walls is



Which gives me

at top and bottom walls respectively.



Applying the periodic BC gives me

at the left and right boundaries respectively.


Using these boundary conditions and discretizing using finite difference method, I obtain the following coefficient matrix on 3X3 grid shown below.
|```````|````````|``````|
| o (7)| o( 8) | o(9)|
|........| .........|.......|
|```````|````````|``````|
| o (4)| o(5) | o(6)|
|........| .........|.......|
|```````|````````|``````|
| o (1)| o( 2) | o(3)|
|........| .........|.......|


A = [
-3 1 1 1 0 0 0 0 0
1 -3 1 0 1 0 0 0 0
1 1 -3 0 0 1 0 0 0
1 0 0 -4 1 1 1 0 0
0 1 0 1 -4 1 0 1 0
0 0 1 1 1 -4 0 0 1
0 0 0 1 0 0 -3 1 1
0 0 0 0 1 0 1 -3 1
0 0 0 0 0 1 1 1 -3]



Q = [1 1 1 1 1 1 1 1 1];


I solved it in Matlab.

I am unable to get a solution for this. It says that the matrix is ill-conditioned.


I had earlier tried to solve this problem with Gauss-Siedel, however it did not converge. I thought an implcit method will surely give me result, but that too doesn't seem to work.

Is there an issue with me formulation?
Is it not possible to obtain a solution for the above set of boundary conditions?

Last edited by Divyaprakash; August 25, 2022 at 03:26. Reason: Formatting error
Divyaprakash is offline   Reply With Quote

Old   August 25, 2022, 05:28
Default
  #2
Senior Member
 
Filippo Maria Denaro
Join Date: Jul 2010
Posts: 6,897
Rep Power: 73
FMDenaro has a spectacular aura aboutFMDenaro has a spectacular aura aboutFMDenaro has a spectacular aura about
You are on the wrong way... First, I suggest to search for similar posts where you can find the correct way.
However, think about the fact that the pressure equation is nothing but the continuisty equation. The divergence-free condition is transformed by means of the Hodge decomposition:


Div v = 0 -> Div (Grad phi - v*)=0


The correct equation to discretize is



Div (Grad phi) =q


where q = Div v*


The problem is closed by the Neumann BCs


v.n=(Grad phi - v*).n



As you have seen, the matrix is singular, if you want a solution for this problem you need to satisfy the compatibility condition.
In your case:


Int[S] dphi/dn dS = 0 = Int[V] q dV


is not satisfied and you cannot get a solution-
FMDenaro is offline   Reply With Quote

Old   August 25, 2022, 11:33
Default
  #3
Member
 
Divyaprakash
Join Date: Jun 2014
Posts: 75
Rep Power: 12
Divyaprakash is on a distinguished road
Thanks a lot. Can you please elaborate what you mean by the correct way?
Divyaprakash is offline   Reply With Quote

Old   August 25, 2022, 11:40
Default
  #4
Senior Member
 
Filippo Maria Denaro
Join Date: Jul 2010
Posts: 6,897
Rep Power: 73
FMDenaro has a spectacular aura aboutFMDenaro has a spectacular aura aboutFMDenaro has a spectacular aura about
Quote:
Originally Posted by Divyaprakash View Post
Thanks a lot. Can you please elaborate what you mean by the correct way?

The way I addressed in the equation I wrote. You have to discretize DivGrad operators, not the Laplacian. Then you have to substitute the correct Neumann BCs.
FMDenaro is offline   Reply With Quote

Reply

Tags
boundary conditions, periodic, poisson, pressure, zero gradient


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



All times are GMT -4. The time now is 07:11.