The objective is to solve the 3D electric fields for the geometry below and generate the continuous function eField3D[x_,y_,z_]
. The method I was planning on using was FEA to solve Laplace PDEs.
I have the following mesh generation code:
Needs["NDSolve`FEM`"]
cylinOffset = 0.032;
cylinLength = 0.100;
cylinRadius = 0.001;
shellLength = 0.100;
shellRadius = 0.0365;
cylinA = Cylinder[{{-cylinOffset, 0, -cylinLength /2},
{-cylinOffset, 0, cylinLength /2}}, cylinRadius];
cylinB = Cylinder[{{cylinOffset, 0, -cylinLength /2},
{cylinOffset, 0, cylinLength /2}}, cylinRadius];
shell = Cylinder[{{0, 0, -shellLength /2}, {0, 0, shellLength /2}}, shellRadius];
bmeshShell = ToBoundaryMesh[shell]["Wireframe"];
bmeshCylinA = ToBoundaryMesh[cylinA]["Wireframe"];
bmeshCylinB = ToBoundaryMesh[cylinB]["Wireframe"];
Show[bmeshShell, bmeshCylinA, bmeshCylinB]
I'm quite confused on how to progress further. The following is an attempt to setup the boundary conditions of voltage potential and region where the equations should be evaluated, but I'm far away from a solution. Guidance would be very much appreciated.
reg = {bmeshShell, bmeshCylinA, bmeshCylinB};
sol = NDSolveValue[{Inactive[Laplacian][u[x, y, z], {x, y, z}] == 0,
DirichletCondition[bmeshShell == 0,
bmeshCylinA == bmeshCylinB == 30000]},
u, {x, y, z} \[Element] reg];
u[x, y, z]
to be zero at thebmeshShell
boundary and 30000 at the other two boundaries? I think the syntax of yourDirichletCondition
is not correct $\endgroup$sol = NDSolveValue[{Inactive[Laplacian][u[x, y, z], {x, y, z}] == 0, DirichletCondition[u[x, y, z] == 0, bmeshShell], DirichletCondition[u[x, y, z] == 30000, bmeshCylinA], DirichletCondition[u[x, y, z] == 30000, bmeshCylinB]}, u, {x, y, z} \[Element] shell]
but I still don't get it to give me an answer. Maybe we can get @user21 to take a look at this, he's the expert $\endgroup$reg = {bmeshShell, bmeshCylinA, bmeshCylinB}
is not how it works. I think I'd start expressing the region as anImplicitRegion
. $\endgroup$