How to solve a pair of coupled Poisson equations with inhomogeneous boundary conditions?

87 Views Asked by At

I am trying to make some code that will solve the following 2D Poisson equations: $$\left(\frac{\partial^2}{\partial x^2}+\frac{\partial}{\partial y^2}\right)P(x,y) = f(x,y),$$ $$\left(\frac{\partial^2}{\partial x^2}+\frac{\partial}{\partial y^2}\right)Q(x,y) = g(x,y),$$ for $P(x,y)$ and $Q(x,y)$ with the following boundary conditions: $$\left[\frac{\partial P}{\partial y} - \frac{\partial Q}{\partial x}\right]_{x=x_{min}} = b_1(y),$$ $$\left[\frac{\partial P}{\partial y} - \frac{\partial Q}{\partial x}\right]_{x=x_{max}} = b_2(y),$$ $$\left[\frac{\partial P}{\partial x} + \frac{\partial Q}{\partial y}\right]_{y=y_{min}} = b_3(x),$$ $$\left[\frac{\partial P}{\partial x} + \frac{\partial Q}{\partial y}\right]_{y=y_{max}} = b_4(x),$$ where $x\in[x_{min},\ x_{max}]$ and $y\in[y_{min},\ y_{max}]$.

Do you know how to do this? Is there a way to convert this into a problem with Neumann or Dirichlet boundary conditions?

1

There are 1 best solutions below

0
On

I have an idea to solve the problem. However, it seems overly complicated so I am still interested to know if anyone has a simpler way of doing it.

Let $$P(x,y) = P'(x,y) + \frac{\partial \phi}{\partial x} + \frac{\partial \theta}{\partial y},$$ $$Q(x,y) = Q'(x,y) + \frac{\partial \phi}{\partial y} - \frac{\partial \theta}{\partial x},$$ and solve for $P'(x,y)$ and $Q'(x,y)$ with the following boundary conditions: $$P'(x_{min},y)=P'(x_{max},y)=P'(x,y_{min})=P'(x,y_{max})=0,$$ $$\left.\frac{\partial Q'}{\partial x}\right|_{x=x_{min}} = \left.\frac{\partial Q'}{\partial x}\right|_{x=x_{max}} = \left.\frac{\partial Q'}{\partial y}\right|_{y=y_{min}} = \left.\frac{\partial Q'}{\partial y}\right|_{y=y_{max}} = 0.$$ The $\phi(x,y)$ and $\theta(x,y)$ terms are calculated by solving $$\left(\frac{\partial^2}{\partial x^2} + \frac{\partial^2}{\partial y^2}\right)\phi(x,y) = \frac{(y_{max}-y)b_3(x) + (y - y_{min})b_4(x)}{y_{max}-y_{min}},$$ $$\left(\frac{\partial^2}{\partial x^2} + \frac{\partial^2}{\partial y^2}\right)\theta(x,y) = \frac{(x_{max}-x)b_1(y) + (x - x_{min})b_2(y)}{x_{max}-x_{min}},$$ where the boundary conditions for $\phi(x,y)$ and $\theta(x,y)$ are arbitrary, but I will choose Dirichlet boundary conditions.