Does anyone knows how to solve the Laplace equation in a Sphere domain and with the following boundary conditions: 
Consider alpha=0. I have tryed the following code, but i don't belive the boundary conditions are right(solution zero in all external boundary). I would also appreciate if anyone could please show me a good way to plot the solution in 3D. Thanks in advance!
mesh = DiscretizeRegion[Sphere[{0, 0, 0}]];
op = -Laplacian[u[x, y, z], {x, y, z}] - 2
Subscript[\[CapitalGamma],
D] = {DirichletCondition[u[x, y, z] == 0, Norm[{x, y, z}] >= 1]}
uif = NDSolveValue[{op == 0, Subscript[\[CapitalGamma], D]},
u, {x, y, z} \[Element] mesh]
Plot[uif[x, 0, 0], {x, -1, 1}]
Answer
may be this is your answer
mesh = BoundaryDiscretizeRegion[Ball[{0, 0, 0}]];
op = -Laplacian[u[x, y, z], {x, y, z}] - 2;
Subscript[\[CapitalGamma], D] = {DirichletCondition[u[x, y, z] == 0, True]};
uif = NDSolveValue[{op == 0, Subscript[\[CapitalGamma], D]}, u, {x, y, z} \[Element] mesh]
Addendum
I add the picture
Show[Plot3D[uif[x, y, 0], {x, -1, 1}, {y, -1, 1}], reg] // Quiet


Comments
Post a Comment