4
$\begingroup$

I need to visualize the electrostatic field produced by a capacitor consisting of two parallel 1D plates of different lengths, as shown in the following figure (sorry for the crude drawing), in which the lower plate is grounded and the upper shorter one is charged at a high voltage. The two plates are assumed to be the mathematic plane with zero thickness, and the length ration of $l/L=1/5$.

Actually, I need to plot the field lines, field strength contour, and field strength distribution on the lower plate. Then the plots will be used to estimate the length of a significant electric-field influence domain on the lower plate. For example, $20$% in strength decay in the horizontal direction, that is, the field-line density decreases by $20$% as compared with the homogeneous central region.

The length is denoted as $l+2\delta$ in the figure, where $\delta$ means the edge-effect length of the electric field on the lower plate. This problem is also related to this one. I'd like to thank @Alex Trounev's answer there.

But I have further questions about Alex Trounev's answer: 1. is it reasonable to use two circular plates to represent two 1D plates?

  1. If the upper surface of the small electrode is coated with an insulator, what are the plots?

enter image description here

Update

To plot full streamlines without segmentation, I added StreamScale -> {Full, All, 0.02} in StreamDensityPlot

StreamDensityPlot[Evaluate[ef], {x, y} \[Element] reg, 
 MaxRecursion -> 2, StreamPoints -> 40, ColorFunction -> "Rainbow", 
 PlotLegends -> Automatic, FrameLabel -> {"x", "y"}, 
 StreamStyle -> LightGray, FrameStyle -> LightGray, PlotRange -> All, 
 ImageSize -> 400, StreamScale -> {Full, All, 0.02}, 
 PerformanceGoal -> "Quality"]

We can see many streamlines don't touch the plates exactly and have different distances from the plates, see the following enlarged figure.

enter image description here

This issue can be seen in the mid-subfigure of @Alex's answer. How to get continuous streamlines, among which those lines end at the plate should touch the plates exactly? I have tried to use WorkingPrecision -> 20, which turns out to be useless. Is this related to the mesh? Thank you for any suggestions.

$\endgroup$
  • $\begingroup$ Voting to close because no preliminary work with Mathematica have been done and because nothing in this post indicates a connection to Mathematica. $\endgroup$ – yarchik Oct 27 '19 at 11:03
  • $\begingroup$ @yarchik I asked to start this topic in case someone offers a good solution. $\endgroup$ – Alex Trounev Oct 27 '19 at 17:28
  • $\begingroup$ @AlexTrounev I see. I retracted my close vote. However, this is a combination of two problems in one question: 1) to find or derive the Green's function for the given geometry, which is not even specified in a clear way, and 2) to perform actual calculations and plots. What is a 1D plate, this is really confusing?! $\endgroup$ – yarchik Oct 27 '19 at 17:35
  • $\begingroup$ @yarchik He means very thin plates that look like 1D segments when displayed on 2D. In my solution to the Laplace equation there it is thick plates due to FEM. $\endgroup$ – Alex Trounev Oct 27 '19 at 17:48
  • $\begingroup$ @Enter Sorry, I still do not understand. What do you want to get on the pictures? These lines are drawn correctly. $\endgroup$ – Alex Trounev Nov 7 '19 at 16:30
11
$\begingroup$

Two discs with an aspect ratio of 1: 2. The lower disk is grounded, the potential is on the upper disk $U=1$. On the left is the distribution of potential, in the center is the distribution of the electric field, on the right is the distribution of the electric field on the grounded plate.

Needs["NDSolve`FEM`"];
par = {H -> 1./4, h -> 1./10, l1 -> 1., l2 -> 2.}; reg1 = 
 RegionUnion[Rectangle[{-l1/2, H/2}, {l1/2, H/2 + h}], 
   Rectangle[{-l2/2, -H/2 - h}, {l2/2, -H/2}]] /. par; reg2 = 
 Rectangle[{0, -3}, {6, 3}];
reg = RegionDifference[reg2, reg1];
mesh = ToElementMesh[reg /. par, 
  MeshRefinementFunction -> 
   Function[{vertices, area}, 
    area > 0.0001 (0.1 + 10 Norm[Mean[vertices]])]]
mesh["Wireframe"]
eq = D[u[r, z], r, r] + D[u[r, z], r]/r + D[u[r, z], z, z];
bc = {DirichletCondition[u[r, z] == 0, 
     r == l2/2 && -H/2 - h <= z <= -H/2 || 
      z == -H/2 && 0 <= r <= l2/2 || z == -H/2 - h && 0 <= r <= l2/2],
     DirichletCondition[u[r, z] == 1., 
     r == l1/2 && H/2 <= z <= H/2 + h || z == H/2 && 0 <= r <= l1/2 ||
       z == H/2 + h && 0 <= r<= l1/2]} /. par;
U = NDSolveValue[{eq == 0, bc}, u, {r, z} \[Element] mesh];

