(* Content-type: application/mathematica *) (*** Wolfram Notebook File ***) (* http://www.wolfram.com/nb *) (* CreatedBy='Mathematica 6.0' *) (*CacheID: 234*) (* Internal cache information: NotebookFileLineBreakTest NotebookFileLineBreakTest NotebookDataPosition[ 145, 7] NotebookDataLength[ 151160, 4101] NotebookOptionsPosition[ 144426, 3883] NotebookOutlinePosition[ 145236, 3909] CellTagsIndexPosition[ 145193, 3906] WindowFrame->Normal ContainsDynamic->False*) (* Beginning of Notebook Content *) Notebook[{ Cell[CellGroupData[{ Cell[TextData[{ "PHGN590\n\n", StyleBox["Introduction to Nuclear Reactor Physics", FontColor->RGBColor[0, 0, 1]], "\n\nJ.A. McNeil\n\nModeling Neutron Diffusion in Reactors\n", StyleBox["\n(February 29, 2008)", FontColor->RGBColor[1, 0, 0]], "\n " }], "Title", CellChangeTimes->{{3.413549234611671*^9, 3.413549303053051*^9}, 3.414433633710174*^9, {3.4165708430385017`*^9, 3.4165708522696753`*^9}}, TextAlignment->Center, FontSize->16], Cell[CellGroupData[{ Cell["Packages to be Used", "Section", FontColor->RGBColor[0, 0, 1]], Cell[BoxData[{ RowBox[{ RowBox[{"Off", "[", RowBox[{"General", "::", "\"\\""}], "]"}], ";"}], "\n", RowBox[{ RowBox[{"Needs", "[", "\"\\"", "]"}], ";", RowBox[{"Needs", "[", "\"\\"", "]"}], ";", RowBox[{"Needs", "[", "\"\\"", "]"}], ";"}], "\n", RowBox[{ RowBox[{"Needs", "[", "\"\\"", "]"}], ";"}]}], "Input", CellChangeTimes->{{3.413310207344388*^9, 3.413310211018607*^9}, { 3.41331048144174*^9, 3.413310493409525*^9}, {3.41355043266223*^9, 3.413550433357586*^9}}, FontSize->9] }, Closed]], Cell[CellGroupData[{ Cell["Data", "Section"], Cell[BoxData[{ RowBox[{ RowBox[{"Cons", "=", RowBox[{"{", RowBox[{ RowBox[{ SubscriptBox["k", "B"], "\[Rule]", RowBox[{"1.38066", " ", RowBox[{"10", "^", RowBox[{"-", "23"}]}]}]}], " ", ",", RowBox[{ SubscriptBox["T", "room"], "\[Rule]", "293.15"}], ",", RowBox[{"e", "->", RowBox[{"1.60219", " ", RowBox[{"10", "^", RowBox[{"-", "19"}]}]}]}], ",", RowBox[{ SubscriptBox["m", "n"], "\[Rule]", RowBox[{"1.674929", " ", RowBox[{"10", "^", RowBox[{"-", "27"}]}]}]}]}], "}"}]}], ";"}], "\[IndentingNewLine]", RowBox[{ RowBox[{"D2Odata", "=", RowBox[{"{", RowBox[{ RowBox[{"\[Rho]", "\[Rule]", ".001105"}], ",", RowBox[{ SubscriptBox["n", "d"], "->", ".03323"}], ",", RowBox[{ SubscriptBox["\[CapitalSigma]", "s"], "->", ".4519"}], ",", RowBox[{ SubscriptBox["\[CapitalSigma]", "\[Gamma]"], "\[Rule]", RowBox[{"4.42", " ", RowBox[{"10", "^", RowBox[{"-", "5"}]}]}]}], " ", ",", RowBox[{ SubscriptBox["\[CapitalSigma]", "f"], "\[Rule]", "0"}], ",", RowBox[{"\[Nu]", "\[Rule]", "0"}]}], "}"}]}], ";"}], "\[IndentingNewLine]", RowBox[{ RowBox[{ RowBox[{"C12data", "=", RowBox[{"{", RowBox[{ RowBox[{"\[Rho]", "\[Rule]", ".00160"}], ",", RowBox[{ SubscriptBox["n", "d"], "\[Rule]", ".08023"}], ",", RowBox[{ SubscriptBox["\[CapitalSigma]", "s"], "->", ".3811"}], ",", RowBox[{ SubscriptBox["\[CapitalSigma]", "\[Gamma]"], "\[Rule]", ".0002728"}], " ", ",", RowBox[{ SubscriptBox["\[CapitalSigma]", "f"], "\[Rule]", "0"}], ",", RowBox[{"\[Nu]", "\[Rule]", "0"}]}], "}"}]}], ";"}], "\[IndentingNewLine]", RowBox[{"(*", " ", RowBox[{"Thermal", " ", "neutron", " ", "values"}], " ", "*)"}]}], "\[IndentingNewLine]", RowBox[{ RowBox[{"Nadata", "=", RowBox[{"{", RowBox[{ RowBox[{"\[Rho]", "\[Rule]", ".00097"}], ",", RowBox[{ SubscriptBox["n", "d"], "\[Rule]", ".02541"}], ",", RowBox[{ SubscriptBox["\[CapitalSigma]", "s"], "\[Rule]", ".08131"}], ",", RowBox[{ SubscriptBox["\[CapitalSigma]", "\[Gamma]"], "\[Rule]", ".01347"}], " ", ",", RowBox[{ SubscriptBox["\[CapitalSigma]", "f"], "\[Rule]", "0"}], ",", RowBox[{"\[Nu]", "\[Rule]", "0"}]}], "}"}]}], ";"}], "\[IndentingNewLine]", RowBox[{ RowBox[{"U235data", "=", RowBox[{"{", RowBox[{ RowBox[{"\[Rho]", "\[Rule]", ".01886"}], ",", RowBox[{ SubscriptBox["n", "d"], "\[Rule]", ".04833"}], ",", RowBox[{ SubscriptBox["\[CapitalSigma]", "s"], "\[Rule]", ".01588"}], ",", RowBox[{ SubscriptBox["\[CapitalSigma]", "\[Gamma]"], "\[Rule]", "4.833"}], ",", RowBox[{ SubscriptBox["\[CapitalSigma]", "f"], "->", " ", "28.37"}], ",", RowBox[{"\[Nu]", "\[Rule]", "2.42"}]}], "}"}]}], ";"}], "\[IndentingNewLine]", RowBox[{ RowBox[{"U238data", "=", RowBox[{"{", RowBox[{ RowBox[{"\[Rho]", "\[Rule]", ".0191"}], ",", RowBox[{ SubscriptBox["n", "d"], "\[Rule]", ".04833"}], ",", RowBox[{ SubscriptBox["\[CapitalSigma]", "s"], "\[Rule]", ".4301"}], ",", RowBox[{ SubscriptBox["\[CapitalSigma]", "\[Gamma]"], "\[Rule]", ".13194"}], ",", RowBox[{ SubscriptBox["\[CapitalSigma]", "f"], "->", " ", "0"}], ",", RowBox[{"\[Nu]", "\[Rule]", "0"}]}], "}"}]}], ";"}], "\[IndentingNewLine]", RowBox[{ RowBox[{ RowBox[{"Pu239data", "=", RowBox[{"{", RowBox[{ RowBox[{"\[Rho]", "\[Rule]", ".0196"}], ",", RowBox[{ SubscriptBox["n", "d"], "\[Rule]", ".04938"}], ",", RowBox[{ SubscriptBox["\[CapitalSigma]", "s"], "\[Rule]", ".3902"}], ",", RowBox[{ SubscriptBox["\[CapitalSigma]", "\[Gamma]"], "\[Rule]", "13.27"}], ",", RowBox[{ SubscriptBox["\[CapitalSigma]", "f"], "->", " ", "36.66"}], " ", ",", RowBox[{"\[Nu]", "\[Rule]", "2.98"}]}], "}"}]}], ";"}], "\[IndentingNewLine]", RowBox[{"(*", " ", RowBox[{"Fast", " ", "neutron", " ", "values"}], " ", "*)"}]}], "\[IndentingNewLine]", RowBox[{ RowBox[{"Nadata", "=", RowBox[{"{", RowBox[{ RowBox[{"\[Rho]", "\[Rule]", ".00097"}], ",", RowBox[{ SubscriptBox["n", "d"], "\[Rule]", ".02541"}], ",", RowBox[{ SubscriptBox["\[CapitalSigma]", "s"], "\[Rule]", ".083853"}], ",", RowBox[{ SubscriptBox["\[CapitalSigma]", "\[Gamma]"], "\[Rule]", ".000020328"}], " ", ",", RowBox[{ SubscriptBox["\[CapitalSigma]", "f"], "\[Rule]", "0"}], ",", RowBox[{"\[Nu]", "\[Rule]", "0"}]}], "}"}]}], ";"}], "\[IndentingNewLine]", RowBox[{ RowBox[{"U235data", "=", RowBox[{"{", RowBox[{ RowBox[{"\[Rho]", "\[Rule]", ".01886"}], ",", RowBox[{ SubscriptBox["n", "d"], "\[Rule]", ".04833"}], ",", RowBox[{ SubscriptBox["\[CapitalSigma]", "s"], "\[Rule]", ".328644"}], ",", RowBox[{ SubscriptBox["\[CapitalSigma]", "\[Gamma]"], "\[Rule]", ".0120825"}], ",", RowBox[{ SubscriptBox["\[CapitalSigma]", "f"], "->", " ", ".06766"}], ",", RowBox[{"\[Nu]", "\[Rule]", "2.6"}]}], "}"}]}], ";"}], "\[IndentingNewLine]", RowBox[{ RowBox[{"U238data", "=", RowBox[{"{", RowBox[{ RowBox[{"\[Rho]", "\[Rule]", ".0191"}], ",", RowBox[{ SubscriptBox["n", "d"], "\[Rule]", ".04833"}], ",", RowBox[{ SubscriptBox["\[CapitalSigma]", "s"], "\[Rule]", ".33347"}], ",", RowBox[{ SubscriptBox["\[CapitalSigma]", "\[Gamma]"], "\[Rule]", ".007732"}], ",", RowBox[{ SubscriptBox["\[CapitalSigma]", "f"], "->", " ", ".004591"}], ",", RowBox[{"\[Nu]", "\[Rule]", "2.6"}]}], "}"}]}], ";"}], "\[IndentingNewLine]", RowBox[{ RowBox[{"Pu239data", "=", RowBox[{"{", RowBox[{ RowBox[{"\[Rho]", "\[Rule]", ".0196"}], ",", RowBox[{ SubscriptBox["n", "d"], "\[Rule]", ".04938"}], ",", RowBox[{ SubscriptBox["\[CapitalSigma]", "s"], "\[Rule]", ".33578"}], ",", RowBox[{ SubscriptBox["\[CapitalSigma]", "\[Gamma]"], "\[Rule]", ".0128388"}], ",", RowBox[{ SubscriptBox["\[CapitalSigma]", "f"], "->", " ", ".091353"}], ",", RowBox[{"\[Nu]", "\[Rule]", "2.98"}]}], "}"}]}], ";"}]}], "Input", FontSize->9] }, Open ]], Cell[CellGroupData[{ Cell["Introduction", "Section", CellChangeTimes->{{3.4165709273423862`*^9, 3.416570929044496*^9}}], Cell[TextData[{ "Nuclear energy arises from the splitting of large nuclei by neutrons which, \ in addition to releasing copius amounts of energy, release more neutrons. \ These in turn can cause additional fissions leading to a sustained chain \ reaction, or in the case of a nuclear weapon, an exponentially increasing \ cascade and explosion. \n\nFundamentally, a neutron interacting with a \ nucleus can undergo three fundamental scattering processes: 1) it can bounce \ off (elastically or inelastically), 2) it can be absorbed by emitting a \ gamma, and 3) for fissile nuclei, it can be absorbed and then induce fission \ which releases additional neutrons. In essence the control of nuclear energy \ comes down to controlling the neutrons. The relative probabilities for any \ of these events are governed by the cross section. The rate for any process \ is the neutron flux (number density times average speed) times the relevant \ cross section times the number density of target nuclei. For convenience, \ these last two factors are usually multiplied together to give the \ \"macroscopic cross section\". Specifically, the rate that neutrons are \ absorbed at location ", Cell[BoxData[ OverscriptBox["r", "\[RightVector]"]], TextAlignment->-0.5], " is given by ", Cell[BoxData[ RowBox[{ RowBox[{ SubscriptBox["\[CapitalSigma]", "a"], "\[CurlyPhi]", RowBox[{"(", OverscriptBox["r", "\[RightVector]"], ")"}]}], ","}]], TextAlignment->-0.5], "where ", Cell[BoxData[ RowBox[{"\[CurlyPhi]", RowBox[{"(", OverscriptBox["r", "\[RightVector]"], ")"}]}]], TextAlignment->-0.5], "is the neutron flux (number of neutrons per unit area per unit time) and \ ", Cell[BoxData[ SubscriptBox["\[CapitalSigma]", "a"]], TextAlignment->-0.5], " is the macroscopic cross section for absorption. (For fissile materials \ the absorption cross section includes both the gamma and fission processes.) \ Using Fick's law and the continuity equation, one arives at the governing \ equation for the neutron flux," }], "Text"], Cell[BoxData[ RowBox[{ RowBox[{ RowBox[{ RowBox[{"D", " ", RowBox[{ SuperscriptBox[ OverscriptBox["\[Del]", "\[RightVector]"], "2"], "\[CurlyPhi]"}], RowBox[{"(", RowBox[{ OverscriptBox["r", "\[RightVector]"], ",", "t"}], ")"}]}], "+", RowBox[{ RowBox[{"(", RowBox[{ RowBox[{"\[Nu]", " ", SubscriptBox["\[CapitalSigma]", "f"]}], "-", SubscriptBox["\[CapitalSigma]", "a"]}], ")"}], "\[CurlyPhi]", RowBox[{"(", RowBox[{ OverscriptBox["r", "\[RightVector]"], ",", "t"}], ")"}]}]}], "=", RowBox[{ FractionBox["1", OverscriptBox["v", "_"]], FractionBox[ RowBox[{ RowBox[{"\[PartialD]", "\[CurlyPhi]"}], RowBox[{"(", RowBox[{ OverscriptBox["r", "\[RightVector]"], ",", "t"}], ")"}]}], RowBox[{"\[PartialD]", "t"}]]}]}], ","}]], "NumberedEquation", TextAlignment->-0.5], Cell[TextData[{ "where \[CurlyPhi] is the neutron flux (neutron number density times average \ speed), D is the diffusion constant due to elastic scattering, \[Nu] is the \ average number of neutrons produced by a fission, ", Cell[BoxData[ SubscriptBox["\[CapitalSigma]", "a"]], TextAlignment->-0.5], " and ", Cell[BoxData[ SubscriptBox["\[CapitalSigma]", "f"]], TextAlignment->-0.5], " are the macroscopic cross sections for absorption and fission \ respectively. The diffusion constant is related to the macroscopic \ scattering cross section by " }], "Text"], Cell[BoxData[ RowBox[{"D", "=", RowBox[{"1", "/", RowBox[{ RowBox[{"(", RowBox[{"3", RowBox[{"(", RowBox[{ SubscriptBox["\[CapitalSigma]", "a"], "+", RowBox[{ SubscriptBox["\[CapitalSigma]", "s"], RowBox[{"(", RowBox[{"1", "-", "\[Mu]"}], ")"}]}]}], ")"}]}], ")"}], "."}]}]}]], "NumberedEquation", TextAlignment->-0.5], Cell["\<\ (This is an approximate expression.) Analysis of the problem can be \ simplified by introducing a parameter, k, which scales the rate of neutron \ production. One can consider k to be adjusted to give a steady state \ time-independent neutron flux, \ \>", "Text"], Cell[BoxData[ RowBox[{ RowBox[{ RowBox[{"D", " ", RowBox[{ SuperscriptBox[ OverscriptBox["\[Del]", "\[RightVector]"], "2"], "\[CurlyPhi]"}], RowBox[{"(", OverscriptBox["r", "\[RightVector]"], ")"}]}], "+", RowBox[{ RowBox[{"(", RowBox[{ FractionBox[ RowBox[{"\[Nu]", " ", SubscriptBox["\[CapitalSigma]", "f"]}], "k"], "-", SubscriptBox["\[CapitalSigma]", "a"]}], ")"}], "\[CurlyPhi]", RowBox[{"(", OverscriptBox["r", "\[RightVector]"], ")"}]}]}], "=", "0."}]], "NumberedEquation", TextAlignment->-0.5], Cell["\<\ As will be explained later, k is the net neutron multiplication factor that \ determines if the reactor is critical (self-sustaining). Define the \ \"buckling\" constant, \ \>", "Text"], Cell[BoxData[ RowBox[{ RowBox[{ SuperscriptBox["B", "2"], "=", RowBox[{ FractionBox["1", "D"], RowBox[{"(", RowBox[{ FractionBox[ RowBox[{"\[Nu]", " ", SubscriptBox["\[CapitalSigma]", "f"]}], "k"], "-", SubscriptBox["\[CapitalSigma]", "a"]}], ")"}]}]}], ","}]], "NumberedEquation", TextAlignment->-0.5], Cell["and, solving for k find, ", "Text"], Cell[BoxData[ RowBox[{ RowBox[{"k", "=", FractionBox[ RowBox[{"\[Nu]", " ", SubscriptBox["\[CapitalSigma]", "f"]}], RowBox[{ RowBox[{"D", " ", SuperscriptBox["B", "2"]}], "+", " ", SubscriptBox["\[CapitalSigma]", "a"]}]]}], ","}]], "NumberedEquation", TextAlignment->-0.5], Cell["\<\ In terms of the buckling constant, the steady-state diffusion equation can be \ written as an eigenvalue problem, \ \>", "Text"], Cell[BoxData[ RowBox[{ RowBox[{ RowBox[{ SuperscriptBox[ OverscriptBox["\[Del]", "\[RightVector]"], "2"], "\[CurlyPhi]"}], RowBox[{"(", OverscriptBox["r", "\[RightVector]"], ")"}]}], "=", RowBox[{ RowBox[{"-", " ", SuperscriptBox["B", "2"]}], "\[CurlyPhi]", RowBox[{ RowBox[{"(", OverscriptBox["r", "\[RightVector]"], ")"}], "."}]}]}]], "NumberedEquation", TextAlignment->-0.5], Cell["\<\ One strategy to investigate criticality of a reactor configuration is to \ solve the eigenvalue problem to obtain allowed values of the buckling \ constant, B, for some reactor composition and geometry. The geometric \ information about the reactor is contained in B. From Eq.(5) one can \ understand that the lowest buckling eigenvalue will dominate any cascade \ process since any larger eigenvalue necessarily yields a smaller neutron \ multiplication factor. Setting k = 1 for the lowest eigenvalue will \ determine the geometry that will give a critical reactor for the given \ fuel/moderator mixture.\ \>", "Text"] }, Open ]], Cell[CellGroupData[{ Cell["Maxwell velocity distribution", "Section"], Cell[CellGroupData[{ Cell["\<\ Calculate the Maxwell velocity distribution and plot it for room temperature\ \>", "Subsection"], Cell[CellGroupData[{ Cell[BoxData[{ RowBox[{"Clear", "[", RowBox[{"MB", ",", "m", ",", "v", ",", "vavg", ",", "vrms", ",", "vpeak"}], "]"}], "\n", RowBox[{ RowBox[{ RowBox[{"MB", "[", RowBox[{"v_", ",", "T_"}], "]"}], "=", RowBox[{ SuperscriptBox[ RowBox[{"(", FractionBox[ SubscriptBox["m", "n"], RowBox[{"2", " ", "\[Pi]", " ", SubscriptBox["k", "B"], " ", "T"}]], ")"}], RowBox[{"3", "/", "2"}]], " ", SuperscriptBox["\[ExponentialE]", RowBox[{"-", FractionBox[ RowBox[{ SubscriptBox["m", "n"], " ", SuperscriptBox["v", "2"]}], RowBox[{"2", " ", SubscriptBox["k", "B"], " ", "T"}]]}]]}]}], ";"}], "\n", RowBox[{ RowBox[{"NormCheck", "=", RowBox[{"4", " ", "\[Pi]", " ", RowBox[{"Integrate", "[", RowBox[{ RowBox[{ SuperscriptBox["v", "2"], " ", RowBox[{"MB", "[", RowBox[{"v", ",", "T"}], "]"}]}], ",", RowBox[{"{", RowBox[{"v", ",", "0", ",", "\[Infinity]"}], "}"}], ",", RowBox[{"Assumptions", "\[Rule]", RowBox[{"{", RowBox[{ RowBox[{"Re", "[", FractionBox[ SubscriptBox["m", "n"], RowBox[{ SubscriptBox["k", "B"], " ", "T"}]], "]"}], ">", "0"}], "}"}]}]}], "]"}]}]}], ";"}], "\n", RowBox[{"Print", "[", RowBox[{ "\"\< Maxwell distribution normalization check = \>\"", ",", "NormCheck"}], "]"}], "\n", RowBox[{ RowBox[{ RowBox[{"vavg", "[", "T_", "]"}], "=", RowBox[{"Simplify", "[", RowBox[{"4", " ", "\[Pi]", " ", RowBox[{"Integrate", "[", RowBox[{ RowBox[{ SuperscriptBox["v", "3"], " ", RowBox[{"MB", "[", RowBox[{"v", ",", "T"}], "]"}]}], ",", RowBox[{"{", RowBox[{"v", ",", "0", ",", "\[Infinity]"}], "}"}], ",", RowBox[{"Assumptions", "\[Rule]", RowBox[{"{", RowBox[{ RowBox[{"Re", "[", FractionBox[ SubscriptBox["m", "n"], RowBox[{ SubscriptBox["k", "B"], " ", "T"}]], "]"}], ">", "0"}], "}"}]}]}], "]"}]}], "]"}]}], ";"}], "\n", RowBox[{ RowBox[{ RowBox[{"vrms", "[", "T_", "]"}], "=", RowBox[{"\[Sqrt]", RowBox[{"Simplify", "[", RowBox[{"4", " ", "\[Pi]", " ", RowBox[{"Integrate", "[", RowBox[{ RowBox[{ SuperscriptBox["v", "4"], " ", RowBox[{"MB", "[", RowBox[{"v", ",", "T"}], "]"}]}], ",", RowBox[{"{", RowBox[{"v", ",", "0", ",", "\[Infinity]"}], "}"}], ",", RowBox[{"Assumptions", "\[Rule]", RowBox[{"{", RowBox[{ RowBox[{"Re", "[", FractionBox[ SubscriptBox["m", "n"], RowBox[{ SubscriptBox["k", "B"], " ", "T"}]], "]"}], ">", "0"}], "}"}]}]}], "]"}]}], "]"}]}]}], ";"}], "\n", RowBox[{ RowBox[{ RowBox[{"vpeak", "[", "T_", "]"}], "=", RowBox[{"v", "/.", "\[InvisibleSpace]", RowBox[{ RowBox[{"Flatten", "[", RowBox[{"Solve", "[", RowBox[{ RowBox[{ RowBox[{ SubscriptBox["\[PartialD]", "v"], RowBox[{"(", RowBox[{ SuperscriptBox["v", "2"], " ", RowBox[{"MB", "[", RowBox[{"v", ",", "T"}], "]"}]}], ")"}]}], "\[Equal]", "0"}], ",", "v"}], "]"}], "]"}], "\[LeftDoubleBracket]", "3", "\[RightDoubleBracket]"}]}]}], ";"}], "\n", RowBox[{ RowBox[{"Print", "[", RowBox[{"\"\< Vavg = \>\"", ",", RowBox[{"vavg", "[", "T", "]"}]}], "]"}], ";", RowBox[{"Print", "[", RowBox[{"\"\< Vrms = \>\"", ",", RowBox[{"vrms", "[", "T", "]"}]}], "]"}], ";", RowBox[{"Print", "[", RowBox[{"\"\< Vpeak = \>\"", ",", RowBox[{"vpeak", "[", "T", "]"}]}], "]"}], ";"}], "\n", RowBox[{ RowBox[{"vmax", "=", RowBox[{ RowBox[{"3", " ", RowBox[{"vavg", "[", SubscriptBox["T", "room"], "]"}]}], "/.", "\[InvisibleSpace]", "Cons"}]}], ";"}], "\n", RowBox[{ RowBox[{"horizaxis", "=", RowBox[{"Style", "[", RowBox[{"\"\\"", ",", RowBox[{"FontFamily", "\[Rule]", "\"\\""}], ",", RowBox[{"FontColor", "\[Rule]", "Blue"}], ",", RowBox[{"FontWeight", "\[Rule]", "Bold"}], ",", RowBox[{"FontSize", "\[Rule]", "12"}]}], "]"}]}], ";"}], "\n", RowBox[{ RowBox[{"vertaxis", "=", RowBox[{"Style", "[", RowBox[{"\"\\"", ",", RowBox[{"FontFamily", "\[Rule]", "\"\\""}], ",", RowBox[{"FontColor", "\[Rule]", "Blue"}], ",", RowBox[{"FontWeight", "\[Rule]", "Bold"}], ",", RowBox[{"FontSize", "\[Rule]", "12"}]}], "]"}]}], ";"}], "\n", RowBox[{ RowBox[{"plotname", "=", RowBox[{"Style", "[", RowBox[{"\"\\"", ",", RowBox[{"FontFamily", "\[Rule]", "\"\\""}], ",", RowBox[{"FontColor", "\[Rule]", "Black"}], ",", RowBox[{"FontWeight", "\[Rule]", "Bold"}], ",", RowBox[{"FontSize", "\[Rule]", "14"}]}], "]"}]}], ";"}], "\n", RowBox[{"Plot", "[", RowBox[{ RowBox[{ RowBox[{"4", " ", "\[Pi]", " ", SuperscriptBox["v", "2"], " ", RowBox[{"MB", "[", RowBox[{"v", ",", SubscriptBox["T", "room"]}], "]"}]}], "/.", "\[InvisibleSpace]", "Cons"}], ",", RowBox[{"{", RowBox[{"v", ",", "0", ",", "vmax"}], "}"}], ",", RowBox[{"PlotStyle", "\[Rule]", RowBox[{"{", RowBox[{"Black", ",", RowBox[{"Thickness", "[", "0.01`", "]"}]}], "}"}]}], ",", RowBox[{"Frame", "\[Rule]", "True"}], ",", RowBox[{"GridLines", "\[Rule]", "Automatic"}], ",", RowBox[{"PlotLabel", "\[Rule]", "plotname"}], ",", RowBox[{"FrameLabel", "\[Rule]", RowBox[{"{", RowBox[{"horizaxis", ",", "vertaxis"}], "}"}]}], ",", RowBox[{"ImageSize", "\[Rule]", "400"}], ",", RowBox[{"Background", "\[Rule]", "LightOrange"}], ",", RowBox[{"PlotRange", "\[Rule]", "All"}]}], "]"}]}], "Input", CellChangeTimes->{3.41354934600231*^9}, FontSize->9], Cell[CellGroupData[{ Cell[BoxData[ InterpretationBox[ RowBox[{"\<\" Maxwell distribution normalization check = \"\>", "\[InvisibleSpace]", "1"}], SequenceForm[" Maxwell distribution normalization check = ", 1], Editable->False]], "Print", CellChangeTimes->{3.413308973977023*^9, 3.413310507114534*^9, 3.413549319913886*^9, 3.413549375978311*^9, 3.413550445633164*^9, 3.4137252051617203`*^9, 3.41443242509307*^9}], Cell[BoxData[ InterpretationBox[ RowBox[{"\<\" Vavg = \"\>", "\[InvisibleSpace]", FractionBox[ RowBox[{"2", " ", SqrtBox[ FractionBox["2", "\[Pi]"]]}], SqrtBox[ FractionBox[ SubscriptBox["m", "n"], RowBox[{"T", " ", SubscriptBox["k", "B"]}]]]]}], SequenceForm[ " Vavg = ", 2 (2/Pi)^Rational[1, 2] ($CellContext`T^(-1) Subscript[$CellContext`k, $CellContext`B]^(-1) Subscript[$CellContext`m, $CellContext`n])^Rational[-1, 2]], Editable->False]], "Print", CellChangeTimes->{3.413308973977023*^9, 3.413310507114534*^9, 3.413549319913886*^9, 3.413549375978311*^9, 3.413550445633164*^9, 3.4137252051617203`*^9, 3.41443242590058*^9}], Cell[BoxData[ InterpretationBox[ RowBox[{"\<\" Vrms = \"\>", "\[InvisibleSpace]", RowBox[{ SqrtBox["3"], " ", SqrtBox[ FractionBox[ RowBox[{"T", " ", SubscriptBox["k", "B"]}], SubscriptBox["m", "n"]]]}]}], SequenceForm[ " Vrms = ", 3^Rational[1, 2] ($CellContext`T Subscript[$CellContext`k, $CellContext`B]/ Subscript[$CellContext`m, $CellContext`n])^Rational[1, 2]], Editable->False]], "Print", CellChangeTimes->{3.413308973977023*^9, 3.413310507114534*^9, 3.413549319913886*^9, 3.413549375978311*^9, 3.413550445633164*^9, 3.4137252051617203`*^9, 3.414432425928679*^9}], Cell[BoxData[ InterpretationBox[ RowBox[{"\<\" Vpeak = \"\>", "\[InvisibleSpace]", FractionBox[ RowBox[{ SqrtBox["2"], " ", SqrtBox["T"], " ", SqrtBox[ SubscriptBox["k", "B"]]}], SqrtBox[ SubscriptBox["m", "n"]]]}], SequenceForm[ " Vpeak = ", 2^Rational[1, 2] $CellContext`T^Rational[1, 2] Subscript[$CellContext`k, $CellContext`B]^Rational[1, 2] Subscript[$CellContext`m, $CellContext`n]^Rational[-1, 2]], Editable->False]], "Print", CellChangeTimes->{3.413308973977023*^9, 3.413310507114534*^9, 3.413549319913886*^9, 3.413549375978311*^9, 3.413550445633164*^9, 3.4137252051617203`*^9, 3.414432425968755*^9}] }, Open ]], Cell[BoxData[ GraphicsBox[{{}, {}, {GrayLevel[0], Thickness[0.01], LineBox[CompressedData[" 1:eJwV1Xc81P8fAHCjRCQZCS0pRWWFO8r7/QqhISuRkTKSokWRpEtWEpGVeWfL 5pxzZ0VJJcSXEhklJHs35Pf5/XWP5+PzeXzu9X6tt+lVe2knDg4OLg4Ozsn/ /2KZkQ2+nq1XD52O23OsP58fuLSfW+XbyyIRbgn3eB4SCGv7hYQ4qaMDXHUB Mu1TIOVQOFwtcQYdsZ9TDkhYAzu0r6R6DVUjM67gOb+pSyDbvtpEuLYV2ZZ2 7m7knYO9DgkrefEDyMk+z2RLeB0ozqkU6HnMIDcpv6y/8TKgou1YcG23H3Ln OtDgXMMJqiFFq6tEHyEvwZwKscLXoN72x3YtZxS6W7p10HsjHTSk9OinJxLR /cXXIOEaDAcdIvnTujNQwPlftCC3StDK/WI/1ViAHm6SKX74/hXguT0srTIG eiypfexFzhrQ1rajX349iJ5y7qa+2O8EOhcCzgmjiyjaQ4pP++hR0A3J5WfS x1HcOk657gevQK9twWE1bQElFSVmCPN6gv7iZsG8Td6IapuZKPFuKxyVOswy DfuHaPOz3lquY3Dc4fGGFJ81KMPOyWeT3zM4EVRSdWQmFGUpBbGT7REY5n66 OOYihHJE415brLIHozmZWo3Tm1C+GOVt9KgjmGrbklzixFDJstSnznfxYPrf tXWH2i0RXdno98EdE2B2we+bkGA8KrsyR377wwVOhWSHMQK2IiZP8AfBB/Nw um12iPuGLKrKrOftrNsDFk487M78i6hG1nKINO4CFosSETkjz1GtxfOm83ed 4YwU1jK2U0QvJmqk1xvwgLVDSFTSCTJ6ZX5g100LCbCeT7p0LcgbNWgGWsi8 HAOboCLQqatEr3cGmWycrgHb3I6foxqH0Rue8Pvu6e1gN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T5AcUVh7iV8PQOvoPJoY9ejplIU+uth0hSLDpVXHIv6nQCFkI3tj6fm QuW1viiZRncUsnaw6IEG8X13K0/nvZno4Ze6Jf5fd6HSy1hrfIYfPfS3pmfs A6j0O/j2j28nCv5vutUpQgMqY4S/b4xzRUEPTL52h7pBZdULiRPv4lCAMN/o COqAytqDf58ovEP+40Ki0VJNUFnH6GuP+If8G82sJpyroPJ1XqaVpQPyvxfe cN3vEVR+iDvg/F0BPZjqmJn67gWV368a+v17ifx6DSQ7yw5C1bot9yuUpxHl 63nJ4qMihJXuCNqMIsqA96vWmSeEdTwcggYRpT/K58HjKcIuzuu+fEKU3kaB lKufCZedsH9YiyjdiuWpZTFQJWgozj8Qhij/cZLP8rhA1XqfvLMR8ojyKq+/ 97sB4fCM0sqdiPLy9bKxTw7h1BTe4a2IUv9tlw7rPuHGiFKtDYhSJxGbz/kW qoREPdeMLCFKdRDPnWxrwnmHi6EBUcod+Z9U5BGuOchzmfh/xr2+nk3chNtU rWNYiFKWUEO9N0l4affqsXxEKW2nReopQNUGXQGruChEKdKZXEs1JGyxurCe iLfw3Lb1+CFhl5VVE8GIUuBjFZwoSjh8ulD3DqLk0Wc/OqcRTv256qoHouR+ MMmt7yRcNngm/gqiPB9nzZR/INz4peDVRcJrFXNZ+wh3f+SeskeUHNnCzsNV /wNWwrTi "]]}}, AspectRatio->NCache[GoldenRatio^(-1), 0.6180339887498948], Axes->True, AxesOrigin->{0, 0}, Background->RGBColor[1, 0.9, 0.8], Frame->True, FrameLabel->{ FormBox[ StyleBox[ "\"v\"", FontFamily -> "Tahoma", FontColor -> RGBColor[0, 0, 1], FontWeight -> Bold, FontSize -> 12, StripOnInput -> False], TraditionalForm], FormBox[ StyleBox[ "\"P\"", FontFamily -> "Tahoma", FontColor -> RGBColor[0, 0, 1], FontWeight -> Bold, FontSize -> 12, StripOnInput -> False], TraditionalForm]}, GridLines->Automatic, ImageSize->400, PlotLabel->FormBox[ StyleBox[ "\"Maxwell Veclocity Distribution\"", FontFamily -> "Tahoma", FontColor -> GrayLevel[0], FontWeight -> Bold, FontSize -> 14, StripOnInput -> False], TraditionalForm], PlotRange->{All, All}, PlotRangeClipping->True, PlotRangePadding->{Automatic, Automatic}]], "Output", CellChangeTimes->{3.413308975331933*^9, 3.413310507988472*^9, 3.4135493213439283`*^9, 3.4135493764195757`*^9, 3.413550446432067*^9, 3.413725206458208*^9, 3.4144324263352413`*^9}] }, Open ]], Cell[CellGroupData[{ Cell[BoxData[{ RowBox[{"Clear", "[", RowBox[{"A", ",", "v", ",", "vboost", ",", "vcm", ",", "En"}], "]"}], "\[IndentingNewLine]", RowBox[{ RowBox[{ RowBox[{"vpeakvalue", "=", RowBox[{ RowBox[{"100", " ", RowBox[{"vpeak", "[", SubscriptBox["T", "room"], "]"}]}], "/.", "Cons"}]}], ";"}], " ", RowBox[{"(*", " ", RowBox[{"most", " ", "probable", " ", "speed", " ", "in", " ", RowBox[{"cm", "/", "s"}]}], " ", "*)"}], " "}], "\[IndentingNewLine]", RowBox[{ RowBox[{ RowBox[{"vrmsvalue", "=", RowBox[{ RowBox[{"100", " ", RowBox[{"vrms", "[", SubscriptBox["T", "room"], "]"}]}], "/.", "Cons"}]}], " ", ";"}], RowBox[{"(*", " ", RowBox[{"rms", " ", "speed", " ", "in", " ", RowBox[{"cm", "/", "s"}]}], " ", "*)"}], " "}], "\[IndentingNewLine]", RowBox[{ RowBox[{ RowBox[{"vavgvalue", "=", RowBox[{ RowBox[{"100", " ", RowBox[{"vavg", "[", SubscriptBox["T", "room"], "]"}]}], "/.", "Cons"}]}], ";"}], " ", RowBox[{"(*", " ", RowBox[{"average", " ", "speed", " ", "in", " ", RowBox[{"cm", "/", "s"}]}], " ", "*)"}]}], "\[IndentingNewLine]", RowBox[{ RowBox[{ RowBox[{"vspeed", "=", "vavgvalue"}], ";"}], " "}], "\[IndentingNewLine]", RowBox[{ RowBox[{ RowBox[{ RowBox[{"vboost", "[", "A_", "]"}], "=", RowBox[{ RowBox[{"vspeed", "/", RowBox[{"(", RowBox[{"1", "+", "A"}], ")"}]}], RowBox[{"{", RowBox[{"0", ",", "0", ",", "1"}], "}"}]}]}], " ", ";"}], " ", RowBox[{"(*", " ", RowBox[{ "speed", " ", "between", " ", "CM", " ", "and", " ", "lab", " ", "frames"}], " ", "*)"}]}], "\[IndentingNewLine]", RowBox[{ RowBox[{ RowBox[{"vcm", "[", "A_", "]"}], "=", RowBox[{"A", " ", RowBox[{"vspeed", "/", RowBox[{"(", RowBox[{"1", "+", "A"}], ")"}]}]}]}], " ", ";"}], "\[IndentingNewLine]", RowBox[{ RowBox[{ RowBox[{"En", "=", RowBox[{ RowBox[{"(", " ", RowBox[{ SubscriptBox["k", "B"], " ", RowBox[{ SubscriptBox["T", "room"], "/", "e"}]}], ")"}], "/.", "Cons"}]}], ";"}], "\[IndentingNewLine]"}], "\[IndentingNewLine]", RowBox[{"Print", "[", RowBox[{ "\"\< Thermal energy, \!\(\*SubscriptBox[\(k\), \(B\)]\) T = \>\"", ",", "En", ",", "\"\< eV\>\""}], "]"}], "\[IndentingNewLine]", RowBox[{ RowBox[{"Print", "[", RowBox[{ "\"\< \!\(\*SubscriptBox[\(V\), \(avg\)]\) = \>\"", ",", "vavgvalue", ",", "\"\< cm/s\>\""}], "]"}], ";", RowBox[{"Print", "[", RowBox[{ "\"\< \!\(\*SubscriptBox[\(V\), \(rms\)]\) = \>\"", ",", "vrmsvalue", ",", "\"\< cm/s\>\""}], "]"}], ";", RowBox[{"Print", "[", RowBox[{ "\"\< \!\(\*SubscriptBox[\(V\), \(peak\)]\) = \>\"", ",", "vpeakvalue", ",", "\"\< cm/s\>\""}], "]"}], ";", "\[IndentingNewLine]", RowBox[{"(*", " ", RowBox[{"v", "=", RowBox[{"2.2", " ", RowBox[{"10", "^", "5"}], " ", RowBox[{"cm", "/", "s"}]}]}], " ", "*)"}]}]}], "Input", CellChangeTimes->{{3.413549402462096*^9, 3.413549417872847*^9}}, FontSize->9], Cell[CellGroupData[{ Cell[BoxData[ InterpretationBox[ RowBox[{"\<\" Thermal energy, \\!\\(\\*SubscriptBox[\\(k\\), \\(B\\)]\\) T \ = \"\>", "\[InvisibleSpace]", "0.025261702981544013`", "\[InvisibleSpace]", "\<\" eV\"\>"}], SequenceForm[ " Thermal energy, \!\(\*SubscriptBox[\(k\), \(B\)]\) T = ", 0.025261702981544013`, " eV"], Editable->False]], "Print", CellChangeTimes->{3.4133089822690897`*^9, 3.413310513018753*^9, 3.4135493830152483`*^9, 3.413549420264586*^9, 3.41355044995319*^9, 3.4137252089271297`*^9, 3.4144324265347347`*^9}], Cell[BoxData[ InterpretationBox[ RowBox[{"\<\" \\!\\(\\*SubscriptBox[\\(V\\), \\(avg\\)]\\) = \"\>", "\[InvisibleSpace]", "248061.96338330343`", "\[InvisibleSpace]", "\<\" cm/s\"\>"}], SequenceForm[ " \!\(\*SubscriptBox[\(V\), \(avg\)]\) = ", 248061.96338330343`, " cm/s"], Editable->False]], "Print", CellChangeTimes->{3.4133089822690897`*^9, 3.413310513018753*^9, 3.4135493830152483`*^9, 3.413549420264586*^9, 3.41355044995319*^9, 3.4137252089271297`*^9, 3.4144324265651197`*^9}], Cell[BoxData[ InterpretationBox[ RowBox[{"\<\" \\!\\(\\*SubscriptBox[\\(V\\), \\(rms\\)]\\) = \"\>", "\[InvisibleSpace]", "269246.9218685181`", "\[InvisibleSpace]", "\<\" cm/s\"\>"}], SequenceForm[ " \!\(\*SubscriptBox[\(V\), \(rms\)]\) = ", 269246.9218685181, " cm/s"], Editable->False]], "Print", CellChangeTimes->{3.4133089822690897`*^9, 3.413310513018753*^9, 3.4135493830152483`*^9, 3.413549420264586*^9, 3.41355044995319*^9, 3.4137252089271297`*^9, 3.414432426602281*^9}], Cell[BoxData[ InterpretationBox[ RowBox[{"\<\" \\!\\(\\*SubscriptBox[\\(V\\), \\(peak\\)]\\) = \"\>", "\[InvisibleSpace]", "219839.19113095963`", "\[InvisibleSpace]", "\<\" cm/s\"\>"}], SequenceForm[ " \!\(\*SubscriptBox[\(V\), \(peak\)]\) = ", 219839.19113095963`, " cm/s"], Editable->False]], "Print", CellChangeTimes->{3.4133089822690897`*^9, 3.413310513018753*^9, 3.4135493830152483`*^9, 3.413549420264586*^9, 3.41355044995319*^9, 3.4137252089271297`*^9, 3.414432426652536*^9}] }, Open ]] }, Open ]] }, Open ]] }, Open ]], Cell[CellGroupData[{ Cell["Task 1: Point Source", "Section"], Cell[TextData[{ StyleBox["Task 1.", FontWeight->"Bold"], " Before tackling nuclear reactor models, let's just study simple neutron \ diffusion without any fission. Consider an infinite volume of some material, \ say sodium to be specific, at room temperature with a thermal neutron point \ source at the origin that emits S neutrons per second isotropically. The \ analytic solution for the steady state neutron flux is" }], "Text"], Cell[BoxData[ RowBox[{ RowBox[{ RowBox[{"\[CurlyPhi]", RowBox[{"(", "r", ")"}]}], "=", " ", RowBox[{ FractionBox["S", RowBox[{"4", "\[Pi]", " ", "D"}]], " ", FractionBox[ SuperscriptBox["\[ExponentialE]", RowBox[{ RowBox[{"-", "r"}], "/", "L"}]], "r"]}]}], ","}]], "NumberedEquation", TextAlignment->-0.5], Cell[TextData[{ "where D is the diffusion constant, L = ", Cell[BoxData[ FormBox[ SqrtBox[ RowBox[{"D", "/", SubscriptBox["\[CapitalSigma]", "a"]}]], TraditionalForm]]], " is called the diffusion length (refer to the class notes). Develop a \ Monte Carlo simulation for this system and show that the flux follows this \ form, evaluate the diffusion length, and compare with the analytic result. \ (One strategy is to launch a neutron from the origin in an arbitrary \ direction and track the trajectory until it is absorbed. Assume that the \ neutron scatters isotropically from the nuclei of the moderating material. \ Keep track of the radius of the neutron (suitably binned) for the purposes of \ constructing \[CurlyPhi], calculating the effective diffusion length at the \ end of the simulation, and compare your Monte Carlo result with the analytic \ result, Eq.(7).)" }], "Text"], Cell[CellGroupData[{ Cell["Analytic results for mean free path and diffusion lengths", "Subsection"], Cell[CellGroupData[{ Cell[BoxData[ RowBox[{ StyleBox[ RowBox[{"(*", " ", RowBox[{ "Use", " ", "Sodium", " ", "thermal", " ", "neutron", " ", "data"}], " ", "*)"}], FontColor->RGBColor[0, 0, 1]], "\[IndentingNewLine]", RowBox[{ RowBox[{ RowBox[{"Avalue", "=", "23"}], ";"}], "\[IndentingNewLine]", RowBox[{ RowBox[{"data", "=", RowBox[{"{", RowBox[{ RowBox[{"\[Rho]", "\[Rule]", ".00097"}], ",", RowBox[{ SubscriptBox["n", "d"], "\[Rule]", ".02541"}], ",", RowBox[{ SubscriptBox["\[CapitalSigma]", "s"], "\[Rule]", ".08131"}], ",", RowBox[{ SubscriptBox["\[CapitalSigma]", "\[Gamma]"], "\[Rule]", ".01347"}], " ", ",", RowBox[{ SubscriptBox["\[CapitalSigma]", "f"], "\[Rule]", "0"}], ",", RowBox[{"\[Nu]", "\[Rule]", "0"}]}], "}"}]}], ";"}], "\[IndentingNewLine]", "\[IndentingNewLine]", StyleBox[ RowBox[{"(*", " ", RowBox[{ "Use", " ", "Carbon", " ", "thermal", " ", "neutron", " ", "data"}], " ", "*)"}], FontColor->RGBColor[0, 0, 1]], "\[IndentingNewLine]", RowBox[{ RowBox[{"Avalue", "=", "12"}], ";"}], "\[IndentingNewLine]", RowBox[{ RowBox[{"C12data", "=", RowBox[{"{", RowBox[{ RowBox[{"\[Rho]", "\[Rule]", ".00160"}], ",", RowBox[{ SubscriptBox["n", "d"], "\[Rule]", ".08023"}], ",", RowBox[{ SubscriptBox["\[CapitalSigma]", "s"], "->", ".3811"}], ",", RowBox[{ SubscriptBox["\[CapitalSigma]", "\[Gamma]"], "\[Rule]", ".0002728"}], " ", ",", RowBox[{ SubscriptBox["\[CapitalSigma]", "f"], "\[Rule]", "0"}], ",", RowBox[{"\[Nu]", "\[Rule]", "0"}]}], "}"}]}], ";"}], "\[IndentingNewLine]", "\[IndentingNewLine]", RowBox[{ RowBox[{ RowBox[{"muavg", "[", "A_", "]"}], "=", RowBox[{"2", "/", RowBox[{"(", RowBox[{"3", " ", "A"}], ")"}]}]}], ";"}], "\[IndentingNewLine]", RowBox[{ RowBox[{ SubscriptBox["\[CapitalSigma]", "a"], "=", RowBox[{ RowBox[{"(", RowBox[{ SubscriptBox["\[CapitalSigma]", "\[Gamma]"], "+", SubscriptBox["\[CapitalSigma]", "f"]}], ")"}], "/.", "data"}]}], ";"}], "\[IndentingNewLine]", RowBox[{ RowBox[{"MFP", "=", RowBox[{ RowBox[{ RowBox[{"1", "/", SubscriptBox["\[CapitalSigma]", "s"]}], "/.", "data"}], "/.", "Cons"}]}], ";"}], "\[IndentingNewLine]", RowBox[{ RowBox[{"MFPabs", "=", RowBox[{ RowBox[{ RowBox[{"1", "/", SubscriptBox["\[CapitalSigma]", "a"]}], "/.", "data"}], "/.", "Cons"}]}], ";"}], "\[IndentingNewLine]", RowBox[{ RowBox[{"MFPtotal", "=", RowBox[{ RowBox[{ RowBox[{"1", "/", RowBox[{"(", RowBox[{ SubscriptBox["\[CapitalSigma]", "s"], "+", SubscriptBox["\[CapitalSigma]", "\[Gamma]"], "+", SubscriptBox["\[CapitalSigma]", "f"]}], ")"}]}], "/.", "data"}], "/.", "Cons"}]}], ";"}], "\[IndentingNewLine]", RowBox[{ RowBox[{"Diff", "=", RowBox[{ RowBox[{ RowBox[{ RowBox[{"1", "/", RowBox[{"(", RowBox[{ SubscriptBox["\[CapitalSigma]", "a"], "+", RowBox[{ SubscriptBox["\[CapitalSigma]", "s"], RowBox[{"(", RowBox[{"1", "-", RowBox[{"muavg", "[", "Avalue", "]"}]}], ")"}]}]}], ")"}]}], "/", "3"}], "/.", "data"}], "/.", "Cons"}]}], ";"}], "\[IndentingNewLine]", RowBox[{ RowBox[{"DAlt", "=", RowBox[{ RowBox[{ RowBox[{ RowBox[{ SubscriptBox["\[CapitalSigma]", "s"], "/", RowBox[{ RowBox[{"(", RowBox[{ SubscriptBox["\[CapitalSigma]", "a"], "+", RowBox[{ SubscriptBox["\[CapitalSigma]", "s"], RowBox[{"(", RowBox[{"1", "-", RowBox[{"muavg", "[", "Avalue", "]"}]}], ")"}]}]}], ")"}], "^", "2"}]}], "/", "3"}], "/.", "data"}], "/.", "Cons"}]}], ";"}], "\[IndentingNewLine]", RowBox[{ RowBox[{"L", "=", RowBox[{ RowBox[{ RowBox[{"Sqrt", "[", RowBox[{"Diff", "/", SubscriptBox["\[CapitalSigma]", "a"]}], "]"}], "/.", "data"}], "/.", "Cons"}]}], ";"}], "\[IndentingNewLine]", RowBox[{ RowBox[{"LAlt", "=", RowBox[{ RowBox[{ RowBox[{"Sqrt", "[", RowBox[{"DAlt", "/", SubscriptBox["\[CapitalSigma]", "a"]}], "]"}], "/.", "data"}], "/.", "Cons"}]}], ";"}], "\[IndentingNewLine]", RowBox[{ RowBox[{"AbsorptionLength", "=", RowBox[{ RowBox[{ RowBox[{"1", "/", SubscriptBox["\[CapitalSigma]", "a"]}], "/.", "data"}], "/.", "Cons"}]}], ";"}], "\[IndentingNewLine]", RowBox[{ RowBox[{"DiffTh", "=", RowBox[{"vspeed", " ", "Diff"}]}], ";"}], "\[IndentingNewLine]", "\[IndentingNewLine]", StyleBox[ RowBox[{"(*", " ", RowBox[{ SubscriptBox["\[CapitalSigma]", "s"], ",", " ", RowBox[{ SubscriptBox["\[CapitalSigma]", "a"], " ", "\[Rule]", " ", RowBox[{"cm", "^", RowBox[{"-", "1"}]}]}]}], " ", "*)"}], FontColor->RGBColor[0, 0, 1]], "\[IndentingNewLine]", StyleBox[ RowBox[{"Print", "[", RowBox[{ "\"\< Mean Free Path (scattering) = \>\"", ",", "MFP", ",", "\"\< cm\>\""}], "]"}], FontColor->RGBColor[1, 0, 0]], StyleBox["\[IndentingNewLine]", FontColor->RGBColor[1, 0, 0]], StyleBox[ RowBox[{"Print", "[", RowBox[{ "\"\< Mean Free Path (absorption) = \>\"", ",", "MFPabs", ",", "\"\< cm\>\""}], "]"}], FontColor->RGBColor[1, 0, 0]], StyleBox["\[IndentingNewLine]", FontColor->RGBColor[1, 0, 0]], StyleBox[ RowBox[{"Print", "[", RowBox[{ "\"\< Mean Free Path (total) = \>\"", ",", "MFPtotal", ",", "\"\< cm\>\""}], "]"}], FontColor->RGBColor[1, 0, 0]], StyleBox["\[IndentingNewLine]", FontColor->RGBColor[1, 0, 0]], StyleBox[ RowBox[{"Print", "[", RowBox[{ "\"\< Flux Diffusion constant: D = \>\"", ",", "Diff", ",", "\"\< cm,\>\"", ",", "\"\< D(alt) = \>\"", ",", "DAlt", ",", "\"\< cm\>\""}], "]"}], FontColor->RGBColor[1, 0, 0]], StyleBox["\[IndentingNewLine]", FontColor->RGBColor[1, 0, 0]], StyleBox[ RowBox[{"Print", "[", RowBox[{ "\"\< Diffusion Length: L = \>\"", ",", "L", ",", "\"\< cm,\>\"", ",", "\"\< L(alt) = \>\"", ",", "LAlt", ",", "\"\< cm\>\""}], "]"}], FontColor->RGBColor[1, 0, 0]], StyleBox["\[IndentingNewLine]", FontColor->RGBColor[1, 0, 0]], StyleBox[ RowBox[{"Print", "[", RowBox[{ "\"\< Absorption MFP: = \>\"", ",", "AbsorptionLength", ",", "\"\< cm\>\""}], "]"}], FontColor->RGBColor[1, 0, 0]], StyleBox["\[IndentingNewLine]", FontColor->RGBColor[1, 0, 0]], StyleBox[ RowBox[{"Print", "[", RowBox[{ "\"\< Theoretical Density Diffusion constant = \>\"", ",", "DiffTh", ",", "\"\< cm^2/s\>\""}], "]"}], FontColor->RGBColor[1, 0, 0]], "\[IndentingNewLine]"}]}]], "Input", CellChangeTimes->{{3.4133094042320013`*^9, 3.4133094918589*^9}, { 3.413310016867484*^9, 3.413310060855075*^9}, {3.413312820242971*^9, 3.413312861430724*^9}, {3.4135494637072573`*^9, 3.4135495829798193`*^9}, { 3.413549750491456*^9, 3.413549762865934*^9}, {3.413725232393272*^9, 3.4137252329350986`*^9}}, FontSize->9], Cell[CellGroupData[{ Cell[BoxData[ InterpretationBox[ RowBox[{"\<\" Mean Free Path (scattering) = \"\>", "\[InvisibleSpace]", "12.298610257040956`", "\[InvisibleSpace]", "\<\" cm\"\>"}], SequenceForm[" Mean Free Path (scattering) = ", 12.298610257040956`, " cm"], Editable->False]], "Print", CellChangeTimes->{ 3.413309010737516*^9, 3.413309450119104*^9, 3.413309493356166*^9, 3.413310070044856*^9, 3.4133105237361317`*^9, 3.413312876008649*^9, 3.413549430648301*^9, 3.413549495637206*^9, {3.413549529154409*^9, 3.413549584674322*^9}, 3.4135497641838083`*^9, 3.413550457800294*^9, { 3.413725218846322*^9, 3.413725233743932*^9}, 3.4144324325555277`*^9}], Cell[BoxData[ InterpretationBox[ RowBox[{"\<\" Mean Free Path (absorption) = \"\>", "\[InvisibleSpace]", "74.23904974016332`", "\[InvisibleSpace]", "\<\" cm\"\>"}], SequenceForm[" Mean Free Path (absorption) = ", 74.23904974016332, " cm"], Editable->False]], "Print", CellChangeTimes->{ 3.413309010737516*^9, 3.413309450119104*^9, 3.413309493356166*^9, 3.413310070044856*^9, 3.4133105237361317`*^9, 3.413312876008649*^9, 3.413549430648301*^9, 3.413549495637206*^9, {3.413549529154409*^9, 3.413549584674322*^9}, 3.4135497641838083`*^9, 3.413550457800294*^9, { 3.413725218846322*^9, 3.413725233743932*^9}, 3.414432432561617*^9}], Cell[BoxData[ InterpretationBox[ RowBox[{"\<\" Mean Free Path (total) = \"\>", "\[InvisibleSpace]", "10.550749103186327`", "\[InvisibleSpace]", "\<\" cm\"\>"}], SequenceForm[" Mean Free Path (total) = ", 10.550749103186327`, " cm"], Editable->False]], "Print", CellChangeTimes->{ 3.413309010737516*^9, 3.413309450119104*^9, 3.413309493356166*^9, 3.413310070044856*^9, 3.4133105237361317`*^9, 3.413312876008649*^9, 3.413549430648301*^9, 3.413549495637206*^9, {3.413549529154409*^9, 3.413549584674322*^9}, 3.4135497641838083`*^9, 3.413550457800294*^9, { 3.413725218846322*^9, 3.413725233743932*^9}, 3.4144324325670357`*^9}], Cell[BoxData[ InterpretationBox[ RowBox[{"\<\" Flux Diffusion constant: D = \"\>", "\[InvisibleSpace]", "3.6929212853828024`", "\[InvisibleSpace]", "\<\" cm,\"\>", "\[InvisibleSpace]", "\<\" D(alt) = \"\>", "\[InvisibleSpace]", "3.32663626255474`", "\[InvisibleSpace]", "\<\" cm\"\>"}], SequenceForm[ " Flux Diffusion constant: D = ", 3.6929212853828024`, " cm,", " D(alt) = ", 3.32663626255474, " cm"], Editable->False]], "Print", CellChangeTimes->{ 3.413309010737516*^9, 3.413309450119104*^9, 3.413309493356166*^9, 3.413310070044856*^9, 3.4133105237361317`*^9, 3.413312876008649*^9, 3.413549430648301*^9, 3.413549495637206*^9, {3.413549529154409*^9, 3.413549584674322*^9}, 3.4135497641838083`*^9, 3.413550457800294*^9, { 3.413725218846322*^9, 3.413725233743932*^9}, 3.414432432572644*^9}], Cell[BoxData[ InterpretationBox[ RowBox[{"\<\" Diffusion Length: L = \"\>", "\[InvisibleSpace]", "16.55774643458589`", "\[InvisibleSpace]", "\<\" cm,\"\>", "\[InvisibleSpace]", "\<\" L(alt) = \"\>", "\[InvisibleSpace]", "15.71516194517996`", "\[InvisibleSpace]", "\<\" cm\"\>"}], SequenceForm[ " Diffusion Length: L = ", 16.55774643458589, " cm,", " L(alt) = ", 15.71516194517996, " cm"], Editable->False]], "Print", CellChangeTimes->{ 3.413309010737516*^9, 3.413309450119104*^9, 3.413309493356166*^9, 3.413310070044856*^9, 3.4133105237361317`*^9, 3.413312876008649*^9, 3.413549430648301*^9, 3.413549495637206*^9, {3.413549529154409*^9, 3.413549584674322*^9}, 3.4135497641838083`*^9, 3.413550457800294*^9, { 3.413725218846322*^9, 3.413725233743932*^9}, 3.414432432578336*^9}], Cell[BoxData[ InterpretationBox[ RowBox[{"\<\" Absorption MFP: = \"\>", "\[InvisibleSpace]", "74.23904974016332`", "\[InvisibleSpace]", "\<\" cm\"\>"}], SequenceForm[" Absorption MFP: = ", 74.23904974016332, " cm"], Editable->False]], "Print", CellChangeTimes->{ 3.413309010737516*^9, 3.413309450119104*^9, 3.413309493356166*^9, 3.413310070044856*^9, 3.4133105237361317`*^9, 3.413312876008649*^9, 3.413549430648301*^9, 3.413549495637206*^9, {3.413549529154409*^9, 3.413549584674322*^9}, 3.4135497641838083`*^9, 3.413550457800294*^9, { 3.413725218846322*^9, 3.413725233743932*^9}, 3.414432432583796*^9}], Cell[BoxData[ InterpretationBox[ RowBox[{"\<\" Theoretical Density Diffusion constant = \"\>", "\[InvisibleSpace]", "916073.3046720505`", "\[InvisibleSpace]", "\<\" cm^2/s\"\>"}], SequenceForm[ " Theoretical Density Diffusion constant = ", 916073.3046720505, " cm^2/s"], Editable->False]], "Print", CellChangeTimes->{ 3.413309010737516*^9, 3.413309450119104*^9, 3.413309493356166*^9, 3.413310070044856*^9, 3.4133105237361317`*^9, 3.413312876008649*^9, 3.413549430648301*^9, 3.413549495637206*^9, {3.413549529154409*^9, 3.413549584674322*^9}, 3.4135497641838083`*^9, 3.413550457800294*^9, { 3.413725218846322*^9, 3.413725233743932*^9}, 3.4144324326221743`*^9}] }, Open ]] }, Open ]] }, Open ]], Cell[CellGroupData[{ Cell["Monte Carlo tracking of neutron paths", "Subsection"], Cell[CellGroupData[{ Cell["Track one neutron", "Subsubsection"], Cell[CellGroupData[{ Cell[BoxData[{ RowBox[{ RowBox[{"dt", "=", RowBox[{"5.", " ", RowBox[{"10", "^", RowBox[{"-", "6"}]}]}]}], ";", RowBox[{"ds", "=", " ", RowBox[{ RowBox[{"100", " ", RowBox[{"vavg", "[", SubscriptBox["T", "room"], "]"}], " ", "dt"}], "/.", "Cons"}]}], ";"}], "\[IndentingNewLine]", RowBox[{ RowBox[{"dPs", "=", RowBox[{ RowBox[{ SubscriptBox["\[CapitalSigma]", "s"], " ", "ds"}], "/.", "data"}]}], ";"}], "\[IndentingNewLine]", RowBox[{ RowBox[{ RowBox[{"dPa", "=", RowBox[{ RowBox[{ RowBox[{"(", RowBox[{ SubscriptBox["\[CapitalSigma]", "\[Gamma]"], "+", SubscriptBox["\[CapitalSigma]", "f"]}], ")"}], " ", "ds"}], "/.", "data"}]}], ";"}], "\[IndentingNewLine]"}], "\[IndentingNewLine]", StyleBox[ RowBox[{"Print", "[", RowBox[{ "\"\< For time step of \>\"", ",", "dt", ",", "\"\< sec, and average speed of, v = \>\"", ",", "vspeed", ",", "\"\< cm/s, distance per step = \>\"", ",", "ds", ",", "\"\< cm\>\""}], "]"}], FontColor->RGBColor[1, 0, 0]], "\[IndentingNewLine]", StyleBox[ RowBox[{ "Print", "[", "\"\< The probability of scattering in one time step:\>\"", "]"}], FontColor->RGBColor[1, 0, 0]], "\[IndentingNewLine]", StyleBox[ RowBox[{"Print", "[", RowBox[{ "\"\< Pscatt = \>\"", ",", "dPs", ",", "\"\< Pabs = \>\"", ",", "dPa"}], "]"}], FontColor->RGBColor[1, 0, 0]]}], "Input", CellChangeTimes->{{3.4133128975342503`*^9, 3.413312924738986*^9}, { 3.4133137745086737`*^9, 3.413313776610252*^9}, {3.413549595782546*^9, 3.413549596694353*^9}, 3.4144324796161833`*^9}, FontSize->9], Cell[CellGroupData[{ Cell[BoxData[ InterpretationBox[ RowBox[{"\<\" For time step of \"\>", "\[InvisibleSpace]", "4.9999999999999996`*^-6", "\[InvisibleSpace]", "\<\" sec, and average speed of, v = \"\>", "\[InvisibleSpace]", "248061.96338330343`", "\[InvisibleSpace]", "\<\" cm/s, distance per step = \"\>", "\[InvisibleSpace]", "1.2403098169165172`", "\[InvisibleSpace]", "\<\" cm\"\>"}], SequenceForm[ " For time step of ", 4.9999999999999996`*^-6, " sec, and average speed of, v = ", 248061.96338330343`, " cm/s, distance per step = ", 1.2403098169165172`, " cm"], Editable->False]], "Print", CellChangeTimes->{ 3.413309028271126*^9, 3.413310539102015*^9, {3.4133128893260202`*^9, 3.413312925460485*^9}, 3.41331377794065*^9, 3.4135496075567703`*^9, 3.413550465234993*^9, 3.413725242005994*^9, {3.4144324645556803`*^9, 3.414432480238634*^9}}], Cell[BoxData["\<\" The probability of scattering in one time step:\"\>"], \ "Print", CellChangeTimes->{ 3.413309028271126*^9, 3.413310539102015*^9, {3.4133128893260202`*^9, 3.413312925460485*^9}, 3.41331377794065*^9, 3.4135496075567703`*^9, 3.413550465234993*^9, 3.413725242005994*^9, {3.4144324645556803`*^9, 3.414432480245164*^9}}], Cell[BoxData[ InterpretationBox[ RowBox[{"\<\" Pscatt = \"\>", "\[InvisibleSpace]", "0.10084959121348201`", "\[InvisibleSpace]", "\<\" Pabs = \"\>", "\[InvisibleSpace]", "0.016706973233865486`"}], SequenceForm[ " Pscatt = ", 0.10084959121348201`, " Pabs = ", 0.016706973233865486`], Editable->False]], "Print", CellChangeTimes->{ 3.413309028271126*^9, 3.413310539102015*^9, {3.4133128893260202`*^9, 3.413312925460485*^9}, 3.41331377794065*^9, 3.4135496075567703`*^9, 3.413550465234993*^9, 3.413725242005994*^9, {3.4144324645556803`*^9, 3.414432480251607*^9}}] }, Open ]] }, Open ]], Cell[CellGroupData[{ Cell[BoxData[{ RowBox[{"Clear", "[", RowBox[{"r", ",", "rlist", ",", "vectors"}], "]"}], "\n", RowBox[{ RowBox[{"r", "=", RowBox[{"{", RowBox[{"0", ",", "0", ",", "0"}], "}"}]}], ";", RowBox[{"rlist", "=", RowBox[{"{", "}"}]}], ";", RowBox[{"vcmvalue", "=", RowBox[{"vcm", "[", "Avalue", "]"}]}], ";", RowBox[{"voverAplus1", "=", FractionBox["vspeed", RowBox[{"1", "+", "Avalue"}]]}], ";"}], "\n", RowBox[{ RowBox[{"For", "[", RowBox[{ RowBox[{"{", RowBox[{ RowBox[{"vhat", "=", RowBox[{"{", RowBox[{"0", ",", "0", ",", "1"}], "}"}]}], ";", RowBox[{"r", "=", RowBox[{"{", RowBox[{"0", ",", "0", ",", "0"}], "}"}]}], ";", RowBox[{"iStep", "=", "1"}], ";", RowBox[{"iStop", "=", RowBox[{"-", "1"}]}]}], "}"}], ",", RowBox[{ RowBox[{"iStop", "<", "0"}], "&&", RowBox[{"iStep", "<", SuperscriptBox["10", "3"]}]}], ",", RowBox[{"iStep", "++"}], ",", RowBox[{"{", RowBox[{ RowBox[{"ran", "=", RowBox[{"RandomReal", "[", "]"}]}], ";", RowBox[{"If", "[", RowBox[{ RowBox[{"ran", "<", "dPs"}], ",", RowBox[{"{", RowBox[{ RowBox[{"vhatold", "=", "vhat"}], ";", RowBox[{"thcm", "=", RowBox[{"\[Pi]", " ", RowBox[{"RandomReal", "[", "]"}]}]}], ";", RowBox[{"phicm", "=", RowBox[{"2", " ", "\[Pi]", " ", RowBox[{"RandomReal", "[", "]"}]}]}], ";", RowBox[{"vlab", "=", RowBox[{ RowBox[{"vcmvalue", " ", RowBox[{"{", RowBox[{ RowBox[{ RowBox[{"Sin", "[", "thcm", "]"}], " ", RowBox[{"Cos", "[", "phicm", "]"}]}], ",", RowBox[{ RowBox[{"Sin", "[", "thcm", "]"}], " ", RowBox[{"Sin", "[", "phicm", "]"}]}], ",", RowBox[{"Cos", "[", "thcm", "]"}]}], "}"}]}], "+", RowBox[{"voverAplus1", " ", "vhat"}]}]}], ";", RowBox[{"vhat", "=", FractionBox["vlab", SqrtBox[ RowBox[{"vlab", ".", "vlab"}]]]}], ";", RowBox[{"cos", "=", RowBox[{"vhat", ".", "vhatold"}]}], ";", RowBox[{"AppendTo", "[", RowBox[{"rlist", ",", RowBox[{"{", RowBox[{ RowBox[{ "r", "\[LeftDoubleBracket]", "1", "\[RightDoubleBracket]"}], ",", RowBox[{ "r", "\[LeftDoubleBracket]", "2", "\[RightDoubleBracket]"}]}], "}"}]}], "]"}]}], "}"}]}], "]"}], ";", RowBox[{"If", "[", RowBox[{ RowBox[{"dPs", "<", "ran", "<", RowBox[{"dPs", "+", "dPa"}]}], ",", RowBox[{"iStop", "=", "1"}]}], "]"}], ";", RowBox[{"r", "=", RowBox[{"r", "+", RowBox[{"ds", " ", "vhat"}]}]}], ";", RowBox[{"rmag", "=", SqrtBox[ RowBox[{"r", ".", "r"}]]}], ";"}], "}"}]}], "]"}], ";"}], "\n", RowBox[{ RowBox[{"AppendTo", "[", RowBox[{"rlist", ",", RowBox[{"{", RowBox[{ RowBox[{"r", "\[LeftDoubleBracket]", "1", "\[RightDoubleBracket]"}], ",", RowBox[{"r", "\[LeftDoubleBracket]", "2", "\[RightDoubleBracket]"}]}], "}"}]}], "]"}], ";"}], "\n", RowBox[{ RowBox[{"rLen", "=", RowBox[{"Length", "[", "rlist", "]"}]}], ";", RowBox[{"vectors", "=", RowBox[{"Table", "[", RowBox[{ RowBox[{"{", RowBox[{ RowBox[{ "rlist", "\[LeftDoubleBracket]", "i", "\[RightDoubleBracket]"}], ",", RowBox[{ RowBox[{"rlist", "\[LeftDoubleBracket]", RowBox[{"i", "+", "1"}], "\[RightDoubleBracket]"}], "-", RowBox[{ "rlist", "\[LeftDoubleBracket]", "i", "\[RightDoubleBracket]"}]}]}], "}"}], ",", RowBox[{"{", RowBox[{"i", ",", "1", ",", RowBox[{"rLen", "-", "1"}]}], "}"}]}], "]"}]}], ";"}], "\n", RowBox[{"If", "[", RowBox[{ RowBox[{ RowBox[{"rLen", "-", "1"}], ">", "0"}], ",", RowBox[{"ListVectorFieldPlot", "[", RowBox[{"vectors", ",", RowBox[{"PlotRange", "\[Rule]", "All"}]}], "]"}], ",", RowBox[{ "Print", "[", "\"\< Absorbed on first step...try again\>\"", "]"}]}], "]"}]}], "Input", CellChangeTimes->{{3.4133103881341133`*^9, 3.4133103946000767`*^9}, { 3.413549600607112*^9, 3.413549601314999*^9}, {3.413550528398616*^9, 3.41355061643857*^9}, {3.4135506673567743`*^9, 3.413550717189559*^9}}, FontSize->9], Cell[BoxData[ GraphicsBox[ {Thickness[Small], Arrowheads[0.02], ArrowBox[{{0., 0.}, {-5.480174225270631, -0.9016552835917925}}], ArrowBox[{{-5.480174225270631, -0.9016552835917925}, \ {-12.223558333212527`, -0.4013840641178953}}], ArrowBox[{{-12.223558333212527`, -0.4013840641178953}, { 1.5126262196193885`, 5.802125535753252}}], ArrowBox[{{1.5126262196193876`, 5.802125535753252}, {0.36994979751131907`, 5.500107562530745}}], ArrowBox[{{0.369949797511319, 5.500107562530745}, {3.8558930161906715`, 9.26928250571162}}], ArrowBox[{{3.8558930161906715`, 9.26928250571162}, {3.3526793042205223`, 12.171845644144192`}}], ArrowBox[{{3.3526793042205223`, 12.171845644144192`}, {9.312473594498092, 19.271206880843046`}}], ArrowBox[{{9.312473594498092, 19.271206880843046`}, {9.426153424702004, 8.109855907216268}}], ArrowBox[{{9.426153424702004, 8.109855907216268}, {0.33369693925505395`, 7.92458757008945}}]}]], "Output", CellChangeTimes->{ 3.4135507236397123`*^9, {3.4137252588796797`*^9, 3.413725261028552*^9}, { 3.414432464745049*^9, 3.414432494178639*^9}}] }, Open ]] }, Open ]], Cell[CellGroupData[{ Cell["\<\ Monte Carlo simulation \tNexp = number of \"experiments\" \tNneutrons= number of neutrons per experiment\ \>", "Subsubsection", CellChangeTimes->{{3.414433586316765*^9, 3.414433599068788*^9}}], Cell[CellGroupData[{ Cell[BoxData[{ RowBox[{ RowBox[{"dt", "=", RowBox[{"5.", " ", RowBox[{"10", "^", RowBox[{"-", "6"}]}]}]}], ";", RowBox[{"ds", "=", " ", RowBox[{"vspeed", " ", "dt"}]}], ";"}], "\[IndentingNewLine]", RowBox[{ RowBox[{"dPs", "=", RowBox[{ RowBox[{ RowBox[{ SubscriptBox["\[CapitalSigma]", "s"], " ", "ds"}], "/.", "data"}], "/.", "Cons"}]}], ";"}], "\[IndentingNewLine]", RowBox[{ RowBox[{ RowBox[{"dPa", "=", RowBox[{ RowBox[{ RowBox[{ RowBox[{"(", RowBox[{ SubscriptBox["\[CapitalSigma]", "\[Gamma]"], "+", SubscriptBox["\[CapitalSigma]", "f"]}], ")"}], " ", "ds"}], "/.", "data"}], "/.", "Cons"}]}], ";"}], "\[IndentingNewLine]"}], "\[IndentingNewLine]", StyleBox[ RowBox[{"Print", "[", RowBox[{ "\"\< For time step of \>\"", ",", "dt", ",", "\"\< sec, and average speed of, v = \>\"", ",", "vspeed", ",", "\"\< cm/s, distance per step = \>\"", ",", "ds", ",", "\"\< cm\>\""}], "]"}], FontColor->RGBColor[1, 0, 0]], "\[IndentingNewLine]", StyleBox[ RowBox[{ "Print", "[", "\"\< The probability of scattering in one time step:\>\"", "]"}], FontColor->RGBColor[1, 0, 0]], "\[IndentingNewLine]", StyleBox[ RowBox[{"Print", "[", RowBox[{ "\"\< Pscatt = \>\"", ",", "dPs", ",", "\"\< Pabs = \>\"", ",", "dPa"}], "]"}], FontColor->RGBColor[1, 0, 0]]}], "Input", CellChangeTimes->{{3.413310627859902*^9, 3.4133106279292307`*^9}, { 3.413312959766466*^9, 3.413312961355466*^9}, {3.413549622511278*^9, 3.413549635622389*^9}, {3.414432506923646*^9, 3.4144325077954597`*^9}, { 3.4144337314067717`*^9, 3.4144337323235817`*^9}}, FontSize->9], Cell[CellGroupData[{ Cell[BoxData[ InterpretationBox[ RowBox[{"\<\" For time step of \"\>", "\[InvisibleSpace]", "4.9999999999999996`*^-6", "\[InvisibleSpace]", "\<\" sec, and average speed of, v = \"\>", "\[InvisibleSpace]", "248061.96338330343`", "\[InvisibleSpace]", "\<\" cm/s, distance per step = \"\>", "\[InvisibleSpace]", "1.240309816916517`", "\[InvisibleSpace]", "\<\" cm\"\>"}], SequenceForm[ " For time step of ", 4.9999999999999996`*^-6, " sec, and average speed of, v = ", 248061.96338330343`, " cm/s, distance per step = ", 1.240309816916517, " cm"], Editable->False]], "Print", CellChangeTimes->{ 3.413309047738244*^9, 3.4133106191733427`*^9, {3.413312956796514*^9, 3.4133129621961193`*^9}, 3.413549637306014*^9, 3.4135507257519827`*^9, 3.4137252881640253`*^9, 3.414432554938114*^9, 3.414433740803759*^9}], Cell[BoxData["\<\" The probability of scattering in one time step:\"\>"], \ "Print", CellChangeTimes->{ 3.413309047738244*^9, 3.4133106191733427`*^9, {3.413312956796514*^9, 3.4133129621961193`*^9}, 3.413549637306014*^9, 3.4135507257519827`*^9, 3.4137252881640253`*^9, 3.414432554938114*^9, 3.414433740810319*^9}], Cell[BoxData[ InterpretationBox[ RowBox[{"\<\" Pscatt = \"\>", "\[InvisibleSpace]", "0.10084959121348198`", "\[InvisibleSpace]", "\<\" Pabs = \"\>", "\[InvisibleSpace]", "0.016706973233865482`"}], SequenceForm[ " Pscatt = ", 0.10084959121348198`, " Pabs = ", 0.016706973233865482`], Editable->False]], "Print", CellChangeTimes->{ 3.413309047738244*^9, 3.4133106191733427`*^9, {3.413312956796514*^9, 3.4133129621961193`*^9}, 3.413549637306014*^9, 3.4135507257519827`*^9, 3.4137252881640253`*^9, 3.414432554938114*^9, 3.414433740816368*^9}] }, Open ]] }, Open ]], Cell[CellGroupData[{ Cell[BoxData[{ RowBox[{"Clear", "[", "LenCos", "]"}], "\[IndentingNewLine]", RowBox[{ RowBox[{"Nexp", "=", "100"}], ";", RowBox[{"Nneutrons", "=", "1000"}], ";"}], "\n", RowBox[{ RowBox[{"Rmax", "=", RowBox[{"4", " ", "L"}]}], ";", RowBox[{"NRbins", "=", "40"}], ";", RowBox[{"dR", "=", FractionBox["Rmax", "NRbins"]}], ";", RowBox[{"NumDen", "=", RowBox[{"Table", "[", RowBox[{"0", ",", RowBox[{"{", RowBox[{"i", ",", "1", ",", RowBox[{"NRbins", "+", "1"}]}], "}"}]}], "]"}]}], ";"}], "\n", RowBox[{ RowBox[{"vcmvalue", "=", RowBox[{"vcm", "[", "Avalue", "]"}]}], ";", RowBox[{"voverAplus1", "=", FractionBox["vspeed", RowBox[{"1", "+", "Avalue"}]]}], ";"}], "\n", RowBox[{"Timing", "[", RowBox[{ RowBox[{"CosAvgTable", "=", RowBox[{"{", "}"}]}], ";", RowBox[{"MFPAvgTable", "=", RowBox[{"{", "}"}]}], ";", RowBox[{"RAvgTable", "=", RowBox[{"{", "}"}]}], ";", RowBox[{"R2AvgTable", "=", RowBox[{"{", "}"}]}], ";", RowBox[{"RAbsAvgTable", "=", RowBox[{"{", "}"}]}], ";", RowBox[{"NAbsAvgTable", "=", RowBox[{"{", "}"}]}], ";", RowBox[{"Do", "[", RowBox[{ RowBox[{ RowBox[{"Rtable", "=", RowBox[{"{", "}"}]}], ";", RowBox[{"MFPtable", "=", RowBox[{"{", "}"}]}], ";", RowBox[{"costable", "=", RowBox[{"{", "}"}]}], ";", RowBox[{"Rabstable", "=", RowBox[{"{", "}"}]}], ";", RowBox[{"nabstable", "=", RowBox[{"{", "}"}]}], ";", RowBox[{"Do", "[", RowBox[{ RowBox[{ RowBox[{"For", "[", RowBox[{ RowBox[{"{", RowBox[{ RowBox[{"vhat", "=", RowBox[{"{", RowBox[{"0", ",", "0", ",", "1"}], "}"}]}], ";", RowBox[{"r", "=", RowBox[{"{", RowBox[{"0", ",", "0", ",", "0"}], "}"}]}], ";", RowBox[{"NoScatt", "=", "0"}], ";", RowBox[{"NoScattList", "=", RowBox[{"{", "}"}]}], ";", RowBox[{"cossum", "=", "0"}], ";", RowBox[{"nscatt", "=", "0"}], ";", RowBox[{"iStep", "=", "1"}], ";", RowBox[{"iStop", "=", RowBox[{"-", "1"}]}]}], "}"}], ",", RowBox[{ RowBox[{"iStop", "<", "0"}], "&&", RowBox[{"iStep", "<", SuperscriptBox["10", "5"]}]}], ",", RowBox[{"iStep", "++"}], ",", RowBox[{"{", RowBox[{ RowBox[{"ran", "=", RowBox[{"RandomReal", "[", "]"}]}], ";", RowBox[{"If", "[", RowBox[{ RowBox[{"ran", ">", RowBox[{"dPs", "+", "dPa"}]}], ",", RowBox[{"NoScatt", "++"}], ",", RowBox[{"If", "[", RowBox[{ RowBox[{"ran", "<", "dPs"}], ",", RowBox[{"{", RowBox[{ RowBox[{"vhatold", "=", "vhat"}], ";", RowBox[{"thcm", "=", RowBox[{"\[Pi]", " ", RowBox[{"RandomReal", "[", "]"}]}]}], ";", RowBox[{"phicm", "=", RowBox[{"2", " ", "\[Pi]", " ", RowBox[{"RandomReal", "[", "]"}]}]}], ";", RowBox[{"vlab", "=", RowBox[{ RowBox[{"vcmvalue", " ", RowBox[{"{", RowBox[{ RowBox[{ RowBox[{"Sin", "[", "thcm", "]"}], " ", RowBox[{"Cos", "[", "phicm", "]"}]}], ",", RowBox[{ RowBox[{"Sin", "[", "thcm", "]"}], " ", RowBox[{"Sin", "[", "phicm", "]"}]}], ",", RowBox[{"Cos", "[", "thcm", "]"}]}], "}"}]}], "+", RowBox[{"voverAplus1", " ", "vhat"}]}]}], ";", RowBox[{"vhat", "=", FractionBox["vlab", SqrtBox[ RowBox[{"vlab", ".", "vlab"}]]]}], ";", RowBox[{"nscatt", "++"}], ";", RowBox[{"cos", "=", RowBox[{"vhat", ".", "vhatold"}]}], ";", RowBox[{"cossum", "=", RowBox[{"cossum", "+", "cos"}]}], ";", RowBox[{"AppendTo", "[", RowBox[{"NoScattList", ",", "NoScatt"}], "]"}], ";", RowBox[{"NoScatt", "=", "0"}]}], "}"}], ",", RowBox[{ RowBox[{"AppendTo", "[", RowBox[{"NoScattList", ",", "NoScatt"}], "]"}], ";", RowBox[{"AppendTo", "[", RowBox[{"nabstable", ",", "iStep"}], "]"}], ";", RowBox[{"AppendTo", "[", RowBox[{"Rabstable", ",", "rmag"}], "]"}], ";", RowBox[{"iStop", "=", "1"}]}]}], "]"}]}], "]"}], ";", RowBox[{"r", "=", RowBox[{"r", "+", RowBox[{"ds", " ", "vhat"}]}]}], ";", RowBox[{"rmag", "=", SqrtBox[ RowBox[{"r", ".", "r"}]]}], ";", RowBox[{"rindex", "=", RowBox[{ RowBox[{"Floor", "[", FractionBox["rmag", "dR"], "]"}], "+", "1"}]}], ";", RowBox[{"If", "[", RowBox[{ RowBox[{"rindex", ">", "NRbins"}], ",", RowBox[{ RowBox[{"NumDen", "\[LeftDoubleBracket]", RowBox[{"NRbins", "+", "1"}], "\[RightDoubleBracket]"}], "++"}], ",", RowBox[{ RowBox[{ "NumDen", "\[LeftDoubleBracket]", "rindex", "\[RightDoubleBracket]"}], "++"}]}], "]"}], ";"}], "}"}]}], "]"}], ";", RowBox[{"If", "[", RowBox[{ RowBox[{"nscatt", ">", "0"}], ",", RowBox[{"AppendTo", "[", RowBox[{"costable", ",", FractionBox["cossum", "nscatt"]}], "]"}]}], "]"}], ";", RowBox[{"AppendTo", "[", RowBox[{"Rtable", ",", SqrtBox[ RowBox[{"r", ".", "r"}]]}], "]"}], ";", RowBox[{"LenNos", "=", RowBox[{"Length", "[", "NoScattList", "]"}]}], ";", RowBox[{"If", "[", RowBox[{ RowBox[{"LenNos", ">", "0"}], ",", RowBox[{"AppendTo", "[", RowBox[{"MFPtable", ",", RowBox[{"N", "[", FractionBox[ RowBox[{"ds", " ", RowBox[{ UnderoverscriptBox["\[Sum]", RowBox[{"i", "=", "1"}], "LenNos"], RowBox[{ "NoScattList", "\[LeftDoubleBracket]", "i", "\[RightDoubleBracket]"}]}]}], "LenNos"], "]"}]}], "]"}]}], "]"}], ";"}], ",", RowBox[{"{", RowBox[{"j", ",", "1", ",", "Nneutrons"}], "}"}]}], "]"}], ";", RowBox[{"LenCos", "=", RowBox[{"Length", "[", "costable", "]"}]}], ";", RowBox[{"AppendTo", "[", RowBox[{"CosAvgTable", ",", RowBox[{"N", "[", FractionBox[ RowBox[{ UnderoverscriptBox["\[Sum]", RowBox[{"i", "=", "1"}], "LenCos"], RowBox[{ "costable", "\[LeftDoubleBracket]", "i", "\[RightDoubleBracket]"}]}], "LenCos"], "]"}]}], "]"}], ";", RowBox[{"LenMFP", "=", RowBox[{"Length", "[", "MFPtable", "]"}]}], ";", RowBox[{"AppendTo", "[", RowBox[{"MFPAvgTable", ",", RowBox[{"N", "[", FractionBox[ RowBox[{ UnderoverscriptBox["\[Sum]", RowBox[{"i", "=", "1"}], "LenMFP"], RowBox[{ "MFPtable", "\[LeftDoubleBracket]", "i", "\[RightDoubleBracket]"}]}], "LenMFP"], "]"}]}], "]"}], ";", RowBox[{"LenR", "=", RowBox[{"Length", "[", "Rtable", "]"}]}], ";", RowBox[{"AppendTo", "[", RowBox[{"RAvgTable", ",", RowBox[{"N", "[", FractionBox[ RowBox[{ UnderoverscriptBox["\[Sum]", RowBox[{"i", "=", "1"}], "LenR"], RowBox[{ "Rtable", "\[LeftDoubleBracket]", "i", "\[RightDoubleBracket]"}]}], "LenR"], "]"}]}], "]"}], ";", RowBox[{"AppendTo", "[", RowBox[{"R2AvgTable", ",", RowBox[{"N", "[", FractionBox[ RowBox[{ UnderoverscriptBox["\[Sum]", RowBox[{"i", "=", "1"}], "LenR"], SuperscriptBox[ RowBox[{ "Rtable", "\[LeftDoubleBracket]", "i", "\[RightDoubleBracket]"}], "2"]}], "LenR"], "]"}]}], "]"}], ";", RowBox[{"LenRabs", "=", RowBox[{"Length", "[", "Rabstable", "]"}]}], ";", RowBox[{"AppendTo", "[", RowBox[{"RAbsAvgTable", ",", FractionBox[ RowBox[{ UnderoverscriptBox["\[Sum]", RowBox[{"i", "=", "1"}], "LenRabs"], RowBox[{ "Rabstable", "\[LeftDoubleBracket]", "i", "\[RightDoubleBracket]"}]}], "LenRabs"]}], "]"}], ";", RowBox[{"LenNabs", "=", RowBox[{"Length", "[", "nabstable", "]"}]}], ";", RowBox[{"AppendTo", "[", RowBox[{"NAbsAvgTable", ",", FractionBox[ RowBox[{ UnderoverscriptBox["\[Sum]", RowBox[{"i", "=", "1"}], "LenNabs"], RowBox[{ "nabstable", "\[LeftDoubleBracket]", "i", "\[RightDoubleBracket]"}]}], "LenNabs"]}], "]"}], ";"}], ",", RowBox[{"{", RowBox[{"iexp", ",", "1", ",", "Nexp"}], "}"}]}], "]"}], ";"}], "]"}]}], "Input", CellChangeTimes->{ 3.4133091358812037`*^9, 3.4133095525052357`*^9, {3.413310643244678*^9, 3.413310646239276*^9}, {3.413312984943351*^9, 3.413312985798883*^9}, { 3.4135496437526627`*^9, 3.413549661882276*^9}, 3.414432500585679*^9, { 3.414433776806246*^9, 3.4144337881606407`*^9}}, FontSize->9], Cell[BoxData[ RowBox[{"{", RowBox[{"287.685074`", ",", "Null"}], "}"}]], "Output", CellChangeTimes->{3.41330905486143*^9, 3.413309165150919*^9, 3.41330986584525*^9, 3.413312552962611*^9, 3.41331333215016*^9, 3.4135496972177677`*^9, 3.413550767298621*^9, 3.413725322494731*^9, 3.4144328479793386`*^9}] }, Open ]] }, Open ]] }, Open ]], Cell[CellGroupData[{ Cell["Calculate averages and deviations", "Subsection"], Cell[CellGroupData[{ Cell[BoxData[ RowBox[{ StyleBox[ RowBox[{"(*", " ", RowBox[{"Cosine", " ", "Avergage"}], " ", "*)"}], FontColor->RGBColor[0, 0, 1]], "\[IndentingNewLine]", RowBox[{ RowBox[{ RowBox[{"muavg", "[", "Avalue", "]"}], ";"}], "\[IndentingNewLine]", RowBox[{ RowBox[{"LenCos", "=", RowBox[{"Length", "[", "CosAvgTable", "]"}]}], ";"}], "\[IndentingNewLine]", RowBox[{ RowBox[{"CosAvg", "=", RowBox[{"N", "[", RowBox[{ RowBox[{"Sum", "[", RowBox[{ RowBox[{"CosAvgTable", "[", RowBox[{"[", "i", "]"}], "]"}], ",", RowBox[{"{", RowBox[{"i", ",", "1", ",", "LenCos"}], "}"}]}], "]"}], "/", "LenCos"}], "]"}]}], ";"}], "\[IndentingNewLine]", RowBox[{ RowBox[{"DelCos", "=", RowBox[{"Sqrt", "[", RowBox[{ RowBox[{"Sum", "[", RowBox[{ RowBox[{ RowBox[{"(", RowBox[{"CosAvg", "-", RowBox[{"CosAvgTable", "[", RowBox[{"[", "i", "]"}], "]"}]}], ")"}], "^", "2"}], ",", RowBox[{"{", RowBox[{"i", ",", "1", ",", "LenCos"}], "}"}]}], "]"}], "/", "LenCos"}], "]"}]}], ";"}], "\[IndentingNewLine]", "\[IndentingNewLine]", StyleBox[ RowBox[{"(*", " ", RowBox[{"Mean", " ", "Free", " ", "Path"}], " ", "*)"}], FontColor->RGBColor[0, 0, 1]], "\[IndentingNewLine]", RowBox[{ RowBox[{"LenMFP", "=", RowBox[{"Length", "[", "MFPAvgTable", "]"}]}], ";"}], "\[IndentingNewLine]", RowBox[{ RowBox[{"MFPavg", "=", RowBox[{"N", "[", RowBox[{ RowBox[{"Sum", "[", RowBox[{ RowBox[{"MFPAvgTable", "[", RowBox[{"[", "i", "]"}], "]"}], ",", RowBox[{"{", RowBox[{"i", ",", "1", ",", "LenMFP"}], "}"}]}], "]"}], "/", "LenMFP"}], "]"}]}], ";"}], "\[IndentingNewLine]", RowBox[{ RowBox[{"DelMFP", "=", RowBox[{"Sqrt", "[", RowBox[{ RowBox[{"Sum", "[", RowBox[{ RowBox[{ RowBox[{"(", RowBox[{ RowBox[{"MFPAvgTable", "[", RowBox[{"[", "i", "]"}], "]"}], "-", "MFPavg"}], ")"}], "^", "2"}], ",", RowBox[{"{", RowBox[{"i", ",", "1", ",", "LenMFP"}], "}"}]}], "]"}], "/", "LenMFP"}], "]"}]}], ";"}], "\[IndentingNewLine]", "\[IndentingNewLine]", StyleBox[ RowBox[{"(*", " ", RowBox[{"Average", " ", "absorption", " ", "radius"}], " ", "*)"}], FontColor->RGBColor[0, 0, 1]], "\[IndentingNewLine]", RowBox[{ RowBox[{"LenR", "=", RowBox[{"Length", "[", "RAvgTable", "]"}]}], ";"}], "\[IndentingNewLine]", RowBox[{ RowBox[{"Ravg", "=", RowBox[{"N", "[", RowBox[{ RowBox[{"Sum", "[", RowBox[{ RowBox[{"RAvgTable", "[", RowBox[{"[", "i", "]"}], "]"}], ",", RowBox[{"{", RowBox[{"i", ",", "1", ",", "LenR"}], "}"}]}], "]"}], "/", "LenR"}], "]"}]}], ";"}], "\[IndentingNewLine]", RowBox[{ RowBox[{"R2avg", "=", RowBox[{"N", "[", RowBox[{ RowBox[{"Sum", "[", RowBox[{ RowBox[{"R2AvgTable", "[", RowBox[{"[", "i", "]"}], "]"}], ",", RowBox[{"{", RowBox[{"i", ",", "1", ",", "LenR"}], "}"}]}], "]"}], "/", "LenR"}], "]"}]}], ";"}], "\[IndentingNewLine]", RowBox[{ RowBox[{"DelR", "=", RowBox[{"Sqrt", "[", RowBox[{ RowBox[{"Sum", "[", RowBox[{ RowBox[{ RowBox[{"(", RowBox[{ RowBox[{"RAvgTable", "[", RowBox[{"[", "i", "]"}], "]"}], "-", "Ravg"}], ")"}], "^", "2"}], ",", RowBox[{"{", RowBox[{"i", ",", "1", ",", "LenR"}], "}"}]}], "]"}], "/", "LenR"}], "]"}]}], ";"}], "\[IndentingNewLine]", "\[IndentingNewLine]", RowBox[{ RowBox[{"LenNabs", "=", RowBox[{"Length", "[", "NAbsAvgTable", "]"}]}], ";", RowBox[{"LenAbs", "=", RowBox[{"Length", "[", "RAbsAvgTable", "]"}]}], ";"}], "\[IndentingNewLine]", RowBox[{ RowBox[{"If", "[", RowBox[{ RowBox[{"LenNabs", ">", "0"}], ",", "\[IndentingNewLine]", RowBox[{"{", RowBox[{ RowBox[{"DisAbs", "=", RowBox[{"ds", " ", RowBox[{ RowBox[{"Sum", "[", RowBox[{ RowBox[{"NAbsAvgTable", "[", RowBox[{"[", "i", "]"}], "]"}], ",", RowBox[{"{", RowBox[{"i", ",", "1", ",", "LenNabs"}], "}"}]}], "]"}], "/", "LenNabs"}]}]}], ";", RowBox[{"Rabsavg", "=", RowBox[{ RowBox[{"Sum", "[", RowBox[{ RowBox[{"RAbsAvgTable", "[", RowBox[{"[", "i", "]"}], "]"}], ",", RowBox[{"{", RowBox[{"i", ",", "1", ",", "LenAbs"}], "}"}]}], "]"}], "/", "LenAbs"}]}], ";", RowBox[{"DelRabs", "=", RowBox[{"Sqrt", "[", RowBox[{ RowBox[{"Sum", "[", RowBox[{ RowBox[{ RowBox[{"(", RowBox[{"Rabsavg", "-", RowBox[{"RAbsAvgTable", "[", RowBox[{"[", "i", "]"}], "]"}]}], ")"}], "^", "2"}], ",", RowBox[{"{", RowBox[{"i", ",", "1", ",", "LenAbs"}], "}"}]}], "]"}], "/", "LenAbs"}], "]"}]}]}], "}"}]}], " ", "]"}], ";"}], "\[IndentingNewLine]", RowBox[{ RowBox[{"Lifetime", "=", RowBox[{"dt", " ", RowBox[{ RowBox[{"Sum", "[", RowBox[{ RowBox[{"NAbsAvgTable", "[", RowBox[{"[", "i", "]"}], "]"}], ",", RowBox[{"{", RowBox[{"i", ",", "1", ",", "LenNabs"}], "}"}]}], "]"}], "/", "LenNabs"}]}]}], ";"}], "\[IndentingNewLine]", "\[IndentingNewLine]", StyleBox[ RowBox[{"(*", " ", RowBox[{"Print", " ", "Monte", " ", "Carlo", " ", "results"}], " ", "*)"}], FontColor->RGBColor[0, 0, 1]], "\[IndentingNewLine]", StyleBox[ RowBox[{"Print", "[", RowBox[{ "\"\< Avg of cosine of scattering angle = \>\"", ",", "CosAvg", ",", "\"\< +/- \>\"", ",", "DelCos", ",", "\"\< Analytic value = \>\"", ",", RowBox[{"N", "[", RowBox[{"muavg", "[", "Avalue", "]"}], "]"}]}], "]"}], FontColor->RGBColor[1, 0, 0]], StyleBox["\[IndentingNewLine]", FontColor->RGBColor[1, 0, 0]], StyleBox[ RowBox[{"Print", "[", RowBox[{ "\"\< Mean Free Path: (Monte Carlo) = \>\"", ",", "MFPavg", ",", "\"\< +/- \>\"", ",", "DelMFP", ",", "\"\< (Analytic) = \>\"", ",", RowBox[{ RowBox[{"1", "/", RowBox[{"(", RowBox[{ SubscriptBox["\[CapitalSigma]", "\[Gamma]"], "+", SubscriptBox["\[CapitalSigma]", "s"]}], ")"}]}], "/.", "data"}], ",", "\"\< cm\>\""}], "]"}], FontColor->RGBColor[1, 0, 0]], StyleBox["\[IndentingNewLine]", FontColor->RGBColor[1, 0, 0]], StyleBox[ RowBox[{"Print", "[", RowBox[{ "\"\< Average radius of the neutron distribution = \>\"", ",", "Ravg", ",", "\"\< +/- \>\"", ",", "DelR", ",", "\"\< cm (analytic) = \>\"", ",", RowBox[{"2", " ", "L"}], ",", "\"\< cm\>\""}], "]"}], FontColor->RGBColor[1, 0, 0]], StyleBox["\[IndentingNewLine]", FontColor->RGBColor[1, 0, 0]], StyleBox[ RowBox[{"Print", "[", RowBox[{"\"\< RMS radius = \>\"", ",", RowBox[{"Sqrt", "[", "R2avg", "]"}], ",", "\"\< cm (analytic) = \>\"", ",", RowBox[{ RowBox[{"Sqrt", "[", "6", "]"}], " ", "L"}], ",", "\"\< cm\>\""}], "]"}], FontColor->RGBColor[1, 0, 0]], StyleBox[" ", FontColor->RGBColor[1, 0, 0]], StyleBox["\n", FontColor->RGBColor[1, 0, 0]], StyleBox[ RowBox[{"Print", "[", RowBox[{"\"\< Lifetime = \>\"", ",", "Lifetime"}], "]"}], FontColor->RGBColor[1, 0, 0]], StyleBox["\[IndentingNewLine]", FontColor->RGBColor[1, 0, 0]], StyleBox[ RowBox[{"Print", "[", RowBox[{ "\"\< Average total distance traveled before absorption = \>\"", ",", "DisAbs", ",", "\"\< cm\>\""}], "]"}], FontColor->RGBColor[1, 0, 0]], StyleBox["\[IndentingNewLine]", FontColor->RGBColor[1, 0, 0]], StyleBox[ RowBox[{"Print", "[", RowBox[{ "\"\< Average radius value at absorption = \>\"", ",", "Rabsavg", ",", "\"\< +/_ \>\"", ",", "DelRabs", ",", "\"\< cm\>\""}], "]"}], FontColor->RGBColor[1, 0, 0]], StyleBox["\[IndentingNewLine]", FontColor->RGBColor[1, 0, 0]], StyleBox[ RowBox[{"Print", "[", RowBox[{"\"\< Flux diffusion constant D(flux) = \>\"", ",", RowBox[{"MFP", "/", "3"}], ",", "\"\< +/_ \>\"", ",", RowBox[{"DelMFP", "/", "3"}], ",", "\"\< \!\(\*SuperscriptBox[\(cm\), \(-1\)]\)\>\""}], "]"}], FontColor->RGBColor[1, 0, 0]], StyleBox["\[IndentingNewLine]", FontColor->RGBColor[1, 0, 0]], StyleBox[ RowBox[{"Print", "[", RowBox[{"\"\< Density Diffusion Constant D(density) = \>\"", ",", RowBox[{"R2avg", "/", RowBox[{"(", RowBox[{"6", " ", "Lifetime"}], ")"}]}], ",", "\"\< \!\(\*SuperscriptBox[\(cm\), \(2\)]\)/s (Analytic) = \>\"", ",", "DiffTh", ",", "\"\< \!\(\*SuperscriptBox[\(cm\), \(2\)]\)/s\>\""}], "]"}], FontColor->RGBColor[1, 0, 0]]}]}]], "Input", FontSize->9], Cell[CellGroupData[{ Cell[BoxData[ InterpretationBox[ RowBox[{"\<\" Avg of cosine of scattering angle = \"\>", "\[InvisibleSpace]", "0.0472910833457001`", "\[InvisibleSpace]", "\<\" +/- \"\>", "\[InvisibleSpace]", "0.013404654281772456`", "\[InvisibleSpace]", "\<\" Analytic value = \"\>", "\[InvisibleSpace]", "0.05555555555555555`"}], SequenceForm[ " Avg of cosine of scattering angle = ", 0.0472910833457001, " +/- ", 0.013404654281772456`, " Analytic value = ", 0.05555555555555555], Editable->False]], "Print", CellChangeTimes->{3.41330906128563*^9, 3.4133091721365*^9, 3.413309882537689*^9, 3.413312553077284*^9, 3.413313332330614*^9, 3.413549707686565*^9, 3.413550767439169*^9, 3.413725327573113*^9, 3.414432848121108*^9}], Cell[BoxData[ InterpretationBox[ RowBox[{"\<\" Mean Free Path: (Monte Carlo) = \"\>", "\[InvisibleSpace]", "9.30533123297754`", "\[InvisibleSpace]", "\<\" +/- \"\>", "\[InvisibleSpace]", "0.17601934215004544`", "\[InvisibleSpace]", "\<\" (Analytic) = \"\>", "\[InvisibleSpace]", "10.550749103186327`", "\[InvisibleSpace]", "\<\" cm\"\>"}], SequenceForm[ " Mean Free Path: (Monte Carlo) = ", 9.30533123297754, " +/- ", 0.17601934215004544`, " (Analytic) = ", 10.550749103186327`, " cm"], Editable->False]], "Print", CellChangeTimes->{3.41330906128563*^9, 3.4133091721365*^9, 3.413309882537689*^9, 3.413312553077284*^9, 3.413313332330614*^9, 3.413549707686565*^9, 3.413550767439169*^9, 3.413725327573113*^9, 3.414432848129447*^9}], Cell[BoxData[ InterpretationBox[ RowBox[{"\<\" Average radius of the neutron distribution = \"\>", "\[InvisibleSpace]", "30.798300736313365`", "\[InvisibleSpace]", "\<\" +/- \"\>", "\[InvisibleSpace]", "0.8534358924658415`", "\[InvisibleSpace]", "\<\" cm (analytic) = \"\>", "\[InvisibleSpace]", "33.11549286917178`", "\[InvisibleSpace]", "\<\" cm\"\>"}], SequenceForm[ " Average radius of the neutron distribution = ", 30.798300736313365`, " +/- ", 0.8534358924658415, " cm (analytic) = ", 33.11549286917178, " cm"], Editable->False]], "Print", CellChangeTimes->{3.41330906128563*^9, 3.4133091721365*^9, 3.413309882537689*^9, 3.413312553077284*^9, 3.413313332330614*^9, 3.413549707686565*^9, 3.413550767439169*^9, 3.413725327573113*^9, 3.41443284813444*^9}], Cell[BoxData[ InterpretationBox[ RowBox[{"\<\" RMS radius = \"\>", "\[InvisibleSpace]", "39.11402144256564`", "\[InvisibleSpace]", "\<\" cm (analytic) = \"\>", "\[InvisibleSpace]", "40.55803005512288`", "\[InvisibleSpace]", "\<\" cm\"\>"}], SequenceForm[ " RMS radius = ", 39.11402144256564, " cm (analytic) = ", 40.55803005512288, " cm"], Editable->False]], "Print", CellChangeTimes->{3.41330906128563*^9, 3.4133091721365*^9, 3.413309882537689*^9, 3.413312553077284*^9, 3.413313332330614*^9, 3.413549707686565*^9, 3.413550767439169*^9, 3.413725327573113*^9, 3.414432848139598*^9}], Cell[BoxData[ InterpretationBox[ RowBox[{"\<\" Lifetime = \"\>", "\[InvisibleSpace]", "0.00029849069999999996`"}], SequenceForm[" Lifetime = ", 0.00029849069999999996`], Editable->False]], "Print", CellChangeTimes->{3.41330906128563*^9, 3.4133091721365*^9, 3.413309882537689*^9, 3.413312553077284*^9, 3.413313332330614*^9, 3.413549707686565*^9, 3.413550767439169*^9, 3.413725327573113*^9, 3.4144328481443453`*^9}], Cell[BoxData[ InterpretationBox[ RowBox[{"\<\" Average total distance traveled before absorption = \"\>", "\[InvisibleSpace]", "74.0441890936566`", "\[InvisibleSpace]", "\<\" cm\"\>"}], SequenceForm[ " Average total distance traveled before absorption = ", 74.0441890936566, " cm"], Editable->False]], "Print", CellChangeTimes->{3.41330906128563*^9, 3.4133091721365*^9, 3.413309882537689*^9, 3.413312553077284*^9, 3.413313332330614*^9, 3.413549707686565*^9, 3.413550767439169*^9, 3.413725327573113*^9, 3.4144328481489973`*^9}], Cell[BoxData[ InterpretationBox[ RowBox[{"\<\" Average radius value at absorption = \"\>", "\[InvisibleSpace]", "30.774059075856655`", "\[InvisibleSpace]", "\<\" +/_ \"\>", "\[InvisibleSpace]", "0.8344946035707403`", "\[InvisibleSpace]", "\<\" cm\"\>"}], SequenceForm[ " Average radius value at absorption = ", 30.774059075856655`, " +/_ ", 0.8344946035707403, " cm"], Editable->False]], "Print", CellChangeTimes->{3.41330906128563*^9, 3.4133091721365*^9, 3.413309882537689*^9, 3.413312553077284*^9, 3.413313332330614*^9, 3.413549707686565*^9, 3.413550767439169*^9, 3.413725327573113*^9, 3.414432848153788*^9}], Cell[BoxData[ InterpretationBox[ RowBox[{"\<\" Flux diffusion constant D(flux) = \"\>", "\[InvisibleSpace]", "4.099536752346985`", "\[InvisibleSpace]", "\<\" +/_ \"\>", "\[InvisibleSpace]", "0.05867311405001514`", "\[InvisibleSpace]", "\<\" \\!\\(\\*SuperscriptBox[\\(cm\\), \ \\(-1\\)]\\)\"\>"}], SequenceForm[ " Flux diffusion constant D(flux) = ", 4.099536752346985, " +/_ ", 0.05867311405001514, " \!\(\*SuperscriptBox[\(cm\), \(-1\)]\)"], Editable->False]], "Print", CellChangeTimes->{3.41330906128563*^9, 3.4133091721365*^9, 3.413309882537689*^9, 3.413312553077284*^9, 3.413313332330614*^9, 3.413549707686565*^9, 3.413550767439169*^9, 3.413725327573113*^9, 3.414432848158514*^9}], Cell[BoxData[ InterpretationBox[ RowBox[{"\<\" Density Diffusion Constant D(density) = \"\>", "\[InvisibleSpace]", "854245.8628300562`", "\[InvisibleSpace]", "\<\" \\!\\(\\*SuperscriptBox[\\(cm\\), \\(2\\)]\\)/s \ (Analytic) = \"\>", "\[InvisibleSpace]", "916073.3046720505`", "\[InvisibleSpace]", "\<\" \\!\\(\\*SuperscriptBox[\\(cm\\), \\(2\\)]\\)/s\ \"\>"}], SequenceForm[ " Density Diffusion Constant D(density) = ", 854245.8628300562, " \!\(\*SuperscriptBox[\(cm\), \(2\)]\)/s (Analytic) = ", 916073.3046720505, " \!\(\*SuperscriptBox[\(cm\), \(2\)]\)/s"], Editable->False]], "Print", CellChangeTimes->{3.41330906128563*^9, 3.4133091721365*^9, 3.413309882537689*^9, 3.413312553077284*^9, 3.413313332330614*^9, 3.413549707686565*^9, 3.413550767439169*^9, 3.413725327573113*^9, 3.41443284816357*^9}] }, Open ]] }, Open ]] }, Open ]], Cell[CellGroupData[{ Cell["Plot results", "Subsection"], Cell[CellGroupData[{ Cell[BoxData[{ RowBox[{ RowBox[{"PhiTable", "=", RowBox[{"Table", "[", RowBox[{ RowBox[{"If", "[", RowBox[{ RowBox[{ RowBox[{ "NumDen", "\[LeftDoubleBracket]", "i", "\[RightDoubleBracket]"}], "\[Equal]", "0"}], ",", FractionBox["1", SuperscriptBox["Rmax", "2"]], ",", FractionBox[ RowBox[{ "NumDen", "\[LeftDoubleBracket]", "i", "\[RightDoubleBracket]"}], SuperscriptBox[ RowBox[{"(", RowBox[{"i", " ", "dR"}], ")"}], "2"]]}], "]"}], ",", RowBox[{"{", RowBox[{"i", ",", "1", ",", "NRbins"}], "}"}]}], "]"}]}], ";"}], "\n", RowBox[{ RowBox[{"RPhiTable", "=", RowBox[{"Table", "[", RowBox[{ RowBox[{"i", " ", "dR", " ", RowBox[{ "PhiTable", "\[LeftDoubleBracket]", "i", "\[RightDoubleBracket]"}]}], ",", RowBox[{"{", RowBox[{"i", ",", "3", ",", "NRbins"}], "}"}]}], "]"}]}], ";"}], "\n", RowBox[{ RowBox[{"LogRPhiTable", "=", RowBox[{"Table", "[", RowBox[{ RowBox[{"Log", "[", RowBox[{ "RPhiTable", "\[LeftDoubleBracket]", "i", "\[RightDoubleBracket]"}], "]"}], ",", RowBox[{"{", RowBox[{"i", ",", "1", ",", RowBox[{"Length", "[", "RPhiTable", "]"}]}], "}"}]}], "]"}]}], ";"}], "\n", RowBox[{ RowBox[{ RowBox[{"PhiFit", "[", "x_", "]"}], "=", RowBox[{"Fit", "[", RowBox[{"LogRPhiTable", ",", RowBox[{"{", RowBox[{"1", ",", "x"}], "}"}], ",", "x"}], "]"}]}], ";"}], "\n", RowBox[{ RowBox[{"LFit", "=", RowBox[{"-", FractionBox["dR", RowBox[{ RowBox[{"PhiFit", "[", "1", "]"}], "-", RowBox[{"PhiFit", "[", "0", "]"}]}]]}]}], ";", RowBox[{"LMC", "=", FractionBox["Ravg", "2"]}], ";"}], "\n", RowBox[{"Print", "[", RowBox[{ "\"\< Diffusion Length Monte Carlo L = \>\"", ",", "LMC", ",", "\"\< cm\>\""}], "]"}], "\n", RowBox[{"Print", "[", RowBox[{ "\"\< Fit to simulation data L = \>\"", ",", "LFit", ",", "\"\< cm\>\""}], "]"}], "\n", RowBox[{"Print", "[", RowBox[{ "\"\< Diffusion L = \>\"", ",", "L", ",", "\"\< cm\>\""}], "]"}], "\n", RowBox[{"Print", "[", RowBox[{ "\"\< Diffusion-alt L = \>\"", ",", "LAlt", ",", "\"\< cm\>\""}], "]"}], "\n", RowBox[{ RowBox[{"horizaxis", "=", RowBox[{"Style", "[", RowBox[{"\"\\"", ",", RowBox[{"FontFamily", "\[Rule]", "\"\\""}], ",", RowBox[{"FontColor", "\[Rule]", "Blue"}], ",", RowBox[{"FontWeight", "\[Rule]", "Bold"}], ",", RowBox[{"FontSize", "\[Rule]", "12"}]}], "]"}]}], ";"}], "\n", RowBox[{ RowBox[{"vertaxis", "=", RowBox[{"Style", "[", RowBox[{"\"\\"", ",", RowBox[{"FontFamily", "\[Rule]", "\"\\""}], ",", RowBox[{"FontColor", "\[Rule]", "Blue"}], ",", RowBox[{"FontWeight", "\[Rule]", "Bold"}], ",", RowBox[{"FontSize", "\[Rule]", "12"}]}], "]"}]}], ";"}], "\n", RowBox[{ RowBox[{"plotname", "=", RowBox[{"Style", "[", RowBox[{"\"\\"", ",", RowBox[{"FontFamily", "\[Rule]", "\"\\""}], ",", RowBox[{"FontColor", "\[Rule]", "Black"}], ",", RowBox[{"FontWeight", "\[Rule]", "Bold"}], ",", RowBox[{"FontSize", "\[Rule]", "14"}]}], "]"}]}], ";"}], "\n", RowBox[{ RowBox[{"p1", "=", RowBox[{"ListPlot", "[", RowBox[{"LogRPhiTable", ",", RowBox[{"DisplayFunction", "\[Rule]", "Identity"}], ",", RowBox[{"PlotStyle", "\[Rule]", RowBox[{"{", RowBox[{ RowBox[{"RGBColor", "[", RowBox[{"1", ",", "0", ",", "0"}], "]"}], ",", RowBox[{"PointSize", "[", "0.02`", "]"}]}], "}"}]}], ",", RowBox[{"Frame", "\[Rule]", "True"}], ",", RowBox[{"GridLines", "\[Rule]", "Automatic"}], ",", RowBox[{"PlotLabel", "\[Rule]", "plotname"}], ",", RowBox[{"FrameLabel", "\[Rule]", RowBox[{"{", RowBox[{"horizaxis", ",", "vertaxis"}], "}"}]}], ",", RowBox[{"ImageSize", "\[Rule]", "400"}], ",", RowBox[{"Background", "\[Rule]", "LightOrange"}], ",", RowBox[{"PlotRange", "\[Rule]", "All"}]}], "]"}]}], ";"}], "\n", RowBox[{ RowBox[{"p2", "=", RowBox[{"Plot", "[", RowBox[{ RowBox[{"PhiFit", "[", "x", "]"}], ",", RowBox[{"{", RowBox[{"x", ",", "0", ",", "NRbins"}], "}"}], ",", RowBox[{"DisplayFunction", "\[Rule]", "Identity"}], ",", RowBox[{"PlotStyle", "\[Rule]", RowBox[{"{", RowBox[{"Blue", ",", RowBox[{"Thickness", "[", "0.005`", "]"}]}], "}"}]}], ",", RowBox[{"Frame", "\[Rule]", "True"}], ",", RowBox[{"GridLines", "\[Rule]", "Automatic"}], ",", RowBox[{"PlotLabel", "\[Rule]", "plotname"}], ",", RowBox[{"FrameLabel", "\[Rule]", RowBox[{"{", RowBox[{"horizaxis", ",", "vertaxis"}], "}"}]}], ",", RowBox[{"ImageSize", "\[Rule]", "400"}], ",", RowBox[{"Background", "\[Rule]", "LightOrange"}], ",", RowBox[{"PlotRange", "\[Rule]", "All"}]}], "]"}]}], ";"}], "\n", RowBox[{"Show", "[", RowBox[{"p1", ",", "p2", ",", RowBox[{"DisplayFunction", "\[Rule]", "$DisplayFunction"}]}], "]"}]}], "Input", CellChangeTimes->{{3.413309208847226*^9, 3.413309223019351*^9}, { 3.413310107628203*^9, 3.41331010931439*^9}, {3.413313713966856*^9, 3.413313714354775*^9}, {3.413549347471631*^9, 3.413549348172371*^9}, { 3.413549725827221*^9, 3.413549736398734*^9}, {3.41354978337409*^9, 3.413549959761169*^9}, {3.413550760764286*^9, 3.41355078988527*^9}, 3.414432380833632*^9}, FontSize->9], Cell[CellGroupData[{ Cell[BoxData[ InterpretationBox[ RowBox[{"\<\" Diffusion Length Monte Carlo L = \"\>", "\[InvisibleSpace]", "15.399150368156683`", "\[InvisibleSpace]", "\<\" cm\"\>"}], SequenceForm[ " Diffusion Length Monte Carlo L = ", 15.399150368156683`, " cm"], Editable->False]], "Print", CellChangeTimes->{{3.413309198435302*^9, 3.413309224344549*^9}, 3.413309888072332*^9, 3.413310111648395*^9, 3.413312553208617*^9, 3.413313332851987*^9, 3.4133137155576878`*^9, {3.413549720247369*^9, 3.413549737875482*^9}, 3.4135498072009974`*^9, {3.413549890041284*^9, 3.413549960209032*^9}, {3.413550771918695*^9, 3.413550792085622*^9}, 3.413725337013051*^9, 3.414432848470739*^9}], Cell[BoxData[ InterpretationBox[ RowBox[{"\<\" Fit to simulation data L = \"\>", "\[InvisibleSpace]", "15.597278615745036`", "\[InvisibleSpace]", "\<\" cm\"\>"}], SequenceForm[ " Fit to simulation data L = ", 15.597278615745036`, " cm"], Editable->False]], "Print", CellChangeTimes->{{3.413309198435302*^9, 3.413309224344549*^9}, 3.413309888072332*^9, 3.413310111648395*^9, 3.413312553208617*^9, 3.413313332851987*^9, 3.4133137155576878`*^9, {3.413549720247369*^9, 3.413549737875482*^9}, 3.4135498072009974`*^9, {3.413549890041284*^9, 3.413549960209032*^9}, {3.413550771918695*^9, 3.413550792085622*^9}, 3.413725337013051*^9, 3.414432848501096*^9}], Cell[BoxData[ InterpretationBox[ RowBox[{"\<\" Diffusion L = \"\>", "\[InvisibleSpace]", "16.55774643458589`", "\[InvisibleSpace]", "\<\" cm\"\>"}], SequenceForm[ " Diffusion L = ", 16.55774643458589, " cm"], Editable->False]], "Print", CellChangeTimes->{{3.413309198435302*^9, 3.413309224344549*^9}, 3.413309888072332*^9, 3.413310111648395*^9, 3.413312553208617*^9, 3.413313332851987*^9, 3.4133137155576878`*^9, {3.413549720247369*^9, 3.413549737875482*^9}, 3.4135498072009974`*^9, {3.413549890041284*^9, 3.413549960209032*^9}, {3.413550771918695*^9, 3.413550792085622*^9}, 3.413725337013051*^9, 3.414432848542392*^9}], Cell[BoxData[ InterpretationBox[ RowBox[{"\<\" Diffusion-alt L = \"\>", "\[InvisibleSpace]", "15.71516194517996`", "\[InvisibleSpace]", "\<\" cm\"\>"}], SequenceForm[ " Diffusion-alt L = ", 15.71516194517996, " cm"], Editable->False]], "Print", CellChangeTimes->{{3.413309198435302*^9, 3.413309224344549*^9}, 3.413309888072332*^9, 3.413310111648395*^9, 3.413312553208617*^9, 3.413313332851987*^9, 3.4133137155576878`*^9, {3.413549720247369*^9, 3.413549737875482*^9}, 3.4135498072009974`*^9, {3.413549890041284*^9, 3.413549960209032*^9}, {3.413550771918695*^9, 3.413550792085622*^9}, 3.413725337013051*^9, 3.4144328485925837`*^9}] }, Open ]], Cell[BoxData[ GraphicsBox[{{{}, {RGBColor[1, 0, 0], PointSize[0.02], PointBox[{{1., 10.799859545528259`}, {2., 10.214340011536244`}, {3., 10.052048857499708`}, {4., 10.129504992689963`}, {5., 9.779043494538879}, {6., 9.65622235950376}, {7., 9.68148603045173}, {8., 9.42351112327048}, {9., 9.321826911399468}, {10., 9.302689334792376}, { 11., 9.097983551844964}, {12., 8.997653012391536}, {13., 8.960620600932337}, {14., 8.792925483092834}, {15., 8.689667002351475}, {16., 8.637691446026544}, {17., 8.488131402145733}, {18., 8.391949532981084}, {19., 8.31591706327043}, { 20., 8.179070209734915}, {21., 8.086998660800116}, {22., 8.00735039123211}, {23., 7.895428152748552}, {24., 7.791202743576083}, { 25., 7.705573446792246}, {26., 7.593255149559785}, {27., 7.490060925549803}, {28., 7.409093544959756}, {29., 7.298296369421571}, {30., 7.199909028794739}, {31., 7.118261552370958}, {32., 7.005887884400657}, {33., 6.913517339587129}, {34., 6.812094628361154}, {35., 6.717191691907117}, {36., 6.615920091407484}, {37., 6.533434374209829}, {38., 6.428959113120488}}]}, {}}, {{}, {}, {RGBColor[0, 0, 1], Thickness[0.005], LineBox[CompressedData[" 1:eJwV02s01Hkcx/HJpQuSpBqXMf+Z+ZdyGaZVQsyHcbbLaE5txrUthkblFie2 UrvO0CIsx9ro5q5yim7TRk3jkgqhi2ptw6lRsqUOqals0f72we98z+uc74P3 98HvhwQZZxuDwdAjT/L/9D4TJZgu+/kE6Cax5xzZMmE2FeRP9baBVpdnfmgo Fx6hqHT1rW+gr+sePpljKqylDNl5zWRfVR5ffW1E2Mj+FJfsFQu6UVfpMb9a 2MEeK9r+pRe0snxWVMd84d/st3aDmhmgaz/8ddV5QviKPZJY1lkBuqh0d9Rk s/Bffqwm+1w9aHmoesBKDf2kN0fuC6NBe9q9pI/nYFa98vnSoXjQZt1fzuZe gtnKp3YZHCPwBge4gVP+mBdeYX/H7DfwrkwuuvdQiQVd+k0BGhl42b96xDnm wsouQZZxMxG8sH+81o43gbWWuclk1wXwBGE2H1ktoIJcXsekVoCn7za7rdMV nDcfNn4tU4Dbx9PINCng7VPhWS8D3LpXxT5h87DIPmCPfPdicNOYUb6bKSy+ bhxYrHsBrjTY1LxlCksSCw/sHFoHrh2jw7BWDHtbW4eCFxJwJhRJK6fG4VDX nia78RqcuxafPRt3wmmriPV4Lh+cCrP8cN1G8N/3R+iERuCksPSlh2fBRcr9 FPp2NTirC7NiG1wgcAydFtXaB47lsy9tay5CoKO2tGVdBjUK8Yi3AZb19DxL NpSDaplZ56q8he+OmlxOTYoE9Yd2ZH1BMFwj/Hscop1BxRQtPPnED8vdk40d ze+C8jon5dZUYIW+4zFF/TVQ5pqEuEfdWDHQtcF+WirY7drlV0x74aaMX7Ov 3wjsuOs75kmasXJ/WRHn5BDYzGuBpsESuEsbDSyXFMFWlbNNEqWCBxVxW360 ALbyA3wnjw54DJv0/FgUCltzqjf3bQ481WUTNX6fwfrz8DFBFR+rMlv3+A49 ByuCb5PM3QWviG5rgVclWAbFTZPVhfB2ip6bfLAONvU8Fj0WAG+dvjhSmgmb kPDAbmYnhN2ZtRX9y2E9mXDxqh8XEHfXHVtaAutT5e3fuzOBRnFJXvMvsF5X zVjoMgofurNGar0eVqMhFjsM98Mne27Y7XgfWB11HgypOg0fXRctsymDlVff g3w/JXzDJIdP3aBhOVy1P/LcVviqH9i3OhXA8ndKr+FjM0T2HfcN3sth6RZ/ ZpMPA6L8bGr8ggxM7dPZuQFaiL6q0md2toN5kFNoFFNJ3FGgFcUSL0gdnVFD /Li0UWVGbLytt6qWeOzqzrpgMDN07sc15yGapN915Q8Tt2udxU3EeeEF0unE u1wCHPohmtrivfCpCMx0dc+JN0ziGPFY0EviSw2KLBbxnpD2e4eIT1dG0xRx YfLelgfEhSkum+2Ib53VVJPedDmrtWsFRN+crct2pBHPjh0+G0C8aulPgzSx XmDXmiDitW4bQsk9ik84/yKMOHLTNH/Sr9Ba7LORERcfiuSXEStVJrmJxNUl nqd8iWtr3i1JIb5w0oJN+hSl+Y/a9hLfablJ/gNTkRVZ+jWNuO/uiWzSpziw Pr0kg3hoIEUvhTjJbbtrFvH4iCTVijia438vh/jbxOL3auLNxoLY/P8A27Eg pg== "]]}}}, AspectRatio->NCache[GoldenRatio^(-1), 0.6180339887498948], Axes->True, AxesOrigin->{0, 7.}, Background->RGBColor[1, 0.9, 0.8], DisplayFunction->Identity, Frame->True, FrameLabel->{ FormBox[ StyleBox[ "\"r (dR units)\"", FontFamily -> "Tahoma", FontColor -> RGBColor[0, 0, 1], FontWeight -> Bold, FontSize -> 12, StripOnInput -> False], TraditionalForm], FormBox[ StyleBox[ "\"Log [r \[CurlyPhi]]\"", FontFamily -> "Tahoma", FontColor -> RGBColor[0, 0, 1], FontWeight -> Bold, FontSize -> 12, StripOnInput -> False], TraditionalForm]}, GridLines->Automatic, ImageSize->400, PlotLabel->FormBox[ StyleBox[ "\"Fit to Log[r \[CurlyPhi]]\"", FontFamily -> "Tahoma", FontColor -> GrayLevel[0], FontWeight -> Bold, FontSize -> 14, StripOnInput -> False], TraditionalForm], PlotRange->{All, All}, PlotRangeClipping->True, PlotRangePadding->{Automatic, Automatic}]], "Output", CellChangeTimes->{ 3.413309224368301*^9, 3.413309888197554*^9, 3.4133101117407637`*^9, 3.413312553292547*^9, 3.413313332952446*^9, 3.413313715650332*^9, { 3.413549720397347*^9, 3.41354973790112*^9}, 3.413549807296183*^9, { 3.413549890079123*^9, 3.413549960406427*^9}, {3.413550772702117*^9, 3.413550792106982*^9}, 3.413725337481431*^9, 3.414432848654502*^9}] }, Open ]], Cell[CellGroupData[{ Cell[BoxData[{ RowBox[{ RowBox[{"norm", "=", RowBox[{ UnderoverscriptBox["\[Sum]", RowBox[{"i", "=", "1"}], "NRbins"], RowBox[{ "NumDen", "\[LeftDoubleBracket]", "i", "\[RightDoubleBracket]"}]}]}], ";", RowBox[{"DenNormed", "=", RowBox[{"Table", "[", RowBox[{ RowBox[{"N", "[", FractionBox[ RowBox[{ "NumDen", "\[LeftDoubleBracket]", "i", "\[RightDoubleBracket]"}], "norm"], "]"}], ",", RowBox[{"{", RowBox[{"i", ",", "1", ",", "NRbins"}], "}"}]}], "]"}]}], ";", RowBox[{ RowBox[{"ShellVol", "[", "iR_", "]"}], "=", RowBox[{ SuperscriptBox["dR", "3"], " ", "4", " ", "\[Pi]", " ", SuperscriptBox["iR", "2"]}]}], ";", RowBox[{"PhiMCTable", "=", RowBox[{"Table", "[", RowBox[{ RowBox[{"{", RowBox[{ RowBox[{ RowBox[{"(", RowBox[{"i", "-", FractionBox["1", "2"]}], ")"}], " ", "dR"}], ",", FractionBox[ RowBox[{ "DenNormed", "\[LeftDoubleBracket]", "i", "\[RightDoubleBracket]"}], RowBox[{"ShellVol", "[", "i", "]"}]]}], "}"}], ",", RowBox[{"{", RowBox[{"i", ",", "1", ",", "NRbins"}], "}"}]}], "]"}]}], ";"}], "\n", RowBox[{ RowBox[{ RowBox[{"Phi", "[", "x_", "]"}], "=", FractionBox[ SuperscriptBox["\[ExponentialE]", RowBox[{"-", FractionBox["x", "LD"]}]], "x"]}], ";", RowBox[{"norm", "=", RowBox[{"4", " ", "\[Pi]", " ", RowBox[{ SubsuperscriptBox["\[Integral]", "0", "\[Infinity]"], RowBox[{ RowBox[{ RowBox[{"Phi", "[", "x", "]"}], " ", SuperscriptBox["x", "2"]}], RowBox[{"\[DifferentialD]", "x"}]}]}]}]}], ";", RowBox[{ RowBox[{"Phi0", "[", "x_", "]"}], "=", RowBox[{ FractionBox[ RowBox[{"Phi", "[", "x", "]"}], "norm"], "/.", "\[InvisibleSpace]", RowBox[{"LD", "\[Rule]", "L"}]}]}], ";"}], "\n", RowBox[{ RowBox[{"PhiAnalyticTable", "=", RowBox[{"Table", "[", RowBox[{ RowBox[{"{", RowBox[{ RowBox[{ RowBox[{"(", RowBox[{"i", "-", FractionBox["1", "2"]}], ")"}], " ", "dR"}], ",", RowBox[{"Phi0", "[", RowBox[{ RowBox[{"(", RowBox[{"i", "-", FractionBox["1", "2"]}], ")"}], " ", "dR"}], "]"}]}], "}"}], ",", RowBox[{"{", RowBox[{"i", ",", "1", ",", "NRbins"}], "}"}]}], "]"}]}], ";"}], "\n", RowBox[{ RowBox[{"horizaxis", "=", RowBox[{"Style", "[", RowBox[{"\"\\"", ",", RowBox[{"FontFamily", "\[Rule]", "\"\\""}], ",", RowBox[{"FontColor", "\[Rule]", "Blue"}], ",", RowBox[{"FontWeight", "\[Rule]", "Bold"}], ",", RowBox[{"FontSize", "\[Rule]", "12"}]}], "]"}]}], ";"}], "\n", RowBox[{ RowBox[{"vertaxis", "=", RowBox[{"Style", "[", RowBox[{"\"\<\[CurlyPhi]\>\"", ",", RowBox[{"FontFamily", "\[Rule]", "\"\\""}], ",", RowBox[{"FontColor", "\[Rule]", "Blue"}], ",", RowBox[{"FontWeight", "\[Rule]", "Bold"}], ",", RowBox[{"FontSize", "\[Rule]", "12"}]}], "]"}]}], ";"}], "\n", RowBox[{ RowBox[{"plotname", "=", RowBox[{"Style", "[", RowBox[{"\"\\"", ",", RowBox[{"FontFamily", "\[Rule]", "\"\\""}], ",", RowBox[{"FontColor", "\[Rule]", "Black"}], ",", RowBox[{"FontWeight", "\[Rule]", "Bold"}], ",", RowBox[{"FontSize", "\[Rule]", "14"}]}], "]"}]}], ";"}], "\n", RowBox[{ RowBox[{"p1", "=", RowBox[{"ListPlot", "[", RowBox[{"PhiMCTable", ",", RowBox[{"DisplayFunction", "\[Rule]", "Identity"}], ",", RowBox[{"PlotStyle", "\[Rule]", RowBox[{"{", RowBox[{ RowBox[{"RGBColor", "[", RowBox[{"1", ",", "0", ",", "0"}], "]"}], ",", RowBox[{"PointSize", "[", "0.02`", "]"}]}], "}"}]}], ",", RowBox[{"Frame", "\[Rule]", "True"}], ",", RowBox[{"GridLines", "\[Rule]", "Automatic"}], ",", RowBox[{"PlotLabel", "\[Rule]", "plotname"}], ",", RowBox[{"FrameLabel", "\[Rule]", RowBox[{"{", RowBox[{"horizaxis", ",", "vertaxis"}], "}"}]}], ",", RowBox[{"ImageSize", "\[Rule]", "400"}], ",", RowBox[{"Background", "\[Rule]", "LightOrange"}], ",", RowBox[{"PlotRange", "\[Rule]", "All"}]}], "]"}]}], ";"}], "\n", RowBox[{ RowBox[{"p2", "=", RowBox[{"ListPlot", "[", RowBox[{"PhiAnalyticTable", ",", RowBox[{"Joined", "\[Rule]", "True"}], ",", RowBox[{"DisplayFunction", "\[Rule]", "Identity"}], ",", RowBox[{"PlotStyle", "\[Rule]", RowBox[{"{", RowBox[{"Blue", ",", RowBox[{"Thickness", "[", "0.004`", "]"}]}], "}"}]}], ",", RowBox[{"Frame", "\[Rule]", "True"}], ",", RowBox[{"GridLines", "\[Rule]", "Automatic"}], ",", RowBox[{"PlotLabel", "\[Rule]", "plotname"}], ",", RowBox[{"FrameLabel", "\[Rule]", RowBox[{"{", RowBox[{"horizaxis", ",", "vertaxis"}], "}"}]}], ",", RowBox[{"ImageSize", "\[Rule]", "400"}], ",", RowBox[{"Background", "\[Rule]", "LightOrange"}], ",", RowBox[{"PlotRange", "\[Rule]", "All"}]}], "]"}]}], ";"}], "\n", RowBox[{"Show", "[", RowBox[{"p1", ",", "p2", ",", RowBox[{"DisplayFunction", "\[Rule]", "$DisplayFunction"}]}], "]"}]}], "Input", CellChangeTimes->{{3.413309907817254*^9, 3.413309909829019*^9}, { 3.413549349104273*^9, 3.413549349854519*^9}, {3.414432351143445*^9, 3.4144323690303583`*^9}}, FontSize->9], Cell[BoxData[ GraphicsBox[{{{}, {RGBColor[1, 0, 0], PointSize[0.02], PointBox[{{0.8278873217292946, 0.00038347400232474805`}, { 2.483661965187884, 0.00011803497637798587`}, {4.139436608646473, 0.00008698422531350901}, {5.795211252105062, 0.000036325689021996145`}, {7.450985895563651, 0.000024707095564171437`}, {9.10676053902224, 0.00002224739783597243}, { 10.76253518248083, 0.000013431636707286555`}, {12.418309825939419`, 0.000010394328750335728`}, {14.074084469398008`, 9.475798105904793*^-6}, {15.729859112856596`, 6.589026128490921*^-6}, { 17.385633756315187`, 5.410876885238301*^-6}, {19.041408399773776`, 4.86595118337385*^-6}, {20.697183043232364`, 3.6601851058461798`*^-6}, { 22.352957686690953`, 3.074293780166832*^-6}, {24.00873233014954, 2.7650256924291245`*^-6}, {25.66450697360813, 2.1920042062022572`*^-6}, {27.320281617066723`, 1.8606635760423682`*^-6}, {28.97605626052531, 1.668290109295313*^-6}, { 30.6318309039839, 1.3609349817225902`*^-6}, {32.28760554744249, 1.174328842520819*^-6}, {33.94338019090108, 1.0365253943248328`*^-6}, { 35.599154834359666`, 8.628687229988324*^-7}, {37.25492947781826, 7.527545794513781*^-7}, {38.910704121276844`, 6.661609892866421*^-7}, { 40.566478764735436`, 5.717987729717186*^-7}, {42.22225340819402, 4.953878601737075*^-7}, {43.87802805165261, 4.37891598128978*^-7}, { 45.5338026951112, 3.773923813336616*^-7}, {47.18957733856979, 3.286521516636881*^-7}, {48.84535198202838, 2.929877998457676*^-7}, { 50.50112662548697, 2.537993441199844*^-7}, {52.15690126894556, 2.2282972885996112`*^-7}, {53.812675912404146`, 1.991361570424103*^-7}, {55.46845055586274, 1.7273561108358215`*^-7}, { 57.12422519932132, 1.5299482299693408`*^-7}, {58.779999842779915`, 1.3439866513466015`*^-7}, {60.43577448623851, 1.1892684847104559`*^-7}, {62.09154912969709, 1.0464448392771822`*^-7}, {63.747323773155685`, 9.388846490265861*^-8}, {65.40309841661427, 8.246009382540806*^-8}}]}, {}}, {{}, {}, {RGBColor[0, 0, 1], Thickness[0.004], LineBox[{{0.8278873217292946, 0.0003335045205254609}, {2.483661965187884, 0.00010058912308519291`}, {4.139436608646473, 0.00005461008144894438}, {5.795211252105062, 0.00003529517506928306}, { 7.450985895563651, 0.000024839418394635646`}, {9.10676053902224, 0.00001838915607740485}, {10.76253518248083, 0.000014079320119564}, { 12.418309825939419`, 0.000011040896242729624`}, {14.074084469398008`, 8.814896513889177*^-6}, {15.729859112856596`, 7.1364641806309644`*^-6}, {17.385633756315187`, 5.842355078050303*^-6}, {19.041408399773776`, 4.826696137631242*^-6}, { 20.697183043232364`, 4.0179852491529204`*^-6}, {22.352957686690953`, 3.366317961620464*^-6}, {24.00873233014954, 2.8359035249096493`*^-6}, { 25.66450697360813, 2.400481195970045*^-6}, {27.320281617066723`, 2.0404061039262917`*^-6}, {28.97605626052531, 1.740736602774536*^-6}, { 30.6318309039839, 1.4899439583711344`*^-6}, {32.28760554744249, 1.2790207856282082`*^-6}, {33.94338019090108, 1.1008519206342426`*^-6}, {35.599154834359666`, 9.497621485993312*^-7}, {37.25492947781826, 8.211856489408191*^-7}, { 38.910704121276844`, 7.114208000895909*^-7}, {40.566478764735436`, 6.17445867649728*^-7}, {42.22225340819402, 5.36778786439147*^-7}, { 43.87802805165261, 4.673693224543723*^-7}, {45.5338026951112, 4.075153145988727*^-7}, {47.18957733856979, 3.557970312095889*^-7}, { 48.84535198202838, 3.110252986894748*^-7}, {50.50112662548697, 2.72200202694964*^-7}, {52.15690126894556, 2.384779784812371*^-7}, { 53.812675912404146`, 2.0914429682101628`*^-7}, {55.46845055586274, 1.8359258297926653`*^-7}, {57.12422519932132, 1.6130632458674373`*^-7}, {58.779999842779915`, 1.4184456168146242`*^-7}, {60.43577448623851, 1.248299308733572*^-7}, { 62.09154912969709, 1.0993877121585439`*^-7}, {63.747323773155685`, 9.689290313863609*^-8}, {65.40309841661427, 8.545277178799786*^-8}}]}}}, AspectRatio->NCache[GoldenRatio^(-1), 0.6180339887498948], Axes->True, AxesOrigin->{0, 0}, Background->RGBColor[1, 0.9, 0.8], DisplayFunction->Identity, Frame->True, FrameLabel->{ FormBox[ StyleBox[ "\"r (cm)\"", FontFamily -> "Tahoma", FontColor -> RGBColor[0, 0, 1], FontWeight -> Bold, FontSize -> 12, StripOnInput -> False], TraditionalForm], FormBox[ StyleBox[ "\"\[CurlyPhi]\"", FontFamily -> "Tahoma", FontColor -> RGBColor[0, 0, 1], FontWeight -> Bold, FontSize -> 12, StripOnInput -> False], TraditionalForm]}, GridLines->Automatic, ImageSize->400, PlotLabel->FormBox[ StyleBox[ "\"Neutron Flux\"", FontFamily -> "Tahoma", FontColor -> GrayLevel[0], FontWeight -> Bold, FontSize -> 14, StripOnInput -> False], TraditionalForm], PlotRange->{All, All}, PlotRangeClipping->True, PlotRangePadding->{Automatic, Automatic}]], "Output", CellChangeTimes->{{3.413309889878911*^9, 3.413309910747203*^9}, 3.413312554696587*^9, 3.413313333293944*^9, 3.4135499774762907`*^9, 3.413550773143282*^9, 3.414432850245253*^9}] }, Closed]] }, Open ]] }, Open ]], Cell[CellGroupData[{ Cell["Task 2: Criticality for the infinite reactor", "Section"], Cell[TextData[{ StyleBox["Task 2.", FontWeight->"Bold"], " Consider an infinite homogeneous mix of fissile ", Cell[BoxData[ FormBox[ RowBox[{ SuperscriptBox["\[InvisiblePrefixScriptBase]", "235"], "U"}], TraditionalForm]]], " (10% by weight) and sodium (90% by weight) at room temperature. (a) First \ find the composition average values for the macroscopic scattering, \ absorption, and fission cross sections. (b) Develop a Monte Carlo simulation \ for this reactor to estimate the neutron multiplication factor, ", Cell[BoxData[ SubscriptBox["k", "\[Infinity]"]], TextAlignment->-0.5], ", and compare with the expected analytic result," }], "Text"], Cell[BoxData[ RowBox[{ SubscriptBox["k", "\[Infinity]"], "=", RowBox[{ FractionBox[ RowBox[{"\[Nu]", " ", SubscriptBox["\[CapitalSigma]", "f"]}], SubscriptBox["\[CapitalSigma]", "a"]], "."}]}]], "NumberedEquation", TextAlignment->-0.5], Cell["\<\ Track the neutron locations and plot the Monte Carlo modeled flux as a \ function of radius (suitably binned and normalized).\ \>", "Text"], Cell[CellGroupData[{ Cell[TextData[{ "Calculate the macroscopic cross sections for the mixture (10% 235U, 99% Na) \ (by weight) and analytic value of ", Cell[BoxData[ SubscriptBox["k", "\[Infinity]"]], "Input"], "." }], "Subsubsection"], Cell[CellGroupData[{ Cell[BoxData[{ RowBox[{ RowBox[{ RowBox[{"Clear", "[", RowBox[{ "soln", ",", "massNa", ",", "nNa", ",", "massU", ",", "nU", ",", "VNa", ",", "VU", ",", "Mix"}], "]"}], "\[IndentingNewLine]"}], RowBox[{"(*", " ", RowBox[{"Thermal", " ", "neutron", " ", "values"}], " ", "*)"}]}], "\[IndentingNewLine]", RowBox[{ RowBox[{"Nadata", "=", RowBox[{"{", RowBox[{ RowBox[{"\[Rho]", "\[Rule]", ".00097"}], ",", RowBox[{ SubscriptBox["n", "d"], "\[Rule]", ".02541"}], ",", RowBox[{ SubscriptBox["\[CapitalSigma]", "s"], "\[Rule]", ".08131"}], ",", RowBox[{ SubscriptBox["\[CapitalSigma]", "\[Gamma]"], "\[Rule]", ".01347"}], " ", ",", RowBox[{ SubscriptBox["\[CapitalSigma]", "f"], "\[Rule]", "0"}], ",", RowBox[{"\[Nu]", "\[Rule]", "0"}]}], "}"}]}], ";"}], "\[IndentingNewLine]", RowBox[{ RowBox[{"U235data", "=", RowBox[{"{", RowBox[{ RowBox[{"\[Rho]", "\[Rule]", ".01886"}], ",", RowBox[{ SubscriptBox["n", "d"], "\[Rule]", ".04833"}], ",", RowBox[{ SubscriptBox["\[CapitalSigma]", "s"], "\[Rule]", ".01588"}], ",", RowBox[{ SubscriptBox["\[CapitalSigma]", "\[Gamma]"], "\[Rule]", "4.833"}], ",", RowBox[{ SubscriptBox["\[CapitalSigma]", "f"], "->", " ", "28.37"}], ",", RowBox[{"\[Nu]", "\[Rule]", "2.42"}]}], "}"}]}], ";"}], "\[IndentingNewLine]", RowBox[{ RowBox[{"VNa", "=", RowBox[{ RowBox[{"1", "/", SubscriptBox["n", "d"]}], "/.", "Nadata"}]}], ";", RowBox[{"VU", "=", RowBox[{ RowBox[{"1", "/", SubscriptBox["n", "d"]}], "/.", "U235data"}]}], ";"}], "\[IndentingNewLine]", RowBox[{ RowBox[{"amu", "=", RowBox[{"1.67", " ", RowBox[{"10", "^", RowBox[{"-", "27"}]}]}]}], ";", RowBox[{"rhoNa", "=", RowBox[{"\[Rho]", "/.", "Nadata"}]}], ";", RowBox[{"rhoU", "=", RowBox[{"\[Rho]", "/.", "U235data"}]}], ";"}], "\[IndentingNewLine]", RowBox[{ RowBox[{"Mix", "=", ".1"}], ";"}], "\[IndentingNewLine]", RowBox[{ RowBox[{"soln", "=", RowBox[{"Flatten", "[", RowBox[{"Solve", "[", RowBox[{ RowBox[{"{", RowBox[{ RowBox[{ RowBox[{"nNa", " ", "massNa", " ", "Mix"}], "\[Equal]", RowBox[{ RowBox[{"(", RowBox[{"1", "-", "Mix"}], ")"}], " ", "massU", " ", "nU"}]}], ",", RowBox[{ RowBox[{ RowBox[{"nNa", " ", "VNa"}], "+", RowBox[{"nU", " ", "VU"}]}], "==", "1"}]}], "}"}], ",", RowBox[{"{", RowBox[{"nNa", ",", "nU"}], "}"}]}], "]"}], "]"}]}], ";"}], "\[IndentingNewLine]", RowBox[{ RowBox[{"NdenNa", "=", RowBox[{ RowBox[{"(", RowBox[{ RowBox[{"(", RowBox[{"nNa", "/.", "soln"}], ")"}], "/.", RowBox[{"{", RowBox[{ RowBox[{"VNa", "\[Rule]", RowBox[{"massNa", "/", "rhoNa"}]}], ",", RowBox[{"VU", "\[Rule]", RowBox[{"massU", "/", "rhoU"}]}]}], "}"}]}], ")"}], "/.", RowBox[{"{", RowBox[{ RowBox[{"massU", "\[Rule]", RowBox[{"235", " ", "amu"}]}], ",", RowBox[{"massNa", "\[Rule]", RowBox[{"23", " ", "amu"}]}]}], "}"}]}]}], ";"}], "\[IndentingNewLine]", RowBox[{ RowBox[{ RowBox[{"NdenU", "=", RowBox[{ RowBox[{"(", RowBox[{ RowBox[{"(", RowBox[{"nU", "/.", "soln"}], ")"}], "/.", RowBox[{"{", RowBox[{ RowBox[{"VNa", "\[Rule]", RowBox[{"massNa", "/", "rhoNa"}]}], ",", RowBox[{"VU", "\[Rule]", RowBox[{"massU", "/", "rhoU"}]}]}], "}"}]}], ")"}], "/.", RowBox[{"{", RowBox[{ RowBox[{"massU", "\[Rule]", RowBox[{"235", " ", "amu"}]}], ",", RowBox[{"massNa", "\[Rule]", RowBox[{"23", " ", "amu"}]}]}], "}"}]}]}], ";"}], "\[IndentingNewLine]", RowBox[{"(*", " ", "check", " ", "*)"}]}], "\[IndentingNewLine]", RowBox[{ RowBox[{ RowBox[{ RowBox[{"NdenNa", " ", RowBox[{"massNa", "/", RowBox[{"(", RowBox[{"NdenU", " ", "massU"}], ")"}]}]}], "/.", RowBox[{"{", RowBox[{ RowBox[{"massU", "\[Rule]", RowBox[{"235", " ", "amu"}]}], ",", RowBox[{"massNa", "\[Rule]", RowBox[{"23", " ", "amu"}]}]}], "}"}]}], ";"}], "\[IndentingNewLine]"}], "\[IndentingNewLine]", RowBox[{"Print", "[", RowBox[{ "\"\< Number density of Sodium = \>\"", ",", "NdenNa", ",", "\"\< (10^24/cm^3)\>\""}], "]"}], "\[IndentingNewLine]", RowBox[{"Print", "[", RowBox[{ "\"\< Number density of Uranium = \>\"", ",", "NdenU", " ", ",", "\"\< (10^24/cm^3)\>\""}], "]"}], "\[IndentingNewLine]", RowBox[{ RowBox[{"SigGMix", "=", RowBox[{ RowBox[{"(", RowBox[{ RowBox[{ RowBox[{"(", RowBox[{"NdenNa", "/", SubscriptBox["n", "d"]}], ")"}], " ", SubscriptBox["\[CapitalSigma]", "\[Gamma]"]}], "/.", "Nadata"}], ")"}], "+", RowBox[{"(", RowBox[{ RowBox[{ RowBox[{"(", RowBox[{"NdenU", "/", SubscriptBox["n", "d"]}], ")"}], " ", SubscriptBox["\[CapitalSigma]", "\[Gamma]"]}], "/.", "U235data"}], ")"}]}]}], ";"}], "\[IndentingNewLine]", RowBox[{ RowBox[{"SigSMix", "=", RowBox[{ RowBox[{"(", RowBox[{ RowBox[{ RowBox[{"(", RowBox[{"NdenNa", "/", SubscriptBox["n", "d"]}], ")"}], " ", SubscriptBox["\[CapitalSigma]", "s"]}], "/.", "Nadata"}], ")"}], "+", RowBox[{"(", RowBox[{ RowBox[{ RowBox[{"(", RowBox[{"NdenU", "/", SubscriptBox["n", "d"]}], ")"}], " ", SubscriptBox["\[CapitalSigma]", "s"]}], "/.", "U235data"}], ")"}]}]}], ";"}], "\[IndentingNewLine]", RowBox[{ RowBox[{"SigFMix", "=", RowBox[{ RowBox[{"(", RowBox[{ RowBox[{ RowBox[{"(", RowBox[{"NdenNa", "/", SubscriptBox["n", "d"]}], ")"}], " ", SubscriptBox["\[CapitalSigma]", "f"]}], "/.", "Nadata"}], ")"}], "+", RowBox[{"(", RowBox[{ RowBox[{ RowBox[{"(", RowBox[{"NdenU", "/", SubscriptBox["n", "d"]}], ")"}], " ", SubscriptBox["\[CapitalSigma]", "f"]}], "/.", "U235data"}], ")"}]}]}], ";"}], "\[IndentingNewLine]", RowBox[{ RowBox[{"NdenMix", "=", RowBox[{"NdenNa", "+", "NdenU"}]}], ";"}], "\[IndentingNewLine]", RowBox[{ RowBox[{"rhoMix", "=", RowBox[{"(", RowBox[{ RowBox[{"NdenNa", " ", "23", " ", "amu"}], "+", RowBox[{"NdenU", " ", "235", " ", "amu"}]}], ")"}]}], ";"}], "\[IndentingNewLine]", RowBox[{ RowBox[{"etaMix", "=", RowBox[{"\[Nu]", "/.", "U235data"}]}], ";"}], "\[IndentingNewLine]", RowBox[{"data", "=", RowBox[{"{", RowBox[{ RowBox[{"\[Rho]", "\[Rule]", "rhoMix"}], ",", RowBox[{ SubscriptBox["n", "d"], "\[Rule]", "NdenMix"}], ",", RowBox[{ SubscriptBox["\[CapitalSigma]", "s"], "\[Rule]", "SigSMix"}], ",", RowBox[{ SubscriptBox["\[CapitalSigma]", "\[Gamma]"], "\[Rule]", "SigGMix"}], ",", RowBox[{ SubscriptBox["\[CapitalSigma]", "f"], "\[Rule]", "SigFMix"}], ",", RowBox[{"\[Nu]", "\[Rule]", "etaMix"}]}], "}"}]}], "\[IndentingNewLine]", RowBox[{ RowBox[{"kinf", "=", RowBox[{ RowBox[{"(", RowBox[{"\[Nu]", " ", RowBox[{ SubscriptBox["\[CapitalSigma]", "f"], "/", RowBox[{"(", RowBox[{ SubscriptBox["\[CapitalSigma]", "f"], "+", SubscriptBox["\[CapitalSigma]", "\[Gamma]"]}], ")"}]}]}], ")"}], "/.", "data"}]}], ";"}], "\[IndentingNewLine]", RowBox[{"Print", "[", RowBox[{ "\"\< \!\(\*SubscriptBox[\(k\), \(\[Infinity]\)]\) (Analytic) = \>\"", ",", "kinf"}], "]"}]}], "Input", FontSize->9], Cell[CellGroupData[{ Cell[BoxData[ InterpretationBox[ RowBox[{"\<\" Number density of Sodium = \"\>", "\[InvisibleSpace]", "0.025265544528249247`", "\[InvisibleSpace]", "\<\" (10^24/cm^3)\"\>"}], SequenceForm[ " Number density of Sodium = ", 0.025265544528249247`, " (10^24/cm^3)"], Editable->False]], "Print"], Cell[BoxData[ InterpretationBox[ RowBox[{"\<\" Number density of Uranium = \"\>", "\[InvisibleSpace]", "0.0002747553305672495`", "\[InvisibleSpace]", "\<\" (10^24/cm^3)\"\>"}], SequenceForm[ " Number density of Uranium = ", 0.0002747553305672495, " (10^24/cm^3)"], Editable->False]], "Print"] }, Open ]], Cell[BoxData[ RowBox[{"{", RowBox[{ RowBox[{"\[Rho]", "\[Rule]", "1.0782772948111707`*^-27"}], ",", RowBox[{ SubscriptBox["n", "d"], "\[Rule]", "0.025540299858816496`"}], ",", RowBox[{ SubscriptBox["\[CapitalSigma]", "s"], "\[Rule]", "0.08093803142398064`"}], ",", RowBox[{ SubscriptBox["\[CapitalSigma]", "\[Gamma]"], "\[Rule]", "0.04086895630723725`"}], ",", RowBox[{ SubscriptBox["\[CapitalSigma]", "f"], "\[Rule]", "0.1612830276886586`"}], ",", RowBox[{"\[Nu]", "\[Rule]", "2.42`"}]}], "}"}]], "Output"], Cell[BoxData[ InterpretationBox[ RowBox[{"\<\" \\!\\(k\\_\[Infinity]\\) (Analytic) = \"\>", "\[InvisibleSpace]", "1.9307499203889975`"}], SequenceForm[" \!\(k\_\[Infinity]\) (Analytic) = ", 1.9307499203889975`], Editable->False]], "Print"] }, Open ]] }, Open ]], Cell[CellGroupData[{ Cell["Analytic diffusion properties", "Subsubsection"], Cell[CellGroupData[{ Cell[BoxData[{ RowBox[{ RowBox[{ RowBox[{"muavg", "[", "A_", "]"}], "=", RowBox[{"2", "/", RowBox[{"(", RowBox[{"3", " ", "A"}], ")"}]}]}], ";"}], "\[IndentingNewLine]", RowBox[{ RowBox[{"Avalue", "=", "23"}], ";"}], "\[IndentingNewLine]", RowBox[{ RowBox[{ SubscriptBox["\[CapitalSigma]", "a"], "=", RowBox[{ RowBox[{"(", RowBox[{ SubscriptBox["\[CapitalSigma]", "\[Gamma]"], "+", SubscriptBox["\[CapitalSigma]", "f"]}], ")"}], "/.", "data"}]}], ";"}], "\[IndentingNewLine]", RowBox[{ RowBox[{"MFP", "=", RowBox[{ RowBox[{"1", "/", SubscriptBox["\[CapitalSigma]", "s"]}], "/.", "data"}]}], ";"}], "\[IndentingNewLine]", RowBox[{ RowBox[{"MFPabs", "=", RowBox[{