u/mccann: theoretical_opt_depth.nb

File theoretical_opt_depth.nb, 12.8 KB (added by mccann, 7 years ago)
Line 
1(* Content-type: application/vnd.wolfram.mathematica *)
2
3(*** Wolfram Notebook File ***)
4(* http://www.wolfram.com/nb *)
5
6(* CreatedBy='Mathematica 11.1' *)
7
8(*CacheID: 234*)
9(* Internal cache information:
10NotebookFileLineBreakTest
11NotebookFileLineBreakTest
12NotebookDataPosition[ 158, 7]
13NotebookDataLength[ 12982, 312]
14NotebookOptionsPosition[ 12203, 281]
15NotebookOutlinePosition[ 12588, 298]
16CellTagsIndexPosition[ 12545, 295]
17WindowFrame->Normal*)
18
19(* Beginning of Notebook Content *)
20Notebook[{
21Cell[BoxData[
22 RowBox[{"ClearAll", "[", "\"\<Global`*\>\"", "]"}]], "Input"],
23
24Cell[CellGroupData[{
25
26Cell[BoxData[{
27 RowBox[{
28 RowBox[{"\[Sigma]H", "=",
29 RowBox[{"6.3", "*",
30 SuperscriptBox["10",
31 RowBox[{"-", "18"}]]}]}], ";"}], "\[IndentingNewLine]",
32 RowBox[{
33 RowBox[{"\[Alpha]Rec", "=",
34 RowBox[{"2.59", "*",
35 SuperscriptBox["10",
36 RowBox[{"-", "13"}]]}]}], ";"}], "\[IndentingNewLine]",
37 RowBox[{
38 RowBox[{"Rp", "=",
39 RowBox[{"1.5", "*",
40 SuperscriptBox["10", "10"]}]}], ";"}], "\[IndentingNewLine]",
41 RowBox[{
42 RowBox[{"k", "=",
43 RowBox[{"1.381", "*",
44 SuperscriptBox["10",
45 RowBox[{"-", "16"}]]}]}], ";"}], "\[IndentingNewLine]",
46 RowBox[{
47 RowBox[{"mH", "=",
48 RowBox[{"1.673", "*",
49 SuperscriptBox["10",
50 RowBox[{"-", "24"}]]}]}], ";"}], "\[IndentingNewLine]",
51 RowBox[{
52 RowBox[{"G", "=",
53 RowBox[{"6.67", "*",
54 SuperscriptBox["10",
55 RowBox[{"-", "8"}]]}]}], ";"}], "\[IndentingNewLine]",
56 RowBox[{
57 RowBox[{"MJ", "=",
58 RowBox[{"1.898", "*",
59 SuperscriptBox["10", "30"]}]}], ";"}], "\[IndentingNewLine]",
60 RowBox[{
61 RowBox[{"\[Gamma]", "=",
62 FractionBox["5", "3"]}], ";"}], "\[IndentingNewLine]",
63 RowBox[{
64 RowBox[{"Mp", "=",
65 RowBox[{"0.263", "MJ"}]}], ";"}], "\[IndentingNewLine]",
66 RowBox[{
67 RowBox[{"Tp", "=",
68 RowBox[{"3", "*",
69 SuperscriptBox["10", "3"]}]}], ";"}], "\[IndentingNewLine]",
70 RowBox[{
71 RowBox[{"csp", "=",
72 SqrtBox[
73 FractionBox[
74 RowBox[{"k", " ", "Tp"}], "mH"]]}], ";"}], "\[IndentingNewLine]",
75 RowBox[{
76 RowBox[{"Rcrit", "=",
77 FractionBox[
78 RowBox[{
79 RowBox[{"(",
80 RowBox[{"\[Gamma]", "-", "1"}], ")"}], "G", " ", "Mp"}],
81 RowBox[{"\[Gamma]", " ",
82 SuperscriptBox["csp", "2"], "Rp"}]]}], ";"}], "\[IndentingNewLine]",
83 RowBox[{
84 RowBox[{"R0", "=",
85 FractionBox["Rcrit",
86 RowBox[{"Rcrit", "-", "1"}]]}], ";"}]}], "Input",
87 CellChangeTimes->{{3.713258846511506*^9, 3.713258939851328*^9}, {
88 3.7132590823904333`*^9, 3.713259126478526*^9}, {3.713259175948367*^9,
89 3.713259192038424*^9}, {3.713259223154564*^9, 3.713259226710137*^9}, {
90 3.713259283745267*^9, 3.7132593106941233`*^9}, {3.713520754920622*^9,
91 3.713520757575594*^9}, {3.7135208004449463`*^9, 3.713520866144994*^9}, {
92 3.713520953852779*^9, 3.7135209655016537`*^9}, {3.713521867250255*^9,
93 3.713521868976025*^9}, {3.71352190023104*^9, 3.713521900973702*^9}, {
94 3.713522196478245*^9, 3.713522248221025*^9}, {3.7135226077012987`*^9,
95 3.7135226248555613`*^9}, {3.7135235310986347`*^9, 3.713523559665166*^9}, {
96 3.713615204688394*^9, 3.713615247162218*^9}, {3.713615325930789*^9,
97 3.7136153583084517`*^9}, {3.713615402955405*^9, 3.713615408176056*^9}, {
98 3.713615474619404*^9, 3.713615553893057*^9}, {3.7136324946782503`*^9,
99 3.7136325289198837`*^9}, {3.7136335496534*^9, 3.713633553984888*^9}, {
100 3.713633602255455*^9, 3.713633602374426*^9}, {3.713633788040331*^9,
101 3.713633788534278*^9}, {3.713693377788597*^9, 3.713693418352685*^9}, {
102 3.7136934974407682`*^9, 3.713693502440379*^9}, {3.71369585042238*^9,
103 3.7136958621256723`*^9}, {3.7136962372383823`*^9, 3.71369625172823*^9}, {
104 3.713699909675071*^9, 3.713699911321764*^9}, {3.713705145967136*^9,
105 3.713705146765848*^9}, {3.713705272059846*^9, 3.713705389130068*^9}, {
106 3.7137054560770063`*^9, 3.7137054590863457`*^9}, {3.713707127878566*^9,
107 3.713707195361743*^9}, 3.713707239591943*^9, 3.713707647051476*^9, {
108 3.713707678231587*^9, 3.713707769699853*^9}, {3.7137079350929337`*^9,
109 3.713707990644376*^9}, {3.713708077620658*^9, 3.7137082291922073`*^9}, {
110 3.713708262381814*^9, 3.713708397505809*^9}, {3.7137086769693527`*^9,
111 3.713708678181336*^9}, {3.713708731659623*^9, 3.7137087637420473`*^9}, {
112 3.7137088432272243`*^9, 3.713708846434181*^9}, {3.713708880202011*^9,
113 3.713708903074548*^9}, {3.713716330266464*^9, 3.713716351175259*^9}, {
114 3.713716434540206*^9, 3.713716525606535*^9}, {3.713716611280066*^9,
115 3.713716646483315*^9}, {3.71371670304727*^9, 3.7137167087341948`*^9}, {
116 3.713716769507305*^9, 3.7137169073458242`*^9}, {3.7137221741594687`*^9,
117 3.713722287147996*^9}, {3.713722317414308*^9, 3.71372256217129*^9}, {
118 3.7137226062439938`*^9, 3.713722633168475*^9}, {3.713722962911133*^9,
119 3.713722973892164*^9}, {3.713723004049493*^9, 3.713723007056541*^9}, {
120 3.7137230748638363`*^9, 3.713723204412738*^9}, {3.713723352532102*^9,
121 3.713723352853589*^9}, {3.7137234296575212`*^9, 3.713723433512855*^9}, {
122 3.713723670492765*^9, 3.713723686101622*^9}, {3.7137237981056843`*^9,
123 3.713723799313353*^9}, {3.713724456612514*^9, 3.713724459841893*^9}, {
124 3.713785021813044*^9, 3.7137850320829763`*^9}, {3.713785506067985*^9,
125 3.713785533348872*^9}, {3.7137856004003353`*^9, 3.7137856533672657`*^9}, {
126 3.713785685385323*^9, 3.7137857186268377`*^9}, {3.71378582659606*^9,
127 3.713786076938623*^9}, {3.7137861087900457`*^9, 3.713786217248049*^9}, {
128 3.713786289465934*^9, 3.7137863597071877`*^9}, {3.713786442650681*^9,
129 3.713786485443578*^9}, 3.713786723240041*^9, {3.713791026836248*^9,
130 3.713791051116667*^9}, {3.7137916305626907`*^9, 3.713791661098472*^9}, {
131 3.713875993628359*^9, 3.713875996727685*^9}, {3.71387605653726*^9,
132 3.71387606768277*^9}, {3.7138762462463713`*^9, 3.713876297245927*^9}, {
133 3.7138763645880938`*^9, 3.713876373787952*^9}, {3.719769462788966*^9,
134 3.719769479461725*^9}, {3.719779982018424*^9, 3.71978000235341*^9}, {
135 3.719790895522397*^9, 3.719790925526664*^9}, {3.719791068684647*^9,
136 3.719791069986815*^9}},
137 ExpressionUUID -> "b4c69657-d995-4434-b55e-daa81ba4c880"],
138
139Cell[BoxData["497633.37097380665`"], "Output",
140 CellChangeTimes->{{3.719790899299185*^9, 3.719790929336013*^9}}],
141
142Cell[BoxData["3.585316752974496`"], "Output",
143 CellChangeTimes->{{3.719790899299185*^9, 3.719790929351782*^9}}],
144
145Cell[BoxData["1.3867997988445577`"], "Output",
146 CellChangeTimes->{{3.719790899299185*^9, 3.7197909293632793`*^9}}]
147}, Open ]],
148
149Cell[BoxData[{
150 RowBox[{
151 RowBox[{
152 RowBox[{"nH", "[", "r_", "]"}], ":=",
153 RowBox[{"np",
154 SuperscriptBox[
155 RowBox[{"(",
156 RowBox[{"Rcrit",
157 RowBox[{"(",
158 RowBox[{
159 FractionBox["1", "r"], "-",
160 FractionBox["1", "R0"]}], ")"}]}], ")"}],
161 FractionBox["1",
162 RowBox[{"\[Gamma]", "-", "1"}]]]}]}], ";"}], "\[IndentingNewLine]",
163 RowBox[{
164 RowBox[{
165 RowBox[{"RecombinationRate", "[",
166 RowBox[{"X_", ",", "r_"}], "]"}], ":=",
167 RowBox[{
168 SuperscriptBox[
169 RowBox[{"(",
170 RowBox[{"X", " ",
171 RowBox[{"nH", "[", "r", "]"}]}], ")"}], "2"], "\[Alpha]Rec"}]}],
172 ";"}], "\[IndentingNewLine]",
173 RowBox[{
174 RowBox[{"Recombinations", "[",
175 RowBox[{"X_", ",", "r_"}], "]"}], ":=",
176 RowBox[{"Integrate", "[",
177 RowBox[{
178 RowBox[{"RecombinationRate", "[",
179 RowBox[{"X", ",", "rad"}], "]"}], ",",
180 RowBox[{"{",
181 RowBox[{"rad", ",", "r", ",", "R0"}], "}"}]}], "]"}]}]}], "Input",
182 CellChangeTimes->{{3.719770413879026*^9, 3.719770448893592*^9}, {
183 3.719770498941699*^9, 3.719770523531096*^9}, {3.719771053714438*^9,
184 3.719771141347056*^9}, {3.7197712049182663`*^9, 3.719771251650033*^9}, {
185 3.719771305058453*^9, 3.719771312629652*^9}, {3.719775117811722*^9,
186 3.7197751925947742`*^9}, {3.719775669484964*^9, 3.7197756698144836`*^9},
187 3.7197763673380423`*^9, {3.7197764354685926`*^9, 3.719776444389744*^9}, {
188 3.7197765238362427`*^9, 3.719776523901249*^9}, {3.719776584805292*^9,
189 3.719776586371373*^9}, {3.719777043123604*^9, 3.719777056942843*^9}, {
190 3.7197773728657293`*^9, 3.719777373903077*^9}, {3.719779957489173*^9,
191 3.719779967842348*^9}, {3.7197799995901127`*^9, 3.719780008656363*^9}, {
192 3.719791042761544*^9, 3.719791043683558*^9}, {3.719791075088895*^9,
193 3.719791076587039*^9}},
194 ExpressionUUID -> "d95f3241-03ca-4e7b-af1f-87cd0551260c"],
195
196Cell[CellGroupData[{
197
198Cell[BoxData[{
199 RowBox[{
200 RowBox[{"PossibleAbsorptions", "=", "photonFlux"}],
201 ";"}], "\[IndentingNewLine]",
202 RowBox[{
203 RowBox[{"soln", "=",
204 RowBox[{"Solve", "[",
205 RowBox[{
206 RowBox[{"PossibleAbsorptions", "\[Equal]",
207 RowBox[{"Recombinations", "[",
208 RowBox[{"1", ",", "1"}], "]"}]}], ",", "np"}], "]"}]}],
209 ";"}], "\[IndentingNewLine]",
210 RowBox[{"\[Rho]p", "=",
211 RowBox[{
212 RowBox[{"mH", " ", "np"}], "/.",
213 RowBox[{"soln", "[",
214 RowBox[{"[", "2", "]"}], "]"}]}]}]}], "Input",
215 CellChangeTimes->{{3.719775520568548*^9, 3.719775538580059*^9}, {
216 3.719776463371714*^9, 3.719776485724725*^9}, {3.719776591008328*^9,
217 3.719776599839645*^9}, {3.71977686647449*^9, 3.719776911158575*^9}, {
218 3.719776947244884*^9, 3.71977697527099*^9}, {3.719777059004896*^9,
219 3.7197771486414127`*^9}, {3.7197771855758457`*^9, 3.719777191441033*^9}, {
220 3.719777260215287*^9, 3.7197773764891376`*^9}, {3.719779480834425*^9,
221 3.719779519408044*^9}, {3.719779687767662*^9, 3.719779692585054*^9}, {
222 3.719779729509191*^9, 3.719779783120728*^9}, {3.719780044647661*^9,
223 3.719780081417156*^9}, {3.7197909937809877`*^9, 3.719791034555084*^9}, {
224 3.71979108171502*^9, 3.719791083834403*^9}},
225 ExpressionUUID -> "23ce3386-9e06-438c-b851-a4c403eb20e7"],
226
227Cell[BoxData[
228 RowBox[{
229 StyleBox[
230 RowBox[{"Solve", "::", "ratnz"}], "MessageName"],
231 RowBox[{
232 ":", " "}], "\<\"Solve was unable to solve the system with inexact \
233coefficients. The answer was obtained by solving a corresponding exact system \
234and numericizing the result. \\!\\(\\*ButtonBox[\\\"\[RightSkeleton]\\\", \
235ButtonStyle->\\\"Link\\\", ButtonFrame->None, \
236ButtonData:>\\\"paclet:ref/Solve\\\", ButtonNote -> \
237\\\"Solve::ratnz\\\"]\\)\"\>"}]], "Message", "MSG",
238 CellChangeTimes->{
239 3.7197797883144093`*^9, {3.7197800431170387`*^9, 3.7197801033794127`*^9}, {
240 3.7197909955727997`*^9, 3.719791045996668*^9}, 3.719791088187649*^9},
241 ExpressionUUID -> "90ebc89b-7ee1-446d-ab3f-7e3027033252"],
242
243Cell[BoxData[
244 RowBox[{"1.1710468305009984`*^-17", " ",
245 SqrtBox["photonFlux"]}]], "Output",
246 CellChangeTimes->{
247 3.7197755281132174`*^9, 3.719776487215723*^9, 3.719776535191061*^9,
248 3.7197766001367207`*^9, 3.719776867481805*^9, {3.719776907973813*^9,
249 3.719776911701095*^9}, {3.719776952938533*^9, 3.71977697585966*^9}, {
250 3.719777067015581*^9, 3.7197771497245693`*^9}, {3.719777187862468*^9,
251 3.7197771918271437`*^9}, {3.719777267696289*^9, 3.719777297955077*^9}, {
252 3.719777329236869*^9, 3.719777401967024*^9}, {3.7197794858909607`*^9,
253 3.719779519842195*^9}, 3.71977969309369*^9, {3.719779734224107*^9,
254 3.719779788266069*^9}, {3.7197800430721407`*^9, 3.719780103386981*^9}, {
255 3.719790995375278*^9, 3.719791045801577*^9}, 3.719791088202875*^9},
256 ExpressionUUID -> "ea40c4a2-74a6-44ff-bf9d-57abf5374b6f"]
257}, Open ]],
258
259Cell[CellGroupData[{
260
261Cell[BoxData[{
262 RowBox[{
263 RowBox[{"photonFlux", "=",
264 RowBox[{"2", "*",
265 SuperscriptBox["10", "13"]}]}],
266 ";"}], "\[IndentingNewLine]", "\[Rho]p", "\[IndentingNewLine]",
267 RowBox[{"Clear", "[", "photonFlux", "]"}]}], "Input",
268 CellChangeTimes->{{3.7197769212645407`*^9, 3.719776930403502*^9},
269 3.719777293371935*^9, {3.7197796992266703`*^9, 3.7197797196658573`*^9}, {
270 3.719779775140098*^9, 3.719779801344612*^9}, {3.7197800849709272`*^9,
271 3.719780090210125*^9}},
272 ExpressionUUID -> "21f226d3-b2bf-4941-9664-2e6bb9a845b4"],
273
274Cell[BoxData["5.237080635671813`*^-11"], "Output",
275 CellChangeTimes->{
276 3.719776930710595*^9, {3.719779700614073*^9, 3.71977972020547*^9}, {
277 3.7197797738772373`*^9, 3.7197798022631083`*^9}, {3.719780086327663*^9,
278 3.719780103408482*^9}, 3.719791050598793*^9, 3.719791091083026*^9},
279 ExpressionUUID -> "a4a87d52-5f92-435e-a87a-fd379cf860e8"]
280}, Open ]]
281},
282WindowSize->{960, 1028},
283WindowMargins->{{Automatic, 0}, {-5, Automatic}},
284Magnification:>1.5 Inherited,
285FrontEndVersion->"10.1 for Mac OS X x86 (32-bit, 64-bit Kernel) (March 23, \
2862015)",
287StyleDefinitions->"Default.nb"
288]
289(* End of Notebook Content *)
290
291(* Internal cache information *)
292(*CellTagsOutline
293CellTagsIndex->{}
294*)
295(*CellTagsIndex
296CellTagsIndex->{}
297*)
298(*NotebookFileOutline
299Notebook[{
300Cell[558, 20, 76, 1, 43, "Input"],
301Cell[CellGroupData[{
302Cell[659, 25, 5522, 111, 513, "Input"],
303Cell[6184, 138, 112, 1, 60, "Output"],
304Cell[6299, 141, 111, 1, 60, "Output"],
305Cell[6413, 144, 114, 1, 60, "Output"]
306}, Open ]],
307Cell[6542, 148, 1870, 45, 160, "Input"],
308Cell[CellGroupData[{
309Cell[8437, 197, 1274, 27, 94, "Input"],
310Cell[9714, 226, 711, 14, 84, "Message"],
311Cell[10428, 242, 832, 13, 75, "Output"]
312}, Open ]],
313Cell[CellGroupData[{
314Cell[11297, 260, 540, 11, 96, "Input"],
315Cell[11840, 273, 347, 5, 120, "Output"]
316}, Open ]]
317}
318]
319*)
320