# Numerical Method for Solving 3D Poisson Equation with Dirichlet and Periodic Boundary Conditions

Given the poisson equation

(1) $\Delta L = F$

on a three dimensional discrete grid $V$ with grid points $x = 0,\ldots, W$, $y = 0, \ldots, H$ and $t = 0,\ldots,T$ where $\Delta$ denotes the discrete Laplace operator (for example using finite differences). The solution of (1) assuming periodic boundary conditions can be obtained using three dimensional discrete Fourier transform (see for example "Numerical Recipes in C," 2nd edition, chapter 19). However, I want to solve the same problem under the following boundary conditions:

(2) $L(x, y, 0) = L'(x,y)$

for a given $L'(x,y)$ and periodic boundary conditions for all other sides, that is for $t = T$ as well as for $x = 0$, $x = W$, $y = 0$ and $y = H$.

Visually speaking I have a cube and want to enforce Dirichlet boundary conditions on one side of the cube while using periodic boundary conditions on all other sides.

I would greatly appreciate any suggestions on how to solve this problem numerically (how to solve it and, if applicable, which libraries can be used).

Thanks!

You can use ADI (Alternating Direction Implicit) methods. Split each time step into three parts (one for each direction), or two, if you want to solve in $x-y$ plane using two dimensional discrete Fourier transform.