XIAN-FEM-2026June/三维matlab代码/2022-11 PML&&ABC/二维极坐标变换3.nb

225 lines
7.2 KiB
Mathematica

(* Content-type: application/vnd.wolfram.mathematica *)
(*** Wolfram Notebook File ***)
(* http://www.wolfram.com/nb *)
(* CreatedBy='Mathematica 12.1' *)
(*CacheID: 234*)
(* Internal cache information:
NotebookFileLineBreakTest
NotebookFileLineBreakTest
NotebookDataPosition[ 158, 7]
NotebookDataLength[ 7213, 216]
NotebookOptionsPosition[ 6594, 196]
NotebookOutlinePosition[ 7035, 214]
CellTagsIndexPosition[ 6992, 211]
WindowFrame->Normal*)
(* Beginning of Notebook Content *)
Notebook[{
Cell[CellGroupData[{
Cell[BoxData[{
RowBox[{
RowBox[{"\[Epsilon]r", "=",
RowBox[{"{",
RowBox[{
RowBox[{"{",
RowBox[{"\[Epsilon]", ",", "0", ",", "0"}], "}"}], ",",
RowBox[{"{",
RowBox[{"0", ",", "\[Epsilon]", ",", "0"}], "}"}], ",",
RowBox[{"{",
RowBox[{"0", ",", "0", ",", "\[Epsilon]"}], "}"}]}], "}"}]}],
";"}], "\[IndentingNewLine]",
RowBox[{
RowBox[{"\[Epsilon]c", "=",
RowBox[{"\[Epsilon]", "*",
RowBox[{"{",
RowBox[{
RowBox[{"{",
RowBox[{"\[Rho]", ",", "0", ",", "0"}], "}"}], ",",
RowBox[{"{",
RowBox[{"0", ",",
RowBox[{"1", "/", "\[Rho]"}], ",", "0"}], "}"}], ",",
RowBox[{"{",
RowBox[{"0", ",", "0", ",", "\[Rho]"}], "}"}]}], "}"}]}]}],
";"}], "\[IndentingNewLine]",
RowBox[{
RowBox[{"A", "=",
RowBox[{"{",
RowBox[{
RowBox[{"{",
RowBox[{
RowBox[{"1", "/", "s"}], ",", "0", ",", "0"}], "}"}], ",",
RowBox[{"{",
RowBox[{"0", ",",
RowBox[{"1", "/", "\[Gamma]"}], ",", "0"}], "}"}], ",",
RowBox[{"{",
RowBox[{"0", ",", "0", ",", "1"}], "}"}]}], "}"}]}],
";"}], "\[IndentingNewLine]",
RowBox[{
RowBox[{"detA", "=",
RowBox[{"Det", "[", "A", "]"}]}], ";"}], "\[IndentingNewLine]",
RowBox[{"\[Epsilon]c2", "=",
RowBox[{
RowBox[{"Dot", "[",
RowBox[{
RowBox[{"Dot", "[",
RowBox[{"A", ",", "\[Epsilon]c"}], "]"}], ",", "A"}], "]"}], "/",
"detA"}]}], "\[IndentingNewLine]",
RowBox[{
RowBox[{"Acr", "=",
RowBox[{"{",
RowBox[{
RowBox[{"{",
RowBox[{
RowBox[{"Cos", "[", "\[Theta]", "]"}], ",",
RowBox[{
RowBox[{"-", "\[Rho]"}], "*",
RowBox[{"Sin", "[", "\[Theta]", "]"}]}], ",", "0"}], "}"}], ",",
RowBox[{"{",
RowBox[{
RowBox[{"Sin", "[", "\[Theta]", "]"}], ",",
RowBox[{"\[Rho]", "*",
RowBox[{"Cos", "[", "\[Theta]", "]"}]}], ",", "0"}], "}"}], ",",
RowBox[{"{",
RowBox[{"0", ",", "0", ",", "1"}], "}"}]}], "}"}]}],
";"}], "\[IndentingNewLine]",
RowBox[{
RowBox[{"Acrt", "=",
RowBox[{"Transpose", "[", "Acr", "]"}]}], ";"}], "\[IndentingNewLine]",
RowBox[{
RowBox[{"detAcr", "=", "\[Rho]"}], ";"}], "\[IndentingNewLine]",
RowBox[{"\[Epsilon]r2", "=",
RowBox[{
RowBox[{"Simplify", "[",
RowBox[{
RowBox[{"Dot", "[",
RowBox[{
RowBox[{"Dot", "[",
RowBox[{"Acr", ",", "\[Epsilon]c2"}], "]"}], ",", "Acrt"}], "]"}],
"/", "detAcr"}], "]"}], "//", "MatrixForm"}]}]}], "Input",
CellChangeTimes->{{3.8784402217024097`*^9, 3.8784402453104086`*^9}, {
3.878440326058539*^9, 3.8784403965948486`*^9}, {3.8784404366522737`*^9,
3.878440456332716*^9}, {3.878594347639612*^9, 3.8785943929514537`*^9}, {
3.8785944282330933`*^9, 3.8785944782155066`*^9}},
CellLabel->"In[20]:=",ExpressionUUID->"0a0210ff-e47b-4200-860b-f3e9b65237a9"],
Cell[BoxData[
RowBox[{"{",
RowBox[{
RowBox[{"{",
RowBox[{
FractionBox[
RowBox[{"\[Gamma]", " ", "\[Epsilon]", " ", "\[Rho]"}], "s"], ",", "0",
",", "0"}], "}"}], ",",
RowBox[{"{",
RowBox[{"0", ",",
FractionBox[
RowBox[{"s", " ", "\[Epsilon]"}],
RowBox[{"\[Gamma]", " ", "\[Rho]"}]], ",", "0"}], "}"}], ",",
RowBox[{"{",
RowBox[{"0", ",", "0", ",",
RowBox[{"s", " ", "\[Gamma]", " ", "\[Epsilon]", " ", "\[Rho]"}]}],
"}"}]}], "}"}]], "Output",
CellChangeTimes->{
3.878440326964399*^9, {3.878440381710183*^9, 3.878440397927933*^9}, {
3.8784404393473454`*^9, 3.878440459466902*^9}, 3.878594394555008*^9,
3.878594431126652*^9, 3.8785944825771284`*^9},
CellLabel->"Out[24]=",ExpressionUUID->"6094801b-f11b-4c7b-bc86-15fe3803222c"],
Cell[BoxData[
TagBox[
RowBox[{"(", "\[NoBreak]", GridBox[{
{
RowBox[{
FractionBox[
RowBox[{"\[Gamma]", " ", "\[Epsilon]", " ",
SuperscriptBox[
RowBox[{"Cos", "[", "\[Theta]", "]"}], "2"]}], "s"], "+",
FractionBox[
RowBox[{"s", " ", "\[Epsilon]", " ",
SuperscriptBox[
RowBox[{"Sin", "[", "\[Theta]", "]"}], "2"]}], "\[Gamma]"]}],
FractionBox[
RowBox[{
RowBox[{"(",
RowBox[{
RowBox[{"-",
SuperscriptBox["s", "2"]}], "+",
SuperscriptBox["\[Gamma]", "2"]}], ")"}], " ", "\[Epsilon]", " ",
RowBox[{"Cos", "[", "\[Theta]", "]"}], " ",
RowBox[{"Sin", "[", "\[Theta]", "]"}]}],
RowBox[{"s", " ", "\[Gamma]"}]], "0"},
{
FractionBox[
RowBox[{
RowBox[{"(",
RowBox[{
RowBox[{"-",
SuperscriptBox["s", "2"]}], "+",
SuperscriptBox["\[Gamma]", "2"]}], ")"}], " ", "\[Epsilon]", " ",
RowBox[{"Cos", "[", "\[Theta]", "]"}], " ",
RowBox[{"Sin", "[", "\[Theta]", "]"}]}],
RowBox[{"s", " ", "\[Gamma]"}]],
RowBox[{
FractionBox[
RowBox[{"s", " ", "\[Epsilon]", " ",
SuperscriptBox[
RowBox[{"Cos", "[", "\[Theta]", "]"}], "2"]}], "\[Gamma]"], "+",
FractionBox[
RowBox[{"\[Gamma]", " ", "\[Epsilon]", " ",
SuperscriptBox[
RowBox[{"Sin", "[", "\[Theta]", "]"}], "2"]}], "s"]}], "0"},
{"0", "0",
RowBox[{"s", " ", "\[Gamma]", " ", "\[Epsilon]"}]}
},
GridBoxAlignment->{"Columns" -> {{Center}}, "Rows" -> {{Baseline}}},
GridBoxSpacings->{"Columns" -> {
Offset[0.27999999999999997`], {
Offset[0.7]},
Offset[0.27999999999999997`]}, "Rows" -> {
Offset[0.2], {
Offset[0.4]},
Offset[0.2]}}], "\[NoBreak]", ")"}],
Function[BoxForm`e$,
MatrixForm[BoxForm`e$]]]], "Output",
CellChangeTimes->{
3.878440326964399*^9, {3.878440381710183*^9, 3.878440397927933*^9}, {
3.8784404393473454`*^9, 3.878440459466902*^9}, 3.878594394555008*^9,
3.878594431126652*^9, 3.8785944826359067`*^9},
CellLabel->
"Out[28]//MatrixForm=",ExpressionUUID->"fb56cc87-39eb-4552-bc2a-\
7ffcf5c67922"]
}, Open ]]
},
WindowSize->{999, 959},
WindowMargins->{{68, Automatic}, {Automatic, 6}},
Magnification:>1.4 Inherited,
FrontEndVersion->"12.1 for Microsoft Windows (64-bit) (2020\:5e743\:670814\
\:65e5)",
StyleDefinitions->"Default.nb",
ExpressionUUID->"a4b3b212-6991-446e-81e9-1060d51d7038"
]
(* End of Notebook Content *)
(* Internal cache information *)
(*CellTagsOutline
CellTagsIndex->{}
*)
(*CellTagsIndex
CellTagsIndex->{}
*)
(*NotebookFileOutline
Notebook[{
Cell[CellGroupData[{
Cell[580, 22, 2899, 84, 377, "Input",ExpressionUUID->"0a0210ff-e47b-4200-860b-f3e9b65237a9"],
Cell[3482, 108, 813, 21, 65, "Output",ExpressionUUID->"6094801b-f11b-4c7b-bc86-15fe3803222c"],
Cell[4298, 131, 2280, 62, 193, "Output",ExpressionUUID->"fb56cc87-39eb-4552-bc2a-7ffcf5c67922"]
}, Open ]]
}
]
*)