Quantcast
Viewing latest article 2
Browse Latest Browse All 3

Answer by Ulrich Neumann for Numerical solution of PDE with nonstandard boundary condition

Try an iterative solution using NestList

sol = NestList[NDSolveValue[{Laplacian[u[x, y], {x, y}] == 0, u[x, 0] == 1/2 Integrate[#[x, y], {y, 1/2, 2}], u[x, 2] == Sin[Pi x],DirichletCondition[u[x, y] == 0, x == 0 || x == 1]}, u, Element[{x, y}, Rectangle[{0, 0}, {1, 2}]]] &, 0 &, 10] // QuietPlot3D[ sol[[-1]] [x, y] , Element[{x, y}, Rectangle[{0, 0}, {1, 2}]],PlotRange -> All]

Image may be NSFW.
Clik here to view.
enter image description here

Iteration converges quite well

Plot3D[ sol[[-2 ]][x, y] - sol[[-1 ]][x, y],Element[{x, y}, Rectangle[{0, 0}, {1, 2}]], PlotRange -> All]

Image may be NSFW.
Clik here to view.
enter image description here

and fullfills the inetgral-bc

Plot[{sol[[-1]][x , 0],1/2 NIntegrate[sol[[-1]][x , yy], {yy, 1/2,2}]}, {x, 0, 1},PlotStyle -> {Blue, {Red, Dashed}}]

Image may be NSFW.
Clik here to view.
enter image description here


Viewing latest article 2
Browse Latest Browse All 3

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>