3
$\begingroup$

My goal is to find out force between two parallel identical disks with Voltage difference.

To solve this, I tried to use laplace equation. And below is my code. where R is radius of disks, d is distance between two plates, V0 is Voltage difference between them.

R = 0.1;
e0 = 8.854187817*^-12;
d = 0.48*10^-2;
V0 = 4000;

regionCyl = 
 DiscretizeRegion[
  ImplicitRegion[Sqrt[x^2 + y^2 + z^2] <= 0.5, {x, y, z}], 
  PrecisionGoal -> 6]
laplacian = Laplacian[V[x, y, z], {x, y, z}];
boundaryCondition = {DirichletCondition[V[x, y, z] == V0/2, 
    0 <= x^2 + y^2 <= R^2 && z == d/2], 
   DirichletCondition[V[x, y, z] == V0/2, 
    0 <= x^2 + y^2 <= R^2 && z == -d/2], 
   DirichletCondition[V[x, y, z] == 0, x^2 + y^2 + z^2 == 10]};
sol = NDSolveValue[{laplacian == 0, boundaryCondition}, 
   V, {x, y, z} \[Element] regionCyl];
electricField[x_, y_, z_] = -Grad[sol[x, y, z], {x, y, z}];

But with this code I've got message enter image description here

Thank you for read.

$\endgroup$
  • $\begingroup$ Welcome to Mathematica.SE! I suggest the following: 1) As you receive help, try to give it too, by answering questions in your area of expertise. 2) Take the tour and check the faqs! 3) When you see good questions and answers, vote them up by clicking the gray triangles, because the credibility of the system is based on the reputation gained by users sharing their knowledge. Also, please remember to accept the answer, if any, that solves your problem, by clicking the checkmark sign! $\endgroup$ – Dunlop Oct 5 '19 at 12:32
  • $\begingroup$ A couple of quick things. 1) Your region is not a cylinder but a sphere, use the Cylinder[] . 2) Try to avoid using capital letters at the start of parameters and functions (these may well be already used as parameters and variables in Mathematica. 3) Your Precision Goal could be a bit high giving a long computation time depending on what you want to measure, try with a smaller one to start off with. 4) Your last Dirichlet condition is strange (should this be on the outside of the cylindrical region? Hope this helps $\endgroup$ – Dunlop Oct 5 '19 at 12:37
  • $\begingroup$ You do not need 3D to solve the axisymmetric problem. How thick are the discs? $\endgroup$ – Alex Trounev Oct 5 '19 at 17:19
5
$\begingroup$

I am not sure I understand your question 100%, do you mean something like this:

r = RegionDifference[
   RegionDifference[Cuboid[{-1, -1, -1}, {1, 1, 1}], 
    Cylinder[{{0, 0, -1/4}, {0, 0, -1/2}}, 1/2]], 
   Cylinder[{{0, 0, 1/4}, {0, 0, 1/2}}, 1/2]];
Needs["NDSolve`FEM`"]
(mesh = ToElementMesh[r, 
    "RegionHoles" -> {{0, 0, 3/8}, {0, 0, -3/8}}])["Wireframe"]

enter image description here

V0 = 4000;
sol = NDSolveValue[{Laplacian[V[x, y, z], {x, y, z}] == 0, 
    DirichletCondition[
     V[x, y, z] == V0/2, (1/4 <= z <= 1/2) && (x^2 + y^2 <= 1/2)], 
    DirichletCondition[
     V[x, y, z] == -V0/2, (-1/2 <= z <= -1/4) && (x^2 + y^2 <= 1/2)]},
    V, {x, y, z} \[Element] mesh];
ContourPlot[sol[x, 0, z], {x, -1, 1}, {z, -1, 1}]

enter image description here

electricField[x_, y_, z_] = -Grad[sol[x, y, z], {x, y, z}];
rmf = RegionMember[MeshRegion[mesh]];
Show[
 mesh["Edgeframe"],
 VectorPlot3D[
  electricField[x, y, z], {x, -1, 1}, {y, -1, 1}, {z, -1, 1}, 
  RegionFunction -> Function[{x, y, z}, rmf[{x, y, z}]]]]

enter image description here

| improve this answer | |
$\endgroup$

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.