(* Content-type: application/vnd.wolfram.mathematica *) (*** Wolfram Notebook File ***) (* http://www.wolfram.com/nb *) (* CreatedBy='Mathematica 11.3' *) (*CacheID: 234*) (* Internal cache information: NotebookFileLineBreakTest NotebookFileLineBreakTest NotebookDataPosition[ 158, 7] NotebookDataLength[ 6268, 178] NotebookOptionsPosition[ 5873, 160] NotebookOutlinePosition[ 6257, 177] CellTagsIndexPosition[ 6214, 174] WindowFrame->Normal*) (* Beginning of Notebook Content *) Notebook[{ Cell[BoxData[ RowBox[{"ClearAll", "[", "\"\\"", "]"}]], "Input", ExpressionUUID -> "ce652c00-1bc9-47e0-8fe0-0730b767abf5"], Cell[BoxData[{ RowBox[{ RowBox[{ RowBox[{ SubscriptBox["u", "1"], "[", "s_", "]"}], ":=", "0"}], ";"}], "\[IndentingNewLine]", RowBox[{ RowBox[{"NN", "=", "50"}], ";"}], "\[IndentingNewLine]", RowBox[{ RowBox[{"dt", "=", "0.1"}], ";"}], "\[IndentingNewLine]", RowBox[{ RowBox[{"\[Beta]", "=", "5"}], ";"}], "\[IndentingNewLine]", RowBox[{ RowBox[{"\[Nu]", "=", ".5"}], ";"}], "\[IndentingNewLine]", RowBox[{ RowBox[{ SubscriptBox["\[Phi]", "0"], "=", RowBox[{"\[Pi]", "/", "4"}]}], ";"}], "\[IndentingNewLine]", RowBox[{ RowBox[{"For", "[", RowBox[{ RowBox[{"i", "=", "1"}], ",", RowBox[{"i", "\[LessEqual]", "NN"}], ",", RowBox[{"i", "++"}], ",", "\[IndentingNewLine]", RowBox[{ RowBox[{ SubscriptBox["Sol", "i"], "=", RowBox[{ RowBox[{"NDSolve", "[", RowBox[{ RowBox[{"{", "\[IndentingNewLine]", RowBox[{ RowBox[{ RowBox[{ RowBox[{"x", "'"}], "[", "s", "]"}], "\[Equal]", RowBox[{"Sin", "[", RowBox[{"\[Phi]", "[", "s", "]"}], "]"}]}], ",", "\[IndentingNewLine]", RowBox[{ RowBox[{ RowBox[{"y", "'"}], "[", "s", "]"}], "\[Equal]", RowBox[{"Cos", "[", RowBox[{"\[Phi]", "[", "s", "]"}], "]"}]}], ",", "\[IndentingNewLine]", RowBox[{ RowBox[{ RowBox[{"\[Phi]", "'"}], "[", "s", "]"}], "\[Equal]", RowBox[{ SubscriptBox["u", "i"], "[", "s", "]"}]}], ",", "\[IndentingNewLine]", RowBox[{ RowBox[{"x", "[", "0", "]"}], "\[Equal]", "0"}], ",", RowBox[{ RowBox[{"y", "[", "0", "]"}], "\[Equal]", "0"}], ",", RowBox[{ RowBox[{"\[Phi]", "[", "0", "]"}], "\[Equal]", SubscriptBox["\[Phi]", "0"]}]}], "}"}], ",", "\[IndentingNewLine]", RowBox[{"{", RowBox[{ RowBox[{"x", "[", "s", "]"}], ",", RowBox[{"y", "[", "s", "]"}], ",", RowBox[{"\[Phi]", "[", "s", "]"}]}], "}"}], ",", RowBox[{"{", RowBox[{"s", ",", "0", ",", "2"}], "}"}]}], "]"}], "[", RowBox[{"[", "1", "]"}], "]"}]}], ";", "\[IndentingNewLine]", RowBox[{ SubscriptBox["u", RowBox[{"i", "+", "1"}]], "=", RowBox[{"FunctionInterpolation", "[", RowBox[{ RowBox[{ RowBox[{ RowBox[{ SubscriptBox["u", "i"], "[", "s", "]"}], "-", RowBox[{"dt", "*", RowBox[{"(", RowBox[{ RowBox[{"\[Beta]", "*", RowBox[{"Sin", "[", RowBox[{"\[Phi]", "[", "s", "]"}], "]"}]}], "+", RowBox[{"\[Nu]", " ", RowBox[{ SubscriptBox["u", "i"], "[", "s", "]"}]}]}], ")"}]}]}], "/.", SubscriptBox["Sol", "i"]}], ",", RowBox[{"{", RowBox[{"s", ",", "0", ",", "2"}], "}"}]}], "]"}]}], ";"}]}], "\[IndentingNewLine]", "]"}], ";"}]}], "Input", CellChangeTimes->{{3.736252814879816*^9, 3.736252951154855*^9}, { 3.736252982924046*^9, 3.736253090033083*^9}, {3.736253271938836*^9, 3.736253282713636*^9}, {3.7362533305192537`*^9, 3.736253331723877*^9}, { 3.736253394912327*^9, 3.73625344270321*^9}, {3.73625348631996*^9, 3.7362534929775543`*^9}, {3.736253717780077*^9, 3.736253737464397*^9}, { 3.73685761414143*^9, 3.736857760056992*^9}, {3.736857793998076*^9, 3.736857840388*^9}, {3.7368581691634703`*^9, 3.7368582027458344`*^9}, 3.736862447293046*^9, {3.789370883071252*^9, 3.7893709578590527`*^9}, { 3.789370994019388*^9, 3.7893710452972727`*^9}}, ExpressionUUID -> "5a9611e2-a180-41b8-8345-008761a85b73"], Cell["Plotting", "Text", CellChangeTimes->{{3.7362536511981564`*^9, 3.736253652187052*^9}, { 3.736253721471498*^9, 3.736253721649144*^9}, {3.736253766106793*^9, 3.7362537674574223`*^9}}, ExpressionUUID -> "9b27fc41-3333-4cf8-8aae-d5d0bc3ae8c8"], Cell[BoxData[ RowBox[{"Manipulate", "[", RowBox[{ RowBox[{"ParametricPlot", "[", RowBox[{ RowBox[{ RowBox[{"{", RowBox[{ RowBox[{"x", "[", "s", "]"}], ",", RowBox[{"y", "[", "s", "]"}]}], "}"}], "/.", SubscriptBox["Sol", "i"]}], ",", RowBox[{"{", RowBox[{"s", ",", "0", ",", "2"}], "}"}], ",", RowBox[{"PlotRange", "\[Rule]", RowBox[{"{", RowBox[{ RowBox[{"{", RowBox[{ RowBox[{"-", "1"}], ",", "2"}], "}"}], ",", RowBox[{"{", RowBox[{"0", ",", "2"}], "}"}]}], "}"}]}]}], "]"}], ",", RowBox[{"{", RowBox[{"i", ",", "1", ",", RowBox[{"NN", "-", "1"}], ",", "1"}], "}"}]}], "]"}]], "Input", CellChangeTimes->{{3.736253130951168*^9, 3.736253131231526*^9}, { 3.736253342846322*^9, 3.7362533503605633`*^9}, {3.736253385766016*^9, 3.7362533859097033`*^9}, {3.736253424712537*^9, 3.736253432755269*^9}, { 3.736253465112898*^9, 3.736253467596678*^9}, {3.736857688900659*^9, 3.73685768916431*^9}}, ExpressionUUID -> "47b3c577-2996-448b-b13d-14e11263a666"] }, WindowSize->{808, 911}, WindowMargins->{{28, Automatic}, {Automatic, 0}}, Magnification:>1.25 Inherited, FrontEndVersion->"11.0 for Mac OS X x86 (32-bit, 64-bit Kernel) (July 28, \ 2016)", StyleDefinitions->"Default.nb" ] (* End of Notebook Content *) (* Internal cache information *) (*CellTagsOutline CellTagsIndex->{} *) (*CellTagsIndex CellTagsIndex->{} *) (*NotebookFileOutline Notebook[{ Cell[558, 20, 135, 2, 39, "Input"], Cell[696, 24, 3807, 97, 430, "Input"], Cell[4506, 123, 251, 4, 37, "Text"], Cell[4760, 129, 1109, 29, 66, "Input"] } ] *)