Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- circle = Disk[{4.5, 3}, 0.5];
- pin = Rectangle[{4, 0}, {5, 3}];
- square = Rectangle[{0, 0}, {9, 9}];
- region = RegionDifference[square, RegionUnion[circle, pin]];
- sol = NDSolveValue[{D[u[x, y], x, x] + D[u[x, y], y, y] == 0,
- bc},
- u, {x, y} [Element] region]
- DensityPlot[sol[x, y], {x, y} [Element] region, Mesh -> None,
- ColorFunction -> "Rainbow", PlotRange -> All,
- PlotLegends -> Automatic]
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement