Skip to content

Commit

Permalink
plot interface stiffness dependence of the transmission coefficient
Browse files Browse the repository at this point in the history
  • Loading branch information
mualal committed Nov 20, 2023
1 parent 2d4db24 commit 146cd01
Showing 1 changed file with 235 additions and 0 deletions.
235 changes: 235 additions & 0 deletions mathematica/chain-chain-interface.nb
Original file line number Diff line number Diff line change
@@ -0,0 +1,235 @@
Notebook[{

Cell[CellGroupData[{
Cell["Explore analytical solution for transmission coefficient", \
"Section",ExpressionUUID->"a212bb5e-2f78-42cf-8128-f1a040147cd4"],

Cell[BoxData[
RowBox[{
RowBox[{"SetOptions", "[",
RowBox[{
RowBox[{"EvaluationNotebook", "[", "]"}], ",",
RowBox[{"CellEpilog", ":>",
RowBox[{"SelectionMove", "[",
RowBox[{
RowBox[{"NextCell", "[",
RowBox[{"CellStyle", "->", "\"\<Input\>\""}], "]"}], ",", "All", ",",
"Cell"}], "]"}]}]}], "]"}], ";"}]], "Input",
CellLabel->"In[1]:=",ExpressionUUID->"f2dc6d6d-df04-498b-9295-85a257445e37"],

Cell[BoxData[
RowBox[{"ClearAll", "[", "\"\<Global`*\>\"", "]"}]], "Input",
CellLabel->"In[2]:=",ExpressionUUID->"e35c866c-4b23-4ca6-a732-a267f46e3a19"],

Cell[BoxData[{
RowBox[{
RowBox[{"m1", " ", ":=", "1.0"}], ";"}], "\[IndentingNewLine]",
RowBox[{
RowBox[{"m2", " ", ":=", "0.5"}], ";"}], "\[IndentingNewLine]",
RowBox[{
RowBox[{"c1", ":=", "1.0"}], ";"}], "\[IndentingNewLine]",
RowBox[{
RowBox[{"c2", ":=", "1.0"}], ";"}], "\[IndentingNewLine]",
RowBox[{
RowBox[{"d1", ":=", "0.0"}], ";"}], "\[IndentingNewLine]",
RowBox[{
RowBox[{"d2", ":=", "0.0"}], ";"}], "\[IndentingNewLine]",
RowBox[{
RowBox[{"a", ":=", "1"}], ";"}], "\[IndentingNewLine]",
RowBox[{
RowBox[{"\[CapitalOmega]", ":=", "1"}], ";"}]}], "Input",
CellLabel->"In[3]:=",ExpressionUUID->"91322149-d3f0-4ffa-af92-11bf5874d479"],

Cell[BoxData[{
RowBox[{
RowBox[{"k1", ":=",
RowBox[{
RowBox[{"2", "/", "a"}], "*",
RowBox[{"ArcSin", "[",
RowBox[{"Sqrt", "[",
RowBox[{
RowBox[{"(",
RowBox[{
RowBox[{"m1", "*",
SuperscriptBox["\[CapitalOmega]", "2"]}], "-", "d1"}], ")"}], "/",
RowBox[{"(",
RowBox[{"4", "*", "c1"}], ")"}]}], "]"}], "]"}]}]}],
";"}], "\[IndentingNewLine]",
RowBox[{
RowBox[{"k2", " ", ":=", " ",
RowBox[{
RowBox[{"2", "/", "a"}], "*",
RowBox[{"ArcSin", "[",
RowBox[{"Sqrt", "[",
RowBox[{
RowBox[{"(",
RowBox[{
RowBox[{"m2", "*",
SuperscriptBox["\[CapitalOmega]", "2"]}], "-", "d2"}], ")"}], "/",
RowBox[{"(",
RowBox[{"4", "*", "c2"}], ")"}]}], "]"}], "]"}]}]}], ";"}]}], "Input",

CellLabel->"In[11]:=",ExpressionUUID->"9a5cf24a-3ef6-4274-95fc-196bc83fcc54"],

Cell["\<\
g1 := a*c1*Sin[k1*a]/(m1*\[CapitalOmega]);
g2 := a*c2*Sin[k2*a]/(m2*\[CapitalOmega]);\
\>", "Text",
CellLabel->
"In[125]:=",ExpressionUUID->"9146be8c-706c-450f-b03d-30c5ff36c465"],

Cell[BoxData[{
RowBox[{
RowBox[{"g1", ":=",
RowBox[{
RowBox[{"a", "/",
RowBox[{"(",
RowBox[{"2", "*", "\[CapitalOmega]"}], ")"}]}], "*",
RowBox[{"Sqrt", "[",
RowBox[{
RowBox[{"(",
RowBox[{
SuperscriptBox["\[CapitalOmega]", "2"], "-",
RowBox[{"d1", "/", "m1"}]}], ")"}], "*",
RowBox[{"(",
RowBox[{
RowBox[{
RowBox[{"(",
RowBox[{
RowBox[{"4", "*", "c1"}], "+", "d1"}], ")"}], "/", "m1"}], "-",
SuperscriptBox["\[CapitalOmega]", "2"]}], ")"}]}], "]"}]}]}],
";"}], "\[IndentingNewLine]",
RowBox[{
RowBox[{"g2", ":=",
RowBox[{
RowBox[{"a", "/",
RowBox[{"(",
RowBox[{"2", "*", "\[CapitalOmega]"}], ")"}]}], "*",
RowBox[{"Sqrt", "[",
RowBox[{
RowBox[{"(",
RowBox[{
SuperscriptBox["\[CapitalOmega]", "2"], "-",
RowBox[{"d2", "/", "m2"}]}], ")"}], "*",
RowBox[{"(",
RowBox[{
RowBox[{
RowBox[{"(",
RowBox[{
RowBox[{"4", "*", "c2"}], "+", "d2"}], ")"}], "/", "m2"}], "-",
SuperscriptBox["\[CapitalOmega]", "2"]}], ")"}]}], "]"}]}]}],
";"}]}], "Input",
CellLabel->"In[13]:=",ExpressionUUID->"b7373df1-cf31-4c23-b1c6-abf940ed40f2"],

Cell[BoxData[
RowBox[{"Plot", "[",
RowBox[{
RowBox[{
FractionBox[
RowBox[{"m2", "*", "g2"}],
RowBox[{"m1", "*", "g1"}]], "*",
SuperscriptBox[
RowBox[{"(",
RowBox[{"Abs", "[",
FractionBox[
RowBox[{"2", "*", "\[ImaginaryI]", "*", "c12", "*",
RowBox[{"Sin", "[",
RowBox[{"k1", "*", "a"}], "]"}]}],
RowBox[{
RowBox[{"c12", "*",
RowBox[{"(",
RowBox[{"1", "-",
SuperscriptBox["\[ExponentialE]",
RowBox[{
RowBox[{"-", "\[ImaginaryI]"}], "*", "k1", "*", "a"}]]}],
")"}]}], "+",
RowBox[{"c2", "*",
RowBox[{"(",
RowBox[{
SuperscriptBox["\[ExponentialE]",
RowBox[{"\[ImaginaryI]", "*", "k2", "*", "a"}]], "-", "1"}],
")"}], "*",
RowBox[{"(",
RowBox[{"1", "+",
RowBox[{
SuperscriptBox["\[ExponentialE]",
RowBox[{
RowBox[{"-", "\[ImaginaryI]"}], "*", "k1", "*", "a"}]], "*",
RowBox[{
RowBox[{"(",
RowBox[{"c12", "-", "c1"}], ")"}], "/", "c1"}]}]}], ")"}]}]}]],
"]"}], ")"}], "2"]}], ",",
RowBox[{"{",
RowBox[{"c12", ",",
RowBox[{"-", "5"}], ",", "5"}], "}"}], ",",
RowBox[{"PlotRange", "->", "Full"}]}], "]"}]], "Input",
CellLabel->"In[15]:=",ExpressionUUID->"1dc3ab30-2b3d-46a0-9a3a-fc40ef4cd361"],

Cell[BoxData[
RowBox[{
RowBox[{"c12", ":=", "3.0"}], ";"}]], "Input",
CellLabel->"In[16]:=",ExpressionUUID->"80657bc1-c856-4d9d-9c6e-9d8d8e355044"],

Cell[BoxData[
RowBox[{
FractionBox[
RowBox[{"m2", "*", "g2"}],
RowBox[{"m1", "*", "g1"}]], "*",
SuperscriptBox[
RowBox[{"(",
RowBox[{"Abs", "[",
FractionBox[
RowBox[{"2", "*", "\[ImaginaryI]", "*", "c12", "*",
RowBox[{"Sin", "[",
RowBox[{"k1", "*", "a"}], "]"}]}],
RowBox[{
RowBox[{"c12", "*",
RowBox[{"(",
RowBox[{"1", "-",
SuperscriptBox["\[ExponentialE]",
RowBox[{
RowBox[{"-", "\[ImaginaryI]"}], "*", "k1", "*", "a"}]]}], ")"}]}],
"+",
RowBox[{"c2", "*",
RowBox[{"(",
RowBox[{
SuperscriptBox["\[ExponentialE]",
RowBox[{"\[ImaginaryI]", "*", "k2", "*", "a"}]], "-", "1"}], ")"}],
"*",
RowBox[{"(",
RowBox[{"1", "+",
RowBox[{
SuperscriptBox["\[ExponentialE]",
RowBox[{
RowBox[{"-", "\[ImaginaryI]"}], "*", "k1", "*", "a"}]], "*",
RowBox[{
RowBox[{"(",
RowBox[{"c12", "-", "c1"}], ")"}], "/", "c1"}]}]}], ")"}]}]}]],
"]"}], ")"}], "2"]}]], "Input",
CellLabel->"In[17]:=",ExpressionUUID->"1a1741c9-5cbb-4861-9ccf-60bab87ae76b"],

Cell[BoxData["k1"], "Input",
CellLabel->"In[18]:=",ExpressionUUID->"50237599-4bbc-4a80-a3c8-81a7594f8137"],

Cell[BoxData["k2"], "Input",
CellLabel->"In[19]:=",ExpressionUUID->"c66f02f4-d50b-4bb9-ac94-c4e5d3187f04"],

Cell[BoxData["g1"], "Input",
CellLabel->"In[20]:=",ExpressionUUID->"5c6b304b-3ff5-4550-8340-ccecf79ca927"],

Cell[BoxData["g2"], "Input",
CellLabel->
"In[21]:=",ExpressionUUID->"0fd12293-1afb-49ac-858f-e7a82bf92d62"]
}, Open ]]
},
WindowSize->{1131, 718},
WindowMargins->{{77, Automatic}, {Automatic, 43}},
PrivateNotebookOptions->{"FileOutlineCache"->False},
CellEpilog:>SelectionMove[
NextCell[CellStyle -> "Input"], All, Cell],
TrackCellChangeTimes->False,
FrontEndVersion->"13.2 for Mac OS X x86 (64-bit) (November 18, 2022)",
StyleDefinitions->"Default.nb",
ExpressionUUID->"527c49bb-e559-4299-bcfd-5bed17efcf41"
]

0 comments on commit 146cd01

Please sign in to comment.