
[Sponsors] 
Poisson equation with periodic and zero gradient boundary conditions 

LinkBack  Thread Tools  Search this Thread  Display Modes 
August 25, 2022, 03:20 
Poisson equation with periodic and zero gradient boundary conditions

#1 
Member
Divyaprakash
Join Date: Jun 2014
Posts: 44
Rep Power: 10 
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 pressurePoisson 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 illconditioned. I had earlier tried to solve this problem with GaussSiedel, 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 

August 25, 2022, 05:28 

#2 
Senior Member
Filippo Maria Denaro
Join Date: Jul 2010
Posts: 6,193
Rep Power: 66 
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 divergencefree 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 

August 25, 2022, 11:33 

#3 
Member
Divyaprakash
Join Date: Jun 2014
Posts: 44
Rep Power: 10 
Thanks a lot. Can you please elaborate what you mean by the correct way?


August 25, 2022, 11:40 

#4 
Senior Member
Filippo Maria Denaro
Join Date: Jul 2010
Posts: 6,193
Rep Power: 66 

Tags 
boundary conditions, periodic, poisson, pressure, zero gradient 
Thread Tools  Search this Thread 
Display Modes  