ef = -Grad[U[x, y], {x, y}];

{DensityPlot[U[r, z], {r, z} \[Element] reg, 
  ColorFunction -> "Rainbow", PlotLegends -> Automatic, 
  FrameLabel -> Automatic, PlotRange -> All, PlotPoints -> 50], 
 StreamDensityPlot[Evaluate[ef], {x, y} \[Element] reg, 
  ColorFunction -> "Rainbow", PlotLegends -> Automatic, 
  FrameLabel -> {r, z}, StreamStyle -> LightGray, 
  VectorPoints -> Fine, PlotRange -> {{0, 2}, {-1, 1}}], 
 Plot[Evaluate[Norm[ef] /. y -> -H/2 /. par], {x, 0, 1}, 
  PlotRange -> All, AxesLabel -> {"r", "E"}, AxesOrigin -> {0, 0}]}

Figure 1

Two parallel very long plates with a width ratio of 1:2.The lower plate is grounded, the potential on the upper pate is $U=1$. On the left is the distribution of potential, in the center is the distribution of the electric field, on the right is the distribution of the electric field on the grounded plate. Changing the thickness 2 times from 1/10 to 1/20 has almost no effect on the field

Needs["NDSolve`FEM`"];
par = {H -> 1./4, h -> 1./20, l1 -> 1., l2 -> 2.}; reg1 = 
 RegionUnion[Rectangle[{-l1/2, H/2}, {l1/2, H/2 + h}], 
   Rectangle[{-l2/2, -H/2 - h}, {l2/2, -H/2}]] /. par; reg2 = 
 Rectangle[{0, -3}, {6, 3}];
reg = RegionDifference[reg2, reg1];
mesh = ToElementMesh[reg /. par, 
  MeshRefinementFunction -> 
   Function[{vertices, area}, 
    area > 0.0001 (0.1 + 10 Norm[Mean[vertices]])]]
mesh["Wireframe"]

eq = D[u[x, z], x, x] + D[u[x, z], z, z];
bc = {DirichletCondition[u[x, z] == 0, 
     x == l2/2 && -H/2 - h <= z <= -H/2 || 
      z == -H/2 && 0 <= x <= l2/2 || z == -H/2 - h && 0 <= x <= l2/2],
     DirichletCondition[u[x, z] == 1., 
     x == l1/2 && H/2 <= z <= H/2 + h || z == H/2 && 0 <= x <= l1/2 ||
       z == H/2 + h && 0 <= x <= l1/2]} /. par;
U = NDSolveValue[{eq == 0, bc}, u, {x, z} \[Element] mesh];

ef = -Grad[U[x, y], {x, y}];

{DensityPlot[U[x, y], {x, y} \[Element] reg, 
  ColorFunction -> "Rainbow", PlotLegends -> Automatic, 
  FrameLabel -> Automatic, PlotRange -> All, PlotPoints -> 50], 
 StreamDensityPlot[Evaluate[ef], {x, y} \[Element] reg, 
  ColorFunction -> "Rainbow", PlotLegends -> Automatic, 
  FrameLabel -> {"x", "y"}, StreamStyle -> LightGray, 
  VectorPoints -> Fine, PlotRange -> {{0, 2}, {-1, 1}}], 
 Plot[Evaluate[Norm[ef] /. y -> -H/2 /. par], {x, 0, 1}, 
  PlotRange -> All, AxesLabel -> {"x", "E"}, AxesOrigin -> {0, 0}]}

Figure 2

| improve this answer | |
$\endgroup$
  • $\begingroup$ Thank you for your answer. In boundary conditions, you used the symbol $x$ instead of $r$, for example, z == H/2 && 0 <= x <= l1/2. Also, in Grad[U[x, y], {x, y}] and StreamDensityPlot you used {x, y} instead of {r, z}. Does it matter? $\endgroup$ – Enter Oct 28 '19 at 9:49
  • $\begingroup$ @Enter It doesn't matter, but I changed the code for clarity. I also added code for two thin plates. $\endgroup$ – Alex Trounev Oct 28 '19 at 10:53
  • $\begingroup$ Side comment: when I plot the region with reg//RegionPlot, I see some artefacts. This does not occur with reg//Graphics. Is there a reason why RegionPlot seems to give buggy results? $\endgroup$ – Whelp Oct 28 '19 at 17:01
  • 1
    $\begingroup$ @Whelp use RegionPlot[reg, MaxRecursion -> 0] $\endgroup$ – Alex Trounev Oct 28 '19 at 17:47
  • $\begingroup$ @AlexTrounev when adjusting some parameters in the two-plates case, say, increasing H and l2, H -> 1 and l2 -> 5, I saw some artifacts in $E$ distribution near the axis of symmetry. I guess it is due to the absence of symmetry condition(s) there. Actually, we never impose any b.c.s. in the outer boundaries of the domain as well. Does it matter? $\endgroup$ – Enter Oct 29 '19 at 15:17

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.