summaryrefslogtreecommitdiff
path: root/xmds2
diff options
context:
space:
mode:
Diffstat (limited to 'xmds2')
-rw-r--r--xmds2/Shahriar_system/GenerateShahriarSystem.nb1887
-rw-r--r--xmds2/Shahriar_system/code.txt6
2 files changed, 1893 insertions, 0 deletions
diff --git a/xmds2/Shahriar_system/GenerateShahriarSystem.nb b/xmds2/Shahriar_system/GenerateShahriarSystem.nb
new file mode 100644
index 0000000..1c4367c
--- /dev/null
+++ b/xmds2/Shahriar_system/GenerateShahriarSystem.nb
@@ -0,0 +1,1887 @@
+(* 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[ 63341, 1878]
+NotebookOptionsPosition[ 61116, 1798]
+NotebookOutlinePosition[ 61481, 1814]
+CellTagsIndexPosition[ 61438, 1811]
+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]]],
+ " (near resonant with the ",
+ Cell[BoxData[
+ StyleBox[
+ RowBox[{
+ RowBox[{
+ RowBox[{
+ RowBox[{"|", "2"}], "\[RightAngleBracket]"}], "\[Rule]",
+ RowBox[{"|", "3"}]}], "\[RightAngleBracket]"}], "InlineMath"]]],
+ " transition), and ",
+ Cell[BoxData[
+ FormBox[
+ StyleBox[
+ SubscriptBox["\[Omega]", "c"], "InlineMath"], TraditionalForm]]],
+ " (near resonant with the ",
+ Cell[BoxData[
+ StyleBox[
+ RowBox[{
+ RowBox[{
+ RowBox[{
+ RowBox[{"|", "2"}], "\[RightAngleBracket]"}], "\[Rule]",
+ RowBox[{"|", "4"}]}], "\[RightAngleBracket]"}], "InlineMath"]]],
+ " transition)."
+}], "Text",
+ 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"}], "}"}]}], "]"}], "+",
+ RowBox[{"OpticalField", "[",
+ RowBox[{"\[Omega]3", ",",
+ RowBox[{"{",
+ RowBox[{
+ RowBox[{"\[CapitalOmega]3", "/",
+ RowBox[{"ReducedME", "[",
+ RowBox[{"2", ",",
+ RowBox[{"{",
+ RowBox[{"Dipole", ",", "1"}], "}"}], ",", "3"}], "]"}]}], ",",
+ "\[Phi]3"}], "}"}]}], "]"}]}]}]], "Input"],
+
+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"}], "]"}]], "+",
+ FractionBox[
+ RowBox[{
+ SuperscriptBox["\[ExponentialE]",
+ RowBox[{"\[ImaginaryI]", " ",
+ RowBox[{"(",
+ RowBox[{"\[Phi]3", "-",
+ RowBox[{"t", " ", "\[Omega]3"}]}], ")"}]}]], " ",
+ "\[CapitalOmega]3"}],
+ RowBox[{"ReducedME", "[",
+ RowBox[{"2", ",",
+ RowBox[{"{",
+ RowBox[{"Dipole", ",", "1"}], "}"}], ",", "3"}], "]"}]]}], ",", "0",
+ ",", "0"}], "}"}]], "Output"]
+}, 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[{
+ RowBox[{"-", "\[CapitalOmega]2"}], " ",
+ RowBox[{"Cos", "[",
+ RowBox[{"\[Phi]2", "-",
+ RowBox[{"t", " ", "\[Omega]2"}]}], "]"}]}], "-",
+ RowBox[{"\[CapitalOmega]3", " ",
+ RowBox[{"Cos", "[",
+ RowBox[{"\[Phi]3", "-",
+ RowBox[{"t", " ", "\[Omega]3"}]}], "]"}]}]}]},
+ {
+ RowBox[{
+ RowBox[{"-", "\[CapitalOmega]1"}], " ",
+ RowBox[{"Cos", "[",
+ RowBox[{"\[Phi]1", "-",
+ RowBox[{"t", " ", "\[Omega]1"}]}], "]"}]}],
+ RowBox[{
+ RowBox[{
+ RowBox[{"-", "\[CapitalOmega]2"}], " ",
+ RowBox[{"Cos", "[",
+ RowBox[{"\[Phi]2", "-",
+ RowBox[{"t", " ", "\[Omega]2"}]}], "]"}]}], "-",
+ RowBox[{"\[CapitalOmega]3", " ",
+ RowBox[{"Cos", "[",
+ RowBox[{"\[Phi]3", "-",
+ RowBox[{"t", " ", "\[Omega]3"}]}], "]"}]}]}], "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"]
+}, 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", "[", "4", "]"}], "\[Rule]", ".5"}]}], "}"}]}]}],
+ "]"}]], "Input",
+ 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"]
+}, 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", ",",
+ RowBox[{"H", "/.",
+ RowBox[{"{",
+ RowBox[{
+ RowBox[{"\[Omega]2", "\[Rule]",
+ RowBox[{"\[Omega]a", "-",
+ RowBox[{"\[Delta]", "/", "2"}]}]}], ",",
+ RowBox[{"\[Omega]3", "\[Rule]",
+ RowBox[{"\[Omega]a", "+",
+ RowBox[{"\[Delta]", "/", "2"}]}]}]}], "}"}]}], ",",
+ RowBox[{"{",
+ RowBox[{"\[Omega]1", ",", "\[Omega]a"}], "}"}], ",",
+ RowBox[{"TransformMatrix", "\[Rule]",
+ RowBox[{"MatrixExp", "[",
+ RowBox[{
+ RowBox[{"-", "\[ImaginaryI]"}], " ", "t", " ",
+ RowBox[{"DiagonalMatrix", "[",
+ RowBox[{"{",
+ RowBox[{
+ RowBox[{"-", "\[Omega]1"}], ",",
+ RowBox[{"-", "\[Omega]a"}], ",", "0"}], "}"}], "]"}]}],
+ "]"}]}]}], "]"}], "/.",
+ RowBox[{"{",
+ RowBox[{
+ RowBox[{"\[Omega]1", "\[Rule]",
+ RowBox[{
+ RowBox[{"-",
+ RowBox[{"Energy", "[", "1", "]"}]}], "+", "\[Delta]1"}]}], ",",
+ RowBox[{"\[Omega]a", "\[Rule]",
+ RowBox[{
+ RowBox[{"-",
+ RowBox[{"Energy", "[", "2", "]"}]}], "+", "\[Delta]a"}]}]}],
+ "}"}]}]}], ")"}], "//", "MatrixForm"}]], "Input"],
+
+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]a",
+ RowBox[{
+ RowBox[{
+ RowBox[{"-",
+ FractionBox["1", "2"]}], " ",
+ SuperscriptBox["\[ExponentialE]",
+ RowBox[{
+ RowBox[{
+ RowBox[{"-",
+ FractionBox["1", "2"]}], " ", "\[ImaginaryI]", " ", "t", " ",
+ "\[Delta]"}], "-",
+ RowBox[{"\[ImaginaryI]", " ", "\[Phi]2"}]}]], " ",
+ "\[CapitalOmega]2"}], "-",
+ RowBox[{
+ FractionBox["1", "2"], " ",
+ SuperscriptBox["\[ExponentialE]",
+ RowBox[{
+ FractionBox[
+ RowBox[{"\[ImaginaryI]", " ", "t", " ", "\[Delta]"}], "2"], "-",
+ RowBox[{"\[ImaginaryI]", " ", "\[Phi]3"}]}]], " ",
+ "\[CapitalOmega]3"}]}]},
+ {
+ RowBox[{
+ RowBox[{"-",
+ FractionBox["1", "2"]}], " ",
+ SuperscriptBox["\[ExponentialE]",
+ RowBox[{"\[ImaginaryI]", " ", "\[Phi]1"}]], " ", "\[CapitalOmega]1"}],
+ RowBox[{
+ RowBox[{
+ RowBox[{"-",
+ FractionBox["1", "2"]}], " ",
+ SuperscriptBox["\[ExponentialE]",
+ RowBox[{
+ FractionBox[
+ RowBox[{"\[ImaginaryI]", " ", "t", " ", "\[Delta]"}], "2"], "+",
+ RowBox[{"\[ImaginaryI]", " ", "\[Phi]2"}]}]], " ",
+ "\[CapitalOmega]2"}], "-",
+ RowBox[{
+ FractionBox["1", "2"], " ",
+ SuperscriptBox["\[ExponentialE]",
+ RowBox[{
+ RowBox[{
+ RowBox[{"-",
+ FractionBox["1", "2"]}], " ", "\[ImaginaryI]", " ", "t", " ",
+ "\[Delta]"}], "+",
+ RowBox[{"\[ImaginaryI]", " ", "\[Phi]3"}]}]], " ",
+ "\[CapitalOmega]3"}]}], "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"]
+}, 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"]
+}, 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"]
+}, 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[
+ RowBox[{"(",
+ 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[
+ RowBox[{"(",
+ 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]a", " ",
+ RowBox[{
+ SubscriptBox["\[Rho]",
+ RowBox[{"1", ",", "2"}]], "[", "t", "]"}]}], "-",
+ RowBox[{
+ FractionBox["1", "2"], " ", "\[ImaginaryI]", " ",
+ SuperscriptBox["\[ExponentialE]",
+ RowBox[{
+ FractionBox[
+ RowBox[{"\[ImaginaryI]", " ", "t", " ", "\[Delta]"}], "2"], "+",
+ RowBox[{"\[ImaginaryI]", " ", "\[Phi]2"}]}]], " ",
+ "\[CapitalOmega]2", " ",
+ RowBox[{
+ SubscriptBox["\[Rho]",
+ RowBox[{"1", ",", "3"}]], "[", "t", "]"}]}], "-",
+ RowBox[{
+ FractionBox["1", "2"], " ", "\[ImaginaryI]", " ",
+ SuperscriptBox["\[ExponentialE]",
+ RowBox[{
+ RowBox[{
+ RowBox[{"-",
+ FractionBox["1", "2"]}], " ", "\[ImaginaryI]", " ", "t", " ",
+ "\[Delta]"}], "+",
+ RowBox[{"\[ImaginaryI]", " ", "\[Phi]3"}]}]], " ",
+ "\[CapitalOmega]3", " ",
+ 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[
+ RowBox[{"(",
+ 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[{
+ RowBox[{"-",
+ FractionBox["1", "2"]}], " ", "\[ImaginaryI]", " ", "t", " ",
+ "\[Delta]"}], "-",
+ RowBox[{"\[ImaginaryI]", " ", "\[Phi]2"}]}]], " ",
+ "\[CapitalOmega]2", " ",
+ RowBox[{
+ SubscriptBox["\[Rho]",
+ RowBox[{"1", ",", "2"}]], "[", "t", "]"}]}], "-",
+ RowBox[{
+ FractionBox["1", "2"], " ", "\[ImaginaryI]", " ",
+ SuperscriptBox["\[ExponentialE]",
+ RowBox[{
+ FractionBox[
+ RowBox[{"\[ImaginaryI]", " ", "t", " ", "\[Delta]"}], "2"], "-",
+ RowBox[{"\[ImaginaryI]", " ", "\[Phi]3"}]}]], " ",
+ "\[CapitalOmega]3", " ",
+ 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[
+ RowBox[{"(",
+ 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]a", " ",
+ 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[{
+ RowBox[{"-",
+ FractionBox["1", "2"]}], " ", "\[ImaginaryI]", " ", "t", " ",
+ "\[Delta]"}], "-",
+ RowBox[{"\[ImaginaryI]", " ", "\[Phi]2"}]}]], " ",
+ "\[CapitalOmega]2", " ",
+ RowBox[{
+ SubscriptBox["\[Rho]",
+ RowBox[{"3", ",", "1"}]], "[", "t", "]"}]}], "+",
+ RowBox[{
+ FractionBox["1", "2"], " ", "\[ImaginaryI]", " ",
+ SuperscriptBox["\[ExponentialE]",
+ RowBox[{
+ FractionBox[
+ RowBox[{"\[ImaginaryI]", " ", "t", " ", "\[Delta]"}], "2"], "-",
+ RowBox[{"\[ImaginaryI]", " ", "\[Phi]3"}]}]], " ",
+ "\[CapitalOmega]3", " ",
+ RowBox[{
+ SubscriptBox["\[Rho]",
+ RowBox[{"3", ",", "1"}]], "[", "t", "]"}]}]}]}]},
+ {
+ RowBox[{
+ RowBox[{
+ SuperscriptBox[
+ RowBox[{"(",
+ 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[{
+ FractionBox[
+ RowBox[{"\[ImaginaryI]", " ", "t", " ", "\[Delta]"}], "2"], "+",
+ RowBox[{"\[ImaginaryI]", " ", "\[Phi]2"}]}]], " ",
+ "\[CapitalOmega]2", " ",
+ RowBox[{
+ SubscriptBox["\[Rho]",
+ RowBox[{"2", ",", "3"}]], "[", "t", "]"}]}], "-",
+ RowBox[{
+ FractionBox["1", "2"], " ", "\[ImaginaryI]", " ",
+ SuperscriptBox["\[ExponentialE]",
+ RowBox[{
+ RowBox[{
+ RowBox[{"-",
+ FractionBox["1", "2"]}], " ", "\[ImaginaryI]", " ", "t", " ",
+ "\[Delta]"}], "+",
+ RowBox[{"\[ImaginaryI]", " ", "\[Phi]3"}]}]], " ",
+ "\[CapitalOmega]3", " ",
+ RowBox[{
+ SubscriptBox["\[Rho]",
+ RowBox[{"2", ",", "3"}]], "[", "t", "]"}]}], "+",
+ RowBox[{
+ FractionBox["1", "2"], " ", "\[ImaginaryI]", " ",
+ SuperscriptBox["\[ExponentialE]",
+ RowBox[{
+ RowBox[{
+ RowBox[{"-",
+ FractionBox["1", "2"]}], " ", "\[ImaginaryI]", " ", "t", " ",
+ "\[Delta]"}], "-",
+ RowBox[{"\[ImaginaryI]", " ", "\[Phi]2"}]}]], " ",
+ "\[CapitalOmega]2", " ",
+ RowBox[{
+ SubscriptBox["\[Rho]",
+ RowBox[{"3", ",", "2"}]], "[", "t", "]"}]}], "+",
+ RowBox[{
+ FractionBox["1", "2"], " ", "\[ImaginaryI]", " ",
+ SuperscriptBox["\[ExponentialE]",
+ RowBox[{
+ FractionBox[
+ RowBox[{"\[ImaginaryI]", " ", "t", " ", "\[Delta]"}], "2"], "-",
+ RowBox[{"\[ImaginaryI]", " ", "\[Phi]3"}]}]], " ",
+ "\[CapitalOmega]3", " ",
+ RowBox[{
+ SubscriptBox["\[Rho]",
+ RowBox[{"3", ",", "2"}]], "[", "t", "]"}]}], "+",
+ RowBox[{
+ FractionBox["1", "2"], " ", "\[CapitalGamma]", " ",
+ RowBox[{
+ SubscriptBox["\[Rho]",
+ RowBox[{"3", ",", "3"}]], "[", "t", "]"}]}]}]}]},
+ {
+ RowBox[{
+ RowBox[{
+ SuperscriptBox[
+ RowBox[{"(",
+ 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[{
+ RowBox[{"-",
+ FractionBox["1", "2"]}], " ", "\[ImaginaryI]", " ", "t", " ",
+ "\[Delta]"}], "-",
+ RowBox[{"\[ImaginaryI]", " ", "\[Phi]2"}]}]], " ",
+ "\[CapitalOmega]2", " ",
+ RowBox[{
+ SubscriptBox["\[Rho]",
+ RowBox[{"2", ",", "2"}]], "[", "t", "]"}]}], "-",
+ RowBox[{
+ FractionBox["1", "2"], " ", "\[ImaginaryI]", " ",
+ SuperscriptBox["\[ExponentialE]",
+ RowBox[{
+ FractionBox[
+ RowBox[{"\[ImaginaryI]", " ", "t", " ", "\[Delta]"}], "2"], "-",
+ RowBox[{"\[ImaginaryI]", " ", "\[Phi]3"}]}]], " ",
+ "\[CapitalOmega]3", " ",
+ 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]a", " ",
+ RowBox[{
+ SubscriptBox["\[Rho]",
+ RowBox[{"2", ",", "3"}]], "[", "t", "]"}]}], "+",
+ RowBox[{
+ FractionBox["1", "2"], " ", "\[ImaginaryI]", " ",
+ SuperscriptBox["\[ExponentialE]",
+ RowBox[{
+ RowBox[{
+ RowBox[{"-",
+ FractionBox["1", "2"]}], " ", "\[ImaginaryI]", " ", "t", " ",
+ "\[Delta]"}], "-",
+ RowBox[{"\[ImaginaryI]", " ", "\[Phi]2"}]}]], " ",
+ "\[CapitalOmega]2", " ",
+ RowBox[{
+ SubscriptBox["\[Rho]",
+ RowBox[{"3", ",", "3"}]], "[", "t", "]"}]}], "+",
+ RowBox[{
+ FractionBox["1", "2"], " ", "\[ImaginaryI]", " ",
+ SuperscriptBox["\[ExponentialE]",
+ RowBox[{
+ FractionBox[
+ RowBox[{"\[ImaginaryI]", " ", "t", " ", "\[Delta]"}], "2"], "-",
+ RowBox[{"\[ImaginaryI]", " ", "\[Phi]3"}]}]], " ",
+ "\[CapitalOmega]3", " ",
+ RowBox[{
+ SubscriptBox["\[Rho]",
+ RowBox[{"3", ",", "3"}]], "[", "t", "]"}]}]}]}]},
+ {
+ RowBox[{
+ RowBox[{
+ SuperscriptBox[
+ RowBox[{"(",
+ 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[{
+ FractionBox[
+ RowBox[{"\[ImaginaryI]", " ", "t", " ", "\[Delta]"}], "2"], "+",
+ RowBox[{"\[ImaginaryI]", " ", "\[Phi]2"}]}]], " ",
+ "\[CapitalOmega]2", " ",
+ RowBox[{
+ SubscriptBox["\[Rho]",
+ RowBox[{"2", ",", "1"}]], "[", "t", "]"}]}], "+",
+ RowBox[{
+ FractionBox["1", "2"], " ", "\[ImaginaryI]", " ",
+ SuperscriptBox["\[ExponentialE]",
+ RowBox[{
+ RowBox[{
+ RowBox[{"-",
+ FractionBox["1", "2"]}], " ", "\[ImaginaryI]", " ", "t", " ",
+ "\[Delta]"}], "+",
+ RowBox[{"\[ImaginaryI]", " ", "\[Phi]3"}]}]], " ",
+ "\[CapitalOmega]3", " ",
+ 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[
+ RowBox[{"(",
+ 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[{
+ FractionBox[
+ RowBox[{"\[ImaginaryI]", " ", "t", " ", "\[Delta]"}], "2"], "+",
+ RowBox[{"\[ImaginaryI]", " ", "\[Phi]2"}]}]], " ",
+ "\[CapitalOmega]2", " ",
+ RowBox[{
+ SubscriptBox["\[Rho]",
+ RowBox[{"2", ",", "2"}]], "[", "t", "]"}]}], "+",
+ RowBox[{
+ FractionBox["1", "2"], " ", "\[ImaginaryI]", " ",
+ SuperscriptBox["\[ExponentialE]",
+ RowBox[{
+ RowBox[{
+ RowBox[{"-",
+ FractionBox["1", "2"]}], " ", "\[ImaginaryI]", " ", "t", " ",
+ "\[Delta]"}], "+",
+ RowBox[{"\[ImaginaryI]", " ", "\[Phi]3"}]}]], " ",
+ "\[CapitalOmega]3", " ",
+ 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]a", " ",
+ RowBox[{
+ SubscriptBox["\[Rho]",
+ RowBox[{"3", ",", "2"}]], "[", "t", "]"}]}], "-",
+ RowBox[{
+ FractionBox["1", "2"], " ", "\[ImaginaryI]", " ",
+ SuperscriptBox["\[ExponentialE]",
+ RowBox[{
+ FractionBox[
+ RowBox[{"\[ImaginaryI]", " ", "t", " ", "\[Delta]"}], "2"], "+",
+ RowBox[{"\[ImaginaryI]", " ", "\[Phi]2"}]}]], " ",
+ "\[CapitalOmega]2", " ",
+ RowBox[{
+ SubscriptBox["\[Rho]",
+ RowBox[{"3", ",", "3"}]], "[", "t", "]"}]}], "-",
+ RowBox[{
+ FractionBox["1", "2"], " ", "\[ImaginaryI]", " ",
+ SuperscriptBox["\[ExponentialE]",
+ RowBox[{
+ RowBox[{
+ RowBox[{"-",
+ FractionBox["1", "2"]}], " ", "\[ImaginaryI]", " ", "t", " ",
+ "\[Delta]"}], "+",
+ RowBox[{"\[ImaginaryI]", " ", "\[Phi]3"}]}]], " ",
+ "\[CapitalOmega]3", " ",
+ RowBox[{
+ SubscriptBox["\[Rho]",
+ RowBox[{"3", ",", "3"}]], "[", "t", "]"}]}]}]}]},
+ {
+ RowBox[{
+ RowBox[{
+ SuperscriptBox[
+ RowBox[{"(",
+ 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[{
+ FractionBox[
+ RowBox[{"\[ImaginaryI]", " ", "t", " ", "\[Delta]"}], "2"], "+",
+ RowBox[{"\[ImaginaryI]", " ", "\[Phi]2"}]}]], " ",
+ "\[CapitalOmega]2", " ",
+ RowBox[{
+ SubscriptBox["\[Rho]",
+ RowBox[{"2", ",", "3"}]], "[", "t", "]"}]}], "+",
+ RowBox[{
+ FractionBox["1", "2"], " ", "\[ImaginaryI]", " ",
+ SuperscriptBox["\[ExponentialE]",
+ RowBox[{
+ RowBox[{
+ RowBox[{"-",
+ FractionBox["1", "2"]}], " ", "\[ImaginaryI]", " ", "t", " ",
+ "\[Delta]"}], "+",
+ RowBox[{"\[ImaginaryI]", " ", "\[Phi]3"}]}]], " ",
+ "\[CapitalOmega]3", " ",
+ 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[{
+ RowBox[{"-",
+ FractionBox["1", "2"]}], " ", "\[ImaginaryI]", " ", "t", " ",
+ "\[Delta]"}], "-",
+ RowBox[{"\[ImaginaryI]", " ", "\[Phi]2"}]}]], " ",
+ "\[CapitalOmega]2", " ",
+ RowBox[{
+ SubscriptBox["\[Rho]",
+ RowBox[{"3", ",", "2"}]], "[", "t", "]"}]}], "-",
+ RowBox[{
+ FractionBox["1", "2"], " ", "\[ImaginaryI]", " ",
+ SuperscriptBox["\[ExponentialE]",
+ RowBox[{
+ FractionBox[
+ RowBox[{"\[ImaginaryI]", " ", "t", " ", "\[Delta]"}], "2"], "-",
+ RowBox[{"\[ImaginaryI]", " ", "\[Phi]3"}]}]], " ",
+ "\[CapitalOmega]3", " ",
+ 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"]
+}, 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[{
+ FractionBox[
+ RowBox[{"\[ImaginaryI]", " ", "t", " ", "\[Delta]"}], "2"], "+",
+ RowBox[{"\[ImaginaryI]", " ", "\[Phi]2"}]}]], " ", "\[Rule]",
+ RowBox[{"2",
+ RowBox[{"d", "[", "t", "]"}],
+ RowBox[{"E2", "/", "\[CapitalOmega]2"}]}]}], ",",
+ RowBox[{
+ SuperscriptBox["\[ExponentialE]",
+ RowBox[{
+ RowBox[{"-",
+ FractionBox[
+ RowBox[{"\[ImaginaryI]", " ", "t", " ", "\[Delta]"}], "2"]}],
+ "-",
+ RowBox[{"\[ImaginaryI]", " ", "\[Phi]2"}]}]], " ", "\[Rule]",
+ RowBox[{"2",
+ RowBox[{"dc", "[", "t", "]"}],
+ RowBox[{"E2c", "/", "\[CapitalOmega]2"}]}]}], ",",
+ RowBox[{
+ SuperscriptBox["\[ExponentialE]",
+ RowBox[{
+ RowBox[{"-",
+ FractionBox[
+ RowBox[{"\[ImaginaryI]", " ", "t", " ", "\[Delta]"}], "2"]}],
+ "+",
+ RowBox[{"\[ImaginaryI]", " ", "\[Phi]3"}]}]], " ", "\[Rule]",
+ RowBox[{"2",
+ RowBox[{"dc", "[", "t", "]"}],
+ RowBox[{"E3", "/", "\[CapitalOmega]3"}]}]}], ",",
+ RowBox[{
+ SuperscriptBox["\[ExponentialE]",
+ RowBox[{
+ FractionBox[
+ RowBox[{"\[ImaginaryI]", " ", "t", " ", "\[Delta]"}], "2"], "-",
+ RowBox[{"\[ImaginaryI]", " ", "\[Phi]3"}]}]], " ", "\[Rule]",
+ RowBox[{"2",
+ RowBox[{"d", "[", "t", "]"}],
+ RowBox[{"E3c", "/", "\[CapitalOmega]3"}]}]}], ",",
+ RowBox[{"\[CapitalGamma]", "\[Rule]",
+ RowBox[{"2", "G"}]}], ",",
+ RowBox[{"\[Gamma]p", "\[Rule]",
+ RowBox[{"2", "gp"}]}], ",",
+ RowBox[{"\[Gamma]t", "\[Rule]",
+ RowBox[{"2", "gt"}]}]}], "}"}]}], ",",
+ 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[{
+ "\"\<Subscript(dr,\>\"", "~~", "a_", "~~", "\"\<,\>\"", "~~", "b_",
+ "~~", "\"\<)\>\""}], ":>",
+ RowBox[{"\"\<dr\>\"", "<>", "a", "<>", "b", "<>", "\"\<_dt\>\""}]}],
+ ",",
+ RowBox[{
+ RowBox[{
+ "\"\<Subscript(\>\"", "~~", "r_", "~~", "\"\<,\>\"", "~~", "a_",
+ "~~", "\"\<,\>\"", "~~", "b_", "~~", "\"\<)\>\""}],
+ "\[RuleDelayed]",
+ RowBox[{"r", "<>", "a", "<>", "b"}]}]}], "}"}]}], "]"}], "&"}], "/@",
+ "%"}], "]"}], "\[IndentingNewLine]",
+ RowBox[{"Export", "[",
+ RowBox[{
+ RowBox[{
+ RowBox[{"NotebookDirectory", "[", "]"}], "<>", "\"\<\\\\code.txt\>\""}],
+ ",", "%"}], "]"}]}], "Input"],
+
+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[{"i", " ", "\[Delta]1"}], "+",
+ RowBox[{"i", " ", "\[Delta]a"}]}], ")"}], " ",
+ SubscriptBox["r",
+ RowBox[{"1", ",", "2"}]]}], "-",
+ RowBox[{"i", " ",
+ RowBox[{"(",
+ RowBox[{
+ RowBox[{"E2", " ",
+ RowBox[{"d", "[", "t", "]"}]}], "+",
+ RowBox[{"E3", " ",
+ RowBox[{"dc", "[", "t", "]"}]}]}], ")"}], " ",
+ 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[{"i", " ",
+ RowBox[{"(",
+ RowBox[{
+ RowBox[{"E3c", " ",
+ RowBox[{"d", "[", "t", "]"}]}], "+",
+ RowBox[{"E2c", " ",
+ RowBox[{"dc", "[", "t", "]"}]}]}], ")"}], " ",
+ SubscriptBox["r",
+ RowBox[{"1", ",", "2"}]]}], "+",
+ RowBox[{
+ RowBox[{"(",
+ RowBox[{
+ RowBox[{"-", "G"}], "-", "gp", "-",
+ RowBox[{"2", " ", "gt"}], "-",
+ RowBox[{"i", " ", "\[Delta]1"}]}], ")"}], " ",
+ SubscriptBox["r",
+ RowBox[{"1", ",", "3"}]]}], "+",
+ RowBox[{"E1c", " ", "i", " ",
+ SubscriptBox["r",
+ RowBox[{"3", ",", "3"}]]}]}]}], ",",
+ RowBox[{
+ SubscriptBox["dr",
+ RowBox[{"2", ",", "1"}]], "\[Equal]",
+ RowBox[{
+ RowBox[{
+ RowBox[{"(",
+ RowBox[{
+ RowBox[{"-", "gp"}], "-",
+ RowBox[{"2", " ", "gt"}], "+",
+ RowBox[{"i", " ",
+ RowBox[{"(",
+ RowBox[{"\[Delta]1", "-", "\[Delta]a"}], ")"}]}]}], ")"}], " ",
+ SubscriptBox["r",
+ RowBox[{"2", ",", "1"}]]}], "-",
+ RowBox[{"E1", " ", "i", " ",
+ SubscriptBox["r",
+ RowBox[{"2", ",", "3"}]]}], "+",
+ RowBox[{"i", " ",
+ RowBox[{"(",
+ RowBox[{
+ RowBox[{"E3c", " ",
+ RowBox[{"d", "[", "t", "]"}]}], "+",
+ RowBox[{"E2c", " ",
+ RowBox[{"dc", "[", "t", "]"}]}]}], ")"}], " ",
+ SubscriptBox["r",
+ RowBox[{"3", ",", "1"}]]}]}]}], ",",
+ RowBox[{
+ SubscriptBox["dr",
+ RowBox[{"2", ",", "2"}]], "\[Equal]",
+ RowBox[{"gt", "-",
+ RowBox[{"2", " ", "gt", " ",
+ SubscriptBox["r",
+ RowBox[{"2", ",", "2"}]]}], "-",
+ RowBox[{"i", " ",
+ RowBox[{"(",
+ RowBox[{
+ RowBox[{"E2", " ",
+ RowBox[{"d", "[", "t", "]"}]}], "+",
+ RowBox[{"E3", " ",
+ RowBox[{"dc", "[", "t", "]"}]}]}], ")"}], " ",
+ SubscriptBox["r",
+ RowBox[{"2", ",", "3"}]]}], "+",
+ RowBox[{"i", " ",
+ RowBox[{"(",
+ RowBox[{
+ RowBox[{"E3c", " ",
+ RowBox[{"d", "[", "t", "]"}]}], "+",
+ RowBox[{"E2c", " ",
+ RowBox[{"dc", "[", "t", "]"}]}]}], ")"}], " ",
+ 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[{"i", " ",
+ RowBox[{"(",
+ RowBox[{
+ RowBox[{"E3c", " ",
+ RowBox[{"d", "[", "t", "]"}]}], "+",
+ RowBox[{"E2c", " ",
+ RowBox[{"dc", "[", "t", "]"}]}]}], ")"}], " ",
+ SubscriptBox["r",
+ RowBox[{"2", ",", "2"}]]}], "+",
+ RowBox[{
+ RowBox[{"(",
+ RowBox[{
+ RowBox[{"-", "G"}], "-",
+ RowBox[{"2", " ", "gt"}], "-",
+ RowBox[{"i", " ", "\[Delta]a"}]}], ")"}], " ",
+ SubscriptBox["r",
+ RowBox[{"2", ",", "3"}]]}], "+",
+ RowBox[{"i", " ",
+ RowBox[{"(",
+ RowBox[{
+ RowBox[{"E3c", " ",
+ RowBox[{"d", "[", "t", "]"}]}], "+",
+ RowBox[{"E2c", " ",
+ RowBox[{"dc", "[", "t", "]"}]}]}], ")"}], " ",
+ SubscriptBox["r",
+ RowBox[{"3", ",", "3"}]]}]}]}], ",",
+ RowBox[{
+ SubscriptBox["dr",
+ RowBox[{"3", ",", "1"}]], "\[Equal]",
+ RowBox[{
+ RowBox[{"E1", " ", "i", " ",
+ SubscriptBox["r",
+ RowBox[{"1", ",", "1"}]]}], "+",
+ RowBox[{"i", " ",
+ RowBox[{"(",
+ RowBox[{
+ RowBox[{"E2", " ",
+ RowBox[{"d", "[", "t", "]"}]}], "+",
+ RowBox[{"E3", " ",
+ RowBox[{"dc", "[", "t", "]"}]}]}], ")"}], " ",
+ SubscriptBox["r",
+ RowBox[{"2", ",", "1"}]]}], "+",
+ RowBox[{
+ RowBox[{"(",
+ RowBox[{
+ RowBox[{"-", "G"}], "-", "gp", "-",
+ RowBox[{"2", " ", "gt"}], "+",
+ RowBox[{"i", " ", "\[Delta]1"}]}], ")"}], " ",
+ 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[{"i", " ",
+ RowBox[{"(",
+ RowBox[{
+ RowBox[{"E2", " ",
+ RowBox[{"d", "[", "t", "]"}]}], "+",
+ RowBox[{"E3", " ",
+ RowBox[{"dc", "[", "t", "]"}]}]}], ")"}], " ",
+ SubscriptBox["r",
+ RowBox[{"2", ",", "2"}]]}], "+",
+ RowBox[{
+ RowBox[{"(",
+ RowBox[{
+ RowBox[{"-", "G"}], "-",
+ RowBox[{"2", " ", "gt"}], "+",
+ RowBox[{"i", " ", "\[Delta]a"}]}], ")"}], " ",
+ SubscriptBox["r",
+ RowBox[{"3", ",", "2"}]]}], "-",
+ RowBox[{"i", " ",
+ RowBox[{"(",
+ RowBox[{
+ RowBox[{"E2", " ",
+ RowBox[{"d", "[", "t", "]"}]}], "+",
+ RowBox[{"E3", " ",
+ RowBox[{"dc", "[", "t", "]"}]}]}], ")"}], " ",
+ 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[{"i", " ",
+ RowBox[{"(",
+ RowBox[{
+ RowBox[{"E2", " ",
+ RowBox[{"d", "[", "t", "]"}]}], "+",
+ RowBox[{"E3", " ",
+ RowBox[{"dc", "[", "t", "]"}]}]}], ")"}], " ",
+ SubscriptBox["r",
+ RowBox[{"2", ",", "3"}]]}], "-",
+ RowBox[{"E1c", " ", "i", " ",
+ SubscriptBox["r",
+ RowBox[{"3", ",", "1"}]]}], "-",
+ RowBox[{"i", " ",
+ RowBox[{"(",
+ RowBox[{
+ RowBox[{"E3c", " ",
+ RowBox[{"d", "[", "t", "]"}]}], "+",
+ RowBox[{"E2c", " ",
+ RowBox[{"dc", "[", "t", "]"}]}]}], ")"}], " ",
+ SubscriptBox["r",
+ RowBox[{"3", ",", "2"}]]}], "-",
+ RowBox[{"2", " ",
+ RowBox[{"(",
+ RowBox[{"G", "+", "gt"}], ")"}], " ",
+ SubscriptBox["r",
+ RowBox[{"3", ",", "3"}]]}]}]}]}], "}"}]], "Output"],
+
+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[{"i", " ", "\[Delta]1"}], "+",
+ RowBox[{"i", " ", "\[Delta]a"}]}], ")"}], " ",
+ SubscriptBox["r",
+ RowBox[{"1", ",", "2"}]]}], "-",
+ RowBox[{"i", " ",
+ RowBox[{"(",
+ RowBox[{
+ RowBox[{"E2", " ",
+ RowBox[{"d", "[", "t", "]"}]}], "+",
+ RowBox[{"E3", " ",
+ RowBox[{"dc", "[", "t", "]"}]}]}], ")"}], " ",
+ 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[{"i", " ",
+ RowBox[{"(",
+ RowBox[{
+ RowBox[{"E3c", " ",
+ RowBox[{"d", "[", "t", "]"}]}], "+",
+ RowBox[{"E2c", " ",
+ RowBox[{"dc", "[", "t", "]"}]}]}], ")"}], " ",
+ SubscriptBox["r",
+ RowBox[{"1", ",", "2"}]]}], "+",
+ RowBox[{
+ RowBox[{"(",
+ RowBox[{
+ RowBox[{"-", "G"}], "-", "gp", "-",
+ RowBox[{"2", " ", "gt"}], "-",
+ RowBox[{"i", " ", "\[Delta]1"}]}], ")"}], " ",
+ 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[{"i", " ",
+ RowBox[{"(",
+ RowBox[{
+ RowBox[{"E2", " ",
+ RowBox[{"d", "[", "t", "]"}]}], "+",
+ RowBox[{"E3", " ",
+ RowBox[{"dc", "[", "t", "]"}]}]}], ")"}], " ",
+ SubscriptBox["r",
+ RowBox[{"2", ",", "3"}]]}], "+",
+ RowBox[{"i", " ",
+ RowBox[{"(",
+ RowBox[{
+ RowBox[{"E3c", " ",
+ RowBox[{"d", "[", "t", "]"}]}], "+",
+ RowBox[{"E2c", " ",
+ RowBox[{"dc", "[", "t", "]"}]}]}], ")"}], " ",
+ 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[{"i", " ",
+ RowBox[{"(",
+ RowBox[{
+ RowBox[{"E3c", " ",
+ RowBox[{"d", "[", "t", "]"}]}], "+",
+ RowBox[{"E2c", " ",
+ RowBox[{"dc", "[", "t", "]"}]}]}], ")"}], " ",
+ SubscriptBox["r",
+ RowBox[{"2", ",", "2"}]]}], "+",
+ RowBox[{
+ RowBox[{"(",
+ RowBox[{
+ RowBox[{"-", "G"}], "-",
+ RowBox[{"2", " ", "gt"}], "-",
+ RowBox[{"i", " ", "\[Delta]a"}]}], ")"}], " ",
+ SubscriptBox["r",
+ RowBox[{"2", ",", "3"}]]}], "+",
+ RowBox[{"i", " ",
+ RowBox[{"(",
+ RowBox[{
+ RowBox[{"E3c", " ",
+ RowBox[{"d", "[", "t", "]"}]}], "+",
+ RowBox[{"E2c", " ",
+ RowBox[{"dc", "[", "t", "]"}]}]}], ")"}], " ",
+ 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[{"i", " ",
+ RowBox[{"(",
+ RowBox[{
+ RowBox[{"E2", " ",
+ RowBox[{"d", "[", "t", "]"}]}], "+",
+ RowBox[{"E3", " ",
+ RowBox[{"dc", "[", "t", "]"}]}]}], ")"}], " ",
+ SubscriptBox["r",
+ RowBox[{"2", ",", "3"}]]}], "-",
+ RowBox[{"E1c", " ", "i", " ",
+ SubscriptBox["r",
+ RowBox[{"3", ",", "1"}]]}], "-",
+ RowBox[{"i", " ",
+ RowBox[{"(",
+ RowBox[{
+ RowBox[{"E3c", " ",
+ RowBox[{"d", "[", "t", "]"}]}], "+",
+ RowBox[{"E2c", " ",
+ RowBox[{"dc", "[", "t", "]"}]}]}], ")"}], " ",
+ SubscriptBox["r",
+ RowBox[{"3", ",", "2"}]]}], "-",
+ RowBox[{"2", " ",
+ RowBox[{"(",
+ RowBox[{"G", "+", "gt"}], ")"}], " ",
+ SubscriptBox["r",
+ RowBox[{"3", ",", "3"}]]}]}]}]}], "}"}]], "Output"],
+
+Cell[BoxData["\<\"dr11_dt = gt - 2*(gp + gt)*r11 - E1*i*r13 + E1c*i*r31 + \
+G*r33;\\ndr12_dt = (-gp - 2*gt - i*\[Delta]1 + i*\[Delta]a)*r12 - i*(E2*d(t) \
++ E3*dc(t))*r13 + E1c*i*r32;\\ndr13_dt = -(E1c*i*r11) - i*(E3c*d(t) + \
+E2c*dc(t))*r12 + (-G - gp - 2*gt - i*\[Delta]1)*r13 + E1c*i*r33;\\ndr22_dt = \
+gt - 2*gt*r22 - i*(E2*d(t) + E3*dc(t))*r23 + i*(E3c*d(t) + E2c*dc(t))*r32 + \
+G*r33;\\ndr23_dt = -(E1c*i*r21) - i*(E3c*d(t) + E2c*dc(t))*r22 + (-G - 2*gt - \
+i*\[Delta]a)*r23 + i*(E3c*d(t) + E2c*dc(t))*r33;\\ndr33_dt = 2*gp*r11 + \
+E1*i*r13 + i*(E2*d(t) + E3*dc(t))*r23 - E1c*i*r31 - i*(E3c*d(t) + \
+E2c*dc(t))*r32 - 2*(G + gt)*r33;\\n\"\>"], "Output"],
+
+Cell[BoxData["\<\"C:\\\\cygwin\\\\home\\\\Simon\\\\Nresonances\\\\xmds2\\\\\
+Shahriar_system\\\\\\\\code.txt\"\>"], "Output"]
+}, Open ]]
+}, Open ]]
+},
+WindowSize->{1010, 875},
+WindowMargins->{{0, Automatic}, {Automatic, 0}},
+ShowSelection->True,
+FrontEndVersion->"7.0 for Microsoft Windows (64-bit) (February 18, 2009)",
+StyleDefinitions->"Default.nb"
+]
+(* End of Notebook Content *)
+
+(* Internal cache information *)
+(*CellTagsOutline
+CellTagsIndex->{}
+*)
+(*CellTagsIndex
+CellTagsIndex->{}
+*)
+(*NotebookFileOutline
+Notebook[{
+Cell[CellGroupData[{
+Cell[567, 22, 36, 0, 71, "Section"],
+Cell[606, 24, 66, 1, 43, "MathCaption",
+ CellID->836781195],
+Cell[675, 27, 85, 2, 31, "Input",
+ CellID->2058623809],
+Cell[763, 31, 1290, 44, 47, "Text",
+ CellID->525777075],
+Cell[2056, 77, 112, 3, 43, "MathCaption",
+ CellID->429217524],
+Cell[2171, 82, 1057, 27, 112, "Input",
+ CellID->433132487],
+Cell[3231, 111, 125, 3, 43, "MathCaption",
+ CellID->133602844],
+Cell[CellGroupData[{
+Cell[3381, 118, 1085, 32, 52, "Input"],
+Cell[4469, 152, 1306, 40, 53, "Output"]
+}, Open ]],
+Cell[5790, 195, 166, 4, 43, "MathCaption",
+ CellID->462076121],
+Cell[CellGroupData[{
+Cell[5981, 203, 508, 15, 31, "Input"],
+Cell[6492, 220, 1755, 50, 71, "Output"]
+}, Open ]],
+Cell[8262, 273, 76, 1, 43, "MathCaption",
+ CellID->358620443],
+Cell[CellGroupData[{
+Cell[8363, 278, 464, 15, 31, "Input",
+ CellID->167259034],
+Cell[8830, 295, 535, 10, 94, "Output"]
+}, Open ]],
+Cell[9380, 308, 182, 4, 43, "MathCaption",
+ CellID->577766068],
+Cell[CellGroupData[{
+Cell[9587, 316, 1379, 38, 72, "Input"],
+Cell[10969, 356, 2462, 70, 117, "Output"]
+}, Open ]],
+Cell[13446, 429, 456, 13, 43, "MathCaption",
+ CellID->610306692],
+Cell[CellGroupData[{
+Cell[13927, 446, 933, 25, 57, "Input",
+ CellID->645617687],
+Cell[14863, 473, 717, 20, 71, "Output"]
+}, Open ]],
+Cell[15595, 496, 390, 12, 43, "MathCaption",
+ CellID->854192725],
+Cell[CellGroupData[{
+Cell[16010, 512, 1070, 29, 59, "Input",
+ CellID->465762594],
+Cell[17083, 543, 1226, 36, 92, "Output"]
+}, Open ]],
+Cell[18324, 582, 76, 1, 43, "MathCaption",
+ CellID->314466782],
+Cell[CellGroupData[{
+Cell[18425, 587, 250, 7, 31, "Input",
+ CellID->298399236],
+Cell[18678, 596, 23733, 623, 315, "Output"]
+}, Open ]],
+Cell[42426, 1222, 34, 0, 29, "Text"],
+Cell[CellGroupData[{
+Cell[42485, 1226, 4538, 123, 228, "Input"],
+Cell[47026, 1351, 7965, 257, 164, "Output"],
+Cell[54994, 1610, 5305, 171, 107, "Output"],
+Cell[60302, 1783, 658, 8, 145, "Output"],
+Cell[60963, 1793, 125, 1, 30, "Output"]
+}, Open ]]
+}, Open ]]
+}
+]
+*)
+
+(* End of internal cache information *)
diff --git a/xmds2/Shahriar_system/code.txt b/xmds2/Shahriar_system/code.txt
new file mode 100644
index 0000000..8c80657
--- /dev/null
+++ b/xmds2/Shahriar_system/code.txt
@@ -0,0 +1,6 @@
+dr11_dt = gt - 2*(gp + gt)*r11 - E1*i*r13 + E1c*i*r31 + G*r33;
+dr12_dt = (-gp - 2*gt - i*δ1 + i*δa)*r12 - i*(E2*d(t) + E3*dc(t))*r13 + E1c*i*r32;
+dr13_dt = -(E1c*i*r11) - i*(E3c*d(t) + E2c*dc(t))*r12 + (-G - gp - 2*gt - i*δ1)*r13 + E1c*i*r33;
+dr22_dt = gt - 2*gt*r22 - i*(E2*d(t) + E3*dc(t))*r23 + i*(E3c*d(t) + E2c*dc(t))*r32 + G*r33;
+dr23_dt = -(E1c*i*r21) - i*(E3c*d(t) + E2c*dc(t))*r22 + (-G - 2*gt - i*δa)*r23 + i*(E3c*d(t) + E2c*dc(t))*r33;
+dr33_dt = 2*gp*r11 + E1*i*r13 + i*(E2*d(t) + E3*dc(t))*r23 - E1c*i*r31 - i*(E3c*d(t) + E2c*dc(t))*r32 - 2*(G + gt)*r33;