u/adebrech/Matlab/IonizationFront: planet profile.nb

File planet profile.nb, 13.4 KB (added by adebrech, 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[ 13578, 373]
14NotebookOptionsPosition[ 11762, 325]
15NotebookOutlinePosition[ 12096, 340]
16CellTagsIndexPosition[ 12053, 337]
17WindowFrame->Normal*)
18
19(* Beginning of Notebook Content *)
20Notebook[{
21Cell[BoxData[{
22 RowBox[{"Clear", "[", "T", "]"}], "\[IndentingNewLine]",
23 RowBox[{
24 RowBox[{"G", "=",
25 RowBox[{"6.67", "*",
26 SuperscriptBox["10",
27 RowBox[{"-", "8"}]]}]}], ";"}], "\[IndentingNewLine]",
28 RowBox[{
29 RowBox[{"kB", "=",
30 RowBox[{"1.381", "*",
31 SuperscriptBox["10",
32 RowBox[{"-", "16"}]]}]}], ";"}], "\[IndentingNewLine]",
33 RowBox[{
34 RowBox[{"mH", "=",
35 RowBox[{"1.673", "*",
36 SuperscriptBox["10",
37 RowBox[{"-", "24"}]]}]}], ";"}], "\[IndentingNewLine]",
38 RowBox[{
39 RowBox[{"sigmaH", "=",
40 RowBox[{"6.3", "*",
41 SuperscriptBox["10",
42 RowBox[{"-", "18"}]]}]}], ";"}], "\[IndentingNewLine]",
43 RowBox[{
44 RowBox[{"MJ", "=",
45 RowBox[{"1.898", "*",
46 SuperscriptBox["10", "30"]}]}], ";"}], "\[IndentingNewLine]",
47 RowBox[{
48 RowBox[{"RJ", "=",
49 RowBox[{"7.1492", "*",
50 SuperscriptBox["10", "9"]}]}], ";"}]}], "Input",
51 CellChangeTimes->{{3.7136261949353323`*^9, 3.713626261700678*^9},
52 3.713626327176093*^9, {3.713626383061019*^9, 3.713626404273737*^9}, {
53 3.713695868389865*^9,
54 3.7136958730701323`*^9}},ExpressionUUID->"553848b8-eddb-47d5-bc1d-\
55395f48fe8f68"],
56
57Cell[BoxData[{
58 RowBox[{
59 RowBox[{"Rp", "=",
60 RowBox[{"2.14559", "RJ"}]}], ";"}], "\[IndentingNewLine]",
61 RowBox[{
62 RowBox[{"Mp", "=",
63 RowBox[{"0.263435", "MJ"}]}], ";"}], "\[IndentingNewLine]",
64 RowBox[{
65 RowBox[{"Tp", "=", "3000"}], ";"}], "\[IndentingNewLine]",
66 RowBox[{
67 RowBox[{"\[Rho]p", "=",
68 RowBox[{"1.32443", "*",
69 SuperscriptBox["10",
70 RowBox[{"-", "16"}]]}]}], ";"}], "\[IndentingNewLine]",
71 RowBox[{
72 RowBox[{"\[Gamma]", "=",
73 FractionBox["5", "3"]}], ";"}], "\[IndentingNewLine]",
74 RowBox[{
75 RowBox[{"csp", "=",
76 SqrtBox[
77 FractionBox[
78 RowBox[{"kB", " ", "Tp"}], "mH"]]}], ";"}], "\[IndentingNewLine]",
79 RowBox[{
80 RowBox[{"np", "=",
81 FractionBox["\[Rho]p", "mH"]}], ";"}], "\[IndentingNewLine]",
82 RowBox[{
83 RowBox[{"photonFlux", "=",
84 RowBox[{"2", "*",
85 SuperscriptBox["10", "13"]}]}], ";"}], "\[IndentingNewLine]",
86 RowBox[{
87 RowBox[{"\[Tau]1", "=", "1.00628"}], ";"}]}], "Input",
88 CellChangeTimes->{{3.71362633231955*^9, 3.713626361618585*^9}, {
89 3.7136264102121964`*^9, 3.713626418718432*^9}, {3.713626455861565*^9,
90 3.713626584841625*^9}, {3.713626679747116*^9, 3.713626682220549*^9}, {
91 3.7136269026322317`*^9, 3.7136269088723497`*^9}, {3.7136286439786263`*^9,
92 3.7136286446182337`*^9}, {3.713630835260355*^9,
93 3.713630841362711*^9}},ExpressionUUID->"07141f60-acdb-48b0-99c2-\
9473847a485bb2"],
95
96Cell[BoxData[{
97 RowBox[{
98 RowBox[{"\[Rho]Scale", "=", "\[Rho]p"}], ";"}], "\[IndentingNewLine]",
99 RowBox[{
100 RowBox[{"lScale", "=", "Rp"}], ";"}], "\[IndentingNewLine]",
101 RowBox[{
102 RowBox[{"nScale", "=",
103 FractionBox["\[Rho]Scale", "mH"]}], ";"}]}], "Input",
104 CellChangeTimes->{{3.713626999600709*^9, 3.7136270205489597`*^9}, {
105 3.71362766412037*^9, 3.713627697619659*^9},
106 3.7138729850194407`*^9},ExpressionUUID->"d31a88fd-5e0f-4d8d-8702-\
1071bc10c7a7272"],
108
109Cell[BoxData[{
110 RowBox[{
111 RowBox[{"rCrit", "=",
112 FractionBox[
113 RowBox[{
114 RowBox[{"(",
115 RowBox[{"\[Gamma]", "-", "1"}], ")"}], "G", " ", "Mp"}],
116 RowBox[{"\[Gamma]", " ",
117 SuperscriptBox["csp", "2"], " ", "Rp"}]]}], ";"}], "\[IndentingNewLine]",
118 RowBox[{
119 RowBox[{"rZero", "=",
120 FractionBox["rCrit",
121 RowBox[{"rCrit", "-", "1"}]]}], ";"}]}], "Input",
122 CellChangeTimes->{{3.713626281202592*^9, 3.713626324110792*^9}, {
123 3.7136264916729097`*^9, 3.7136264924511213`*^9}, {3.7136265927178164`*^9,
124 3.7136266076961927`*^9}, {3.7136266870427856`*^9,
125 3.713626688378542*^9}},ExpressionUUID->"b346f127-2b08-4a58-bed0-\
12628dc9e113969"],
127
128Cell[BoxData[{
129 RowBox[{
130 RowBox[{"\[Rho]", "[", "r_", "]"}], ":=",
131 SuperscriptBox[
132 RowBox[{"(",
133 RowBox[{"rCrit",
134 RowBox[{"(",
135 RowBox[{
136 FractionBox["1", "r"], "-",
137 FractionBox["1", "rZero"]}], ")"}]}], ")"}],
138 FractionBox["1",
139 RowBox[{"\[Gamma]", "-", "1"}]]]}], "\[IndentingNewLine]",
140 RowBox[{
141 RowBox[{"P", "[", "r_", "]"}], ":=",
142 SuperscriptBox[
143 RowBox[{"\[Rho]", "[", "r", "]"}], "\[Gamma]"]}], "\[IndentingNewLine]",
144 RowBox[{
145 RowBox[{"T", "[", "r_", "]"}], ":=",
146 FractionBox[
147 RowBox[{"P", "[", "r", "]"}],
148 RowBox[{"\[Rho]", "[", "r", "]"}]]}], "\[IndentingNewLine]",
149 RowBox[{
150 RowBox[{"cs", "[", "r_", "]"}], ":=",
151 SqrtBox[
152 FractionBox[
153 RowBox[{"kB", " ",
154 RowBox[{"T", "[", "r", "]"}], "Tp"}], "mH"]]}]}], "Input",
155 CellChangeTimes->{{3.713626619385159*^9, 3.713626664099715*^9}, {
156 3.7136269277289143`*^9, 3.713626928247748*^9}, {3.713695699664135*^9,
157 3.713695744107896*^9}, 3.713695781224615*^9, {3.713695895504698*^9,
158 3.7136959144768057`*^9}, {3.713695944593337*^9,
159 3.7136959475273457`*^9}},ExpressionUUID->"d5060ae3-cc3d-47c4-a22b-\
1608c872a469087"],
161
162Cell[BoxData[
163 RowBox[{"(*",
164 RowBox[{
165 "All", " ", "of", " ", "these", " ", "assume", " ", "no", " ",
166 "recombination", " ", "and", " ", "that", " ", "the", " ", "ionization",
167 " ", "front", " ", "is", " ", "infinitesimally", " ", "thin"}],
168 "*)"}]], "Input",
169 CellChangeTimes->{{3.713631887596486*^9, 3.713631908009849*^9}, {
170 3.7137049846704817`*^9,
171 3.713704999596072*^9}},ExpressionUUID->"94e840b5-33fd-4f26-9000-\
1725aadf0791ea3"],
173
174Cell[CellGroupData[{
175
176Cell[BoxData[
177 RowBox[{
178 RowBox[{"(*",
179 RowBox[{
180 RowBox[{
181 RowBox[{
182 "Assume", " ", "everything", " ", "prior", " ", "to", " ", "\[Tau]"}],
183 "=",
184 RowBox[{"1", " ", "is", " ", "ionized"}]}], ",", " ",
185 RowBox[{"calculate", " ", "required", " ", "velocity"}]}], "*)"}],
186 "\[IndentingNewLine]",
187 RowBox[{
188 RowBox[{"v", "=",
189 FractionBox["photonFlux",
190 RowBox[{
191 RowBox[{"\[Rho]", "[", "\[Tau]1", "]"}], "nScale"}]]}],
192 "\[IndentingNewLine]",
193 FractionBox["v",
194 RowBox[{"cs", "[", "\[Tau]1", "]"}]]}]}]], "Input",
195 CellChangeTimes->{{3.7136267011906147`*^9, 3.7136267289693737`*^9}, {
196 3.7136267597435513`*^9, 3.713626769230329*^9}, {3.713626892233293*^9,
197 3.713626894828991*^9}, {3.7136269309853*^9, 3.713626933628139*^9}, {
198 3.713626982694852*^9, 3.7136269924723263`*^9}, {3.713627025511931*^9,
199 3.713627028218363*^9}, {3.713628516868369*^9, 3.7136285695205708`*^9}, {
200 3.713628612137115*^9, 3.713628642156434*^9}, {3.7136289447528067`*^9,
201 3.7136289468090887`*^9}, {3.713630825751483*^9, 3.713630846719757*^9}, {
202 3.713695713422142*^9, 3.713695713605722*^9}, {3.713705013950159*^9,
203 3.7137050162739563`*^9}},ExpressionUUID->"1835abe6-07f6-40f2-984b-\
2041d7d9f66acfe"],
205
206Cell[BoxData["261175.89604990068`"], "Output",
207 CellChangeTimes->{{3.713626895357489*^9, 3.713626938708778*^9},
208 3.7136270291038733`*^9, 3.713628655289853*^9, 3.713628999930332*^9,
209 3.713630870870409*^9, 3.713695607714477*^9, 3.713695881864212*^9,
210 3.7137048092027407`*^9,
211 3.713705016629191*^9},ExpressionUUID->"3114da80-c217-4239-a873-\
212755a55f2cc7d"],
213
214Cell[BoxData["0.5306835829144527`"], "Output",
215 CellChangeTimes->{{3.713626895357489*^9, 3.713626938708778*^9},
216 3.7136270291038733`*^9, 3.713628655289853*^9, 3.713628999930332*^9,
217 3.713630870870409*^9, 3.713695607714477*^9, 3.713695881864212*^9,
218 3.7137048092027407`*^9,
219 3.713705016629841*^9},ExpressionUUID->"f067ed7a-7f63-49fd-9548-\
220ff5daf219f55"]
221}, Open ]],
222
223Cell[CellGroupData[{
224
225Cell[BoxData[
226 RowBox[{
227 RowBox[{"(*",
228 RowBox[{
229 RowBox[{"Assume", " ", "velocity", " ", "is", " ",
230 FractionBox[
231 SubscriptBox["c", "s"], "10"]}], ",", " ",
232 RowBox[{"calculate", " ",
233 RowBox[{"(",
234 RowBox[{"location", " ", "of"}], ")"}], " ", "required", " ", "density",
235 " ", "to", " ", "match", " ", "flux"}]}], "*)"}], "\[IndentingNewLine]",
236 RowBox[{"Solve", "[",
237 RowBox[{
238 RowBox[{
239 RowBox[{"\[Rho]", "[", "r", "]"}], "==",
240 FractionBox[
241 RowBox[{"5", "photonFlux"}],
242 RowBox[{
243 RowBox[{"cs", "[", "r", "]"}], " ", "nScale"}]]}], ",", "r"}],
244 "]"}]}]], "Input",
245 CellChangeTimes->{{3.713628670743627*^9, 3.713628841500167*^9}, {
246 3.713629171048444*^9, 3.713629172488421*^9}, {3.713629227967517*^9,
247 3.713629429399823*^9}, {3.7136294815224037`*^9, 3.7136294828852*^9}, {
248 3.7136303637903423`*^9, 3.713630382787796*^9}, {3.713630915521286*^9,
249 3.713630924439519*^9}, {3.7136309706703978`*^9, 3.71363105223066*^9}, {
250 3.713632473106514*^9, 3.713632476975827*^9}, {3.7136956210558167`*^9,
251 3.7136956325625467`*^9}, {3.7136959893659277`*^9, 3.713695995595943*^9}, {
252 3.713696040526523*^9, 3.713696050935316*^9}, {3.71369609758183*^9,
253 3.7136962211992493`*^9}, {3.7137047870613403`*^9, 3.71370478788995*^9}, {
254 3.71370482500047*^9, 3.7137048967930117`*^9}, {3.713704975437333*^9,
255 3.713704982689413*^9}, {3.7138734726181726`*^9, 3.713873472865411*^9}, {
256 3.713875020430887*^9,
257 3.71387502210718*^9}},ExpressionUUID->"c2bfc427-365e-4937-8f4e-\
258ad562024f397"],
259
260Cell[BoxData[
261 RowBox[{"{",
262 RowBox[{"{",
263 RowBox[{"r", "\[Rule]", "0.855487591900579`"}], "}"}], "}"}]], "Output",
264 CellChangeTimes->{
265 3.713630383647726*^9, {3.7136310270527973`*^9, 3.713631052567198*^9}, {
266 3.7136956250195503`*^9, 3.713695632707082*^9}, 3.713696053381459*^9,
267 3.713696100890504*^9, {3.713696144751809*^9, 3.713696222081403*^9}, {
268 3.713704789499631*^9, 3.713704862362192*^9}, {3.71370489368416*^9,
269 3.713704896999915*^9}},ExpressionUUID->"730d38a4-66b4-4079-b0f7-\
2701c44bfa1a033"]
271}, Open ]],
272
273Cell[BoxData[
274 RowBox[{
275 RowBox[{
276 RowBox[{"\[Tau]", "[", "r_", "]"}], ":=",
277 RowBox[{"Integrate", "[",
278 RowBox[{
279 RowBox[{
280 RowBox[{"density", "[", "rad", "]"}], " ", "sigmaH", " ", "lScale", " ",
281 "nScale"}], ",",
282 RowBox[{"{",
283 RowBox[{"rad", ",", "r", ",", "rZero"}], "}"}]}], "]"}]}],
284 ";"}]], "Input",
285 CellChangeTimes->{{3.71362706445865*^9, 3.7136271456786346`*^9}, {
286 3.713627584927602*^9, 3.713627613958808*^9}, {3.713627656176298*^9,
287 3.713627660279965*^9}, {3.7136277137384987`*^9, 3.7136277782479553`*^9}, {
288 3.713628479013278*^9, 3.713628480979281*^9}, {3.7136285958056307`*^9,
289 3.713628599143648*^9}},ExpressionUUID->"c105ff3a-5995-47f8-8a91-\
2902db64d1ca5cc"],
291
292Cell[CellGroupData[{
293
294Cell[BoxData[
295 RowBox[{"Solve", "[",
296 RowBox[{
297 RowBox[{
298 RowBox[{"\[Tau]", "[", "r", "]"}], "\[Equal]", "1"}], ",", "r"}],
299 "]"}]], "Input",
300 CellChangeTimes->{{3.71362778851396*^9, 3.713627805545353*^9},
301 3.713631932052615*^9,
302 3.7137049373266*^9},ExpressionUUID->"4080f259-bc93-4172-94ec-21d6a2fa7c23"],
303
304Cell[BoxData[
305 TemplateBox[{
306 "Solve","ratnz",
307 "\"Solve was unable to solve the system with inexact coefficients. The \
308answer was obtained by solving a corresponding exact system and numericizing \
309the result.\"",2,125,6,24334043938025421380,"Local"},
310 "MessageTemplate"]], "Message", "MSG",
311 CellChangeTimes->{
312 3.713630761955323*^9},ExpressionUUID->"4568e811-10f5-4f81-a497-\
31300b499edda27"],
314
315Cell[BoxData[
316 RowBox[{"{",
317 RowBox[{"{",
318 RowBox[{"r", "\[Rule]", "1.006277590333768`"}], "}"}], "}"}]], "Output",
319 CellChangeTimes->{
320 3.71362811665779*^9, {3.713628575155105*^9, 3.7136285930162077`*^9},
321 3.713628648592134*^9,
322 3.713630761962076*^9},ExpressionUUID->"87e80af0-460b-436b-a8d2-\
323a34e296247fc"]
324}, Open ]]
325},
326WindowSize->{960, 1028},
327WindowMargins->{{Automatic, 0}, {0, Automatic}},
328FrontEndVersion->"11.1 for Linux x86 (64-bit) (April 18, 2017)",
329StyleDefinitions->"Default.nb"
330]
331(* End of Notebook Content *)
332
333(* Internal cache information *)
334(*CellTagsOutline
335CellTagsIndex->{}
336*)
337(*CellTagsIndex
338CellTagsIndex->{}
339*)
340(*NotebookFileOutline
341Notebook[{
342Cell[558, 20, 1146, 34, 177, "Input", "ExpressionUUID" -> \
343"553848b8-eddb-47d5-bc1d-395f48fe8f68"],
344Cell[1707, 56, 1379, 37, 283, "Input", "ExpressionUUID" -> \
345"07141f60-acdb-48b0-99c2-73847a485bb2"],
346Cell[3089, 95, 467, 11, 98, "Input", "ExpressionUUID" -> \
347"d31a88fd-5e0f-4d8d-8702-1bc10c7a7272"],
348Cell[3559, 108, 665, 17, 98, "Input", "ExpressionUUID" -> \
349"b346f127-2b08-4a58-bed0-28dc9e113969"],
350Cell[4227, 127, 1160, 32, 175, "Input", "ExpressionUUID" -> \
351"d5060ae3-cc3d-47c4-a22b-8c872a469087"],
352Cell[5390, 161, 448, 10, 55, "Input", "ExpressionUUID" -> \
353"94e840b5-33fd-4f26-9000-5aadf0791ea3"],
354Cell[CellGroupData[{
355Cell[5863, 175, 1237, 28, 121, "Input", "ExpressionUUID" -> \
356"1835abe6-07f6-40f2-984b-1d7d9f66acfe"],
357Cell[7103, 205, 365, 6, 32, "Output", "ExpressionUUID" -> \
358"3114da80-c217-4239-a873-755a55f2cc7d"],
359Cell[7471, 213, 365, 6, 32, "Output", "ExpressionUUID" -> \
360"f067ed7a-7f63-49fd-9548-ff5daf219f55"]
361}, Open ]],
362Cell[CellGroupData[{
363Cell[7873, 224, 1552, 33, 85, "Input", "ExpressionUUID" -> \
364"c2bfc427-365e-4937-8f4e-ad562024f397"],
365Cell[9428, 259, 515, 10, 32, "Output", "ExpressionUUID" -> \
366"730d38a4-66b4-4079-b0f7-1c44bfa1a033"]
367}, Open ]],
368Cell[9958, 272, 717, 17, 34, "Input", "ExpressionUUID" -> \
369"c105ff3a-5995-47f8-8a91-2db64d1ca5cc"],
370Cell[CellGroupData[{
371Cell[10700, 293, 320, 8, 34, "Input", "ExpressionUUID" -> \
372"4080f259-bc93-4172-94ec-21d6a2fa7c23"],
373Cell[11023, 303, 399, 9, 41, "Message", "ExpressionUUID" -> \
374"4568e811-10f5-4f81-a497-00b499edda27"],
375Cell[11425, 314, 321, 8, 32, "Output", "ExpressionUUID" -> \
376"87e80af0-460b-436b-a8d2-a34e296247fc"]
377}, Open ]]
378}
379]
380*)
381