# Solving Laplace's equation for a rectangle

1. May 20, 2014

### peripatein

Hello,
1. The problem statement, all variables and given/known data
I am trying to solve Laplace's equation for the setup shown in the attachment, where f(x)=9sin(2πx)+3x and g(x)=10sin(πy)+3y. I have managed to solve it for the setup without the rectangle (PEC), and am now trying to solve ∇2$\phi$=0 for that inner rectangle in order to then apply superposition and sum up the solutions.

2. Relevant equations

3. The attempt at a solution
Since the inner rectangle is a perfect conductor, the electric field inside must be zero. Hence the potential must be constant, right (as E=-∇$\phi$)? d1=1/4 and d2=1/3, hence the boundary conditions are: $\phi$(x,y=0)=?, $\phi$(x=1/4,y)=?, $\phi$ (x,y=1/3)=?, $\phi$(x=0,y)=?. Now how should I proceed? Should all these potentials indeed be equated to constants or ought I to use something linear, such as (Ax+B)(Cy+D)?

#### Attached Files:

• ###### Untitled.jpg
File size:
22.3 KB
Views:
88
2. May 21, 2014

### BvU

If you solve for the setup without the PEC rectangle, what boundary conditions do you use for x=0 and y=0 ?
Looks to me as if those are conductors as well, grounded to boot!

PEC potential is definitely constant: any deviation would cause charge to move until it's constant again.

3. May 21, 2014

### peripatein

Yes, without the PEC the bottom and left sides of the original rectangle are indeed grounded.
The original boundary conditions are:
ϕ(x=0,y)=0; ϕ(x,y=0)=0;ϕ(x=1,y)=g(y);ϕ(x,y=1)=f(x)
and the solution is given as:
ϕ(x,y)=3xy + 9sin(2pi*x)sinh(2pi*y)/sinh(2pi) + 10sinh(pi*x)sin(pi*y)/sinh(pi)
How do I now solve Laplace's equation for the inner PEC?

4. May 21, 2014

### BvU

OK, looks good. I even played with a spreadsheet relaxation and got a nice 3D plot.
As far as I can see you now have to find solutions that are equal and opposite to ϕ on the bounds of the PEC and 0 on what remains of the bounds of the original unit square.
I don't see a way to deal with the irregularity.
So, like you, I am stuck for the moment...