📄 mathematicsoftsunamis-source.nb
字号:
RowBox[{"2", " ", "3600"}]}], ";",
RowBox[{"nxy", "=", "50"}], ";", "\[IndentingNewLine]",
"\[IndentingNewLine]",
RowBox[{
RowBox[{"b", "[",
RowBox[{"\[Lambda]_", ",", "\[Phi]_"}], "]"}], ":=",
RowBox[{
RowBox[{"-", "4000"}], "+",
RowBox[{
RowBox[{"seamount", "[",
RowBox[{"3500", ",", "1000", ",",
RowBox[{"{",
RowBox[{
RowBox[{
RowBox[{"-", "2.5"}], " ", "\[Degree]"}], ",",
RowBox[{
RowBox[{"-", "25"}], " ", "\[Degree]"}]}], "}"}]}], "]"}], "[",
RowBox[{"\[Lambda]", ",", "\[Phi]"}], "]"}], "+",
RowBox[{
RowBox[{"seamount", "[",
RowBox[{"3000", ",", "1000", ",",
RowBox[{"{",
RowBox[{
RowBox[{
RowBox[{"-", "5"}], " ", "\[Degree]"}], ",",
RowBox[{
RowBox[{"-", "23"}], " ", "\[Degree]"}]}], "}"}]}], "]"}], "[",
RowBox[{"\[Lambda]", ",", "\[Phi]"}], "]"}], "+",
RowBox[{
RowBox[{"seamount", "[",
RowBox[{"3000", ",", "1000", ",",
RowBox[{"{",
RowBox[{
RowBox[{
RowBox[{"-", "7.5"}], " ", "\[Degree]"}], ",",
RowBox[{
RowBox[{"-", "27"}], " ", "\[Degree]"}]}], "}"}]}], "]"}], "[",
RowBox[{"\[Lambda]", ",", "\[Phi]"}], "]"}], "+",
RowBox[{
RowBox[{"seamount", "[",
RowBox[{"3000", ",", "1000", ",",
RowBox[{"{",
RowBox[{
RowBox[{"5", " ", "\[Degree]"}], ",",
RowBox[{
RowBox[{"-", "24"}], " ", "\[Degree]"}]}], "}"}]}], "]"}], "[",
RowBox[{"\[Lambda]", ",", "\[Phi]"}], "]"}], "+",
RowBox[{
RowBox[{"seamount", "[",
RowBox[{"3000", ",", "1000", ",",
RowBox[{"{",
RowBox[{
RowBox[{"5", " ", "\[Degree]"}], ",",
RowBox[{
RowBox[{"-", "21"}], " ", "\[Degree]"}]}], "}"}]}], "]"}], "[",
RowBox[{"\[Lambda]", ",", "\[Phi]"}], "]"}], "+",
RowBox[{
RowBox[{"seamount", "[",
RowBox[{"3000", ",", "1000", ",",
RowBox[{"{",
RowBox[{
RowBox[{"5", " ", "\[Degree]"}], ",",
RowBox[{
RowBox[{"-", "18"}], " ", "\[Degree]"}]}], "}"}]}], "]"}], "[",
RowBox[{"\[Lambda]", ",", "\[Phi]"}], "]"}], "+",
RowBox[{
RowBox[{"seamount", "[",
RowBox[{"3000", ",", "1000", ",",
RowBox[{"{",
RowBox[{
RowBox[{"5", " ", "\[Degree]"}], ",",
RowBox[{
RowBox[{"-", "15"}], " ", "\[Degree]"}]}], "}"}]}], "]"}], "[",
RowBox[{"\[Lambda]", ",", "\[Phi]"}], "]"}], "+",
RowBox[{
RowBox[{"seamount", "[",
RowBox[{"3000", ",", "1000", ",",
RowBox[{"{",
RowBox[{
RowBox[{"5", " ", "\[Degree]"}], ",",
RowBox[{
RowBox[{"-", "12"}], " ", "\[Degree]"}]}], "}"}]}], "]"}], "[",
RowBox[{"\[Lambda]", ",", "\[Phi]"}], "]"}], "+",
RowBox[{
RowBox[{"seamount", "[",
RowBox[{"3750", ",", "1000", ",",
RowBox[{"{",
RowBox[{
RowBox[{
RowBox[{"-", "2"}], " ", "\[Degree]"}], ",",
RowBox[{
RowBox[{"-", "18"}], " ", "\[Degree]"}]}], "}"}]}], "]"}], "[",
RowBox[{"\[Lambda]", ",", "\[Phi]"}], "]"}]}]}], ";",
"\[IndentingNewLine]", "\[IndentingNewLine]",
RowBox[{"SeedRandom", "[", "2004", "]"}], ";", "\[IndentingNewLine]",
"\[IndentingNewLine]",
RowBox[{"seabed", "=",
RowBox[{"Plot3D", "[",
RowBox[{
RowBox[{".001", " ",
RowBox[{"b", "[",
RowBox[{"u", ",", "v"}], "]"}]}], ",",
RowBox[{"{",
RowBox[{"v", ",",
SubscriptBox["\[Phi]", "min"], ",",
SubscriptBox["\[Phi]", "max"]}], "}"}], ",",
RowBox[{"{",
RowBox[{"u", ",",
SubscriptBox["\[Lambda]", "min"], ",",
SubscriptBox["\[Lambda]", "max"]}], "}"}], ",",
RowBox[{"PlotRange", "\[Rule]", "All"}], ",",
RowBox[{"PlotPoints", "\[Rule]", "nxy"}], ",",
RowBox[{"Mesh", "\[Rule]", "None"}], ",",
RowBox[{"MaxRecursion", "\[Rule]", "0"}], ",",
RowBox[{"ColorFunction", "\[Rule]",
RowBox[{"(",
RowBox[{
RowBox[{"Blend", "[",
RowBox[{
RowBox[{"{",
RowBox[{"Brown", ",",
RowBox[{"RGBColor", "[",
RowBox[{"0", ",", "0.25", ",", "0"}], "]"}], ",", "White"}],
"}"}], ",",
RowBox[{"#3", "+",
RowBox[{"RandomReal", "[", ".1", "]"}]}]}], "]"}], "&"}],
")"}]}]}], "]"}]}], ";", "\[IndentingNewLine]",
RowBox[{"seabedcontour", "=",
RowBox[{"ContourPlot", "[",
RowBox[{
RowBox[{"b", "[",
RowBox[{"u", ",", "v"}], "]"}], ",",
RowBox[{"{",
RowBox[{"v", ",",
SubscriptBox["\[Phi]", "min"], ",",
SubscriptBox["\[Phi]", "max"]}], "}"}], ",",
RowBox[{"{",
RowBox[{"u", ",",
SubscriptBox["\[Lambda]", "min"], ",",
SubscriptBox["\[Lambda]", "max"]}], "}"}], ",",
RowBox[{"PlotRange", "\[Rule]", "All"}], ",",
RowBox[{"PlotPoints", "\[Rule]", "nxy"}], ",",
RowBox[{"Mesh", "\[Rule]", "None"}], ",",
RowBox[{"MaxRecursion", "\[Rule]", "1"}], ",",
RowBox[{"ContourShading", "\[Rule]", "None"}], ",",
RowBox[{"ContourStyle", "\[Rule]",
RowBox[{"Opacity", "[", ".15", "]"}]}], ",",
RowBox[{"Contours", "\[Rule]",
RowBox[{"{",
RowBox[{
RowBox[{"-", "3500"}], ",",
RowBox[{"-", "3000"}], ",",
RowBox[{"-", "2500"}], ",",
RowBox[{"-", "2000"}], ",",
RowBox[{"-", "1500"}], ",",
RowBox[{"-", "1000"}], ",",
RowBox[{"-", "500"}]}], "}"}]}]}], "]"}]}], ";",
"\[IndentingNewLine]", "\[IndentingNewLine]",
RowBox[{"swe", "=",
RowBox[{"{",
RowBox[{
RowBox[{
RowBox[{
RowBox[{
SubscriptBox["\[PartialD]", "t"],
RowBox[{"h", "[",
RowBox[{"\[Lambda]", ",", "\[Phi]", ",", "t"}], "]"}]}], "+",
FractionBox[
RowBox[{
RowBox[{
SubscriptBox["\[PartialD]", "\[Lambda]"],
RowBox[{"(",
RowBox[{
RowBox[{"u", "[",
RowBox[{"\[Lambda]", ",", "\[Phi]", ",", "t"}], "]"}], " ",
RowBox[{"(",
RowBox[{
RowBox[{"h", "[",
RowBox[{"\[Lambda]", ",", "\[Phi]", ",", "t"}], "]"}], "-",
RowBox[{"b", "[",
RowBox[{"\[Lambda]", ",", "\[Phi]"}], "]"}]}], ")"}]}],
")"}]}], "+",
RowBox[{
SubscriptBox["\[PartialD]", "\[Phi]"],
RowBox[{"(",
RowBox[{
RowBox[{"v", "[",
RowBox[{"\[Lambda]", ",", "\[Phi]", ",", "t"}], "]"}], " ",
RowBox[{"(",
RowBox[{
RowBox[{"h", "[",
RowBox[{"\[Lambda]", ",", "\[Phi]", ",", "t"}], "]"}], "-",
RowBox[{"b", "[",
RowBox[{"\[Lambda]", ",", "\[Phi]"}], "]"}]}], ")"}], " ",
RowBox[{"Cos", "[", "\[Phi]", "]"}]}], ")"}]}]}],
RowBox[{"R", " ",
RowBox[{"Cos", "[", "\[Phi]", "]"}]}]]}], "\[Equal]", "0"}], ",",
RowBox[{
RowBox[{
FractionBox[
RowBox[{
RowBox[{
SubscriptBox["\[PartialD]", "\[Phi]"],
RowBox[{"u", "[",
RowBox[{"\[Lambda]", ",", "\[Phi]", ",", "t"}], "]"}]}], " ",
RowBox[{"v", "[",
RowBox[{"\[Lambda]", ",", "\[Phi]", ",", "t"}], "]"}]}], "R"],
"+",
FractionBox[
RowBox[{"g", " ",
RowBox[{
SubscriptBox["\[PartialD]", "\[Lambda]"],
RowBox[{"h", "[",
RowBox[{"\[Lambda]", ",", "\[Phi]", ",", "t"}], "]"}]}]}],
RowBox[{"R", " ",
RowBox[{"Cos", "[", "\[Phi]", "]"}]}]], "+",
RowBox[{
SubscriptBox["\[PartialD]", "t"],
RowBox[{"u", "[",
RowBox[{"\[Lambda]", ",", "\[Phi]", ",", "t"}], "]"}]}], "+",
FractionBox[
RowBox[{
RowBox[{"u", "[",
RowBox[{"\[Lambda]", ",", "\[Phi]", ",", "t"}], "]"}], " ",
RowBox[{
SubscriptBox["\[PartialD]", "\[Lambda]"],
RowBox[{"u", "[",
RowBox[{"\[Lambda]", ",", "\[Phi]", ",", "t"}], "]"}]}]}],
RowBox[{"R", " ",
RowBox[{"Cos", "[", "\[Phi]", "]"}]}]]}], "\[Equal]",
RowBox[{"f", " ",
RowBox[{"v", "[",
RowBox[{"\[Lambda]", ",", "\[Phi]", ",", "t"}], "]"}]}]}], ",",
RowBox[{
RowBox[{
FractionBox[
RowBox[{
RowBox[{
SubscriptBox["\[PartialD]", "\[Phi]"],
RowBox[{"v", "[",
RowBox[{"\[Lambda]", ",", "\[Phi]", ",", "t"}], "]"}]}], " ",
RowBox[{"v", "[",
RowBox[{"\[Lambda]", ",", "\[Phi]", ",", "t"}], "]"}]}], "R"],
"+",
FractionBox[
RowBox[{"g", " ",
RowBox[{
SubscriptBox["\[PartialD]", "\[Phi]"],
RowBox[{"h", "[",
RowBox[{"\[Lambda]", ",", "\[Phi]", ",", "t"}], "]"}]}]}],
"R"], "+",
RowBox[{
SubscriptBox["\[PartialD]", "t"],
RowBox[{"v", "[",
RowBox[{"\[Lambda]", ",", "\[Phi]", ",", "t"}], "]"}]}], "+",
FractionBox[
RowBox[{
RowBox[{"u", "[",
RowBox[{"\[Lambda]", ",", "\[Phi]", ",", "t"}], "]"}], " ",
RowBox[{
SubscriptBox["\[PartialD]", "\[Lambda]"],
RowBox[{"v", "[",
RowBox[{"\[Lambda]", ",", "\[Phi]", ",", "t"}], "]"}]}]}],
RowBox[{"R", " ",
RowBox[{"Cos", "[", "\[Phi]", "]"}]}]]}], "\[Equal]",
RowBox[{
RowBox[{"-", "f"}], " ",
RowBox[{"u", "[",
RowBox[{"\[Lambda]", ",", "\[Phi]", ",", "t"}], "]"}]}]}]}],
"}"}]}], ";", "\[IndentingNewLine]", "\[IndentingNewLine]",
RowBox[{"Block", "[",
RowBox[{
RowBox[{"{",
RowBox[{
RowBox[{"R", "=", "6378000"}], ",",
RowBox[{"\[Omega]", "=",
FractionBox[
RowBox[{"2", " ", "\[Pi]"}],
RowBox[{"24", " ", "3600"}]]}], ",",
RowBox[{"f", "=",
RowBox[{"2", " ", "\[Omega]", " ",
RowBox[{"Sin", "[", "\[Phi]", "]"}]}]}], ",",
RowBox[{"g", "=", "9.8"}], ",",
RowBox[{"s", "=", ".95"}]}], "}"}], ",",
RowBox[{"sol", "=",
RowBox[{"First", "[",
RowBox[{"h", "/.", "\[InvisibleSpace]",
RowBox[{"NDSolve", "[",
RowBox[{
RowBox[{"{",
RowBox[{"swe", ",",
RowBox[{
RowBox[{"h", "[",
RowBox[{"\[Lambda]", ",", "\[Phi]", ",", "0"}], "]"}],
"\[Equal]",
SuperscriptBox["\[ExponentialE]",
RowBox[{
RowBox[{"-", "2000"}], " ",
SuperscriptBox[
RowBox[{
RowBox[{"ldist", "[",
RowBox[{
RowBox[{"{",
RowBox[{
SubscriptBox["\[Lambda]", "e"], ",",
SubscriptBox["\[Phi]", "1"]}], "}"}], ",",
RowBox[{"{",
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -