Message Boards Message Boards


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

Posted 10 days ago
1 Reply
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 + \
\[CapitalOmega]e = RegionUnion[ \[CapitalOmega]top, \[CapitalOmega]middle, \
\[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]; 

Welcome to Wolfram Community!
Please make sure you know the rules:
Your post is vague. Please describe your subject extensively providing code, so it is clear what exactly you are looking for and the relevance to Wolfram Technologies.

The rules show the available methods to provide well formatted code.

Reply to this discussion
Community posts can be styled and formatted using the Markdown syntax.
Reply Preview
or Discard

Group Abstract Group Abstract