(* Content-type: application/mathematica *) (*** Wolfram Notebook File ***) (* http://www.wolfram.com/nb *) (* CreatedBy='Mathematica 7.0' *) (*CacheID: 234*) (* Internal cache information: NotebookFileLineBreakTest NotebookFileLineBreakTest NotebookDataPosition[ 145, 7] NotebookDataLength[ 50325, 1498] NotebookOptionsPosition[ 48074, 1417] NotebookOutlinePosition[ 48431, 1433] CellTagsIndexPosition[ 48388, 1430] WindowFrame->Normal*) (* Beginning of Notebook Content *) Notebook[{ Cell[CellGroupData[{ Cell["set up the system", "Section"], Cell["This loads the package.", "MathCaption", CellID->836781195], Cell[BoxData[ RowBox[{"<<", "AtomicDensityMatrix`"}]], "Input", CellID->2058623809], Cell[TextData[{ "We define an atomic system consisting of two even-parity lower states and \ two odd-parity upper states. We apply a light field with components at \ frequencies ", Cell[BoxData[ FormBox[ StyleBox[ SubscriptBox["\[Omega]", "1"], "InlineMath"], TraditionalForm]]], " (near resonant with the ", Cell[BoxData[ StyleBox[ RowBox[{ RowBox[{ RowBox[{ RowBox[{"|", "1"}], "\[RightAngleBracket]"}], "\[Rule]", RowBox[{"|", "3"}]}], "\[RightAngleBracket]"}], "InlineMath"]]], " transition), ", Cell[BoxData[ FormBox[ StyleBox[ SubscriptBox["\[Omega]", "2"], "InlineMath"], TraditionalForm]]], " and ", Cell[BoxData[ FormBox[ StyleBox[ SubscriptBox["\[Omega]", "3"], "InlineMath"], TraditionalForm]]], "(near resonant with the ", Cell[BoxData[ StyleBox[ RowBox[{ RowBox[{ RowBox[{ RowBox[{"|", "2"}], "\[RightAngleBracket]"}], "\[Rule]", RowBox[{"|", "3"}]}], "\[RightAngleBracket]"}], "InlineMath"]]], " transition)\[AliasDelimiter]." }], "Text", CellChangeTimes->{{3.524013673755671*^9, 3.524013697746722*^9}}, CellID->525777075], Cell["\<\ Define the atomic system. Three level \[CapitalLambda] system\ \>", "MathCaption", CellID->429217524], Cell[BoxData[ RowBox[{ RowBox[{"system", "=", RowBox[{"{", "\[IndentingNewLine]", RowBox[{ RowBox[{"AtomicState", "[", RowBox[{"1", ",", RowBox[{"NaturalWidth", "\[Rule]", "0"}], ",", RowBox[{"Parity", "\[Rule]", "Even"}]}], "]"}], ",", "\[IndentingNewLine]", RowBox[{"AtomicState", "[", RowBox[{"2", ",", RowBox[{"NaturalWidth", "\[Rule]", "0"}], ",", RowBox[{"Parity", "\[Rule]", "Even"}]}], "]"}], ",", "\[IndentingNewLine]", RowBox[{"AtomicState", "[", RowBox[{"3", ",", RowBox[{"NaturalWidth", "\[Rule]", "\[CapitalGamma]"}], ",", RowBox[{"Energy", "\[Rule]", "0"}], ",", RowBox[{ RowBox[{"BranchingRatio", "[", "1", "]"}], "\[Rule]", RowBox[{"1", "/", "2"}]}], ",", RowBox[{ RowBox[{"BranchingRatio", "[", "2", "]"}], "\[Rule]", RowBox[{"1", "/", "2"}]}], ",", RowBox[{"Parity", "\[Rule]", "Odd"}]}], "]"}]}], "\[IndentingNewLine]", "}"}]}], ";"}]], "Input", CellID->433132487], Cell["\<\ Define the optical field. Field (1) is probe, fields (2) and (3) are pumps\ \>", "MathCaption", CellID->133602844], Cell[CellGroupData[{ Cell[BoxData[ RowBox[{"field", "=", RowBox[{ RowBox[{"OpticalField", "[", RowBox[{"\[Omega]1", ",", RowBox[{"{", RowBox[{ RowBox[{"\[CapitalOmega]1", "/", RowBox[{"ReducedME", "[", RowBox[{"1", ",", RowBox[{"{", RowBox[{"Dipole", ",", "1"}], "}"}], ",", "3"}], "]"}]}], ",", "\[Phi]1"}], "}"}]}], "]"}], "+", RowBox[{"OpticalField", "[", RowBox[{"\[Omega]2", ",", RowBox[{"{", RowBox[{ RowBox[{"\[CapitalOmega]2", "/", RowBox[{"ReducedME", "[", RowBox[{"2", ",", RowBox[{"{", RowBox[{"Dipole", ",", "1"}], "}"}], ",", "3"}], "]"}]}], ",", "\[Phi]2"}], "}"}]}], "]"}]}]}]], "Input", CellChangeTimes->{3.524259583801378*^9}], Cell[BoxData[ RowBox[{"{", RowBox[{ RowBox[{ FractionBox[ RowBox[{ SuperscriptBox["\[ExponentialE]", RowBox[{"\[ImaginaryI]", " ", RowBox[{"(", RowBox[{"\[Phi]1", "-", RowBox[{"t", " ", "\[Omega]1"}]}], ")"}]}]], " ", "\[CapitalOmega]1"}], RowBox[{"ReducedME", "[", RowBox[{"1", ",", RowBox[{"{", RowBox[{"Dipole", ",", "1"}], "}"}], ",", "3"}], "]"}]], "+", FractionBox[ RowBox[{ SuperscriptBox["\[ExponentialE]", RowBox[{"\[ImaginaryI]", " ", RowBox[{"(", RowBox[{"\[Phi]2", "-", RowBox[{"t", " ", "\[Omega]2"}]}], ")"}]}]], " ", "\[CapitalOmega]2"}], RowBox[{"ReducedME", "[", RowBox[{"2", ",", RowBox[{"{", RowBox[{"Dipole", ",", "1"}], "}"}], ",", "3"}], "]"}]]}], ",", "0", ",", "0"}], "}"}]], "Output", CellChangeTimes->{3.524014012716285*^9, 3.524259591553705*^9, 3.524259626080548*^9}] }, Open ]], Cell["\<\ The Hamiltonian for the system subject to the optical field. Probe couples \ |1> and |3>, Pumps couple |2> and |3>.\ \>", "MathCaption", CellID->462076121], Cell[CellGroupData[{ Cell[BoxData[ RowBox[{"MatrixForm", "[", RowBox[{"H", "=", RowBox[{ RowBox[{"Expand", "@", RowBox[{"Hamiltonian", "[", RowBox[{"system", ",", RowBox[{"ElectricField", "\[Rule]", "field"}]}], "]"}]}], "/.", " ", RowBox[{ RowBox[{ RowBox[{"Cos", "[", "_", "]"}], " ", RowBox[{"ReducedME", "[", RowBox[{"_", ",", RowBox[{"{", RowBox[{"Dipole", ",", "1"}], "}"}], ",", "_"}], "]"}]}], "\[Rule]", "0"}]}]}], "]"}]], "Input"], Cell[BoxData[ TagBox[ RowBox[{"(", "\[NoBreak]", GridBox[{ { RowBox[{"Energy", "[", "1", "]"}], "0", RowBox[{ RowBox[{"-", "\[CapitalOmega]1"}], " ", RowBox[{"Cos", "[", RowBox[{"\[Phi]1", "-", RowBox[{"t", " ", "\[Omega]1"}]}], "]"}]}]}, {"0", RowBox[{"Energy", "[", "2", "]"}], RowBox[{ RowBox[{"-", "\[CapitalOmega]2"}], " ", RowBox[{"Cos", "[", RowBox[{"\[Phi]2", "-", RowBox[{"t", " ", "\[Omega]2"}]}], "]"}]}]}, { RowBox[{ RowBox[{"-", "\[CapitalOmega]1"}], " ", RowBox[{"Cos", "[", RowBox[{"\[Phi]1", "-", RowBox[{"t", " ", "\[Omega]1"}]}], "]"}]}], RowBox[{ RowBox[{"-", "\[CapitalOmega]2"}], " ", RowBox[{"Cos", "[", RowBox[{"\[Phi]2", "-", RowBox[{"t", " ", "\[Omega]2"}]}], "]"}]}], "0"} }, GridBoxAlignment->{ "Columns" -> {{Center}}, "ColumnsIndexed" -> {}, "Rows" -> {{Baseline}}, "RowsIndexed" -> {}}, GridBoxSpacings->{"Columns" -> { Offset[0.27999999999999997`], { Offset[0.7]}, Offset[0.27999999999999997`]}, "ColumnsIndexed" -> {}, "Rows" -> { Offset[0.2], { Offset[0.4]}, Offset[0.2]}, "RowsIndexed" -> {}}], "\[NoBreak]", ")"}], Function[BoxForm`e$, MatrixForm[BoxForm`e$]]]], "Output", CellChangeTimes->{3.524014012961052*^9, 3.524259598039252*^9, 3.524259629043541*^9}] }, Open ]], Cell["The level diagram for the system.", "MathCaption", CellID->358620443], Cell[CellGroupData[{ Cell[BoxData[ RowBox[{"LevelDiagram", "[", RowBox[{"system", ",", RowBox[{"H", "/.", RowBox[{"{", RowBox[{ RowBox[{ RowBox[{"Energy", "[", "1", "]"}], "\[Rule]", RowBox[{"-", "1.5"}]}], ",", RowBox[{ RowBox[{"Energy", "[", "2", "]"}], "\[Rule]", RowBox[{"-", "1"}]}], ",", RowBox[{ RowBox[{"Energy", "[", "3", "]"}], "\[Rule]", ".5"}]}], "}"}]}]}], "]"}]], "Input", CellChangeTimes->{{3.524013707327201*^9, 3.524013712245067*^9}}, CellID->167259034], Cell[BoxData[ GraphicsBox[{{{{}, LineBox[{{-0.9, -1.5}, {-0.09999999999999998, -1.5}}]}, {{}, LineBox[{{-0.9, -1.}, {-0.09999999999999998, -1.}}]}, {{}, LineBox[{{0.09999999999999998, 0.}, {0.9, 0.}}]}}, {{}, {}, {}}, {Arrowheads[{-0.07659574468085106, 0.07659574468085106}], ArrowBox[{{-0.45999999999999996`, -1.5}, {0.45999999999999996`, 0.}}], ArrowBox[{{-0.45999999999999996`, -1.}, {0.45999999999999996`, 0.}}]}, {PointSize[0.0225]}}, ImagePadding->{{2., 2}, {2., 2.}}, ImageSize->94.]], "Output", CellChangeTimes->{ 3.524014013119625*^9, {3.524259615431492*^9, 3.524259632461302*^9}}] }, Open ]], Cell["\<\ Apply the rotating-wave approximation to the Hamiltonian. \[Delta]a is \ average pump detuning, \[Delta] is relative pump detuning.\ \>", "MathCaption", CellID->577766068], Cell[CellGroupData[{ Cell[BoxData[ RowBox[{ RowBox[{"(", RowBox[{"Hrwa", "=", RowBox[{ RowBox[{"RotatingWaveApproximation", "[", RowBox[{"system", ",", "H", ",", RowBox[{"{", RowBox[{"\[Omega]1", ",", "\[Omega]2"}], "}"}], ",", RowBox[{"TransformMatrix", "\[Rule]", RowBox[{"MatrixExp", "[", RowBox[{ RowBox[{"-", "\[ImaginaryI]"}], " ", "t", " ", RowBox[{"DiagonalMatrix", "[", RowBox[{"{", RowBox[{ RowBox[{"-", "\[Omega]1"}], ",", RowBox[{"-", "\[Omega]2"}], ",", "0"}], "}"}], "]"}]}], "]"}]}]}], "]"}], "/.", RowBox[{"{", RowBox[{ RowBox[{"\[Omega]1", "\[Rule]", RowBox[{ RowBox[{"-", RowBox[{"Energy", "[", "1", "]"}]}], "+", "\[Delta]1"}]}], ",", RowBox[{"\[Omega]2", "\[Rule]", RowBox[{ RowBox[{"-", RowBox[{"Energy", "[", "2", "]"}]}], "+", "\[Delta]2"}]}]}], "}"}]}]}], ")"}], "//", "MatrixForm"}]], "Input", CellChangeTimes->{{3.524259650739166*^9, 3.524259657623566*^9}, { 3.524259695984735*^9, 3.524259716178644*^9}}], Cell[BoxData[ TagBox[ RowBox[{"(", "\[NoBreak]", GridBox[{ {"\[Delta]1", "0", RowBox[{ RowBox[{"-", FractionBox["1", "2"]}], " ", SuperscriptBox["\[ExponentialE]", RowBox[{ RowBox[{"-", "\[ImaginaryI]"}], " ", "\[Phi]1"}]], " ", "\[CapitalOmega]1"}]}, {"0", "\[Delta]2", RowBox[{ RowBox[{"-", FractionBox["1", "2"]}], " ", SuperscriptBox["\[ExponentialE]", RowBox[{ RowBox[{"-", "\[ImaginaryI]"}], " ", "\[Phi]2"}]], " ", "\[CapitalOmega]2"}]}, { RowBox[{ RowBox[{"-", FractionBox["1", "2"]}], " ", SuperscriptBox["\[ExponentialE]", RowBox[{"\[ImaginaryI]", " ", "\[Phi]1"}]], " ", "\[CapitalOmega]1"}], RowBox[{ RowBox[{"-", FractionBox["1", "2"]}], " ", SuperscriptBox["\[ExponentialE]", RowBox[{"\[ImaginaryI]", " ", "\[Phi]2"}]], " ", "\[CapitalOmega]2"}], "0"} }, GridBoxAlignment->{ "Columns" -> {{Center}}, "ColumnsIndexed" -> {}, "Rows" -> {{Baseline}}, "RowsIndexed" -> {}}, GridBoxSpacings->{"Columns" -> { Offset[0.27999999999999997`], { Offset[0.7]}, Offset[0.27999999999999997`]}, "ColumnsIndexed" -> {}, "Rows" -> { Offset[0.2], { Offset[0.4]}, Offset[0.2]}, "RowsIndexed" -> {}}], "\[NoBreak]", ")"}], Function[BoxForm`e$, MatrixForm[BoxForm`e$]]]], "Output", CellChangeTimes->{3.52401401316455*^9, 3.524259664732384*^9, 3.524259718048386*^9}] }, Open ]], Cell[TextData[{ Cell[BoxData[ ButtonBox["IntrinsicRelaxation", BaseStyle->"Link", ButtonData->"paclet:AtomicDensityMatrix/ref/IntrinsicRelaxation"]]], " and ", Cell[BoxData[ ButtonBox["TransitRelaxation", BaseStyle->"Link", ButtonData->"paclet:AtomicDensityMatrix/ref/TransitRelaxation"]]], " supply the relaxation matrices. Add additional term \[Gamma]p for \ incoherent pumping from |1> to |3>." }], "MathCaption", CellID->610306692], Cell[CellGroupData[{ Cell[BoxData[ RowBox[{"MatrixForm", "[", RowBox[{"relax", "=", RowBox[{ RowBox[{"IntrinsicRelaxation", "[", "system", "]"}], "+", RowBox[{"TransitRelaxation", "[", RowBox[{"system", ",", "\[Gamma]t"}], "]"}], "+", TagBox[ RowBox[{"(", "\[NoBreak]", GridBox[{ {"\[Gamma]p", "0", "0"}, {"0", "0", "0"}, {"0", "0", "0"} }, GridBoxAlignment->{ "Columns" -> {{Center}}, "ColumnsIndexed" -> {}, "Rows" -> {{Baseline}}, "RowsIndexed" -> {}}, GridBoxSpacings->{"Columns" -> { Offset[0.27999999999999997`], { Offset[0.7]}, Offset[0.27999999999999997`]}, "ColumnsIndexed" -> {}, "Rows" -> { Offset[0.2], { Offset[0.4]}, Offset[0.2]}, "RowsIndexed" -> {}}], "\[NoBreak]", ")"}], Function[BoxForm`e$, MatrixForm[BoxForm`e$]]]}]}], "]"}]], "Input", CellID->645617687], Cell[BoxData[ TagBox[ RowBox[{"(", "\[NoBreak]", GridBox[{ { RowBox[{"\[Gamma]p", "+", "\[Gamma]t"}], "0", "0"}, {"0", "\[Gamma]t", "0"}, {"0", "0", RowBox[{"\[CapitalGamma]", "+", "\[Gamma]t"}]} }, GridBoxAlignment->{ "Columns" -> {{Center}}, "ColumnsIndexed" -> {}, "Rows" -> {{Baseline}}, "RowsIndexed" -> {}}, GridBoxSpacings->{"Columns" -> { Offset[0.27999999999999997`], { Offset[0.7]}, Offset[0.27999999999999997`]}, "ColumnsIndexed" -> {}, "Rows" -> { Offset[0.2], { Offset[0.4]}, Offset[0.2]}, "RowsIndexed" -> {}}], "\[NoBreak]", ")"}], Function[BoxForm`e$, MatrixForm[BoxForm`e$]]]], "Output", CellChangeTimes->{3.524014013274888*^9, 3.524259721983669*^9}] }, Open ]], Cell[TextData[{ Cell[BoxData[ ButtonBox["OpticalRepopulation", BaseStyle->"Link", ButtonData->"paclet:AtomicDensityMatrix/ref/OpticalRepopulation"]]], " and ", Cell[BoxData[ ButtonBox["TransitRepopulation", BaseStyle->"Link", ButtonData->"paclet:AtomicDensityMatrix/ref/TransitRepopulation"]]], " supply the repopulation matrices." }], "MathCaption", CellID->854192725], Cell[CellGroupData[{ Cell[BoxData[ RowBox[{"MatrixForm", "[", RowBox[{"repop", "=", RowBox[{ RowBox[{"OpticalRepopulation", "[", "system", "]"}], "+", RowBox[{"TransitRepopulation", "[", RowBox[{"system", ",", "\[Gamma]t"}], "]"}], "+", TagBox[ RowBox[{"(", "\[NoBreak]", GridBox[{ {"0", "0", "0"}, {"0", "0", "0"}, {"0", "0", RowBox[{"\[Gamma]p", " ", RowBox[{ SubscriptBox["\[Rho]", RowBox[{"1", ",", "1"}]], "[", "t", "]"}]}]} }, GridBoxAlignment->{ "Columns" -> {{Center}}, "ColumnsIndexed" -> {}, "Rows" -> {{Baseline}}, "RowsIndexed" -> {}}, GridBoxSpacings->{"Columns" -> { Offset[0.27999999999999997`], { Offset[0.7]}, Offset[0.27999999999999997`]}, "ColumnsIndexed" -> {}, "Rows" -> { Offset[0.2], { Offset[0.4]}, Offset[0.2]}, "RowsIndexed" -> {}}], "\[NoBreak]", ")"}], Function[BoxForm`e$, MatrixForm[BoxForm`e$]]]}]}], "]"}]], "Input", CellID->465762594], Cell[BoxData[ TagBox[ RowBox[{"(", "\[NoBreak]", GridBox[{ { RowBox[{ FractionBox["\[Gamma]t", "2"], "+", RowBox[{ FractionBox["1", "2"], " ", "\[CapitalGamma]", " ", RowBox[{ SubscriptBox["\[Rho]", RowBox[{"3", ",", "3"}]], "[", "t", "]"}]}]}], "0", "0"}, {"0", RowBox[{ FractionBox["\[Gamma]t", "2"], "+", RowBox[{ FractionBox["1", "2"], " ", "\[CapitalGamma]", " ", RowBox[{ SubscriptBox["\[Rho]", RowBox[{"3", ",", "3"}]], "[", "t", "]"}]}]}], "0"}, {"0", "0", RowBox[{"\[Gamma]p", " ", RowBox[{ SubscriptBox["\[Rho]", RowBox[{"1", ",", "1"}]], "[", "t", "]"}]}]} }, GridBoxAlignment->{ "Columns" -> {{Center}}, "ColumnsIndexed" -> {}, "Rows" -> {{Baseline}}, "RowsIndexed" -> {}}, GridBoxSpacings->{"Columns" -> { Offset[0.27999999999999997`], { Offset[0.7]}, Offset[0.27999999999999997`]}, "ColumnsIndexed" -> {}, "Rows" -> { Offset[0.2], { Offset[0.4]}, Offset[0.2]}, "RowsIndexed" -> {}}], "\[NoBreak]", ")"}], Function[BoxForm`e$, MatrixForm[BoxForm`e$]]]], "Output", CellChangeTimes->{3.524014013584079*^9, 3.524259725691324*^9}] }, Open ]], Cell["Here are the evolution equations.", "MathCaption", CellID->314466782], Cell[CellGroupData[{ Cell[BoxData[ RowBox[{"TableForm", "[", RowBox[{"eqs", "=", RowBox[{ RowBox[{"LiouvilleEquation", "[", RowBox[{"system", ",", "Hrwa", ",", "relax", ",", "repop"}], "]"}], "//", "Expand"}]}], "]"}]], "Input", CellID->298399236], Cell[BoxData[ TagBox[ TagBox[GridBox[{ { RowBox[{ RowBox[{ SuperscriptBox[ SubscriptBox["\[Rho]", RowBox[{"1", ",", "1"}]], "\[Prime]", MultilineFunction->None], "[", "t", "]"}], "\[Equal]", RowBox[{ FractionBox["\[Gamma]t", "2"], "-", RowBox[{"\[Gamma]p", " ", RowBox[{ SubscriptBox["\[Rho]", RowBox[{"1", ",", "1"}]], "[", "t", "]"}]}], "-", RowBox[{"\[Gamma]t", " ", RowBox[{ SubscriptBox["\[Rho]", RowBox[{"1", ",", "1"}]], "[", "t", "]"}]}], "-", RowBox[{ FractionBox["1", "2"], " ", "\[ImaginaryI]", " ", SuperscriptBox["\[ExponentialE]", RowBox[{"\[ImaginaryI]", " ", "\[Phi]1"}]], " ", "\[CapitalOmega]1", " ", RowBox[{ SubscriptBox["\[Rho]", RowBox[{"1", ",", "3"}]], "[", "t", "]"}]}], "+", RowBox[{ FractionBox["1", "2"], " ", "\[ImaginaryI]", " ", SuperscriptBox["\[ExponentialE]", RowBox[{ RowBox[{"-", "\[ImaginaryI]"}], " ", "\[Phi]1"}]], " ", "\[CapitalOmega]1", " ", RowBox[{ SubscriptBox["\[Rho]", RowBox[{"3", ",", "1"}]], "[", "t", "]"}]}], "+", RowBox[{ FractionBox["1", "2"], " ", "\[CapitalGamma]", " ", RowBox[{ SubscriptBox["\[Rho]", RowBox[{"3", ",", "3"}]], "[", "t", "]"}]}]}]}]}, { RowBox[{ RowBox[{ SuperscriptBox[ SubscriptBox["\[Rho]", RowBox[{"1", ",", "2"}]], "\[Prime]", MultilineFunction->None], "[", "t", "]"}], "\[Equal]", RowBox[{ RowBox[{ RowBox[{"-", FractionBox["1", "2"]}], " ", "\[Gamma]p", " ", RowBox[{ SubscriptBox["\[Rho]", RowBox[{"1", ",", "2"}]], "[", "t", "]"}]}], "-", RowBox[{"\[Gamma]t", " ", RowBox[{ SubscriptBox["\[Rho]", RowBox[{"1", ",", "2"}]], "[", "t", "]"}]}], "-", RowBox[{"\[ImaginaryI]", " ", "\[Delta]1", " ", RowBox[{ SubscriptBox["\[Rho]", RowBox[{"1", ",", "2"}]], "[", "t", "]"}]}], "+", RowBox[{"\[ImaginaryI]", " ", "\[Delta]2", " ", RowBox[{ SubscriptBox["\[Rho]", RowBox[{"1", ",", "2"}]], "[", "t", "]"}]}], "-", RowBox[{ FractionBox["1", "2"], " ", "\[ImaginaryI]", " ", SuperscriptBox["\[ExponentialE]", RowBox[{"\[ImaginaryI]", " ", "\[Phi]2"}]], " ", "\[CapitalOmega]2", " ", RowBox[{ SubscriptBox["\[Rho]", RowBox[{"1", ",", "3"}]], "[", "t", "]"}]}], "+", RowBox[{ FractionBox["1", "2"], " ", "\[ImaginaryI]", " ", SuperscriptBox["\[ExponentialE]", RowBox[{ RowBox[{"-", "\[ImaginaryI]"}], " ", "\[Phi]1"}]], " ", "\[CapitalOmega]1", " ", RowBox[{ SubscriptBox["\[Rho]", RowBox[{"3", ",", "2"}]], "[", "t", "]"}]}]}]}]}, { RowBox[{ RowBox[{ SuperscriptBox[ SubscriptBox["\[Rho]", RowBox[{"1", ",", "3"}]], "\[Prime]", MultilineFunction->None], "[", "t", "]"}], "\[Equal]", RowBox[{ RowBox[{ RowBox[{"-", FractionBox["1", "2"]}], " ", "\[ImaginaryI]", " ", SuperscriptBox["\[ExponentialE]", RowBox[{ RowBox[{"-", "\[ImaginaryI]"}], " ", "\[Phi]1"}]], " ", "\[CapitalOmega]1", " ", RowBox[{ SubscriptBox["\[Rho]", RowBox[{"1", ",", "1"}]], "[", "t", "]"}]}], "-", RowBox[{ FractionBox["1", "2"], " ", "\[ImaginaryI]", " ", SuperscriptBox["\[ExponentialE]", RowBox[{ RowBox[{"-", "\[ImaginaryI]"}], " ", "\[Phi]2"}]], " ", "\[CapitalOmega]2", " ", RowBox[{ SubscriptBox["\[Rho]", RowBox[{"1", ",", "2"}]], "[", "t", "]"}]}], "-", RowBox[{ FractionBox["1", "2"], " ", "\[CapitalGamma]", " ", RowBox[{ SubscriptBox["\[Rho]", RowBox[{"1", ",", "3"}]], "[", "t", "]"}]}], "-", RowBox[{ FractionBox["1", "2"], " ", "\[Gamma]p", " ", RowBox[{ SubscriptBox["\[Rho]", RowBox[{"1", ",", "3"}]], "[", "t", "]"}]}], "-", RowBox[{"\[Gamma]t", " ", RowBox[{ SubscriptBox["\[Rho]", RowBox[{"1", ",", "3"}]], "[", "t", "]"}]}], "-", RowBox[{"\[ImaginaryI]", " ", "\[Delta]1", " ", RowBox[{ SubscriptBox["\[Rho]", RowBox[{"1", ",", "3"}]], "[", "t", "]"}]}], "+", RowBox[{ FractionBox["1", "2"], " ", "\[ImaginaryI]", " ", SuperscriptBox["\[ExponentialE]", RowBox[{ RowBox[{"-", "\[ImaginaryI]"}], " ", "\[Phi]1"}]], " ", "\[CapitalOmega]1", " ", RowBox[{ SubscriptBox["\[Rho]", RowBox[{"3", ",", "3"}]], "[", "t", "]"}]}]}]}]}, { RowBox[{ RowBox[{ SuperscriptBox[ SubscriptBox["\[Rho]", RowBox[{"2", ",", "1"}]], "\[Prime]", MultilineFunction->None], "[", "t", "]"}], "\[Equal]", RowBox[{ RowBox[{ RowBox[{"-", FractionBox["1", "2"]}], " ", "\[Gamma]p", " ", RowBox[{ SubscriptBox["\[Rho]", RowBox[{"2", ",", "1"}]], "[", "t", "]"}]}], "-", RowBox[{"\[Gamma]t", " ", RowBox[{ SubscriptBox["\[Rho]", RowBox[{"2", ",", "1"}]], "[", "t", "]"}]}], "+", RowBox[{"\[ImaginaryI]", " ", "\[Delta]1", " ", RowBox[{ SubscriptBox["\[Rho]", RowBox[{"2", ",", "1"}]], "[", "t", "]"}]}], "-", RowBox[{"\[ImaginaryI]", " ", "\[Delta]2", " ", RowBox[{ SubscriptBox["\[Rho]", RowBox[{"2", ",", "1"}]], "[", "t", "]"}]}], "-", RowBox[{ FractionBox["1", "2"], " ", "\[ImaginaryI]", " ", SuperscriptBox["\[ExponentialE]", RowBox[{"\[ImaginaryI]", " ", "\[Phi]1"}]], " ", "\[CapitalOmega]1", " ", RowBox[{ SubscriptBox["\[Rho]", RowBox[{"2", ",", "3"}]], "[", "t", "]"}]}], "+", RowBox[{ FractionBox["1", "2"], " ", "\[ImaginaryI]", " ", SuperscriptBox["\[ExponentialE]", RowBox[{ RowBox[{"-", "\[ImaginaryI]"}], " ", "\[Phi]2"}]], " ", "\[CapitalOmega]2", " ", RowBox[{ SubscriptBox["\[Rho]", RowBox[{"3", ",", "1"}]], "[", "t", "]"}]}]}]}]}, { RowBox[{ RowBox[{ SuperscriptBox[ SubscriptBox["\[Rho]", RowBox[{"2", ",", "2"}]], "\[Prime]", MultilineFunction->None], "[", "t", "]"}], "\[Equal]", RowBox[{ FractionBox["\[Gamma]t", "2"], "-", RowBox[{"\[Gamma]t", " ", RowBox[{ SubscriptBox["\[Rho]", RowBox[{"2", ",", "2"}]], "[", "t", "]"}]}], "-", RowBox[{ FractionBox["1", "2"], " ", "\[ImaginaryI]", " ", SuperscriptBox["\[ExponentialE]", RowBox[{"\[ImaginaryI]", " ", "\[Phi]2"}]], " ", "\[CapitalOmega]2", " ", RowBox[{ SubscriptBox["\[Rho]", RowBox[{"2", ",", "3"}]], "[", "t", "]"}]}], "+", RowBox[{ FractionBox["1", "2"], " ", "\[ImaginaryI]", " ", SuperscriptBox["\[ExponentialE]", RowBox[{ RowBox[{"-", "\[ImaginaryI]"}], " ", "\[Phi]2"}]], " ", "\[CapitalOmega]2", " ", RowBox[{ SubscriptBox["\[Rho]", RowBox[{"3", ",", "2"}]], "[", "t", "]"}]}], "+", RowBox[{ FractionBox["1", "2"], " ", "\[CapitalGamma]", " ", RowBox[{ SubscriptBox["\[Rho]", RowBox[{"3", ",", "3"}]], "[", "t", "]"}]}]}]}]}, { RowBox[{ RowBox[{ SuperscriptBox[ SubscriptBox["\[Rho]", RowBox[{"2", ",", "3"}]], "\[Prime]", MultilineFunction->None], "[", "t", "]"}], "\[Equal]", RowBox[{ RowBox[{ RowBox[{"-", FractionBox["1", "2"]}], " ", "\[ImaginaryI]", " ", SuperscriptBox["\[ExponentialE]", RowBox[{ RowBox[{"-", "\[ImaginaryI]"}], " ", "\[Phi]1"}]], " ", "\[CapitalOmega]1", " ", RowBox[{ SubscriptBox["\[Rho]", RowBox[{"2", ",", "1"}]], "[", "t", "]"}]}], "-", RowBox[{ FractionBox["1", "2"], " ", "\[ImaginaryI]", " ", SuperscriptBox["\[ExponentialE]", RowBox[{ RowBox[{"-", "\[ImaginaryI]"}], " ", "\[Phi]2"}]], " ", "\[CapitalOmega]2", " ", RowBox[{ SubscriptBox["\[Rho]", RowBox[{"2", ",", "2"}]], "[", "t", "]"}]}], "-", RowBox[{ FractionBox["1", "2"], " ", "\[CapitalGamma]", " ", RowBox[{ SubscriptBox["\[Rho]", RowBox[{"2", ",", "3"}]], "[", "t", "]"}]}], "-", RowBox[{"\[Gamma]t", " ", RowBox[{ SubscriptBox["\[Rho]", RowBox[{"2", ",", "3"}]], "[", "t", "]"}]}], "-", RowBox[{"\[ImaginaryI]", " ", "\[Delta]2", " ", RowBox[{ SubscriptBox["\[Rho]", RowBox[{"2", ",", "3"}]], "[", "t", "]"}]}], "+", RowBox[{ FractionBox["1", "2"], " ", "\[ImaginaryI]", " ", SuperscriptBox["\[ExponentialE]", RowBox[{ RowBox[{"-", "\[ImaginaryI]"}], " ", "\[Phi]2"}]], " ", "\[CapitalOmega]2", " ", RowBox[{ SubscriptBox["\[Rho]", RowBox[{"3", ",", "3"}]], "[", "t", "]"}]}]}]}]}, { RowBox[{ RowBox[{ SuperscriptBox[ SubscriptBox["\[Rho]", RowBox[{"3", ",", "1"}]], "\[Prime]", MultilineFunction->None], "[", "t", "]"}], "\[Equal]", RowBox[{ RowBox[{ FractionBox["1", "2"], " ", "\[ImaginaryI]", " ", SuperscriptBox["\[ExponentialE]", RowBox[{"\[ImaginaryI]", " ", "\[Phi]1"}]], " ", "\[CapitalOmega]1", " ", RowBox[{ SubscriptBox["\[Rho]", RowBox[{"1", ",", "1"}]], "[", "t", "]"}]}], "+", RowBox[{ FractionBox["1", "2"], " ", "\[ImaginaryI]", " ", SuperscriptBox["\[ExponentialE]", RowBox[{"\[ImaginaryI]", " ", "\[Phi]2"}]], " ", "\[CapitalOmega]2", " ", RowBox[{ SubscriptBox["\[Rho]", RowBox[{"2", ",", "1"}]], "[", "t", "]"}]}], "-", RowBox[{ FractionBox["1", "2"], " ", "\[CapitalGamma]", " ", RowBox[{ SubscriptBox["\[Rho]", RowBox[{"3", ",", "1"}]], "[", "t", "]"}]}], "-", RowBox[{ FractionBox["1", "2"], " ", "\[Gamma]p", " ", RowBox[{ SubscriptBox["\[Rho]", RowBox[{"3", ",", "1"}]], "[", "t", "]"}]}], "-", RowBox[{"\[Gamma]t", " ", RowBox[{ SubscriptBox["\[Rho]", RowBox[{"3", ",", "1"}]], "[", "t", "]"}]}], "+", RowBox[{"\[ImaginaryI]", " ", "\[Delta]1", " ", RowBox[{ SubscriptBox["\[Rho]", RowBox[{"3", ",", "1"}]], "[", "t", "]"}]}], "-", RowBox[{ FractionBox["1", "2"], " ", "\[ImaginaryI]", " ", SuperscriptBox["\[ExponentialE]", RowBox[{"\[ImaginaryI]", " ", "\[Phi]1"}]], " ", "\[CapitalOmega]1", " ", RowBox[{ SubscriptBox["\[Rho]", RowBox[{"3", ",", "3"}]], "[", "t", "]"}]}]}]}]}, { RowBox[{ RowBox[{ SuperscriptBox[ SubscriptBox["\[Rho]", RowBox[{"3", ",", "2"}]], "\[Prime]", MultilineFunction->None], "[", "t", "]"}], "\[Equal]", RowBox[{ RowBox[{ FractionBox["1", "2"], " ", "\[ImaginaryI]", " ", SuperscriptBox["\[ExponentialE]", RowBox[{"\[ImaginaryI]", " ", "\[Phi]1"}]], " ", "\[CapitalOmega]1", " ", RowBox[{ SubscriptBox["\[Rho]", RowBox[{"1", ",", "2"}]], "[", "t", "]"}]}], "+", RowBox[{ FractionBox["1", "2"], " ", "\[ImaginaryI]", " ", SuperscriptBox["\[ExponentialE]", RowBox[{"\[ImaginaryI]", " ", "\[Phi]2"}]], " ", "\[CapitalOmega]2", " ", RowBox[{ SubscriptBox["\[Rho]", RowBox[{"2", ",", "2"}]], "[", "t", "]"}]}], "-", RowBox[{ FractionBox["1", "2"], " ", "\[CapitalGamma]", " ", RowBox[{ SubscriptBox["\[Rho]", RowBox[{"3", ",", "2"}]], "[", "t", "]"}]}], "-", RowBox[{"\[Gamma]t", " ", RowBox[{ SubscriptBox["\[Rho]", RowBox[{"3", ",", "2"}]], "[", "t", "]"}]}], "+", RowBox[{"\[ImaginaryI]", " ", "\[Delta]2", " ", RowBox[{ SubscriptBox["\[Rho]", RowBox[{"3", ",", "2"}]], "[", "t", "]"}]}], "-", RowBox[{ FractionBox["1", "2"], " ", "\[ImaginaryI]", " ", SuperscriptBox["\[ExponentialE]", RowBox[{"\[ImaginaryI]", " ", "\[Phi]2"}]], " ", "\[CapitalOmega]2", " ", RowBox[{ SubscriptBox["\[Rho]", RowBox[{"3", ",", "3"}]], "[", "t", "]"}]}]}]}]}, { RowBox[{ RowBox[{ SuperscriptBox[ SubscriptBox["\[Rho]", RowBox[{"3", ",", "3"}]], "\[Prime]", MultilineFunction->None], "[", "t", "]"}], "\[Equal]", RowBox[{ RowBox[{"\[Gamma]p", " ", RowBox[{ SubscriptBox["\[Rho]", RowBox[{"1", ",", "1"}]], "[", "t", "]"}]}], "+", RowBox[{ FractionBox["1", "2"], " ", "\[ImaginaryI]", " ", SuperscriptBox["\[ExponentialE]", RowBox[{"\[ImaginaryI]", " ", "\[Phi]1"}]], " ", "\[CapitalOmega]1", " ", RowBox[{ SubscriptBox["\[Rho]", RowBox[{"1", ",", "3"}]], "[", "t", "]"}]}], "+", RowBox[{ FractionBox["1", "2"], " ", "\[ImaginaryI]", " ", SuperscriptBox["\[ExponentialE]", RowBox[{"\[ImaginaryI]", " ", "\[Phi]2"}]], " ", "\[CapitalOmega]2", " ", RowBox[{ SubscriptBox["\[Rho]", RowBox[{"2", ",", "3"}]], "[", "t", "]"}]}], "-", RowBox[{ FractionBox["1", "2"], " ", "\[ImaginaryI]", " ", SuperscriptBox["\[ExponentialE]", RowBox[{ RowBox[{"-", "\[ImaginaryI]"}], " ", "\[Phi]1"}]], " ", "\[CapitalOmega]1", " ", RowBox[{ SubscriptBox["\[Rho]", RowBox[{"3", ",", "1"}]], "[", "t", "]"}]}], "-", RowBox[{ FractionBox["1", "2"], " ", "\[ImaginaryI]", " ", SuperscriptBox["\[ExponentialE]", RowBox[{ RowBox[{"-", "\[ImaginaryI]"}], " ", "\[Phi]2"}]], " ", "\[CapitalOmega]2", " ", RowBox[{ SubscriptBox["\[Rho]", RowBox[{"3", ",", "2"}]], "[", "t", "]"}]}], "-", RowBox[{"\[CapitalGamma]", " ", RowBox[{ SubscriptBox["\[Rho]", RowBox[{"3", ",", "3"}]], "[", "t", "]"}]}], "-", RowBox[{"\[Gamma]t", " ", RowBox[{ SubscriptBox["\[Rho]", RowBox[{"3", ",", "3"}]], "[", "t", "]"}]}]}]}]} }, GridBoxAlignment->{ "Columns" -> {{Left}}, "ColumnsIndexed" -> {}, "Rows" -> {{Baseline}}, "RowsIndexed" -> {}}, GridBoxSpacings->{"Columns" -> { Offset[0.27999999999999997`], { Offset[0.5599999999999999]}, Offset[0.27999999999999997`]}, "ColumnsIndexed" -> {}, "Rows" -> { Offset[0.2], { Offset[0.4]}, Offset[0.2]}, "RowsIndexed" -> {}}], Column], Function[BoxForm`e$, TableForm[BoxForm`e$]]]], "Output", CellChangeTimes->{3.524014013741555*^9, 3.524259731199048*^9}] }, Open ]], Cell["Convert to c form.", "Text"], Cell[CellGroupData[{ Cell[BoxData[{ RowBox[{ RowBox[{ RowBox[{"Collect", "[", RowBox[{ RowBox[{ RowBox[{"eqs", "[", RowBox[{"[", RowBox[{"All", ",", "2"}], "]"}], "]"}], "/.", RowBox[{"{", RowBox[{ RowBox[{ SuperscriptBox["\[ExponentialE]", RowBox[{"\[ImaginaryI]", " ", "\[Phi]1"}]], "\[Rule]", RowBox[{"2", RowBox[{"E1", "/", "\[CapitalOmega]1"}]}]}], ",", RowBox[{ SuperscriptBox["\[ExponentialE]", RowBox[{ RowBox[{"-", "\[ImaginaryI]"}], " ", "\[Phi]1"}]], "\[Rule]", RowBox[{"2", RowBox[{"E1c", "/", "\[CapitalOmega]1"}]}]}], ",", RowBox[{ SuperscriptBox["\[ExponentialE]", RowBox[{"\[ImaginaryI]", " ", "\[Phi]2"}]], " ", "\[Rule]", RowBox[{"2", RowBox[{"Ef", "/", "\[CapitalOmega]2"}]}]}], ",", RowBox[{ SuperscriptBox["\[ExponentialE]", RowBox[{ RowBox[{"-", "\[ImaginaryI]"}], " ", "\[Phi]2"}]], " ", "\[Rule]", RowBox[{"2", " ", RowBox[{"Efc", "/", "\[CapitalOmega]2"}]}]}], ",", RowBox[{"\[CapitalGamma]", "\[Rule]", RowBox[{"2", "G"}]}], ",", RowBox[{"\[Gamma]p", "\[Rule]", RowBox[{"2", "gp"}]}], ",", RowBox[{"\[Gamma]t", "\[Rule]", RowBox[{"2", "gt"}]}], ",", RowBox[{"\[Delta]1", "\[Rule]", "d1"}], ",", RowBox[{"\[Delta]2", "\[Rule]", "da"}]}], "}"}]}], ",", RowBox[{"DMElementPattern", "[", "]"}], ",", "FullSimplify"}], "]"}], "/.", RowBox[{ RowBox[{ SubscriptBox["\[Rho]", "a__"], "[", "t", "]"}], "\[Rule]", SubscriptBox["r", "a"]}]}], ";"}], "\[IndentingNewLine]", RowBox[{ RowBox[{"MapThread", "[", RowBox[{"Equal", ",", RowBox[{"{", RowBox[{ RowBox[{ RowBox[{"DMVariables", "[", "system", "]"}], "/.", RowBox[{ RowBox[{ SubscriptBox["\[Rho]", "a__"], "[", "t", "]"}], "\[Rule]", SubscriptBox["dr", "a"]}]}], ",", "%"}], "}"}]}], "]"}], "/.", RowBox[{ RowBox[{"Complex", "[", RowBox[{"0", ",", "a_"}], "]"}], "\[Rule]", RowBox[{"a", " ", "i"}]}]}], "\[IndentingNewLine]", RowBox[{"DeleteCases", "[", RowBox[{"%", ",", RowBox[{ RowBox[{ SubscriptBox["dr", RowBox[{"a_", ",", "b_"}]], "\[Equal]", "_"}], "/;", RowBox[{"b", "<", "a"}]}]}], "]"}], "\[IndentingNewLine]", RowBox[{"StringJoin", "[", RowBox[{ RowBox[{ RowBox[{"StringReplace", "[", RowBox[{ RowBox[{ RowBox[{"ToString", "@", RowBox[{"CForm", "[", "#", "]"}]}], "<>", "\"\<;\\n\>\""}], ",", RowBox[{"{", RowBox[{ RowBox[{"\"\<==\>\"", "\[Rule]", "\"\<=\>\""}], ",", RowBox[{ RowBox[{ "\"\\"", "~~", "a_", "~~", "\"\<,\>\"", "~~", "b_", "~~", "\"\<)\>\""}], ":>", RowBox[{"\"\\"", "<>", "a", "<>", "b", "<>", "\"\<_dt\>\""}]}], ",", RowBox[{ RowBox[{ "\"\\"", "~~", "r_", "~~", "\"\<,\>\"", "~~", "a_", "~~", "\"\<,\>\"", "~~", "b_", "~~", "\"\<)\>\""}], "\[RuleDelayed]", RowBox[{"r", "<>", "a", "<>", "b"}]}]}], "}"}]}], "]"}], "&"}], "/@", "%"}], "]"}], "\[IndentingNewLine]", RowBox[{"Export", "[", RowBox[{ RowBox[{ RowBox[{"NotebookDirectory", "[", "]"}], "<>", "\"\\""}], ",", "%"}], "]"}]}], "Input", CellChangeTimes->{{3.524014168318809*^9, 3.524014208362378*^9}, { 3.524259775991233*^9, 3.524259803019728*^9}, {3.524259910132192*^9, 3.524259921595321*^9}, 3.524260077001915*^9, {3.524265840178889*^9, 3.524265840456311*^9}, {3.524265923474642*^9, 3.524265929078822*^9}, { 3.524265960227649*^9, 3.52426596652093*^9}}], Cell[BoxData[ RowBox[{"{", RowBox[{ RowBox[{ SubscriptBox["dr", RowBox[{"1", ",", "1"}]], "\[Equal]", RowBox[{"gt", "-", RowBox[{"2", " ", RowBox[{"(", RowBox[{"gp", "+", "gt"}], ")"}], " ", SubscriptBox["r", RowBox[{"1", ",", "1"}]]}], "-", RowBox[{"E1", " ", "i", " ", SubscriptBox["r", RowBox[{"1", ",", "3"}]]}], "+", RowBox[{"E1c", " ", "i", " ", SubscriptBox["r", RowBox[{"3", ",", "1"}]]}], "+", RowBox[{"G", " ", SubscriptBox["r", RowBox[{"3", ",", "3"}]]}]}]}], ",", RowBox[{ SubscriptBox["dr", RowBox[{"1", ",", "2"}]], "\[Equal]", RowBox[{ RowBox[{ RowBox[{"(", RowBox[{ RowBox[{"-", "gp"}], "-", RowBox[{"2", " ", "gt"}], "-", RowBox[{"d1", " ", "i"}], "+", RowBox[{"da", " ", "i"}]}], ")"}], " ", SubscriptBox["r", RowBox[{"1", ",", "2"}]]}], "-", RowBox[{"Ef", " ", "i", " ", SubscriptBox["r", RowBox[{"1", ",", "3"}]]}], "+", RowBox[{"E1c", " ", "i", " ", SubscriptBox["r", RowBox[{"3", ",", "2"}]]}]}]}], ",", RowBox[{ SubscriptBox["dr", RowBox[{"1", ",", "3"}]], "\[Equal]", RowBox[{ RowBox[{ RowBox[{"-", "E1c"}], " ", "i", " ", SubscriptBox["r", RowBox[{"1", ",", "1"}]]}], "-", RowBox[{"Efc", " ", "i", " ", SubscriptBox["r", RowBox[{"1", ",", "2"}]]}], "+", RowBox[{ RowBox[{"(", RowBox[{ RowBox[{"-", "G"}], "-", "gp", "-", RowBox[{"2", " ", "gt"}], "-", RowBox[{"d1", " ", "i"}]}], ")"}], " ", SubscriptBox["r", RowBox[{"1", ",", "3"}]]}], "+", RowBox[{"E1c", " ", "i", " ", SubscriptBox["r", RowBox[{"3", ",", "3"}]]}]}]}], ",", RowBox[{ SubscriptBox["dr", RowBox[{"2", ",", "1"}]], "\[Equal]", RowBox[{ RowBox[{"i", " ", RowBox[{"(", RowBox[{"d1", "-", "da", "+", RowBox[{ RowBox[{"(", RowBox[{"gp", "+", RowBox[{"2", " ", "gt"}]}], ")"}], " ", "i"}]}], ")"}], " ", SubscriptBox["r", RowBox[{"2", ",", "1"}]]}], "-", RowBox[{"E1", " ", "i", " ", SubscriptBox["r", RowBox[{"2", ",", "3"}]]}], "+", RowBox[{"Efc", " ", "i", " ", SubscriptBox["r", RowBox[{"3", ",", "1"}]]}]}]}], ",", RowBox[{ SubscriptBox["dr", RowBox[{"2", ",", "2"}]], "\[Equal]", RowBox[{"gt", "-", RowBox[{"2", " ", "gt", " ", SubscriptBox["r", RowBox[{"2", ",", "2"}]]}], "-", RowBox[{"Ef", " ", "i", " ", SubscriptBox["r", RowBox[{"2", ",", "3"}]]}], "+", RowBox[{"Efc", " ", "i", " ", SubscriptBox["r", RowBox[{"3", ",", "2"}]]}], "+", RowBox[{"G", " ", SubscriptBox["r", RowBox[{"3", ",", "3"}]]}]}]}], ",", RowBox[{ SubscriptBox["dr", RowBox[{"2", ",", "3"}]], "\[Equal]", RowBox[{ RowBox[{ RowBox[{"-", "E1c"}], " ", "i", " ", SubscriptBox["r", RowBox[{"2", ",", "1"}]]}], "-", RowBox[{"Efc", " ", "i", " ", SubscriptBox["r", RowBox[{"2", ",", "2"}]]}], "+", RowBox[{ RowBox[{"(", RowBox[{ RowBox[{"-", "G"}], "-", RowBox[{"2", " ", "gt"}], "-", RowBox[{"da", " ", "i"}]}], ")"}], " ", SubscriptBox["r", RowBox[{"2", ",", "3"}]]}], "+", RowBox[{"Efc", " ", "i", " ", SubscriptBox["r", RowBox[{"3", ",", "3"}]]}]}]}], ",", RowBox[{ SubscriptBox["dr", RowBox[{"3", ",", "1"}]], "\[Equal]", RowBox[{ RowBox[{"E1", " ", "i", " ", SubscriptBox["r", RowBox[{"1", ",", "1"}]]}], "+", RowBox[{"Ef", " ", "i", " ", SubscriptBox["r", RowBox[{"2", ",", "1"}]]}], "+", RowBox[{ RowBox[{"(", RowBox[{ RowBox[{"-", "G"}], "-", "gp", "-", RowBox[{"2", " ", "gt"}], "+", RowBox[{"d1", " ", "i"}]}], ")"}], " ", SubscriptBox["r", RowBox[{"3", ",", "1"}]]}], "-", RowBox[{"E1", " ", "i", " ", SubscriptBox["r", RowBox[{"3", ",", "3"}]]}]}]}], ",", RowBox[{ SubscriptBox["dr", RowBox[{"3", ",", "2"}]], "\[Equal]", RowBox[{ RowBox[{"E1", " ", "i", " ", SubscriptBox["r", RowBox[{"1", ",", "2"}]]}], "+", RowBox[{"Ef", " ", "i", " ", SubscriptBox["r", RowBox[{"2", ",", "2"}]]}], "+", RowBox[{ RowBox[{"(", RowBox[{ RowBox[{"-", "G"}], "-", RowBox[{"2", " ", "gt"}], "+", RowBox[{"da", " ", "i"}]}], ")"}], " ", SubscriptBox["r", RowBox[{"3", ",", "2"}]]}], "-", RowBox[{"Ef", " ", "i", " ", SubscriptBox["r", RowBox[{"3", ",", "3"}]]}]}]}], ",", RowBox[{ SubscriptBox["dr", RowBox[{"3", ",", "3"}]], "\[Equal]", RowBox[{ RowBox[{"2", " ", "gp", " ", SubscriptBox["r", RowBox[{"1", ",", "1"}]]}], "+", RowBox[{"E1", " ", "i", " ", SubscriptBox["r", RowBox[{"1", ",", "3"}]]}], "+", RowBox[{"Ef", " ", "i", " ", SubscriptBox["r", RowBox[{"2", ",", "3"}]]}], "-", RowBox[{"E1c", " ", "i", " ", SubscriptBox["r", RowBox[{"3", ",", "1"}]]}], "-", RowBox[{"Efc", " ", "i", " ", SubscriptBox["r", RowBox[{"3", ",", "2"}]]}], "-", RowBox[{"2", " ", RowBox[{"(", RowBox[{"G", "+", "gt"}], ")"}], " ", SubscriptBox["r", RowBox[{"3", ",", "3"}]]}]}]}]}], "}"}]], "Output", CellChangeTimes->{3.524014014687035*^9, 3.524014182827821*^9, 3.524014214903372*^9, 3.524259784109108*^9, 3.52425981618349*^9, 3.524259922834424*^9, 3.524260078672261*^9, 3.524260324306823*^9, 3.52426584452029*^9, 3.52426593042942*^9, 3.524265967369995*^9}], Cell[BoxData[ RowBox[{"{", RowBox[{ RowBox[{ SubscriptBox["dr", RowBox[{"1", ",", "1"}]], "\[Equal]", RowBox[{"gt", "-", RowBox[{"2", " ", RowBox[{"(", RowBox[{"gp", "+", "gt"}], ")"}], " ", SubscriptBox["r", RowBox[{"1", ",", "1"}]]}], "-", RowBox[{"E1", " ", "i", " ", SubscriptBox["r", RowBox[{"1", ",", "3"}]]}], "+", RowBox[{"E1c", " ", "i", " ", SubscriptBox["r", RowBox[{"3", ",", "1"}]]}], "+", RowBox[{"G", " ", SubscriptBox["r", RowBox[{"3", ",", "3"}]]}]}]}], ",", RowBox[{ SubscriptBox["dr", RowBox[{"1", ",", "2"}]], "\[Equal]", RowBox[{ RowBox[{ RowBox[{"(", RowBox[{ RowBox[{"-", "gp"}], "-", RowBox[{"2", " ", "gt"}], "-", RowBox[{"d1", " ", "i"}], "+", RowBox[{"da", " ", "i"}]}], ")"}], " ", SubscriptBox["r", RowBox[{"1", ",", "2"}]]}], "-", RowBox[{"Ef", " ", "i", " ", SubscriptBox["r", RowBox[{"1", ",", "3"}]]}], "+", RowBox[{"E1c", " ", "i", " ", SubscriptBox["r", RowBox[{"3", ",", "2"}]]}]}]}], ",", RowBox[{ SubscriptBox["dr", RowBox[{"1", ",", "3"}]], "\[Equal]", RowBox[{ RowBox[{ RowBox[{"-", "E1c"}], " ", "i", " ", SubscriptBox["r", RowBox[{"1", ",", "1"}]]}], "-", RowBox[{"Efc", " ", "i", " ", SubscriptBox["r", RowBox[{"1", ",", "2"}]]}], "+", RowBox[{ RowBox[{"(", RowBox[{ RowBox[{"-", "G"}], "-", "gp", "-", RowBox[{"2", " ", "gt"}], "-", RowBox[{"d1", " ", "i"}]}], ")"}], " ", SubscriptBox["r", RowBox[{"1", ",", "3"}]]}], "+", RowBox[{"E1c", " ", "i", " ", SubscriptBox["r", RowBox[{"3", ",", "3"}]]}]}]}], ",", RowBox[{ SubscriptBox["dr", RowBox[{"2", ",", "2"}]], "\[Equal]", RowBox[{"gt", "-", RowBox[{"2", " ", "gt", " ", SubscriptBox["r", RowBox[{"2", ",", "2"}]]}], "-", RowBox[{"Ef", " ", "i", " ", SubscriptBox["r", RowBox[{"2", ",", "3"}]]}], "+", RowBox[{"Efc", " ", "i", " ", SubscriptBox["r", RowBox[{"3", ",", "2"}]]}], "+", RowBox[{"G", " ", SubscriptBox["r", RowBox[{"3", ",", "3"}]]}]}]}], ",", RowBox[{ SubscriptBox["dr", RowBox[{"2", ",", "3"}]], "\[Equal]", RowBox[{ RowBox[{ RowBox[{"-", "E1c"}], " ", "i", " ", SubscriptBox["r", RowBox[{"2", ",", "1"}]]}], "-", RowBox[{"Efc", " ", "i", " ", SubscriptBox["r", RowBox[{"2", ",", "2"}]]}], "+", RowBox[{ RowBox[{"(", RowBox[{ RowBox[{"-", "G"}], "-", RowBox[{"2", " ", "gt"}], "-", RowBox[{"da", " ", "i"}]}], ")"}], " ", SubscriptBox["r", RowBox[{"2", ",", "3"}]]}], "+", RowBox[{"Efc", " ", "i", " ", SubscriptBox["r", RowBox[{"3", ",", "3"}]]}]}]}], ",", RowBox[{ SubscriptBox["dr", RowBox[{"3", ",", "3"}]], "\[Equal]", RowBox[{ RowBox[{"2", " ", "gp", " ", SubscriptBox["r", RowBox[{"1", ",", "1"}]]}], "+", RowBox[{"E1", " ", "i", " ", SubscriptBox["r", RowBox[{"1", ",", "3"}]]}], "+", RowBox[{"Ef", " ", "i", " ", SubscriptBox["r", RowBox[{"2", ",", "3"}]]}], "-", RowBox[{"E1c", " ", "i", " ", SubscriptBox["r", RowBox[{"3", ",", "1"}]]}], "-", RowBox[{"Efc", " ", "i", " ", SubscriptBox["r", RowBox[{"3", ",", "2"}]]}], "-", RowBox[{"2", " ", RowBox[{"(", RowBox[{"G", "+", "gt"}], ")"}], " ", SubscriptBox["r", RowBox[{"3", ",", "3"}]]}]}]}]}], "}"}]], "Output", CellChangeTimes->{3.524014014687035*^9, 3.524014182827821*^9, 3.524014214903372*^9, 3.524259784109108*^9, 3.52425981618349*^9, 3.524259922834424*^9, 3.524260078672261*^9, 3.524260324306823*^9, 3.52426584452029*^9, 3.52426593042942*^9, 3.524265967377494*^9}], Cell[BoxData["\<\"dr11_dt = gt - 2*(gp + gt)*r11 - E1*i*r13 + E1c*i*r31 + \ G*r33;\\ndr12_dt = (-gp - 2*gt - d1*i + da*i)*r12 - Ef*i*r13 + \ E1c*i*r32;\\ndr13_dt = -(E1c*i*r11) - Efc*i*r12 + (-G - gp - 2*gt - d1*i)*r13 \ + E1c*i*r33;\\ndr22_dt = gt - 2*gt*r22 - Ef*i*r23 + Efc*i*r32 + \ G*r33;\\ndr23_dt = -(E1c*i*r21) - Efc*i*r22 + (-G - 2*gt - da*i)*r23 + \ Efc*i*r33;\\ndr33_dt = 2*gp*r11 + E1*i*r13 + Ef*i*r23 - E1c*i*r31 - Efc*i*r32 \ - 2*(G + gt)*r33;\\n\"\>"], "Output", CellChangeTimes->{3.524014014687035*^9, 3.524014182827821*^9, 3.524014214903372*^9, 3.524259784109108*^9, 3.52425981618349*^9, 3.524259922834424*^9, 3.524260078672261*^9, 3.524260324306823*^9, 3.52426584452029*^9, 3.52426593042942*^9, 3.524265967380181*^9}], Cell[BoxData["\<\"/mnt/light_huge_archive/home/evmik/src/my_src/Nresonances/\ xmds2/Shahriar_system/code.txt\"\>"], "Output", CellChangeTimes->{3.524014014687035*^9, 3.524014182827821*^9, 3.524014214903372*^9, 3.524259784109108*^9, 3.52425981618349*^9, 3.524259922834424*^9, 3.524260078672261*^9, 3.524260324306823*^9, 3.52426584452029*^9, 3.52426593042942*^9, 3.524265967566105*^9}] }, Open ]], Cell[BoxData[""], "Input", CellChangeTimes->{{3.524260308571472*^9, 3.524260312167967*^9}}] }, Open ]] }, WindowSize->{960, 1029}, WindowMargins->{{Automatic, 0}, {Automatic, 0}}, ShowSelection->True, FrontEndVersion->"8.0 for Linux x86 (32-bit) (February 23, 2011)", StyleDefinitions->"Default.nb" ] (* End of Notebook Content *) (* Internal cache information *) (*CellTagsOutline CellTagsIndex->{} *) (*CellTagsIndex CellTagsIndex->{} *) (*NotebookFileOutline Notebook[{ Cell[CellGroupData[{ Cell[567, 22, 36, 0, 74, "Section"], Cell[606, 24, 66, 1, 44, "MathCaption", CellID->836781195], Cell[675, 27, 85, 2, 30, "Input", CellID->2058623809], Cell[763, 31, 1128, 37, 52, "Text", CellID->525777075], Cell[1894, 70, 112, 3, 44, "MathCaption", CellID->429217524], Cell[2009, 75, 1057, 27, 126, "Input", CellID->433132487], Cell[3069, 104, 125, 3, 44, "MathCaption", CellID->133602844], Cell[CellGroupData[{ Cell[3219, 111, 784, 23, 50, "Input"], Cell[4006, 136, 990, 30, 52, "Output"] }, Open ]], Cell[5011, 169, 166, 4, 44, "MathCaption", CellID->462076121], Cell[CellGroupData[{ Cell[5202, 177, 508, 15, 50, "Input"], Cell[5713, 194, 1472, 42, 73, "Output"] }, Open ]], Cell[7200, 239, 76, 1, 44, "MathCaption", CellID->358620443], Cell[CellGroupData[{ Cell[7301, 244, 530, 16, 30, "Input", CellID->167259034], Cell[7834, 262, 634, 12, 94, "Output"] }, Open ]], Cell[8483, 277, 182, 4, 44, "MathCaption", CellID->577766068], Cell[CellGroupData[{ Cell[8690, 285, 1156, 31, 69, "Input"], Cell[9849, 318, 1562, 45, 100, "Output"] }, Open ]], Cell[11426, 366, 456, 13, 44, "MathCaption", CellID->610306692], Cell[CellGroupData[{ Cell[11907, 383, 933, 25, 58, "Input", CellID->645617687], Cell[12843, 410, 781, 21, 72, "Output"] }, Open ]], Cell[13639, 434, 390, 12, 44, "MathCaption", CellID->854192725], Cell[CellGroupData[{ Cell[14054, 450, 1070, 29, 58, "Input", CellID->465762594], Cell[15127, 481, 1290, 37, 91, "Output"] }, Open ]], Cell[16432, 521, 76, 1, 44, "MathCaption", CellID->314466782], Cell[CellGroupData[{ Cell[16533, 526, 250, 7, 30, "Input", CellID->298399236], Cell[16786, 535, 16111, 429, 250, "Output"] }, Open ]], Cell[32912, 967, 34, 0, 30, "Text"], Cell[CellGroupData[{ Cell[32971, 971, 3830, 101, 190, "Input"], Cell[36804, 1074, 5940, 188, 138, "Output"], Cell[42747, 1264, 4060, 127, 84, "Output"], Cell[46810, 1393, 745, 10, 138, "Output"], Cell[47558, 1405, 393, 5, 29, "Output"] }, Open ]], Cell[47966, 1413, 92, 1, 30, "Input"] }, Open ]] } ] *) (* End of internal cache information *)