Quantcast
Channel: Numerical solution of PDE with nonstandard boundary condition - Mathematica Stack Exchange
Viewing all articles
Browse latest Browse all 3

Answer by Alex Trounev for Numerical solution of PDE with nonstandard boundary condition

$
0
0

Solution with iterative method in a loop

U[0][x_, y_] := Sin[Pi  x] Exp[- Pi  y];Do[U[i] =    NDSolveValue[{f =       Interpolation[       Table[{x,          NIntegrate[U[i - 1][x, y], {y, 1/2, 2}, AccuracyGoal -> 5,           PrecisionGoal -> 4]}, {x, 0, 1, .1}]];      Laplacian[u[x, y], {x, y}] == 0, u[0, y] == 0, u[1, y] == 0,      u[x, 2] == Sin[Pi x], u[x, 0] == 1/2  f[x]},     u, {x, 0, 1}, {y, 0, 2}];, {i, 1, 10}]

Visualization

{Plot[Evaluate[Table[U[i][x, 0], {i, 1, n}]], {x, 0, 1},   PlotLegends -> Automatic],  Plot3D[U[n][x, y], {x, 0, 1}, {y, 0, 2}, ColorFunction -> "Rainbow",   PlotTheme -> "Marketing", PlotRange -> All, MeshStyle -> White]} 

Figure 1


Viewing all articles
Browse latest Browse all 3

Trending Articles



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