I am trying to set up and solve a 2D Laplace differential equation for an electrostatic voltage using the finite element method. In the problem, I have many identical parts in a row along the x axis. Each rectangular part contains four electrodes: two half disks and two thin rectangles with different voltages on each electrode. I would like to find a solution for a representative part in the middle where I expect end effects to be negligible.
My scheme is to use periodic boundary conditions to match the end of the part with a smaller value of x to the larger x end of the part.
If I create the mesh all at once using DiscretizeRegion, the resulting mesh at the smaller x end does not match the mesh at the larger x end. I want to use a fine mesh while avoiding tediously making one end match the other triangle by triangle.
I note that the smaller x end seems to have all the vertices terminating on a single solid line, but this is not true of the larger x end.
If I run NDSolveValue ignoring this issue, I find much noise at the smaller x end and the solutions at the two ends fail to match.
So far I haven't found any method for doing this. Can anyone show me how?