# How to specify boundary conditions that are not Dirichlet/Neumann?

Posted 10 days ago
161 Views
|
|
0 Total Likes
|
 I am trying to find the electric field for the following setup: three conductors, two at a known potential and the third at an unknown potential. I would like to solve Laplace's equation. I can specify Dirichlet boundary conditions for two of the conductors. But for the third conductor, the only known boundary condition is that the electric field is perpendicular to its surface. My code is below. I would like to have a boundary condition for the middle conductor. In particular, I need to state D[u, x] = 0 or D[u, y] = 0 along the boundary. Giving a Neumann boundary condition will not work, as I do not know what the value of the gradient is. Yline = 1; Xmin = -1; Xmax = 1; \[CapitalDelta] = 0.025; Ypos = 0.9; Xwidth = 2; Ywidth = 3; \[CapitalOmega]box = Rectangle[{-Xwidth, -Ywidth}, {Xwidth, Ywidth}]; \[CapitalOmega]top = Rectangle[{Xmin, Yline - \[CapitalDelta]}, {Xmax, Yline + \[CapitalDelta]}]; \[CapitalOmega]middle = Rectangle[{Xmin, -Ypos*Yline - \[CapitalDelta]}, {Xmax, -Ypos* Yline + \[CapitalDelta]}]; \[CapitalOmega]bottom = Rectangle[{Xmin, -Yline - \[CapitalDelta]}, {Xmax, -Yline + \ \[CapitalDelta]}]; \[CapitalOmega]e = RegionUnion[ \[CapitalOmega]top, \[CapitalOmega]middle, \ \[CapitalOmega]bottom]; \[CapitalOmega] = RegionDifference[\[CapitalOmega]box, \[CapitalOmega]e]; \[CapitalDelta]v = 1; bctop = DirichletCondition[u[x, y] == \[CapitalDelta]v, {x, y} \[Element] RegionBoundary[\[CapitalOmega]top]]; bcbottom = DirichletCondition[u[x, y] == 0, {x, y} \[Element] RegionBoundary[\[CapitalOmega]bottom]]; bcmiddle = ?; \[Phi] = NDSolveValue[{\!$$\*SubsuperscriptBox[\(\[Del]$$, $${x, y}$$, $$2$$]$$u[x, y]$$\) == 0, bctop, bcbottom, bcmiddle}, u, {x, y} \[Element] \[CapitalOmega], AccuracyGoal -> 30, PrecisionGoal -> 30, WorkingPrecision -> 35, MaxSteps -> 50];  Attachments: