Add last factor of four-factor formula to arithmetic notebook

This commit is contained in:
Paul Romano 2015-08-10 13:52:41 +07:00
parent 0d75cbf8c1
commit d9c6bcb887

View file

@ -495,12 +495,9 @@
"source": [
"# Fast Fission Factor tallies\n",
"therm_fiss_rate = openmc.Tally(name='therm. fiss. rate')\n",
"tot_fiss_rate = openmc.Tally(name='tot. fiss. rate')\n",
"therm_fiss_rate.add_score('fission')\n",
"tot_fiss_rate.add_score('fission')\n",
"therm_fiss_rate.add_score('nu-fission')\n",
"therm_fiss_rate.add_filter(openmc.Filter(type='energy', bins=[0., 0.625]))\n",
"tallies_file.add_tally(therm_fiss_rate)\n",
"tallies_file.add_tally(tot_fiss_rate)"
"tallies_file.add_tally(therm_fiss_rate)"
]
},
{
@ -572,7 +569,7 @@
" Copyright: 2011-2015 Massachusetts Institute of Technology\n",
" License: http://mit-crpg.github.io/openmc/license.html\n",
" Version: 0.6.2\n",
" Date/Time: 2015-08-10 13:21:32\n",
" Date/Time: 2015-08-10 13:51:02\n",
" MPI Processes: 4\n",
"\n",
" ===========================================================================\n",
@ -628,20 +625,20 @@
"\n",
" =======================> TIMING STATISTICS <=======================\n",
"\n",
" Total time for initialization = 1.4260E+00 seconds\n",
" Reading cross sections = 3.8800E-01 seconds\n",
" Total time in simulation = 9.0700E+00 seconds\n",
" Time in transport only = 8.3270E+00 seconds\n",
" Time in inactive batches = 1.4110E+00 seconds\n",
" Time in active batches = 7.6590E+00 seconds\n",
" Time synchronizing fission bank = 6.7300E-01 seconds\n",
" Sampling source sites = 1.1000E-02 seconds\n",
" SEND/RECV source sites = 2.0000E-03 seconds\n",
" Time accumulating tallies = 1.0000E-03 seconds\n",
" Total time for initialization = 1.0760E+00 seconds\n",
" Reading cross sections = 3.6600E-01 seconds\n",
" Total time in simulation = 1.0001E+01 seconds\n",
" Time in transport only = 9.0020E+00 seconds\n",
" Time in inactive batches = 1.7190E+00 seconds\n",
" Time in active batches = 8.2820E+00 seconds\n",
" Time synchronizing fission bank = 8.8400E-01 seconds\n",
" Sampling source sites = 3.7000E-02 seconds\n",
" SEND/RECV source sites = 0.0000E+00 seconds\n",
" Time accumulating tallies = 1.6000E-02 seconds\n",
" Total time for finalization = 2.0000E-03 seconds\n",
" Total time elapsed = 1.0500E+01 seconds\n",
" Calculation Rate (inactive) = 8858.97 neutrons/second\n",
" Calculation Rate (active) = 4896.20 neutrons/second\n",
" Total time elapsed = 1.1089E+01 seconds\n",
" Calculation Rate (inactive) = 7271.67 neutrons/second\n",
" Calculation Rate (active) = 4527.89 neutrons/second\n",
"\n",
" ============================> RESULTS <============================\n",
"\n",
@ -795,7 +792,7 @@
"source": [
"Notice that even though the neutron production rate and absorption rate are separate tallies, we still get a first-order estimate of the uncertainty on the quotient of them automatically!\n",
"\n",
"Now, let's analyze of few of the classic factors in the four-factor formula, starting with the resonance escape probability, which we'll define as $$p=\\frac{\\langle\\Sigma_a\\phi\\rangle_T}{\\langle\\Sigma_a\\phi\\rangle}$$ where the subscript $T$ means thermal energies."
"Now, let's analyze the classic factors in the four-factor formula, starting with the resonance escape probability, which we'll define as $$p=\\frac{\\langle\\Sigma_a\\phi\\rangle_T}{\\langle\\Sigma_a\\phi\\rangle}$$ where the subscript $T$ means thermal energies."
]
},
{
@ -861,7 +858,7 @@
"metadata": {},
"source": [
"The fast fission factor can be calculated as\n",
"$$\\epsilon=\\frac{\\langle\\Sigma_f\\phi\\rangle}{\\langle\\Sigma_f\\phi\\rangle_T}$$"
"$$\\epsilon=\\frac{\\langle\\nu\\Sigma_f\\phi\\rangle}{\\langle\\nu\\Sigma_f\\phi\\rangle_T}$$"
]
},
{
@ -896,18 +893,18 @@
" <tr>\n",
" <th>0</th>\n",
" <td>total</td>\n",
" <td>fission</td>\n",
" <td>1.080124</td>\n",
" <td>0.008126</td>\n",
" <td>nu-fission</td>\n",
" <td>1.09144</td>\n",
" <td>0.008201</td>\n",
" </tr>\n",
" </tbody>\n",
"</table>\n",
"</div>"
],
"text/plain": [
" nuclide score mean std. dev.\n",
"bin \n",
"0 total fission 1.080124 0.008126"
" nuclide score mean std. dev.\n",
"bin \n",
"0 total nu-fission 1.09144 0.008201"
]
},
"execution_count": 28,
@ -918,8 +915,7 @@
"source": [
"# Compute fast fission factor factor using tally arithmetic\n",
"therm_fiss_rate = sp.get_tally(name='therm. fiss. rate')\n",
"tot_fiss_rate = sp.get_tally(name='tot. fiss. rate')\n",
"fast_fiss = tot_fiss_rate / therm_fiss_rate\n",
"fast_fiss = fiss_rate / therm_fiss_rate\n",
"fast_fiss.get_pandas_dataframe()"
]
},
@ -1000,12 +996,86 @@
"cell_type": "markdown",
"metadata": {},
"source": [
"Let's move on to a more complicated example now. Before we set up tallies to get reaction rates in the fuel and moderator in two energy groups for two different nuclides. We can use tally arithmetic to divide each of these reaction rates by the flux to get microscopic multi-group cross sections."
"The final factor is the number of fission neutrons produced per absorption in fuel, calculated as $$\\eta = \\frac{\\langle \\nu\\Sigma_f\\phi \\rangle_T}{\\langle \\Sigma_a \\phi \\rangle^F_T}$$"
]
},
{
"cell_type": "code",
"execution_count": 30,
"metadata": {
"collapsed": false
},
"outputs": [
{
"data": {
"text/html": [
"<div style=\"max-height:1000px;max-width:1500px;overflow:auto;\">\n",
"<table border=\"1\" class=\"dataframe\">\n",
" <thead>\n",
" <tr style=\"text-align: right;\">\n",
" <th></th>\n",
" <th>energy [MeV]</th>\n",
" <th>cell</th>\n",
" <th>nuclide</th>\n",
" <th>score</th>\n",
" <th>mean</th>\n",
" <th>std. dev.</th>\n",
" </tr>\n",
" <tr>\n",
" <th>bin</th>\n",
" <th></th>\n",
" <th></th>\n",
" <th></th>\n",
" <th></th>\n",
" <th></th>\n",
" <th></th>\n",
" </tr>\n",
" </thead>\n",
" <tbody>\n",
" <tr>\n",
" <th>0</th>\n",
" <td>0.0e+00 - 6.2e-01</td>\n",
" <td>10000</td>\n",
" <td>total</td>\n",
" <td>(nu-fission / absorption)</td>\n",
" <td>1.241103</td>\n",
" <td>0.008414</td>\n",
" </tr>\n",
" </tbody>\n",
"</table>\n",
"</div>"
],
"text/plain": [
" energy [MeV] cell nuclide score mean \\\n",
"bin \n",
"0 0.0e+00 - 6.2e-01 10000 total (nu-fission / absorption) 1.241103 \n",
"\n",
" std. dev. \n",
"bin \n",
"0 0.008414 "
]
},
"execution_count": 30,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"# Compute neutrons produced per absorption (eta) using tally arithmetic\n",
"eta = therm_fiss_rate / fuel_therm_abs_rate\n",
"eta.get_pandas_dataframe()"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"Let's move on to a more complicated example now. Before we set up tallies to get reaction rates in the fuel and moderator in two energy groups for two different nuclides. We can use tally arithmetic to divide each of these reaction rates by the flux to get microscopic multi-group cross sections."
]
},
{
"cell_type": "code",
"execution_count": 31,
"metadata": {
"collapsed": false,
"scrolled": true
@ -1021,7 +1091,7 @@
},
{
"cell_type": "code",
"execution_count": 31,
"execution_count": 32,
"metadata": {
"collapsed": false
},
@ -1152,7 +1222,7 @@
"7 1.274353e-05 "
]
},
"execution_count": 31,
"execution_count": 32,
"metadata": {},
"output_type": "execute_result"
}
@ -1171,7 +1241,7 @@
},
{
"cell_type": "code",
"execution_count": 32,
"execution_count": 33,
"metadata": {
"collapsed": false
},
@ -1203,7 +1273,7 @@
},
{
"cell_type": "code",
"execution_count": 33,
"execution_count": 34,
"metadata": {
"collapsed": false
},
@ -1227,7 +1297,7 @@
},
{
"cell_type": "code",
"execution_count": 34,
"execution_count": 35,
"metadata": {
"collapsed": false
},
@ -1258,7 +1328,7 @@
},
{
"cell_type": "code",
"execution_count": 35,
"execution_count": 36,
"metadata": {
"collapsed": false
},
@ -1338,7 +1408,7 @@
"3 10000 6.3e-07 - 2.0e+01 U-235 nu-fission 0.093265 4.590785e-04"
]
},
"execution_count": 35,
"execution_count": 36,
"metadata": {},
"output_type": "execute_result"
}
@ -1351,7 +1421,7 @@
},
{
"cell_type": "code",
"execution_count": 36,
"execution_count": 37,
"metadata": {
"collapsed": false
},
@ -1481,7 +1551,7 @@
"8 10002 1.9e+00 - 2.0e+01 H-1 scatter 0.377400 0.004341"
]
},
"execution_count": 36,
"execution_count": 37,
"metadata": {},
"output_type": "execute_result"
}