Solving a wave equation over the Black Sea shaped region
It works with Edmund's suggestion, only the initial state is changed to
u[0, x, y] == Exp[-10 ((x - 44)^2 + (y - 31)^2)]
.
Coordinates {44, 31}
are inside the Black Sea.
For the sake of simplicity I've restricted the region to the western third of the sea.
Ω = DiscretizeRegion[Entity["Ocean", "BlackSea"]["Polygon"] /. GeoPosition -> Identity,
{{40, 50}, {27, 33}}]
Here is the solution for {t,0,4}
:
EDIT: Another gif with 100 frames and PlotPoints -> 50
If you use something like this:
Needs["NDSolve`FEM`"];
dg = DiscretizeGraphics[
Entity["Ocean", "BlackSea"]["Polygon"] /.
GeoPosition -> Identity];
mesh = ToElementMesh[dg, MaxCellMeasure -> 0.005 (*, "MeshOrder"->1 *)]
You will be able to refine the mesh to your needs. This will then do the time integration and monitor it's progress:
Monitor[uifWave =
NDSolveValue[{D[u[t, x, y], t, t] -
Inactive[Laplacian][u[t, x, y], {x, y}] == 0,
u[0, x, y] == Exp[-10 ((x - 44)^2 + (y - 31)^2)],
Derivative[1, 0, 0][u][0, x, y] == 0,
DirichletCondition[u[t, x, y] == 0, True]},
u, {t, 0, 2}, {x, y} \[Element] mesh,
EvaluationMonitor :> (monitor = Row[{"t = ", CForm[t]}])], monitor]
For completeness:
framesWEQ =
Table[Plot3D[uifWave[t, x, y], {x, y} \[Element] dg,
PlotRange -> {-1, 1}, Boxed -> False, Axes -> False,
Mesh -> None], {t, 0, 2, 2/50}];
Manipulate[framesWEQ[[i]], {{i, 16, "time"}, 1, Length[framesWEQ], 1},
SaveDefinitions -> True]