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

Problem with Poisson equation with Neumann BC

Register Blogs Community New Posts Updated Threads Search

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   March 27, 2011, 12:23
Default Problem with Poisson equation with Neumann BC
  #1
New Member
 
Jeff
Join Date: Mar 2011
Posts: 1
Rep Power: 0
Jeff67 is on a distinguished road
Hi everybody !

In my CFD code, I use the pressure correction method and the package Fishpack to solve the pressure poisson equation. I tried to make my own solver for 2D Poisson equation with non homogeneous Neumann BC (FD scheme with dx=dy)

\frac{\partial^2 p}{\partial x^2}+\frac{\partial^2 p}{\partial y^2}=f(x,y) \qquad \forall (x,y) \in [a,b]\times[c,d]
\frac{\partial p}{\partial x}=h \qquad \forall y \quad x=a,b
\frac{\partial p}{\partial y}=g \qquad \forall x \quad y=c,d


I realized that it was not as easy as Dirichlet BC : I don't really know how to construct my matrix A. For example for a grid of 3x3 points, here is my matrix A : ( in f_{i,j} i represtents x and j represents y)

\begin{pmatrix}
1 & -\frac{1}{2} & 0 & -\frac{1}{2} & 0 & 0 & 0 & 0 & 0\\
-\frac{1}{2} & 2 & -\frac{1}{2} & 0 & -1 & 0 & 0 & 0 & 0\\
0 & -\frac{1}{2} & 1 & 0 & 0 & -\frac{1}{2} & 0 & 0 & 0\\
-\frac{1}{2} & 0 & 0 & 2 & -1 & 0 & -\frac{1}{2} & 0 & 0\\
0 & -1 & 0 & -1 & 4 & -1 & 0 & -1 & 0\\
0 & 0 &-\frac{1}{2} &0 & -1 & 2 & 0 & 0 & -\frac{1}{2}\\
0 & 0 & 0 & -\frac{1}{2} & 0 & 0 & 1 & -\frac{1}{2} & 0\\
0 & 0 & 0 & 0 & -1 & 0 & -\frac{1}{2} & 2 & -\frac{1}{2}\\
0 & 0 & 0 & 0 & 0 & -\frac{1}{2} & 0 & -\frac{1}{2} & 1\\
\end{pmatrix}

My vector of unknowns p :
\begin{pmatrix}
p_{1,1}\\
p_{2,1}\\
p_{3,1}\\
p_{1,2}\\
p_{2,2}\\
p_{3,2}\\
p_{3,1}\\
p_{3,2}\\
p_{3,3}\\
\end{pmatrix}

and the vector B :
\begin{pmatrix}
\frac{1}{4}(-dx^2f_{1,1}+g+h)\\
\frac{1}{2}(-dx^2f_{2,1}+g)\\
\frac{1}{4}(-dx^2f_{3,1}+g+h)\\
\frac{1}{2}(-dx^2f_{1,2}+h)\\
-dx^2f_{2,2}\\
\frac{1}{2}(-dx^2f_{3,2}+h)\\
\frac{1}{4}(-dx^2f_{3,1}+g+h)\\
\frac{1}{2}(-dx^2f_{3,2}+g)\\
\frac{1}{4}(-dx^2f_{3,3}+g+h)\\
\end{pmatrix}

What do you think ? Is that correct ? What method should I use to solve this system ? SOR method ?
Jeff67 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
Calculation of the Governing Equations Mihail CFX 7 September 7, 2014 07:27
orlandi code for poisson equation with FFT ( paid tutorial) HaKu Main CFD Forum 0 June 29, 2009 16:40
How to solve a Poisson equation with only Neumann boundaries? mbgnfrx2 Main CFD Forum 6 April 2, 2009 05:01
FEM pressure poisson equation (Implicit) cfd-beginner Main CFD Forum 0 August 9, 2005 14:32
pressure Poisson equation in fractinoal step metho Rui Main CFD Forum 6 October 15, 2000 05:57


All times are GMT -4. The time now is 01:25.