diff --git a/.nojekyll b/.nojekyll deleted file mode 100644 index e69de29bb..000000000 diff --git a/_images/3dba.png b/_images/3dba.png deleted file mode 100644 index 69de65414..000000000 Binary files a/_images/3dba.png and /dev/null differ diff --git a/_images/3dcore.png b/_images/3dcore.png deleted file mode 100644 index 69fed4a07..000000000 Binary files a/_images/3dcore.png and /dev/null differ diff --git a/_images/3dgeomplot.png b/_images/3dgeomplot.png deleted file mode 100644 index 5c16d8d83..000000000 Binary files a/_images/3dgeomplot.png and /dev/null differ diff --git a/_images/Tracks.png b/_images/Tracks.png deleted file mode 100644 index 39c83cd59..000000000 Binary files a/_images/Tracks.png and /dev/null differ diff --git a/_images/atr.png b/_images/atr.png deleted file mode 100644 index e1f440584..000000000 Binary files a/_images/atr.png and /dev/null differ diff --git a/_images/cmfd_flow.png b/_images/cmfd_flow.png deleted file mode 100644 index 078f1a4bf..000000000 Binary files a/_images/cmfd_flow.png and /dev/null differ diff --git a/_images/fork.png b/_images/fork.png deleted file mode 100644 index f43f64242..000000000 Binary files a/_images/fork.png and /dev/null differ diff --git a/_images/halfspace.svg b/_images/halfspace.svg deleted file mode 100644 index 8f5c5d54d..000000000 --- a/_images/halfspace.svg +++ /dev/null @@ -1,54 +0,0 @@ - - - - - - - - - image/svg+xml - - - - - - - - +1 - -1 - - diff --git a/_images/hex_lat.svg b/_images/hex_lat.svg deleted file mode 100644 index cc150e711..000000000 --- a/_images/hex_lat.svg +++ /dev/null @@ -1,780 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/_images/loss.png b/_images/loss.png deleted file mode 100644 index 37d4169a1..000000000 Binary files a/_images/loss.png and /dev/null differ diff --git a/_images/master-slave.png b/_images/master-slave.png deleted file mode 100644 index 01d0cbe97..000000000 Binary files a/_images/master-slave.png and /dev/null differ diff --git a/_images/math/0001d02b63ede2fe3219e05a7cd09c82ae6298b6.png b/_images/math/0001d02b63ede2fe3219e05a7cd09c82ae6298b6.png deleted file mode 100644 index 9686a085e..000000000 Binary files a/_images/math/0001d02b63ede2fe3219e05a7cd09c82ae6298b6.png and /dev/null differ diff --git a/_images/math/0007256293ab5c1a49a639f5b970a9439652ddd5.png b/_images/math/0007256293ab5c1a49a639f5b970a9439652ddd5.png deleted file mode 100644 index 42abc0004..000000000 Binary files a/_images/math/0007256293ab5c1a49a639f5b970a9439652ddd5.png and /dev/null differ diff --git a/_images/math/0099677a85278e7bc23d9eaeac79d13163679e20.png b/_images/math/0099677a85278e7bc23d9eaeac79d13163679e20.png deleted file mode 100644 index 241b7e476..000000000 Binary files a/_images/math/0099677a85278e7bc23d9eaeac79d13163679e20.png and /dev/null differ diff --git a/_images/math/00d948c03f19e3b6afa596d3eeab10bac53624b9.png b/_images/math/00d948c03f19e3b6afa596d3eeab10bac53624b9.png deleted file mode 100644 index be0504453..000000000 Binary files a/_images/math/00d948c03f19e3b6afa596d3eeab10bac53624b9.png and /dev/null differ diff --git a/_images/math/00ec6fe351e0a445d7169247c90d82c7863c925b.png b/_images/math/00ec6fe351e0a445d7169247c90d82c7863c925b.png deleted file mode 100644 index 41ca6d73c..000000000 Binary files a/_images/math/00ec6fe351e0a445d7169247c90d82c7863c925b.png and /dev/null differ diff --git a/_images/math/02beebe5d1f4f4ea0050d091ee19fcf3d05e2e4d.png b/_images/math/02beebe5d1f4f4ea0050d091ee19fcf3d05e2e4d.png deleted file mode 100644 index d96368da9..000000000 Binary files a/_images/math/02beebe5d1f4f4ea0050d091ee19fcf3d05e2e4d.png and /dev/null differ diff --git a/_images/math/03a2555c4f2dd4d508012cee029d4f3789e5e1d2.png b/_images/math/03a2555c4f2dd4d508012cee029d4f3789e5e1d2.png deleted file mode 100644 index e2cb47ffc..000000000 Binary files a/_images/math/03a2555c4f2dd4d508012cee029d4f3789e5e1d2.png and /dev/null differ diff --git a/_images/math/03e927fcb222d9b3da8313fec8a194aabd267f3c.png b/_images/math/03e927fcb222d9b3da8313fec8a194aabd267f3c.png deleted file mode 100644 index 1ae5af448..000000000 Binary files a/_images/math/03e927fcb222d9b3da8313fec8a194aabd267f3c.png and /dev/null differ diff --git a/_images/math/045ebab102db79eb3412e25aee65777aba7f9ea6.png b/_images/math/045ebab102db79eb3412e25aee65777aba7f9ea6.png deleted file mode 100644 index 663142e8b..000000000 Binary files a/_images/math/045ebab102db79eb3412e25aee65777aba7f9ea6.png and /dev/null differ diff --git a/_images/math/047af9e6ebc8efc10c19ad1230bf5297090c421f.png b/_images/math/047af9e6ebc8efc10c19ad1230bf5297090c421f.png deleted file mode 100644 index df5aa3d16..000000000 Binary files a/_images/math/047af9e6ebc8efc10c19ad1230bf5297090c421f.png and /dev/null differ diff --git a/_images/math/048683627faf27f771401321aa2bd858e5187c94.png b/_images/math/048683627faf27f771401321aa2bd858e5187c94.png deleted file mode 100644 index 1aded5fe7..000000000 Binary files a/_images/math/048683627faf27f771401321aa2bd858e5187c94.png and /dev/null differ diff --git a/_images/math/04d4d61e44fbb653537011c885604847febf8f67.png b/_images/math/04d4d61e44fbb653537011c885604847febf8f67.png deleted file mode 100644 index f338b9cae..000000000 Binary files a/_images/math/04d4d61e44fbb653537011c885604847febf8f67.png and /dev/null differ diff --git a/_images/math/04dcaf6190ccc6446e7eee808e2c76e11c15e6ba.png b/_images/math/04dcaf6190ccc6446e7eee808e2c76e11c15e6ba.png deleted file mode 100644 index 924ec6341..000000000 Binary files a/_images/math/04dcaf6190ccc6446e7eee808e2c76e11c15e6ba.png and /dev/null differ diff --git a/_images/math/04fba53ae404092ae07a129fd24943144c1ed7bc.png b/_images/math/04fba53ae404092ae07a129fd24943144c1ed7bc.png deleted file mode 100644 index 744346f8f..000000000 Binary files a/_images/math/04fba53ae404092ae07a129fd24943144c1ed7bc.png and /dev/null differ diff --git a/_images/math/050bc00b3743a41015dede959a1723122c89ac8c.png b/_images/math/050bc00b3743a41015dede959a1723122c89ac8c.png deleted file mode 100644 index 7abcef3bc..000000000 Binary files a/_images/math/050bc00b3743a41015dede959a1723122c89ac8c.png and /dev/null differ diff --git a/_images/math/050c911ed02c0643312a9d72be1bdb5ee2ffba63.png b/_images/math/050c911ed02c0643312a9d72be1bdb5ee2ffba63.png deleted file mode 100644 index c8b327463..000000000 Binary files a/_images/math/050c911ed02c0643312a9d72be1bdb5ee2ffba63.png and /dev/null differ diff --git a/_images/math/052fd265afd6d56a7143b0bcf7232e2d86f2dc7e.png b/_images/math/052fd265afd6d56a7143b0bcf7232e2d86f2dc7e.png deleted file mode 100644 index 37527f4f4..000000000 Binary files a/_images/math/052fd265afd6d56a7143b0bcf7232e2d86f2dc7e.png and /dev/null differ diff --git a/_images/math/057570e4eca9d958de84ee4341ad8c8f2263f939.png b/_images/math/057570e4eca9d958de84ee4341ad8c8f2263f939.png deleted file mode 100644 index f702a7a52..000000000 Binary files a/_images/math/057570e4eca9d958de84ee4341ad8c8f2263f939.png and /dev/null differ diff --git a/_images/math/0599b15f9f80684c89195cda75b0d394d07c5055.png b/_images/math/0599b15f9f80684c89195cda75b0d394d07c5055.png deleted file mode 100644 index 46f0ea87e..000000000 Binary files a/_images/math/0599b15f9f80684c89195cda75b0d394d07c5055.png and /dev/null differ diff --git a/_images/math/06c060192ab1231a4e1de928f72ec9817c7c9033.png b/_images/math/06c060192ab1231a4e1de928f72ec9817c7c9033.png deleted file mode 100644 index 1e90c0742..000000000 Binary files a/_images/math/06c060192ab1231a4e1de928f72ec9817c7c9033.png and /dev/null differ diff --git a/_images/math/073377a007f6674b5d26ecc47ce99527c4d0372e.png b/_images/math/073377a007f6674b5d26ecc47ce99527c4d0372e.png deleted file mode 100644 index 73ab3641a..000000000 Binary files a/_images/math/073377a007f6674b5d26ecc47ce99527c4d0372e.png and /dev/null differ diff --git a/_images/math/092c90168d509f979b39fa8cd66799f49b60676e.png b/_images/math/092c90168d509f979b39fa8cd66799f49b60676e.png deleted file mode 100644 index 314598fb4..000000000 Binary files a/_images/math/092c90168d509f979b39fa8cd66799f49b60676e.png and /dev/null differ diff --git a/_images/math/095e0578522dd4c8d70ac0908d4a0f5562337ee2.png b/_images/math/095e0578522dd4c8d70ac0908d4a0f5562337ee2.png deleted file mode 100644 index 8720e7612..000000000 Binary files a/_images/math/095e0578522dd4c8d70ac0908d4a0f5562337ee2.png and /dev/null differ diff --git a/_images/math/099917e64567338a7ffe60253668f83f217457d9.png b/_images/math/099917e64567338a7ffe60253668f83f217457d9.png deleted file mode 100644 index 52bc7deea..000000000 Binary files a/_images/math/099917e64567338a7ffe60253668f83f217457d9.png and /dev/null differ diff --git a/_images/math/0a7a7849088f43c976ec825ba56fc6b7fbcc9c6d.png b/_images/math/0a7a7849088f43c976ec825ba56fc6b7fbcc9c6d.png deleted file mode 100644 index 88e0d48fe..000000000 Binary files a/_images/math/0a7a7849088f43c976ec825ba56fc6b7fbcc9c6d.png and /dev/null differ diff --git a/_images/math/0acafa529182e79b4f56165ec677554fba7fcf98.png b/_images/math/0acafa529182e79b4f56165ec677554fba7fcf98.png deleted file mode 100644 index 6757b36a8..000000000 Binary files a/_images/math/0acafa529182e79b4f56165ec677554fba7fcf98.png and /dev/null differ diff --git a/_images/math/0aec79487ac3813fa859c552b98f7908422e15b6.png b/_images/math/0aec79487ac3813fa859c552b98f7908422e15b6.png deleted file mode 100644 index 6fe0d2cce..000000000 Binary files a/_images/math/0aec79487ac3813fa859c552b98f7908422e15b6.png and /dev/null differ diff --git a/_images/math/0af4183bf5a81ab150cb775afb0dbaf2f058548e.png b/_images/math/0af4183bf5a81ab150cb775afb0dbaf2f058548e.png deleted file mode 100644 index 36899259a..000000000 Binary files a/_images/math/0af4183bf5a81ab150cb775afb0dbaf2f058548e.png and /dev/null differ diff --git a/_images/math/0af49ad5ceac407e47acc6bc425307523ccb028f.png b/_images/math/0af49ad5ceac407e47acc6bc425307523ccb028f.png deleted file mode 100644 index f2d257922..000000000 Binary files a/_images/math/0af49ad5ceac407e47acc6bc425307523ccb028f.png and /dev/null differ diff --git a/_images/math/0b2b7782fc91425bc215af2459ff33e7974f1157.png b/_images/math/0b2b7782fc91425bc215af2459ff33e7974f1157.png deleted file mode 100644 index e9828b6ec..000000000 Binary files a/_images/math/0b2b7782fc91425bc215af2459ff33e7974f1157.png and /dev/null differ diff --git a/_images/math/0b81f7c49ee7322b733cb61a83973dc3b8c77f62.png b/_images/math/0b81f7c49ee7322b733cb61a83973dc3b8c77f62.png deleted file mode 100644 index c0590a922..000000000 Binary files a/_images/math/0b81f7c49ee7322b733cb61a83973dc3b8c77f62.png and /dev/null differ diff --git a/_images/math/0ba44a6689e4fe4cebb860bc1484db4b3b69bbfa.png b/_images/math/0ba44a6689e4fe4cebb860bc1484db4b3b69bbfa.png deleted file mode 100644 index b81e64f30..000000000 Binary files a/_images/math/0ba44a6689e4fe4cebb860bc1484db4b3b69bbfa.png and /dev/null differ diff --git a/_images/math/0c430b57ba99cde9dba97f41d15a71a7226ab233.png b/_images/math/0c430b57ba99cde9dba97f41d15a71a7226ab233.png deleted file mode 100644 index fb8a7e4b2..000000000 Binary files a/_images/math/0c430b57ba99cde9dba97f41d15a71a7226ab233.png and /dev/null differ diff --git a/_images/math/0cb01ce9758dbb05c6928834d756304fa641735d.png b/_images/math/0cb01ce9758dbb05c6928834d756304fa641735d.png deleted file mode 100644 index 6226e6382..000000000 Binary files a/_images/math/0cb01ce9758dbb05c6928834d756304fa641735d.png and /dev/null differ diff --git a/_images/math/0d60570c58d8dcf3326d6b87b44d983c3ce41f79.png b/_images/math/0d60570c58d8dcf3326d6b87b44d983c3ce41f79.png deleted file mode 100644 index 1a203c9a5..000000000 Binary files a/_images/math/0d60570c58d8dcf3326d6b87b44d983c3ce41f79.png and /dev/null differ diff --git a/_images/math/0d7515a796f7865178d7b756006cfdf8aa435c68.png b/_images/math/0d7515a796f7865178d7b756006cfdf8aa435c68.png deleted file mode 100644 index 420dd7eaf..000000000 Binary files a/_images/math/0d7515a796f7865178d7b756006cfdf8aa435c68.png and /dev/null differ diff --git a/_images/math/0de3605f536f1fd577553b5e159a8b3a40ffc077.png b/_images/math/0de3605f536f1fd577553b5e159a8b3a40ffc077.png deleted file mode 100644 index dc68fd22a..000000000 Binary files a/_images/math/0de3605f536f1fd577553b5e159a8b3a40ffc077.png and /dev/null differ diff --git a/_images/math/0e22076955898e6c9bb38aa079135195c24dc81e.png b/_images/math/0e22076955898e6c9bb38aa079135195c24dc81e.png deleted file mode 100644 index 59266b476..000000000 Binary files a/_images/math/0e22076955898e6c9bb38aa079135195c24dc81e.png and /dev/null differ diff --git a/_images/math/0e9e284d7d60207230c1feca26f48a82442a4f37.png b/_images/math/0e9e284d7d60207230c1feca26f48a82442a4f37.png deleted file mode 100644 index bd429513a..000000000 Binary files a/_images/math/0e9e284d7d60207230c1feca26f48a82442a4f37.png and /dev/null differ diff --git a/_images/math/0ebb67342b546ca42a1c634b1ef03c893c4cdedb.png b/_images/math/0ebb67342b546ca42a1c634b1ef03c893c4cdedb.png deleted file mode 100644 index 3c86ea892..000000000 Binary files a/_images/math/0ebb67342b546ca42a1c634b1ef03c893c4cdedb.png and /dev/null differ diff --git a/_images/math/0feb1bac710727bb33f3d94fc82a6d250759fbf0.png b/_images/math/0feb1bac710727bb33f3d94fc82a6d250759fbf0.png deleted file mode 100644 index 95ab16f2b..000000000 Binary files a/_images/math/0feb1bac710727bb33f3d94fc82a6d250759fbf0.png and /dev/null differ diff --git a/_images/math/10031c0879c1d72e62b6e4be71acdb3bb845af55.png b/_images/math/10031c0879c1d72e62b6e4be71acdb3bb845af55.png deleted file mode 100644 index 742a84025..000000000 Binary files a/_images/math/10031c0879c1d72e62b6e4be71acdb3bb845af55.png and /dev/null differ diff --git a/_images/math/1071c24bda8db8fe67211b4fe72174f007eaaa8c.png b/_images/math/1071c24bda8db8fe67211b4fe72174f007eaaa8c.png deleted file mode 100644 index 2e2453a1b..000000000 Binary files a/_images/math/1071c24bda8db8fe67211b4fe72174f007eaaa8c.png and /dev/null differ diff --git a/_images/math/10e009bdb83f96c5f47c58b34d5d4b12ef268d5b.png b/_images/math/10e009bdb83f96c5f47c58b34d5d4b12ef268d5b.png deleted file mode 100644 index f3a22a036..000000000 Binary files a/_images/math/10e009bdb83f96c5f47c58b34d5d4b12ef268d5b.png and /dev/null differ diff --git a/_images/math/11552b282807e9e9d1b743c91786f1147fd3ee7f.png b/_images/math/11552b282807e9e9d1b743c91786f1147fd3ee7f.png deleted file mode 100644 index a2d79bc46..000000000 Binary files a/_images/math/11552b282807e9e9d1b743c91786f1147fd3ee7f.png and /dev/null differ diff --git a/_images/math/11b00cf1e15714c18fed499d1da2a357978ffdc2.png b/_images/math/11b00cf1e15714c18fed499d1da2a357978ffdc2.png deleted file mode 100644 index 0c1c2950b..000000000 Binary files a/_images/math/11b00cf1e15714c18fed499d1da2a357978ffdc2.png and /dev/null differ diff --git a/_images/math/11bed1d62b2f553c6bba9255ade361778cb870ea.png b/_images/math/11bed1d62b2f553c6bba9255ade361778cb870ea.png deleted file mode 100644 index 31057793a..000000000 Binary files a/_images/math/11bed1d62b2f553c6bba9255ade361778cb870ea.png and /dev/null differ diff --git a/_images/math/11d586f6b5c3a0445fa328423430a9390fd2834b.png b/_images/math/11d586f6b5c3a0445fa328423430a9390fd2834b.png deleted file mode 100644 index b11cad228..000000000 Binary files a/_images/math/11d586f6b5c3a0445fa328423430a9390fd2834b.png and /dev/null differ diff --git a/_images/math/126e84ba38f7dece5f0ad64e929b9588b20f6440.png b/_images/math/126e84ba38f7dece5f0ad64e929b9588b20f6440.png deleted file mode 100644 index b6796f074..000000000 Binary files a/_images/math/126e84ba38f7dece5f0ad64e929b9588b20f6440.png and /dev/null differ diff --git a/_images/math/12762ba4fa96d4989611f87aad1d0cccf6f017b1.png b/_images/math/12762ba4fa96d4989611f87aad1d0cccf6f017b1.png deleted file mode 100644 index a9a53451e..000000000 Binary files a/_images/math/12762ba4fa96d4989611f87aad1d0cccf6f017b1.png and /dev/null differ diff --git a/_images/math/12b8af51623eeb2d930b8f84d0210abf9eb9516d.png b/_images/math/12b8af51623eeb2d930b8f84d0210abf9eb9516d.png deleted file mode 100644 index 4e598e47a..000000000 Binary files a/_images/math/12b8af51623eeb2d930b8f84d0210abf9eb9516d.png and /dev/null differ diff --git a/_images/math/12cde44bfcb267b4b75e32cb7a30f786d580d7bd.png b/_images/math/12cde44bfcb267b4b75e32cb7a30f786d580d7bd.png deleted file mode 100644 index 3ca4f192f..000000000 Binary files a/_images/math/12cde44bfcb267b4b75e32cb7a30f786d580d7bd.png and /dev/null differ diff --git a/_images/math/140ff2d0b371c7bdc633ded4a541dc0ca5f06b2a.png b/_images/math/140ff2d0b371c7bdc633ded4a541dc0ca5f06b2a.png deleted file mode 100644 index 90b1747a0..000000000 Binary files a/_images/math/140ff2d0b371c7bdc633ded4a541dc0ca5f06b2a.png and /dev/null differ diff --git a/_images/math/14546c27a7b929642f7840acca5f851c503ea109.png b/_images/math/14546c27a7b929642f7840acca5f851c503ea109.png deleted file mode 100644 index ef3cdd22c..000000000 Binary files a/_images/math/14546c27a7b929642f7840acca5f851c503ea109.png and /dev/null differ diff --git a/_images/math/1489450bcdf349d9c3988faff0b06980663409ae.png b/_images/math/1489450bcdf349d9c3988faff0b06980663409ae.png deleted file mode 100644 index 62c6f8c3d..000000000 Binary files a/_images/math/1489450bcdf349d9c3988faff0b06980663409ae.png and /dev/null differ diff --git a/_images/math/14d64b9353114b003d6d88d8d316a661da91252f.png b/_images/math/14d64b9353114b003d6d88d8d316a661da91252f.png deleted file mode 100644 index 720b2c419..000000000 Binary files a/_images/math/14d64b9353114b003d6d88d8d316a661da91252f.png and /dev/null differ diff --git a/_images/math/1550a2e5ac58a90d1ba2347b3db9e8dcbd0a9cef.png b/_images/math/1550a2e5ac58a90d1ba2347b3db9e8dcbd0a9cef.png deleted file mode 100644 index 777a5e688..000000000 Binary files a/_images/math/1550a2e5ac58a90d1ba2347b3db9e8dcbd0a9cef.png and /dev/null differ diff --git a/_images/math/15af00eb8283d9db763dc22497b2ca77cffdcaa2.png b/_images/math/15af00eb8283d9db763dc22497b2ca77cffdcaa2.png deleted file mode 100644 index 6146c9b9d..000000000 Binary files a/_images/math/15af00eb8283d9db763dc22497b2ca77cffdcaa2.png and /dev/null differ diff --git a/_images/math/15c26742484427f2a5cca0695fb67068ccc7437d.png b/_images/math/15c26742484427f2a5cca0695fb67068ccc7437d.png deleted file mode 100644 index d73add6b8..000000000 Binary files a/_images/math/15c26742484427f2a5cca0695fb67068ccc7437d.png and /dev/null differ diff --git a/_images/math/15ce6208083fea5e75caf0e92713beb18ec64067.png b/_images/math/15ce6208083fea5e75caf0e92713beb18ec64067.png deleted file mode 100644 index 62e9bde1e..000000000 Binary files a/_images/math/15ce6208083fea5e75caf0e92713beb18ec64067.png and /dev/null differ diff --git a/_images/math/1608ce6805e7f3dcc45c8045e1af000ee4c58278.png b/_images/math/1608ce6805e7f3dcc45c8045e1af000ee4c58278.png deleted file mode 100644 index 51583997d..000000000 Binary files a/_images/math/1608ce6805e7f3dcc45c8045e1af000ee4c58278.png and /dev/null differ diff --git a/_images/math/166488e8f118a87010b162c49abbe92d0b25effc.png b/_images/math/166488e8f118a87010b162c49abbe92d0b25effc.png deleted file mode 100644 index 897a33eea..000000000 Binary files a/_images/math/166488e8f118a87010b162c49abbe92d0b25effc.png and /dev/null differ diff --git a/_images/math/1775941037caf9d9d43df0ba8def91922556c09b.png b/_images/math/1775941037caf9d9d43df0ba8def91922556c09b.png deleted file mode 100644 index 6a8aa121f..000000000 Binary files a/_images/math/1775941037caf9d9d43df0ba8def91922556c09b.png and /dev/null differ diff --git a/_images/math/17b01f449b9d6793c44ec382c983260b25d3da41.png b/_images/math/17b01f449b9d6793c44ec382c983260b25d3da41.png deleted file mode 100644 index 1603db529..000000000 Binary files a/_images/math/17b01f449b9d6793c44ec382c983260b25d3da41.png and /dev/null differ diff --git a/_images/math/182a1a0cf6ca2ebb24101947d51ae7abb35e6a52.png b/_images/math/182a1a0cf6ca2ebb24101947d51ae7abb35e6a52.png deleted file mode 100644 index bbbe5d837..000000000 Binary files a/_images/math/182a1a0cf6ca2ebb24101947d51ae7abb35e6a52.png and /dev/null differ diff --git a/_images/math/18307330d7afbe0d39d87719b9bf1d529ad0840d.png b/_images/math/18307330d7afbe0d39d87719b9bf1d529ad0840d.png deleted file mode 100644 index c82d58fc5..000000000 Binary files a/_images/math/18307330d7afbe0d39d87719b9bf1d529ad0840d.png and /dev/null differ diff --git a/_images/math/188c175aac0a8a9c22499336711b5d7256407254.png b/_images/math/188c175aac0a8a9c22499336711b5d7256407254.png deleted file mode 100644 index 2776aa5a6..000000000 Binary files a/_images/math/188c175aac0a8a9c22499336711b5d7256407254.png and /dev/null differ diff --git a/_images/math/19bc0073dde1bcd1a8e6a32b251e80cced668f04.png b/_images/math/19bc0073dde1bcd1a8e6a32b251e80cced668f04.png deleted file mode 100644 index 586ca152a..000000000 Binary files a/_images/math/19bc0073dde1bcd1a8e6a32b251e80cced668f04.png and /dev/null differ diff --git a/_images/math/19f9ae9a7d789d9a8e661b478df966192038b540.png b/_images/math/19f9ae9a7d789d9a8e661b478df966192038b540.png deleted file mode 100644 index bf1815ca8..000000000 Binary files a/_images/math/19f9ae9a7d789d9a8e661b478df966192038b540.png and /dev/null differ diff --git a/_images/math/1a52481ac36eb889dcbbdcc0783ba2a755ba3547.png b/_images/math/1a52481ac36eb889dcbbdcc0783ba2a755ba3547.png deleted file mode 100644 index 9a3176cf5..000000000 Binary files a/_images/math/1a52481ac36eb889dcbbdcc0783ba2a755ba3547.png and /dev/null differ diff --git a/_images/math/1b27dd2a1658a84249278e51c711dc38ecd27f06.png b/_images/math/1b27dd2a1658a84249278e51c711dc38ecd27f06.png deleted file mode 100644 index d673f49a5..000000000 Binary files a/_images/math/1b27dd2a1658a84249278e51c711dc38ecd27f06.png and /dev/null differ diff --git a/_images/math/1b825b02abfae6f41473d2e13c1986ed29da6a0f.png b/_images/math/1b825b02abfae6f41473d2e13c1986ed29da6a0f.png deleted file mode 100644 index b7bbea928..000000000 Binary files a/_images/math/1b825b02abfae6f41473d2e13c1986ed29da6a0f.png and /dev/null differ diff --git a/_images/math/1b989a72aeaf778381894e0025fe309783e17235.png b/_images/math/1b989a72aeaf778381894e0025fe309783e17235.png deleted file mode 100644 index e993f7df7..000000000 Binary files a/_images/math/1b989a72aeaf778381894e0025fe309783e17235.png and /dev/null differ diff --git a/_images/math/1ba6dff92a6534953b79b494fd0418c4ea6e7be3.png b/_images/math/1ba6dff92a6534953b79b494fd0418c4ea6e7be3.png deleted file mode 100644 index 12d08678c..000000000 Binary files a/_images/math/1ba6dff92a6534953b79b494fd0418c4ea6e7be3.png and /dev/null differ diff --git a/_images/math/1c03aee7981b994864deb372377f9e45ab6cf1e0.png b/_images/math/1c03aee7981b994864deb372377f9e45ab6cf1e0.png deleted file mode 100644 index 6f7b0be8b..000000000 Binary files a/_images/math/1c03aee7981b994864deb372377f9e45ab6cf1e0.png and /dev/null differ diff --git a/_images/math/1c4b8682bccc37fbf052c7a2c468f8a11eda0140.png b/_images/math/1c4b8682bccc37fbf052c7a2c468f8a11eda0140.png deleted file mode 100644 index 3e41ba760..000000000 Binary files a/_images/math/1c4b8682bccc37fbf052c7a2c468f8a11eda0140.png and /dev/null differ diff --git a/_images/math/1cbd5f2a0906bdc57c21d9136d949ae49710fe7b.png b/_images/math/1cbd5f2a0906bdc57c21d9136d949ae49710fe7b.png deleted file mode 100644 index b961cedd1..000000000 Binary files a/_images/math/1cbd5f2a0906bdc57c21d9136d949ae49710fe7b.png and /dev/null differ diff --git a/_images/math/1d8026194afa7fac6e645bae623241e711c6a555.png b/_images/math/1d8026194afa7fac6e645bae623241e711c6a555.png deleted file mode 100644 index e867641f1..000000000 Binary files a/_images/math/1d8026194afa7fac6e645bae623241e711c6a555.png and /dev/null differ diff --git a/_images/math/1dfd9e6e58ae76b4a2612c504bcde47da7627ebd.png b/_images/math/1dfd9e6e58ae76b4a2612c504bcde47da7627ebd.png deleted file mode 100644 index 087142b5f..000000000 Binary files a/_images/math/1dfd9e6e58ae76b4a2612c504bcde47da7627ebd.png and /dev/null differ diff --git a/_images/math/1e5685e689d794b271679cdbb71a82e2ef0d3065.png b/_images/math/1e5685e689d794b271679cdbb71a82e2ef0d3065.png deleted file mode 100644 index bbecbba5b..000000000 Binary files a/_images/math/1e5685e689d794b271679cdbb71a82e2ef0d3065.png and /dev/null differ diff --git a/_images/math/1ebf0064860f7521e0c63782047f5a14c5e46055.png b/_images/math/1ebf0064860f7521e0c63782047f5a14c5e46055.png deleted file mode 100644 index 371a320f7..000000000 Binary files a/_images/math/1ebf0064860f7521e0c63782047f5a14c5e46055.png and /dev/null differ diff --git a/_images/math/1fc535f702d9142f6c3c5a3129b3c87669f79a1c.png b/_images/math/1fc535f702d9142f6c3c5a3129b3c87669f79a1c.png deleted file mode 100644 index 6d73db2ea..000000000 Binary files a/_images/math/1fc535f702d9142f6c3c5a3129b3c87669f79a1c.png and /dev/null differ diff --git a/_images/math/1fe11817fe9ad6255e3961c7a3f4098ca66d33a3.png b/_images/math/1fe11817fe9ad6255e3961c7a3f4098ca66d33a3.png deleted file mode 100644 index 4df1375a1..000000000 Binary files a/_images/math/1fe11817fe9ad6255e3961c7a3f4098ca66d33a3.png and /dev/null differ diff --git a/_images/math/2222b995c2353461d6e0ac399df3bf276b9c7304.png b/_images/math/2222b995c2353461d6e0ac399df3bf276b9c7304.png deleted file mode 100644 index b03f96578..000000000 Binary files a/_images/math/2222b995c2353461d6e0ac399df3bf276b9c7304.png and /dev/null differ diff --git a/_images/math/2298cf1485084afe72757a9c8483af49a138d81f.png b/_images/math/2298cf1485084afe72757a9c8483af49a138d81f.png deleted file mode 100644 index d9b8167d1..000000000 Binary files a/_images/math/2298cf1485084afe72757a9c8483af49a138d81f.png and /dev/null differ diff --git a/_images/math/22b1670ba24cf166ed9ab91087918a030bf4a690.png b/_images/math/22b1670ba24cf166ed9ab91087918a030bf4a690.png deleted file mode 100644 index 6cb536732..000000000 Binary files a/_images/math/22b1670ba24cf166ed9ab91087918a030bf4a690.png and /dev/null differ diff --git a/_images/math/2365ba8fe8144157e7b26d56f1844513b04a7518.png b/_images/math/2365ba8fe8144157e7b26d56f1844513b04a7518.png deleted file mode 100644 index 364231165..000000000 Binary files a/_images/math/2365ba8fe8144157e7b26d56f1844513b04a7518.png and /dev/null differ diff --git a/_images/math/236688ee611975ae524d26276ebc13588c90cc75.png b/_images/math/236688ee611975ae524d26276ebc13588c90cc75.png deleted file mode 100644 index abaf7c9a0..000000000 Binary files a/_images/math/236688ee611975ae524d26276ebc13588c90cc75.png and /dev/null differ diff --git a/_images/math/23e01bdec04e2cbbc81a53da4451026f6a4c6287.png b/_images/math/23e01bdec04e2cbbc81a53da4451026f6a4c6287.png deleted file mode 100644 index 1d9a52370..000000000 Binary files a/_images/math/23e01bdec04e2cbbc81a53da4451026f6a4c6287.png and /dev/null differ diff --git a/_images/math/2423e8a6a69b6ab51355eebe48b639a8a81e4d62.png b/_images/math/2423e8a6a69b6ab51355eebe48b639a8a81e4d62.png deleted file mode 100644 index e228756e9..000000000 Binary files a/_images/math/2423e8a6a69b6ab51355eebe48b639a8a81e4d62.png and /dev/null differ diff --git a/_images/math/249eee605b5712a6cc2cedd18077b62bdc12070e.png b/_images/math/249eee605b5712a6cc2cedd18077b62bdc12070e.png deleted file mode 100644 index c2119407d..000000000 Binary files a/_images/math/249eee605b5712a6cc2cedd18077b62bdc12070e.png and /dev/null differ diff --git a/_images/math/2542fd9fe743f3d9862754ecf1a9647846ca5b61.png b/_images/math/2542fd9fe743f3d9862754ecf1a9647846ca5b61.png deleted file mode 100644 index 241b7e476..000000000 Binary files a/_images/math/2542fd9fe743f3d9862754ecf1a9647846ca5b61.png and /dev/null differ diff --git a/_images/math/256fc96d9f592fbd8a755cd5df57319206f5fbc4.png b/_images/math/256fc96d9f592fbd8a755cd5df57319206f5fbc4.png deleted file mode 100644 index b9b697e22..000000000 Binary files a/_images/math/256fc96d9f592fbd8a755cd5df57319206f5fbc4.png and /dev/null differ diff --git a/_images/math/266146f1f5ea9c717f9da4bbc94fda34de3548dd.png b/_images/math/266146f1f5ea9c717f9da4bbc94fda34de3548dd.png deleted file mode 100644 index 7de766eff..000000000 Binary files a/_images/math/266146f1f5ea9c717f9da4bbc94fda34de3548dd.png and /dev/null differ diff --git a/_images/math/267769507fc66797837db56352b36189af0a448d.png b/_images/math/267769507fc66797837db56352b36189af0a448d.png deleted file mode 100644 index 5f16ab071..000000000 Binary files a/_images/math/267769507fc66797837db56352b36189af0a448d.png and /dev/null differ diff --git a/_images/math/26a00c0666e9094d8aac94f0ef300011af9b38a5.png b/_images/math/26a00c0666e9094d8aac94f0ef300011af9b38a5.png deleted file mode 100644 index 9713e0c3e..000000000 Binary files a/_images/math/26a00c0666e9094d8aac94f0ef300011af9b38a5.png and /dev/null differ diff --git a/_images/math/26bfd3bc4c5db78139d8897f9cfa5bba511a2f22.png b/_images/math/26bfd3bc4c5db78139d8897f9cfa5bba511a2f22.png deleted file mode 100644 index 02a2b18d3..000000000 Binary files a/_images/math/26bfd3bc4c5db78139d8897f9cfa5bba511a2f22.png and /dev/null differ diff --git a/_images/math/273e373a605f311bf8ea331df3bef47b2a9bff34.png b/_images/math/273e373a605f311bf8ea331df3bef47b2a9bff34.png deleted file mode 100644 index 93f1868ae..000000000 Binary files a/_images/math/273e373a605f311bf8ea331df3bef47b2a9bff34.png and /dev/null differ diff --git a/_images/math/284ca2ae6eccfb06ccfc08bd3f1b7d63a9666c06.png b/_images/math/284ca2ae6eccfb06ccfc08bd3f1b7d63a9666c06.png deleted file mode 100644 index 7e35a3d6c..000000000 Binary files a/_images/math/284ca2ae6eccfb06ccfc08bd3f1b7d63a9666c06.png and /dev/null differ diff --git a/_images/math/293a1ded290b253cffd0a17e4dad7daf48ffd476.png b/_images/math/293a1ded290b253cffd0a17e4dad7daf48ffd476.png deleted file mode 100644 index 794f9f683..000000000 Binary files a/_images/math/293a1ded290b253cffd0a17e4dad7daf48ffd476.png and /dev/null differ diff --git a/_images/math/2955d9bca85255065e7cbae5d6e778d17e35bcce.png b/_images/math/2955d9bca85255065e7cbae5d6e778d17e35bcce.png deleted file mode 100644 index 7c792809d..000000000 Binary files a/_images/math/2955d9bca85255065e7cbae5d6e778d17e35bcce.png and /dev/null differ diff --git a/_images/math/29d4af4f962546248fbf0b1af83dc19f73ea7af0.png b/_images/math/29d4af4f962546248fbf0b1af83dc19f73ea7af0.png deleted file mode 100644 index 738b1d4f5..000000000 Binary files a/_images/math/29d4af4f962546248fbf0b1af83dc19f73ea7af0.png and /dev/null differ diff --git a/_images/math/2aa528e29c4df6e3a7e44783f02f45e46012b948.png b/_images/math/2aa528e29c4df6e3a7e44783f02f45e46012b948.png deleted file mode 100644 index 5fd988bd8..000000000 Binary files a/_images/math/2aa528e29c4df6e3a7e44783f02f45e46012b948.png and /dev/null differ diff --git a/_images/math/2adb50496dd0a023d21806514609bc27343e789a.png b/_images/math/2adb50496dd0a023d21806514609bc27343e789a.png deleted file mode 100644 index 391ecb5c5..000000000 Binary files a/_images/math/2adb50496dd0a023d21806514609bc27343e789a.png and /dev/null differ diff --git a/_images/math/2b988641fbea128ec19bb7d14bddfe340f233bb4.png b/_images/math/2b988641fbea128ec19bb7d14bddfe340f233bb4.png deleted file mode 100644 index 57386b67b..000000000 Binary files a/_images/math/2b988641fbea128ec19bb7d14bddfe340f233bb4.png and /dev/null differ diff --git a/_images/math/2babce84f3bb52d0df02e8a0a2cc72df0572ae8e.png b/_images/math/2babce84f3bb52d0df02e8a0a2cc72df0572ae8e.png deleted file mode 100644 index 6ec26d0e8..000000000 Binary files a/_images/math/2babce84f3bb52d0df02e8a0a2cc72df0572ae8e.png and /dev/null differ diff --git a/_images/math/2bbd852af145b0f5b294ada9f8c2f59cf3915013.png b/_images/math/2bbd852af145b0f5b294ada9f8c2f59cf3915013.png deleted file mode 100644 index f96c3d278..000000000 Binary files a/_images/math/2bbd852af145b0f5b294ada9f8c2f59cf3915013.png and /dev/null differ diff --git a/_images/math/2bcc65482aa8e15cd4c9e9f2542451fb4e971a91.png b/_images/math/2bcc65482aa8e15cd4c9e9f2542451fb4e971a91.png deleted file mode 100644 index 19123badb..000000000 Binary files a/_images/math/2bcc65482aa8e15cd4c9e9f2542451fb4e971a91.png and /dev/null differ diff --git a/_images/math/2bfb29849139ad0b62a1bad525d6a15d7febb860.png b/_images/math/2bfb29849139ad0b62a1bad525d6a15d7febb860.png deleted file mode 100644 index 687100344..000000000 Binary files a/_images/math/2bfb29849139ad0b62a1bad525d6a15d7febb860.png and /dev/null differ diff --git a/_images/math/2c5d546b34d454a9692e43323a500518e77a0274.png b/_images/math/2c5d546b34d454a9692e43323a500518e77a0274.png deleted file mode 100644 index 55806117c..000000000 Binary files a/_images/math/2c5d546b34d454a9692e43323a500518e77a0274.png and /dev/null differ diff --git a/_images/math/2c97c8329c47487d5f6c690d78f621a049d99cb8.png b/_images/math/2c97c8329c47487d5f6c690d78f621a049d99cb8.png deleted file mode 100644 index b3cfa62dd..000000000 Binary files a/_images/math/2c97c8329c47487d5f6c690d78f621a049d99cb8.png and /dev/null differ diff --git a/_images/math/2cc2886c6c6b951eb395a7135dda654fdb3ad021.png b/_images/math/2cc2886c6c6b951eb395a7135dda654fdb3ad021.png deleted file mode 100644 index 9b806867f..000000000 Binary files a/_images/math/2cc2886c6c6b951eb395a7135dda654fdb3ad021.png and /dev/null differ diff --git a/_images/math/2ccc2630225d3274fc4fdeffa2b29c3998cf0555.png b/_images/math/2ccc2630225d3274fc4fdeffa2b29c3998cf0555.png deleted file mode 100644 index 3c1a2f84c..000000000 Binary files a/_images/math/2ccc2630225d3274fc4fdeffa2b29c3998cf0555.png and /dev/null differ diff --git a/_images/math/2cdc8d11e81c71524238a384a2c8d826ce4efbd4.png b/_images/math/2cdc8d11e81c71524238a384a2c8d826ce4efbd4.png deleted file mode 100644 index b2181a832..000000000 Binary files a/_images/math/2cdc8d11e81c71524238a384a2c8d826ce4efbd4.png and /dev/null differ diff --git a/_images/math/2d1cf09efa351921d1ec9f185890be7d9abe5669.png b/_images/math/2d1cf09efa351921d1ec9f185890be7d9abe5669.png deleted file mode 100644 index 5b4b65504..000000000 Binary files a/_images/math/2d1cf09efa351921d1ec9f185890be7d9abe5669.png and /dev/null differ diff --git a/_images/math/2da8bdfc0727e7f2270df68b7edebd2d2786aefd.png b/_images/math/2da8bdfc0727e7f2270df68b7edebd2d2786aefd.png deleted file mode 100644 index fb8a7e4b2..000000000 Binary files a/_images/math/2da8bdfc0727e7f2270df68b7edebd2d2786aefd.png and /dev/null differ diff --git a/_images/math/2de38926392ba23abeac75effc66c37a5f5be5fd.png b/_images/math/2de38926392ba23abeac75effc66c37a5f5be5fd.png deleted file mode 100644 index 5271cf260..000000000 Binary files a/_images/math/2de38926392ba23abeac75effc66c37a5f5be5fd.png and /dev/null differ diff --git a/_images/math/2e5644e20233e1bf2c4c26d2b4b95697973de369.png b/_images/math/2e5644e20233e1bf2c4c26d2b4b95697973de369.png deleted file mode 100644 index e95998e90..000000000 Binary files a/_images/math/2e5644e20233e1bf2c4c26d2b4b95697973de369.png and /dev/null differ diff --git a/_images/math/2e974a688feb514c26fcba1885e36950bf56b477.png b/_images/math/2e974a688feb514c26fcba1885e36950bf56b477.png deleted file mode 100644 index 1b21e1c63..000000000 Binary files a/_images/math/2e974a688feb514c26fcba1885e36950bf56b477.png and /dev/null differ diff --git a/_images/math/3010eff5503f46fd04b1349f5e234b4081da2210.png b/_images/math/3010eff5503f46fd04b1349f5e234b4081da2210.png deleted file mode 100644 index 5f80a3e75..000000000 Binary files a/_images/math/3010eff5503f46fd04b1349f5e234b4081da2210.png and /dev/null differ diff --git a/_images/math/3095e74e1b5d3440db17dd097eb4482d2af3e8ba.png b/_images/math/3095e74e1b5d3440db17dd097eb4482d2af3e8ba.png deleted file mode 100644 index f1fd64e1e..000000000 Binary files a/_images/math/3095e74e1b5d3440db17dd097eb4482d2af3e8ba.png and /dev/null differ diff --git a/_images/math/3220733708a83987e452e76214d0ff0f1c1582fb.png b/_images/math/3220733708a83987e452e76214d0ff0f1c1582fb.png deleted file mode 100644 index 4196ba503..000000000 Binary files a/_images/math/3220733708a83987e452e76214d0ff0f1c1582fb.png and /dev/null differ diff --git a/_images/math/324ce9e91c8341018aedd8d360b4b2de1f239f78.png b/_images/math/324ce9e91c8341018aedd8d360b4b2de1f239f78.png deleted file mode 100644 index 719fd530f..000000000 Binary files a/_images/math/324ce9e91c8341018aedd8d360b4b2de1f239f78.png and /dev/null differ diff --git a/_images/math/32bc666a3e4daca37d68095d13fee12f7b63452a.png b/_images/math/32bc666a3e4daca37d68095d13fee12f7b63452a.png deleted file mode 100644 index c17a5c2bd..000000000 Binary files a/_images/math/32bc666a3e4daca37d68095d13fee12f7b63452a.png and /dev/null differ diff --git a/_images/math/33121426c9ef99b3c090514b13dffd6bf95b321c.png b/_images/math/33121426c9ef99b3c090514b13dffd6bf95b321c.png deleted file mode 100644 index e84c31881..000000000 Binary files a/_images/math/33121426c9ef99b3c090514b13dffd6bf95b321c.png and /dev/null differ diff --git a/_images/math/3379b0bfb17419e7d5385013de923b8803291b07.png b/_images/math/3379b0bfb17419e7d5385013de923b8803291b07.png deleted file mode 100644 index c6682ae88..000000000 Binary files a/_images/math/3379b0bfb17419e7d5385013de923b8803291b07.png and /dev/null differ diff --git a/_images/math/3437e800374c9301a7eb182fdc39f77f799bcf87.png b/_images/math/3437e800374c9301a7eb182fdc39f77f799bcf87.png deleted file mode 100644 index 042c53525..000000000 Binary files a/_images/math/3437e800374c9301a7eb182fdc39f77f799bcf87.png and /dev/null differ diff --git a/_images/math/34d111ad69c6146d428ed6260f852299d537a645.png b/_images/math/34d111ad69c6146d428ed6260f852299d537a645.png deleted file mode 100644 index 6f99f5e81..000000000 Binary files a/_images/math/34d111ad69c6146d428ed6260f852299d537a645.png and /dev/null differ diff --git a/_images/math/357b2ac46ccc336b297df46127adda9d3c00fe3d.png b/_images/math/357b2ac46ccc336b297df46127adda9d3c00fe3d.png deleted file mode 100644 index cc5f97e96..000000000 Binary files a/_images/math/357b2ac46ccc336b297df46127adda9d3c00fe3d.png and /dev/null differ diff --git a/_images/math/35aa292c643aceacdb42eb4eff352a2f5c58a710.png b/_images/math/35aa292c643aceacdb42eb4eff352a2f5c58a710.png deleted file mode 100644 index ea6f36ba7..000000000 Binary files a/_images/math/35aa292c643aceacdb42eb4eff352a2f5c58a710.png and /dev/null differ diff --git a/_images/math/35e1676e6106b7f88449b57d632777294e05c3a6.png b/_images/math/35e1676e6106b7f88449b57d632777294e05c3a6.png deleted file mode 100644 index 62a4d3afb..000000000 Binary files a/_images/math/35e1676e6106b7f88449b57d632777294e05c3a6.png and /dev/null differ diff --git a/_images/math/36b8edc0a572c01c1cd71959f651a2d82ad444d8.png b/_images/math/36b8edc0a572c01c1cd71959f651a2d82ad444d8.png deleted file mode 100644 index e1b34e281..000000000 Binary files a/_images/math/36b8edc0a572c01c1cd71959f651a2d82ad444d8.png and /dev/null differ diff --git a/_images/math/36ea75475e3f631bf1e7a0d3215d5f57fd5cb2b1.png b/_images/math/36ea75475e3f631bf1e7a0d3215d5f57fd5cb2b1.png deleted file mode 100644 index 866c704d6..000000000 Binary files a/_images/math/36ea75475e3f631bf1e7a0d3215d5f57fd5cb2b1.png and /dev/null differ diff --git a/_images/math/36eea1d3d0216766a76c948bf502ce767da2d083.png b/_images/math/36eea1d3d0216766a76c948bf502ce767da2d083.png deleted file mode 100644 index 4bd0749d0..000000000 Binary files a/_images/math/36eea1d3d0216766a76c948bf502ce767da2d083.png and /dev/null differ diff --git a/_images/math/372c2a0702e1e5866656215408b37a2ddb8d2d45.png b/_images/math/372c2a0702e1e5866656215408b37a2ddb8d2d45.png deleted file mode 100644 index c18490be0..000000000 Binary files a/_images/math/372c2a0702e1e5866656215408b37a2ddb8d2d45.png and /dev/null differ diff --git a/_images/math/3747efba6351883638de083d8f6bca42211cfe36.png b/_images/math/3747efba6351883638de083d8f6bca42211cfe36.png deleted file mode 100644 index 38627cdfa..000000000 Binary files a/_images/math/3747efba6351883638de083d8f6bca42211cfe36.png and /dev/null differ diff --git a/_images/math/37becb468222e6ac16a7540b83bcefc3773471b6.png b/_images/math/37becb468222e6ac16a7540b83bcefc3773471b6.png deleted file mode 100644 index 661d3dbb2..000000000 Binary files a/_images/math/37becb468222e6ac16a7540b83bcefc3773471b6.png and /dev/null differ diff --git a/_images/math/37cefa66a3f4d378b1718d75213d61e9801ce3a0.png b/_images/math/37cefa66a3f4d378b1718d75213d61e9801ce3a0.png deleted file mode 100644 index 424d602cc..000000000 Binary files a/_images/math/37cefa66a3f4d378b1718d75213d61e9801ce3a0.png and /dev/null differ diff --git a/_images/math/3836265d1098b6007f04935452185487bab6c384.png b/_images/math/3836265d1098b6007f04935452185487bab6c384.png deleted file mode 100644 index 23af4e14d..000000000 Binary files a/_images/math/3836265d1098b6007f04935452185487bab6c384.png and /dev/null differ diff --git a/_images/math/38d22b7d58794e86808b2ebff1de726e16656617.png b/_images/math/38d22b7d58794e86808b2ebff1de726e16656617.png deleted file mode 100644 index 753fd16ce..000000000 Binary files a/_images/math/38d22b7d58794e86808b2ebff1de726e16656617.png and /dev/null differ diff --git a/_images/math/3921c4dc856e939ac706dc9ce6448b2561bd94c1.png b/_images/math/3921c4dc856e939ac706dc9ce6448b2561bd94c1.png deleted file mode 100644 index 2401a32e3..000000000 Binary files a/_images/math/3921c4dc856e939ac706dc9ce6448b2561bd94c1.png and /dev/null differ diff --git a/_images/math/3946360f436553e959b22b8ad46e35c7367f8fa9.png b/_images/math/3946360f436553e959b22b8ad46e35c7367f8fa9.png deleted file mode 100644 index 91e776668..000000000 Binary files a/_images/math/3946360f436553e959b22b8ad46e35c7367f8fa9.png and /dev/null differ diff --git a/_images/math/39905055cd4f65c4f913a94d43730535a717b938.png b/_images/math/39905055cd4f65c4f913a94d43730535a717b938.png deleted file mode 100644 index d29763f7a..000000000 Binary files a/_images/math/39905055cd4f65c4f913a94d43730535a717b938.png and /dev/null differ diff --git a/_images/math/399b4f4cbcdbbe1bed6094340454ce80a0e2429d.png b/_images/math/399b4f4cbcdbbe1bed6094340454ce80a0e2429d.png deleted file mode 100644 index c0f80e19e..000000000 Binary files a/_images/math/399b4f4cbcdbbe1bed6094340454ce80a0e2429d.png and /dev/null differ diff --git a/_images/math/39f8b3e7e0354ebf1ebe3cc59d4e25d32db88b6f.png b/_images/math/39f8b3e7e0354ebf1ebe3cc59d4e25d32db88b6f.png deleted file mode 100644 index 445cd751b..000000000 Binary files a/_images/math/39f8b3e7e0354ebf1ebe3cc59d4e25d32db88b6f.png and /dev/null differ diff --git a/_images/math/3a3c16cc0253c37aaca6022ca552044038d00ba9.png b/_images/math/3a3c16cc0253c37aaca6022ca552044038d00ba9.png deleted file mode 100644 index 5cc892ffb..000000000 Binary files a/_images/math/3a3c16cc0253c37aaca6022ca552044038d00ba9.png and /dev/null differ diff --git a/_images/math/3ab53407882dbe27e33193ce4bc64e09a3f3e831.png b/_images/math/3ab53407882dbe27e33193ce4bc64e09a3f3e831.png deleted file mode 100644 index c4784660b..000000000 Binary files a/_images/math/3ab53407882dbe27e33193ce4bc64e09a3f3e831.png and /dev/null differ diff --git a/_images/math/3ade03f0f2d2f48db27a59381ee0fa8803971e88.png b/_images/math/3ade03f0f2d2f48db27a59381ee0fa8803971e88.png deleted file mode 100644 index acca6a5bc..000000000 Binary files a/_images/math/3ade03f0f2d2f48db27a59381ee0fa8803971e88.png and /dev/null differ diff --git a/_images/math/3b681d9a42eb1e7b7aee6ed0c26ce7fefba25098.png b/_images/math/3b681d9a42eb1e7b7aee6ed0c26ce7fefba25098.png deleted file mode 100644 index dbf6200ce..000000000 Binary files a/_images/math/3b681d9a42eb1e7b7aee6ed0c26ce7fefba25098.png and /dev/null differ diff --git a/_images/math/3bd595c5a1859986ab97449768ca7259b5285aff.png b/_images/math/3bd595c5a1859986ab97449768ca7259b5285aff.png deleted file mode 100644 index cc2b33bfa..000000000 Binary files a/_images/math/3bd595c5a1859986ab97449768ca7259b5285aff.png and /dev/null differ diff --git a/_images/math/3c920ba6e34c8fd34865b53ca3d239ff0696974f.png b/_images/math/3c920ba6e34c8fd34865b53ca3d239ff0696974f.png deleted file mode 100644 index fd54b3e2e..000000000 Binary files a/_images/math/3c920ba6e34c8fd34865b53ca3d239ff0696974f.png and /dev/null differ diff --git a/_images/math/3cebfddaf42f50301d8f19a71594839d8f384b4d.png b/_images/math/3cebfddaf42f50301d8f19a71594839d8f384b4d.png deleted file mode 100644 index 6f002cc47..000000000 Binary files a/_images/math/3cebfddaf42f50301d8f19a71594839d8f384b4d.png and /dev/null differ diff --git a/_images/math/3d0d45c0de57b8f31dee79da799464e7805c4f95.png b/_images/math/3d0d45c0de57b8f31dee79da799464e7805c4f95.png deleted file mode 100644 index 8a8c8af4f..000000000 Binary files a/_images/math/3d0d45c0de57b8f31dee79da799464e7805c4f95.png and /dev/null differ diff --git a/_images/math/3d303d99a38ae45e70cae80181370d07294da513.png b/_images/math/3d303d99a38ae45e70cae80181370d07294da513.png deleted file mode 100644 index 7d779f9eb..000000000 Binary files a/_images/math/3d303d99a38ae45e70cae80181370d07294da513.png and /dev/null differ diff --git a/_images/math/3dcc6441339d14739e0eb041869b6fd673bd4a2a.png b/_images/math/3dcc6441339d14739e0eb041869b6fd673bd4a2a.png deleted file mode 100644 index ec55d7ab0..000000000 Binary files a/_images/math/3dcc6441339d14739e0eb041869b6fd673bd4a2a.png and /dev/null differ diff --git a/_images/math/3df8a349e0b4e3274f26d803b1e5e9ee68099098.png b/_images/math/3df8a349e0b4e3274f26d803b1e5e9ee68099098.png deleted file mode 100644 index 5685955a5..000000000 Binary files a/_images/math/3df8a349e0b4e3274f26d803b1e5e9ee68099098.png and /dev/null differ diff --git a/_images/math/3e41c598147b003fe1c720cafa073d83ccdd84bd.png b/_images/math/3e41c598147b003fe1c720cafa073d83ccdd84bd.png deleted file mode 100644 index 10639f3af..000000000 Binary files a/_images/math/3e41c598147b003fe1c720cafa073d83ccdd84bd.png and /dev/null differ diff --git a/_images/math/3e6e31e0452d9ce5c1cbf1a8e5d89df4e8ea9b30.png b/_images/math/3e6e31e0452d9ce5c1cbf1a8e5d89df4e8ea9b30.png deleted file mode 100644 index e50b79d26..000000000 Binary files a/_images/math/3e6e31e0452d9ce5c1cbf1a8e5d89df4e8ea9b30.png and /dev/null differ diff --git a/_images/math/3eca8557203e86160952e1c0f735f7417f3285b1.png b/_images/math/3eca8557203e86160952e1c0f735f7417f3285b1.png deleted file mode 100644 index 9033f8ddb..000000000 Binary files a/_images/math/3eca8557203e86160952e1c0f735f7417f3285b1.png and /dev/null differ diff --git a/_images/math/3fbc578039b24cebbb2f87a16a6cc65b0d3f50a2.png b/_images/math/3fbc578039b24cebbb2f87a16a6cc65b0d3f50a2.png deleted file mode 100644 index 7ef80c429..000000000 Binary files a/_images/math/3fbc578039b24cebbb2f87a16a6cc65b0d3f50a2.png and /dev/null differ diff --git a/_images/math/4027387a2935194e91dbbf251e1ab9ea7f92353f.png b/_images/math/4027387a2935194e91dbbf251e1ab9ea7f92353f.png deleted file mode 100644 index c48d59804..000000000 Binary files a/_images/math/4027387a2935194e91dbbf251e1ab9ea7f92353f.png and /dev/null differ diff --git a/_images/math/40b1e03060bc075eb177c8ca1d6f9fa28f020f88.png b/_images/math/40b1e03060bc075eb177c8ca1d6f9fa28f020f88.png deleted file mode 100644 index 679b3272a..000000000 Binary files a/_images/math/40b1e03060bc075eb177c8ca1d6f9fa28f020f88.png and /dev/null differ diff --git a/_images/math/40cdb0e5fc0c7cf6e3d3248c29f7de379c0f6abb.png b/_images/math/40cdb0e5fc0c7cf6e3d3248c29f7de379c0f6abb.png deleted file mode 100644 index 321d9f35d..000000000 Binary files a/_images/math/40cdb0e5fc0c7cf6e3d3248c29f7de379c0f6abb.png and /dev/null differ diff --git a/_images/math/410dcdb09a912ada08d501569194bbd5b1374da2.png b/_images/math/410dcdb09a912ada08d501569194bbd5b1374da2.png deleted file mode 100644 index 653777628..000000000 Binary files a/_images/math/410dcdb09a912ada08d501569194bbd5b1374da2.png and /dev/null differ diff --git a/_images/math/413f8a8e40062a9090d9d50b88bc7b551b314c26.png b/_images/math/413f8a8e40062a9090d9d50b88bc7b551b314c26.png deleted file mode 100644 index e34cec6ab..000000000 Binary files a/_images/math/413f8a8e40062a9090d9d50b88bc7b551b314c26.png and /dev/null differ diff --git a/_images/math/41615b8b3e38777cee12c32e5efd0443aa7b28d4.png b/_images/math/41615b8b3e38777cee12c32e5efd0443aa7b28d4.png deleted file mode 100644 index 2d9e8a8bc..000000000 Binary files a/_images/math/41615b8b3e38777cee12c32e5efd0443aa7b28d4.png and /dev/null differ diff --git a/_images/math/41fb20a77b7769e58d83ed0f0e070b8049656b58.png b/_images/math/41fb20a77b7769e58d83ed0f0e070b8049656b58.png deleted file mode 100644 index bc62b5d5d..000000000 Binary files a/_images/math/41fb20a77b7769e58d83ed0f0e070b8049656b58.png and /dev/null differ diff --git a/_images/math/425d86ba2f2979d75b7535c2bcf92c33ed6b285a.png b/_images/math/425d86ba2f2979d75b7535c2bcf92c33ed6b285a.png deleted file mode 100644 index c98dcc10b..000000000 Binary files a/_images/math/425d86ba2f2979d75b7535c2bcf92c33ed6b285a.png and /dev/null differ diff --git a/_images/math/42f6bfe21b477822d9f8ced41cd10ce6d4233957.png b/_images/math/42f6bfe21b477822d9f8ced41cd10ce6d4233957.png deleted file mode 100644 index a90b8747f..000000000 Binary files a/_images/math/42f6bfe21b477822d9f8ced41cd10ce6d4233957.png and /dev/null differ diff --git a/_images/math/42f768e135c2ac3dc468b2985fbdfc750dc5f0c2.png b/_images/math/42f768e135c2ac3dc468b2985fbdfc750dc5f0c2.png deleted file mode 100644 index 8f7395b69..000000000 Binary files a/_images/math/42f768e135c2ac3dc468b2985fbdfc750dc5f0c2.png and /dev/null differ diff --git a/_images/math/4303cddbd63572a328336c130c809fbaaa0d4efb.png b/_images/math/4303cddbd63572a328336c130c809fbaaa0d4efb.png deleted file mode 100644 index 0c2b37221..000000000 Binary files a/_images/math/4303cddbd63572a328336c130c809fbaaa0d4efb.png and /dev/null differ diff --git a/_images/math/437710b2e187e7325b10e7fef8f57f8e247a13d0.png b/_images/math/437710b2e187e7325b10e7fef8f57f8e247a13d0.png deleted file mode 100644 index f3f740cf0..000000000 Binary files a/_images/math/437710b2e187e7325b10e7fef8f57f8e247a13d0.png and /dev/null differ diff --git a/_images/math/440173b49aec6d3d299f1f3d3736d1f4d7a17306.png b/_images/math/440173b49aec6d3d299f1f3d3736d1f4d7a17306.png deleted file mode 100644 index a90f92cc8..000000000 Binary files a/_images/math/440173b49aec6d3d299f1f3d3736d1f4d7a17306.png and /dev/null differ diff --git a/_images/math/45a0f5d083cb49a8fae6d7fb86d6f1052f8c9305.png b/_images/math/45a0f5d083cb49a8fae6d7fb86d6f1052f8c9305.png deleted file mode 100644 index d772f3e5c..000000000 Binary files a/_images/math/45a0f5d083cb49a8fae6d7fb86d6f1052f8c9305.png and /dev/null differ diff --git a/_images/math/45f7406a4b0cdcd45b9986f83b72661b29eb3858.png b/_images/math/45f7406a4b0cdcd45b9986f83b72661b29eb3858.png deleted file mode 100644 index 21b27da48..000000000 Binary files a/_images/math/45f7406a4b0cdcd45b9986f83b72661b29eb3858.png and /dev/null differ diff --git a/_images/math/4638d7b1180322a5cd4c0f09a4f5fe5f7c0ef07c.png b/_images/math/4638d7b1180322a5cd4c0f09a4f5fe5f7c0ef07c.png deleted file mode 100644 index f14122205..000000000 Binary files a/_images/math/4638d7b1180322a5cd4c0f09a4f5fe5f7c0ef07c.png and /dev/null differ diff --git a/_images/math/4642e845b88a9a2ba26a4a74a9d5bd780c123efb.png b/_images/math/4642e845b88a9a2ba26a4a74a9d5bd780c123efb.png deleted file mode 100644 index 16957083a..000000000 Binary files a/_images/math/4642e845b88a9a2ba26a4a74a9d5bd780c123efb.png and /dev/null differ diff --git a/_images/math/46a3188eb54e34f0b3ade697cb8fc256d4aaaef2.png b/_images/math/46a3188eb54e34f0b3ade697cb8fc256d4aaaef2.png deleted file mode 100644 index 541bac915..000000000 Binary files a/_images/math/46a3188eb54e34f0b3ade697cb8fc256d4aaaef2.png and /dev/null differ diff --git a/_images/math/471d61daaee228743bd224e5319e01670dfd9da8.png b/_images/math/471d61daaee228743bd224e5319e01670dfd9da8.png deleted file mode 100644 index c22d35759..000000000 Binary files a/_images/math/471d61daaee228743bd224e5319e01670dfd9da8.png and /dev/null differ diff --git a/_images/math/47d15fab472dd461e78de04ad3108750e989f29e.png b/_images/math/47d15fab472dd461e78de04ad3108750e989f29e.png deleted file mode 100644 index 2dde710d8..000000000 Binary files a/_images/math/47d15fab472dd461e78de04ad3108750e989f29e.png and /dev/null differ diff --git a/_images/math/483117b0e16e6f01d6113692ad91664294b735b2.png b/_images/math/483117b0e16e6f01d6113692ad91664294b735b2.png deleted file mode 100644 index 46d486b72..000000000 Binary files a/_images/math/483117b0e16e6f01d6113692ad91664294b735b2.png and /dev/null differ diff --git a/_images/math/4898b8c52b24347389ac280ac56acc87be372870.png b/_images/math/4898b8c52b24347389ac280ac56acc87be372870.png deleted file mode 100644 index c6883100e..000000000 Binary files a/_images/math/4898b8c52b24347389ac280ac56acc87be372870.png and /dev/null differ diff --git a/_images/math/4922db0ddd9a9d6ac438e7ff7874d2ce5a819992.png b/_images/math/4922db0ddd9a9d6ac438e7ff7874d2ce5a819992.png deleted file mode 100644 index 649c6ddad..000000000 Binary files a/_images/math/4922db0ddd9a9d6ac438e7ff7874d2ce5a819992.png and /dev/null differ diff --git a/_images/math/49bf31528e5bc4f8e518516f64a8201d098e9394.png b/_images/math/49bf31528e5bc4f8e518516f64a8201d098e9394.png deleted file mode 100644 index 73d9c44a2..000000000 Binary files a/_images/math/49bf31528e5bc4f8e518516f64a8201d098e9394.png and /dev/null differ diff --git a/_images/math/49c2f5e55a60d817458172a82cb248929448dd03.png b/_images/math/49c2f5e55a60d817458172a82cb248929448dd03.png deleted file mode 100644 index e8b3a3a0a..000000000 Binary files a/_images/math/49c2f5e55a60d817458172a82cb248929448dd03.png and /dev/null differ diff --git a/_images/math/4a9ea495346ef9bd27bb38dd6dba7c7742d10af1.png b/_images/math/4a9ea495346ef9bd27bb38dd6dba7c7742d10af1.png deleted file mode 100644 index c4ccb8aec..000000000 Binary files a/_images/math/4a9ea495346ef9bd27bb38dd6dba7c7742d10af1.png and /dev/null differ diff --git a/_images/math/4ae97fc714afe5060914a7301feb2f456e55104a.png b/_images/math/4ae97fc714afe5060914a7301feb2f456e55104a.png deleted file mode 100644 index 03cb6b012..000000000 Binary files a/_images/math/4ae97fc714afe5060914a7301feb2f456e55104a.png and /dev/null differ diff --git a/_images/math/4bf400a8ad185670234bd8f43236a92d3ad420cb.png b/_images/math/4bf400a8ad185670234bd8f43236a92d3ad420cb.png deleted file mode 100644 index f84b13411..000000000 Binary files a/_images/math/4bf400a8ad185670234bd8f43236a92d3ad420cb.png and /dev/null differ diff --git a/_images/math/4c098fec6e2490ad223f95b48764c6a7d182b998.png b/_images/math/4c098fec6e2490ad223f95b48764c6a7d182b998.png deleted file mode 100644 index 8457b700f..000000000 Binary files a/_images/math/4c098fec6e2490ad223f95b48764c6a7d182b998.png and /dev/null differ diff --git a/_images/math/4c33e0e76cbb7c9b5d0a486e31a486f3a145dc35.png b/_images/math/4c33e0e76cbb7c9b5d0a486e31a486f3a145dc35.png deleted file mode 100644 index 9f368b59e..000000000 Binary files a/_images/math/4c33e0e76cbb7c9b5d0a486e31a486f3a145dc35.png and /dev/null differ diff --git a/_images/math/4d51d3f476c76dc066b26271168bc3b67f49d2be.png b/_images/math/4d51d3f476c76dc066b26271168bc3b67f49d2be.png deleted file mode 100644 index 3323b6012..000000000 Binary files a/_images/math/4d51d3f476c76dc066b26271168bc3b67f49d2be.png and /dev/null differ diff --git a/_images/math/4def4e814267b901234354e5624941e073de965a.png b/_images/math/4def4e814267b901234354e5624941e073de965a.png deleted file mode 100644 index ee98c02ae..000000000 Binary files a/_images/math/4def4e814267b901234354e5624941e073de965a.png and /dev/null differ diff --git a/_images/math/4e2c11e8c608c5dbcf13fc09449292744c46558d.png b/_images/math/4e2c11e8c608c5dbcf13fc09449292744c46558d.png deleted file mode 100644 index 2573412d5..000000000 Binary files a/_images/math/4e2c11e8c608c5dbcf13fc09449292744c46558d.png and /dev/null differ diff --git a/_images/math/4e96ee322d3880b756754bbcc1f3e6cb79294970.png b/_images/math/4e96ee322d3880b756754bbcc1f3e6cb79294970.png deleted file mode 100644 index 8c7f910a5..000000000 Binary files a/_images/math/4e96ee322d3880b756754bbcc1f3e6cb79294970.png and /dev/null differ diff --git a/_images/math/4ea1f4e5e79c266acd957ed36e45d8d435a85394.png b/_images/math/4ea1f4e5e79c266acd957ed36e45d8d435a85394.png deleted file mode 100644 index e3d4062ed..000000000 Binary files a/_images/math/4ea1f4e5e79c266acd957ed36e45d8d435a85394.png and /dev/null differ diff --git a/_images/math/4ecbe6c951987c69c494fcd3cbb87a46d688c317.png b/_images/math/4ecbe6c951987c69c494fcd3cbb87a46d688c317.png deleted file mode 100644 index bcfa20289..000000000 Binary files a/_images/math/4ecbe6c951987c69c494fcd3cbb87a46d688c317.png and /dev/null differ diff --git a/_images/math/4fa1f677978832918eb20898cbea76e6093b77e8.png b/_images/math/4fa1f677978832918eb20898cbea76e6093b77e8.png deleted file mode 100644 index ed4d32998..000000000 Binary files a/_images/math/4fa1f677978832918eb20898cbea76e6093b77e8.png and /dev/null differ diff --git a/_images/math/4fcd653db25b0a0e3f6c4020bd872d12399aaecb.png b/_images/math/4fcd653db25b0a0e3f6c4020bd872d12399aaecb.png deleted file mode 100644 index 79c1ed70b..000000000 Binary files a/_images/math/4fcd653db25b0a0e3f6c4020bd872d12399aaecb.png and /dev/null differ diff --git a/_images/math/507f606cc720a165a1936a127f1b480c9854b9d4.png b/_images/math/507f606cc720a165a1936a127f1b480c9854b9d4.png deleted file mode 100644 index df5aa3d16..000000000 Binary files a/_images/math/507f606cc720a165a1936a127f1b480c9854b9d4.png and /dev/null differ diff --git a/_images/math/50d099a6f3a20bd31d8526c2a086af9c44e7c100.png b/_images/math/50d099a6f3a20bd31d8526c2a086af9c44e7c100.png deleted file mode 100644 index 306f843fa..000000000 Binary files a/_images/math/50d099a6f3a20bd31d8526c2a086af9c44e7c100.png and /dev/null differ diff --git a/_images/math/50f62fa5c944a467d0ed2876815381006a2f0631.png b/_images/math/50f62fa5c944a467d0ed2876815381006a2f0631.png deleted file mode 100644 index 43f7d0b55..000000000 Binary files a/_images/math/50f62fa5c944a467d0ed2876815381006a2f0631.png and /dev/null differ diff --git a/_images/math/5227a5802320c72e5b5896b28aecf0d2f1b8fa1b.png b/_images/math/5227a5802320c72e5b5896b28aecf0d2f1b8fa1b.png deleted file mode 100644 index c1b3bc1fd..000000000 Binary files a/_images/math/5227a5802320c72e5b5896b28aecf0d2f1b8fa1b.png and /dev/null differ diff --git a/_images/math/523b2159fd900f6a3bcf27e7d8a5f862d484792a.png b/_images/math/523b2159fd900f6a3bcf27e7d8a5f862d484792a.png deleted file mode 100644 index fa74a3726..000000000 Binary files a/_images/math/523b2159fd900f6a3bcf27e7d8a5f862d484792a.png and /dev/null differ diff --git a/_images/math/5297a2c39c035905dc16f74a46fcb1b04743f8c5.png b/_images/math/5297a2c39c035905dc16f74a46fcb1b04743f8c5.png deleted file mode 100644 index a98edc832..000000000 Binary files a/_images/math/5297a2c39c035905dc16f74a46fcb1b04743f8c5.png and /dev/null differ diff --git a/_images/math/52bdb5e575bdaf7ecef2374657e50e060ac2dfb5.png b/_images/math/52bdb5e575bdaf7ecef2374657e50e060ac2dfb5.png deleted file mode 100644 index c2d1c7b45..000000000 Binary files a/_images/math/52bdb5e575bdaf7ecef2374657e50e060ac2dfb5.png and /dev/null differ diff --git a/_images/math/53f8a7e3f1b4b871620b4e6bd92e231d3abb6432.png b/_images/math/53f8a7e3f1b4b871620b4e6bd92e231d3abb6432.png deleted file mode 100644 index 76d66e784..000000000 Binary files a/_images/math/53f8a7e3f1b4b871620b4e6bd92e231d3abb6432.png and /dev/null differ diff --git a/_images/math/5405062f859c542bd66ee9e3a229783e4ca7b8e5.png b/_images/math/5405062f859c542bd66ee9e3a229783e4ca7b8e5.png deleted file mode 100644 index ac653ebef..000000000 Binary files a/_images/math/5405062f859c542bd66ee9e3a229783e4ca7b8e5.png and /dev/null differ diff --git a/_images/math/551889764fc956628131d0a452fcd73d7bdd7f44.png b/_images/math/551889764fc956628131d0a452fcd73d7bdd7f44.png deleted file mode 100644 index ac1ea3173..000000000 Binary files a/_images/math/551889764fc956628131d0a452fcd73d7bdd7f44.png and /dev/null differ diff --git a/_images/math/5594347865c09b52b42e6af2c5881703ed18887e.png b/_images/math/5594347865c09b52b42e6af2c5881703ed18887e.png deleted file mode 100644 index 77dc7f662..000000000 Binary files a/_images/math/5594347865c09b52b42e6af2c5881703ed18887e.png and /dev/null differ diff --git a/_images/math/5596e22c6a95f7867261c9c03287f5b55a07009d.png b/_images/math/5596e22c6a95f7867261c9c03287f5b55a07009d.png deleted file mode 100644 index e6ca6b5d4..000000000 Binary files a/_images/math/5596e22c6a95f7867261c9c03287f5b55a07009d.png and /dev/null differ diff --git a/_images/math/56731206eaf31bc12ca052ce9663212f4427e345.png b/_images/math/56731206eaf31bc12ca052ce9663212f4427e345.png deleted file mode 100644 index 97aaa00ee..000000000 Binary files a/_images/math/56731206eaf31bc12ca052ce9663212f4427e345.png and /dev/null differ diff --git a/_images/math/568c35dddb1925ee86cbb6b72e011203076678b9.png b/_images/math/568c35dddb1925ee86cbb6b72e011203076678b9.png deleted file mode 100644 index d74ed632a..000000000 Binary files a/_images/math/568c35dddb1925ee86cbb6b72e011203076678b9.png and /dev/null differ diff --git a/_images/math/56d1e820b60c5df6aa6b8b64c7645c6d72d3e3c9.png b/_images/math/56d1e820b60c5df6aa6b8b64c7645c6d72d3e3c9.png deleted file mode 100644 index 25a175796..000000000 Binary files a/_images/math/56d1e820b60c5df6aa6b8b64c7645c6d72d3e3c9.png and /dev/null differ diff --git a/_images/math/570903dbf7ac37848a90dbabfc4dc2975ff713bb.png b/_images/math/570903dbf7ac37848a90dbabfc4dc2975ff713bb.png deleted file mode 100644 index 6ec26d0e8..000000000 Binary files a/_images/math/570903dbf7ac37848a90dbabfc4dc2975ff713bb.png and /dev/null differ diff --git a/_images/math/5735b058bc43602a003600fb0edb3c6da0dedc38.png b/_images/math/5735b058bc43602a003600fb0edb3c6da0dedc38.png deleted file mode 100644 index 538f4ae77..000000000 Binary files a/_images/math/5735b058bc43602a003600fb0edb3c6da0dedc38.png and /dev/null differ diff --git a/_images/math/576d4929ebf1fbb6d919095c4e9d38a115c5d23a.png b/_images/math/576d4929ebf1fbb6d919095c4e9d38a115c5d23a.png deleted file mode 100644 index 84879e318..000000000 Binary files a/_images/math/576d4929ebf1fbb6d919095c4e9d38a115c5d23a.png and /dev/null differ diff --git a/_images/math/57a43153dc6d20b1ba70e416d1787f3fde8f601d.png b/_images/math/57a43153dc6d20b1ba70e416d1787f3fde8f601d.png deleted file mode 100644 index 893850eba..000000000 Binary files a/_images/math/57a43153dc6d20b1ba70e416d1787f3fde8f601d.png and /dev/null differ diff --git a/_images/math/5833b5df9e8717d434eef2e056217f616d67ca5b.png b/_images/math/5833b5df9e8717d434eef2e056217f616d67ca5b.png deleted file mode 100644 index 291db7bca..000000000 Binary files a/_images/math/5833b5df9e8717d434eef2e056217f616d67ca5b.png and /dev/null differ diff --git a/_images/math/58798ce83b38f451070ce0e5345d8913710b83fb.png b/_images/math/58798ce83b38f451070ce0e5345d8913710b83fb.png deleted file mode 100644 index 733efb63f..000000000 Binary files a/_images/math/58798ce83b38f451070ce0e5345d8913710b83fb.png and /dev/null differ diff --git a/_images/math/58bad4156e6d6bb080580d39f1d18decab95979b.png b/_images/math/58bad4156e6d6bb080580d39f1d18decab95979b.png deleted file mode 100644 index b1aae5cec..000000000 Binary files a/_images/math/58bad4156e6d6bb080580d39f1d18decab95979b.png and /dev/null differ diff --git a/_images/math/59c19f14f36996ad36d83a2454b0ae316a42d617.png b/_images/math/59c19f14f36996ad36d83a2454b0ae316a42d617.png deleted file mode 100644 index 8602a09b1..000000000 Binary files a/_images/math/59c19f14f36996ad36d83a2454b0ae316a42d617.png and /dev/null differ diff --git a/_images/math/59ee4be8120378694d96519877a9b2f9bc6cf737.png b/_images/math/59ee4be8120378694d96519877a9b2f9bc6cf737.png deleted file mode 100644 index 3cb8fa8d2..000000000 Binary files a/_images/math/59ee4be8120378694d96519877a9b2f9bc6cf737.png and /dev/null differ diff --git a/_images/math/5a1290cad0d24fe30457ba15b60207ceab26ea49.png b/_images/math/5a1290cad0d24fe30457ba15b60207ceab26ea49.png deleted file mode 100644 index 079afccda..000000000 Binary files a/_images/math/5a1290cad0d24fe30457ba15b60207ceab26ea49.png and /dev/null differ diff --git a/_images/math/5a399bb11d5c0807bed352b3dca588a253540a6a.png b/_images/math/5a399bb11d5c0807bed352b3dca588a253540a6a.png deleted file mode 100644 index 5c8eeb83c..000000000 Binary files a/_images/math/5a399bb11d5c0807bed352b3dca588a253540a6a.png and /dev/null differ diff --git a/_images/math/5a4acbbccbf5114126e4ec10e7c8c4c35a37c515.png b/_images/math/5a4acbbccbf5114126e4ec10e7c8c4c35a37c515.png deleted file mode 100644 index 297742017..000000000 Binary files a/_images/math/5a4acbbccbf5114126e4ec10e7c8c4c35a37c515.png and /dev/null differ diff --git a/_images/math/5a8e85f76137bc4bdb54fbb297c301d6fddd9f71.png b/_images/math/5a8e85f76137bc4bdb54fbb297c301d6fddd9f71.png deleted file mode 100644 index 5bd7f139c..000000000 Binary files a/_images/math/5a8e85f76137bc4bdb54fbb297c301d6fddd9f71.png and /dev/null differ diff --git a/_images/math/5aad060802a4efec7d4ac4cbd0356ce35143f6ad.png b/_images/math/5aad060802a4efec7d4ac4cbd0356ce35143f6ad.png deleted file mode 100644 index b2197b46e..000000000 Binary files a/_images/math/5aad060802a4efec7d4ac4cbd0356ce35143f6ad.png and /dev/null differ diff --git a/_images/math/5c2a86a879a4a8e28c444809ab9fad109bec8883.png b/_images/math/5c2a86a879a4a8e28c444809ab9fad109bec8883.png deleted file mode 100644 index 3cc0c5a49..000000000 Binary files a/_images/math/5c2a86a879a4a8e28c444809ab9fad109bec8883.png and /dev/null differ diff --git a/_images/math/5c4fc0ac8edd6ce5b9093890970e60ae4d760c73.png b/_images/math/5c4fc0ac8edd6ce5b9093890970e60ae4d760c73.png deleted file mode 100644 index 310815944..000000000 Binary files a/_images/math/5c4fc0ac8edd6ce5b9093890970e60ae4d760c73.png and /dev/null differ diff --git a/_images/math/5cb5126587f2e6bfa91602fc7a3b0df2e6f2956c.png b/_images/math/5cb5126587f2e6bfa91602fc7a3b0df2e6f2956c.png deleted file mode 100644 index f68898570..000000000 Binary files a/_images/math/5cb5126587f2e6bfa91602fc7a3b0df2e6f2956c.png and /dev/null differ diff --git a/_images/math/5ccef264db48025f4aca2210f3913bed94b4c71f.png b/_images/math/5ccef264db48025f4aca2210f3913bed94b4c71f.png deleted file mode 100644 index 847dc18ef..000000000 Binary files a/_images/math/5ccef264db48025f4aca2210f3913bed94b4c71f.png and /dev/null differ diff --git a/_images/math/5cf55a068f84b8b70b11bd406f3cb866e2d46b0b.png b/_images/math/5cf55a068f84b8b70b11bd406f3cb866e2d46b0b.png deleted file mode 100644 index d7c290b1f..000000000 Binary files a/_images/math/5cf55a068f84b8b70b11bd406f3cb866e2d46b0b.png and /dev/null differ diff --git a/_images/math/5e57efa4273ca827cffb8be255b766bcbb6f24f2.png b/_images/math/5e57efa4273ca827cffb8be255b766bcbb6f24f2.png deleted file mode 100644 index adfa8fabf..000000000 Binary files a/_images/math/5e57efa4273ca827cffb8be255b766bcbb6f24f2.png and /dev/null differ diff --git a/_images/math/5e87bf41a96deddf6cb485ff530f153f2590e9cc.png b/_images/math/5e87bf41a96deddf6cb485ff530f153f2590e9cc.png deleted file mode 100644 index be7e5fa48..000000000 Binary files a/_images/math/5e87bf41a96deddf6cb485ff530f153f2590e9cc.png and /dev/null differ diff --git a/_images/math/6069c1d194d08831dac6d14c6c98a4ff476dca4a.png b/_images/math/6069c1d194d08831dac6d14c6c98a4ff476dca4a.png deleted file mode 100644 index 5519f7966..000000000 Binary files a/_images/math/6069c1d194d08831dac6d14c6c98a4ff476dca4a.png and /dev/null differ diff --git a/_images/math/60dc83a31b841e5c1b60be0d1b4fb3cf8cfd9093.png b/_images/math/60dc83a31b841e5c1b60be0d1b4fb3cf8cfd9093.png deleted file mode 100644 index e228756e9..000000000 Binary files a/_images/math/60dc83a31b841e5c1b60be0d1b4fb3cf8cfd9093.png and /dev/null differ diff --git a/_images/math/612186422bcb9861a07687eac878989b5eb2c878.png b/_images/math/612186422bcb9861a07687eac878989b5eb2c878.png deleted file mode 100644 index f7c6c4a9e..000000000 Binary files a/_images/math/612186422bcb9861a07687eac878989b5eb2c878.png and /dev/null differ diff --git a/_images/math/6126c8a1fbedbf5212ef96dbc865c96abc68f77f.png b/_images/math/6126c8a1fbedbf5212ef96dbc865c96abc68f77f.png deleted file mode 100644 index df5aa3d16..000000000 Binary files a/_images/math/6126c8a1fbedbf5212ef96dbc865c96abc68f77f.png and /dev/null differ diff --git a/_images/math/614475cc8905448a17b73bce384ec9328ebfee1a.png b/_images/math/614475cc8905448a17b73bce384ec9328ebfee1a.png deleted file mode 100644 index 0f8c11f17..000000000 Binary files a/_images/math/614475cc8905448a17b73bce384ec9328ebfee1a.png and /dev/null differ diff --git a/_images/math/61a4f1b9873d704b7cf45fbf468cb85ed94ab9e4.png b/_images/math/61a4f1b9873d704b7cf45fbf468cb85ed94ab9e4.png deleted file mode 100644 index d6bd3f504..000000000 Binary files a/_images/math/61a4f1b9873d704b7cf45fbf468cb85ed94ab9e4.png and /dev/null differ diff --git a/_images/math/621a63854b2afad3f5a9dfc3bcc7d5181377c3f8.png b/_images/math/621a63854b2afad3f5a9dfc3bcc7d5181377c3f8.png deleted file mode 100644 index 1016916da..000000000 Binary files a/_images/math/621a63854b2afad3f5a9dfc3bcc7d5181377c3f8.png and /dev/null differ diff --git a/_images/math/6234fba3d9eba6b77238680515ad9c3ea7c882f5.png b/_images/math/6234fba3d9eba6b77238680515ad9c3ea7c882f5.png deleted file mode 100644 index 29f392da1..000000000 Binary files a/_images/math/6234fba3d9eba6b77238680515ad9c3ea7c882f5.png and /dev/null differ diff --git a/_images/math/62464d05981979f1f40f1ef8e007bf08777e4130.png b/_images/math/62464d05981979f1f40f1ef8e007bf08777e4130.png deleted file mode 100644 index 01dcdf326..000000000 Binary files a/_images/math/62464d05981979f1f40f1ef8e007bf08777e4130.png and /dev/null differ diff --git a/_images/math/6284404cd015cb671ae5fa23af8aa0e659143667.png b/_images/math/6284404cd015cb671ae5fa23af8aa0e659143667.png deleted file mode 100644 index 416108347..000000000 Binary files a/_images/math/6284404cd015cb671ae5fa23af8aa0e659143667.png and /dev/null differ diff --git a/_images/math/628e512df2f9a3e3fd4bc9f0e181edb9921b7ba0.png b/_images/math/628e512df2f9a3e3fd4bc9f0e181edb9921b7ba0.png deleted file mode 100644 index 083c26fa0..000000000 Binary files a/_images/math/628e512df2f9a3e3fd4bc9f0e181edb9921b7ba0.png and /dev/null differ diff --git a/_images/math/63a7a23b4aeb6fe2bfe863e764884ac5a99ecb24.png b/_images/math/63a7a23b4aeb6fe2bfe863e764884ac5a99ecb24.png deleted file mode 100644 index fad1bb361..000000000 Binary files a/_images/math/63a7a23b4aeb6fe2bfe863e764884ac5a99ecb24.png and /dev/null differ diff --git a/_images/math/643600458a506d91aa1296a389b9c019c8da61e4.png b/_images/math/643600458a506d91aa1296a389b9c019c8da61e4.png deleted file mode 100644 index d772f3e5c..000000000 Binary files a/_images/math/643600458a506d91aa1296a389b9c019c8da61e4.png and /dev/null differ diff --git a/_images/math/64633c7ba4c28b27b6922e8c01d098646ef03a75.png b/_images/math/64633c7ba4c28b27b6922e8c01d098646ef03a75.png deleted file mode 100644 index 915514ce0..000000000 Binary files a/_images/math/64633c7ba4c28b27b6922e8c01d098646ef03a75.png and /dev/null differ diff --git a/_images/math/65868d23a5bfe5b3b2d819386b19c14fa36af134.png b/_images/math/65868d23a5bfe5b3b2d819386b19c14fa36af134.png deleted file mode 100644 index 429ac723c..000000000 Binary files a/_images/math/65868d23a5bfe5b3b2d819386b19c14fa36af134.png and /dev/null differ diff --git a/_images/math/6621e9a4f59e8443577deac1e54de246648248dd.png b/_images/math/6621e9a4f59e8443577deac1e54de246648248dd.png deleted file mode 100644 index aae1768e4..000000000 Binary files a/_images/math/6621e9a4f59e8443577deac1e54de246648248dd.png and /dev/null differ diff --git a/_images/math/664227398bc2959506ad69aa350048913e8a6964.png b/_images/math/664227398bc2959506ad69aa350048913e8a6964.png deleted file mode 100644 index 6dffa31e1..000000000 Binary files a/_images/math/664227398bc2959506ad69aa350048913e8a6964.png and /dev/null differ diff --git a/_images/math/66475937f97a576931c846accf149118478546f2.png b/_images/math/66475937f97a576931c846accf149118478546f2.png deleted file mode 100644 index ccba11365..000000000 Binary files a/_images/math/66475937f97a576931c846accf149118478546f2.png and /dev/null differ diff --git a/_images/math/6724b8ac3684879080253173f4cc5ad69a13056e.png b/_images/math/6724b8ac3684879080253173f4cc5ad69a13056e.png deleted file mode 100644 index 63120da51..000000000 Binary files a/_images/math/6724b8ac3684879080253173f4cc5ad69a13056e.png and /dev/null differ diff --git a/_images/math/677c41f6cff2054377d93db9884cbb7ccc0ba060.png b/_images/math/677c41f6cff2054377d93db9884cbb7ccc0ba060.png deleted file mode 100644 index 86c8a55ce..000000000 Binary files a/_images/math/677c41f6cff2054377d93db9884cbb7ccc0ba060.png and /dev/null differ diff --git a/_images/math/67f4714f065d485540ad40829e0717bf75e9dd85.png b/_images/math/67f4714f065d485540ad40829e0717bf75e9dd85.png deleted file mode 100644 index 74cacfb8e..000000000 Binary files a/_images/math/67f4714f065d485540ad40829e0717bf75e9dd85.png and /dev/null differ diff --git a/_images/math/67fcaa1712e65be1f318a4f88df48d302ec994a8.png b/_images/math/67fcaa1712e65be1f318a4f88df48d302ec994a8.png deleted file mode 100644 index bcace6215..000000000 Binary files a/_images/math/67fcaa1712e65be1f318a4f88df48d302ec994a8.png and /dev/null differ diff --git a/_images/math/6859317dd1b439cef34131bcd4bafee8393444e0.png b/_images/math/6859317dd1b439cef34131bcd4bafee8393444e0.png deleted file mode 100644 index 359a20a8d..000000000 Binary files a/_images/math/6859317dd1b439cef34131bcd4bafee8393444e0.png and /dev/null differ diff --git a/_images/math/68a45f4f778cb1713989fc95537efe07383c3357.png b/_images/math/68a45f4f778cb1713989fc95537efe07383c3357.png deleted file mode 100644 index 2d7e4cf89..000000000 Binary files a/_images/math/68a45f4f778cb1713989fc95537efe07383c3357.png and /dev/null differ diff --git a/_images/math/68adca6871086a90d32b8c23c1c5c3aa5c19d282.png b/_images/math/68adca6871086a90d32b8c23c1c5c3aa5c19d282.png deleted file mode 100644 index e5ffe1cb4..000000000 Binary files a/_images/math/68adca6871086a90d32b8c23c1c5c3aa5c19d282.png and /dev/null differ diff --git a/_images/math/69363585db6d8c715083681d2511f1ffcefadf04.png b/_images/math/69363585db6d8c715083681d2511f1ffcefadf04.png deleted file mode 100644 index 413c5a9be..000000000 Binary files a/_images/math/69363585db6d8c715083681d2511f1ffcefadf04.png and /dev/null differ diff --git a/_images/math/693faad2f042b0565c90df7cfced16cb9413c166.png b/_images/math/693faad2f042b0565c90df7cfced16cb9413c166.png deleted file mode 100644 index 73f020c7f..000000000 Binary files a/_images/math/693faad2f042b0565c90df7cfced16cb9413c166.png and /dev/null differ diff --git a/_images/math/69b9fd7e970f8fe8b5426d25c6e19496d623eb9c.png b/_images/math/69b9fd7e970f8fe8b5426d25c6e19496d623eb9c.png deleted file mode 100644 index 940c3536f..000000000 Binary files a/_images/math/69b9fd7e970f8fe8b5426d25c6e19496d623eb9c.png and /dev/null differ diff --git a/_images/math/69d22d2ba590e0a274a16ae266a95b811cdf377c.png b/_images/math/69d22d2ba590e0a274a16ae266a95b811cdf377c.png deleted file mode 100644 index 7c06c71a0..000000000 Binary files a/_images/math/69d22d2ba590e0a274a16ae266a95b811cdf377c.png and /dev/null differ diff --git a/_images/math/6b58534f74db5ec2f662ffdd5c7a89bf518cd4b4.png b/_images/math/6b58534f74db5ec2f662ffdd5c7a89bf518cd4b4.png deleted file mode 100644 index 17d2883d6..000000000 Binary files a/_images/math/6b58534f74db5ec2f662ffdd5c7a89bf518cd4b4.png and /dev/null differ diff --git a/_images/math/6b66eedfc21c91dc56f58cf02599f83b26644610.png b/_images/math/6b66eedfc21c91dc56f58cf02599f83b26644610.png deleted file mode 100644 index 852ff76c5..000000000 Binary files a/_images/math/6b66eedfc21c91dc56f58cf02599f83b26644610.png and /dev/null differ diff --git a/_images/math/6b8c85f8238b5e4678c9962a41d8da1037668558.png b/_images/math/6b8c85f8238b5e4678c9962a41d8da1037668558.png deleted file mode 100644 index 71ad1c905..000000000 Binary files a/_images/math/6b8c85f8238b5e4678c9962a41d8da1037668558.png and /dev/null differ diff --git a/_images/math/6bc2a1f29c71738f8be435b364d5a9d3d0329bf0.png b/_images/math/6bc2a1f29c71738f8be435b364d5a9d3d0329bf0.png deleted file mode 100644 index f2b88bdde..000000000 Binary files a/_images/math/6bc2a1f29c71738f8be435b364d5a9d3d0329bf0.png and /dev/null differ diff --git a/_images/math/6d42c88506b8da39a2a23653aecbfb7c29728063.png b/_images/math/6d42c88506b8da39a2a23653aecbfb7c29728063.png deleted file mode 100644 index 4fdac26e7..000000000 Binary files a/_images/math/6d42c88506b8da39a2a23653aecbfb7c29728063.png and /dev/null differ diff --git a/_images/math/6e19265e240224180b9f8d4d017db7658e33f3a7.png b/_images/math/6e19265e240224180b9f8d4d017db7658e33f3a7.png deleted file mode 100644 index 55bc0912c..000000000 Binary files a/_images/math/6e19265e240224180b9f8d4d017db7658e33f3a7.png and /dev/null differ diff --git a/_images/math/6e5a1041d6cc18eff2b55b18f087de59f2ed28df.png b/_images/math/6e5a1041d6cc18eff2b55b18f087de59f2ed28df.png deleted file mode 100644 index 7a0bf0803..000000000 Binary files a/_images/math/6e5a1041d6cc18eff2b55b18f087de59f2ed28df.png and /dev/null differ diff --git a/_images/math/7004b20e531390a1beec2904b6a7cc884545e597.png b/_images/math/7004b20e531390a1beec2904b6a7cc884545e597.png deleted file mode 100644 index 87e9fb3e2..000000000 Binary files a/_images/math/7004b20e531390a1beec2904b6a7cc884545e597.png and /dev/null differ diff --git a/_images/math/71251b82ba43d4bff45545b85cb5e04270582c10.png b/_images/math/71251b82ba43d4bff45545b85cb5e04270582c10.png deleted file mode 100644 index d7f3be8ac..000000000 Binary files a/_images/math/71251b82ba43d4bff45545b85cb5e04270582c10.png and /dev/null differ diff --git a/_images/math/71267dc66b3e219cd397c66e5ad169b3587037e6.png b/_images/math/71267dc66b3e219cd397c66e5ad169b3587037e6.png deleted file mode 100644 index b9eaeb763..000000000 Binary files a/_images/math/71267dc66b3e219cd397c66e5ad169b3587037e6.png and /dev/null differ diff --git a/_images/math/71ee37aa0813ab837cabd5846e4666a91604455b.png b/_images/math/71ee37aa0813ab837cabd5846e4666a91604455b.png deleted file mode 100644 index b86306af6..000000000 Binary files a/_images/math/71ee37aa0813ab837cabd5846e4666a91604455b.png and /dev/null differ diff --git a/_images/math/7309379b4001d8097c2b5bc82a4145d140ca0404.png b/_images/math/7309379b4001d8097c2b5bc82a4145d140ca0404.png deleted file mode 100644 index 6d8ccb0b8..000000000 Binary files a/_images/math/7309379b4001d8097c2b5bc82a4145d140ca0404.png and /dev/null differ diff --git a/_images/math/730e954e72ee5a6d908958dd1eb3249ade38bdad.png b/_images/math/730e954e72ee5a6d908958dd1eb3249ade38bdad.png deleted file mode 100644 index 627c2f4db..000000000 Binary files a/_images/math/730e954e72ee5a6d908958dd1eb3249ade38bdad.png and /dev/null differ diff --git a/_images/math/7321eed5feceac9bc2a006d3372a7504afec4e7f.png b/_images/math/7321eed5feceac9bc2a006d3372a7504afec4e7f.png deleted file mode 100644 index 4b6aa7153..000000000 Binary files a/_images/math/7321eed5feceac9bc2a006d3372a7504afec4e7f.png and /dev/null differ diff --git a/_images/math/737f793a8d63dc6c995c7aca65a58ce1981fffe3.png b/_images/math/737f793a8d63dc6c995c7aca65a58ce1981fffe3.png deleted file mode 100644 index ee87b68f5..000000000 Binary files a/_images/math/737f793a8d63dc6c995c7aca65a58ce1981fffe3.png and /dev/null differ diff --git a/_images/math/739f0918f34e8c88771b97aaf712aae558494d17.png b/_images/math/739f0918f34e8c88771b97aaf712aae558494d17.png deleted file mode 100644 index 261728fda..000000000 Binary files a/_images/math/739f0918f34e8c88771b97aaf712aae558494d17.png and /dev/null differ diff --git a/_images/math/73d277ae6306fb2c824312f5919d8671da448cf7.png b/_images/math/73d277ae6306fb2c824312f5919d8671da448cf7.png deleted file mode 100644 index 473c1121b..000000000 Binary files a/_images/math/73d277ae6306fb2c824312f5919d8671da448cf7.png and /dev/null differ diff --git a/_images/math/73df4cc8f91d714ddae4facc6a36cfdda9cf1b7c.png b/_images/math/73df4cc8f91d714ddae4facc6a36cfdda9cf1b7c.png deleted file mode 100644 index db90cb576..000000000 Binary files a/_images/math/73df4cc8f91d714ddae4facc6a36cfdda9cf1b7c.png and /dev/null differ diff --git a/_images/math/73f5e249c88b2b3068263480f576b051cb5c4f6e.png b/_images/math/73f5e249c88b2b3068263480f576b051cb5c4f6e.png deleted file mode 100644 index ac8d26696..000000000 Binary files a/_images/math/73f5e249c88b2b3068263480f576b051cb5c4f6e.png and /dev/null differ diff --git a/_images/math/73f798e186e0b80eb53eb525014f83d6d22247c3.png b/_images/math/73f798e186e0b80eb53eb525014f83d6d22247c3.png deleted file mode 100644 index 488053bf1..000000000 Binary files a/_images/math/73f798e186e0b80eb53eb525014f83d6d22247c3.png and /dev/null differ diff --git a/_images/math/742514ec92c5d75a8bf69bef014b23ef65d4da1f.png b/_images/math/742514ec92c5d75a8bf69bef014b23ef65d4da1f.png deleted file mode 100644 index 40caebae4..000000000 Binary files a/_images/math/742514ec92c5d75a8bf69bef014b23ef65d4da1f.png and /dev/null differ diff --git a/_images/math/75e27f04188974063be3230dca208cd495b77ce1.png b/_images/math/75e27f04188974063be3230dca208cd495b77ce1.png deleted file mode 100644 index 368017c9e..000000000 Binary files a/_images/math/75e27f04188974063be3230dca208cd495b77ce1.png and /dev/null differ diff --git a/_images/math/75edee3f73619d38eccbb9a39a88557f0eb2b2a9.png b/_images/math/75edee3f73619d38eccbb9a39a88557f0eb2b2a9.png deleted file mode 100644 index 1efd033bc..000000000 Binary files a/_images/math/75edee3f73619d38eccbb9a39a88557f0eb2b2a9.png and /dev/null differ diff --git a/_images/math/76a33761ccef4515da31d00bfd374f17f00dc875.png b/_images/math/76a33761ccef4515da31d00bfd374f17f00dc875.png deleted file mode 100644 index 0b19132a8..000000000 Binary files a/_images/math/76a33761ccef4515da31d00bfd374f17f00dc875.png and /dev/null differ diff --git a/_images/math/76d517ee1c28385305946405479f8033e1fe5dbc.png b/_images/math/76d517ee1c28385305946405479f8033e1fe5dbc.png deleted file mode 100644 index a2cdde802..000000000 Binary files a/_images/math/76d517ee1c28385305946405479f8033e1fe5dbc.png and /dev/null differ diff --git a/_images/math/76da344aabdb79db1bd1d0edc525c5f33d7a0d03.png b/_images/math/76da344aabdb79db1bd1d0edc525c5f33d7a0d03.png deleted file mode 100644 index 87bfca12f..000000000 Binary files a/_images/math/76da344aabdb79db1bd1d0edc525c5f33d7a0d03.png and /dev/null differ diff --git a/_images/math/774a6dcf87a4e68add2d8465e04bd5ff235bf631.png b/_images/math/774a6dcf87a4e68add2d8465e04bd5ff235bf631.png deleted file mode 100644 index 5152bbf60..000000000 Binary files a/_images/math/774a6dcf87a4e68add2d8465e04bd5ff235bf631.png and /dev/null differ diff --git a/_images/math/780babc751bf3046536b0e910c7788aa06ddc2b4.png b/_images/math/780babc751bf3046536b0e910c7788aa06ddc2b4.png deleted file mode 100644 index ddd51a5b5..000000000 Binary files a/_images/math/780babc751bf3046536b0e910c7788aa06ddc2b4.png and /dev/null differ diff --git a/_images/math/7880c1019f954496cb6f8f0463d5ab8f11adf8d7.png b/_images/math/7880c1019f954496cb6f8f0463d5ab8f11adf8d7.png deleted file mode 100644 index 0b19132a8..000000000 Binary files a/_images/math/7880c1019f954496cb6f8f0463d5ab8f11adf8d7.png and /dev/null differ diff --git a/_images/math/78f2d8da3872001ed553883deb988f8519419628.png b/_images/math/78f2d8da3872001ed553883deb988f8519419628.png deleted file mode 100644 index 474956fde..000000000 Binary files a/_images/math/78f2d8da3872001ed553883deb988f8519419628.png and /dev/null differ diff --git a/_images/math/79122adca470847098c087a9c76afa51ae3a8a4f.png b/_images/math/79122adca470847098c087a9c76afa51ae3a8a4f.png deleted file mode 100644 index 2d92f1032..000000000 Binary files a/_images/math/79122adca470847098c087a9c76afa51ae3a8a4f.png and /dev/null differ diff --git a/_images/math/79db348018d3038efeba5653af973e3191a5f656.png b/_images/math/79db348018d3038efeba5653af973e3191a5f656.png deleted file mode 100644 index 54534eca1..000000000 Binary files a/_images/math/79db348018d3038efeba5653af973e3191a5f656.png and /dev/null differ diff --git a/_images/math/7a4c1cd57a0f7dc6d01ef365e2ba68a499bb3851.png b/_images/math/7a4c1cd57a0f7dc6d01ef365e2ba68a499bb3851.png deleted file mode 100644 index ee623e1b2..000000000 Binary files a/_images/math/7a4c1cd57a0f7dc6d01ef365e2ba68a499bb3851.png and /dev/null differ diff --git a/_images/math/7a719283c69a156a80517f4d9365b28ba238f687.png b/_images/math/7a719283c69a156a80517f4d9365b28ba238f687.png deleted file mode 100644 index e8f6a6905..000000000 Binary files a/_images/math/7a719283c69a156a80517f4d9365b28ba238f687.png and /dev/null differ diff --git a/_images/math/7a757c8fad50b2717c09765286bad6a29183172e.png b/_images/math/7a757c8fad50b2717c09765286bad6a29183172e.png deleted file mode 100644 index 9f7344422..000000000 Binary files a/_images/math/7a757c8fad50b2717c09765286bad6a29183172e.png and /dev/null differ diff --git a/_images/math/7b1816c51f7d31275cd3ad400208fb7b3ce136a0.png b/_images/math/7b1816c51f7d31275cd3ad400208fb7b3ce136a0.png deleted file mode 100644 index 757bd96e2..000000000 Binary files a/_images/math/7b1816c51f7d31275cd3ad400208fb7b3ce136a0.png and /dev/null differ diff --git a/_images/math/7b8557054b1b3cb87e6803c05fcd8ee3d255ac6b.png b/_images/math/7b8557054b1b3cb87e6803c05fcd8ee3d255ac6b.png deleted file mode 100644 index 09992be4f..000000000 Binary files a/_images/math/7b8557054b1b3cb87e6803c05fcd8ee3d255ac6b.png and /dev/null differ diff --git a/_images/math/7b8aa1da40b0ca595ce4001be917ed201bb30372.png b/_images/math/7b8aa1da40b0ca595ce4001be917ed201bb30372.png deleted file mode 100644 index 1ddbe72c6..000000000 Binary files a/_images/math/7b8aa1da40b0ca595ce4001be917ed201bb30372.png and /dev/null differ diff --git a/_images/math/7c7fb4eaffbe4f925e8061c338fce30b152f87de.png b/_images/math/7c7fb4eaffbe4f925e8061c338fce30b152f87de.png deleted file mode 100644 index 0dacd2e33..000000000 Binary files a/_images/math/7c7fb4eaffbe4f925e8061c338fce30b152f87de.png and /dev/null differ diff --git a/_images/math/7cd7fa9044e5de80b81325c94ae3630290ce7d1d.png b/_images/math/7cd7fa9044e5de80b81325c94ae3630290ce7d1d.png deleted file mode 100644 index 4cdb7918b..000000000 Binary files a/_images/math/7cd7fa9044e5de80b81325c94ae3630290ce7d1d.png and /dev/null differ diff --git a/_images/math/7d721058e74d66554f7bbe575ed3a61814e8ae10.png b/_images/math/7d721058e74d66554f7bbe575ed3a61814e8ae10.png deleted file mode 100644 index 6a67a1b11..000000000 Binary files a/_images/math/7d721058e74d66554f7bbe575ed3a61814e8ae10.png and /dev/null differ diff --git a/_images/math/7d7a0f1939ae07d1c69f965c05e93df7657d588b.png b/_images/math/7d7a0f1939ae07d1c69f965c05e93df7657d588b.png deleted file mode 100644 index f510dc11b..000000000 Binary files a/_images/math/7d7a0f1939ae07d1c69f965c05e93df7657d588b.png and /dev/null differ diff --git a/_images/math/7d9b6b3a3f236f88bac2d3cee95acfa6de62a294.png b/_images/math/7d9b6b3a3f236f88bac2d3cee95acfa6de62a294.png deleted file mode 100644 index 8a24dc225..000000000 Binary files a/_images/math/7d9b6b3a3f236f88bac2d3cee95acfa6de62a294.png and /dev/null differ diff --git a/_images/math/7da619f2d4a1b1851f09ac6bc11d3483998c98e4.png b/_images/math/7da619f2d4a1b1851f09ac6bc11d3483998c98e4.png deleted file mode 100644 index 170177ddd..000000000 Binary files a/_images/math/7da619f2d4a1b1851f09ac6bc11d3483998c98e4.png and /dev/null differ diff --git a/_images/math/7da7f79468c969bc35bff406b0b9eefadeb64165.png b/_images/math/7da7f79468c969bc35bff406b0b9eefadeb64165.png deleted file mode 100644 index 9287bfd3b..000000000 Binary files a/_images/math/7da7f79468c969bc35bff406b0b9eefadeb64165.png and /dev/null differ diff --git a/_images/math/7db73590716d06f31345abe7eb6bbf3c88592801.png b/_images/math/7db73590716d06f31345abe7eb6bbf3c88592801.png deleted file mode 100644 index 1cd4af5b1..000000000 Binary files a/_images/math/7db73590716d06f31345abe7eb6bbf3c88592801.png and /dev/null differ diff --git a/_images/math/7dd2a5ea01fbd72ad2a58dd1f3d6ecbfde6208a1.png b/_images/math/7dd2a5ea01fbd72ad2a58dd1f3d6ecbfde6208a1.png deleted file mode 100644 index 7bfc4fc38..000000000 Binary files a/_images/math/7dd2a5ea01fbd72ad2a58dd1f3d6ecbfde6208a1.png and /dev/null differ diff --git a/_images/math/7e367f79d40e7f2e18d210c0ac7ddae0c6c35460.png b/_images/math/7e367f79d40e7f2e18d210c0ac7ddae0c6c35460.png deleted file mode 100644 index 7e3cf01d6..000000000 Binary files a/_images/math/7e367f79d40e7f2e18d210c0ac7ddae0c6c35460.png and /dev/null differ diff --git a/_images/math/7e61fb1a4df0f3209269dd383e153acb80f725e2.png b/_images/math/7e61fb1a4df0f3209269dd383e153acb80f725e2.png deleted file mode 100644 index 59d313130..000000000 Binary files a/_images/math/7e61fb1a4df0f3209269dd383e153acb80f725e2.png and /dev/null differ diff --git a/_images/math/7e93783753d8cc6027cc5eeb38100db7320249d0.png b/_images/math/7e93783753d8cc6027cc5eeb38100db7320249d0.png deleted file mode 100644 index 62fbaa199..000000000 Binary files a/_images/math/7e93783753d8cc6027cc5eeb38100db7320249d0.png and /dev/null differ diff --git a/_images/math/7f5e985e66252bad6ff62ab015cbbc5a15e60018.png b/_images/math/7f5e985e66252bad6ff62ab015cbbc5a15e60018.png deleted file mode 100644 index be98ac0a6..000000000 Binary files a/_images/math/7f5e985e66252bad6ff62ab015cbbc5a15e60018.png and /dev/null differ diff --git a/_images/math/7fe487f3393ac6c6a2a7d5931365d0b8158ae532.png b/_images/math/7fe487f3393ac6c6a2a7d5931365d0b8158ae532.png deleted file mode 100644 index ef01c6cfe..000000000 Binary files a/_images/math/7fe487f3393ac6c6a2a7d5931365d0b8158ae532.png and /dev/null differ diff --git a/_images/math/801a38221b33be0405b2fae01f3a16e09ca86d06.png b/_images/math/801a38221b33be0405b2fae01f3a16e09ca86d06.png deleted file mode 100644 index 31b96b059..000000000 Binary files a/_images/math/801a38221b33be0405b2fae01f3a16e09ca86d06.png and /dev/null differ diff --git a/_images/math/8033c031b846e26a221944f8a8e242e54fee4ac5.png b/_images/math/8033c031b846e26a221944f8a8e242e54fee4ac5.png deleted file mode 100644 index 5f45c87d8..000000000 Binary files a/_images/math/8033c031b846e26a221944f8a8e242e54fee4ac5.png and /dev/null differ diff --git a/_images/math/8071ff334721ab012d25650ac4095eec5ac776fe.png b/_images/math/8071ff334721ab012d25650ac4095eec5ac776fe.png deleted file mode 100644 index e5bc42ea6..000000000 Binary files a/_images/math/8071ff334721ab012d25650ac4095eec5ac776fe.png and /dev/null differ diff --git a/_images/math/80d7959bf679e0a57adb57d916c9692d8d556677.png b/_images/math/80d7959bf679e0a57adb57d916c9692d8d556677.png deleted file mode 100644 index 9f7a8884b..000000000 Binary files a/_images/math/80d7959bf679e0a57adb57d916c9692d8d556677.png and /dev/null differ diff --git a/_images/math/814e759e03cdf8ff060d4012cb1ffc6a9b2904fb.png b/_images/math/814e759e03cdf8ff060d4012cb1ffc6a9b2904fb.png deleted file mode 100644 index a94bc3f68..000000000 Binary files a/_images/math/814e759e03cdf8ff060d4012cb1ffc6a9b2904fb.png and /dev/null differ diff --git a/_images/math/819ddbfa34c2ef12f236f738c720be330bc80291.png b/_images/math/819ddbfa34c2ef12f236f738c720be330bc80291.png deleted file mode 100644 index ed4979f78..000000000 Binary files a/_images/math/819ddbfa34c2ef12f236f738c720be330bc80291.png and /dev/null differ diff --git a/_images/math/81b6dca86eb73d1748b4596e96ada934cd20e0e6.png b/_images/math/81b6dca86eb73d1748b4596e96ada934cd20e0e6.png deleted file mode 100644 index 9fd7aefb4..000000000 Binary files a/_images/math/81b6dca86eb73d1748b4596e96ada934cd20e0e6.png and /dev/null differ diff --git a/_images/math/81c9ecfb768181e525934dce274b01155d16656a.png b/_images/math/81c9ecfb768181e525934dce274b01155d16656a.png deleted file mode 100644 index 27d88fd62..000000000 Binary files a/_images/math/81c9ecfb768181e525934dce274b01155d16656a.png and /dev/null differ diff --git a/_images/math/81f58af0021e40d4fe9ce98d6fc8d1300d368524.png b/_images/math/81f58af0021e40d4fe9ce98d6fc8d1300d368524.png deleted file mode 100644 index 1208a3eb1..000000000 Binary files a/_images/math/81f58af0021e40d4fe9ce98d6fc8d1300d368524.png and /dev/null differ diff --git a/_images/math/82f3079220440d5925f313127c6b666a9af99f6c.png b/_images/math/82f3079220440d5925f313127c6b666a9af99f6c.png deleted file mode 100644 index fd4624bdb..000000000 Binary files a/_images/math/82f3079220440d5925f313127c6b666a9af99f6c.png and /dev/null differ diff --git a/_images/math/83fc9cf9e57ab2efd684555607bc04421dca79c7.png b/_images/math/83fc9cf9e57ab2efd684555607bc04421dca79c7.png deleted file mode 100644 index 6f84d8efa..000000000 Binary files a/_images/math/83fc9cf9e57ab2efd684555607bc04421dca79c7.png and /dev/null differ diff --git a/_images/math/8462d0800a1d75dc7618ba13c85c59822f5beb81.png b/_images/math/8462d0800a1d75dc7618ba13c85c59822f5beb81.png deleted file mode 100644 index debc1ef60..000000000 Binary files a/_images/math/8462d0800a1d75dc7618ba13c85c59822f5beb81.png and /dev/null differ diff --git a/_images/math/848156ad0aeded4fcaf3c710762b0b7b0eca2f40.png b/_images/math/848156ad0aeded4fcaf3c710762b0b7b0eca2f40.png deleted file mode 100644 index 180d6dee9..000000000 Binary files a/_images/math/848156ad0aeded4fcaf3c710762b0b7b0eca2f40.png and /dev/null differ diff --git a/_images/math/84d7271dd9e78c1e05d6c3c6ecb60309ef7dfc73.png b/_images/math/84d7271dd9e78c1e05d6c3c6ecb60309ef7dfc73.png deleted file mode 100644 index 697d3552a..000000000 Binary files a/_images/math/84d7271dd9e78c1e05d6c3c6ecb60309ef7dfc73.png and /dev/null differ diff --git a/_images/math/8501f60c4ba95375f43218f19e2f1e0785175b8b.png b/_images/math/8501f60c4ba95375f43218f19e2f1e0785175b8b.png deleted file mode 100644 index 4829c3458..000000000 Binary files a/_images/math/8501f60c4ba95375f43218f19e2f1e0785175b8b.png and /dev/null differ diff --git a/_images/math/852db1511f347a047b3b35ef57025aee0cd15284.png b/_images/math/852db1511f347a047b3b35ef57025aee0cd15284.png deleted file mode 100644 index 4cdb7918b..000000000 Binary files a/_images/math/852db1511f347a047b3b35ef57025aee0cd15284.png and /dev/null differ diff --git a/_images/math/85bf785e24d8c99dd002a034f39a11a230ecd83d.png b/_images/math/85bf785e24d8c99dd002a034f39a11a230ecd83d.png deleted file mode 100644 index 1779cff18..000000000 Binary files a/_images/math/85bf785e24d8c99dd002a034f39a11a230ecd83d.png and /dev/null differ diff --git a/_images/math/86176df007e8c3c5fe3d2ef07ffe4c24f9d99e5f.png b/_images/math/86176df007e8c3c5fe3d2ef07ffe4c24f9d99e5f.png deleted file mode 100644 index 3cb9b180f..000000000 Binary files a/_images/math/86176df007e8c3c5fe3d2ef07ffe4c24f9d99e5f.png and /dev/null differ diff --git a/_images/math/8659700e6646cd91bc02c32affaa5ec046ee9935.png b/_images/math/8659700e6646cd91bc02c32affaa5ec046ee9935.png deleted file mode 100644 index 655f771d3..000000000 Binary files a/_images/math/8659700e6646cd91bc02c32affaa5ec046ee9935.png and /dev/null differ diff --git a/_images/math/8672c48aa9cdea4d49219b1951b27260efbe1ba9.png b/_images/math/8672c48aa9cdea4d49219b1951b27260efbe1ba9.png deleted file mode 100644 index bd826b56b..000000000 Binary files a/_images/math/8672c48aa9cdea4d49219b1951b27260efbe1ba9.png and /dev/null differ diff --git a/_images/math/86812743fd2241a6d3211913c9f5c801e4abde62.png b/_images/math/86812743fd2241a6d3211913c9f5c801e4abde62.png deleted file mode 100644 index 609f9596c..000000000 Binary files a/_images/math/86812743fd2241a6d3211913c9f5c801e4abde62.png and /dev/null differ diff --git a/_images/math/86a03c71aef123872a35a47df3f2ae2f71af2a36.png b/_images/math/86a03c71aef123872a35a47df3f2ae2f71af2a36.png deleted file mode 100644 index 03b99ac01..000000000 Binary files a/_images/math/86a03c71aef123872a35a47df3f2ae2f71af2a36.png and /dev/null differ diff --git a/_images/math/86a337316c6571ab2d3380e2bc1735c09def19dc.png b/_images/math/86a337316c6571ab2d3380e2bc1735c09def19dc.png deleted file mode 100644 index 239a3c964..000000000 Binary files a/_images/math/86a337316c6571ab2d3380e2bc1735c09def19dc.png and /dev/null differ diff --git a/_images/math/86ed38376b34a04724690ff96f4f11a2493266e9.png b/_images/math/86ed38376b34a04724690ff96f4f11a2493266e9.png deleted file mode 100644 index 61669a187..000000000 Binary files a/_images/math/86ed38376b34a04724690ff96f4f11a2493266e9.png and /dev/null differ diff --git a/_images/math/87179e0d3fbdda1c2b257b186368b665fe0d2b5e.png b/_images/math/87179e0d3fbdda1c2b257b186368b665fe0d2b5e.png deleted file mode 100644 index d1162a6a3..000000000 Binary files a/_images/math/87179e0d3fbdda1c2b257b186368b665fe0d2b5e.png and /dev/null differ diff --git a/_images/math/87a738b845cec38975a01384922f3729f2aea275.png b/_images/math/87a738b845cec38975a01384922f3729f2aea275.png deleted file mode 100644 index 1be9fa094..000000000 Binary files a/_images/math/87a738b845cec38975a01384922f3729f2aea275.png and /dev/null differ diff --git a/_images/math/87e2e21757ed9e44040233895f0e2a845f0f55e0.png b/_images/math/87e2e21757ed9e44040233895f0e2a845f0f55e0.png deleted file mode 100644 index eecab5820..000000000 Binary files a/_images/math/87e2e21757ed9e44040233895f0e2a845f0f55e0.png and /dev/null differ diff --git a/_images/math/880ec7dfa132af7dc6566947d691e2778ac9fa79.png b/_images/math/880ec7dfa132af7dc6566947d691e2778ac9fa79.png deleted file mode 100644 index d622dec91..000000000 Binary files a/_images/math/880ec7dfa132af7dc6566947d691e2778ac9fa79.png and /dev/null differ diff --git a/_images/math/885e2ec02b7c318bbb95355bd7503930b76f0036.png b/_images/math/885e2ec02b7c318bbb95355bd7503930b76f0036.png deleted file mode 100644 index ff7322366..000000000 Binary files a/_images/math/885e2ec02b7c318bbb95355bd7503930b76f0036.png and /dev/null differ diff --git a/_images/math/89136793a7416feba72d24a6effe0baec2fb7afe.png b/_images/math/89136793a7416feba72d24a6effe0baec2fb7afe.png deleted file mode 100644 index 6991ae235..000000000 Binary files a/_images/math/89136793a7416feba72d24a6effe0baec2fb7afe.png and /dev/null differ diff --git a/_images/math/8931e872c6537749995fdd31ef70bab757ee143d.png b/_images/math/8931e872c6537749995fdd31ef70bab757ee143d.png deleted file mode 100644 index 00069491f..000000000 Binary files a/_images/math/8931e872c6537749995fdd31ef70bab757ee143d.png and /dev/null differ diff --git a/_images/math/89462841d5d7b4f917ac44835dfc8fa1ed3167f9.png b/_images/math/89462841d5d7b4f917ac44835dfc8fa1ed3167f9.png deleted file mode 100644 index 0657a97df..000000000 Binary files a/_images/math/89462841d5d7b4f917ac44835dfc8fa1ed3167f9.png and /dev/null differ diff --git a/_images/math/899d56bae69ebdc3aa46ba7d4a2ed9690b5b04a3.png b/_images/math/899d56bae69ebdc3aa46ba7d4a2ed9690b5b04a3.png deleted file mode 100644 index caca8e7e3..000000000 Binary files a/_images/math/899d56bae69ebdc3aa46ba7d4a2ed9690b5b04a3.png and /dev/null differ diff --git a/_images/math/8a0cd1fcea62023de9389c1174680918fe8d27a1.png b/_images/math/8a0cd1fcea62023de9389c1174680918fe8d27a1.png deleted file mode 100644 index fd59bc94d..000000000 Binary files a/_images/math/8a0cd1fcea62023de9389c1174680918fe8d27a1.png and /dev/null differ diff --git a/_images/math/8afcee3f563203324385d2e6ec72fa855b1d8128.png b/_images/math/8afcee3f563203324385d2e6ec72fa855b1d8128.png deleted file mode 100644 index 00ca23bbf..000000000 Binary files a/_images/math/8afcee3f563203324385d2e6ec72fa855b1d8128.png and /dev/null differ diff --git a/_images/math/8b594d4619fc09a6bcdbe8e587965a4b44e39a3a.png b/_images/math/8b594d4619fc09a6bcdbe8e587965a4b44e39a3a.png deleted file mode 100644 index d9ad3634e..000000000 Binary files a/_images/math/8b594d4619fc09a6bcdbe8e587965a4b44e39a3a.png and /dev/null differ diff --git a/_images/math/8bbf00dc9537da7eabe8fea214e0cd07538446ed.png b/_images/math/8bbf00dc9537da7eabe8fea214e0cd07538446ed.png deleted file mode 100644 index b5f3de207..000000000 Binary files a/_images/math/8bbf00dc9537da7eabe8fea214e0cd07538446ed.png and /dev/null differ diff --git a/_images/math/8caa65a6f1291fd47263ffe7ad6233f21f356e36.png b/_images/math/8caa65a6f1291fd47263ffe7ad6233f21f356e36.png deleted file mode 100644 index a8d9718e7..000000000 Binary files a/_images/math/8caa65a6f1291fd47263ffe7ad6233f21f356e36.png and /dev/null differ diff --git a/_images/math/8cd10269c4faa86efbbb4bba1fe892988c93dced.png b/_images/math/8cd10269c4faa86efbbb4bba1fe892988c93dced.png deleted file mode 100644 index bb9eaa06d..000000000 Binary files a/_images/math/8cd10269c4faa86efbbb4bba1fe892988c93dced.png and /dev/null differ diff --git a/_images/math/8ce03f78ed945f2ef3dac87c8799b55b393527e7.png b/_images/math/8ce03f78ed945f2ef3dac87c8799b55b393527e7.png deleted file mode 100644 index 0d601b4e5..000000000 Binary files a/_images/math/8ce03f78ed945f2ef3dac87c8799b55b393527e7.png and /dev/null differ diff --git a/_images/math/8d26dc550ccf042b038ae68e0067fcd7616bbaf9.png b/_images/math/8d26dc550ccf042b038ae68e0067fcd7616bbaf9.png deleted file mode 100644 index fbca1914b..000000000 Binary files a/_images/math/8d26dc550ccf042b038ae68e0067fcd7616bbaf9.png and /dev/null differ diff --git a/_images/math/8e2fad164dd6987a25bd3f9fe9ede7006e5f060d.png b/_images/math/8e2fad164dd6987a25bd3f9fe9ede7006e5f060d.png deleted file mode 100644 index 05a5ae752..000000000 Binary files a/_images/math/8e2fad164dd6987a25bd3f9fe9ede7006e5f060d.png and /dev/null differ diff --git a/_images/math/8e2fddb45cb33150b26741c767152b1cdedd9507.png b/_images/math/8e2fddb45cb33150b26741c767152b1cdedd9507.png deleted file mode 100644 index 6ee2dc375..000000000 Binary files a/_images/math/8e2fddb45cb33150b26741c767152b1cdedd9507.png and /dev/null differ diff --git a/_images/math/8e9df35e6d94ff85b7e867a3f8810c70838f5860.png b/_images/math/8e9df35e6d94ff85b7e867a3f8810c70838f5860.png deleted file mode 100644 index 09ba16293..000000000 Binary files a/_images/math/8e9df35e6d94ff85b7e867a3f8810c70838f5860.png and /dev/null differ diff --git a/_images/math/8f08e95a938bf2ac85de55b417b2905f8cc2cb95.png b/_images/math/8f08e95a938bf2ac85de55b417b2905f8cc2cb95.png deleted file mode 100644 index 079dae7ac..000000000 Binary files a/_images/math/8f08e95a938bf2ac85de55b417b2905f8cc2cb95.png and /dev/null differ diff --git a/_images/math/8f6182aca5a0f32c8e0e7166b4f5288902c85d41.png b/_images/math/8f6182aca5a0f32c8e0e7166b4f5288902c85d41.png deleted file mode 100644 index b314273d7..000000000 Binary files a/_images/math/8f6182aca5a0f32c8e0e7166b4f5288902c85d41.png and /dev/null differ diff --git a/_images/math/8fdf63846677589ea5d03113a13b9b7eec404824.png b/_images/math/8fdf63846677589ea5d03113a13b9b7eec404824.png deleted file mode 100644 index 23ef52be0..000000000 Binary files a/_images/math/8fdf63846677589ea5d03113a13b9b7eec404824.png and /dev/null differ diff --git a/_images/math/8febe4f8931a95fd732c8eeec7bbc74e1153b611.png b/_images/math/8febe4f8931a95fd732c8eeec7bbc74e1153b611.png deleted file mode 100644 index b8f1835b4..000000000 Binary files a/_images/math/8febe4f8931a95fd732c8eeec7bbc74e1153b611.png and /dev/null differ diff --git a/_images/math/901cd864f1b06510b0854f4374e152dccc54466c.png b/_images/math/901cd864f1b06510b0854f4374e152dccc54466c.png deleted file mode 100644 index 0c76cac69..000000000 Binary files a/_images/math/901cd864f1b06510b0854f4374e152dccc54466c.png and /dev/null differ diff --git a/_images/math/903700c6ff286ccd7f505e5a1373425bdb742aa7.png b/_images/math/903700c6ff286ccd7f505e5a1373425bdb742aa7.png deleted file mode 100644 index c3290b2b8..000000000 Binary files a/_images/math/903700c6ff286ccd7f505e5a1373425bdb742aa7.png and /dev/null differ diff --git a/_images/math/903aa78d4b0941093d54bc3f2388489516a83ce1.png b/_images/math/903aa78d4b0941093d54bc3f2388489516a83ce1.png deleted file mode 100644 index 8c4d4921c..000000000 Binary files a/_images/math/903aa78d4b0941093d54bc3f2388489516a83ce1.png and /dev/null differ diff --git a/_images/math/909b7c48b30b3708ce76816b6e86f2b0a8d01f6d.png b/_images/math/909b7c48b30b3708ce76816b6e86f2b0a8d01f6d.png deleted file mode 100644 index 7998cc18a..000000000 Binary files a/_images/math/909b7c48b30b3708ce76816b6e86f2b0a8d01f6d.png and /dev/null differ diff --git a/_images/math/9102c2943033ce76d9c6f8f88a9dcd512d8e97b7.png b/_images/math/9102c2943033ce76d9c6f8f88a9dcd512d8e97b7.png deleted file mode 100644 index e50b79d26..000000000 Binary files a/_images/math/9102c2943033ce76d9c6f8f88a9dcd512d8e97b7.png and /dev/null differ diff --git a/_images/math/91ee790671e6a647c8afc69baa2118effd0dac9d.png b/_images/math/91ee790671e6a647c8afc69baa2118effd0dac9d.png deleted file mode 100644 index 165b2d05b..000000000 Binary files a/_images/math/91ee790671e6a647c8afc69baa2118effd0dac9d.png and /dev/null differ diff --git a/_images/math/9267b5537b1e77c768e485fb2ecddceef549feb4.png b/_images/math/9267b5537b1e77c768e485fb2ecddceef549feb4.png deleted file mode 100644 index 45c1ec9c7..000000000 Binary files a/_images/math/9267b5537b1e77c768e485fb2ecddceef549feb4.png and /dev/null differ diff --git a/_images/math/93c29bfedc993de115781b4fbb7e3a8b9e8d6b51.png b/_images/math/93c29bfedc993de115781b4fbb7e3a8b9e8d6b51.png deleted file mode 100644 index 1b3b95574..000000000 Binary files a/_images/math/93c29bfedc993de115781b4fbb7e3a8b9e8d6b51.png and /dev/null differ diff --git a/_images/math/93cf44156820d485ed2e73e215f0fbf6099a3a83.png b/_images/math/93cf44156820d485ed2e73e215f0fbf6099a3a83.png deleted file mode 100644 index 9b05da368..000000000 Binary files a/_images/math/93cf44156820d485ed2e73e215f0fbf6099a3a83.png and /dev/null differ diff --git a/_images/math/940cc04250d65618093ae95efc888b0d7f0b8059.png b/_images/math/940cc04250d65618093ae95efc888b0d7f0b8059.png deleted file mode 100644 index af4780916..000000000 Binary files a/_images/math/940cc04250d65618093ae95efc888b0d7f0b8059.png and /dev/null differ diff --git a/_images/math/94226a308c8cdb507c34a33c670b1ea00a141498.png b/_images/math/94226a308c8cdb507c34a33c670b1ea00a141498.png deleted file mode 100644 index 428594107..000000000 Binary files a/_images/math/94226a308c8cdb507c34a33c670b1ea00a141498.png and /dev/null differ diff --git a/_images/math/9471a7a7c9e3809d4b6a42edda0a108d29fb39c2.png b/_images/math/9471a7a7c9e3809d4b6a42edda0a108d29fb39c2.png deleted file mode 100644 index 627c2f4db..000000000 Binary files a/_images/math/9471a7a7c9e3809d4b6a42edda0a108d29fb39c2.png and /dev/null differ diff --git a/_images/math/94dea2b917efe3b755b49b6c9de1f2270ddcb436.png b/_images/math/94dea2b917efe3b755b49b6c9de1f2270ddcb436.png deleted file mode 100644 index 159400f4b..000000000 Binary files a/_images/math/94dea2b917efe3b755b49b6c9de1f2270ddcb436.png and /dev/null differ diff --git a/_images/math/94e2854f988985e477127962f26f39c7181a6b97.png b/_images/math/94e2854f988985e477127962f26f39c7181a6b97.png deleted file mode 100644 index a29bad0fc..000000000 Binary files a/_images/math/94e2854f988985e477127962f26f39c7181a6b97.png and /dev/null differ diff --git a/_images/math/952bc12f04f5c679a07f289412d601b66e4655dd.png b/_images/math/952bc12f04f5c679a07f289412d601b66e4655dd.png deleted file mode 100644 index 164cd4a48..000000000 Binary files a/_images/math/952bc12f04f5c679a07f289412d601b66e4655dd.png and /dev/null differ diff --git a/_images/math/954a810ddf03700fef5c83aa0de5465404f99949.png b/_images/math/954a810ddf03700fef5c83aa0de5465404f99949.png deleted file mode 100644 index ee093561b..000000000 Binary files a/_images/math/954a810ddf03700fef5c83aa0de5465404f99949.png and /dev/null differ diff --git a/_images/math/9564c43dd4cebed68a763bfff513deabed970e44.png b/_images/math/9564c43dd4cebed68a763bfff513deabed970e44.png deleted file mode 100644 index 70d5f2955..000000000 Binary files a/_images/math/9564c43dd4cebed68a763bfff513deabed970e44.png and /dev/null differ diff --git a/_images/math/95883ed419b42c763fa09194af726fbebaf1778d.png b/_images/math/95883ed419b42c763fa09194af726fbebaf1778d.png deleted file mode 100644 index a9f83d27e..000000000 Binary files a/_images/math/95883ed419b42c763fa09194af726fbebaf1778d.png and /dev/null differ diff --git a/_images/math/95e4dd6bcf6b4e0aaa24cb1a79ef73a00d4f21fe.png b/_images/math/95e4dd6bcf6b4e0aaa24cb1a79ef73a00d4f21fe.png deleted file mode 100644 index 3247698ee..000000000 Binary files a/_images/math/95e4dd6bcf6b4e0aaa24cb1a79ef73a00d4f21fe.png and /dev/null differ diff --git a/_images/math/95f112dd8a72c54a1791667c0f7dd7b07293e54c.png b/_images/math/95f112dd8a72c54a1791667c0f7dd7b07293e54c.png deleted file mode 100644 index 5a2f309f5..000000000 Binary files a/_images/math/95f112dd8a72c54a1791667c0f7dd7b07293e54c.png and /dev/null differ diff --git a/_images/math/964e857d03b83e1c6fafbebf9699038613f0aaaf.png b/_images/math/964e857d03b83e1c6fafbebf9699038613f0aaaf.png deleted file mode 100644 index 4787c6800..000000000 Binary files a/_images/math/964e857d03b83e1c6fafbebf9699038613f0aaaf.png and /dev/null differ diff --git a/_images/math/96ca5b777a836a138b8c1c17aad4fb6b4b0ff435.png b/_images/math/96ca5b777a836a138b8c1c17aad4fb6b4b0ff435.png deleted file mode 100644 index 62e9bde1e..000000000 Binary files a/_images/math/96ca5b777a836a138b8c1c17aad4fb6b4b0ff435.png and /dev/null differ diff --git a/_images/math/96f83bdc35d93f12aae7015cfa52f21953e64c52.png b/_images/math/96f83bdc35d93f12aae7015cfa52f21953e64c52.png deleted file mode 100644 index 627b12005..000000000 Binary files a/_images/math/96f83bdc35d93f12aae7015cfa52f21953e64c52.png and /dev/null differ diff --git a/_images/math/970c0335d15a0f2818176b9545086faa54af8aeb.png b/_images/math/970c0335d15a0f2818176b9545086faa54af8aeb.png deleted file mode 100644 index 501aef356..000000000 Binary files a/_images/math/970c0335d15a0f2818176b9545086faa54af8aeb.png and /dev/null differ diff --git a/_images/math/97f8329b4f73af6e31c35b4193d5407002cd03f3.png b/_images/math/97f8329b4f73af6e31c35b4193d5407002cd03f3.png deleted file mode 100644 index 9f7a8884b..000000000 Binary files a/_images/math/97f8329b4f73af6e31c35b4193d5407002cd03f3.png and /dev/null differ diff --git a/_images/math/98245a3aad6f5ba106a21f5161beb34c54b7b2b3.png b/_images/math/98245a3aad6f5ba106a21f5161beb34c54b7b2b3.png deleted file mode 100644 index 7b25078a4..000000000 Binary files a/_images/math/98245a3aad6f5ba106a21f5161beb34c54b7b2b3.png and /dev/null differ diff --git a/_images/math/986ad48db02dcaf802568dee2460269916229fdf.png b/_images/math/986ad48db02dcaf802568dee2460269916229fdf.png deleted file mode 100644 index e69da9aa3..000000000 Binary files a/_images/math/986ad48db02dcaf802568dee2460269916229fdf.png and /dev/null differ diff --git a/_images/math/9a1ee0c08a37a711d40ba9c72927c5bbe9eb1f69.png b/_images/math/9a1ee0c08a37a711d40ba9c72927c5bbe9eb1f69.png deleted file mode 100644 index ed430f2db..000000000 Binary files a/_images/math/9a1ee0c08a37a711d40ba9c72927c5bbe9eb1f69.png and /dev/null differ diff --git a/_images/math/9a50113c88b376ac5304960bd9046ee2a709542f.png b/_images/math/9a50113c88b376ac5304960bd9046ee2a709542f.png deleted file mode 100644 index 71a15c336..000000000 Binary files a/_images/math/9a50113c88b376ac5304960bd9046ee2a709542f.png and /dev/null differ diff --git a/_images/math/9be467ea24116630dd7f9d150a04ad10705dde14.png b/_images/math/9be467ea24116630dd7f9d150a04ad10705dde14.png deleted file mode 100644 index 38627cdfa..000000000 Binary files a/_images/math/9be467ea24116630dd7f9d150a04ad10705dde14.png and /dev/null differ diff --git a/_images/math/9cce1a5e965d290e2b9dddc109266533adbfec61.png b/_images/math/9cce1a5e965d290e2b9dddc109266533adbfec61.png deleted file mode 100644 index 6d5934cb7..000000000 Binary files a/_images/math/9cce1a5e965d290e2b9dddc109266533adbfec61.png and /dev/null differ diff --git a/_images/math/9d5bbbfaf90986bee7cd997297dca6eba2d1f649.png b/_images/math/9d5bbbfaf90986bee7cd997297dca6eba2d1f649.png deleted file mode 100644 index 0f079c59f..000000000 Binary files a/_images/math/9d5bbbfaf90986bee7cd997297dca6eba2d1f649.png and /dev/null differ diff --git a/_images/math/9d77d4f1b3198ce095131fa53f2e6bec97059678.png b/_images/math/9d77d4f1b3198ce095131fa53f2e6bec97059678.png deleted file mode 100644 index 4787c6800..000000000 Binary files a/_images/math/9d77d4f1b3198ce095131fa53f2e6bec97059678.png and /dev/null differ diff --git a/_images/math/9d83c38ed2c34294a2a50325c2a2fed460a8764c.png b/_images/math/9d83c38ed2c34294a2a50325c2a2fed460a8764c.png deleted file mode 100644 index 2910c429c..000000000 Binary files a/_images/math/9d83c38ed2c34294a2a50325c2a2fed460a8764c.png and /dev/null differ diff --git a/_images/math/9d86170e7de539c0ff999de09621ee0c7b6c8ed0.png b/_images/math/9d86170e7de539c0ff999de09621ee0c7b6c8ed0.png deleted file mode 100644 index da3630fbd..000000000 Binary files a/_images/math/9d86170e7de539c0ff999de09621ee0c7b6c8ed0.png and /dev/null differ diff --git a/_images/math/9f09bb91c4e76550f7841b5f2aba25234a6b64ca.png b/_images/math/9f09bb91c4e76550f7841b5f2aba25234a6b64ca.png deleted file mode 100644 index d452e162f..000000000 Binary files a/_images/math/9f09bb91c4e76550f7841b5f2aba25234a6b64ca.png and /dev/null differ diff --git a/_images/math/9fd56641dc13a1182a4de45298cbfef3acce707e.png b/_images/math/9fd56641dc13a1182a4de45298cbfef3acce707e.png deleted file mode 100644 index 612c156c0..000000000 Binary files a/_images/math/9fd56641dc13a1182a4de45298cbfef3acce707e.png and /dev/null differ diff --git a/_images/math/9ff773103190fdd0ab06cb11aad37e7a807fc715.png b/_images/math/9ff773103190fdd0ab06cb11aad37e7a807fc715.png deleted file mode 100644 index d7c112264..000000000 Binary files a/_images/math/9ff773103190fdd0ab06cb11aad37e7a807fc715.png and /dev/null differ diff --git a/_images/math/a0f849f2110868f6cb280a21dd6f6fb1533cb2a6.png b/_images/math/a0f849f2110868f6cb280a21dd6f6fb1533cb2a6.png deleted file mode 100644 index 5342f08e7..000000000 Binary files a/_images/math/a0f849f2110868f6cb280a21dd6f6fb1533cb2a6.png and /dev/null differ diff --git a/_images/math/a10e79ed2d0ac18b3e693ea4817f63ca8d22e4d2.png b/_images/math/a10e79ed2d0ac18b3e693ea4817f63ca8d22e4d2.png deleted file mode 100644 index 533c6679e..000000000 Binary files a/_images/math/a10e79ed2d0ac18b3e693ea4817f63ca8d22e4d2.png and /dev/null differ diff --git a/_images/math/a143f7c84ce148714d4169ca25e66ff7e5b0217a.png b/_images/math/a143f7c84ce148714d4169ca25e66ff7e5b0217a.png deleted file mode 100644 index 50dd329a2..000000000 Binary files a/_images/math/a143f7c84ce148714d4169ca25e66ff7e5b0217a.png and /dev/null differ diff --git a/_images/math/a196569f2f3e96bf3fd428db69ffaa94df4d6e75.png b/_images/math/a196569f2f3e96bf3fd428db69ffaa94df4d6e75.png deleted file mode 100644 index 7aaeaff63..000000000 Binary files a/_images/math/a196569f2f3e96bf3fd428db69ffaa94df4d6e75.png and /dev/null differ diff --git a/_images/math/a19e08ea183fb16155204ed94392abe671bb311d.png b/_images/math/a19e08ea183fb16155204ed94392abe671bb311d.png deleted file mode 100644 index 3d363f227..000000000 Binary files a/_images/math/a19e08ea183fb16155204ed94392abe671bb311d.png and /dev/null differ diff --git a/_images/math/a1ce9f29dab59ec91154466e8ae8281cd6871e21.png b/_images/math/a1ce9f29dab59ec91154466e8ae8281cd6871e21.png deleted file mode 100644 index cbbf43e7c..000000000 Binary files a/_images/math/a1ce9f29dab59ec91154466e8ae8281cd6871e21.png and /dev/null differ diff --git a/_images/math/a23cf2889c095f570214df13089f66668ef1eaab.png b/_images/math/a23cf2889c095f570214df13089f66668ef1eaab.png deleted file mode 100644 index 7f036c2a0..000000000 Binary files a/_images/math/a23cf2889c095f570214df13089f66668ef1eaab.png and /dev/null differ diff --git a/_images/math/a2ae34fc9737e2ee9034a38a2c8b88f8f904b55d.png b/_images/math/a2ae34fc9737e2ee9034a38a2c8b88f8f904b55d.png deleted file mode 100644 index 83feb26e0..000000000 Binary files a/_images/math/a2ae34fc9737e2ee9034a38a2c8b88f8f904b55d.png and /dev/null differ diff --git a/_images/math/a2ed7036e2d88e641432cc87f4bd22638aca54e6.png b/_images/math/a2ed7036e2d88e641432cc87f4bd22638aca54e6.png deleted file mode 100644 index 66d16fc70..000000000 Binary files a/_images/math/a2ed7036e2d88e641432cc87f4bd22638aca54e6.png and /dev/null differ diff --git a/_images/math/a3c5af0306d57cb8b226ab4ac7730ca5861e8643.png b/_images/math/a3c5af0306d57cb8b226ab4ac7730ca5861e8643.png deleted file mode 100644 index 5193c86fb..000000000 Binary files a/_images/math/a3c5af0306d57cb8b226ab4ac7730ca5861e8643.png and /dev/null differ diff --git a/_images/math/a4d3f7c21336eaee4841e5026145a83563306556.png b/_images/math/a4d3f7c21336eaee4841e5026145a83563306556.png deleted file mode 100644 index b81e64f30..000000000 Binary files a/_images/math/a4d3f7c21336eaee4841e5026145a83563306556.png and /dev/null differ diff --git a/_images/math/a5043de164ea6ccbe1e5fd1a0c9c60df9fc72f57.png b/_images/math/a5043de164ea6ccbe1e5fd1a0c9c60df9fc72f57.png deleted file mode 100644 index b14bfaa62..000000000 Binary files a/_images/math/a5043de164ea6ccbe1e5fd1a0c9c60df9fc72f57.png and /dev/null differ diff --git a/_images/math/a581f053bbfa5115f42c13094857cdd12a37ec49.png b/_images/math/a581f053bbfa5115f42c13094857cdd12a37ec49.png deleted file mode 100644 index 08a706478..000000000 Binary files a/_images/math/a581f053bbfa5115f42c13094857cdd12a37ec49.png and /dev/null differ diff --git a/_images/math/a5c6c67bb5d3e14928bac4f55b42b097af0049c9.png b/_images/math/a5c6c67bb5d3e14928bac4f55b42b097af0049c9.png deleted file mode 100644 index 8e7865dfe..000000000 Binary files a/_images/math/a5c6c67bb5d3e14928bac4f55b42b097af0049c9.png and /dev/null differ diff --git a/_images/math/a7640bcb3178e9077677d5f7688007f89242c628.png b/_images/math/a7640bcb3178e9077677d5f7688007f89242c628.png deleted file mode 100644 index e822bbcd1..000000000 Binary files a/_images/math/a7640bcb3178e9077677d5f7688007f89242c628.png and /dev/null differ diff --git a/_images/math/a7af5d614cf23d89d0e69b805eaeac5ce60ab3b4.png b/_images/math/a7af5d614cf23d89d0e69b805eaeac5ce60ab3b4.png deleted file mode 100644 index 99c056581..000000000 Binary files a/_images/math/a7af5d614cf23d89d0e69b805eaeac5ce60ab3b4.png and /dev/null differ diff --git a/_images/math/a9b804bdbe6411f805d1c85414a6f436be43104a.png b/_images/math/a9b804bdbe6411f805d1c85414a6f436be43104a.png deleted file mode 100644 index 36b8307ea..000000000 Binary files a/_images/math/a9b804bdbe6411f805d1c85414a6f436be43104a.png and /dev/null differ diff --git a/_images/math/aa1cf3f712d2d40c97a11b485c3ccdbf7f167ae5.png b/_images/math/aa1cf3f712d2d40c97a11b485c3ccdbf7f167ae5.png deleted file mode 100644 index 2950f9605..000000000 Binary files a/_images/math/aa1cf3f712d2d40c97a11b485c3ccdbf7f167ae5.png and /dev/null differ diff --git a/_images/math/ab5a37a266621215b91506e806ca9b2af24db6b7.png b/_images/math/ab5a37a266621215b91506e806ca9b2af24db6b7.png deleted file mode 100644 index 904319c4a..000000000 Binary files a/_images/math/ab5a37a266621215b91506e806ca9b2af24db6b7.png and /dev/null differ diff --git a/_images/math/ac0b3c998a0208c7143deb1d64325bc106e2ac44.png b/_images/math/ac0b3c998a0208c7143deb1d64325bc106e2ac44.png deleted file mode 100644 index d81cc9792..000000000 Binary files a/_images/math/ac0b3c998a0208c7143deb1d64325bc106e2ac44.png and /dev/null differ diff --git a/_images/math/ac61ad5c9d214d2889bf898d19769810ec76a41b.png b/_images/math/ac61ad5c9d214d2889bf898d19769810ec76a41b.png deleted file mode 100644 index 5bdd2a55f..000000000 Binary files a/_images/math/ac61ad5c9d214d2889bf898d19769810ec76a41b.png and /dev/null differ diff --git a/_images/math/acb86d5cd33acbbd379014727295964c15cef03a.png b/_images/math/acb86d5cd33acbbd379014727295964c15cef03a.png deleted file mode 100644 index 9c07de18d..000000000 Binary files a/_images/math/acb86d5cd33acbbd379014727295964c15cef03a.png and /dev/null differ diff --git a/_images/math/ad59b6e24a4a00ac621801f8d7513d68be654ab5.png b/_images/math/ad59b6e24a4a00ac621801f8d7513d68be654ab5.png deleted file mode 100644 index ff0a49a24..000000000 Binary files a/_images/math/ad59b6e24a4a00ac621801f8d7513d68be654ab5.png and /dev/null differ diff --git a/_images/math/adfd934da867e636e40c4f7dfe964c92f370b0fe.png b/_images/math/adfd934da867e636e40c4f7dfe964c92f370b0fe.png deleted file mode 100644 index bb75ba5e9..000000000 Binary files a/_images/math/adfd934da867e636e40c4f7dfe964c92f370b0fe.png and /dev/null differ diff --git a/_images/math/ae7e3fc575ab9c376945cfc926fca512e0f48a9a.png b/_images/math/ae7e3fc575ab9c376945cfc926fca512e0f48a9a.png deleted file mode 100644 index a0aa6f20a..000000000 Binary files a/_images/math/ae7e3fc575ab9c376945cfc926fca512e0f48a9a.png and /dev/null differ diff --git a/_images/math/ae80b12010e94b47829ea5bd0f66ab65510a9044.png b/_images/math/ae80b12010e94b47829ea5bd0f66ab65510a9044.png deleted file mode 100644 index 5db64a840..000000000 Binary files a/_images/math/ae80b12010e94b47829ea5bd0f66ab65510a9044.png and /dev/null differ diff --git a/_images/math/aea589b97a25438d5ca4484b8599310a6a5a331e.png b/_images/math/aea589b97a25438d5ca4484b8599310a6a5a331e.png deleted file mode 100644 index ccccfc448..000000000 Binary files a/_images/math/aea589b97a25438d5ca4484b8599310a6a5a331e.png and /dev/null differ diff --git a/_images/math/aeac82f8e02a16282c7bea3eb7d31350deef6eee.png b/_images/math/aeac82f8e02a16282c7bea3eb7d31350deef6eee.png deleted file mode 100644 index 1a2d9f4cd..000000000 Binary files a/_images/math/aeac82f8e02a16282c7bea3eb7d31350deef6eee.png and /dev/null differ diff --git a/_images/math/af0e4926d948cb7f8c7e3385ae222afeb0064da2.png b/_images/math/af0e4926d948cb7f8c7e3385ae222afeb0064da2.png deleted file mode 100644 index 27afe14e7..000000000 Binary files a/_images/math/af0e4926d948cb7f8c7e3385ae222afeb0064da2.png and /dev/null differ diff --git a/_images/math/af5b94887fa54210b0d3d3de334419c205b90882.png b/_images/math/af5b94887fa54210b0d3d3de334419c205b90882.png deleted file mode 100644 index 6a371eea8..000000000 Binary files a/_images/math/af5b94887fa54210b0d3d3de334419c205b90882.png and /dev/null differ diff --git a/_images/math/b018f9153661cd702305aecc28713fd9705e7cb3.png b/_images/math/b018f9153661cd702305aecc28713fd9705e7cb3.png deleted file mode 100644 index aea31be9c..000000000 Binary files a/_images/math/b018f9153661cd702305aecc28713fd9705e7cb3.png and /dev/null differ diff --git a/_images/math/b027139ad09fca3ca4adfe7d1149b9b2a69dbe3a.png b/_images/math/b027139ad09fca3ca4adfe7d1149b9b2a69dbe3a.png deleted file mode 100644 index 8f9250836..000000000 Binary files a/_images/math/b027139ad09fca3ca4adfe7d1149b9b2a69dbe3a.png and /dev/null differ diff --git a/_images/math/b0e34d2c958a57c7ed73c9aea6ba877dc21351b9.png b/_images/math/b0e34d2c958a57c7ed73c9aea6ba877dc21351b9.png deleted file mode 100644 index 0b857f15f..000000000 Binary files a/_images/math/b0e34d2c958a57c7ed73c9aea6ba877dc21351b9.png and /dev/null differ diff --git a/_images/math/b124ff74afb0914bb434e8fb849eb56d734412f8.png b/_images/math/b124ff74afb0914bb434e8fb849eb56d734412f8.png deleted file mode 100644 index 07ce5a02c..000000000 Binary files a/_images/math/b124ff74afb0914bb434e8fb849eb56d734412f8.png and /dev/null differ diff --git a/_images/math/b1671d0a5e167e582bc18fe47d3b479772ff7ecf.png b/_images/math/b1671d0a5e167e582bc18fe47d3b479772ff7ecf.png deleted file mode 100644 index 829b21196..000000000 Binary files a/_images/math/b1671d0a5e167e582bc18fe47d3b479772ff7ecf.png and /dev/null differ diff --git a/_images/math/b1d4d53e93df09afe1ed2af91622f73e2b6b165c.png b/_images/math/b1d4d53e93df09afe1ed2af91622f73e2b6b165c.png deleted file mode 100644 index b86306af6..000000000 Binary files a/_images/math/b1d4d53e93df09afe1ed2af91622f73e2b6b165c.png and /dev/null differ diff --git a/_images/math/b259abeb8af3dad67fd4ba25ac384454f5ac82ad.png b/_images/math/b259abeb8af3dad67fd4ba25ac384454f5ac82ad.png deleted file mode 100644 index 7b2f813fc..000000000 Binary files a/_images/math/b259abeb8af3dad67fd4ba25ac384454f5ac82ad.png and /dev/null differ diff --git a/_images/math/b39932b8cbb311eeee9815738f6be3757737b2ff.png b/_images/math/b39932b8cbb311eeee9815738f6be3757737b2ff.png deleted file mode 100644 index 112fa3fcf..000000000 Binary files a/_images/math/b39932b8cbb311eeee9815738f6be3757737b2ff.png and /dev/null differ diff --git a/_images/math/b3d7aca91cb037d9dd2187ba0359d8aa5887fb6d.png b/_images/math/b3d7aca91cb037d9dd2187ba0359d8aa5887fb6d.png deleted file mode 100644 index 3648459da..000000000 Binary files a/_images/math/b3d7aca91cb037d9dd2187ba0359d8aa5887fb6d.png and /dev/null differ diff --git a/_images/math/b3e3b72ed0f7fba27a69a01a296e17e10c2e3cc8.png b/_images/math/b3e3b72ed0f7fba27a69a01a296e17e10c2e3cc8.png deleted file mode 100644 index 577340922..000000000 Binary files a/_images/math/b3e3b72ed0f7fba27a69a01a296e17e10c2e3cc8.png and /dev/null differ diff --git a/_images/math/b4a74454e6f57541ec9be710e8b2e3ae8010dde9.png b/_images/math/b4a74454e6f57541ec9be710e8b2e3ae8010dde9.png deleted file mode 100644 index 5bc22329c..000000000 Binary files a/_images/math/b4a74454e6f57541ec9be710e8b2e3ae8010dde9.png and /dev/null differ diff --git a/_images/math/b4e1bc8e2dfd2c26158273aef285b08a816f960a.png b/_images/math/b4e1bc8e2dfd2c26158273aef285b08a816f960a.png deleted file mode 100644 index 726acf924..000000000 Binary files a/_images/math/b4e1bc8e2dfd2c26158273aef285b08a816f960a.png and /dev/null differ diff --git a/_images/math/b51c1d14d772823c103e00abf9e448770f391c44.png b/_images/math/b51c1d14d772823c103e00abf9e448770f391c44.png deleted file mode 100644 index 1a982150f..000000000 Binary files a/_images/math/b51c1d14d772823c103e00abf9e448770f391c44.png and /dev/null differ diff --git a/_images/math/b700d901b5ba9392162d83dadb3c05adec0a5fde.png b/_images/math/b700d901b5ba9392162d83dadb3c05adec0a5fde.png deleted file mode 100644 index ec1ced548..000000000 Binary files a/_images/math/b700d901b5ba9392162d83dadb3c05adec0a5fde.png and /dev/null differ diff --git a/_images/math/b758958c2db850d51fa687ecee602ff522f037e6.png b/_images/math/b758958c2db850d51fa687ecee602ff522f037e6.png deleted file mode 100644 index 1ad83c095..000000000 Binary files a/_images/math/b758958c2db850d51fa687ecee602ff522f037e6.png and /dev/null differ diff --git a/_images/math/b81a13c0cf0eca5dd00205acefb25d4a0cb1fb1c.png b/_images/math/b81a13c0cf0eca5dd00205acefb25d4a0cb1fb1c.png deleted file mode 100644 index 0867b454d..000000000 Binary files a/_images/math/b81a13c0cf0eca5dd00205acefb25d4a0cb1fb1c.png and /dev/null differ diff --git a/_images/math/b82d559c8ea6a5545c0eef62e3197a25d38cc15a.png b/_images/math/b82d559c8ea6a5545c0eef62e3197a25d38cc15a.png deleted file mode 100644 index 6fab08182..000000000 Binary files a/_images/math/b82d559c8ea6a5545c0eef62e3197a25d38cc15a.png and /dev/null differ diff --git a/_images/math/b83c42845b88d516166a305715e9cb2e795fdb47.png b/_images/math/b83c42845b88d516166a305715e9cb2e795fdb47.png deleted file mode 100644 index 4a71d65cb..000000000 Binary files a/_images/math/b83c42845b88d516166a305715e9cb2e795fdb47.png and /dev/null differ diff --git a/_images/math/b872fd5ec24dde8c3417e7f616c4bac56009be65.png b/_images/math/b872fd5ec24dde8c3417e7f616c4bac56009be65.png deleted file mode 100644 index 64ac09598..000000000 Binary files a/_images/math/b872fd5ec24dde8c3417e7f616c4bac56009be65.png and /dev/null differ diff --git a/_images/math/b8d74914d7bab2ddcd1862b9b661a0db5b386d83.png b/_images/math/b8d74914d7bab2ddcd1862b9b661a0db5b386d83.png deleted file mode 100644 index 5cd853353..000000000 Binary files a/_images/math/b8d74914d7bab2ddcd1862b9b661a0db5b386d83.png and /dev/null differ diff --git a/_images/math/b909aae962b19c43f19a3460d2bef0d0d68897a0.png b/_images/math/b909aae962b19c43f19a3460d2bef0d0d68897a0.png deleted file mode 100644 index 0a2b50194..000000000 Binary files a/_images/math/b909aae962b19c43f19a3460d2bef0d0d68897a0.png and /dev/null differ diff --git a/_images/math/b914fb0f4393dcf1ecf307ec279e68158d744f5e.png b/_images/math/b914fb0f4393dcf1ecf307ec279e68158d744f5e.png deleted file mode 100644 index 19e3c53dc..000000000 Binary files a/_images/math/b914fb0f4393dcf1ecf307ec279e68158d744f5e.png and /dev/null differ diff --git a/_images/math/b938321d9db7b9d1c9d408617d7aad9581ef09c3.png b/_images/math/b938321d9db7b9d1c9d408617d7aad9581ef09c3.png deleted file mode 100644 index 71822b04e..000000000 Binary files a/_images/math/b938321d9db7b9d1c9d408617d7aad9581ef09c3.png and /dev/null differ diff --git a/_images/math/bacb7578fed44296b1be2ab66b735fdbe3d4920b.png b/_images/math/bacb7578fed44296b1be2ab66b735fdbe3d4920b.png deleted file mode 100644 index 53c42a88b..000000000 Binary files a/_images/math/bacb7578fed44296b1be2ab66b735fdbe3d4920b.png and /dev/null differ diff --git a/_images/math/bb3b56c1449e4ae998527d57d942a625594f2345.png b/_images/math/bb3b56c1449e4ae998527d57d942a625594f2345.png deleted file mode 100644 index 1639b82cd..000000000 Binary files a/_images/math/bb3b56c1449e4ae998527d57d942a625594f2345.png and /dev/null differ diff --git a/_images/math/bb553bac0e1412395068d22f984ff09841d237db.png b/_images/math/bb553bac0e1412395068d22f984ff09841d237db.png deleted file mode 100644 index de218ef10..000000000 Binary files a/_images/math/bb553bac0e1412395068d22f984ff09841d237db.png and /dev/null differ diff --git a/_images/math/bb6c6c97d391e46320213fa3786fd8e8198c0ee5.png b/_images/math/bb6c6c97d391e46320213fa3786fd8e8198c0ee5.png deleted file mode 100644 index 9d515be0a..000000000 Binary files a/_images/math/bb6c6c97d391e46320213fa3786fd8e8198c0ee5.png and /dev/null differ diff --git a/_images/math/bb6efe848c3fe4bab8f7d7cd35c544c38a1f56ff.png b/_images/math/bb6efe848c3fe4bab8f7d7cd35c544c38a1f56ff.png deleted file mode 100644 index b6e48ac7b..000000000 Binary files a/_images/math/bb6efe848c3fe4bab8f7d7cd35c544c38a1f56ff.png and /dev/null differ diff --git a/_images/math/bca38b09fc983694f53657d4c262db0387f5e85d.png b/_images/math/bca38b09fc983694f53657d4c262db0387f5e85d.png deleted file mode 100644 index 62b5f5e99..000000000 Binary files a/_images/math/bca38b09fc983694f53657d4c262db0387f5e85d.png and /dev/null differ diff --git a/_images/math/bcf59e5339b8b0b80363dd8fe30956776b56dc9a.png b/_images/math/bcf59e5339b8b0b80363dd8fe30956776b56dc9a.png deleted file mode 100644 index 66de6c528..000000000 Binary files a/_images/math/bcf59e5339b8b0b80363dd8fe30956776b56dc9a.png and /dev/null differ diff --git a/_images/math/bd43efebc8b7ecaa2564f827dd2f624a8a3a7278.png b/_images/math/bd43efebc8b7ecaa2564f827dd2f624a8a3a7278.png deleted file mode 100644 index 77ec77293..000000000 Binary files a/_images/math/bd43efebc8b7ecaa2564f827dd2f624a8a3a7278.png and /dev/null differ diff --git a/_images/math/bd5c3551852e3eb55e7cc1c20fb56b18066af30d.png b/_images/math/bd5c3551852e3eb55e7cc1c20fb56b18066af30d.png deleted file mode 100644 index b33655295..000000000 Binary files a/_images/math/bd5c3551852e3eb55e7cc1c20fb56b18066af30d.png and /dev/null differ diff --git a/_images/math/bddafdba567e077d725c2cafbf24fe43bb1c089a.png b/_images/math/bddafdba567e077d725c2cafbf24fe43bb1c089a.png deleted file mode 100644 index 0e42bd580..000000000 Binary files a/_images/math/bddafdba567e077d725c2cafbf24fe43bb1c089a.png and /dev/null differ diff --git a/_images/math/be03104fbc0d7a99d659af133bb7c3b9e25cd7c0.png b/_images/math/be03104fbc0d7a99d659af133bb7c3b9e25cd7c0.png deleted file mode 100644 index 271ba228a..000000000 Binary files a/_images/math/be03104fbc0d7a99d659af133bb7c3b9e25cd7c0.png and /dev/null differ diff --git a/_images/math/be3240b7138430b0c4d848fffb277c12ed81de93.png b/_images/math/be3240b7138430b0c4d848fffb277c12ed81de93.png deleted file mode 100644 index 8b8734367..000000000 Binary files a/_images/math/be3240b7138430b0c4d848fffb277c12ed81de93.png and /dev/null differ diff --git a/_images/math/be3bcf8a19a928999cfb2020a2f51a96c93fbcb0.png b/_images/math/be3bcf8a19a928999cfb2020a2f51a96c93fbcb0.png deleted file mode 100644 index 628657e27..000000000 Binary files a/_images/math/be3bcf8a19a928999cfb2020a2f51a96c93fbcb0.png and /dev/null differ diff --git a/_images/math/be3d2664dacf1764c5f2c413af810cd86d3886ba.png b/_images/math/be3d2664dacf1764c5f2c413af810cd86d3886ba.png deleted file mode 100644 index e3ca803fb..000000000 Binary files a/_images/math/be3d2664dacf1764c5f2c413af810cd86d3886ba.png and /dev/null differ diff --git a/_images/math/be40f4eea4fa8e6b691b96f9a383baaca20665ca.png b/_images/math/be40f4eea4fa8e6b691b96f9a383baaca20665ca.png deleted file mode 100644 index 7a53ee4d5..000000000 Binary files a/_images/math/be40f4eea4fa8e6b691b96f9a383baaca20665ca.png and /dev/null differ diff --git a/_images/math/bf96627c574a89031435dbca37bbb0754a23a3d5.png b/_images/math/bf96627c574a89031435dbca37bbb0754a23a3d5.png deleted file mode 100644 index b8e8310b4..000000000 Binary files a/_images/math/bf96627c574a89031435dbca37bbb0754a23a3d5.png and /dev/null differ diff --git a/_images/math/bfe57c96935377a67170c7ba05b6aeab4d769345.png b/_images/math/bfe57c96935377a67170c7ba05b6aeab4d769345.png deleted file mode 100644 index 6bc9a687e..000000000 Binary files a/_images/math/bfe57c96935377a67170c7ba05b6aeab4d769345.png and /dev/null differ diff --git a/_images/math/c1573bb5fbdbc122c246b6558fdb3ad68d014f53.png b/_images/math/c1573bb5fbdbc122c246b6558fdb3ad68d014f53.png deleted file mode 100644 index dd6fe2a5a..000000000 Binary files a/_images/math/c1573bb5fbdbc122c246b6558fdb3ad68d014f53.png and /dev/null differ diff --git a/_images/math/c1eff259acfe59a4e160585cfe8ce274fa1ba69f.png b/_images/math/c1eff259acfe59a4e160585cfe8ce274fa1ba69f.png deleted file mode 100644 index 7365742eb..000000000 Binary files a/_images/math/c1eff259acfe59a4e160585cfe8ce274fa1ba69f.png and /dev/null differ diff --git a/_images/math/c27cef85153c864b984a48b64940903b71c40cb9.png b/_images/math/c27cef85153c864b984a48b64940903b71c40cb9.png deleted file mode 100644 index 6263fc022..000000000 Binary files a/_images/math/c27cef85153c864b984a48b64940903b71c40cb9.png and /dev/null differ diff --git a/_images/math/c2ae1ad4f2c0b7239ebb03b52f5e4e8406f61c9a.png b/_images/math/c2ae1ad4f2c0b7239ebb03b52f5e4e8406f61c9a.png deleted file mode 100644 index 6ee41d8e1..000000000 Binary files a/_images/math/c2ae1ad4f2c0b7239ebb03b52f5e4e8406f61c9a.png and /dev/null differ diff --git a/_images/math/c2d4b2b36d48ebfe04a5fafab3d40063c36d3549.png b/_images/math/c2d4b2b36d48ebfe04a5fafab3d40063c36d3549.png deleted file mode 100644 index 92e664d38..000000000 Binary files a/_images/math/c2d4b2b36d48ebfe04a5fafab3d40063c36d3549.png and /dev/null differ diff --git a/_images/math/c3663875b550da34c8eb2ce1273f29d4471bdac5.png b/_images/math/c3663875b550da34c8eb2ce1273f29d4471bdac5.png deleted file mode 100644 index c38ef2a40..000000000 Binary files a/_images/math/c3663875b550da34c8eb2ce1273f29d4471bdac5.png and /dev/null differ diff --git a/_images/math/c36e3c256bf62055dba48062aa0a3369a1677bfd.png b/_images/math/c36e3c256bf62055dba48062aa0a3369a1677bfd.png deleted file mode 100644 index 65b53c683..000000000 Binary files a/_images/math/c36e3c256bf62055dba48062aa0a3369a1677bfd.png and /dev/null differ diff --git a/_images/math/c37dd7af20c3812bc7bbbf45d0c6cd6d698de7c3.png b/_images/math/c37dd7af20c3812bc7bbbf45d0c6cd6d698de7c3.png deleted file mode 100644 index 5cc892ffb..000000000 Binary files a/_images/math/c37dd7af20c3812bc7bbbf45d0c6cd6d698de7c3.png and /dev/null differ diff --git a/_images/math/c3c08496f07567285212e468b173bea9ca153fab.png b/_images/math/c3c08496f07567285212e468b173bea9ca153fab.png deleted file mode 100644 index 1430b12f9..000000000 Binary files a/_images/math/c3c08496f07567285212e468b173bea9ca153fab.png and /dev/null differ diff --git a/_images/math/c3ce87e097e631b2c0939c06f6166aa725a6f1e9.png b/_images/math/c3ce87e097e631b2c0939c06f6166aa725a6f1e9.png deleted file mode 100644 index de291e5c8..000000000 Binary files a/_images/math/c3ce87e097e631b2c0939c06f6166aa725a6f1e9.png and /dev/null differ diff --git a/_images/math/c4bb40dd65eae6c11b325989b14e0b8d35e4e3ef.png b/_images/math/c4bb40dd65eae6c11b325989b14e0b8d35e4e3ef.png deleted file mode 100644 index 523628856..000000000 Binary files a/_images/math/c4bb40dd65eae6c11b325989b14e0b8d35e4e3ef.png and /dev/null differ diff --git a/_images/math/c50d56a534032d16f8d71c1e6037dfbabc9a3d85.png b/_images/math/c50d56a534032d16f8d71c1e6037dfbabc9a3d85.png deleted file mode 100644 index 4f196f918..000000000 Binary files a/_images/math/c50d56a534032d16f8d71c1e6037dfbabc9a3d85.png and /dev/null differ diff --git a/_images/math/c6fa400970e245daf4caa0ed8c6272d52c24383d.png b/_images/math/c6fa400970e245daf4caa0ed8c6272d52c24383d.png deleted file mode 100644 index cb0f3911c..000000000 Binary files a/_images/math/c6fa400970e245daf4caa0ed8c6272d52c24383d.png and /dev/null differ diff --git a/_images/math/c855f9085fcb37d678f7b4ab15e39083909e6e84.png b/_images/math/c855f9085fcb37d678f7b4ab15e39083909e6e84.png deleted file mode 100644 index c88687186..000000000 Binary files a/_images/math/c855f9085fcb37d678f7b4ab15e39083909e6e84.png and /dev/null differ diff --git a/_images/math/c88fd5fd6e3daee3e7dd8b464248133cb7c68964.png b/_images/math/c88fd5fd6e3daee3e7dd8b464248133cb7c68964.png deleted file mode 100644 index 0c2b37221..000000000 Binary files a/_images/math/c88fd5fd6e3daee3e7dd8b464248133cb7c68964.png and /dev/null differ diff --git a/_images/math/c8abe22b6610379dc02030d3b5479166a8fe0105.png b/_images/math/c8abe22b6610379dc02030d3b5479166a8fe0105.png deleted file mode 100644 index d48fc7aaf..000000000 Binary files a/_images/math/c8abe22b6610379dc02030d3b5479166a8fe0105.png and /dev/null differ diff --git a/_images/math/c8b0a3f732d28a9a7c37eacd33b620da4aa6b92a.png b/_images/math/c8b0a3f732d28a9a7c37eacd33b620da4aa6b92a.png deleted file mode 100644 index bc4a7b8bf..000000000 Binary files a/_images/math/c8b0a3f732d28a9a7c37eacd33b620da4aa6b92a.png and /dev/null differ diff --git a/_images/math/c902f2a6fcdf6a3c4f1a55c8e6ee75138768f781.png b/_images/math/c902f2a6fcdf6a3c4f1a55c8e6ee75138768f781.png deleted file mode 100644 index ef451e0c0..000000000 Binary files a/_images/math/c902f2a6fcdf6a3c4f1a55c8e6ee75138768f781.png and /dev/null differ diff --git a/_images/math/c95449506df5faa754b5369eda815d3854dc2982.png b/_images/math/c95449506df5faa754b5369eda815d3854dc2982.png deleted file mode 100644 index 1db668fe9..000000000 Binary files a/_images/math/c95449506df5faa754b5369eda815d3854dc2982.png and /dev/null differ diff --git a/_images/math/c99df7a209495334da442b1ec998abaabfa320d8.png b/_images/math/c99df7a209495334da442b1ec998abaabfa320d8.png deleted file mode 100644 index 0fdb48881..000000000 Binary files a/_images/math/c99df7a209495334da442b1ec998abaabfa320d8.png and /dev/null differ diff --git a/_images/math/c9a423fa2385b51a00c695fc351992da0ab90242.png b/_images/math/c9a423fa2385b51a00c695fc351992da0ab90242.png deleted file mode 100644 index 63016eac5..000000000 Binary files a/_images/math/c9a423fa2385b51a00c695fc351992da0ab90242.png and /dev/null differ diff --git a/_images/math/c9a60a06b6ae2b7e291667370bda732cbed188ec.png b/_images/math/c9a60a06b6ae2b7e291667370bda732cbed188ec.png deleted file mode 100644 index 7abcef3bc..000000000 Binary files a/_images/math/c9a60a06b6ae2b7e291667370bda732cbed188ec.png and /dev/null differ diff --git a/_images/math/c9c838f8fbbfc1a034d065ca86954b9960435b74.png b/_images/math/c9c838f8fbbfc1a034d065ca86954b9960435b74.png deleted file mode 100644 index 5c7f758e5..000000000 Binary files a/_images/math/c9c838f8fbbfc1a034d065ca86954b9960435b74.png and /dev/null differ diff --git a/_images/math/cac8180bcf0c7e0b496472f80d50633cb01468be.png b/_images/math/cac8180bcf0c7e0b496472f80d50633cb01468be.png deleted file mode 100644 index 93bc88d32..000000000 Binary files a/_images/math/cac8180bcf0c7e0b496472f80d50633cb01468be.png and /dev/null differ diff --git a/_images/math/cb488e6b6c695abf9245b63e5fdc7e87d1bd60ba.png b/_images/math/cb488e6b6c695abf9245b63e5fdc7e87d1bd60ba.png deleted file mode 100644 index 3878ebeec..000000000 Binary files a/_images/math/cb488e6b6c695abf9245b63e5fdc7e87d1bd60ba.png and /dev/null differ diff --git a/_images/math/cbb80ad77aa7a5e227d5a46bc44d235284106cfc.png b/_images/math/cbb80ad77aa7a5e227d5a46bc44d235284106cfc.png deleted file mode 100644 index 541262865..000000000 Binary files a/_images/math/cbb80ad77aa7a5e227d5a46bc44d235284106cfc.png and /dev/null differ diff --git a/_images/math/cc61bb2174397c308b2c8551a3e8ac33cff497ed.png b/_images/math/cc61bb2174397c308b2c8551a3e8ac33cff497ed.png deleted file mode 100644 index 18c1dcd64..000000000 Binary files a/_images/math/cc61bb2174397c308b2c8551a3e8ac33cff497ed.png and /dev/null differ diff --git a/_images/math/ccfa871e953be1af00251b3da72987d5d324ed3f.png b/_images/math/ccfa871e953be1af00251b3da72987d5d324ed3f.png deleted file mode 100644 index cbc6dee7f..000000000 Binary files a/_images/math/ccfa871e953be1af00251b3da72987d5d324ed3f.png and /dev/null differ diff --git a/_images/math/cd011afd65294ad2312e56d3c43ead7591fc1354.png b/_images/math/cd011afd65294ad2312e56d3c43ead7591fc1354.png deleted file mode 100644 index 805f95720..000000000 Binary files a/_images/math/cd011afd65294ad2312e56d3c43ead7591fc1354.png and /dev/null differ diff --git a/_images/math/cd1f697d4971ab93155fb7362d54606842ca9f43.png b/_images/math/cd1f697d4971ab93155fb7362d54606842ca9f43.png deleted file mode 100644 index f608c78d3..000000000 Binary files a/_images/math/cd1f697d4971ab93155fb7362d54606842ca9f43.png and /dev/null differ diff --git a/_images/math/ce0f8446b7c4daa2052dd60d4c3b3351ebff60e3.png b/_images/math/ce0f8446b7c4daa2052dd60d4c3b3351ebff60e3.png deleted file mode 100644 index d86697a15..000000000 Binary files a/_images/math/ce0f8446b7c4daa2052dd60d4c3b3351ebff60e3.png and /dev/null differ diff --git a/_images/math/ceb34ab0bf3ee115960392819cb3a5b2d6549557.png b/_images/math/ceb34ab0bf3ee115960392819cb3a5b2d6549557.png deleted file mode 100644 index baafb225a..000000000 Binary files a/_images/math/ceb34ab0bf3ee115960392819cb3a5b2d6549557.png and /dev/null differ diff --git a/_images/math/ced9360fc824e48b96a755cddf804505981341a2.png b/_images/math/ced9360fc824e48b96a755cddf804505981341a2.png deleted file mode 100644 index cab9c7be7..000000000 Binary files a/_images/math/ced9360fc824e48b96a755cddf804505981341a2.png and /dev/null differ diff --git a/_images/math/cf798982bc604baefe06d20f096e522d1f2f1037.png b/_images/math/cf798982bc604baefe06d20f096e522d1f2f1037.png deleted file mode 100644 index c20ffa86b..000000000 Binary files a/_images/math/cf798982bc604baefe06d20f096e522d1f2f1037.png and /dev/null differ diff --git a/_images/math/cfd13a0f26eb7ef0093319a7669da7dd3771dbac.png b/_images/math/cfd13a0f26eb7ef0093319a7669da7dd3771dbac.png deleted file mode 100644 index 215b9d650..000000000 Binary files a/_images/math/cfd13a0f26eb7ef0093319a7669da7dd3771dbac.png and /dev/null differ diff --git a/_images/math/cffe2c5bd05a58b0c024c8cba9db2928b325b971.png b/_images/math/cffe2c5bd05a58b0c024c8cba9db2928b325b971.png deleted file mode 100644 index 6bafd700c..000000000 Binary files a/_images/math/cffe2c5bd05a58b0c024c8cba9db2928b325b971.png and /dev/null differ diff --git a/_images/math/d04e930be0a2eded93ab40c074adf8a99907341e.png b/_images/math/d04e930be0a2eded93ab40c074adf8a99907341e.png deleted file mode 100644 index e62df4636..000000000 Binary files a/_images/math/d04e930be0a2eded93ab40c074adf8a99907341e.png and /dev/null differ diff --git a/_images/math/d0587e89a40a507b9444255f1b5ca9cb521d8ccc.png b/_images/math/d0587e89a40a507b9444255f1b5ca9cb521d8ccc.png deleted file mode 100644 index 0bd2c76b8..000000000 Binary files a/_images/math/d0587e89a40a507b9444255f1b5ca9cb521d8ccc.png and /dev/null differ diff --git a/_images/math/d0f641ddabfc77111d0823470829ca6d9ca59ad1.png b/_images/math/d0f641ddabfc77111d0823470829ca6d9ca59ad1.png deleted file mode 100644 index 24ff50885..000000000 Binary files a/_images/math/d0f641ddabfc77111d0823470829ca6d9ca59ad1.png and /dev/null differ diff --git a/_images/math/d11b82f78cdb4ed9d71b361623c584a3ab116207.png b/_images/math/d11b82f78cdb4ed9d71b361623c584a3ab116207.png deleted file mode 100644 index a96f219d1..000000000 Binary files a/_images/math/d11b82f78cdb4ed9d71b361623c584a3ab116207.png and /dev/null differ diff --git a/_images/math/d124fa955a0cb55e30e4e17ea61f06b4d9529152.png b/_images/math/d124fa955a0cb55e30e4e17ea61f06b4d9529152.png deleted file mode 100644 index 137ae63f1..000000000 Binary files a/_images/math/d124fa955a0cb55e30e4e17ea61f06b4d9529152.png and /dev/null differ diff --git a/_images/math/d246eafd090a8727e443e9a38c52b920e215bbae.png b/_images/math/d246eafd090a8727e443e9a38c52b920e215bbae.png deleted file mode 100644 index 232d99e6d..000000000 Binary files a/_images/math/d246eafd090a8727e443e9a38c52b920e215bbae.png and /dev/null differ diff --git a/_images/math/d26038b40e8a3a6a3c92bb568fdd8c6a0cc010d5.png b/_images/math/d26038b40e8a3a6a3c92bb568fdd8c6a0cc010d5.png deleted file mode 100644 index 2c5225561..000000000 Binary files a/_images/math/d26038b40e8a3a6a3c92bb568fdd8c6a0cc010d5.png and /dev/null differ diff --git a/_images/math/d284ac5f1b5f5375208fdb6bd4ef761cb5eacdf7.png b/_images/math/d284ac5f1b5f5375208fdb6bd4ef761cb5eacdf7.png deleted file mode 100644 index 9415986b0..000000000 Binary files a/_images/math/d284ac5f1b5f5375208fdb6bd4ef761cb5eacdf7.png and /dev/null differ diff --git a/_images/math/d2c236590767c2c039cccbf4658e5f5a15eef64d.png b/_images/math/d2c236590767c2c039cccbf4658e5f5a15eef64d.png deleted file mode 100644 index 0c2b37221..000000000 Binary files a/_images/math/d2c236590767c2c039cccbf4658e5f5a15eef64d.png and /dev/null differ diff --git a/_images/math/d32c78b759903e3f4bd4fd2ce0b86358f7500c5d.png b/_images/math/d32c78b759903e3f4bd4fd2ce0b86358f7500c5d.png deleted file mode 100644 index aa9aacc2a..000000000 Binary files a/_images/math/d32c78b759903e3f4bd4fd2ce0b86358f7500c5d.png and /dev/null differ diff --git a/_images/math/d34e2a7acd952b653e60c69d2a11d6f256941963.png b/_images/math/d34e2a7acd952b653e60c69d2a11d6f256941963.png deleted file mode 100644 index c52d374fe..000000000 Binary files a/_images/math/d34e2a7acd952b653e60c69d2a11d6f256941963.png and /dev/null differ diff --git a/_images/math/d36b141653b3cd788cab1ceec40f54fc5dde0d77.png b/_images/math/d36b141653b3cd788cab1ceec40f54fc5dde0d77.png deleted file mode 100644 index 316f16f27..000000000 Binary files a/_images/math/d36b141653b3cd788cab1ceec40f54fc5dde0d77.png and /dev/null differ diff --git a/_images/math/d3752480013ffb470e055e9556ab284aafc51ebe.png b/_images/math/d3752480013ffb470e055e9556ab284aafc51ebe.png deleted file mode 100644 index d4c6b4ec6..000000000 Binary files a/_images/math/d3752480013ffb470e055e9556ab284aafc51ebe.png and /dev/null differ diff --git a/_images/math/d423d1cffd83126213ac991c1a88ba8c60b1641a.png b/_images/math/d423d1cffd83126213ac991c1a88ba8c60b1641a.png deleted file mode 100644 index ae911adec..000000000 Binary files a/_images/math/d423d1cffd83126213ac991c1a88ba8c60b1641a.png and /dev/null differ diff --git a/_images/math/d44aec50d29458b96c09e92c97104e670710c0f8.png b/_images/math/d44aec50d29458b96c09e92c97104e670710c0f8.png deleted file mode 100644 index 34935dbdf..000000000 Binary files a/_images/math/d44aec50d29458b96c09e92c97104e670710c0f8.png and /dev/null differ diff --git a/_images/math/d44ca12044ca1da7d898eb60f5d96559c9aa5c6c.png b/_images/math/d44ca12044ca1da7d898eb60f5d96559c9aa5c6c.png deleted file mode 100644 index 3988f81ec..000000000 Binary files a/_images/math/d44ca12044ca1da7d898eb60f5d96559c9aa5c6c.png and /dev/null differ diff --git a/_images/math/d56d732b25b2bd41267929bb151a1397661fb62a.png b/_images/math/d56d732b25b2bd41267929bb151a1397661fb62a.png deleted file mode 100644 index dd2dda317..000000000 Binary files a/_images/math/d56d732b25b2bd41267929bb151a1397661fb62a.png and /dev/null differ diff --git a/_images/math/d60786dfb68719d2c95244772f5c3b12b1e26bbf.png b/_images/math/d60786dfb68719d2c95244772f5c3b12b1e26bbf.png deleted file mode 100644 index c5d62ff0d..000000000 Binary files a/_images/math/d60786dfb68719d2c95244772f5c3b12b1e26bbf.png and /dev/null differ diff --git a/_images/math/d65ea0027d038284767393ee82a394edbfc5ab9d.png b/_images/math/d65ea0027d038284767393ee82a394edbfc5ab9d.png deleted file mode 100644 index 2d68d2749..000000000 Binary files a/_images/math/d65ea0027d038284767393ee82a394edbfc5ab9d.png and /dev/null differ diff --git a/_images/math/d67fb61cfffca2cc069e083d76cb6220b4ca14c8.png b/_images/math/d67fb61cfffca2cc069e083d76cb6220b4ca14c8.png deleted file mode 100644 index 95d0ba766..000000000 Binary files a/_images/math/d67fb61cfffca2cc069e083d76cb6220b4ca14c8.png and /dev/null differ diff --git a/_images/math/d7c1d78c68efc3ab35af0d2d23460f5afaf24624.png b/_images/math/d7c1d78c68efc3ab35af0d2d23460f5afaf24624.png deleted file mode 100644 index f71964c2b..000000000 Binary files a/_images/math/d7c1d78c68efc3ab35af0d2d23460f5afaf24624.png and /dev/null differ diff --git a/_images/math/d821aac2f789a3cd754a0c175d6ab3a0bdde13f4.png b/_images/math/d821aac2f789a3cd754a0c175d6ab3a0bdde13f4.png deleted file mode 100644 index ae66f5939..000000000 Binary files a/_images/math/d821aac2f789a3cd754a0c175d6ab3a0bdde13f4.png and /dev/null differ diff --git a/_images/math/d89460ecbcfef851ff9c101f3d5d6130fbb1f130.png b/_images/math/d89460ecbcfef851ff9c101f3d5d6130fbb1f130.png deleted file mode 100644 index 33a04ecf9..000000000 Binary files a/_images/math/d89460ecbcfef851ff9c101f3d5d6130fbb1f130.png and /dev/null differ diff --git a/_images/math/d971219eaf1c78d962f294a33a761847fff0ad6f.png b/_images/math/d971219eaf1c78d962f294a33a761847fff0ad6f.png deleted file mode 100644 index cf8c19179..000000000 Binary files a/_images/math/d971219eaf1c78d962f294a33a761847fff0ad6f.png and /dev/null differ diff --git a/_images/math/d98ecf327f611fdc01c42d44d066ea00604128ad.png b/_images/math/d98ecf327f611fdc01c42d44d066ea00604128ad.png deleted file mode 100644 index 39d15b79f..000000000 Binary files a/_images/math/d98ecf327f611fdc01c42d44d066ea00604128ad.png and /dev/null differ diff --git a/_images/math/d99efde75c84ef402a92cd4497530d2366fb112f.png b/_images/math/d99efde75c84ef402a92cd4497530d2366fb112f.png deleted file mode 100644 index 349cab5f4..000000000 Binary files a/_images/math/d99efde75c84ef402a92cd4497530d2366fb112f.png and /dev/null differ diff --git a/_images/math/d9dae826173271b09c2f3aef7f06bc2c1c6a85d0.png b/_images/math/d9dae826173271b09c2f3aef7f06bc2c1c6a85d0.png deleted file mode 100644 index cc8db05ea..000000000 Binary files a/_images/math/d9dae826173271b09c2f3aef7f06bc2c1c6a85d0.png and /dev/null differ diff --git a/_images/math/da85ad5dd215afcf9e0efe00c2a3375acedaaf28.png b/_images/math/da85ad5dd215afcf9e0efe00c2a3375acedaaf28.png deleted file mode 100644 index 01d06b620..000000000 Binary files a/_images/math/da85ad5dd215afcf9e0efe00c2a3375acedaaf28.png and /dev/null differ diff --git a/_images/math/db2a3ebc5507d1162eddd3bc3185eaabbc17bb81.png b/_images/math/db2a3ebc5507d1162eddd3bc3185eaabbc17bb81.png deleted file mode 100644 index ae091a810..000000000 Binary files a/_images/math/db2a3ebc5507d1162eddd3bc3185eaabbc17bb81.png and /dev/null differ diff --git a/_images/math/dc4c729a750ff6bd4113b7da3521e3daaffef85e.png b/_images/math/dc4c729a750ff6bd4113b7da3521e3daaffef85e.png deleted file mode 100644 index 60f92a759..000000000 Binary files a/_images/math/dc4c729a750ff6bd4113b7da3521e3daaffef85e.png and /dev/null differ diff --git a/_images/math/dc9e4b8f88ab87ca0372a298ffe6c3234aeaf6bc.png b/_images/math/dc9e4b8f88ab87ca0372a298ffe6c3234aeaf6bc.png deleted file mode 100644 index 3b721b788..000000000 Binary files a/_images/math/dc9e4b8f88ab87ca0372a298ffe6c3234aeaf6bc.png and /dev/null differ diff --git a/_images/math/dd4c02359bbe7be48a9dda19a2ff4925840db976.png b/_images/math/dd4c02359bbe7be48a9dda19a2ff4925840db976.png deleted file mode 100644 index cbc6dee7f..000000000 Binary files a/_images/math/dd4c02359bbe7be48a9dda19a2ff4925840db976.png and /dev/null differ diff --git a/_images/math/de6153ef1dccee84904f1dbac1e439589f70d375.png b/_images/math/de6153ef1dccee84904f1dbac1e439589f70d375.png deleted file mode 100644 index 719fd530f..000000000 Binary files a/_images/math/de6153ef1dccee84904f1dbac1e439589f70d375.png and /dev/null differ diff --git a/_images/math/de75128ffb336ee9feee90a9cb946de93ac2cf0e.png b/_images/math/de75128ffb336ee9feee90a9cb946de93ac2cf0e.png deleted file mode 100644 index 3369b3bd6..000000000 Binary files a/_images/math/de75128ffb336ee9feee90a9cb946de93ac2cf0e.png and /dev/null differ diff --git a/_images/math/decd2c2611e51c2150c5f6e1f5e357381d4a7446.png b/_images/math/decd2c2611e51c2150c5f6e1f5e357381d4a7446.png deleted file mode 100644 index 679b3272a..000000000 Binary files a/_images/math/decd2c2611e51c2150c5f6e1f5e357381d4a7446.png and /dev/null differ diff --git a/_images/math/ded0b527b71ad74af304e83416c45acf26648f7d.png b/_images/math/ded0b527b71ad74af304e83416c45acf26648f7d.png deleted file mode 100644 index 3bfb7d43f..000000000 Binary files a/_images/math/ded0b527b71ad74af304e83416c45acf26648f7d.png and /dev/null differ diff --git a/_images/math/ded4754a42095f860312f92d21d7b429a3da81d2.png b/_images/math/ded4754a42095f860312f92d21d7b429a3da81d2.png deleted file mode 100644 index cb8cd8d2c..000000000 Binary files a/_images/math/ded4754a42095f860312f92d21d7b429a3da81d2.png and /dev/null differ diff --git a/_images/math/defc8dedc4e1c71aa65da56c385f2d8681f2ed4d.png b/_images/math/defc8dedc4e1c71aa65da56c385f2d8681f2ed4d.png deleted file mode 100644 index 596e4094b..000000000 Binary files a/_images/math/defc8dedc4e1c71aa65da56c385f2d8681f2ed4d.png and /dev/null differ diff --git a/_images/math/df4310c92f1872eecfc92966cca2a9ce3bfd5dfc.png b/_images/math/df4310c92f1872eecfc92966cca2a9ce3bfd5dfc.png deleted file mode 100644 index 5116b6bfe..000000000 Binary files a/_images/math/df4310c92f1872eecfc92966cca2a9ce3bfd5dfc.png and /dev/null differ diff --git a/_images/math/df74d251005d72919dea46b94ea764251c93a029.png b/_images/math/df74d251005d72919dea46b94ea764251c93a029.png deleted file mode 100644 index c80681f6b..000000000 Binary files a/_images/math/df74d251005d72919dea46b94ea764251c93a029.png and /dev/null differ diff --git a/_images/math/dfbd3c46cd70af18a3289edb9c4a0d2e6f4a3720.png b/_images/math/dfbd3c46cd70af18a3289edb9c4a0d2e6f4a3720.png deleted file mode 100644 index 8503426ea..000000000 Binary files a/_images/math/dfbd3c46cd70af18a3289edb9c4a0d2e6f4a3720.png and /dev/null differ diff --git a/_images/math/dfd4ac120ea3bbdd28437706e80886f992b13b83.png b/_images/math/dfd4ac120ea3bbdd28437706e80886f992b13b83.png deleted file mode 100644 index 8a49e83cd..000000000 Binary files a/_images/math/dfd4ac120ea3bbdd28437706e80886f992b13b83.png and /dev/null differ diff --git a/_images/math/e049927739b04a7c9b5fb0c611efd6017ff7f44c.png b/_images/math/e049927739b04a7c9b5fb0c611efd6017ff7f44c.png deleted file mode 100644 index a28d25112..000000000 Binary files a/_images/math/e049927739b04a7c9b5fb0c611efd6017ff7f44c.png and /dev/null differ diff --git a/_images/math/e04ea1964d7a8410e22f5bc26d9cc0e332e34290.png b/_images/math/e04ea1964d7a8410e22f5bc26d9cc0e332e34290.png deleted file mode 100644 index d4c4f8fbe..000000000 Binary files a/_images/math/e04ea1964d7a8410e22f5bc26d9cc0e332e34290.png and /dev/null differ diff --git a/_images/math/e0917dd9791ce7043a0a51107c31b4db8f1295a0.png b/_images/math/e0917dd9791ce7043a0a51107c31b4db8f1295a0.png deleted file mode 100644 index 0c901f53a..000000000 Binary files a/_images/math/e0917dd9791ce7043a0a51107c31b4db8f1295a0.png and /dev/null differ diff --git a/_images/math/e0c1c7ee8111c03c6aa7da153d8e0fb19bc3dfd6.png b/_images/math/e0c1c7ee8111c03c6aa7da153d8e0fb19bc3dfd6.png deleted file mode 100644 index e266a69e6..000000000 Binary files a/_images/math/e0c1c7ee8111c03c6aa7da153d8e0fb19bc3dfd6.png and /dev/null differ diff --git a/_images/math/e0ea2cbd569da74b387b1d505c58f40ebbd15641.png b/_images/math/e0ea2cbd569da74b387b1d505c58f40ebbd15641.png deleted file mode 100644 index 23d20c78d..000000000 Binary files a/_images/math/e0ea2cbd569da74b387b1d505c58f40ebbd15641.png and /dev/null differ diff --git a/_images/math/e12a8b90b11fd044b27cbb4eca3be68b571463ca.png b/_images/math/e12a8b90b11fd044b27cbb4eca3be68b571463ca.png deleted file mode 100644 index e5c72e6a9..000000000 Binary files a/_images/math/e12a8b90b11fd044b27cbb4eca3be68b571463ca.png and /dev/null differ diff --git a/_images/math/e25a6fd3ad8b2dc49498cf66a995d9fd24970a64.png b/_images/math/e25a6fd3ad8b2dc49498cf66a995d9fd24970a64.png deleted file mode 100644 index be9921f52..000000000 Binary files a/_images/math/e25a6fd3ad8b2dc49498cf66a995d9fd24970a64.png and /dev/null differ diff --git a/_images/math/e2a8df37dac41dfad0cf109226f47417406ebd27.png b/_images/math/e2a8df37dac41dfad0cf109226f47417406ebd27.png deleted file mode 100644 index 899f10b37..000000000 Binary files a/_images/math/e2a8df37dac41dfad0cf109226f47417406ebd27.png and /dev/null differ diff --git a/_images/math/e404cab934c61364d1a6a3a9be12eae530d8d7f1.png b/_images/math/e404cab934c61364d1a6a3a9be12eae530d8d7f1.png deleted file mode 100644 index 1aa78de5f..000000000 Binary files a/_images/math/e404cab934c61364d1a6a3a9be12eae530d8d7f1.png and /dev/null differ diff --git a/_images/math/e45162800d593c2dee55555d800d84157e75ae00.png b/_images/math/e45162800d593c2dee55555d800d84157e75ae00.png deleted file mode 100644 index 6cbadb7bd..000000000 Binary files a/_images/math/e45162800d593c2dee55555d800d84157e75ae00.png and /dev/null differ diff --git a/_images/math/e4867047ecc76ac8083e8dd8d3433420adc8d89f.png b/_images/math/e4867047ecc76ac8083e8dd8d3433420adc8d89f.png deleted file mode 100644 index 8de2b6ab8..000000000 Binary files a/_images/math/e4867047ecc76ac8083e8dd8d3433420adc8d89f.png and /dev/null differ diff --git a/_images/math/e5fc41b391867da81606413e3389c7efc73abaf0.png b/_images/math/e5fc41b391867da81606413e3389c7efc73abaf0.png deleted file mode 100644 index a4371800f..000000000 Binary files a/_images/math/e5fc41b391867da81606413e3389c7efc73abaf0.png and /dev/null differ diff --git a/_images/math/e67349cbacdad7da2dd060e710902e6301bb48ff.png b/_images/math/e67349cbacdad7da2dd060e710902e6301bb48ff.png deleted file mode 100644 index c1c84c657..000000000 Binary files a/_images/math/e67349cbacdad7da2dd060e710902e6301bb48ff.png and /dev/null differ diff --git a/_images/math/e6d44b8f0407431802e1db91e0c10cb5ff5bba05.png b/_images/math/e6d44b8f0407431802e1db91e0c10cb5ff5bba05.png deleted file mode 100644 index ada418aae..000000000 Binary files a/_images/math/e6d44b8f0407431802e1db91e0c10cb5ff5bba05.png and /dev/null differ diff --git a/_images/math/e748d80eda5ee6750e81a5e5259cba01a2c76e35.png b/_images/math/e748d80eda5ee6750e81a5e5259cba01a2c76e35.png deleted file mode 100644 index 8eafb70b6..000000000 Binary files a/_images/math/e748d80eda5ee6750e81a5e5259cba01a2c76e35.png and /dev/null differ diff --git a/_images/math/e8bd2b0146269623a84749648d9fdfcc7739c12c.png b/_images/math/e8bd2b0146269623a84749648d9fdfcc7739c12c.png deleted file mode 100644 index c80c4da07..000000000 Binary files a/_images/math/e8bd2b0146269623a84749648d9fdfcc7739c12c.png and /dev/null differ diff --git a/_images/math/e8ed905583e5aaeab5538350d57c711cf040ed91.png b/_images/math/e8ed905583e5aaeab5538350d57c711cf040ed91.png deleted file mode 100644 index 74d6d3fdc..000000000 Binary files a/_images/math/e8ed905583e5aaeab5538350d57c711cf040ed91.png and /dev/null differ diff --git a/_images/math/e9203da50e1059455123460d4e716c9c7f440cc3.png b/_images/math/e9203da50e1059455123460d4e716c9c7f440cc3.png deleted file mode 100644 index 09f0ba8cf..000000000 Binary files a/_images/math/e9203da50e1059455123460d4e716c9c7f440cc3.png and /dev/null differ diff --git a/_images/math/ea1c81ac9d1ec86c7c16b81499b209bdfdafa933.png b/_images/math/ea1c81ac9d1ec86c7c16b81499b209bdfdafa933.png deleted file mode 100644 index ed38c1e83..000000000 Binary files a/_images/math/ea1c81ac9d1ec86c7c16b81499b209bdfdafa933.png and /dev/null differ diff --git a/_images/math/ea9369891f1ff8938ae390bdb648678e78c3003a.png b/_images/math/ea9369891f1ff8938ae390bdb648678e78c3003a.png deleted file mode 100644 index d404ba0f0..000000000 Binary files a/_images/math/ea9369891f1ff8938ae390bdb648678e78c3003a.png and /dev/null differ diff --git a/_images/math/eb903f5c889949b4884436afdca0991a11c27fa3.png b/_images/math/eb903f5c889949b4884436afdca0991a11c27fa3.png deleted file mode 100644 index 5e0a75a3a..000000000 Binary files a/_images/math/eb903f5c889949b4884436afdca0991a11c27fa3.png and /dev/null differ diff --git a/_images/math/ebbeb11517290571c58e728c3e3b0120c7d1b7f7.png b/_images/math/ebbeb11517290571c58e728c3e3b0120c7d1b7f7.png deleted file mode 100644 index f4894e10f..000000000 Binary files a/_images/math/ebbeb11517290571c58e728c3e3b0120c7d1b7f7.png and /dev/null differ diff --git a/_images/math/ebd11fac03b10ab06ab0af037ac8baac8f2fbf61.png b/_images/math/ebd11fac03b10ab06ab0af037ac8baac8f2fbf61.png deleted file mode 100644 index beee4bff2..000000000 Binary files a/_images/math/ebd11fac03b10ab06ab0af037ac8baac8f2fbf61.png and /dev/null differ diff --git a/_images/math/ebdc4a7b4c082489093b421f2390dcb6efcdd396.png b/_images/math/ebdc4a7b4c082489093b421f2390dcb6efcdd396.png deleted file mode 100644 index 990235760..000000000 Binary files a/_images/math/ebdc4a7b4c082489093b421f2390dcb6efcdd396.png and /dev/null differ diff --git a/_images/math/ebe2dcd5d61a719dd0d414151fdc2916ddd399fc.png b/_images/math/ebe2dcd5d61a719dd0d414151fdc2916ddd399fc.png deleted file mode 100644 index d223b3dc3..000000000 Binary files a/_images/math/ebe2dcd5d61a719dd0d414151fdc2916ddd399fc.png and /dev/null differ diff --git a/_images/math/ec0356f151608d25a546f3b84d5428dd0bb0eff4.png b/_images/math/ec0356f151608d25a546f3b84d5428dd0bb0eff4.png deleted file mode 100644 index 40c30bee2..000000000 Binary files a/_images/math/ec0356f151608d25a546f3b84d5428dd0bb0eff4.png and /dev/null differ diff --git a/_images/math/ec282da8551019ee24786a0fd65a9f0ef74fa596.png b/_images/math/ec282da8551019ee24786a0fd65a9f0ef74fa596.png deleted file mode 100644 index 028f20066..000000000 Binary files a/_images/math/ec282da8551019ee24786a0fd65a9f0ef74fa596.png and /dev/null differ diff --git a/_images/math/ec6c2809bb2665fd13a870685fea911da70b815e.png b/_images/math/ec6c2809bb2665fd13a870685fea911da70b815e.png deleted file mode 100644 index 6f4d2f692..000000000 Binary files a/_images/math/ec6c2809bb2665fd13a870685fea911da70b815e.png and /dev/null differ diff --git a/_images/math/ec71d94c1f471dcbbe2a8178e9b9cb9099554151.png b/_images/math/ec71d94c1f471dcbbe2a8178e9b9cb9099554151.png deleted file mode 100644 index 8aecf75a2..000000000 Binary files a/_images/math/ec71d94c1f471dcbbe2a8178e9b9cb9099554151.png and /dev/null differ diff --git a/_images/math/ec7b42bd4372708a5467915e95d0ecb498d57e1d.png b/_images/math/ec7b42bd4372708a5467915e95d0ecb498d57e1d.png deleted file mode 100644 index 6197336a4..000000000 Binary files a/_images/math/ec7b42bd4372708a5467915e95d0ecb498d57e1d.png and /dev/null differ diff --git a/_images/math/ecacf168506a8191ad496871b8028f42fee1b6c1.png b/_images/math/ecacf168506a8191ad496871b8028f42fee1b6c1.png deleted file mode 100644 index a4d0a77cb..000000000 Binary files a/_images/math/ecacf168506a8191ad496871b8028f42fee1b6c1.png and /dev/null differ diff --git a/_images/math/ed11f7e832ef8f547f89ad70f50dcdaacf1b681b.png b/_images/math/ed11f7e832ef8f547f89ad70f50dcdaacf1b681b.png deleted file mode 100644 index affafe514..000000000 Binary files a/_images/math/ed11f7e832ef8f547f89ad70f50dcdaacf1b681b.png and /dev/null differ diff --git a/_images/math/ee76b86f7389cc7e84976edb64dcc58019937411.png b/_images/math/ee76b86f7389cc7e84976edb64dcc58019937411.png deleted file mode 100644 index de0d4ac94..000000000 Binary files a/_images/math/ee76b86f7389cc7e84976edb64dcc58019937411.png and /dev/null differ diff --git a/_images/math/ef1175baf719571a071178e52ffa90dc1ba033c9.png b/_images/math/ef1175baf719571a071178e52ffa90dc1ba033c9.png deleted file mode 100644 index 7952a1f2b..000000000 Binary files a/_images/math/ef1175baf719571a071178e52ffa90dc1ba033c9.png and /dev/null differ diff --git a/_images/math/ef86b8c9ffd4486aedde641af8c4579872ff85e8.png b/_images/math/ef86b8c9ffd4486aedde641af8c4579872ff85e8.png deleted file mode 100644 index 00b698560..000000000 Binary files a/_images/math/ef86b8c9ffd4486aedde641af8c4579872ff85e8.png and /dev/null differ diff --git a/_images/math/ef9270877405055756d345facd044e4ab297f858.png b/_images/math/ef9270877405055756d345facd044e4ab297f858.png deleted file mode 100644 index b4285320d..000000000 Binary files a/_images/math/ef9270877405055756d345facd044e4ab297f858.png and /dev/null differ diff --git a/_images/math/eff822074d94619ea86dcccd9f1e410360a711c3.png b/_images/math/eff822074d94619ea86dcccd9f1e410360a711c3.png deleted file mode 100644 index 4b1fafe65..000000000 Binary files a/_images/math/eff822074d94619ea86dcccd9f1e410360a711c3.png and /dev/null differ diff --git a/_images/math/f00519233785225b64f0e17b1978bb0002198cd5.png b/_images/math/f00519233785225b64f0e17b1978bb0002198cd5.png deleted file mode 100644 index 51c64afba..000000000 Binary files a/_images/math/f00519233785225b64f0e17b1978bb0002198cd5.png and /dev/null differ diff --git a/_images/math/f026aecf11ec7f6141ab863f260d395f94b10f51.png b/_images/math/f026aecf11ec7f6141ab863f260d395f94b10f51.png deleted file mode 100644 index 3de12b5f5..000000000 Binary files a/_images/math/f026aecf11ec7f6141ab863f260d395f94b10f51.png and /dev/null differ diff --git a/_images/math/f0792c32b45049f1aef67e0092bd8262ca3d6516.png b/_images/math/f0792c32b45049f1aef67e0092bd8262ca3d6516.png deleted file mode 100644 index 46f1758ac..000000000 Binary files a/_images/math/f0792c32b45049f1aef67e0092bd8262ca3d6516.png and /dev/null differ diff --git a/_images/math/f0baf397295b367a5ee282fac446b114f926affa.png b/_images/math/f0baf397295b367a5ee282fac446b114f926affa.png deleted file mode 100644 index 056c7a400..000000000 Binary files a/_images/math/f0baf397295b367a5ee282fac446b114f926affa.png and /dev/null differ diff --git a/_images/math/f25f666c16fac290b101af5e4e2eeeaefb68cd07.png b/_images/math/f25f666c16fac290b101af5e4e2eeeaefb68cd07.png deleted file mode 100644 index 34ebcfe7a..000000000 Binary files a/_images/math/f25f666c16fac290b101af5e4e2eeeaefb68cd07.png and /dev/null differ diff --git a/_images/math/f281f14435d6438786e3ed16e70731e8f1e07590.png b/_images/math/f281f14435d6438786e3ed16e70731e8f1e07590.png deleted file mode 100644 index d04a9e93d..000000000 Binary files a/_images/math/f281f14435d6438786e3ed16e70731e8f1e07590.png and /dev/null differ diff --git a/_images/math/f33e0b8665bbcf7c9f4197698effa5dd87144ff0.png b/_images/math/f33e0b8665bbcf7c9f4197698effa5dd87144ff0.png deleted file mode 100644 index 672c5bc9d..000000000 Binary files a/_images/math/f33e0b8665bbcf7c9f4197698effa5dd87144ff0.png and /dev/null differ diff --git a/_images/math/f38f3b79fc92bc44468688bd18216f4d92cd9f44.png b/_images/math/f38f3b79fc92bc44468688bd18216f4d92cd9f44.png deleted file mode 100644 index 30647c24f..000000000 Binary files a/_images/math/f38f3b79fc92bc44468688bd18216f4d92cd9f44.png and /dev/null differ diff --git a/_images/math/f3e8f82a52bdd47c816d880bdbe685ecfc88160b.png b/_images/math/f3e8f82a52bdd47c816d880bdbe685ecfc88160b.png deleted file mode 100644 index 6d2d6ad07..000000000 Binary files a/_images/math/f3e8f82a52bdd47c816d880bdbe685ecfc88160b.png and /dev/null differ diff --git a/_images/math/f485d2304e2a761ac6c03ed005a2d81614dfa872.png b/_images/math/f485d2304e2a761ac6c03ed005a2d81614dfa872.png deleted file mode 100644 index 2e3b4cc7a..000000000 Binary files a/_images/math/f485d2304e2a761ac6c03ed005a2d81614dfa872.png and /dev/null differ diff --git a/_images/math/f489e0a4ec9cb2a6cec4591ca2eae306ce1331b4.png b/_images/math/f489e0a4ec9cb2a6cec4591ca2eae306ce1331b4.png deleted file mode 100644 index 28a00efe6..000000000 Binary files a/_images/math/f489e0a4ec9cb2a6cec4591ca2eae306ce1331b4.png and /dev/null differ diff --git a/_images/math/f68b751156420c49cf9df976da697b417f357d84.png b/_images/math/f68b751156420c49cf9df976da697b417f357d84.png deleted file mode 100644 index c30536046..000000000 Binary files a/_images/math/f68b751156420c49cf9df976da697b417f357d84.png and /dev/null differ diff --git a/_images/math/f6d9509b33cfb2c70d900c8c436eaebf64c13310.png b/_images/math/f6d9509b33cfb2c70d900c8c436eaebf64c13310.png deleted file mode 100644 index 624673162..000000000 Binary files a/_images/math/f6d9509b33cfb2c70d900c8c436eaebf64c13310.png and /dev/null differ diff --git a/_images/math/f72f6f026ac8e2286424706b0cdff00ff8375384.png b/_images/math/f72f6f026ac8e2286424706b0cdff00ff8375384.png deleted file mode 100644 index dd1a586af..000000000 Binary files a/_images/math/f72f6f026ac8e2286424706b0cdff00ff8375384.png and /dev/null differ diff --git a/_images/math/f7abeb5181706711960e49186ff99ac2111f46f3.png b/_images/math/f7abeb5181706711960e49186ff99ac2111f46f3.png deleted file mode 100644 index 5fcf2dfae..000000000 Binary files a/_images/math/f7abeb5181706711960e49186ff99ac2111f46f3.png and /dev/null differ diff --git a/_images/math/f7e73389b494d356293b5ad9e3601a3a61609e96.png b/_images/math/f7e73389b494d356293b5ad9e3601a3a61609e96.png deleted file mode 100644 index f46fced5c..000000000 Binary files a/_images/math/f7e73389b494d356293b5ad9e3601a3a61609e96.png and /dev/null differ diff --git a/_images/math/f8b53d20645b1140423b925db1350ec682184314.png b/_images/math/f8b53d20645b1140423b925db1350ec682184314.png deleted file mode 100644 index 1d1868ca4..000000000 Binary files a/_images/math/f8b53d20645b1140423b925db1350ec682184314.png and /dev/null differ diff --git a/_images/math/f9d907c28a8f3dfbc8322ddbb53d6b37453aad63.png b/_images/math/f9d907c28a8f3dfbc8322ddbb53d6b37453aad63.png deleted file mode 100644 index 3ebaa77be..000000000 Binary files a/_images/math/f9d907c28a8f3dfbc8322ddbb53d6b37453aad63.png and /dev/null differ diff --git a/_images/math/fa34489cf430b7630b30f28b2eb050e2489e3523.png b/_images/math/fa34489cf430b7630b30f28b2eb050e2489e3523.png deleted file mode 100644 index 66befbb86..000000000 Binary files a/_images/math/fa34489cf430b7630b30f28b2eb050e2489e3523.png and /dev/null differ diff --git a/_images/math/fa8a43fd984fd7fb47ea90109e3010adc8ab09cc.png b/_images/math/fa8a43fd984fd7fb47ea90109e3010adc8ab09cc.png deleted file mode 100644 index aaa0d98d9..000000000 Binary files a/_images/math/fa8a43fd984fd7fb47ea90109e3010adc8ab09cc.png and /dev/null differ diff --git a/_images/math/fae13eefa9a27032f6f8e37c90430ee7752efe0c.png b/_images/math/fae13eefa9a27032f6f8e37c90430ee7752efe0c.png deleted file mode 100644 index 467bd20ae..000000000 Binary files a/_images/math/fae13eefa9a27032f6f8e37c90430ee7752efe0c.png and /dev/null differ diff --git a/_images/math/fba73f999a8f7a592fe5217a2006a9e6a07e78b6.png b/_images/math/fba73f999a8f7a592fe5217a2006a9e6a07e78b6.png deleted file mode 100644 index c76904da1..000000000 Binary files a/_images/math/fba73f999a8f7a592fe5217a2006a9e6a07e78b6.png and /dev/null differ diff --git a/_images/math/fbbd7cbe39753a1f3c7fd7d850bb95bd97781a6c.png b/_images/math/fbbd7cbe39753a1f3c7fd7d850bb95bd97781a6c.png deleted file mode 100644 index 147d1de6a..000000000 Binary files a/_images/math/fbbd7cbe39753a1f3c7fd7d850bb95bd97781a6c.png and /dev/null differ diff --git a/_images/math/fca521d3cdcdfb7a59db5eb629a94fc2783cf0fb.png b/_images/math/fca521d3cdcdfb7a59db5eb629a94fc2783cf0fb.png deleted file mode 100644 index e6700fcfd..000000000 Binary files a/_images/math/fca521d3cdcdfb7a59db5eb629a94fc2783cf0fb.png and /dev/null differ diff --git a/_images/math/fcd3c7d79435a73a909916f6ae106d4b640566e5.png b/_images/math/fcd3c7d79435a73a909916f6ae106d4b640566e5.png deleted file mode 100644 index be5d4b739..000000000 Binary files a/_images/math/fcd3c7d79435a73a909916f6ae106d4b640566e5.png and /dev/null differ diff --git a/_images/math/fd1481658dcae3291a34c4daa1d4070b58d9ea50.png b/_images/math/fd1481658dcae3291a34c4daa1d4070b58d9ea50.png deleted file mode 100644 index 5b09f44f4..000000000 Binary files a/_images/math/fd1481658dcae3291a34c4daa1d4070b58d9ea50.png and /dev/null differ diff --git a/_images/math/fd7b44db5c3ad98d514be8b183781853e1e76c74.png b/_images/math/fd7b44db5c3ad98d514be8b183781853e1e76c74.png deleted file mode 100644 index d114e2c9d..000000000 Binary files a/_images/math/fd7b44db5c3ad98d514be8b183781853e1e76c74.png and /dev/null differ diff --git a/_images/math/fdbdb6243522f89db716f229b94be1c028a97b8a.png b/_images/math/fdbdb6243522f89db716f229b94be1c028a97b8a.png deleted file mode 100644 index f78ca374c..000000000 Binary files a/_images/math/fdbdb6243522f89db716f229b94be1c028a97b8a.png and /dev/null differ diff --git a/_images/math/fe32496da074353a18adf0bbc0768a788019c45c.png b/_images/math/fe32496da074353a18adf0bbc0768a788019c45c.png deleted file mode 100644 index b8ed72948..000000000 Binary files a/_images/math/fe32496da074353a18adf0bbc0768a788019c45c.png and /dev/null differ diff --git a/_images/math/fe45a709c71e4160e1a09e3b4cc03d2d36d15644.png b/_images/math/fe45a709c71e4160e1a09e3b4cc03d2d36d15644.png deleted file mode 100644 index e91a9031e..000000000 Binary files a/_images/math/fe45a709c71e4160e1a09e3b4cc03d2d36d15644.png and /dev/null differ diff --git a/_images/math/fe5e13adeec88a6816734c23c55c8fd8bc35e9f4.png b/_images/math/fe5e13adeec88a6816734c23c55c8fd8bc35e9f4.png deleted file mode 100644 index 639aa9063..000000000 Binary files a/_images/math/fe5e13adeec88a6816734c23c55c8fd8bc35e9f4.png and /dev/null differ diff --git a/_images/math/fe78253d5d68795f5c530b05714bbcee77632b60.png b/_images/math/fe78253d5d68795f5c530b05714bbcee77632b60.png deleted file mode 100644 index f9b5aad70..000000000 Binary files a/_images/math/fe78253d5d68795f5c530b05714bbcee77632b60.png and /dev/null differ diff --git a/_images/math/feac70be9cd0914fe9b9519ead9234ec24724d48.png b/_images/math/feac70be9cd0914fe9b9519ead9234ec24724d48.png deleted file mode 100644 index ec1677968..000000000 Binary files a/_images/math/feac70be9cd0914fe9b9519ead9234ec24724d48.png and /dev/null differ diff --git a/_images/math/ff565d3b79da742989ea5e5bf3a7f51222d3e2f0.png b/_images/math/ff565d3b79da742989ea5e5bf3a7f51222d3e2f0.png deleted file mode 100644 index 52be6f4cd..000000000 Binary files a/_images/math/ff565d3b79da742989ea5e5bf3a7f51222d3e2f0.png and /dev/null differ diff --git a/_images/math/ff9078c258266635e46b9767b0c7e248c865e4ab.png b/_images/math/ff9078c258266635e46b9767b0c7e248c865e4ab.png deleted file mode 100644 index 128ac7c89..000000000 Binary files a/_images/math/ff9078c258266635e46b9767b0c7e248c865e4ab.png and /dev/null differ diff --git a/_images/math/ff9bc79fdab575688ddc9a779355ca07b4963073.png b/_images/math/ff9bc79fdab575688ddc9a779355ca07b4963073.png deleted file mode 100644 index 23d12156e..000000000 Binary files a/_images/math/ff9bc79fdab575688ddc9a779355ca07b4963073.png and /dev/null differ diff --git a/_images/math/ffef22512073e248f5310e75918a48dc1385e3d8.png b/_images/math/ffef22512073e248f5310e75918a48dc1385e3d8.png deleted file mode 100644 index 3423eb480..000000000 Binary files a/_images/math/ffef22512073e248f5310e75918a48dc1385e3d8.png and /dev/null differ diff --git a/_images/meshfig.png b/_images/meshfig.png deleted file mode 100644 index c84becf3a..000000000 Binary files a/_images/meshfig.png and /dev/null differ diff --git a/_images/mgxs-part-i-content_3_0.png b/_images/mgxs-part-i-content_3_0.png deleted file mode 100644 index 3946a5b3c..000000000 Binary files a/_images/mgxs-part-i-content_3_0.png and /dev/null differ diff --git a/_images/mgxs-part-ii-content_67_1.png b/_images/mgxs-part-ii-content_67_1.png deleted file mode 100644 index 06efa2d4b..000000000 Binary files a/_images/mgxs-part-ii-content_67_1.png and /dev/null differ diff --git a/_images/mgxs-part-ii-content_71_0.png b/_images/mgxs-part-ii-content_71_0.png deleted file mode 100644 index dc57a5144..000000000 Binary files a/_images/mgxs-part-ii-content_71_0.png and /dev/null differ diff --git a/_images/mgxs-part-iii-content_30_0.png b/_images/mgxs-part-iii-content_30_0.png deleted file mode 100644 index 263ad4ffa..000000000 Binary files a/_images/mgxs-part-iii-content_30_0.png and /dev/null differ diff --git a/_images/mgxs-part-iii-content_90_1.png b/_images/mgxs-part-iii-content_90_1.png deleted file mode 100644 index 1e8a32ffd..000000000 Binary files a/_images/mgxs-part-iii-content_90_1.png and /dev/null differ diff --git a/_images/nearest-neighbor-example.png b/_images/nearest-neighbor-example.png deleted file mode 100644 index cd3b345f3..000000000 Binary files a/_images/nearest-neighbor-example.png and /dev/null differ diff --git a/_images/nearest-neighbor.png b/_images/nearest-neighbor.png deleted file mode 100644 index a83a76863..000000000 Binary files a/_images/nearest-neighbor.png and /dev/null differ diff --git a/_images/pandas-dataframes-content_26_0.png b/_images/pandas-dataframes-content_26_0.png deleted file mode 100644 index 50046968f..000000000 Binary files a/_images/pandas-dataframes-content_26_0.png and /dev/null differ diff --git a/_images/pandas-dataframes-content_46_0.png b/_images/pandas-dataframes-content_46_0.png deleted file mode 100644 index bad7c799a..000000000 Binary files a/_images/pandas-dataframes-content_46_0.png and /dev/null differ diff --git a/_images/pandas-dataframes-content_47_1.png b/_images/pandas-dataframes-content_47_1.png deleted file mode 100644 index 069fa0d40..000000000 Binary files a/_images/pandas-dataframes-content_47_1.png and /dev/null differ diff --git a/_images/pandas-dataframes-content_67_2.png b/_images/pandas-dataframes-content_67_2.png deleted file mode 100644 index 23ee8724a..000000000 Binary files a/_images/pandas-dataframes-content_67_2.png and /dev/null differ diff --git a/_images/pandas-dataframes-content_68_1.png b/_images/pandas-dataframes-content_68_1.png deleted file mode 100644 index 03f11db4f..000000000 Binary files a/_images/pandas-dataframes-content_68_1.png and /dev/null differ diff --git a/_images/plotmeshtally.png b/_images/plotmeshtally.png deleted file mode 100644 index d874b4906..000000000 Binary files a/_images/plotmeshtally.png and /dev/null differ diff --git a/_images/post-processing-content_24_0.png b/_images/post-processing-content_24_0.png deleted file mode 100644 index 445746eaa..000000000 Binary files a/_images/post-processing-content_24_0.png and /dev/null differ diff --git a/_images/post-processing-content_44_1.png b/_images/post-processing-content_44_1.png deleted file mode 100644 index 65ab5fc6a..000000000 Binary files a/_images/post-processing-content_44_1.png and /dev/null differ diff --git a/_images/post-processing-content_46_0.png b/_images/post-processing-content_46_0.png deleted file mode 100644 index 650ef7ba9..000000000 Binary files a/_images/post-processing-content_46_0.png and /dev/null differ diff --git a/_images/post-processing-content_53_2.png b/_images/post-processing-content_53_2.png deleted file mode 100644 index 4c2f28e76..000000000 Binary files a/_images/post-processing-content_53_2.png and /dev/null differ diff --git a/_images/post-processing-content_55_2.png b/_images/post-processing-content_55_2.png deleted file mode 100644 index 01ded05fa..000000000 Binary files a/_images/post-processing-content_55_2.png and /dev/null differ diff --git a/_images/prod.png b/_images/prod.png deleted file mode 100644 index a4c2887d8..000000000 Binary files a/_images/prod.png and /dev/null differ diff --git a/_images/pullrequest.png b/_images/pullrequest.png deleted file mode 100644 index 8cfc71e9c..000000000 Binary files a/_images/pullrequest.png and /dev/null differ diff --git a/_images/rect_lat.svg b/_images/rect_lat.svg deleted file mode 100644 index cec6260c6..000000000 --- a/_images/rect_lat.svg +++ /dev/null @@ -1,711 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/_images/tally-arithmetic-content_25_0.png b/_images/tally-arithmetic-content_25_0.png deleted file mode 100644 index 6384f1c74..000000000 Binary files a/_images/tally-arithmetic-content_25_0.png and /dev/null differ diff --git a/_images/tikz-2415a321261cca6307913eacc8e1d6b53ce536bf.png b/_images/tikz-2415a321261cca6307913eacc8e1d6b53ce536bf.png deleted file mode 100644 index 2cd08d881..000000000 Binary files a/_images/tikz-2415a321261cca6307913eacc8e1d6b53ce536bf.png and /dev/null differ diff --git a/_images/tikz-e6b509a58476b271ffa1e096f52c41de26d3371d.png b/_images/tikz-e6b509a58476b271ffa1e096f52c41de26d3371d.png deleted file mode 100644 index 0ace725ac..000000000 Binary files a/_images/tikz-e6b509a58476b271ffa1e096f52c41de26d3371d.png and /dev/null differ diff --git a/_images/union.svg b/_images/union.svg deleted file mode 100644 index 066fa2ba1..000000000 --- a/_images/union.svg +++ /dev/null @@ -1,105 +0,0 @@ - - - - - - - - - image/svg+xml - - - - - - - - - - - +1 - -1 - -2 - +2 - -3 - +3 - - diff --git a/_sources/developers.txt b/_sources/developers.txt deleted file mode 100644 index d82d89744..000000000 --- a/_sources/developers.txt +++ /dev/null @@ -1,18 +0,0 @@ -.. _developers: - -================ -Development Team -================ - -Active development of the OpenMC Monte Carlo code is currently led by: - -* `Paul Romano `_ -* `Bryan Herman `_ -* `Nick Horelik `_ -* `Adam Nelson `_ -* `Jon Walsh `_ -* `Sterling Harper `_ -* `Will Boyd `_ -* `Benoit Forget `_ -* `Kord Smith `_ -* `Andrew Siegel `_ diff --git a/_sources/devguide/docbuild.txt b/_sources/devguide/docbuild.txt deleted file mode 100644 index 4c62ca179..000000000 --- a/_sources/devguide/docbuild.txt +++ /dev/null @@ -1,62 +0,0 @@ -.. _devguide_docbuild: - -============================= -Building Sphinx Documentation -============================= - -In order to build the documentation in the ``docs`` directory, you will need to -have the Sphinx_ third-party Python package. The easiest way to install Sphinx -is via pip: - -.. code-block:: sh - - sudo pip install sphinx - -Additionally, you will also need two Sphinx extensions for TikZ support and -numbering figures. The sphinxcontrib-tikz_ package should be installed directly -from the git repository as such: - -.. code-block:: sh - - sudo pip install https://bitbucket.org/philexander/tikz/get/HEAD.tar.gz - -The Numfig_ package can be installed directly with pip: - -.. code-block:: sh - - sudo pip install sphinx-numfig - ------------------------------------ -Building Documentation as a Webpage ------------------------------------ - -To build the documentation as a webpage (what appears at -http://mit-crpg.github.io/openmc), simply go to the ``docs`` directory and run: - -.. code-block:: sh - - make html - -------------------------------- -Building Documentation as a PDF -------------------------------- - -To build PDF documentation, you will need to have a LaTeX distribution installed -on your computer as well as Inkscape_, which is used to convert .svg files to -.pdf files. Inkscape can be installed in a Debian-derivative with: - -.. code-block:: sh - - sudo apt-get install inkscape - -One the pre-requisites are installed, simply go to the ``docs`` directory and -run: - -.. code-block:: sh - - make latexpdf - -.. _Sphinx: http://sphinx-doc.org -.. _sphinxcontrib-tikz: https://bitbucket.org/philexander/tikz -.. _Numfig: https://pypi.python.org/pypi/sphinx_numfig -.. _Inkscape: https://inkscape.org diff --git a/_sources/devguide/index.txt b/_sources/devguide/index.txt deleted file mode 100644 index 37b17bc0f..000000000 --- a/_sources/devguide/index.txt +++ /dev/null @@ -1,19 +0,0 @@ -.. _devguide: - -================= -Developer's Guide -================= - -Welcome to the OpenMC Developer's Guide! This guide documents and explains the -structure of the OpenMC source code and how to do various development tasks such -as debugging. - -.. toctree:: - :numbered: - :maxdepth: 3 - - structures - styleguide - workflow - xml-parsing - docbuild diff --git a/_sources/devguide/structures.txt b/_sources/devguide/structures.txt deleted file mode 100644 index 15777f606..000000000 --- a/_sources/devguide/structures.txt +++ /dev/null @@ -1,155 +0,0 @@ -.. _devguide_structures: - -=============== -Data Structures -=============== - -The purpose of this section is to give you an overview of the major data -structures in OpenMC and how they are logically related. A majority of variables -in OpenMC are `derived types`_ (similar to a struct in C). These derived types -are defined in the various header modules, e.g. src/geometry_header.F90. Most -important variables are found in the `global module`_. Have a look through that -module to get a feel for what variables you'll often come across when looking at -OpenMC code. - --------- -Particle --------- - -Perhaps the variable that you will see most often is simply called ``p`` and is -of type(Particle). This variable stores information about a particle's physical -characteristics (coordinates, direction, energy), what cell and material it's -currently in, how many collisions it has undergone, etc. In practice, only one -particle is followed at a time so there is no array of type(Particle). The -Particle type is defined in the `particle_header module`_. - -You will notice that the direction and angle of the particle is stored in a -linked list of type(LocalCoord). In geometries with multiple :ref:`universes`, -the coordinates in each universe are stored in this linked list. If universes or -lattices are not used in a geometry, only one LocalCoord is present in the -linked list. - -The LocalCoord type has a component called cell which gives the index in the -``cells`` array in the `global module`_. The ``cells`` array is of type(Cell) -and stored information about each region defined by the user. - ----- -Cell ----- - -The Cell type is defined in the `geometry_header module`_ along with other -geometry-related derived types. Each cell in the problem is described in terms -of its bounding surfaces, which are listed on the ``surfaces`` component. The -absolute value of each item in the ``surfaces`` component contains the index of -the corresponding surface in the ``surfaces`` array defined in the `global -module`_. The sign on each item in the ``surfaces`` component indicates whether -the cell exists on the positive or negative side of the surface (see -:ref:`methods_geometry`). - -Each cell can either be filled with another universe/lattice or with a -material. If it is filled with a material, the ``material`` component gives the -index of the material in the ``materials`` array defined in the `global -module`_. - -------- -Surface -------- - -The Surface type is defined in the `geometry_header module`_. A surface is -defined by a type (sphere, cylinder, etc.) and a list of coefficients for that -surface type. The simplest example would be a plane perpendicular to the xy, yz, -or xz plane which needs only one parameter. The ``type`` component indicates the -type through integer parameters such as SURF_SPHERE or SURF_CYL_Y (these are -defined in the `constants module`_). The ``coeffs`` component gives the -necessary coefficients to parameterize the surface type (see -:ref:`surface_element`). - --------- -Material --------- - -The Material type is defined in the `material_header module`_. Each material -contains a number of nuclides at a given atom density. Each item in the -``nuclide`` component corresponds to the index in the global ``nuclides`` array -(as usual, found in the `global module`_). The ``atom_density`` component is the -same length as the ``nuclides`` component and lists the corresponding atom -density in atom/barn-cm for each nuclide in the ``nuclides`` component. - -If the material contains nuclides for which binding effects are important in -low-energy scattering, a :math:`S(\alpha,\beta)` can be associated with that -material through the ``sab_table`` component. Again, this component contains the -index in the ``sab_tables`` array from the `global module`_. - -------- -Nuclide -------- - -The Nuclide derived type stores cross section and interaction data for a nucleus -and is defined in the `ace_header module`_. The ``energy`` component is an array -that gives the discrete energies at which microscopic cross sections are -tabulated. The actual microscopic cross sections are stored in a separate -derived type, Reaction. An arrays of Reactions is present in the ``reactions`` -component. There are a few summary microscopic cross sections stored in other -components, such as ``total``, ``elastic``, ``fission``, and ``nu_fission``. - -If a Nuclide is fissionable, the prompt and delayed neutron yield and energy -distributions are also stored on the Nuclide type. Many nuclides also have -unresolved resonance probability table data. If present, this data is stored in -the component ``urr_data`` of derived type UrrData. A complete description of -the probability table method is given in :ref:`probability_tables`. - -The list of nuclides present in a problem is stored in the ``nuclides`` array -defined in the `global module`_. - ----------- -SAlphaBeta ----------- - -The SAlphaBeta derived type stores :math:`S(\alpha,\beta)` data to account for -molecular binding effects when treating thermal scattering. Each SAlphaBeta -table is associated with a specific nuclide as identified in the ``zaid`` -component. A complete description of the :math:`S(\alpha,\beta)` treatment can -be found in :ref:`sab_tables`. - ---------- -XsListing ---------- - -The XsListing derived type stores information on the location of an ACE cross -section table based on the data in cross_sections.xml and is defined in the -`ace_header module`_. For each ```` you see in cross_sections.xml, -there is a XsListing with its information. When the user input is read, the -array ``xs_listings`` in the `global module`_ that is of derived type XsListing -is used to locate the ACE data to parse. - --------------- -NuclideMicroXS --------------- - -The NuclideMicroXS derived type, defined in the `ace_header module`_, acts as a -'cache' for microscopic cross sections. As a particle is traveling through -different materials, cross sections can be reused if the energy of the particle -hasn't changed. The components ``total``, ``elastic``, ``absorption``, -``fission``, and ``nu_fission`` represent those microscopic cross sections at -the current energy of the particle for a given nuclide. An array ``micro_xs`` in -the `global module`_ that is the same length as the ``nuclides`` array stores -these cached cross sections for each nuclide in the problem. - ---------------- -MaterialMacroXS ---------------- - -In addition to the NuclideMicroXS type, there is also a MaterialMacroXS derived -type, defined in the `ace_header module`_ that stored cached *macroscopic* cross -sections for the current material. These macroscopic cross sections are used for -both physics and tallying purposes. The variable ``material_xs`` in the `global -module`_ is of type MaterialMacroXS. - - -.. _derived types: http://nf.nci.org.au/training/FortranAdvanced/slides/slides.025.html -.. _global module: https://github.com/mit-crpg/openmc/blob/master/src/global.F90 -.. _particle_header module: https://github.com/mit-crpg/openmc/blob/master/src/particle_header.F90 -.. _geometry_header module: https://github.com/mit-crpg/openmc/blob/master/src/geometry_header.F90 -.. _constants module: https://github.com/mit-crpg/openmc/blob/master/src/constants.F90 -.. _material_header module: https://github.com/mit-crpg/openmc/blob/master/src/material_header.F90 -.. _ace_header module: https://github.com/mit-crpg/openmc/blob/master/src/ace_header.F90 diff --git a/_sources/devguide/styleguide.txt b/_sources/devguide/styleguide.txt deleted file mode 100644 index c8644e45c..000000000 --- a/_sources/devguide/styleguide.txt +++ /dev/null @@ -1,176 +0,0 @@ -.. _devguide_styleguide: - -====================== -Style Guide for OpenMC -====================== - -In order to keep the OpenMC code base consistent in style, this guide specifies -a number of rules which should be adhered to when modified existing code or -adding new code in OpenMC. - -------- -Fortran -------- - -General Rules -------------- - -Conform to the Fortran 2008 standard. - -Make sure code can be compiled with most common compilers, especially gfortran -and the Intel Fortran compiler. This supercedes the previous rule --- if a -Fortran 2003/2008 feature is not implemented in a common compiler, do not use -it. - -Do not use special extensions that can be only be used from certain compilers. - -In general, write your code in lower-case. Having code in all caps does not -enhance code readability or otherwise. - -Always include comments to describe what your code is doing. Do not be afraid of -using copious amounts of comments. - -Use <, >, <=, >=, ==, and /= rather than .lt., .gt., .le., .ge., .eq., and .ne. - -Try to keep code within 80 columns when possible. - -Don't use ``print *`` or ``write(*,*)``. If writing to a file, use a specific -unit. Writing to standard output or standard error should be handled by the -``write_message`` subroutine or functionality in the error module. - -Procedures ----------- - -Above each procedure, include a comment block giving a brief description of what -the procedure does. - -Nonpointer dummy arguments to procedures should be explicitly specified as -intent(in), intent(out), or intent(inout). - -Include a comment describing what each argument to a procedure is. - -Variables ---------- - -Never, under any circumstances, should implicit variables be used! Always -include ``implicit none`` and define all your variables. - -Variable names should be all lower-case and descriptive, i.e. not a random -assortment of letters that doesn't give any information to someone seeing it for -the first time. Variables consisting of multiple words should be separated by -underscores, not hyphens or in camel case. - -Constant (parameter) variables should be in ALL CAPITAL LETTERS and defined in -in the constants.F90 module. - -32-bit reals (real(4)) should never be used. Always use 64-bit reals (real(8)). - -For arbitrary length character variables, use the pre-defined lengths -MAX_LINE_LEN, MAX_WORD_LEN, and MAX_FILE_LEN if possible. - -Do not use old-style character/array length (e.g. character*80, real*8). - -Integer values being used to indicate a certain state should be defined as named -constants (see the constants.F90 module for many examples). - -Always use a double colon :: when declaring a variable. - -Yes: - -.. code-block:: fortran - - if (boundary_condition == BC_VACUUM) then - -No: - -.. code-block:: fortran - - if (boundary_condition == -10) then - -Avoid creating arrays with a pre-defined maximum length. Use dynamic memory -allocation instead. Use allocatable variables instead of pointer variables when -possible. - -Shared/Module Variables -+++++++++++++++++++++++ - -Always put shared variables in modules. Access module variables through a -``use`` statement. Always use the ``only`` specifier on the ``use`` statement -except for variables from the global, constants, and various header modules. - -Never use ``equivalence`` statements, ``common`` blocks, or ``data`` statements. - -Derived Types and Classes -------------------------- - -Derived types and classes should have CamelCase names with words not separated -by underscores or hyphens. - -Indentation ------------ - -Never use tab characters. Indentation should always be applied using -spaces. Emacs users should include the following line in their .emacs file: - -.. code-block:: common-lisp - - (setq-default indent-tabs-mode nil) - -vim users should include the following line in their .vimrc file:: - - set expandtab - -Use 2 spaces per indentation level. This applies to all constructs such as -program, subroutine, function, if, associate, etc. Emacs users should set the -variables f90-if-indent, f90-do-indent, f90-continuation-indent, -f90-type-indent, f90-associate-indent, and f90-program indent to 2. - -Continuation lines should be indented by at least 5 spaces. They may be indented -more in order to make the content match the context. For example, either of -these are valid continuation indentations: - -.. code-block:: fortran - - local_xyz(1) = xyz(1) - (this % lower_left(1) + & - (i_xyz(1) - HALF)*this % pitch(1)) - call which_data(scatt_type, get_scatt, get_nuscatt, get_chi_t, get_chi_p, & - get_chi_d, scatt_order) - -Whitespace in Expressions -------------------------- - -Use a single space between arguments to procedures. - -Avoid extraneous whitespace in the following situations: - -- In procedure calls:: - - Yes: call somesub(x, y(2), z) - No: call somesub( x, y( 2 ), z ) - -- In logical expressions, use one space around operators but nowhere else:: - - Yes: if (variable == 2) then - No: if ( variable==2 ) then - -Do not leave trailing whitespace at the end of a line. - ------- -Python ------- - -Style for Python code should follow PEP8_. - -Docstrings for functions and methods should follow numpydoc_ style. - -Python code should work with both Python 2.7+ and Python 3.0+. - -Use of third-party Python packages should be limited to numpy_, scipy_, and -h5py_. Use of other third-party packages must be implemented as optional -dependencies rather than required dependencies. - -.. _PEP8: https://www.python.org/dev/peps/pep-0008/ -.. _numpydoc: https://github.com/numpy/numpy/blob/master/doc/HOWTO_DOCUMENT.rst.txt -.. _numpy: http://www.numpy.org/ -.. _scipy: http://www.scipy.org/ -.. _h5py: http://www.h5py.org/ diff --git a/_sources/devguide/workflow.txt b/_sources/devguide/workflow.txt deleted file mode 100644 index 2f36436ca..000000000 --- a/_sources/devguide/workflow.txt +++ /dev/null @@ -1,241 +0,0 @@ -.. _devguide_workflow: - -==================== -Development Workflow -==================== - -Anyone wishing to make contributions to OpenMC should be fully acquianted and -comfortable working with git_ and GitHub_. We assume here that you have git -installed on your system, have a GitHub account, and have setup SSH keys to be -able to create/push to repositories on GitHub. - -Overview --------- - -Development of OpenMC relies heavily on branching; specifically, we use a -branching model sometimes referred to as `git flow`_. If you plan to contribute -to OpenMC development, we highly recommend that you read the linked blog post to -get a sense of how the branching model works. There are two main branches that -always exist: *master* and *develop*. The *master* branch is a stable branch -that contains the latest release of the code. The *develop* branch is where any -ongoing development takes place prior to a release and is not guaranteed to be -stable. When the development team decides that a release should occur, the -*develop* branch is merged into *master*. - -Trivial changes to the code may be committed directly to the *develop* branch by -a trusted developer. However, most new features should be developed on a branch -that branches off of *develop*. When the feature is completed, a `pull request`_ -is initiated on GitHub that is then reviewed by a trusted developer. If the pull -request is satisfactory, it is then merged into *develop*. Note that a trusted -developer may not review their own pull request (i.e., an independent code -review is required). - -Code Review Criteria --------------------- - -In order to be considered suitable for inclusion in the *develop* branch, the -following criteria must be satisfied for all proposed changes: - -- Changes have a clear purpose and are useful. -- Compiles under all conditions (MPI, OpenMP, HDF5, etc.). This is checked as - part of the test suite. -- Passes the regression suite. -- If appropriate, test cases are added to regression suite. -- No memory leaks (checked with valgrind_). -- Conforms to the OpenMC `style guide`_. -- No degradation of performance or greatly increased memory usage. This is not a - hard rule -- in certain circumstances, a performance loss might be acceptable - if there are compelling reasons. -- New features/input are documented. -- No unnecessary external software dependencies are introduced. - -Contributing ------------- - -Now that you understand the basic development workflow, let's discuss how an -individual to contribute to development. Note that this would apply to both new -features and bug fixes. The general steps for contributing are as follows: - -1. Fork the main openmc repository from `mit-crpg/openmc`_. This will create a - repository with the same name under your personal account. As such, you can - commit to it as you please without disrupting other developers. - - .. image:: ../_images/fork.png - -2. Clone your fork of OpenMC and create a branch that branches off of *develop*: - - .. code-block:: sh - - git clone git@github.com:yourusername/openmc.git - cd openmc - git checkout -b newbranch develop - -3. Make your changes on the new branch that you intend to have included in - *develop*. If you have made other changes that should not be merged back, - ensure that those changes are made on a different branch. - -4. Issue a pull request from GitHub and select the *develop* branch of - mit-crpg/openmc as the target. - - .. image:: ../_images/pullrequest.png - - At a minimum, you should describe what the changes you've made are and why - you are making them. If the changes are related to an oustanding issue, make - sure it is cross-referenced. A wise developer would also check whether their - changes do indeed pass the regression test suite. - -5. A trusted developer will review your pull request based on the criteria - above. Any issues with the pull request can be discussed directly on the pull - request page itself. - -6. After the pull request has been thoroughly vetted, it is merged back into the - *develop* branch of mit-crpg/openmc. - -.. _test suite: - -OpenMC Test Suite ------------------ - -The purpose of this test suite is to ensure that OpenMC compiles using various -combinations of compiler flags and options, and that all user input options can -be used successfully without breaking the code. The test suite is comprised of -regression tests where different types of input files are configured and the -full OpenMC code is executed. Results from simulations are compared with -expected results. The test suite is comprised of many build configurations -(e.g. debug, mpi, hdf5) and the actual tests which reside in sub-directories -in the tests directory. We recommend to developers to test their branches -before submitting a formal pull request using gfortran and intel compilers -if available. - -The test suite is designed to integrate with cmake using ctest_. -It is configured to run with cross sections from NNDC_. To -download these cross sections please do the following: - -.. code-block:: sh - - cd ../data - python get_nndc_data.py - export CROSS_SECTIONS=/nndc/cross_sections.xml - -The test suite can be run on an already existing build using: - -.. code-block:: sh - - cd build - make test - -or - -.. code-block:: sh - - cd build - ctest - -There are numerous ctest_ command line options that can be set to have -more control over which tests are executed. - -Before running the test suite python script, the following environmental -variables should be set if the default paths are incorrect: - - * **FC** - The command of the Fortran compiler (e.g. gfotran, ifort). - - * Default - *gfortran* - - * **MPI_DIR** - The path to the MPI directory. - - * Default - */opt/mpich/3.1.3-gnu* - - * **HDF5_DIR** - The path to the HDF5 directory. - - * Default - */opt/hdf5/1.8.14-gnu* - - * **PHDF5_DIR** - The path to the parallel HDF5 directory. - - * Default - */opt/phdf5/1.8.14-gnu* - -To run the full test suite, the following command can be executed in the -tests directory: - -.. code-block:: sh - - python run_tests.py - -A subset of build configurations and/or tests can be run. To see how to use -the script run: - -.. code-block:: sh - - python run_tests.py --help - -As an example, say we want to run all tests with debug flags only on tests -that have cone and plot in their name. Also, we would like to run this on -4 processors. We can run: - -.. code-block:: sh - - python run_tests.py -j 4 -C debug -R "cone|plot" - -Note that standard regular expression syntax is used for selecting build -configurations and tests. To print out a list of build configurations, we -can run: - -.. code-block:: sh - - python run_tests.py -p - -Adding tests to test suite -++++++++++++++++++++++++++ - -To add a new test to the test suite, create a sub-directory in the tests -directory that conforms to the regular expression *test_*. To configure -a test you need to add the following files to your new test directory, -*test_name* for example: - - * OpenMC input XML files - * **test_name.py** - python test driver script, please refer to other - tests to see how to construct. Any output files that are generated - during testing must be removed at the end of this script. - * **results.py** - python script that extracts results from statepoint - output files. By default it should look for a binary file, but can - take an argument to overwrite which statepoint file is processed, - whether it is at a different batch or with an HDF5 extension. This - script must output a results file that is named *results_test.dat*. - It is recommended that any real numbers reported use *12.6E* format. - * **results_true.dat** - ASCII file that contains the expected results - from the test. The file *results_test.dat* is compared to this file - during the execution of the python test driver script. When the - above files have been created, generate a *results_test.dat* file and - copy it to this name and commit. It should be noted that this file - should be generated with basic compiler options during openmc - configuration and build (e.g., no MPI/HDF5, no debug/optimization). - -In addition to this description, please see the various types of tests that -are already included in the test suite to see how to create them. If all is -implemented correctly, the new test directory will automatically be added -to the CTest framework. - -Private Development -------------------- - -While the process above depends on the fork of the OpenMC repository being -publicly available on GitHub, you may also wish to do development on a private -repository for research or commercial purposes. The proper way to do this is to -create a complete copy of the OpenMC repository (not a fork from GitHub). The -private repository can then either be stored just locally or in conjunction with -a private repository on Github (this requires a `paid plan`_). Alternatively, -`Bitbucket`_ offers private repositories for free. If you want to merge some -changes you've made in your private repository back to mit-crpg/openmc -repository, simply follow the steps above with an extra step of pulling a branch -from your private repository into a public fork. - -.. _git: http://git-scm.com/ -.. _GitHub: https://github.com/ -.. _git flow: http://nvie.com/git-model -.. _valgrind: http://valgrind.org/ -.. _style guide: http://mit-crpg.github.io/openmc/devguide/styleguide.html -.. _pull request: https://help.github.com/articles/using-pull-requests -.. _mit-crpg/openmc: https://github.com/mit-crpg/openmc -.. _paid plan: https://github.com/plans -.. _Bitbucket: https://bitbucket.org -.. _ctest: http://www.cmake.org/cmake/help/v2.8.12/ctest.html -.. _NNDC: http://http://www.nndc.bnl.gov/endf/b7.1/acefiles.html diff --git a/_sources/devguide/xml-parsing.txt b/_sources/devguide/xml-parsing.txt deleted file mode 100644 index cf6f238bd..000000000 --- a/_sources/devguide/xml-parsing.txt +++ /dev/null @@ -1,118 +0,0 @@ -.. _devguide_xml-parsing: - -================= -XML Input Parsing -================= - -OpenMC relies on the FoX_ Fortran XML library for reading and intrepreting the -XML input files for geometry, materials, settings, tallies, etc. The use of an -XML format makes writing input files considerably more flexible than would -otherwise be possible. - -With the FoX library, extending the user input files to include new tags is -fairly straightforward. The steps for modifying/adding input are as follows: - -1. Add appropriate calls to procedures from the `xml_interface module`_, such as - ``check_for_node``, ``get_node_value``, and ``get_node_array``. All input - reading is performed in the `input_xml module`_. - -2. Make sure that your input can be categorized as one of the datatypes from - `XML Schema Part 2`_ and that parsing of the data appropriately reflects - this. For example, for a boolean_ value, true can be represented either by - "true" or by "1". - -3. Add code to check the variable for any possible errors. - -A set of `RELAX NG`_ schemata exists that enables real-time validation of input -files when using the GNU Emacs text editor. You should also modify the RELAX NG -schema for the file you changed (e.g. src/relaxng/geometry.rnc) so that -those who use Emacs can confirm whether their input is valid before they -run. You will need to be familiar with RELAX NG `compact syntax`_. - -Working with the FoX Submodule -============================== - -The FoX_ library is included as a submodule_ in OpenMC. This means that for a -given commit in OpenMC, there is an associated commit id that links to FoX. -The actual FoX source code is maintained at mit-crpg/fox, branch openmc. When -cloning the OpenMC repo for the first time, you will notice that the directory -*src/xml/fox* is empty. To fetch the submodule source code, you can manually -enter the following from the root directory of OpenMC: - -.. code-block:: sh - - git submodule init - git submodule update - -It should be noted that if the submodule is not initialized and updated, *cmake* -will automatically perform these commands if it cannot file the FoX source code. - -If you navigate into the FoX source code in OpenMC, src/xml/fox, and check git -information, you will notice that you are in a completely different repo. Actually, -you are in a clone of mit-crpg/fox. If you have write access to this repo, you can -make changes to the FoX source code, commit and push just like any other repo. -Just because you make changes to the FoX source code in OpenMC or in a standalone -repo, this does not mean that OpenMC will automatically fetch these changes. The -way submodules work is that they are just stored as a commit id. To save FoX xml -source changes to your OpenMC branch, do the following: - -1. Go into src/xml/fox and check out the appropriate source code state - -2. Navigate back out of fox subdirectory and type: - -.. code-block:: sh - - git status - -3. Make sure you see that git recognized that the state of FoX changed: - -:: - - # On branch fox_submodule - # Changes not staged for commit: - # (use "git add ..." to update what will be committed) - # (use "git checkout -- ..." to discard changes in working directory) - # - # modified: fox (new commits) - -4. Commit and push this change - -Editing FoX on Personal Fork -============================ - -If you don't have write access to mit-crpg/fox and thus can't make a branch off of the openmc -branch there, you will need to fork mit-crpg/fox to your personal account. You need to then -link your branch in your OpenMC repo, to the *openmc* branch on your own personal FoX fork. -To do this, edit the *.gitmodules* file in the root folder of the repo. It contains the -following information: - -:: - - [submodule "src/xml/fox"] - path = src/xml/fox - url = git@github.com:mit-crpg/fox - -Change the url remote to your own fork. The commit id should stay constant until you start -making modification to FoX yourself. Once you have made changes to your FoX fork and linked -the new commit id to your OpenMC branch, you can pull request your changes in by peforming -the following steps: - -1. Create a pull request from your fork of FoX to mit-crpg/fox and wait until it - is merged into the openmc branch. - -2. In your OpenMC repo, change your *.gitmodules* file back to point at mit-crpg/fox. - -3. Submit a pull request to mit-crpg/openmc - -.. warning:: If you make changes to your FoX submodule inside of an OpenMC repo and do not - commit, do **not** run *git submodule update*. This may throw away any changes that - were not committed. - -.. _FoX: https://github.com/mit-crpg/fox -.. _xml_interface module: https://github.com/mit-crpg/openmc/blob/develop/src/xml_interface.F90 -.. _input_xml module: https://github.com/mit-crpg/openmc/blob/develop/src/input_xml.F90 -.. _XML Schema Part 2: http://www.w3.org/TR/xmlschema-2/ -.. _boolean: http://www.w3.org/TR/xmlschema-2/#boolean -.. _RELAX NG: http://relaxng.org/ -.. _compact syntax: http://relaxng.org/compact-tutorial-20030326.html -.. _submodule: http://git-scm.com/book/en/Git-Tools-Submodules diff --git a/_sources/index.txt b/_sources/index.txt deleted file mode 100644 index 8dba92016..000000000 --- a/_sources/index.txt +++ /dev/null @@ -1,38 +0,0 @@ -=========================== -The OpenMC Monte Carlo Code -=========================== - -OpenMC is a Monte Carlo particle transport simulation code focused on neutron -criticality calculations. It is capable of simulating 3D models based on -constructive solid geometry with second-order surfaces. The particle interaction -data is based on ACE format cross sections, also used in the MCNP and Serpent -Monte Carlo codes. - -OpenMC was originally developed by members of the `Computational Reactor Physics -Group`_ at the `Massachusetts Institute of Technology`_ starting -in 2011. Various universities, laboratories, and other organizations now -contribute to the development of OpenMC. For more information on OpenMC, feel -free to send a message to the User's Group `mailing list`_. - -.. _Computational Reactor Physics Group: http://crpg.mit.edu -.. _Massachusetts Institute of Technology: http://web.mit.edu -.. _mailing list: https://groups.google.com/forum/?fromgroups=#!forum/openmc-users - -.. only:: html - - -------- - Contents - -------- - -.. toctree:: - :maxdepth: 1 - - quickinstall - releasenotes - methods/index - usersguide/index - devguide/index - pythonapi/index - publications - license - developers diff --git a/_sources/license.txt b/_sources/license.txt deleted file mode 100644 index 73e329617..000000000 --- a/_sources/license.txt +++ /dev/null @@ -1,24 +0,0 @@ -.. _license: - -================= -License Agreement -================= - -Copyright © 2011-2015 Massachusetts Institute of Technology - -Permission is hereby granted, free of charge, to any person obtaining a copy of -this software and associated documentation files (the "Software"), to deal in -the Software without restriction, including without limitation the rights to -use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of -the Software, and to permit persons to whom the Software is furnished to do so, -subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS -FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR -COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER -IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN -CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. diff --git a/_sources/methods/cmfd.txt b/_sources/methods/cmfd.txt deleted file mode 100644 index 49cb86c67..000000000 --- a/_sources/methods/cmfd.txt +++ /dev/null @@ -1,561 +0,0 @@ -.. _methods_cmfd: - -================================================================ -Nonlinear Diffusion Acceleration - Coarse Mesh Finite Difference -================================================================ - -This page section discusses how nonlinear diffusion acceleration (NDA) using -coarse mesh finite difference (CMFD) is implemented into OpenMC. Before we get -into the theory, general notation for this section is discussed. - --------- -Notation --------- - -Before deriving NDA relationships, notation is explained. If a parameter has a -:math:`\overline{\cdot}`, it is surface area-averaged and if it has a -:math:`\overline{\overline\cdot}`, it is volume-averaged. When describing a -specific cell in the geometry, indices :math:`(i,j,k)` are used which correspond -to directions :math:`(x,y,z)`. In most cases, the same operation is performed in -all three directions. To compactly write this, an arbitrary direction set -:math:`(u,v,w)` that corresponds to cell indices :math:`(l,m,n)` is used. Note -that :math:`u` and :math:`l` do not have to correspond to :math:`x` and -:math:`i`. However, if :math:`u` and :math:`l` correspond to :math:`y` and -:math:`j`, :math:`v` and :math:`w` correspond to :math:`x` and :math:`z` -directions. An example of this is shown in the following expression: - -.. math:: - :label: not1 - - \sum\limits_{u\in(x,y,z)}\left\langle\overline{J}^{u,g}_{l+1/2,m,n} - \Delta_m^v\Delta_n^w\right\rangle - -Here, :math:`u` takes on each direction one at a time. The parameter :math:`J` -is surface area-averaged over the transverse indices :math:`m` and :math:`n` -located at :math:`l+1/2`. Usually, spatial indices are listed as subscripts and -the direction as a superscript. Energy group indices represented by :math:`g` -and :math:`h` are also listed as superscripts here. The group :math:`g` is the -group of interest and, if present, :math:`h` is all groups. Finally, any -parameter surrounded by :math:`\left\langle\cdot\right\rangle` represents a -tally quantity that can be edited from a Monte Carlo (MC) solution. - ------- -Theory ------- - -NDA is a diffusion model that has equivalent physics to a transport model. There -are many different methods that can be classified as NDA. The CMFD method is a -type of NDA that represents second order multigroup diffusion equations on a -coarse spatial mesh. Whether a transport model or diffusion model is used to -represent the distribution of neutrons, these models must satisfy the *neutron -balance equation*. This balance is represented by the following formula for a -specific energy group :math:`g` in cell :math:`(l,m,n)`: - -.. math:: - :label: eq_neut_bal - - \sum\limits_{u\in(x,y,z)}\left(\left\langle\overline{J}^{u,g}_{l+1/2,m,n} - \Delta_m^v\Delta_n^w\right\rangle - - \left\langle\overline{J}^{u,g}_{l-1/2,m,n} - \Delta_m^v\Delta_n^w\right\rangle\right) - + - \left\langle\overline{\overline\Sigma}_{t_{l,m,n}}^g - \overline{\overline\phi}_{l,m,n}^g\Delta_l^u\Delta_m^v\Delta_n^w\right\rangle - = \\ - \sum\limits_{h=1}^G\left\langle - \overline{\overline{\nu_s\Sigma}}_{s_{l,m,n}}^{h\rightarrow - g}\overline{\overline\phi}_{l,m,n}^h\Delta_l^u\Delta_m^v\Delta_n^w - \right\rangle - + - \frac{1}{k_{eff}}\sum\limits_{h=1}^G - \left\langle\overline{\overline{\nu_f\Sigma}}_{f_{l,m,n}}^{h\rightarrow - g}\overline{\overline\phi}_{l,m,n}^h - \Delta_l^u\Delta_m^v\Delta_n^w\right\rangle. - -In eq. :eq:`eq_neut_bal` the parameters are defined as: - -* :math:`\left\langle\overline{J}^{u,g}_{l\pm - 1/2,m,n}\Delta_m^v\Delta_n^w\right\rangle` --- surface area-integrated net - current over surface :math:`(l\pm 1/2,m,n)` with surface normal in direction - :math:`u` in energy group :math:`g`. By dividing this quantity by the transverse - area, :math:`\Delta_m^v\Delta_n^w`, the surface area-averaged net current can - be computed. -* :math:`\left\langle\overline{\overline\Sigma}_{t_{l,m,n}}^g - \overline{\overline\phi}_{l,m,n}^g\Delta_l^u\Delta_m^v\Delta_n^w\right\rangle` - --- volume-integrated total reaction rate over energy group :math:`g`. -* :math:`\left\langle\overline{\overline{\nu_s\Sigma}}_{s_{l,m,n}}^{h\rightarrow - g} - \overline{\overline\phi}_{l,m,n}^h\Delta_l^u\Delta_m^v\Delta_n^w\right\rangle` - --- volume-integrated scattering production rate of neutrons that begin with - energy in group :math:`h` and exit reaction in group :math:`g`. This reaction - rate also includes the energy transfer of reactions (except fission) that - produce multiple neutrons such as (n, 2n); hence, the need for :math:`\nu_s` - to represent neutron multiplicity. -* :math:`k_{eff}` --- core multiplication factor. -* :math:`\left\langle\overline{\overline{\nu_f\Sigma}}_{f_{l,m,n}}^{h\rightarrow - g}\overline{\overline\phi}_{l,m,n}^h\Delta_l^u\Delta_m^v\Delta_n^w\right\rangle` - --- volume-integrated fission production rate of neutrons from fissions in - group :math:`h` that exit in group :math:`g`. - -Each quantity in :math:`\left\langle\cdot\right\rangle` represents a scalar value that -is obtained from an MC tally. A good verification step when using an MC code is -to make sure that tallies satisfy this balance equation within statistics. No -NDA acceleration can be performed if the balance equation is not satisfied. - -There are three major steps to consider when performing NDA: (1) calculation of -macroscopic cross sections and nonlinear parameters, (2) solving an eigenvalue -problem with a system of linear equations, and (3) modifying MC source -distribution to align with the NDA solution on a chosen mesh. This process is -illustrated as a flow chart below. After a batch of neutrons -is simulated, NDA can take place. Each of the steps described above is described -in detail in the following sections. - -.. tikz:: Flow chart of NDA process. Note "XS" is used for cross section and - "DC" is used for diffusion coefficient. - :libs: shapes, snakes, shadows, arrows, calc, decorations.markings, patterns, fit, matrix, spy - :include: cmfd_tikz/cmfd_flow.tikz - -Calculation of Macroscopic Cross Sections ------------------------------------------ - -A diffusion model needs macroscopic cross sections and diffusion coefficients to -solve for multigroup fluxes. Cross sections are derived by conserving reaction -rates predicted by MC tallies. From Eq. :eq:`eq_neut_bal`, total, scattering -production and fission production macroscopic cross sections are needed. They are -defined from MC tallies as follows: - -.. math:: - :label: xs1 - - \overline{\overline\Sigma}_{t_{l,m,n}}^g \equiv - \frac{\left\langle\overline{\overline\Sigma}_{t_{l,m,n}}^g - \overline{\overline\phi}_{l,m,n}^g\Delta_l^u\Delta_m^v\Delta_n^w\right\rangle} - {\left\langle\overline{\overline\phi}_{l,m,n}^g - \Delta_l^u\Delta_m^v\Delta_n^w\right\rangle}, - -.. math:: - :label: xs2 - - \overline{\overline{\nu_s\Sigma}}_{s_{l,m,n}}^{h\rightarrow g} \equiv - \frac{\left\langle\overline{\overline{\nu_s\Sigma}}_{s_{l,m,n}}^{h\rightarrow - g}\overline{\overline\phi}_{l,m,n}^h\Delta_l^u\Delta_m^v\Delta_n^w\right\rangle} - {\left\langle\overline{\overline\phi}_{l,m,n}^h - \Delta_l^u\Delta_m^v\Delta_n^w\right\rangle} - -and - -.. math:: - :label: xs3 - - \overline{\overline{\nu_f\Sigma}}_{f_{l,m,n}}^{h\rightarrow g} \equiv - \frac{\left\langle\overline{\overline{\nu_f\Sigma}}_{f_{l,m,n}}^{h\rightarrow - g}\overline{\overline\phi}_{l,m,n}^h\Delta_l^u\Delta_m^v\Delta_n^w\right\rangle} - {\left\langle\overline{\overline\phi}_{l,m,n}^h\Delta_l^u\Delta_m^v\Delta_n^w\right\rangle}. - -In order to fully conserve neutron balance, leakage rates also need to be -preserved. In standard diffusion theory, leakage rates are represented by -diffusion coefficients. Unfortunately, it is not easy in MC to calculate a -single diffusion coefficient for a cell that describes leakage out of each -surface. Luckily, it does not matter what definition of diffusion coefficient is -used because nonlinear equivalence parameters will correct for this -inconsistency. However, depending on the diffusion coefficient definition -chosen, different convergence properties of NDA equations are observed. -Here, we introduce a diffusion coefficient that is derived for a coarse energy -transport reaction rate. This definition can easily be constructed from -MC tallies provided that angular moments of scattering reaction rates can -be obtained. The diffusion coefficient is defined as follows: - -.. math:: - :label: eq_transD - - \overline{\overline D}_{l,m,n}^g = - \frac{\left\langle\overline{\overline\phi}_{l,m,n}^g - \Delta_l^u\Delta_m^v\Delta_n^w\right\rangle}{3 - \left\langle\overline{\overline\Sigma}_{tr_{l,m,n}}^g - \overline{\overline\phi}_{l,m,n}^g - \Delta_l^u\Delta_m^v\Delta_n^w\right\rangle}, - -where - -.. math:: - :label: xs4 - - \left\langle\overline{\overline\Sigma}_{tr_{l,m,n}}^g - \overline{\overline\phi}_{l,m,n}^g\Delta_l^u\Delta_m^v\Delta_n^w\right\rangle - = - \left\langle\overline{\overline\Sigma}_{t_{l,m,n}}^g - \overline{\overline\phi}_{l,m,n}^g\Delta_l^u\Delta_m^v\Delta_n^w\right\rangle - \\ - - \left\langle\overline{\overline{\nu_s\Sigma}}_{s1_{l,m,n}}^g - \overline{\overline\phi}_{l,m,n}^g\Delta_l^u\Delta_m^v\Delta_n^w\right\rangle. - -Note that the transport reaction rate is calculated from the total reaction rate -reduced by the :math:`P_1` scattering production reaction rate. Equation :eq:`eq_transD` -does not represent the best definition of diffusion coefficients from MC; -however, it is very simple and usually fits into MC tally frameworks -easily. Different methods to calculate more accurate diffusion coefficients can -found in [Herman]_. - -CMFD Equations --------------- - -The first part of this section is devoted to discussing second-order finite -volume discretization of multigroup diffusion equations. This will be followed -up by the formulation of CMFD equations that are used in this NDA -scheme. When performing second-order finite volume discretization of the -diffusion equation, we need information that relates current to flux. In this -numerical scheme, each cell is coupled only to its direct neighbors. Therefore, -only two types of coupling exist: (1) cell-to-cell coupling and (2) -cell-to-boundary coupling. The derivation of this procedure is referred to as -finite difference diffusion equations and can be found in literature such -as [Hebert]_. These current/flux relationships are as follows: - -* cell-to-cell coupling - -.. math:: - :label: eq_cell_cell - - \overline{J}^{u,g}_{l\pm1/2,m,n} = -\frac{2\overline{\overline - D}_{l\pm1,m,n}^g\overline{\overline - D}_{l,m,n}^g}{\overline{\overline D}_{l\pm1,m,n}^g\Delta_l^u + - \overline{\overline - D}_{l,m,n}^g\Delta_{l\pm1}^u} - \left(\pm\overline{\overline{\phi}}_{l\pm1,m,n}^g\mp - \overline{\overline{\phi}}_{l,m,n}^g\right), - -* cell-to-boundary coupling - -.. math:: - :label: eq_cell_bound - - \overline{J}^{u,g}_{l\pm1/2,m,n} = \pm\frac{2\overline{\overline - D}_{l,m,n}^g\left(1 - - \beta_{l\pm1/2,m,n}^{u,g}\right)}{4\overline{\overline - D}_{l,m,n}^g\left(1 + \beta_{l\pm1/2,m,n}^{u,g}\right) + \left(1 - - \beta_{l\pm1/2,m,n}^{u,g}\right)\Delta_l^u}\overline{\overline{\phi}}_{l,m,n}^{g}. - -In Eqs. :eq:`eq_cell_cell` and :eq:`eq_cell_bound`, the :math:`\pm` refers to -left (:math:`-x`) or right (:math:`+x`) surface in the :math:`x` direction, -back (:math:`-y`) or front (:math:`+y`) surface in the :math:`y` direction and -bottom (:math:`-z`) or top (:math:`+z`) surface in the :math:`z` direction. For -cell-to-boundary coupling, a general albedo, :math:`\beta_{l\pm1/2,m,n}^{u,g}`, -is used. The albedo is defined as the ratio of incoming (:math:`-` superscript) -to outgoing (:math:`+` superscript) partial current on any surface represented -as - -.. math:: - :label: eq_albedo - - \beta_{l\pm1/2,m,n}^{u,g} = - \frac{\overline{J}^{u,g-}_{l\pm1/2,m,n}}{\overline{J}^{u,g+}_{l\pm1/2,m,n}}. - -Common boundary conditions are: vacuum (:math:`\beta=0`), reflective -(:math:`\beta=1`) and zero flux (:math:`\beta=-1`). Both eq. :eq:`eq_cell_cell` -and eq. :eq:`eq_cell_bound` can be written in this generic form, - -.. math:: - :label: eq_dtilde - - \overline{J}^{u,g}_{l\pm1/2,m,n} = \widetilde{D}_{l,m,n}^{u,g} \left(\dots\right). - -The parameter :math:`\widetilde{D}_{l,m,n}^{u,g}` represents the linear -coupling term between current and flux. These current relationships can be -sustituted into eq. :eq:`eq_neut_bal` to produce a linear system of multigroup -diffusion equations for each spatial cell and energy group. However, a solution -to these equations is not consistent with a higher order transport solution -unless equivalence factors are present. This is because both the diffusion -approximation, governed by Fick's Law, and spatial trunction error will produce -differences. Therefore, a nonlinear parameter, -:math:`\widehat{D}_{l,m,n}^{u,g}`, is added to eqs. :eq:`eq_cell_cell` and -:eq:`eq_cell_bound`. These equations are, respectively, - -.. math:: - :label: eq_dhat_cell - - \overline{J}^{u,g}_{l\pm1/2,m,n} = -\widetilde{D}_{l,m,n}^{u,g} - \left(\pm\overline{\overline{\phi}}_{l\pm1,m,n}^g\mp - \overline{\overline{\phi}}_{l,m,n}^g\right) + \widehat{D}_{l,m,n}^{u,g} - \left(\overline{\overline{\phi}}_{l\pm1,m,n}^g + - \overline{\overline{\phi}}_{l,m,n}^g\right) - -and - -.. math:: - :label: eq_dhat_bound - - \overline{J}^{u,g}_{l\pm1/2,m,n} = \pm\widetilde{D}_{l,m,n}^{u,g} - \overline{\overline{\phi}}_{l,m,n}^{g} + \widehat{D}_{l,m,n}^{u,g} - \overline{\overline{\phi}}_{l,m,n}^{g}. - -The only unknown in each of these equations is the equivalence parameter. The -current, linear coupling term and flux can either be obtained or derived from -MC tallies. Thus, it is called nonlinear because it is dependent on the flux -which is updated on the next iteration. - -Equations :eq:`eq_dhat_cell` and :eq:`eq_dhat_bound` can be substituted into -eq. :eq:`eq_neut_bal` to create a linear system of equations that is consistent -with transport physics. One example of this equation is written for an -interior cell, - -.. math:: - :label: eq_cmfd_sys - - \sum_{u\in - x,y,x}\frac{1}{\Delta_l^u}\left[\left(-\tilde{D}_{l-1/2,m,n}^{u,g} - - \hat{D}_{l-1/2,m,n}^{u,g}\right)\overline{\overline{\phi}}_{l-1,m,n}^g\right. - \\ + \left(\tilde{D}_{l-1/2,m,n}^{u,g} + - \tilde{D}_{l+1/2,m,n}^{u,g} - \hat{D}_{l-1/2,m,n}^{u,g} + - \hat{D}_{l+1/2,m,n}^{u,g}\right)\overline{\overline{\phi}}_{l,m,n}^g - \\ + - \left. \left(-\tilde{D}_{l+1/2,m,n}^{u,g} + - \hat{D}_{l+1/2,m,n}^{u,g}\right)\overline{\overline{\phi}}_{l+1,m,n}^g - \right] \\ + - \overline{\overline\Sigma}_{t_{l,m,n}}^g\overline{\overline{\phi}}_{l,m,n}^g - - \sum\limits_{h=1}^G\overline{\overline{\nu_s\Sigma}}^{h\rightarrow - g}_{s_{l,m,n}}\overline{\overline{\phi}}_{l,m,n}^h = - \frac{1}{k}\sum\limits_{h=1}^G\overline{\overline{\nu_f\Sigma}}^{h\rightarrow - g}_{f_{l,m,n}}\overline{\overline{\phi}}_{l,m,n}^h. - -It should be noted that before substitution, eq. :eq:`eq_neut_bal` was divided -by the volume of the cell, :math:`\Delta_l^u\Delta_m^v\Delta_n^w`. Equation -:eq:`eq_cmfd_sys` can be represented in operator form as - -.. math:: - :label: eq_CMFDopers - - \mathbb{M}\mathbf{\Phi} = \frac{1}{k}\mathbb{F}\mathbf{\Phi}, - -where :math:`\mathbb{M}` is the neutron loss matrix operator, -:math:`\mathbb{F}` is the neutron production matrix operator, -:math:`\mathbf{\Phi}` is the multigroup flux vector and :math:`k` is the -eigenvalue. This generalized eigenvalue problem is solved to obtain fundamental -mode multigroup fluxes and eigenvalue. In order to produce consistent results -with transport theory from these equations, the neutron balance equation must -have been satisfied by MC tallies. The desire is that CMFD equations will -produce a more accurate source than MC after each fission source generation. - -CMFD Feedback -------------- - -Now that a more accurate representation of the expected source distribution is -estimated from CMFD, it needs to be communicated back to MC. The first step -in this process is to generate a probability mass function that provides -information about how probable it is for a neutron to be born in a given cell -and energy group. This is represented as - -.. math:: - :label: eq_cmfd_psrc - - p_{l,m,n}^g = - \frac{\sum_{h=1}^{G}\overline{\overline{\nu_f\Sigma}}^{h\rightarrow - g}_{f_{l,m,n}}\overline{\overline{\phi}}_{l,m,n}^h\Delta_l^u\Delta_m^v - \Delta_n^w}{\sum_n\sum_m\sum_l\sum_{h=1}^{G}\overline{ - \overline{\nu_f\Sigma}}^{h\rightarrow - g}_{f_{l,m,n}}\overline{\overline{\phi}}_{l,m,n}^h\Delta_l^u\Delta_m^v - \Delta_n^w}. - -This equation can be multiplied by the number of source neutrons to obtain an -estimate of the expected number of neutrons to be born in a given cell and -energy group. This distribution can be compared to the MC source distribution -to generate weight adjusted factors defined as - -.. math:: - :label: eq_waf - - f_{l,m,n}^g = \frac{Np_{l,m,n}^g}{\sum\limits_s w_s};\quad s\in - \left(g,l,m,n\right). - -The MC source distribution is represented on the same coarse mesh as -CMFD by summing all neutrons' weights, :math:`w_s`, in a given cell and -energy group. MC source weights can then be modified by this weight -adjustment factor so that it matches the CMFD solution on the coarse -mesh, - -.. math:: - :label: src_mod - - w^\prime_s = w_s\times f_{l,m,n}^g;\quad s\in \left(g,l,m,n\right). - -It should be noted that heterogeneous information about local coordinates and -energy remain constant throughout this modification process. - ------------------------- -Implementation in OpenMC ------------------------- - -The section describes how CMFD was implemented in OpenMC. Before the simulation -begins, a user sets up a CMFD input file that contains the following basic -information: - -* CMFD mesh (space and energy), -* boundary conditions at edge of mesh (albedos), -* acceleration region (subset of mesh, optional), -* fission source generation (FSG)/batch that CMFD should begin, and -* whether CMFD feedback should be applied. - -It should be noted that for more difficult simulations (e.g., light water -reactors), there are other options available to users such as tally resetting -parameters, effective down-scatter usage, tally estimator, etc. For more -information please see :ref:`usersguide_cmfd`. - -Of the options described above, the optional acceleration subset region is an -uncommon feature. Because OpenMC only has a structured Cartesian mesh, mesh -cells may overlay regions that don't contain fissionable material and may be so -far from the core that the neutron flux is very low. If these regions were -included in the CMFD solution, bad estimates of diffusion parameters may result -and affect CMFD feedback. To deal with this, a user can carve out an active -acceleration region from their structured Cartesian mesh. This is illustrated -in diagram below. When placing a CMFD mesh over a geometry, the boundary -conditions must be known at the global edges of the mesh. If the geometry is -complex like the one below, one may have to cover the whole geometry including -the reactor pressure vessel because we know that there is a zero incoming -current boundary condition at the outer edge of the pressure vessel. This is -not viable in practice because neutrons in simulations may not reach mesh cells -that are near the pressure vessel. To circumvent this, one can shrink the mesh -to cover just the core region as shown in the diagram. However, one must still -estimate the boundary conditions at the global boundaries, but at these -locations, they are not readily known. In OpenMC, one can carve out the active -core region from the entire structured Cartesian mesh. This is shown in the -diagram below by the darkened region over the core. The albedo boundary -conditions at the active core/reflector boundary can be tallied indirectly -during the MC simulation with incoming and outgoing partial currents. This -allows the user to not have to worry about neutrons producing adequate tallies -in mesh cells far away from the core. - -.. tikz:: Diagram of CMFD acceleration mesh - :libs: shapes, snakes, shadows, arrows, calc, decorations.markings, patterns, fit, matrix, spy - :include: cmfd_tikz/meshfig.tikz - -During an MC simulation, CMFD tallies are accumulated. The basic tallies needed -are listed in Table :ref:`tab_tally`. Each tally is performed on a spatial and -energy mesh basis. The surface area-integrated net current is tallied on every -surface of the mesh. OpenMC tally objects are created by the CMFD code -internally, and cross sections are calculated at each CMFD feedback iteration. -The first CMFD iteration, controlled by the user, occurs just after tallies are -communicated to the master processor. Once tallies are collapsed, cross -sections, diffusion coefficients and equivalence parameters are calculated. This -is performed only on the acceleration region if that option has been activated -by the user. Once all diffusion parameters are calculated, CMFD matrices are -formed where energy groups are the inner most iteration index. In OpenMC, -compressed row storage sparse matrices are used due to the sparsity of CMFD -operators. An example of this sparsity is shown for the 3-D BEAVRS model in -figures :num:`fig-loss` and :num:`fig-prod` [BEAVRS]_. These matrices represent -an assembly radial mesh, 24 cell mesh in the axial direction and two energy -groups. The loss matrix is 99.92% sparse and the production matrix is 99.99% -sparse. Although the loss matrix looks like it is tridiagonal, it is really a -seven banded matrix with a block diagonal matrix for scattering. The production -matrix is a :math:`2\times 2` block diagonal; however, zeros are present because -no fission neutrons appear with energies in the thermal group. - -.. _tab_tally: - -.. table:: OpenMC CMFD tally list - - +--------------------------------------------------------------------------------------------+----------------+---------------------------+ - +--------------------------------------------------------------------------------------------+----------------+---------------------------+ - | tally | score | filter | - +============================================================================================+================+===========================+ - | \ :math:`\left\langle\overline{\overline\phi}_{l,m,n}^g | flux | mesh, energy | - | \Delta_l^u\Delta_m^v\Delta_n^w\right\rangle` | | | - +--------------------------------------------------------------------------------------------+----------------+---------------------------+ - | \ :math:`\left\langle\overline{\overline\Sigma}_{t_{l,m,n}}^g | total | mesh, energy | - | \overline{\overline\phi}_{l,m,n}^g\Delta_l^u\Delta_m^v\Delta_n^w\right\rangle` | | | - +--------------------------------------------------------------------------------------------+----------------+---------------------------+ - | \ :math:`\left\langle\overline{\overline{\nu_s\Sigma}}_{s1_{l,m,n}}^g | nu-scatter-1 | mesh, energy | - | \overline{\overline\phi}_{l,m,n}^g\Delta_l^u\Delta_m^v\Delta_n^w\right\rangle` | | | - +--------------------------------------------------------------------------------------------+----------------+---------------------------+ - | \ :math:`\left\langle\overline{\overline{\nu_s\Sigma}}_{s_{l,m,n}}^{h\rightarrow g} | nu-scatter | mesh, energy, energyout | - | \overline{\overline\phi}_{l,m,n}^h\Delta_l^u\Delta_m^v\Delta_n^w\right\rangle` | | | - +--------------------------------------------------------------------------------------------+----------------+---------------------------+ - | \ :math:`\left\langle\overline{\overline{\nu_f\Sigma}}_{f_{l,m,n}}^{h\rightarrow g} | nu-fission | mesh, energy, energyout | - | \overline{\overline\phi}_{l,m,n}^h\Delta_l^u\Delta_m^v\Delta_n^w\right\rangle` | | | - +--------------------------------------------------------------------------------------------+----------------+---------------------------+ - | \ :math:`\left\langle\overline{J}^{u,g}_{l\pm 1/2,m,n}\Delta_m^v\Delta_n^w\right\rangle` | current | mesh, energy | - +--------------------------------------------------------------------------------------------+----------------+---------------------------+ - -.. _fig-loss: - -.. figure:: ../_images/loss.png - :scale: 50 - - Sparsity of Neutron Loss Operator - -.. _fig-prod: - -.. figure:: ../_images/prod.png - :scale: 50 - - Sparsity of Neutron Production Operator - -To solve the eigenvalue problem with these matrices, different source iteration -and linear solvers can be used. The most common source iteration solver used is -standard power iteration as described in [Gill]_. To accelerate these source -iterations, a Wielandt shift scheme can be used as discussed in [Park]_. PETSc -solvers were first implemented to perform the linear solution in parallel that -occurs once per source iteration. When using PETSc, different types of parallel -linear solvers and preconditioners can be used. By default, OpenMC uses an -incomplete LU preconditioner and a GMRES Krylov solver. After some initial -studies of parallelization with PETSc, it was observed that because CMFD -matrices are very sparse, solution times do not scale well. An additional -Gauss-Seidel linear solver with Chebyshev acceleration was added that is -similar to the one used for CMFD in CASMO [Rhodes]_ and [Smith]_. This solver -was implemented with a custom section for two energy groups. Because energy -group is the inner most index, a block diagonal is formed when using more than -one group. For two groups, it is easy to invert this diagonal analytically -inside the Gauss-Seidel iterative solver. For more than two groups, this -analytic inversion can still be performed, but with more computational effort. -A standard Gauss-Seidel solver is used for more than two groups. - -Besides a power iteration, a Jacobian-free Newton-Krylov method was also -implemented to obtain eigenvalue and multigroup fluxes as described in [Gill]_ -and [Knoll]_. This method is not the primary one used, but has gotten recent -attention due to its coupling advantages to other physics such as thermal -hydraulics. Once multigroup fluxes are obtained, a normalized fission source is -calculated in the code using eq. :eq:`eq_cmfd_psrc` directly. - -The next step in the process is to compute weight adjustment factors. These are -calculated by taking the ratio of the expected number of neutrons from the CMFD -source distribution to the current number of neutrons in each mesh. It is -straightforward to compute the CMFD number of neutrons because it is the -product between the total starting initial weight of neutrons and the CMFD -normalized fission source distribution. To compute the number of neutrons from -the current MC source, OpenMC sums the statistical -weights of neutrons from the source bank on a given spatial and energy mesh. -Once weight adjustment factors were calculated, each neutron's statistical -weight in the source bank was modified according to its location and energy. -Examples of CMFD simulations using OpenMC can be found in [HermanThesis]_. - -.. only:: html - - .. rubric:: References - -.. [BEAVRS] Nick Horelik, Bryan Herman. *Benchmark for Evaluation And Verification of Reactor - Simulations*. Massachusetts Institute of Technology, http://crpg.mit.edu/pub/beavrs - , 2013. - -.. [Gill] Daniel F. Gill. *Newton-Krylov methods for the solution of the k-eigenvalue problem in - multigroup neutronics calculations*. Ph.D. thesis, Pennsylvania State University, 2010. - -.. [Hebert] Alain Hebert. *Applied reactor physics*. Presses Internationales Polytechnique, - Montreal, 2009. - -.. [Herman] Bryan R. Herman, Benoit Forget, Kord Smith, and Brian N. Aviles. Improved - diffusion coefficients generated from Monte Carlo codes. In *Proceedings of M&C - 2013*, Sun Valley, ID, USA, May 5 - 9, 2013. - -.. [HermanThesis] Bryan R. Herman. *Monte Carlo and Thermal Hydraulic Coupling using - Low-Order Nonlinear Diffusion Acceleration*. Sc.D. thesis, - Massachusetts Institute of Technology, 2014. - -.. [Knoll] D.A. Knoll, H. Park, and C. Newman. *Acceleration of k-eigenvalue/criticality - calculations using the Jacobian-free Newton-Krylov method*. Nuclear Science and - Engineering, 167:133–140, 2011. - -.. [Park] H. Park, D.A. Knoll, and C.K. Newman. *Nonlinear acceleration of transport - criticality problems*. Nuclear Science and Engineering, 172:52–65, 2012. - -.. [Rhodes] Joel Rhodes and Malte Edenius. *CASMO-4 --- A Fuel Assembly Burnup Program. - User’s Manual*. Studsvik of America, ssp-09/443-u rev 0, proprietary edition, 2001. - -.. [Smith] Kord S Smith and Joel D Rhodes III. *Full-core, 2-D, LWR core calculations with - CASMO-4E*. In Proceedings of PHYSOR 2002, Seoul, Korea, October 7 - 10, 2002. diff --git a/_sources/methods/cross_sections.txt b/_sources/methods/cross_sections.txt deleted file mode 100644 index 5126252cd..000000000 --- a/_sources/methods/cross_sections.txt +++ /dev/null @@ -1,77 +0,0 @@ -.. _methods_cross_sections: - -============================ -Cross Section Representation -============================ - -The data governing the interaction of neutrons with various nuclei are -represented using the ACE format which is used by MCNP_ and Serpent_. ACE-format -data can be generated with the NJOY_ nuclear data processing system which -converts raw `ENDF/B data`_ into linearly-interpolable data as required by most -Monte Carlo codes. The use of a standard cross section format allows for a -direct comparison of OpenMC with other codes since the same cross section -libraries can be used. - -The ACE format contains continuous-energy cross sections for the following types -of reactions: elastic scattering, fission (or first-chance fission, -second-chance fission, etc.), inelastic scattering, :math:`(n,xn)`, -:math:`(n,\gamma)`, and various other absorption reactions. For those reactions -with one or more neutrons in the exit channel, secondary angle and energy -distributions may be provided. In addition, fissionable nuclides have total, -prompt, and/or delayed :math:`\nu` as a function of energy and neutron precursor -distributions. Many nuclides also have probability tables to be used for -accurate treatment of self-shielding in the unresolved resonance range. For -bound scatterers, separate tables with :math:`S(\alpha,\beta,T)` scattering law -data can be used. - -------------------- -Energy Grid Methods -------------------- - -The method by which continuous energy cross sections for each nuclide in a -problem are stored as a function of energy can have a substantial effect on the -performance of a Monte Carlo simulation. Since the ACE format is based on -linearly-interpolable cross sections, each nuclide has cross sections tabulated -over a wide range of energies. Some nuclides may only have a few points -tabulated (e.g. H-1) whereas other nuclides may have hundreds or thousands of -points tabulated (e.g. U-238). - -At each collision, it is necessary to sample the probability of having a -particular type of interaction whether it be elastic scattering, :math:`(n,2n)`, -level inelastic scattering, etc. This requires looking up the microscopic cross -sections for these reactions for each nuclide within the target material. Since -each nuclide has a unique energy grid, it would be necessary to search for the -appropriate index for each nuclide at every collision. This can become a very -time-consuming process, especially if there are many nuclides in a problem as -there would be for burnup calculations. Thus, there is a strong motive to -implement a method of reducing the number of energy grid searches in order to -speed up the calculation. - -Logarithmic Mapping -------------------- - -To speed up energy grid searches, OpenMC uses logarithmic mapping technique -[Brown]_ to limit the range of energies that must be searched for each -nuclide. The entire energy range is divided up into equal-lethargy segments, and -the bounding energies of each segment are mapped to bounding indices on each of -the nuclide energy grids. By default, OpenMC uses 8000 equal-lethargy segments -as recommended by Brown. - -Other Methods -------------- - -A good survey of other energy grid techniques, including unionized energy grids, -can be found in a paper by Leppanen_. - -.. only:: html - - .. rubric:: References - -.. [Brown] Forrest B. Brown, "New Hash-based Energy Lookup Algorithm for Monte - Carlo codes," LA-UR-14-24530, Los Alamos National Laboratory (2014). - -.. _MCNP: http://mcnp.lanl.gov -.. _Serpent: http://montecarlo.vtt.fi -.. _NJOY: http://t2.lanl.gov/codes.shtml -.. _ENDF/B data: http://www.nndc.bnl.gov/endf -.. _Leppanen: http://dx.doi.org/10.1016/j.anucene.2009.03.019 diff --git a/_sources/methods/eigenvalue.txt b/_sources/methods/eigenvalue.txt deleted file mode 100644 index 41bf86549..000000000 --- a/_sources/methods/eigenvalue.txt +++ /dev/null @@ -1,161 +0,0 @@ -.. _methods_eigenvalue: - -======================= -Eigenvalue Calculations -======================= - -An eigenvalue calculation, also referred to as a criticality calculation, is a -transport simulation wherein the source of neutrons includes a fissionable -material. Some common eigenvalue calculations include the simulation of nuclear -reactors, spent fuel pools, nuclear weapons, and other fissile systems. The -reason they are called *eigenvalue* calculations is that the transport equation -becomes an eigenvalue equation if a fissionable source is present since then the -source of neutrons will depend on the flux of neutrons itself. Eigenvalue -simulations using Monte Carlo methods are becoming increasingly common with the -advent of high-performance computing. - -This section will explore the theory behind and implementation of eigenvalue -calculations in a Monte Carlo code. - -.. _method-successive-generations: - --------------------------------- -Method of Successive Generations --------------------------------- - -The method used to converge on the fission source distribution in an eigenvalue -calculation, known as the method of successive generations, was first introduced -by [Lieberoth]_. In this method, a finite number of neutron histories, -:math:`N`, are tracked through their lifetime iteratively. If fission occurs, -rather than tracking the resulting fission neutrons, the spatial coordinates of -the fission site, the sampled outgoing energy and direction of the fission -neutron, and the weight of the neutron are stored for use in the subsequent -generation. In OpenMC, the array used for storing the fission site information -is called the *fission bank*. At the end of each fission generation, :math:`N` -source sites for the next generation must be randomly sampled from the :math:`M` -fission sites that were stored to ensure that the neutron population does not -grow exponentially. The sampled source sites are stored in an array called the -*source bank* and can be retrieved during the subsequent generation. - -It's important to recognize that in the method of successive generations, we -must start with some assumption on how the fission source sites are distributed -since the distribution is not known *a priori*. Typically, a user will make a -guess as to what the distribution is -- this guess could be a uniform -distribution over some region of the geometry or simply a point -source. Fortunately, regardless of the choice of initial source distribution, -the method is guaranteed to converge to the true source distribution. Until the -source distribution converges, tallies should not be scored to since they will -otherwise include contributions from an unconverged source distribution. - -The method by which the fission source iterations are parallelized can have a -large impact on the achievable parallel scaling. This topic is discussed at length -in :ref:`fission-bank-algorithms`. - -------------------------- -Source Convergence Issues -------------------------- - -Diagnosing Convergence with Shannon Entropy -------------------------------------------- - -As discussed earlier, it is necessary to converge both :math:`k_{eff}` and the -source distribution before any tallies can begin. Moreover, the convergence rate -of the source distribution is in general slower than that of -:math:`k_{eff}`. One should thus examine not only the convergence of -:math:`k_{eff}` but also the convergence of the source distribution in order to -make decisions on when to start active batches. - -However, the representation of the source distribution makes it a bit more -difficult to analyze its convergence. Since :math:`k_{eff}` is a scalar -quantity, it is easy to simply look at a line plot of :math:`k_{eff}` versus the -number of batches and this should give the user some idea about whether it has -converged. On the other hand, the source distribution at any given batch is a -finite set of coordinates in Euclidean space. In order to analyze the -convergence, we would either need to use a method for assessing convergence of -an N-dimensional quantity or transform our set of coordinates into a scalar -metric. The latter approach has been developed considerably over the last decade -and a method now commonly used in Monte Carlo eigenvalue calculations is to use -a metric called the `Shannon entropy`_, a concept borrowed from information -theory. - -To compute the Shannon entropy of the source distribution, we first need to -discretize the source distribution rather than having a set of coordinates in -Euclidean space. This can be done by superimposing a structured mesh over the -geometry (containing at least all fissionable materials). Then, the fraction of -source sites that are present in each mesh element is counted: - -.. math:: - :label: fraction-source - - S_i = \frac{\text{Source sites in $i$-th mesh element}}{\text{Total number of - source sites}} - -The Shannon entropy is then computed as - -.. math:: - :label: shannon-entropy - - H = - \sum_{i=1}^N S_i \log_2 S_i - -where :math:`N` is the number of mesh elements. With equation -:eq:`shannon-entropy`, we now have a scalar metric that we can use to assess the -convergence of the source distribution by observing line plots of the Shannon -entropy versus the number of batches. - -In recent years, researchers have started looking at ways of automatically -assessing source convergence to relieve the burden on the user of having to look -at plots of :math:`k_{eff}` and the Shannon entropy. A number of methods have -been proposed (see e.g. [Romano]_, [Ueki]_), but each of these is not without -problems. - ---------------------------- -Uniform Fission Site Method ---------------------------- - -Generally speaking, the variance of a Monte Carlo tally will be inversely -proportional to the number of events that score to the tally. In a reactor -problem, this implies that regions with low relative power density will have -higher variance that regions with high relative power density. One method to -circumvent the uneven distribution of relative errors is the uniform fission -site (UFS) method introduced by [Sutton]_. In this method, the portion of the -problem containing fissionable material is subdivided into a number of cells -(typically using a structured mesh). Rather than producing - -.. math:: - - m = \frac{w}{k} \frac{\nu\Sigma_f}{\Sigma_t} - -fission sites at each collision where :math:`w` is the weight of the neutron, -:math:`k` is the previous-generation estimate of the neutron multiplication -factor, :math:`\nu\Sigma_f` is the neutron production cross section, and -:math:`\Sigma_t` is the total cross section, in the UFS method we produce - -.. math:: - - m_{UFS} = \frac{w}{k} \frac{\nu\Sigma_f}{\Sigma_t} \frac{v_i}{s_i} - -fission sites at each collision where :math:`v_i` is the fraction of the total -volume occupied by cell :math:`i` and :math:`s_i` is the fraction of the fission -source contained in cell :math:`i`. To ensure that no bias is introduced, the -weight of each fission site stored in the fission bank is :math:`s_i/v_i` rather -than unity. By ensuring that the expected number of fission sites in each mesh -cell is constant, the collision density across all cells, and hence the variance -of tallies, is more uniform than it would be otherwise. - -.. _Shannon entropy: https://laws.lanl.gov/vhosts/mcnp.lanl.gov/pdf_files/la-ur-06-3737.pdf - -.. [Lieberoth] J. Lieberoth, "A Monte Carlo Technique to Solve the Static - Eigenvalue Problem of the Boltzmann Transport Equation," *Nukleonik*, **11**, - 213-219 (1968). - -.. [Romano] Paul K. Romano, "Application of the Stochastic Oscillator to Assess - Source Convergence in Monte Carlo Criticality Calculations," - *Proc. International Conference on Mathematics, Computational Methods, and - Reactor Physics*, Saratoga Springs, New York (2009). - -.. [Sutton] Daniel J. Kelly, Thomas M. Sutton, and Stephen C. Wilson, "MC21 - Analysis of the Nuclear Energy Agency Monte Carlo Performance Benchmark - Problem," *Proc. PHYSOR 2012*, Knoxville, Tennessee, Apr. 15--20 (2012). - -.. [Ueki] Taro Ueki, "On-the-Fly Judgments of Monte Carlo Fission Source - Convergence," *Trans. Am. Nucl. Soc.*, **98**, 512 (2008). diff --git a/_sources/methods/geometry.txt b/_sources/methods/geometry.txt deleted file mode 100644 index c1be68f72..000000000 --- a/_sources/methods/geometry.txt +++ /dev/null @@ -1,816 +0,0 @@ -.. _methods_geometry: - -======== -Geometry -======== - ---------------------------- -Constructive Solid Geometry ---------------------------- - -OpenMC uses a technique known as `constructive solid geometry`_ (CSG) to build -arbitrarily complex three-dimensional models in Euclidean space. In a CSG model, -every unique object is described as the union and/or intersection of -*half-spaces* created by bounding `surfaces`_. Every surface divides all of -space into exactly two half-spaces. We can mathematically define a surface as a -collection of points that satisfy an equation of the form :math:`f(x,y,z) = 0` -where :math:`f(x,y,z)` is a given function. All coordinates for which -:math:`f(x,y,z) < 0` are referred to as the negative half-space (or simply the -*negative side*) and coordinates for which :math:`f(x,y,z) > 0` are referred to -as the positive half-space. - -Let us take the example of a sphere centered at the point :math:`(x_0,y_0,z_0)` -with radius :math:`R`. One would normally write the equation of the sphere as - -.. math:: - :label: sphere-equation - - (x - x_0)^2 + (y - y_0)^2 + (z - z_0)^2 = R^2 - -By subtracting the right-hand term from both sides of equation -:eq:`sphere-equation`, we can then write the surface equation for the sphere: - -.. math:: - :label: surface-equation-sphere - - f(x,y,z) = (x - x_0)^2 + (y - y_0)^2 + (z - z_0)^2 - R^2 = 0 - -One can confirm that any point inside this sphere will correspond to -:math:`f(x,y,z) < 0` and any point outside the sphere will correspond to -:math:`f(x,y,z) > 0`. - -In OpenMC, every surface defined by the user is assigned an integer to uniquely -identify it. We can then refer to either of the two half-spaces created by a -surface by a combination of the unique ID of the surface and a positive/negative -sign. Figure :num:`fig-halfspace` shows an example of an ellipse with unique ID 1 -dividing space into two half-spaces. - -.. _fig-halfspace: - -.. figure:: ../_images/halfspace.* - :align: center - :figclass: align-center - - Example of an ellipse and its associated half-spaces. - -References to half-spaces created by surfaces are used to define regions of -space of uniform composition, which are then assigned to *cells*. OpenMC allows -regions to be defined using union, intersection, and complement operators. As in -MCNP_, the intersection operator is implicit as doesn't need to be written in a -region specification. A defined region is then associated with a material -composition in a cell. Figure :num:`fig-union` shows an example of a cell region -defined as the intersection of an ellipse and two planes. - -.. _fig-union: - -.. figure:: ../_images/union.* - :align: center - :figclass: align-center - - The shaded region represents a cell bounded by three surfaces. - -The ability to form regions based on bounding quadratic surfaces enables OpenMC -to model arbitrarily complex three-dimensional objects. In practice, one is -limited only by the different surface types available in OpenMC. The following -table lists the available surface types, the identifier used to specify them in -input files, the corresponding surface equation, and the input parameters needed -to fully define the surface. - -.. table:: Surface types available in OpenMC. - - +----------------------+------------+------------------------------+-------------------------+ - | Surface | Identifier | Equation | Parameters | - +======================+============+==============================+=========================+ - | Plane perpendicular | x-plane | :math:`x - x_0 = 0` | :math:`x_0` | - | to :math:`x`-axis | | | | - +----------------------+------------+------------------------------+-------------------------+ - | Plane perpendicular | y-plane | :math:`x - x_0 = 0` | :math:`y_0` | - | to :math:`y`-axis | | | | - +----------------------+------------+------------------------------+-------------------------+ - | Plane perpendicular | z-plane | :math:`x - x_0 = 0` | :math:`z_0` | - | to :math:`z`-axis | | | | - +----------------------+------------+------------------------------+-------------------------+ - | Arbitrary plane | plane | :math:`Ax + By + Cz = D` | :math:`A\;B\;C\;D` | - +----------------------+------------+------------------------------+-------------------------+ - | Infinite cylinder | x-cylinder | :math:`(y-y_0)^2 + (z-z_0)^2 | :math:`y_0\;z_0\;R` | - | parallel to | | = R^2` | | - | :math:`x`-axis | | | | - +----------------------+------------+------------------------------+-------------------------+ - | Infinite cylinder | y-cylinder | :math:`(x-x_0)^2 + (z-z_0)^2 | :math:`x_0\;z_0\;R` | - | parallel to | | = R^2` | | - | :math:`y`-axis | | | | - +----------------------+------------+------------------------------+-------------------------+ - | Infinite cylinder | z-cylinder | :math:`(x-x_0)^2 + (y-y_0)^2 | :math:`x_0\;y_0\;R` | - | parallel to | | = R^2` | | - | :math:`z`-axis | | | | - +----------------------+------------+------------------------------+-------------------------+ - | Sphere | sphere | :math:`(x-x_0)^2 + (y-y_0)^2 | :math:`x_0 \; y_0 \; | - | | | + (z-z_0)^2 = R^2` | z_0 \; R` | - +----------------------+------------+------------------------------+-------------------------+ - | Cone parallel to the | x-cone | :math:`(y-y_0)^2 + (z-z_0)^2 | :math:`x_0 \; y_0 \; | - | :math:`x`-axis | | = R^2(x-x_0)^2` | z_0 \; R^2` | - +----------------------+------------+------------------------------+-------------------------+ - | Cone parallel to the | y-cone | :math:`(x-x_0)^2 + (z-z_0)^2 | :math:`x_0 \; y_0 \; | - | :math:`y`-axis | | = R^2(y-y_0)^2` | z_0 \; R^2` | - +----------------------+------------+------------------------------+-------------------------+ - | Cone parallel to the | z-cone | :math:`(x-x_0)^2 + (y-y_0)^2 | :math:`x_0 \; y_0 \; | - | :math:`z`-axis | | = R^2(z-z_0)^2` | z_0 \; R^2` | - +----------------------+------------+------------------------------+-------------------------+ - | General quadric | quadric | :math:`Ax^2 + By^2 + Cz^2 + | :math:`A \; B \; C \; D | - | surface | | Dxy + Eyz + Fxz + Gx + Hy + | \; E \; F \; G \; H \; | - | | | Jz + K` | J \; K` | - +----------------------+------------+------------------------------+-------------------------+ - -.. _universes: - -Universes ---------- - -OpenMC supports universe-based geometry similar to the likes of MCNP_ and -Serpent_. This capability enables user to model any identical repeated -structures once and then fill them in various spots in the geometry. A -prototypical example of a repeated structure would be a fuel pin within a fuel -assembly or a fuel assembly within a core. - -Each cell in OpenMC can either be filled with a normal material or with a -universe. If the cell is filled with a universe, only the region of the universe -that is within the defined boundaries of the parent cell will be present in the -geometry. That is to say, even though a collection of cells in a universe may -extend to infinity, not all of the universe will be "visible" in the geometry -since it will be truncated by the boundaries of the cell that contains it. - -When a cell is filled with a universe, it is possible to specify that the -universe filling the cell should be rotated and translated. This is done through -the ``rotation`` and ``translation`` attributes on a cell (note though that -these can only be specified on a cell that is filled with another universe, not -a material). - -It is not necessary to use or assign universes in a geometry if there are no -repeated structures. Any cell in the geometry that is not assigned to a -specified universe is automatically part of the *base universe* whose -coordinates are just the normal coordinates in Euclidean space. - -Lattices --------- - -Often times, repeated structures in a geometry occur in a regular pattern such -as a rectangular or hexagonal lattice. In such a case, it would be cumbersome -for a user to have to define the boundaries of each of the cells to be filled -with a universe. Thus, OpenMC provides a lattice capability similar to that used -in MCNP_ and Serpent_. - -The implementation of lattices is similar in principle to universes --- instead -of a cell being filled with a universe, the user can specify that it is filled -with a finite lattice. The lattice is then defined by a two-dimensional array of -universes that are to fill each position in the lattice. A good example of the -use of lattices and universes can be seen in the OpenMC model for the `Monte -Carlo Performance benchmark`_. - ------------------------------------------- -Computing the Distance to Nearest Boundary ------------------------------------------- - -One of the most basic algorithms in any Monte Carlo code is determining the -distance to the nearest surface within a cell. Since each cell is defined by -the surfaces that bound it, if we compute the distance to all surfaces bounding -a cell, we can determine the nearest one. - -With the possibility of a particle having coordinates on multiple levels -(universes) in a geometry, we must exercise care when calculating the distance -to the nearest surface. Each different level of geometry has a set of boundaries -with which the particle's direction of travel may intersect. Thus, it is -necessary to check the distance to the surfaces bounding the cell in each -level. This should be done starting the highest (most global) level going down -to the lowest (most local) level. That ensures that if two surfaces on different -levels are coincident, by default the one on the higher level will be selected -as the nearest surface. Although they are not explicitly defined, it is also -necessary to check the distance to surfaces representing lattice boundaries if a -lattice exists on a given level. - -The following procedure is used to calculate the distance to each bounding -surface. Suppose we have a particle at :math:`(x_0,y_0,z_0)` traveling in the -direction :math:`u_0,v_0,w_0`. To find the distance :math:`d` to a surface -:math:`f(x,y,z) = 0`, we need to solve the equation: - -.. math:: - :label: dist-to-boundary-1 - - f(x_0 + du_0, y_0 + dv_0, z_0 + dw_0) = 0 - -If no solutions to equation :eq:`dist-to-boundary-1` exist or the only solutions -are complex, then the particle's direction of travel will not intersect the -surface. If the solution to equation :eq:`dist-to-boundary-1` is negative, this -means that the surface is "behind" the particle, i.e. if the particle continues -traveling in its current direction, it will not hit the surface. The complete -derivation for different types of surfaces used in OpenMC will be presented in -the following sections. - -Since :math:f(x,y,z)` in general is quadratic in :math:`x`, :math:`y`, and -:math:`z`, this implies that :math:`f(x_0 + du_0, y + dv_0, z + dw_0)` is -quadratic in :math:`d`. Thus we expect at most two real solutions to -:eq:`dist-to-boundary-1`. If no solutions to :eq:`dist-to-boundary-1` exist or -the only solutions are complex, then the particle's direction of travel will not -intersect the surface. If the solution to :eq:`dist-to-boundary-1` is negative, -this means that the surface is "behind" the particle, i.e. if the particle -continues traveling in its current direction, it will not hit the surface. - -Once a distance has been computed to a surface, we need to check if it is closer -than previously-computed distances to surfaces. Unfortunately, we cannot just -use the minimum function because some of the calculated distances, which should -be the same in theory (e.g. coincident surfaces), may be slightly different due -to the use of floating-point arithmetic. Consequently, we should first check for -floating-point equality of the current distance calculated and the minimum found -thus far. This is done by checking if - -.. math:: - :label: fp-distance - - \frac{| d - d_{min} |}{d_{min}} < \epsilon - -where :math:`d` is the distance to a surface just calculated, :math:`d_{min}` is -the minimum distance found thus far, and :math:`\epsilon` is a small number. In -OpenMC, this parameter is set to :math:`\epsilon = 10^{-14}` since all floating -calculations are done on 8-byte floating point numbers. - -Plane Perpendicular to an Axis ------------------------------- - -The equation for a plane perpendicular to, for example, the x-axis is simply -:math:`x - x_0 = 0`. As such, we need to solve :math:`x + du - x_0 = 0`. The -solution for the distance is - -.. math:: - :label: dist-xplane - - d = \frac{x_0 - x}{u} - -Note that if the particle's direction of flight is parallel to the x-axis, -i.e. :math:`u = 0`, the distance to the surface will be infinity. While the -example here was for a plane perpendicular to the x-axis, the same formula can -be applied for the surfaces :math:`y = y_0` and :math:`z = z_0`. - -Generic Plane -------------- - -The equation for a generic plane is :math:`Ax + By + Cz = D`. Thus, we need to -solve the equation :math:`A(x + du) + B(y + dv) + C(z + dw) = D`. The solution -to this equation for the distance is - -.. math:: - :label: dist-plane - - d = \frac{D - Ax - By - Cz}{Au + Bv + Cw} - -Again, we need to check whether the denominator is zero. If so, this means that -the particle's direction of flight is parallel to the plane and it will -therefore never hit the plane. - -Cylinder Parallel to an Axis ----------------------------- - -The equation for a cylinder parallel to, for example, the x-axis is :math:`(y - -y_0)^2 + (z - z_0)^2 = R^2`. Thus, we need to solve :math:`(y + dv - y_0)^2 + -(z + dw - z_0)^2 = R^2`. Let us define :math:`\bar{y} = y - y_0` and -:math:`\bar{z} = z - z_0`. We then have - -.. math:: - :label: dist-xcylinder-1 - - (\bar{y} + dv)^2 + (\bar{z} + dw)^2 = R^2 - -Expanding equation :eq:`dist-xcylinder-1` and rearranging terms, we obtain - -.. math:: - :label: dist-xcylinder-2 - - (v^2 + w^2) d^2 + 2 (\bar{y}v + \bar{z}w) d + (\bar{y}^2 + \bar{z}^2 - R^2) - = 0 - -This is a quadratic equation for :math:`d`. To simplify notation, let us define -:math:`a = v^2 + w^2`, :math:`k = \bar{y}v + \bar{z}w`, and :math:`c = -\bar{y}^2 + \bar{z}^2 - R^2`. Thus, the distance is just the solution to -:math:`ad^2 + 2kd + c = 0`: - -.. math:: - :label: dist-xcylinder-3 - - d = \frac{-k \pm \sqrt{k^2 - ac}}{a} - -A few conditions must be checked for. If :math:`a = 0`, this means the particle -is parallel to the cylinder and will thus never intersect it. Also, if -:math:`k^2 - ac < 0`, this means that both solutions to the quadratic are -complex. In physical terms, this means that the ray along which the particle is -traveling does not make any intersections with the cylinder. - -If we do have intersections and :math:`c < 0`, this means that the particle is -inside the cylinder. Thus, one solution should be positive and one should be -negative. Clearly, the positive distance will occur when the sign on the -square root of the discriminant is positive since :math:`a > 0`. - -If we have intersections and :math:`c > 0` this means that the particle is -outside the cylinder. Thus, the solutions to the quadratic are either both -positive or both negative. If they are both positive, the smaller (closer) one -will be the solution with a negative sign on the square root of the -discriminant. - -The same equations and logic here can be used for cylinders that are parallel to -the y- or z-axis with appropriate substitution of constants. - -Sphere ------- - -The equation for a sphere is :math:`(x - x_0)^2 + (y - y_0)^2 + (z - z_0)^2 = -R^2`. Thus, we need to solve the equation - -.. math:: - :label: dist-sphere-1 - - (x + du - x_0)^2 + (y + dv - y_0)^2 + (z + dw - z_0)^2 = R^2 - -Let us define :math:`\bar{x} = x - x_0`, :math:`\bar{y} = y - y_0`, and -:math:`\bar{z} = z - z_0`. We then have - -.. math:: - :label: dist-sphere-2 - - (\bar{x} + du)^2 + (\bar{y} + dv)^2 + (\bar{z} - dw)^2 = R^2 - -Expanding equation :eq:`dist-sphere-2` and rearranging terms, we obtain - -.. math:: - :label: dist-sphere-3 - - d^2 + 2 (\bar{x}u + \bar{y}v + \bar{z}w) d + (\bar{x}^2 + \bar{y}^2 + - \bar{z}^2 - R^2) = 0 - -This is a quadratic equation for :math:`d`. To simplify notation, let us define -:math:`k = \bar{x}u + \bar{y}v + \bar{z}w` and :math:`c = \bar{x}^2 + -\bar{y}^2 + \bar{z}^2 - R^2`. Thus, the distance is just the solution to -:math:`d^2 + 2kd + c = 0`: - -.. math:: - :label: dist-sphere-4 - - d = -k \pm \sqrt{k^2 - c} - -If the discriminant :math:`k^2 - c < 0`, this means that both solutions to the -quadratic are complex. In physical terms, this means that the ray along which -the particle is traveling does not make any intersections with the sphere. - -If we do have intersections and :math:`c < 0`, this means that the particle is -inside the sphere. Thus, one solution should be positive and one should be -negative. The positive distance will occur when the sign on the square root of -the discriminant is positive. If we have intersections but :math:`c > 0` this -means that the particle is outside the sphere. The solutions to the quadratic -will then be either both positive or both negative. If they are both positive, -the smaller (closer) one will be the solution with a negative sign on the square -root of the discriminant. - -.. TODO: Need to add derivation for x-cone, y-cone, and z-cone. - -.. _find-cell: - ----------------------------- -Finding a Cell Given a Point ----------------------------- - -Another basic algorithm is to determine which cell contains a given point in the -global coordinate system, i.e. if the particle's position is :math:`(x,y,z)`, -what cell is it currently in. This is done in the following manner in -OpenMC. With the possibility of multiple levels of coordinates, we must perform -a recursive search for the cell. First, we start in the highest (most global) -universe, which we call the base universe, and loop over each cell within -that universe. For each cell, we check whether the specified point is inside the -cell using the algorithm described in :ref:`cell-contains`. If the cell is -filled with a normal material, the search is done and we have identified the -cell containing the point. If the cell is filled with another universe, we then -search all cells within that universe to see if any of them contain the -specified point. If the cell is filled with a lattice, the position within the -lattice is determined, and then whatever universe fills that lattice position is -recursively searched. The search ends once a cell containing a normal material -is found that contains the specified point. - -.. _cell-contains: - ----------------------- -Finding a Lattice Tile ----------------------- - -If a particle is inside a lattice, its position inside the lattice must be -determined before assigning it to a cell. Throughout this section, the -volumetric units of the lattice will be referred to as "tiles". Tiles are -identified by thier indices, and the process of discovering which tile contains -the particle is referred to as "indexing". - -Rectilinear Lattice Indexing ----------------------------- - -Indices are assigned to tiles in a rectilinear lattice based on the tile's -position along the :math:`x`, :math:`y`, and :math:`z` axes. Figure -:num:`fig-rect-lat` maps the indices for a 2D lattice. The indices, (1, 1), -map to the lower-left tile. (5, 1) and (5, 5) map to the lower-right and -upper-right tiles, respectively. - -.. _fig-rect-lat: - -.. figure:: ../_images/rect_lat.* - :align: center - :figclass: align-center - :width: 400px - - Rectilinear lattice tile indices. - -In general, a lattice tile is specified by the three indices, -:math:`(i_x, i_y, i_z)`. If a particle's current coordinates are -:math:`(x, y, z)` then the indices can be determined from these formulas: - -.. math:: - :label: rect_indexing - - i_x = \left \lceil \frac{x - x_0}{p_0} \right \rceil - - i_y = \left \lceil \frac{y - y_0}{p_1} \right \rceil - - i_z = \left \lceil \frac{z - z_0}{p_2} \right \rceil - -where :math:`(x_0, y_0, z_0)` are the coordinates to the lower-left-bottom -corner of the lattice, and :math:`p_0, p_1, p_2` are the pitches along the -:math:`x`, :math:`y`, and :math:`z` axes, respectively. - -Hexagonal Lattice Indexing --------------------------- - -A skewed coordinate system is used for indexing hexagonal lattice tiles. -Rather than a :math:`y`-axis, another axis is used that is rotated 30 degrees -counter-clockwise from the :math:`y`-axis. This axis is referred to as the -:math:`\alpha`-axis. Figure :num:`fig-hex-lat` shows how 2D hexagonal tiles -are mapped with the :math:`(x, \alpha)` basis. In this system, (0, 0) maps to -the center tile, (0, 2) to the top tile, and (2, -1) to the middle tile on the -right side. - -.. _fig-hex-lat: - -.. figure:: ../_images/hex_lat.* - :align: center - :figclass: align-center - :width: 400px - - Hexagonal lattice tile indices. - -Unfortunately, the indices cannot be determined with one simple formula as -before. Indexing requires a two-step process, a coarse step which determines a -set of four tiles that contains the particle and a fine step that determines -which of those four tiles actually contains the particle. - -In the first step, indices are found using these formulas: - -.. math:: - :label: hex_indexing - - \alpha = -\frac{x}{\sqrt{3}} + y - - i_x^* = \left \lfloor \frac{x}{p_0 \sqrt{3} / 2} \right \rfloor - - i_\alpha^* = \left \lfloor \frac{\alpha}{p_0} \right \rfloor - -where :math:`p_0` is the lattice pitch (in the :math:`x`-:math:`y` plane). The -true index of the particle could be :math:`(i_x^*, i_\alpha^*)`, -:math:`(i_x^* + 1, i_\alpha^*)`, :math:`(i_x^*, i_\alpha^* + 1)`, or -:math:`(i_x^* + 1, i_\alpha^* + 1)`. - -The second step selects the correct tile from that neighborhood of 4. OpenMC -does this by calculating the distance between the particle and the centers of -each of the 4 tiles, and then picking the closest tile. This works because -regular hexagonal tiles form a Voronoi tessellation which means that all of the -points within a tile are closest to the center of that same tile. - -Indexing along the :math:`z`-axis uses the same method from rectilinear -lattices, i.e. - -.. math:: - :label: hex_indexing_z - - i_z = \left \lceil \frac{z - z_0}{p_2} \right \rceil - ----------------------------------------- -Determining if a Coordinate is in a Cell ----------------------------------------- - -To determine which cell a particle is in given its coordinates, we need to be -able to check whether a given cell contains a point. The algorithm for -determining if a cell contains a point is as follows. For each surface that -bounds a cell, we determine the particle's sense with respect to the surface. As -explained earlier, if we have a point :math:`(x_0,y_0,z_0)` and a surface -:math:`f(x,y,z) = 0`, the point is said to have negative sense if -:math:`f(x_0,y_0,z_0) < 0` and positive sense if :math:`f(x_0,y_0,z_0) > 0`. If -for all surfaces, the sense of the particle with respect to the surface matches -the specified sense that defines the half-space within the cell, then the point -is inside the cell. Note that this algorithm works only for *simple cells* -defined as intersections of half-spaces. - -It may help to illustrate this algorithm using a simple example. Let's say we -have a cell defined as - -.. code-block:: xml - - - - - - -This means that the cell is defined as the intersection of the negative half -space of a sphere, the positive half-space of an x-plane, and the negative -half-space of a y-plane. Said another way, any point inside this cell must -satisfy the following equations - -.. math:: - :label: cell-contains-example - - x^2 + y^2 + z^2 - 10^2 < 0 \\ - x - (-3) > 0 \\ - y - 2 < 0 - -In order to determine if a point is inside the cell, we would substitute its -coordinates into equation :eq:`cell-contains-example`. If the inequalities are -satisfied, than the point is indeed inside the cell. - --------------------------- -Handling Surface Crossings --------------------------- - -A particle will cross a surface if the distance to the nearest surface is closer -than the distance sampled to the next collision. A number of things happen when -a particle hits a surface. First, we need to check if a non-transmissive -boundary condition has been applied to the surface. If a vacuum boundary -condition has been applied, the particle is killed and any surface current -tallies are scored to as needed. If a reflective boundary condition has been -applied to the surface, surface current tallies are scored to and then the -particle's direction is changed according to the procedure in :ref:`reflection`. - -Next, we need to determine what cell is beyond the surface in the direction of -travel of the particle so that we can evaluate cross sections based on its -material properties. At initialization, a list of neighboring cells is created -for each surface in the problem as described in :ref:`neighbor-lists`. The -algorithm outlined in :ref:`find-cell` is used to find a cell containing the -particle with one minor modification; rather than searching all cells in the -base universe, only the list of neighboring cells is searched. If this search is -unsuccessful, then a search is done over every cell in the base universe. - -.. _neighbor-lists: - ------------------------ -Building Neighbor Lists ------------------------ - -After the geometry has been loaded and stored in memory from an input file, -OpenMC builds a list for each surface containing any cells that are bounded by -that surface in order to speed up processing of surface crossings. The algorithm -to build these lists is as follows. First, we loop over all cells in the -geometry and count up how many times each surface appears in a specification as -bounding a negative half-space and bounding a positive half-space. Two arrays -are then allocated for each surface, one that lists each cell that contains the -negative half-space of the surface and one that lists each cell that contains -the positive half-space of the surface. Another loop is performed over all cells -and the neighbor lists are populated for each surface. - -.. _reflection: - ------------------------------- -Reflective Boundary Conditions ------------------------------- - -If the velocity of a particle is :math:`\mathbf{v}` and it crosses a surface of -the form :math:`f(x,y,z) = 0` with a reflective boundary condition, it can be -shown based on geometric arguments that the velocity vector will then become - -.. math:: - :label: reflection-v - - \mathbf{v'} = \mathbf{v} - 2 (\mathbf{v} \cdot \hat{\mathbf{n}}) - \hat{\mathbf{n}} - -where :math:`\hat{\mathbf{n}}` is a unit vector normal to the surface at the -point of the surface crossing. The rationale for this can be understood by -noting that :math:`(\mathbf{v} \cdot \hat{\mathbf{n}}) \hat{\mathbf{n}}` is the -projection of the velocity vector onto the normal vector. By subtracting two -times this projection, the velocity is reflected with respect to the surface -normal. Since the magnitude of the velocity of the particle will not change as -it undergoes reflection, we can work with the direction of the particle instead, -simplifying equation :eq:`reflection-v` to - -.. math:: - :label: reflection-omega - - \mathbf{\Omega'} = \mathbf{\Omega} - 2 (\mathbf{\Omega} \cdot - \hat{\mathbf{n}}) \hat{\mathbf{n}} - -where :math:`\mathbf{v} = || \mathbf{v} || \mathbf{\Omega}`. The direction of -the surface normal will be the gradient of the surface at the point of crossing, -i.e. :math:`\mathbf{n} = \nabla f(x,y,z)`. Substituting this into equation -:eq:`reflection-omega`, we get - -.. math:: - :label: reflection-omega-2 - - \mathbf{\Omega'} = \mathbf{\Omega} - \frac{2 ( \mathbf{\Omega} \cdot \nabla - f )}{|| \nabla f ||^2} \nabla f - - -If we write the initial and final directions in terms of their vector -components, :math:`\mathbf{\Omega} = (u,v,w)` and :math:`\mathbf{\Omega'} = (u', -v', w')`, this allows us to represent equation :eq:`reflection-omega` as a -series of equations: - -.. math:: - :label: reflection-system - - u' = u - \frac{2 ( \mathbf{\Omega} \cdot \nabla f )}{|| \nabla f ||^2} - \frac{\partial f}{\partial x} \\ - - v' = v - \frac{2 ( \mathbf{\Omega} \cdot \nabla f )}{|| \nabla f ||^2} - \frac{\partial f}{\partial y} \\ - - w' = w - \frac{2 ( \mathbf{\Omega} \cdot \nabla f )}{|| \nabla f ||^2} - \frac{\partial f}{\partial z} - -One can then use equation :eq:`reflection-system` to develop equations for -transforming a particle's direction given the equation of the surface. - -Plane Perpendicular to an Axis ------------------------------- - -For a plane that is perpendicular to an axis, the rule for reflection is almost -so simple that no derivation is needed at all. Nevertheless, we will proceed -with the derivation to confirm that the rules of geometry agree with our -intuition. The gradient of the surface :math:`f(x,y,z) = x - x_0 = 0` is simply -:math:`\nabla f = (1, 0, 0)`. Note that this vector is already normalized, -i.e. :math:`|| \nabla f || = 1`. The second two equations in -:eq:`reflection-system` tell us that :math:`v` and :math:`w` do not change and -the first tell us that - -.. math:: - :label: reflection-xplane - - u' = u - 2u = -u - -We see that reflection for a plane perpendicular to an axis only entails -negating the directional cosine for that axis. - -Generic Plane -------------- - -A generic plane has the form :math:`f(x,y,z) = Ax + By + Cz - D = 0`. Thus, the -gradient to the surface is simply :math:`\nabla f = (A,B,C)` whose norm squared -is :math:`A^2 + B^2 + C^2`. This implies that - -.. math:: - :label: reflection-plane-constant - - \frac{2 (\mathbf{\Omega} \cdot \nabla f)}{|| \nabla f ||^2} = \frac{2(Au + - Bv + Cw)}{A^2 + B^2 + C^2} - -Substituting equation :eq:`reflection-plane-constant` into equation -:eq:`reflection-system` gives us the form of the solution. For example, the -x-component of the reflected direction will be - -.. math:: - :label: reflection-plane - - u' = u - \frac{2A(Au + Bv + Cw)}{A^2 + B^2 + C^2} - - -Cylinder Parallel to an Axis ----------------------------- - -A cylinder parallel to, for example, the x-axis has the form :math:`f(x,y,z) = -(y - y_0)^2 + (z - z_0)^2 - R^2 = 0`. Thus, the gradient to the surface is - -.. math:: - :label: reflection-cylinder-grad - - \nabla f = 2 \left ( \begin{array}{c} 0 \\ y - y_0 \\ z - z_0 \end{array} - \right ) = 2 \left ( \begin{array}{c} 0 \\ \bar{y} \\ \bar{z} \end{array} - \right ) - -where we have introduced the constants :math:`\bar{y}` and -:math:`\bar{z}`. Taking the square of the norm of the gradient, we find that - -.. math:: - :label: reflection-cylinder-norm - - || \nabla f ||^2 = 4 \bar{y}^2 + 4 \bar{z}^2 = 4 R^2 - -This implies that - -.. math:: - :label: reflection-cylinder-constant - - \frac{2 (\mathbf{\Omega} \cdot \nabla f)}{|| \nabla f ||^2} = - \frac{\bar{y}v + \bar{z}w}{R^2} - -Substituting equations :eq:`reflection-cylinder-constant` and -:eq:`reflection-cylinder-grad` into equation :eq:`reflection-system` gives us -the form of the solution. In this case, the x-component will not change. The y- -and z-components of the reflected direction will be - -.. math:: - :label: reflection-cylinder - - v' = v - \frac{2 ( \bar{y}v + \bar{z}w ) \bar{y}}{R^2} \\ - - w' = w - \frac{2 ( \bar{y}v + \bar{z}w ) \bar{z}}{R^2} - - -Sphere ------- - -The surface equation for a sphere has the form :math:`f(x,y,z) = (x - x_0)^2 + -(y - y_0)^2 + (z - z_0)^2 - R^2 = 0`. Thus, the gradient to the surface is - -.. math:: - :label: reflection-sphere-grad - - \nabla f = 2 \left ( \begin{array}{c} x - x_0 \\ y - y_0 \\ z - z_0 - \end{array} \right ) = 2 \left ( \begin{array}{c} \bar{x} \\ \bar{y} \\ - \bar{z} \end{array} \right ) - -where we have introduced the constants :math:`\bar{x}, \bar{y}, \bar{z}`. Taking -the square of the norm of the gradient, we find that - -.. math:: - :label: reflection-sphere-norm - - || \nabla f ||^2 = 4 \bar{x}^2 + 4 \bar{y}^2 + 4 \bar{z}^2 = 4 R^2 - -This implies that - -.. math:: - :label: reflection-sphere-constant - - \frac{2 (\mathbf{\Omega} \cdot \nabla f)}{|| \nabla f ||^2} = - \frac{\bar{x}u + \bar{y}v + \bar{z}w}{R^2} - -Substituting equations :eq:`reflection-sphere-constant` and -:eq:`reflection-sphere-grad` into equation :eq:`reflection-system` gives us the -form of the solution: - -.. math:: - :label: reflection-sphere - - u' = u - \frac{2 ( \bar{x}u + \bar{y}v + \bar{z}w ) \bar{x} }{R^2} \\ - - v' = v - \frac{2 ( \bar{x}u + \bar{y}v + \bar{z}w ) \bar{y} }{R^2} \\ - - w' = w - \frac{2 ( \bar{x}u + \bar{y}v + \bar{z}w ) \bar{z} }{R^2} - -Cone Parallel to an Axis ------------------------- - -A cone parallel to, for example, the z-axis has the form :math:`f(x,y,z) = (x - -x_0)^2 + (y - y_0)^2 - R^2(z - z_0)^2 = 0`. Thus, the gradient to the surface is - -.. math:: - :label: reflection-cone-grad - - \nabla f = 2 \left ( \begin{array}{c} x - x_0 \\ y - y_0 \\ -R^2(z - z_0) - \end{array} \right ) = 2 \left ( \begin{array}{c} \bar{x} \\ \bar{y} \\ - -R^2\bar{z} \end{array} \right ) - -where we have introduced the constants :math:`\bar{x}`, :math:`\bar{y}`, and -:math:`\bar{z}`. Taking the square of the norm of the gradient, we find that - -.. math:: - :label: reflection-cone-norm - - || \nabla f ||^2 = 4 \bar{x}^2 + \bar{y}^2 + 4 R^4 \bar{z}^2 \\ = 4 R^2 - \bar{z}^2 + 4 R^4 \bar{z}^2 \\ = 4 R^2 (1 + R^2) \bar{z}^2 - -This implies that - -.. math:: - :label: reflection-cone-constant - - \frac{2 (\mathbf{\Omega} \cdot \nabla f)}{|| \nabla f ||^2} = - \frac{\bar{x}u + \bar{y}v - R^2\bar{z}w}{R^2 (1 + R^2) \bar{z}^2} - -Substituting equations :eq:`reflection-cone-constant` and -:eq:`reflection-cone-grad` into equation :eq:`reflection-system` gives us the -form of the solution: - -.. math:: - :label: reflection-cone - - u' = u - \frac{2 (\bar{x}u + \bar{y}v - R^2\bar{z}w) \bar{x}}{R^2 (1 + R^2) - \bar{z}^2} - - v' = v - \frac{2 (\bar{x}u + \bar{y}v - R^2\bar{z}w) \bar{y}}{R^2 (1 + R^2) - \bar{z}^2} - - w' = w + \frac{2 (\bar{x}u + \bar{y}v - R^2\bar{z}w)}{R^2 (1 + R^2) \bar{z}} - - -.. _constructive solid geometry: http://en.wikipedia.org/wiki/Constructive_solid_geometry -.. _surfaces: http://en.wikipedia.org/wiki/Surface -.. _MCNP: http://mcnp.lanl.gov -.. _Serpent: http://montecarlo.vtt.fi -.. _Monte Carlo Performance benchmark: https://github.com/paulromano/benchmarks/tree/master/mc-performance/openmc diff --git a/_sources/methods/index.txt b/_sources/methods/index.txt deleted file mode 100644 index 1df4f324a..000000000 --- a/_sources/methods/index.txt +++ /dev/null @@ -1,19 +0,0 @@ -.. _methods: - -====================== -Theory and Methodology -====================== - -.. toctree:: - :numbered: - :maxdepth: 3 - - introduction - geometry - cross_sections - random_numbers - physics - tallies - eigenvalue - parallelization - cmfd diff --git a/_sources/methods/introduction.txt b/_sources/methods/introduction.txt deleted file mode 100644 index 508ac9919..000000000 --- a/_sources/methods/introduction.txt +++ /dev/null @@ -1,131 +0,0 @@ -.. _methods_introduction: - -============ -Introduction -============ - -The physical process by which a population of particles evolves over time is -governed by a number of `probability distributions`_. For instance, given a -particle traveling through some material, there is a probability distribution -for the distance it will travel until its next collision (an exponential -distribution). Then, when it collides with a nucleus, there is associated -probability of undergoing each possible reaction with that nucleus. While the -behavior of any single particle is unpredictable, the average behavior of a -large population of particles originating from the same source is well defined. - -If the probability distributions that govern the transport of a particle are -known, the process of single particles randomly streaming and colliding with -nuclei can be simulated directly with computers using a technique known as -`Monte Carlo`_ simulation. If enough particles are simulated this way, the -average behavior can be determined to within arbitrarily small statistical -error, a fact guaranteed by the `central limit theorem`_. To be more precise, -the central limit theorem tells us that the variance of the sample mean of some -physical parameter being estimated with Monte Carlo will be inversely -proportional to the number of realizations, i.e. the number of particles we -simulate: - -.. math:: - - \sigma^2 \propto \frac{1}{N}. - -where :math:`\sigma^2` is the variance of the sample mean and :math:`N` is the -number of realizations. - ------------------------- -Overview of Program Flow ------------------------- - -OpenMC performs a Monte Carlo simulation one particle at a time -- at no point -is more than one particle being tracked on a single program instance. Before any -particles are tracked, the problem must be initialized. This involves the -following steps: - - - Read input files and building data structures for the geometry, materials, - tallies, and other associated variables. - - - Initialize the pseudorandom number generator. - - - Read ACE format cross sections specified in the problem. - - - If using a special energy grid treatment such as a union energy grid or - lethargy bins, that must be initialized as well. - - - In a fixed source problem, source sites are sampled from the specified - source. In an eigenvalue problem, source sites are sampled from some initial - source distribution or from a source file. The source sites consist of - coordinates, a direction, and an energy. - -Once initialization is complete, the actual transport simulation can -proceed. The life of a single particle will proceed as follows: - - 1. The particle's properties are initialized from a source site previously - sampled. - - 2. Based on the particle's coordinates, the current cell in which the particle - resides is determined. - - 3. The energy-dependent cross sections for the material that the particle is - currently in are determined. Note that this includes the total - cross section, which is not pre-calculated. - - 4. The distance to the nearest boundary of the particle's cell is determined - based on the bounding surfaces to the cell. - - 5. The distance to the next collision is sampled. If the total material - cross section is :math:`\Sigma_t`, this can be shown to be - - .. math:: - - d = -\frac{\ln \xi}{\Sigma_t} - - where :math:`\xi` is a `pseudorandom number`_ sampled from a uniform - distribution on :math:`[0,1)`. - - 6. If the distance to the nearest boundary is less than the distance to the next - collision, the particle is moved forward to this boundary. Then, the process - is repeated from step 2. If the distance to collision is closer than the - distance to the nearest boundary, then the particle will undergo a collision. - - 7. The material at the collision site may consist of multiple nuclides. First, - the nuclide with which the collision will happen is sampled based on the - total cross sections. If the total cross section of material :math:`i` is - :math:`\Sigma_{t,i}`, then the probability that any nuclide is sampled is - - .. math:: - - P(i) = \frac{\Sigma_{t,i}}{\Sigma_t}. - - 8. Once the specific nuclide is sampled, the random samples a reaction for - that nuclide based on the microscopic cross sections. If the microscopic - cross section for some reaction :math:`x` is :math:`\sigma_x` and the total - microscopic cross section for the nuclide is :math:`\sigma_t`, then the - probability that reaction :math:`x` will occur is - - .. math:: - - P(x) = \frac{\sigma_x}{\sigma_t}. - - 9. If the sampled reaction is elastic or inelastic scattering, the outgoing - energy and angle is sampled from the appropriate distribution. Reactions - of type :math:`(n,xn)` are treated as scattering and the weight of the - particle is increased by the multiplicity of the reaction. The particle - then continues from step 3. If the reaction is absorption or fission, the - particle dies and if necessary, fission sites are created and stored in the - fission bank. - -After all particles have been simulated, there are a few final tasks that must -be performed before the run is finished. This include the following: - - - With the accumulated sum and sum of squares for each tally, the sample mean - and its variance is calculated. - - - All tallies and other results are written to disk. - - - If requested, a source file is written to disk. - - - All allocatable arrays are deallocated. - -.. _probability distributions: http://en.wikipedia.org/wiki/Probability_distribution -.. _Monte Carlo: http://en.wikipedia.org/wiki/Monte_Carlo_method -.. _central limit theorem: http://en.wikipedia.org/wiki/Central_limit_theorem -.. _pseudorandom number: http://en.wikipedia.org/wiki/Pseudorandom_number_generator diff --git a/_sources/methods/parallelization.txt b/_sources/methods/parallelization.txt deleted file mode 100644 index 63c4a9d21..000000000 --- a/_sources/methods/parallelization.txt +++ /dev/null @@ -1,650 +0,0 @@ -.. _methods_parallel: - -=============== -Parallelization -=============== - -Due to the computationally-intensive nature of Monte Carlo methods, there has -been an ever-present interest in parallelizing such simulations. Even in the -`first paper`_ on the Monte Carlo method, John Metropolis and Stanislaw Ulam -recognized that solving the Boltzmann equation with the Monte Carlo method could -be done in parallel very easily whereas the deterministic counterparts for -solving the Boltzmann equation did not offer such a natural means of -parallelism. With the introduction of `vector computers`_ in the early 1970s, -general-purpose parallel computing became a reality. In 1972, Troubetzkoy et -al. designed a Monte Carlo code to be run on the first vector computer, the -ILLIAC-IV [Troubetzkoy]_. The general principles from that work were later -refined and extended greatly through the `work of Forrest Brown`_ in the -1980s. However, as Brown's work shows, the `single-instruction multiple-data`_ -(SIMD) parallel model inherent to vector processing does not lend itself to the -parallelism on particles in Monte Carlo simulations. Troubetzkoy et -al. recognized this, remarking that "the order and the nature of these physical -events have little, if any, correlation from history to history," and thus -following independent particle histories simultaneously using a SIMD model is -difficult. - -The difficulties with vector processing of Monte Carlo codes led to the adoption -of the `single program multiple data`_ (SPMD) technique for parallelization. In -this model, each different process tracks a particle independently of other -processes, and between fission source generations the processes communicate data -through a `message-passing interface`_. This means of parallelism was enabled by -the introduction of message-passing standards in the late 1980s and early 1990s -such as PVM_ and MPI_. The SPMD model proved much easier to use in practice and -took advantage of the inherent parallelism on particles rather than -instruction-level parallelism. As a result, it has since become ubiquitous for -Monte Carlo simulations of transport phenomena. - -Thanks to the particle-level parallelism using SPMD techniques, extremely high -parallel efficiencies could be achieved in Monte Carlo codes. Until the last -decade, even the most demanding problems did not require transmitting large -amounts of data between processors, and thus the total amount of time spent on -communication was not significant compared to the amount of time spent on -computation. However, today's computing power has created a demand for -increasingly large and complex problems, requiring a greater number of particles -to obtain decent statistics (and convergence in the case of criticality -calculations). This results in a correspondingly higher amount of communication, -potentially degrading the parallel efficiency. Thus, while Monte Carlo -simulations may seem `embarrassingly parallel`_, obtaining good parallel scaling -with large numbers of processors can be quite difficult to achieve in practice. - -.. _fission-bank-algorithms: - ------------------------ -Fission Bank Algorithms ------------------------ - -Master-Slave Algorithm ----------------------- - -Monte Carlo particle transport codes commonly implement a SPMD model by having -one master process that controls the scheduling of work and the remaining -processes wait to receive work from the master, process the work, and then send -their results to the master at the end of the simulation (or a source iteration -in the case of an eigenvalue calculation). This idea is illustrated in -:ref:`figure-master-slave`. - -.. _figure-master-slave: - -.. figure:: ../_images/master-slave.png - :align: center - :figclass: align-center - - Communication pattern in master-slave algorithm. - -Eigenvalue calculations are slightly more difficult to parallelize than fixed -source calculations since it is necessary to converge on the fission source -distribution and eigenvalue before tallying. In the -:ref:`method-successive-generations`, to ensure that the results are -reproducible, one must guarantee that the process by which fission sites are -randomly sampled does not depend on the number of processors. What is typically -done is the following: - - 1. Each compute node sends_ its fission bank sites to a master process; - - 2. The master process sorts or orders the fission sites based on a unique - identifier; - - 3. The master process samples :math:`N` fission sites from the ordered array - of :math:`M` sites; and - - 4. The master process broadcasts_ all the fission sites to the compute - nodes. - -The first and last steps of this process are the major sources of communication -overhead between cycles. Since the master process must receive :math:`M` fission -sites from the compute nodes, the first step is necessarily serial. This step -can be completed in :math:`O(M)` time. The broadcast step can benefit from -parallelization through a tree-based algorithm. Despite this, the communication -overhead is still considerable. - -To see why this is the case, it is instructive to look at a hypothetical -example. Suppose that a calculation is run with :math:`N = 10,000,000` neutrons -across 64 compute nodes. On average, :math:`M = 10,000,000` fission sites will -be produced. If the data for each fission site consists of a spatial location -(three 8 byte real numbers) and a unique identifier (one 4 byte integer), the -memory required per site is 28 bytes. To broadcast 10,000,000 source sites to 64 -nodes will thus require transferring 17.92 GB of data. Since each compute node -does not need to keep every source site in memory, one could modify the -algorithm from a broadcast to a scatter_. However, for practical reasons -(e.g. work self-scheduling), this is normally not done in production Monte Carlo -codes. - -.. _nearest-neighbors-algorithm: - -Nearest Neighbors Algorithm ---------------------------- - -To reduce the amount of communication required in a fission bank synchronization -algorithm, it is desirable to move away from the typical master-slave algorithm -to an algorithm whereby the compute nodes communicate with one another only as -needed. This concept is illustrated in :ref:`figure-nearest-neighbor`. - -.. _figure-nearest-neighbor: - -.. figure:: ../_images/nearest-neighbor.png - :align: center - :figclass: align-center - - Communication pattern in nearest neighbor algorithm. - -Since the source sites for each cycle are sampled from the fission sites banked -from the previous cycle, it is a common occurrence for a fission site to be -banked on one compute node and sent back to the master only to get sent back to -the same compute node as a source site. As a result, much of the communication -inherent in the algorithm described previously is entirely unnecessary. By -keeping the fission sites local, having each compute node sample fission sites, -and sending sites between nodes only as needed, one can cut down on most of the -communication. One algorithm to achieve this is as follows: - - 1. An exclusive scan is performed on the number of sites banked, and the - total number of fission bank sites is broadcasted to all compute nodes. By - picturing the fission bank as one large array distributed across multiple - nodes, one can see that this step enables each compute node to determine the - starting index of fission bank sites in this array. Let us call the starting - and ending indices on the :math:`i`-th node :math:`a_i` and :math:`b_i`, - respectively; - - 2. Each compute node samples sites at random from the fission bank using the - same starting seed. A separate array on each compute node is created that - consists of sites that were sampled local to that node, i.e. if the index of - the sampled site is between :math:`a_i` and :math:`b_i`, it is set aside; - - 3. If any node sampled more than :math:`N/p` fission sites where :math:`p` - is the number of compute nodes, the extra sites are put in a separate array - and sent to all other compute nodes. This can be done efficiently using the - allgather_ collective operation; - - 4. The extra sites are divided among those compute nodes that sampled fewer - than :math:`N/p` fission sites. - -However, even this algorithm exhibits more communication than necessary since -the allgather will send fission bank sites to nodes that don't necessarily -need any extra sites. - -One alternative is to replace the allgather with a series of sends. If -:math:`a_i` is less than :math:`iN/p`, then send :math:`iN/p - a_i` sites to the -left adjacent node. Similarly, if :math:`a_i` is greater than :math:`iN/p`, then -receive :math:`a_i - iN/p` from the left adjacent node. This idea is applied to -the fission bank sites at the end of each node's array as well. If :math:`b_i` -is less than :math:`(i+1)N/p`, then receive :math:`(i+1)N/p - b_i` sites from -the right adjacent node. If :math:`b_i` is greater than :math:`(i+1)N/p`, then -send :math:`b_i - (i+1)N/p` sites to the right adjacent node. Thus, each compute -node sends/receives only two messages under normal circumstances. - -The following example illustrates how this algorithm works. Let us suppose we -are simulating :math:`N = 1000` neutrons across four compute nodes. For this -example, it is instructive to look at the state of the fission bank and source -bank at several points in the algorithm: - - 1. The beginning of a cycle where each node has :math:`N/p` source sites; - - 2. The end of a cycle where each node has accumulated fission sites; - - 3. After sampling, where each node has some amount of source sites usually - not equal to :math:`N/p`; - - 4. After redistribution, each node again has :math:`N/p` source sites for - the next cycle; - -At the end of each cycle, each compute node needs 250 fission bank sites to -continue on the next cycle. Let us suppose that :math:`p_0` produces 270 fission -banks sites, :math:`p_1` produces 230, :math:`p_2` produces 290, and :math:`p_3` -produces 250. After each node samples from its fission bank sites, let's assume -that :math:`p_0` has 260 source sites, :math:`p_1` has 215, :math:`p_2` has 280, -and :math:`p_3` has 245. Note that the total number of sampled sites is 1000 as -needed. For each node to have the same number of source sites, :math:`p_0` needs -to send its right-most 10 sites to :math:`p_1`, and :math:`p_2` needs to send -its left-most 25 sites to :math:`p_1` and its right-most 5 sites to -:math:`p_3`. A schematic of this example is shown in -:ref:`figure-neighbor-example`. The data local to each node is given a different -hatching, and the cross-hatched regions represent source sites that are -communicated between adjacent nodes. - -.. _figure-neighbor-example: - -.. figure:: ../_images/nearest-neighbor-example.png - :align: center - :figclass: align-center - - Example of nearest neighbor algorithm. - -.. _master-slave-cost: - -Cost of Master-Slave Algorithm ------------------------------- - -While the prior considerations may make it readily apparent that the novel -algorithm should outperform the traditional algorithm, it is instructive to look -at the total communication cost of the novel algorithm relative to the -traditional algorithm. This is especially so because the novel algorithm does -not have a constant communication cost due to stochastic fluctuations. Let us -begin by looking at the cost of communication in the traditional algorithm - -As discussed earlier, the traditional algorithm is composed of a series of sends -and typically a broadcast. To estimate the communication cost of the algorithm, -we can apply a simple model that captures the essential features. In this model, -we assume that the time that it takes to send a message between two nodes is -given by :math:`\alpha + (sN)\beta`, where :math:`\alpha` is the time it takes -to initiate the communication (commonly called the latency_), :math:`\beta` is -the transfer time per unit of data (commonly called the bandwidth_), :math:`N` -is the number of fission sites, and :math:`s` is the size in bytes of each -fission site. - -The first step of the traditional algorithm is to send :math:`p` messages to the -master node, each of size :math:`sN/p`. Thus, the total time to send these -messages is - -.. math:: - :label: t-send - - t_{\text{send}} = p\alpha + sN\beta. - -Generally, the best parallel performance is achieved in a weak scaling scheme -where the total number of histories is proportional to the number of -processors. However, we see that when :math:`N` is proportional to :math:`p`, -the time to send these messages increases proportionally with :math:`p`. - -Estimating the time of the broadcast is complicated by the fact that different -MPI implementations may use different algorithms to perform collective -communications. Worse yet, a single implementation may use a different algorithm -depending on how many nodes are communicating and the size of the message. Using -multiple algorithms allows one to minimize latency for small messages and -minimize bandwidth for long messages. - -We will focus here on the implementation of broadcast in the MPICH2_ -implementation. For short messages, MPICH2 uses a `binomial tree`_ algorithm. In -this algorithm, the root process sends the data to one node in the first step, -and then in the subsequent, both the root and the other node can send the data -to other nodes. Thus, it takes a total of :math:`\lceil \log_2 p \rceil` steps -to complete the communication. The time to complete the communication is - -.. math:: - :label: t-short - - t_{\text{short}} = \lceil \log_2 p \rceil \left ( \alpha + sN\beta \right ). - -This algorithm works well for short messages since the latency term scales -logarithmically with the number of nodes. However, for long messages, an -algorithm that has lower bandwidth has been proposed by Barnett_ and implemented -in MPICH2. Rather than using a binomial tree, the broadcast is divided into a -scatter and an allgather. The time to complete the scatter is :math:` \log_2 p -\: \alpha + \frac{p-1}{p} N\beta` using a binomial tree algorithm. The allgather -is performed using a ring algorithm that completes in :math:`p-1) \alpha + -\frac{p-1}{p} N\beta`. Thus, together the time to complete the broadcast is - -.. math:: - :label: t-broadcast - - t_{\text{long}} = \left ( \log_2 p + p - 1 \right ) \alpha + 2 \frac{p-1}{p} - sN\beta. - -The fission bank data will generally exceed the threshold for switching from -short to long messages (typically 8 kilobytes), and thus we will use the -equation for long messages. Adding equations :eq:`t-send` and :eq:`t-broadcast`, -the total cost of the series of sends and the broadcast is - -.. math:: - :label: t-old - - t_{\text{old}} = \left ( \log_2 p + 2p - 1 \right ) \alpha + \frac{3p-2}{p} - sN\beta. - -Cost of Nearest Neighbor Algorithm ----------------------------------- - -With the communication cost of the traditional fission bank algorithm -quantified, we now proceed to discuss the communicatin cost of the proposed -algorithm. Comparing the cost of communication of this algorithm with the -traditional algorithm is not trivial due to fact that the cost will be a -function of how many fission sites are sampled on each node. If each node -samples exactly :math:`N/p` sites, there will not be communication between nodes -at all. However, if any one node samples more or less than :math:`N/p` sites, -the deviation will result in communication between logically adjacent nodes. To -determine the expected deviation, one can analyze the process based on the -fundamentals of the Monte Carlo process. - -The steady-state neutron transport equation for a multiplying medium can be -written in the form of an eigenvalue problem, - -.. math:: - :label: NTE - - S(\mathbf{r})= \frac{1}{k} \int F(\mathbf{r}' \rightarrow - \mathbf{r})S(\mathbf{r}')\: d\mathbf{r}, - -where :math:`\mathbf{r}` is the spatial coordinates of the neutron, -:math:`S(\mathbf{r})` is the source distribution defined as the expected number -of neutrons born from fission per unit phase-space volume at :math:`\mathbf{r}`, -:math:`F( \mathbf{r}' \rightarrow \mathbf{r})` is the expected number of -neutrons born from fission per unit phase space volume at :math:`\mathbf{r}` -caused by a neutron at :math:`\mathbf{r}`, and :math:`k` is the eigenvalue. The -fundamental eigenvalue of equation :eq:`NTE` is known as :math:`k_{eff}`, but -for simplicity we will simply refer to it as :math:`k`. - -In a Monte Carlo criticality simulation, the power iteration method is applied -iteratively to obtain stochastic realizations of the source distribution and -estimates of the :math:`k`-eigenvalue. Let us define :math:`\hat{S}^{(m)}` to be -the realization of the source distribution at cycle :math:`m` and -:math:`\hat{\epsilon}^{(m)}` be the noise arising from the stochastic nature of -the tracking process. We can write the stochastic realization in terms of the -fundamental source distribution and the noise component as (see `Brissenden and -Garlick`_): - -.. math:: - :label: source - - \hat{S}^{(m)}(\mathbf{r})= N S(\mathbf{r}) + \sqrt{N} - \hat{\epsilon}^{(m)}(\mathbf{r}), - -where :math:`N` is the number of particle histories per cycle. Without loss of -generality, we shall drop the superscript notation indicating the cycle as it is -understood that the stochastic realization is at a particular cycle. The -expected value of the stochastic source distribution is simply - -.. math:: - :label: expected-value-source - - E \left[ \hat{S}(\mathbf{r})\right] = N S (\mathbf{r}) - -since :math:`E \left[ \hat{\epsilon}(\mathbf{r})\right] = 0`. The noise in the -source distribution is due only to :math:`\hat{\epsilon}(\mathbf{r})` and thus -the variance of the source distribution will be - -.. math:: - :label: var-source - - \text{Var} \left[ \hat{S}(\mathbf{r})\right] = N \text{Var} \left[ - \hat{\epsilon}(\mathbf{r}) \right]. - -Lastly, the stochastic and true eigenvalues can be written as integrals over all -phase space of the stochastic and true source distributions, respectively, as - -.. math:: - :label: k-to-source - - \hat{k} = \frac{1}{N} \int \hat{S}(\mathbf{r}) \: d\mathbf{r} \quad - \text{and} \quad k = \int S(\mathbf{r}) \: d\mathbf{r}, - -noting that :math:`S(\mathbf{r})` is :math:`O(1)`. One should note that the -expected value :math:`k` calculated by Monte Carlo power iteration (i.e. the -method of successive generations) will be biased from the true fundamental -eigenvalue of equation :eq:`NTE` by :math:`O(1/N)` (see `Brissenden and -Garlick`_), but we will assume henceforth that the number of particle histories -per cycle is sufficiently large to neglect this bias. - -With this formalism, we now have a framework within which we can determine the -properties of the distribution of expected number of fission sites. The explicit -form of the source distribution can be written as - -.. math:: - :label: source-explicit - - \hat{S}(\mathbf{r}) = \sum_{i=1}^{M} w_i \delta( \mathbf{r} - \mathbf{r}_i ) - -where :math:`\mathbf{r}_i` is the spatial location of the :math:`i`-th fission -site, :math:`w_i` is the statistical weight of the fission site at -:math:`\mathbf{r}_i`, and :math:`M` is the total number of fission sites. It is -clear that the total weight of the fission sites is simply the integral of the -source distribution. Integrating equation :eq:`source` over all space, we obtain - -.. math:: - :label: source-integrated - - \int \hat{S}(\mathbf{r}) \: d\mathbf{r} = N \int S(\mathbf{r}) \: - d\mathbf{r} + \sqrt{N} \int \hat{\epsilon}(\mathbf{r}) \: d\mathbf{r} . - -Substituting the expressions for the stochastic and true eigenvalues from -equation :eq:`k-to-source`, we can relate the stochastic eigenvalue to the -integral of the noise component of the source distribution as - -.. math:: - :label: noise-integeral - - N\hat{k} = Nk + \sqrt{N} \int \hat{\epsilon}(\mathbf{r}) \: d\mathbf{r}. - -Since the expected value of :math:`\hat{\epsilon}` is zero, the expected value -of its integral will also be zero. We thus see that the variance of the integral -of the source distribution, i.e. the variance of the total weight of fission -sites produced, is directly proportional to the variance of the integral of the -noise component. Let us call this term :math:`\sigma^2` for simplicity: - -.. math:: - :label: variance-sigma2 - - \text{Var} \left[ \int \hat{S}(\mathbf{r}) \right ] = N \sigma^2. - -The actual value of :math:`\sigma^2` will depend on the physical nature of the -problem, whether variance reduction techniques are employed, etc. For instance, -one could surmise that for a highly scattering problem, :math:`\sigma^2` would -be smaller than for a highly absorbing problem since more collisions will lead -to a more precise estimate of the source distribution. Similarly, using implicit -capture should in theory reduce the value of :math:`\sigma^2`. - -Let us now consider the case where the :math:`N` total histories are divided up -evenly across :math:`p` compute nodes. Since each node simulates :math:`N/p` -histories, we can write the source distribution as - -.. math:: - :label: source-node - - \hat{S}_i(\mathbf{r})= \frac{N}{p} S(\mathbf{r}) + \sqrt{\frac{N}{p}} - \hat{\epsilon}_i(\mathbf{r}) \quad \text{for} \quad i = 1, \dots, p - -Integrating over all space and simplifying, we can obtain an expression for the -eigenvalue on the :math:`i`-th node: - -.. math:: - :label: k-i-hat - - \hat{k}_i = k + \sqrt{\frac{p}{N}} \int \hat{\epsilon}_i(\mathbf{r}) \: - d\mathbf{r}. - -It is easy to show from this expression that the stochastic realization of the -global eigenvalue is merely the average of these local eigenvalues: - -.. math:: - :label: average-k-as-sum - - \hat{k} = \frac{1}{p} \sum_{i=1}^p \hat{k}_i. - -As was mentioned earlier, at the end of each cycle one must sample :math:`N` -sites from the :math:`M` sites that were created. Thus, the source for the next -cycle can be seen as the fission source from the current cycle divided by the -stochastic realization of the eigenvalue since it is clear from equation -:eq:`k-to-source` that :math:`\hat{k} = M/N`. Similarly, the number of sites -sampled on each compute node that will be used for the next cycle is - -.. math:: - :label: sites-per-node - - M_i = \frac{1}{\hat{k}} \int \hat{S}_i(\mathbf{r}) \: d\mathbf{r} = - \frac{N}{p} \frac{\hat{k}_i}{\hat{k}}. - -While we know conceptually that each compute node will under normal -circumstances send two messages, many of these messages will overlap. Rather -than trying to determine the actual communication cost, we will instead attempt -to determine the maximum amount of data being communicated from one node to -another. At any given cycle, the number of fission sites that the :math:`j`-th -compute node will send or receive (:math:`\Lambda_j`) is - -.. math:: - :label: Lambda - - \Lambda_j = \left | \sum_{i=1}^j M_i - \frac{jN}{p} \right |. - -Noting that :math:`jN/p` is the expected value of the summation, we can write -the expected value of :math:`\Lambda_j` as the mean absolute deviation of the -summation: - -.. math:: - :label: mean-dev-lambda - - E \left [ \Lambda_j \right ] = E \left [ \left | \sum_{i=1}^j M_i - - \frac{jN}{p} \right | \right ] = \text{MD} \left [ \sum_{i=1}^j M_i \right ] - -where :math:`\text{MD}` indicates the mean absolute deviation of a random -variable. The mean absolute deviation is an alternative measure of variability. - -In order to ascertain any information about the mean deviation of :math:`M_i`, -we need to know the nature of its distribution. Thus far, we have said nothing -of the distributions of the random variables in question. The total number of -fission sites resulting from the tracking of :math:`N` neutrons can be shown to -be normally distributed via the :ref:`central-limit-theorem` (provided that -:math:`N` is sufficiently large) since the fission sites resulting from each -neutron are "sampled" from independent, identically-distributed random -variables. Thus, :math:`\hat{k}` and :math:`\int \hat{S} (\mathbf{r}) \: -d\mathbf{r}` will be normally distributed as will the individual estimates of -these on each compute node. - -Next, we need to know what the distribution of :math:`M_i` in equation -:eq:`sites-per-node` is or, equivalently, how :math:`\hat{k}_i / \hat{k}` is -distributed. The distribution of a ratio of random variables is not easy to -calculate analytically, and it is not guaranteed that the ratio distribution is -normal if the numerator and denominator are normally distributed. For example, -if :math:`X` is a standard normal distribution and :math:`Y` is also standard -normal distribution, then the ratio :math:`X/Y` has the standard `Cauchy -distribution`_. The reader should be reminded that the Cauchy distribution has -no defined mean or variance. That being said, Geary_ has shown that, for the -case of two normal distributions, if the denominator is unlikely to assume -values less than zero, then the ratio distribution is indeed approximately -normal. In our case, :math:`\hat{k}` absolutely cannot assume a value less than -zero, so we can be reasonably assured that the distribution of :math:`M_i` will -be normal. - -For a normal distribution with mean :math:`\mu` and distribution function -:math:`f(x)`, it can be shown that - -.. math:: - :label: mean-dev-to-stdev - - \int_{-\infty}^{\infty} f(x) \left | x - \mu \right | \: dx = - \sqrt{\frac{2}{\pi} \int_{-\infty}^{\infty} f(x) \left ( x - \mu \right )^2 - \: dx} - -and thus the mean absolute deviation is :math:`\sqrt{2/\pi}` times the standard -deviation. Therefore, to evaluate the mean absolute deviation of :math:`M_i`, we -need to first determine its variance. Substituting equation -:eq:`average-k-as-sum` into equation :eq:`sites-per-node`, we can rewrite -:math:`M_i` solely in terms of :math:`\hat{k}_1, \dots, \hat{k}_p`: - -.. math:: - :label: M-i - - M_i = \frac{N \hat{k}_i}{\sum\limits_{j=1}^p \hat{k}_j}. - -Since we know the variance of :math:`\hat{k}_i`, we can use the error -propagation law to determine the variance of :math:`M_i`: - -.. math:: - :label: M-variance - - \text{Var} \left [ M_i \right ] = \sum_{j=1}^p \left ( \frac{\partial - M_i}{\partial \hat{k}_j} \right )^2 \text{Var} \left [ \hat{k}_j \right ] + - \sum\limits_{j \neq m} \sum\limits_{m=1}^p \left ( \frac{\partial - M_i}{\partial \hat{k}_j} \right ) \left ( \frac{\partial M_i}{\partial - \hat{k}_m} \right ) \text{Cov} \left [ \hat{k}_j, \hat{k}_m \right ] - -where the partial derivatives are evaluated at :math:`\hat{k}_j = k`. Since -:math:`\hat{k}_j` and :math:`\hat{k}_m` are independent if :math:`j \neq m`, -their covariance is zero and thus the second term cancels out. Evaluating the -partial derivatives, we obtain - -.. math:: - :label: M-variance-2 - - \text{Var} \left [ M_i \right ] = \left ( \frac{N(p-1)}{kp^2} \right )^2 - \frac{p\sigma^2}{N} + \sum_{j \neq i} \left ( \frac{-N}{kp^2} \right )^2 - \frac{p\sigma^2}{N} = \frac{N(p-1)}{k^2p^2} \sigma^2. - -Through a similar analysis, one can show that the variance of -:math:`\sum_{i=1}^j M_i` is - -.. math:: - :label: sum-M-variance - - \text{Var} \left [ \sum_{i=1}^j M_i \right ] = \frac{Nj(p-j)}{k^2p^2} - \sigma^2 - -Thus, the expected amount of communication on node :math:`j`, i.e. the mean -absolute deviation of :math:`\sum_{i=1}^j M_i` is proportional to - -.. math:: - :label: communication-cost - - E \left [ \Lambda_j \right ] = \sqrt{\frac{2Nj(p-j)\sigma^2}{\pi k^2p^2}}. - -This formula has all the properties that one would expect based on intuition: - - 1. As the number of histories increases, the communication cost on each node - increases as well; - - 2. If :math:`p=1`, i.e. if the problem is run on only one compute node, the - variance will be zero. This reflects the fact that exactly :math:`N` sites - will be sampled if there is only one node. - - 3. For :math:`j=p`, the variance will be zero. Again, this says that when - you sum the number of sites from each node, you will get exactly :math:`N` - sites. - -We can determine the node that has the highest communication cost by -differentiating equation :eq:`communication-cost` with respect to :math:`j`, -setting it equal to zero, and solving for :math:`j`. Doing so yields -:math:`j_{\text{max}} = p/2`. Interestingly, substituting :math:`j = p/2` in -equation :eq:`communication-cost` shows us that the maximum communication cost -is actually independent of the number of nodes: - -.. math:: - :label: maximum-communication - - E \left [ \Lambda_{j_{\text{max}}} \right ] = \sqrt{ \frac{N\sigma^2}{2\pi - k^2}}. - -.. only:: html - - .. rubric:: References - -.. [Troubetzkoy] E. Troubetzkoy, H. Steinberg, and M. Kalos, "Monte Carlo - Radiation Penetration Calculations on a Parallel Computer," - *Trans. Am. Nucl. Soc.*, **17**, 260 (1973). - -.. _first paper: http://www.jstor.org/stable/2280232 - -.. _work of Forrest Brown: http://hdl.handle.net/2027.42/24996 - -.. _Brissenden and Garlick: http://dx.doi.org/10.1016/0306-4549(86)90095-2 - -.. _MPICH2: http://www.mcs.anl.gov/mpi/mpich - -.. _binomial tree: http://www.cs.auckland.ac.nz/~jmor159/PLDS210/trees.html - -.. _Geary: http://www.jstor.org/stable/10.2307/2342070 - -.. _Barnett: http://citeseerx.ist.psu.edu/viewdoc/summary?doi=10.1.1.51.7772 - -.. _single-instruction multiple-data: http://en.wikipedia.org/wiki/SIMD - -.. _vector computers: http://en.wikipedia.org/wiki/Vector_processor - -.. _single program multiple data: http://en.wikipedia.org/wiki/SPMD - -.. _message-passing interface: http://en.wikipedia.org/wiki/Message_Passing_Interface - -.. _PVM: http://www.csm.ornl.gov/pvm/pvm_home.html - -.. _MPI: http://www.mcs.anl.gov/research/projects/mpi/ - -.. _embarrassingly parallel: http://en.wikipedia.org/wiki/Embarrassingly_parallel - -.. _sends: http://www.mcs.anl.gov/research/projects/mpi/www/www3/MPI_Send.html - -.. _broadcasts: http://www.mcs.anl.gov/research/projects/mpi/www/www3/MPI_Bcast.html - -.. _scatter: http://www.mcs.anl.gov/research/projects/mpi/www/www3/MPI_Scatter.html - -.. _allgather: http://www.mcs.anl.gov/research/projects/mpi/www/www3/MPI_Allgather.html - -.. _Cauchy distribution: http://en.wikipedia.org/wiki/Cauchy_distribution - -.. _latency: http://en.wikipedia.org/wiki/Latency_(engineering)#Packet-switched_networks - -.. _bandwidth: http://en.wikipedia.org/wiki/Bandwidth_(computing) diff --git a/_sources/methods/physics.txt b/_sources/methods/physics.txt deleted file mode 100644 index e25057488..000000000 --- a/_sources/methods/physics.txt +++ /dev/null @@ -1,1639 +0,0 @@ -.. _methods_physics: - -======= -Physics -======= - ------------------------------------ -Sampling Distance to Next Collision ------------------------------------ - -As a particle travels through a homogeneous material, the probability -distribution function for the distance to its next collision :math:`\ell` is - -.. math:: - :label: distance-pdf - - p(\ell) d\ell = \Sigma_t e^{-\Sigma_t \ell} d\ell - -where :math:`\Sigma_t` is the total macroscopic cross section of the -material. Equation :eq:`distance-pdf` tells us that the further the distance is -to the next collision, the less likely the particle will travel that -distance. In order to sample the probability distribution function, we first -need to convert it to a cumulative distribution function - -.. math:: - :label: distance-cdf - - \int_0^{\ell} d\ell' p(\ell') = \int_0^{\ell} d\ell' \Sigma_t e^{-\Sigma_t - \ell'} = 1 - e^{-\Sigma_t \ell}. - -By setting the cumulative distribution function equal to :math:`\xi`, a random -number on the unit interval, and solving for the distance :math:`\ell`, we -obtain a formula for sampling the distance to next collision: - -.. math:: - :label: sample-distance-1 - - \ell = -\frac{\ln (1 - \xi)}{\Sigma_t}. - -Since :math:`\xi` is uniformly distributed on :math:`[0,1)`, this implies that -:math:`1 - \xi` is also uniformly distributed on :math:`[0,1)` as well. Thus, -the formula usually used to calculate the distance to next collision is - -.. math:: - :label: sample-distance-2 - - \ell = -\frac{\ln \xi}{\Sigma_t} - ----------------------------------------------------- -:math:`(n,\gamma)` and Other Disappearance Reactions ----------------------------------------------------- - -All absorption reactions other than fission do not produce any secondary -neutrons. As a result, these are the easiest type of reactions to handle. When a -collision occurs, the first step is to sample a nuclide within a material. Once -the nuclide has been sampled, then a specific reaction for that nuclide is -sampled. Since the total absorption cross section is pre-calculated at the -beginning of a simulation, the first step in sampling a reaction is to determine -whether a "disappearance" reaction occurs where no secondary neutrons are -produced. This is done by sampling a random number :math:`\xi` on the interval -:math:`[0,1)` and checking whether - -.. math:: - :label: disappearance - - \xi \sigma_t (E) < \sigma_a (E) - \sigma_f (E) - -where :math:`\sigma_t` is the total cross section, :math:`\sigma_a` is the -absorption cross section (this includes fission), and :math:`\sigma_f` is the -total fission cross section. If this condition is met, then the neutron is -killed and we proceed to simulate the next neutron from the source bank. - -No secondary particles from disappearance reactions such as photons or -alpha-particles are produced or tracked. To truly capture the affects of gamma -heating in a problem, it would be necessary to explicitly track photons -originating from :math:`(n,\gamma)` and other reactions. - ------------------- -Elastic Scattering ------------------- - -Elastic scattering refers to the process by which a neutron scatters off a -nucleus and does not leave it in an excited. It is referred to as "elastic" -because in the center-of-mass system, the neutron does not actually lose -energy. However, in lab coordinates, the neutron does indeed lose -energy. Elastic scattering can be treated exactly in a Monte Carlo code thanks -to its simplicity. - -Let us discuss how OpenMC handles two-body elastic scattering kinematics. The -first step is to determine whether the target nucleus has any associated -motion. Above a certain energy threshold (400 kT by default), all scattering is -assumed to take place with the target at rest. Below this threshold though, we -must account for the thermal motion of the target nucleus. Methods to sample the -velocity of the target nucleus are described later in section -:ref:`freegas`. For the time being, let us assume that we have sampled the -target velocity :math:`\mathbf{v}_t`. The velocity of the center-of-mass system -is calculated as - -.. math:: - :label: velocity-com - - \mathbf{v}_{cm} = \frac{\mathbf{v}_n + A \mathbf{v}_t}{A + 1} - -where :math:`\mathbf{v}_n` is the velocity of the neutron and :math:`A` is the -atomic mass of the target nucleus measured in neutron masses (commonly referred -to as the *atomic weight ratio*). With the velocity of the center-of-mass -calculated, we can then determine the neutron's velocity in the center-of-mass -system: - -.. math:: - :label: velocity-neutron-com - - \mathbf{V}_n = \mathbf{v}_n - \mathbf{v}_{cm} - -where we have used uppercase :math:`\mathbf{V}` to denote the center-of-mass -system. The direction of the neutron in the center-of-mass system is - -.. math:: - :label: angle-neutron-com - - \mathbf{\Omega}_n = \frac{\mathbf{V}_n}{|| \mathbf{V}_n ||}. - -At low energies, elastic scattering will be isotropic in the center-of-mass -system, but for higher energies, there may be p-wave and higher order scattering -that leads to anisotropic scattering. Thus, in general, we need to sample a -cosine of the scattering angle which we will refer to as :math:`\mu`. For -elastic scattering, the secondary angle distribution is always given in the -center-of-mass system and is sampled according to the procedure outlined in -:ref:`sample-angle`. After the cosine of the angle of scattering has been -sampled, we need to determine the neutron's new direction -:math:`\mathbf{\Omega}'_n` in the center-of-mass system. This is done with the -procedure in :ref:`transform-coordinates`. The new direction is multiplied by -the speed of the neutron in the center-of-mass system to obtain the new velocity -vector in the center-of-mass: - -.. math:: - :label: velocity-neutron-com-2 - - \mathbf{V}'_n = || \mathbf{V}_n || \mathbf{\Omega}'_n. - -Finally, we transform the velocity in the center-of-mass system back to lab -coordinates: - -.. math:: - :label: velocity-neutron-lab - - \mathbf{v}'_n = \mathbf{V}'_n + \mathbf{v}_{cm} - -In OpenMC, the angle and energy of the neutron are stored rather than the -velocity vector itself, so the post-collision angle and energy can be inferred -from the post-collision velocity of the neutron in the lab system. - -For tallies that require the scattering cosine, it is important to store the -scattering cosine in the lab system. If we know the scattering cosine in the -center-of-mass, the scattering cosine in the lab system can be calculated as - -.. math:: - :label: cosine-lab - - \mu_{lab} = \frac{1 + A\mu}{\sqrt{A^2 + 2A\mu + 1}}. - -However, equation :eq:`cosine-lab` is only valid if the target was at rest. When -the target nucleus does have thermal motion, the cosine of the scattering angle -can be determined by simply taking the dot product of the neutron's initial and -final direction in the lab system. - -.. _inelastic-scatter: - --------------------- -Inelastic Scattering --------------------- - -The major algorithms for inelastic scattering were described in previous -sections. First, a scattering cosine is sampled using the algorithms in -:ref:`sample-angle`. Then an outgoing energy is sampled using the algorithms in -:ref:`sample-energy`. If the outgoing energy and scattering cosine were given in -the center-of-mass system, they are transformed to laboratory coordinates using -the algorithm described in :ref:`transform-coordinates`. Finally, the direction -of the particle is changed also using the procedure in -:ref:`transform-coordinates`. - -Although inelastic scattering leaves the target nucleus in an excited state, no -secondary photons from nuclear de-excitation are tracked in OpenMC. - ------------------------- -:math:`(n,xn)` Reactions ------------------------- - -These types of reactions are just treated as inelastic scattering and as such -are subject to the same procedure as described in :ref:`inelastic-scatter`. For -reactions with integral multiplicity, e.g., :math:`(n,2n)`, an appropriate -number of secondary neutrons are created. For reactions that have a multiplicity -given as a function of the incoming neutron energy (which occasionally occurs -for MT=5), the weight of the outgoing neutron is multiplied by the multiplcity. - -.. _fission: - -------- -Fission -------- - -While fission is normally considered an absorption reaction, as far as it -concerns a Monte Carlo simulation it actually bears more similarities to -inelastic scattering since fission results in secondary neutrons in the exit -channel. Other absorption reactions like :math:`(n,\gamma)` or -:math:`(n,\alpha)`, on the contrary, produce no neutrons. There are a few other -idiosyncrasies in treating fission. In an eigenvalue calculation, secondary -neutrons from fission are only "banked" for use in the next generation rather -than being tracked as secondary neutrons from elastic and inelastic scattering -would be. On top of this, fission is sometimes broken into first-chance fission, -second-chance fission, etc. An ACE table either lists the partial fission -reactions with secondary energy distributions for each one, or a total fission -reaction with a single secondary energy distribution. - -When a fission reaction is sampled in OpenMC (either total fission or, if data -exists, first- or second-chance fission), the following algorithm is used to -create and store fission sites for the following generation. First, the average -number of prompt and delayed neutrons must be determined to decide whether the -secondary neutrons will be prompt or delayed. This is important because delayed -neutrons have a markedly different spectrum from prompt neutrons, one that has a -lower average energy of emission. The total number of neutrons emitted -:math:`\nu_t` is given as a function of incident energy in the ACE format. Two -representations exist for :math:`\nu_t`. The first is a polynomial of order -:math:`N` with coefficients :math:`c_0,c_1,\dots,c_N`. If :math:`\nu_t` has this -format, we can evaluate it at incoming energy :math:`E` by using the equation - -.. math:: - :label: nu-polynomial - - \nu_t (E) = \sum_{i = 0}^N c_i E^i. - -The other representation is just a tabulated function with a specified -interpolation law. The number of prompt neutrons released per fission event -:math:`\nu_p` is also given as a function of incident energy and can be -specified in a polynomial or tabular format. The number of delayed neutrons -released per fission event :math:`\nu_d` can only be specified in a tabular -format. In practice, we only need to determine :math:`nu_t` and -:math:`nu_d`. Once these have been determined, we can calculated the delayed -neutron fraction - -.. math:: - :label: beta - - \beta = \frac{\nu_d}{\nu_t}. - -We then need to determine how many total neutrons should be emitted from -fission. If no survival biasing is being used, then the number of neutrons -emitted is - -.. math:: - :label: fission-neutrons - - \nu = \frac{w \nu_t}{k_{eff}} - -where :math:`w` is the statistical weight and :math:`k_{eff}` is the effective -multiplication factor from the previous generation. The number of neutrons -produced is biased in this manner so that the expected number of fission -neutrons produced is the number of source particles that we started with in the -generation. Since :math:`\nu` is not an integer, we use the following procedure -to obtain an integral number of fission neutrons to produce. If :math:`\xi > -\nu - \lfloor \nu \rfloor`, then we produce :math:`\lfloor \nu \rfloor` -neutrons. Otherwise, we produce :math:`\lfloor \nu \rfloor + 1` neutrons. Then, -for each fission site produced, we sample the outgoing angle and energy -according to the algorithms given in :ref:`sample-angle` and -:ref:`sample-energy` respectively. If the neutron is to be born delayed, then -there is an extra step of sampling a delayed neutron precursor group since they -each have an associated secondary energy distribution. - -The sampled outgoing angle and energy of fission neutrons along with the -position of the collision site are stored in an array called the fission -bank. In a subsequent generation, these fission bank sites are used as starting -source sites. - ------------------------------------------ -Secondary Angles and Energy Distributions ------------------------------------------ - -For any reactions with secondary neutrons, it is necessary to sample secondary -angle and energy distributions. This includes elastic and inelastic scattering, -fission, and :math:`(n,xn)` reactions. In some cases, the angle and energy -distributions may be specified separately, and in other cases, they may be -specified as a correlated angle-energy distribution. In the following sections, -we will outline the methods used to sample secondary distributions as well as -how they are used to modify the state of a particle. - -.. _sample-angle: - -Sampling Secondary Angle Distributions --------------------------------------- - -For elastic scattering, it is only necessary to specific a secondary angle -distribution since the outgoing energy can be determined analytically. Other -reactions may also have separate secondary angle and secondary energy -distributions that are uncorrelated. In these cases, the secondary angle -distribution is represented as either - -- An Isotropic angular distribution, -- An equiprobable distribution with 32 bins, or -- A tabular distribution. - -Isotropic Angular Distribution -++++++++++++++++++++++++++++++ - -In the first case, no data needs to be stored on the ACE table, and the cosine -of the scattering angle is simply calculated as - -.. math:: - :label: isotropic-angle - - \mu = 2\xi - 1 - -where :math:`\mu` is the cosine of the scattering angle and :math:`\xi` is a -random number sampled uniformly on :math:`[0,1)`. - -Equiprobable Angle Bin Distribution -+++++++++++++++++++++++++++++++++++ - -For a 32 equiprobable bin distribution, we select a random number :math:`\xi` to -sample a cosine bin :math:`i` such that - -.. math:: - :label: equiprobable-bin - - i = 1 + \lfloor 32\xi \rfloor. - -The same random number can then also be used to interpolate between neighboring -:math:`\mu` values to get the final scattering cosine: - -.. math:: - :label: equiprobable-cosine - - \mu = \mu_i + (32\xi - i) (\mu_{i+1} - \mu_i) - -where :math:`\mu_i` is the :math:`i`-th scattering cosine. - -.. _angle-tabular: - -Tabular Angular Distribution -++++++++++++++++++++++++++++ - -As the `MCNP Manual`_ points out, using an equiprobable bin distribution works -well for high-probability regions of the scattering cosine probability, but for -low-probability regions it is not very accurate. Thus, a more accurate method is -to represent the scattering cosine with a tabular distribution. In this case, we -have a table of cosines and their corresponding values for a probability -distribution function and cumulative distribution function. For each incoming -neutron energy :math:`E_i`, let us call :math:`p_{i,j}` the j-th value in the -probability distribution function and :math:`c_{i,j}` the j-th value in the -cumulative distribution function. We first find the interpolation factor on the -incoming energy grid: - -.. math:: - :label: interpolation-factor - - f = \frac{E - E_i}{E_{i+1} - E_i} - -where :math:`E` is the incoming energy of the particle. Then, statistical -interpolation is performed to choose between using the cosines and distribution -functions corresponding to energy :math:`E_i` and :math:`E_{i+1}`. Let -:math:`\ell` be the chosen table where :math:`\ell = i` if :math:`\xi_1 > f` and -:math:`\ell = i + 1` otherwise, where :math:`\xi_1` is a random number. Another -random number :math:`\xi_2` is used to sample a scattering cosine bin :math:`j` -using the cumulative distribution function: - -.. math:: - :label: sample-cdf - - c_{\ell,j} < \xi_2 < c_{\ell,j+1} - -The final scattering cosine will depend on whether histogram or linear-linear -interpolation is used. In general, we can write the cumulative distribution -function as - -.. math:: - :label: cdf - - c(\mu) = \int_{-1}^\mu p(\mu') d\mu' - -where :math:`c(\mu)` is the cumulative distribution function and :math:`p(\mu)` -is the probability distribution function. Since we know that -:math:`c(\mu_{\ell,j}) = c_{\ell,j}`, this implies that for :math:`\mu > -\mu_{\ell,j}`, - -.. math:: - :label: cdf-2 - - c(\mu) = c_{\ell,j} + \int_{\mu_{\ell,j}}^{\mu} p(\mu') d\mu' - -For histogram interpolation, we have that :math:`p(\mu') = p_{\ell,j}` for -:math:`\mu_{\ell,j} \le \mu' < \mu_{\ell,j+1}`. Thus, after integrating -:eq:`cdf-2` we have that - -.. math:: - :label: cumulative-dist-histogram - - c(\mu) = c_{\ell,j} + (\mu - \mu_{\ell,j}) p_{\ell,j} = \xi_2 - -Solving for the scattering cosine, we obtain the final form for histogram -interpolation: - -.. math:: - :label: cosine-histogram - - \mu = \mu_{\ell,j} + \frac{\xi_2 - c_{\ell,j}}{p_{\ell,j}}. - -For linear-linear interpolation, we represent the function :math:`p(\mu')` as a -first-order polynomial in :math:`\mu'`. If we interpolate between successive -values on the probability distribution function, we know that - -.. math:: - :label: pdf-interpolation - - p(\mu') - p_{\ell,j} = \frac{p_{\ell,j+1} - p_{\ell,j}}{\mu_{\ell,j+1} - - \mu_{\ell,j}} (\mu' - \mu_{\ell,j}) - -Solving for :math:`p(\mu')` in equation :eq:`pdf-interpolation` and inserting it -into equation :eq:`cdf-2`, we obtain - -.. math:: - :label: cdf-linlin - - c(\mu) = c_{\ell,j} + \int_{\mu_{\ell,j}}^{\mu} \left [ \frac{p_{\ell,j+1} - - p_{\ell,j}}{\mu_{\ell,j+1} - \mu_{\ell,j}} (\mu' - \mu_{\ell,j}) + - p_{\ell,j} \right ] d\mu'. - -Let us now make a change of variables using - -.. math:: - :label: introduce-eta - - \eta = \frac{p_{\ell,j+1} - p_{\ell,j}}{\mu_{\ell,j+1} - \mu_{\ell,j}} - (\mu' - \mu_{\ell,j}) + p_{\ell,j}. - -Equation :eq:`cdf-linlin` then becomes - -.. math:: - :label: cdf-linlin-eta - - c(\mu) = c_{\ell,j} + \frac{1}{m} \int_{p_{\ell,j}}^{m(\mu - \mu_{\ell,j}) + - p_{\ell,j}} \eta \, d\eta - -where we have used - -.. math:: - :label: slope - - m = \frac{p_{\ell,j+1} - p_{\ell,j}}{\mu_{\ell,j+1} - \mu_{\ell,j}}. - -Integrating equation :eq:`cdf-linlin-eta`, we have - -.. math:: - :label: cdf-linlin-integrated - - c(\mu) = c_{\ell,j} + \frac{1}{2m} \left ( \left [ m (\mu - \mu_{\ell,j} ) + - p_{\ell,j} \right ]^2 - p_{\ell,j}^2 \right ) = \xi_2 - -Solving for :math:`\mu`, we have the final form for the scattering cosine using -linear-linear interpolation: - -.. math:: - :label: cosine-linlin - - \mu = \mu_{\ell,j} + \frac{1}{m} \left ( \sqrt{p_{\ell,j}^2 + 2 m (\xi_2 - - c_{\ell,j} )} - p_{\ell,j} \right ) - -.. _sample-energy: - -Sampling Secondary Energy and Correlated Angle/Energy Distributions -------------------------------------------------------------------- - -For a reaction with secondary neutrons, it is necessary to determine the -outgoing energy of the neutrons. For any reaction other than elastic scattering, -the outgoing energy must be determined based on tabulated or parameterized -data. The `ENDF-6 Format`_ specifies a variety of ways that the secondary energy -distribution can be represented. ENDF File 5 contains uncorrelated energy -distribution where ENDF File 6 contains correlated energy-angle -distributions. The ACE format specifies its own representations based loosely on -the formats given in ENDF-6. In this section, we will describe how the outgoing -energy of secondary particles is determined based on each ACE law. - -One of the subtleties in the ACE format is the fact that a single reaction can -have multiple secondary energy distributions. This is mainly useful for -reactions with multiple neutrons in the exit channel such as :math:`(n,2n)` or -:math:`(n,3n)`. In these types of reactions, each neutron is emitted -corresponding to a different excitation level of the compound nucleus, and thus -in general the neutrons will originate from different energy distributions. If -multiple energy distributions are present, they are assigned probabilities that -can then be used to randomly select one. - -Once a secondary energy distribution has been sampled, the procedure for -determining the outgoing energy will depend on which ACE law has been specified -for the data. - -.. _ace-law-1: - -ACE Law 1 - Tabular Equiprobable Energy Bins -++++++++++++++++++++++++++++++++++++++++++++ - -In the tabular equiprobable bin representation, an array of equiprobable -outgoing energy bins is given for a number of incident energies. While the -representation itself is simple, the complexity lies in how one interpolates -between incident as well as outgoing energies on such a table. If one performs -simple interpolation between tables for neighboring incident energies, it is -possible that the resulting energies would violate laws governing the -kinematics, i.e. the outgoing energy may be outside the range of available -energy in the reaction. - -To avoid this situation, the accepted practice is to use a process known as -scaled interpolation [Doyas]_. First, we find the tabulated incident energies -which bound the actual incoming energy of the particle, i.e. find :math:`i` such -that :math:`E_i < E < E_{i+1}` and calculate the interpolation factor :math:`f` -via :eq:`interpolation-factor`. Then, we interpolate between the minimum and -maximum energies of the outgoing energy distributions corresponding to -:math:`E_i` and :math:`E_{i+1}`: - -.. math:: - :label: ace-law-1-minmax - - E_{min} = E_{i,1} + f ( E_{i+1,1} - E_i ) \\ - E_{max} = E_{i,M} + f ( E_{i+1,M} - E_M ) - -where :math:`E_{min}` and :math:`E_{max}` are the minimum and maximum outgoing -energies of a scaled distribution, :math:`E_{i,j}` is the j-th outgoing energy -corresponding to the incoming energy :math:`E_i`, and :math:`M` is the number of -outgoing energy bins. Next, statistical interpolation is performed to choose -between using the outgoing energy distributions corresponding to energy -:math:`E_i` and :math:`E_{i+1}`. Let :math:`\ell` be the chosen table where -:math:`\ell = i` if :math:`\xi_1 > f` and :math:`\ell = i + 1` otherwise, and -:math:`\xi_1` is a random number. Now, we randomly sample an equiprobable -outgoing energy bin :math:`j` and interpolate between successive values on the -outgoing energy distribution: - -.. math:: - :label: ace-law-1-intermediate - - \hat{E} = E_{\ell,j} + \xi_2 (E_{\ell,j+1} - E_{\ell,j}) - -where :math:`\xi_2` is a random number sampled uniformly on :math:`[0,1)`. Since -this outgoing energy may violate reaction kinematics, we then scale it to the -minimum and maximum energies we calculated earlier to get the final outgoing -energy: - -.. math:: - :label: ace-law-1-energy - - E' = E_{min} + \frac{\hat{E} - E_{\ell,1}}{E_{\ell,M} - E_{\ell,1}} - (E_{max} - E_{min}) - -ACE Law 3 - Inelastic Level Scattering -++++++++++++++++++++++++++++++++++++++ - -It can be shown (see Foderaro_) that in inelastic level scattering, the outgoing -energy of the neutron :math:`E'` can be related to the Q-value of the reaction -and the incoming energy: - -.. math:: - :label: level-scattering - - E' = \left ( \frac{A}{A+1} \right )^2 \left ( E - \frac{A + 1}{A} Q \right ) - -where :math:`A` is the mass of the target nucleus measured in neutron masses. - -.. _ace-law-4: - -ACE Law 4 - Continuous Tabular Distribution -+++++++++++++++++++++++++++++++++++++++++++ - -This representation is very similar to :ref:`ace-law-1` except that instead of -equiprobable outgoing energy bins, the outgoing energy distribution for each -incoming energy is represented with a probability distribution function. For -each incoming neutron energy :math:`E_i`, let us call :math:`p_{i,j}` the j-th -value in the probability distribution function, :math:`c_{i,j}` the j-th value -in the cumulative distribution function, and :math:`E_{i,j}` the j-th outgoing -energy. - -We proceed first as we did for ACE Law 1, determining the bounding energies of -the particle's incoming energy such that :math:`E_i < E < E_{i+1}` and -calculating an interpolation factor :math:`f` with equation -:eq:`interpolation-factor`. Next, statistical interpolation is performed to -choose between using the outgoing energy distributions corresponding to energy -:math:`E_i` and :math:`E_{i+1}`. Let :math:`\ell` be the chosen table where -:math:`\ell = i` if :math:`\xi_1 > f` and :math:`\ell = i + 1` otherwise, and -:math:`\xi_1` is a random number. Then, we sample an outgoing energy bin -:math:`j` using the cumulative distribution function: - -.. math:: - :label: ace-law-4-sample-cdf - - c_{\ell,j} < \xi_2 < c_{\ell,j+1} - -where :math:`\xi_2` is a random number sampled uniformly on :math:`[0,1)`. At -this point, we need to interpolate between the successive values on the outgoing -energy distribution using either histogram or linear-linear interpolation. The -formulas for these can be derived along the same lines as those found in -:ref:`angle-tabular`. For histogram interpolation, the interpolated outgoing -energy on the :math:`\ell`-th distribution is - -.. math:: - :label: energy-histogram - - \hat{E} = E_{\ell,j} + \frac{\xi_2 - c_{\ell,j}}{p_{\ell,j}}. - -If linear-linear interpolation is to be used, the outgoing energy on the -:math:`\ell`-th distribution is - -.. math:: - :label: energy-linlin - - \hat{E} = E_{\ell,j} + \frac{E_{\ell,j+1} - E_{\ell,j}}{p_{\ell,j+1} - - p_{\ell,j}} \left ( \sqrt{p_{\ell,j}^2 + 2 \frac{p_{\ell,j+1} - - p_{\ell,j}}{E_{\ell,j+1} - E_{\ell,j}} ( \xi_2 - c_{\ell,j} )} - p_{\ell,j} - \right ). - -Since this outgoing energy may violate reaction kinematics, we then scale it to -minimum and maximum energies interpolated between the neighboring outgoing -energy distributions to get the final outgoing energy: - -.. math:: - :label: ace-law-4-energy - - E' = E_{min} + \frac{\hat{E} - E_{\ell,1}}{E_{\ell,M} - E_{\ell,1}} - (E_{max} - E_{min}) - -where :math:`E_{min}` and :math:`E_{max}` are defined the same as in equation -:eq:`ace-law-1-minmax`. - -.. _maxwell: - -ACE Law 7 - Maxwell Fission Spectrum -++++++++++++++++++++++++++++++++++++ - -One representation of the secondary energies for neutrons from fission is the -so-called Maxwell spectrum. A probability distribution for the Maxwell spectrum -can be written in the form - -.. math:: - :label: maxwell-spectrum - - p(E') dE' = c E'^{1/2} e^{-E'/T(E)} dE' - -where :math:`E` is the incoming energy of the neutron and :math:`T` is the -so-called nuclear temperature, which is a function of the incoming energy of the -neutron. The ACE format contains a list of nuclear temperatures versus incoming -energies. The nuclear temperature is interpolated between neighboring incoming -energies using a specified interpolation law. Once the temperature :math:`T` is -determined, we then calculate a candidate outgoing energy based on rule C64 in -the `Monte Carlo Sampler`_: - -.. math:: - :label: maxwell-E-candidate - - E' = -T \left [ \log (\xi_1) + \log (\xi_2) \cos^2 \left ( \frac{\pi - \xi_3}{2} \right ) \right ] - -where :math:`\xi_1, \xi_2, \xi_3` are random numbers sampled on the unit -interval. The outgoing energy is only accepted if - -.. math:: - :label: maxwell-restriction - - 0 \le E' \le E - U - -where :math:`U` is called the restriction energy and is specified on the ACE -table. If the outgoing energy is rejected, it is resampled using equation -:eq:`maxwell-E-candidate`. - -ACE Law 9 - Evaporation Spectrum -++++++++++++++++++++++++++++++++ - -Evaporation spectra are primarily used in compound nucleus processes where a -secondary particle can "evaporate" from the compound nucleus if it has -sufficient energy. The probability distribution for an evaporation spectrum can -be written in the form - -.. math:: - :label: evaporation-spectrum - - p(E') dE' = c E' e^{-E'/T(E)} dE' - -where :math:`E` is the incoming energy of the neutron and :math:`T` is the -nuclear temperature, which is a function of the incoming energy of the -neutron. The ACE format contains a list of nuclear temperatures versus incoming -energies. The nuclear temperature is interpolated between neighboring incoming -energies using a specified interpolation law. Once the temperature :math:`T` is -determined, we then calculate a candidate outgoing energy based on the algorithm -given in LA-UR-14-27694_: - -.. math:: - :label: evaporation-E - - E' = -T \log ((1 - g\xi_1)(1 - g\xi_2)) - -where :math:`g = 1 - e^{-w}`, :math:`w = (E - U)/T`, :math:`U` is the -restriction energy, and :math:`\xi_1, \xi_2` are random numbers sampled on the -unit interval. The outgoing energy is only accepted according to the restriction -energy as in equation :eq:`maxwell-restriction`. This algorithm has a much -higher rejection efficiency than the standard technique, i.e. rule C45 in the -`Monte Carlo Sampler`_. - -ACE Law 11 - Energy-Dependent Watt Spectrum -+++++++++++++++++++++++++++++++++++++++++++ - -The probability distribution for a Watt fission spectrum can be written in the -form - -.. math:: - :label: watt-spectrum - - p(E') dE' = c e^{-E'/a(E)} \sinh \sqrt{b(E) \, E'} dE' - -where :math:`a` and :math:`b` are parameters for the distribution and are given -as tabulated functions of the incoming energy of the neutron. These two -parameters are interpolated on the incoming energy grid using a specified -interpolation law. Once the parameters have been determined, we sample a -Maxwellian spectrum with nuclear temperature :math:`a` using the algorithm -described in :ref:`maxwell` to get an energy :math:`W`. Then, the outgoing -energy is calculated as - -.. math:: - :label: watt-E - - E' = W + \frac{a^2 b}{4} + (2\xi - 1) \sqrt{a^2 b W} - -where :math:`\xi` is a random number sampled on the interval :math:`[0,1)`. The -outgoing energy is only accepted according to a specified restriction energy -:math:`U` as defined in equation :eq:`maxwell-restriction`. - -This algorithm can be found in Forrest Brown's lectures_ on Monte Carlo methods -and is an unpublished sampling scheme based on the original Watt spectrum -derivation [Watt]_. - -ACE Law 44 - Kalbach-Mann Correlated Scattering -+++++++++++++++++++++++++++++++++++++++++++++++ - -This law is very similar to ACE Law 4 except now the outgoing angle of the -neutron is correlated to the outgoing energy and is not sampled from a separate -distribution. For each incident neutron energy :math:`E_i` tabulated, there is -an array of precompound factors :math:`R_{i,j}` and angular distribution slopes -:math:`A_{i,j}` corresponding to each outgoing energy bin :math:`j` in addition -to the outgoing energies and distribution functions as in ACE Law 4. - -The calculation of the outgoing energy of the neutron proceeds exactly the same -as in the algorithm described in :ref:`ace-law-4`. In that algorithm, we found -an interpolation factor :math:`f`, statistically sampled an incoming energy bin -:math:`\ell`, and sampled an outgoing energy bin :math:`j` based on the -tabulated cumulative distribution function. Once the outgoing energy has been -determined with equation :eq:`ace-law-4-energy`, we then need to calculate the -outgoing angle based on the tabulated Kalbach-Mann parameters. These parameters -themselves are subject to either histogram or linear-linear interpolation on the -outgoing energy grid. For histogram interpolation, the parameters are - -.. math:: - :label: KM-parameters-histogram - - R = R_{\ell,j} \\ - A = A_{\ell,j}. - -If linear-linear interpolation is specified, the parameters are - -.. math:: - :label: KM-parameters-linlin - - R = R_{\ell,j} + \frac{\hat{E} - E_{\ell,j}}{E_{\ell,j+1} - E_{\ell,j}} ( - R_{\ell,j+1} - R_{\ell,j} ) \\ - A = A_{\ell,j} + \frac{\hat{E} - E_{\ell,j}}{E_{\ell,j+1} - E_{\ell,j}} ( - A_{\ell,j+1} - A_{\ell,j} ) - -where :math:`\hat{E}` is defined in equation :eq:`energy-linlin`. With the -parameters determined, the probability distribution function for the cosine of -the scattering angle is - -.. math:: - :label: KM-pdf-angle - - p(\mu) d\mu = \frac{A}{2 \sinh (A)} \left [ \cosh (A\mu) + R \sinh (A\mu) - \right ] d\mu. - -The rules for sampling this probability distribution function can be derived -based on rules C39 and C40 in the `Monte Carlo Sampler`_. First, we sample two -random numbers :math:`\xi_3, \xi_4` on the unit interval. If :math:`\xi_3 > R` -then the outgoing angle is - -.. math:: - :label: KM-angle-1 - - \mu = \frac{1}{A} \ln \left ( T + \sqrt{T^2 + 1} \right ) - -where :math:`T = (2 \xi_4 - 1) \sinh (A)`. If :math:`\xi_3 \le R`, then the -outgoing angle is - -.. math:: - :label: KM-angle-2 - - \mu = \frac{1}{A} \ln \left ( \xi_4 e^A + (1 - \xi_4) e^{-A} \right ). - -.. _ace-law-61: - -ACE Law 61 - Correlated Energy and Angle Distribution -+++++++++++++++++++++++++++++++++++++++++++++++++++++ - -This law is very similar to ACE Law 44 in the sense that the outgoing angle of -the neutron is correlated to the outgoing energy and is not sampled from a -separate distribution. In this case though, rather than being determined from an -analytical distribution function, the cosine of the scattering angle is -determined from a tabulated distribution. For each incident energy :math:`i` and -outgoing energy :math:`j`, there is a tabulated angular distribution. - -The calculation of the outgoing energy of the neutron proceeds exactly the same -as in the algorithm described in :ref:`ace-law-4`. In that algorithm, we found -an interpolation factor :math:`f`, statistically sampled an incoming energy bin -:math:`\ell`, and sampled an outgoing energy bin :math:`j` based on the -tabulated cumulative distribution function. Once the outgoing energy has been -determined with equation :eq:`ace-law-4-energy`, we then need to decide which -angular distribution to use. If histogram interpolation was used on the outgoing -energy bins, then we use the angular distribution corresponding to incoming -energy bin :math:`\ell` and outgoing energy bin :math:`j`. If linear-linear -interpolation was used on the outgoing energy bins, then we use the whichever -angular distribution was closer to the sampled value of the cumulative -distribution function for the outgoing energy. The actual algorithm used to -sample the chosen tabular angular distribution has been previously described in -:ref:`angle-tabular`. - -ACE Law 66 - N-Body Phase Space Distribution -++++++++++++++++++++++++++++++++++++++++++++ - -Reactions in which there are more than two products of similar masses are -sometimes best treated by using what's known as an N-body phase -distribution. This distribution has the following probability density function -for outgoing energy of the :math:`i`-th particle in the center-of-mass system: - -.. math:: - :label: n-body-pdf - - p_i(E') dE' = C_n \sqrt{E'} (E_i^{max} - E')^{(3n/2) - 4} dE' - -where :math:`n` is the number of outgoing particles, :math:`C_n` is a -normalization constant, :math:`E_i^{max}` is the maximum center-of-mass energy -for particle :math:`i`, and :math:`E'` is the outgoing energy. The algorithm for -sampling the outgoing energy is based on algorithms R28, C45, and C64 in the -`Monte Carlo Sampler`_. First we calculate the maximum energy in the -center-of-mass using the following equation: - -.. math:: - :label: n-body-emax - - E_i^{max} = \frac{A_p - 1}{A_p} \left ( \frac{A}{A+1} E + Q \right ) - -where :math:`A_p` is the total mass of the outgoing particles in neutron masses, -:math:`A` is the mass of the original target nucleus in neutron masses, and -:math:`Q` is the Q-value of the reaction. Next we sample a value :math:`x` from -a Maxwell distribution with a nuclear temperature of one using the algorithm -outlined in :ref:`maxwell`. We then need to determine a value :math:`y` that -will depend on how many outgoing particles there are. For :math:`n = 3`, we -simply sample another Maxwell distribution with unity nuclear temperature. For -:math:`n = 4`, we use the equation - -.. math:: - :label: n-body-y4 - - y = -\ln ( \xi_1 \xi_2 \xi_3 ) - -where :math:`\xi_i` are random numbers sampled on the interval -:math:`[0,1)`. For :math:`n = 5`, we use the equation - -.. math:: - :label: n-body-y5 - - y = -\ln ( \xi_1 \xi_2 \xi_3 \xi_4 ) - \ln ( \xi_5 ) \cos^2 \left ( - \frac{\pi}{2} \xi_6 \right ) - -After :math:`x` and :math:`y` have been determined, the outgoing energy is then -calculated as - -.. math:: - :label: n-body-energy - - E' = \frac{x}{x + y} E_i^{max} - -There are two important notes to make regarding the N-body phase space -distribution. First, the documentation (and code) for MCNP5-1.60 has a mistake -in the algorithm for :math:`n = 4`. That being said, there are no existing -nuclear data evaluations which use an N-body phase space distribution with -:math:`n = 4`, so the error would not affect any calculations. In the -ENDF/B-VII.0 nuclear data evaluation, only one reaction uses an N-body phase -space distribution at all, the :math:`(n,2n)` reaction with H-2. - -.. _transform-coordinates: - -------------------------------------- -Transforming a Particle's Coordinates -------------------------------------- - -Once the cosine of the scattering angle :math:`\mu` has been sampled either from -a angle distribution or a correlated angle-energy distribution, we are still -left with the task of transforming the particle's coordinates. If the outgoing -energy and scattering cosine were given in the center-of-mass system, then we -first need to transform these into the laboratory system. The relationship -between the outgoing energy in center-of-mass and laboratory is - -.. math:: - :label: energy-com-to-lab - - E' = E'_{cm} + \frac{E + 2\mu_{cm} (A + 1) \sqrt{EE'_{cm}}}{(A+1)^2}. - -where :math:`E'_{cm}` is the outgoing energy in the center-of-mass system, -:math:`\mu_{cm}` is the scattering cosine in the center-of-mass system, -:math:`E'` is the outgoing energy in the laboratory system, and :math:`E` is the -incident neutron energy. The relationship between the scattering cosine in -center-of-mass and laboratory is - -.. math:: - :label: angle-com-to-lab - - \mu = \mu_{cm} \sqrt{\frac{E'_{cm}}{E'}} + \frac{1}{A + 1} - \sqrt{\frac{E}{E'}} - -where :math:`\mu` is the scattering cosine in the laboratory system. The -scattering cosine still only tells us the cosine of the angle between the -original direction of the particle and the new direction of the particle. If we -express the pre-collision direction of the particle as :math:`\mathbf{\Omega} = -(u,v,w)` and the post-collision direction of the particle as -:math:`\mathbf{\Omega}' = (u',v',w')`, it is possible to relate the pre- and -post-collision components. We first need to uniformly sample an azimuthal angle -:math:`\phi` in :math:`[0, 2\pi)`. After the azimuthal angle has been sampled, -the post-collision direction is calculated as - -.. math:: - :label: post-collision-angle - - u' = \mu u + \frac{\sqrt{1 - \mu^2} ( uw \cos\phi - v \sin\phi )}{\sqrt{1 - - w^2}} \\ - - v' = \mu v + \frac{\sqrt{1 - \mu^2} ( vw \cos\phi + u \sin\phi )}{\sqrt{1 - - w^2}} \\ - - w' = \mu w - \sqrt{1 - \mu^2} \sqrt{1 - w^2} \cos\phi. - -.. _freegas: - ------------------------------------------- -Effect of Thermal Motion on Cross Sections ------------------------------------------- - -When a neutron scatters off of a nucleus, it may often be assumed that the -target nucleus is at rest. However, the target nucleus will have motion -associated with its thermal vibration, even at absolute zero (This is due to the -zero-point energy arising from quantum mechanical considerations). Thus, the -velocity of the neutron relative to the target nucleus is in general not the -same as the velocity of the neutron entering the collision. - -The effect of the thermal motion on the interaction probability can be written -as - -.. math:: - :label: doppler-broaden - - v_n \bar{\sigma} (v_n, T) = \int d\mathbf{v}_T v_r \sigma(v_r) - M (\mathbf{v}_T) - -where :math:`v_n` is the magnitude of the velocity of the neutron, -:math:`\bar{\sigma}` is an effective cross section, :math:`T` is the temperature -of the target material, :math:`\mathbf{v}_T` is the velocity of the target -nucleus, :math:`v_r = || \mathbf{v}_n - \mathbf{v}_T ||` is the magnitude of the -relative velocity, :math:`\sigma` is the cross section at 0 K, and :math:`M -(\mathbf{v}_T)` is the probability distribution for the target nucleus velocity -at temperature :math:`T` (a Maxwellian). In a Monte Carlo code, one must account -for the effect of the thermal motion on both the integrated cross section as -well as secondary angle and energy distributions. For integrated cross sections, -it is possible to calculate thermally-averaged cross sections by applying a -kernel Doppler broadening algorithm to data at 0 K (or some temperature lower -than the desired temperature). The most ubiquitous algorithm for this purpose is -the [SIGMA1]_ method developed by Red Cullen and subsequently refined by -others. This method is used in the NJOY_ and PREPRO_ data processing codes. - -The effect of thermal motion on secondary angle and energy distributions can be -accounted for on-the-fly in a Monte Carlo simulation. We must first qualify -where it is actually used however. All threshold reactions are treated as being -independent of temperature, and therefore they are not Doppler broadened in NJOY -and no special procedure is used to adjust the secondary angle and energy -distributions. The only non-threshold reactions with secondary neutrons are -elastic scattering and fission. For fission, it is assumed that the neutrons are -emitted isotropically (this is not strictly true, but is nevertheless a good -approximation). This leaves only elastic scattering that needs a special thermal -treatment for secondary distributions. - -Fortunately, it is possible to directly sample the velocity of the target -nuclide and then use it directly in the kinematic calculations. However, this -calculation is a bit more nuanced than it might seem at first glance. One might -be tempted to simply sample a Maxwellian distribution for the velocity of the -target nuclide. Careful inspection of equation :eq:`doppler-broaden` however -tells us that target velocities that produce relative velocities which -correspond to high cross sections will have a greater contribution to the -effective reaction rate. This is most important when the velocity of the -incoming neutron is close to a resonance. For example, if the neutron's velocity -corresponds to a trough in a resonance elastic scattering cross section, a very -small target velocity can cause the relative velocity to correspond to the peak -of the resonance, thus making a disproportionate contribution to the reaction -rate. The conclusion is that if we are to sample a target velocity in the Monte -Carlo code, it must be done in such a way that preserves the thermally-averaged -reaction rate as per equation :eq:`doppler-broaden`. - -The method by which most Monte Carlo codes sample the target velocity for use in -elastic scattering kinematics is outlined in detail by [Gelbard]_. The -derivation here largely follows that of Gelbard. Let us first write the reaction -rate as a function of the velocity of the target nucleus: - -.. math:: - :label: reaction-rate - - R(\mathbf{v}_T) = || \mathbf{v}_n - \mathbf{v}_T || \sigma ( || - \mathbf{v}_n - \mathbf{v}_T || ) M ( \mathbf{v}_T ) - -where :math:`R` is the reaction rate. Note that this is just the right-hand side -of equation :eq:`doppler-broaden`. Based on the discussion above, we want to -construct a probability distribution function for sampling the target velocity -to preserve the reaction rate -- this is different from the overall probability -distribution function for the target velocity, :math:`M ( \mathbf{v}_T )`. This -probability distribution function can be found by integrating equation -:eq:`reaction-rate` to obtain a normalization factor: - -.. math:: - :label: target-pdf-1 - - p( \mathbf{v}_T ) d\mathbf{v}_T = \frac{R(\mathbf{v}_T) d\mathbf{v}_T}{\int - d\mathbf{v}_T \, R(\mathbf{v}_T)} - -Let us call the normalization factor in the denominator of equation -:eq:`target-pdf-1` :math:`C`. - - -Constant Cross Section Model ----------------------------- - -It is often assumed that :math:`\sigma (v_r)` is constant over the range of -relative velocities of interest. This is a good assumption for almost all cases -since the elastic scattering cross section varies slowly with velocity for light -nuclei, and for heavy nuclei where large variations can occur due to resonance -scattering, the moderating effect is rather small. Nonetheless, this assumption -may cause incorrect answers in systems with low-lying resonances that can cause -a significant amount of up-scatter that would be ignored by this assumption -(e.g. U-238 in commercial light-water reactors). We will revisit this assumption -later in :ref:`energy_dependent_xs_model`. For now, continuing with the -assumption, we write :math:`\sigma (v_r) = \sigma_s` which simplifies -:eq:`target-pdf-1` to - -.. math:: - :label: target-pdf-2 - - p( \mathbf{v}_T ) d\mathbf{v}_T = \frac{\sigma_s}{C} || \mathbf{v}_n - - \mathbf{v}_T || M ( \mathbf{v}_T ) d\mathbf{v}_T - -The Maxwellian distribution in velocity is - -.. math:: - :label: maxwellian-velocity - - M (\mathbf{v}_T) = \left ( \frac{m}{2\pi kT} \right )^{3/2} \exp \left ( - \frac{-m || \mathbf{v}_T^2 ||}{2kT} \right ) - -where :math:`m` is the mass of the target nucleus and :math:`k` is Boltzmann's -constant. Notice here that the term in the exponential is dependent only on the -speed of the target, not on the actual direction. Thus, we can change the -Maxwellian into a distribution for speed rather than velocity. The differential -element of velocity is - -.. math:: - :label: differential-velocity - - d\mathbf{v}_T = v_T^2 dv_T d\mu d\phi - -Let us define the Maxwellian distribution in speed as - -.. math:: - :label: maxwellian-speed - - M (v_T) dv_T = \int_{-1}^1 d\mu \int_{0}^{2\pi} d\phi \, dv_T \, v_T^2 - M(\mathbf{v}_T) = \sqrt{ \frac{2}{\pi} \left ( \frac{m}{kT} \right )^3} - v_T^2 \exp \left ( \frac{-m v_T}{2kT} \right ) dv_T. - -To simplify things a bit, we'll define a parameter - -.. math:: - :label: maxwellian-beta - - \beta = \sqrt{\frac{m}{2kT}}. - -Substituting equation :eq:`maxwellian-beta` into equation -:eq:`maxwellian-speed`, we obtain - -.. math:: - :label: maxwellian-speed2 - - M (v_T) dv_T = \frac{4}{\sqrt{\pi}} \beta^3 v_T^2 \exp \left ( -\beta^2 - v_T^2 \right ) dv_T. - -Now, changing variables in equation :eq:`target-pdf-2` by using the result from -equation :eq:`maxwellian-speed`, our new probability distribution function is - -.. math:: - :label: target-pdf-3 - - p( v_T, \mu ) dv_T d\mu = \frac{4\sigma_s}{\sqrt{\pi}C'} || \mathbf{v}_n - - \mathbf{v}_T || \beta^3 v_T^2 \exp \left ( -\beta^2 v_T^2 \right ) dv_T d\mu - -Again, the Maxwellian distribution for the speed of the target nucleus has no -dependence on the angle between the neutron and target velocity vectors. Thus, -only the term :math:`|| \mathbf{v}_n - \mathbf{v}_T ||` imposes any constraint -on the allowed angle. Our last task is to take that term and write it in terms -of magnitudes of the velocity vectors and the angle rather than the vectors -themselves. We can establish this relation based on the law of cosines which -tells us that - -.. math:: - :label: lawcosine - - 2 v_n v_T \mu = v_n^2 + v_T^2 - v_r^2. - -Thus, we can infer that - -.. math:: - :label: change-terms - - || \mathbf{v}_n - \mathbf{v}_T || = || \mathbf{v}_r || = v_r = \sqrt{v_n^2 + - v_T^2 - 2v_n v_T \mu}. - -Inserting equation :eq:`change-terms` into :eq:`target-pdf-3`, we obtain - -.. math:: - :label: target-pdf-4 - - p( v_T, \mu ) dv_T d\mu = \frac{4\sigma_s}{\sqrt{\pi}C'} \sqrt{v_n^2 + - v_T^2 - 2v_n v_T \mu} \beta^3 v_T^2 \exp \left ( -\beta^2 v_T^2 \right ) - dv_T d\mu - -This expression is still quite formidable and does not lend itself to any -natural sampling scheme. We can divide this probability distribution into two -parts as such: - -.. math:: - :label: divide-pdf - - p(v_T, \mu) &= f_1(v_T, \mu) f_2(v_T) \\ - - f_1(v_T, \mu) &= \frac{4\sigma_s}{\sqrt{\pi} C'} \frac{ \sqrt{v_n^2 + - v_T^2 - 2v_n v_T \mu}}{v_n + v_T} \\ - - f_2(v_T) &= (v_n + v_T) \beta^3 v_T^2 \exp \left ( -\beta^2 v_T^2 \right ). - -In general, any probability distribution function of the form :math:`p(x) = -f_1(x) f_2(x)` with :math:`f_1(x)` bounded can be sampled by sampling -:math:`x'` from the distribution - -.. math:: - :label: freegas-f2 - - q(x) dx = \frac{f_2(x) dx}{\int f_2(x) dx} - -and accepting it with probability - -.. math:: - :label: freegas-accept - - p_{accept} = \frac{f_1(x')}{\max f_1(x)} - -The reason for dividing and multiplying the terms by :math:`v_n + v_T` is to -ensure that the first term is bounded. In general, :math:`|| \mathbf{v}_n - -\mathbf{v}_T ||` can take on arbitrarily large values, but if we divide it by -its maximum value :math:`v_n + v_T`, then it ensures that the function will be -bounded. We now must come up with a sampling scheme for equation -:eq:`freegas-f2`. To determine :math:`q(v_T)`, we need to integrate :math:`f_2` -in equation :eq:`divide-pdf`. Doing so we find that - -.. math:: - :label: integrate-f2 - - \int_0^{\infty} dv_T (v_n + v_T) \beta^3 v_T^2 \exp \left ( -\beta^2 v_T^2 - \right ) = \frac{1}{4\beta} \left ( \sqrt{\pi} \beta v_n + 2 \right ). - -Thus, we need to sample the probability distribution function - -.. math:: - :label: freegas-f2-2 - - q(v_T) dv_T = \left ( \frac{4\beta^2 v_n v_T^2}{\sqrt{\pi} \beta v_n + 2} + - \frac{4\beta^4 v_T^3}{\sqrt{\pi} \beta v_n + 2} \right ) exp \left ( - -\beta^2 v_T^2 \right ). - -Now, let us do a change of variables with the following definitions - -.. math:: - :label: beta-to-x - - x = \beta v_T \\ - y = \beta v_n. - -Substituting equation :eq:`beta-to-x` into equation :eq:`freegas-f2-2` along -with :math:`dx = \beta dv_T` and doing some crafty rearranging of terms yields - -.. math:: - :label: freegas-f2-3 - - q(x) dx = \left [ \left ( \frac{\sqrt{\pi} y}{\sqrt{\pi} y + 2} \right ) - \frac{4}{\sqrt{\pi}} x^2 e^{-x^2} + \left ( \frac{2}{\sqrt{\pi} y + 2} - \right ) 2x^3 e^{-x^2} \right ] dx. - -It's important to make note of the following two facts. First, the terms outside -the parentheses are properly normalized probability distribution functions that -can be sampled directly. Secondly, the terms inside the parentheses are always -less than unity. Thus, the sampling scheme for :math:`q(x)` is as follows. We -sample a random number :math:`\xi_1` on the interval :math:`[0,1)` and if - -.. math:: - :label: freegas-alpha - - \xi_1 < \frac{2}{\sqrt{\pi} y + 2} - -then we sample the probability distribution :math:`2x^3 e^{-x^2}` for :math:`x` -using rule C49 in the `Monte Carlo Sampler`_ which we can then use to determine -the speed of the target nucleus :math:`v_T` from equation -:eq:`beta-to-x`. Otherwise, we sample the probability distribution -:math:`\frac{4}{\sqrt{\pi}} x^2 e^{-x^2}` for :math:`x` using rule C61 in the -`Monte Carlo Sampler`_. - -With a target speed sampled, we must then decide whether to accept it based on -the probability in equation :eq:`freegas-accept`. The cosine can be sampled -isotropically as :math:`\mu = 2\xi_2 - 1` where :math:`\xi_2` is a random number -on the unit interval. Since the maximum value of :math:`f_1(v_T, \mu)` is -:math:`4\sigma_s / \sqrt{\pi} C'`, we then sample another random number -:math:`\xi_3` and accept the sampled target speed and cosine if - -.. math:: - :label: freegas-accept-2 - - \xi_3 < \frac{\sqrt{v_n^2 + v_T^2 - 2 v_n v_T \mu}}{v_n + v_T}. - -If is not accepted, then we repeat the process and resample a target speed and -cosine until a combination is found that satisfies equation -:eq:`freegas-accept-2`. - -.. _energy_dependent_xs_model: - -Energy-Dependent Cross Section Model ------------------------------------- - -As was noted earlier, assuming that the elastic scattering cross section is -constant in :eq:`reaction-rate` is not strictly correct, especially when -low-lying resonances are present in the cross sections for heavy nuclides. To -correctly account for energy dependence of the scattering cross section entails -performing another rejection step. The most common method is to sample -:math:`\mu` and :math:`v_T` as in the constant cross section approximation and -then perform a rejection on the ratio of the 0 K elastic scattering cross -section at the relative velocity to the maximum 0 K elastic scattering cross -section over the range of velocities considered: - -.. math:: - :label: dbrc - - p_{dbrc} = \frac{\sigma_s(v_r)}{\sigma_{s,max}} - -where it should be noted that the maximum is taken over the range :math:`[v_n - -4/\beta, 4_n + 4\beta]`. This method is known as Doppler broadening rejection -correction (DBRC) and was first introduced by `Becker et al.`_. OpenMC has an -implementation of DBRC as well as an accelerated sampling method that are -described fully in `Walsh et al.`_ - -.. _Becker et al.: http://dx.doi.org/10.1016/j.anucene.2008.12.001 -.. _Walsh et al.: http://dx.doi.org/10.1016/j.anucene.2014.01.017 - -.. _sab_tables: - ------------- -|sab| Tables ------------- - -For neutrons with thermal energies, generally less than 4 eV, the kinematics of -scattering can be affected by chemical binding and crystalline effects of the -target molecule. If these effects are not accounted for in a simulation, the -reported results may be highly inaccurate. There is no general analytic -treatment for the scattering kinematics at low energies, and thus when nuclear -data is processed for use in a Monte Carlo code, special tables are created that -give cross sections and secondary angle/energy distributions for thermal -scattering that account for thermal binding effects. These tables are mainly -used for moderating materials such as light or heavy water, graphite, hydrogen -in ZrH, beryllium, etc. - -The theory behind |sab| is rooted in quantum mechanics and is quite -complex. Those interested in first principles derivations for formulae relating -to |sab| tables should be referred to the excellent books by [Williams]_ and -[Squires]_. For our purposes here, we will focus only on the use of already -processed data as it appears in the ACE format. - -Each |sab| table can contain the following: - -- Thermal inelastic scattering cross section; -- Thermal elastic scattering cross section; -- Correlated energy-angle distributions for thermal inelastic and elastic - scattering. - -Note that when we refer to "inelastic" and "elastic" scattering now, we are -actually using these terms with respect to the *scattering system*. Thermal -inelastic scattering means that the scattering system is left in an excited -state; no particular nucleus is left in an excited state as would be the case -for inelastic level scattering. In a crystalline material, the excitation of the -scattering could correspond to the production of phonons. In a molecule, it -could correspond to the excitation of rotational or vibrational modes. - -Both thermal elastic and thermal inelastic scattering are generally divided into -incoherent and coherent parts. Coherent elastic scattering refers to scattering -in crystalline solids like graphite or beryllium. These cross sections are -characterized by the presence of *Bragg edges* that relate to the crystal -structure of the scattering material. Incoherent elastic scattering refers to -scattering in hydrogenous solids such as polyethylene. As it occurs in ACE data, -thermal inelastic scattering includes both coherent and incoherent effects and -is dominant for most other materials including hydrogen in water. - -Calculating Integrated Cross Sections -------------------------------------- - -The first aspect of using |sab| tables is calculating cross sections to replace -the data that would normally appear on the incident neutron data, which do not -account for thermal binding effects. For incoherent elastic and inelastic -scattering, the cross sections are stored as linearly interpolable functions on -a specified energy grid. For coherent elastic data, the cross section can be -expressed as - -.. math:: - :label: coherent-elastic-xs - - \sigma(E) = \frac{\sigma_c}{E} \sum_{E_i < E} f_i e^{-4WE_i} - -where :math:`\sigma_c` is the effective bound coherent scattering cross section, -:math:`W` is the effective Debye-Waller coefficient, :math:`E_i` are the -energies of the Bragg edges, and :math:`f_i` are related to crystallographic -structure factors. Since the functional form of the cross section is just 1/E -and the proportionality constant changes only at Bragg edges, the -proportionality constants are stored and then the cross section can be -calculated analytically based on equation :eq:`coherent-elastic-xs`. - -Outgoing Angle for Coherent Elastic Scattering ----------------------------------------------- - -Another aspect of using |sab| tables is determining the outgoing energy and -angle of the neutron after scattering. For incoherent and coherent elastic -scattering, the energy of the neutron does not actually change, but the angle -does change. For coherent elastic scattering, the angle will depend on which -Bragg edge scattered the neutron. The probability that edge :math:`i` will -scatter then neutron is given by - -.. math:: - :label: coherent-elastic-probability - - \frac{f_i e^{-4WE_i}}{\sum_j f_j e^{-4WE_j}}. - -After a Bragg edge has been sampled, the cosine of the angle of scattering is -given analytically by - -.. math:: - :label: coherent-elastic-angle - - \mu = 1 - \frac{E_i}{E} - -where :math:`E_i` is the energy of the Bragg edge that scattered the neutron. - -Outgoing Angle for Incoherent Elastic Scattering ------------------------------------------------- - -For incoherent elastic scattering, the probability distribution for the cosine -of the angle of scattering is represent as a series of equally-likely discrete -cosines :math:`\mu_{i,j}` for each incoming energy :math:`E_i` on the thermal -elastic energy grid. First the outgoing angle bin :math:`j` is sampled. Then, if -the incoming energy of the neutron satisfies :math:`E_i < E < E_{i+1}` the final -cosine is - -.. math:: - :label: incoherent-elastic-angle - - \mu = \mu_{i,j} + f (\mu_{i+1,j} - \mu_{i,j}) - -where the interpolation factor is defined as - -.. math:: - :label: sab-interpolation-factor - - f = \frac{E - E_i}{E_{i+1} - E_i}. - -Outgoing Energy and Angle for Inelastic Scattering --------------------------------------------------- - -Each |sab| table provides a correlated angle-energy secondary distribution for -neutron thermal inelastic scattering. There are three representations used -in the ACE thermal scattering data: equiprobable discrete outgoing -energies, non-uniform yet still discrete outgoing energies, and continuous -outgoing energies with corresponding probability and cumulative distribution -functions provided in tabular format. These three representations all -represent the angular distribution in a common format, using a series of -discrete equiprobable outgoing cosines. - -Equi-Probable Outgoing Energies -+++++++++++++++++++++++++++++++ - -If the thermal data was processed with :math:`iwt = 1` in NJOY, then the -outgoing energy spectra is represented in the ACE data as a set of discrete and -equiprobable outgoing energies. The procedure to determine the outgoing energy -and angle is as such. First, the interpolation factor is determined from -equation :eq:`sab-interpolation-factor`. Then, an outgoing energy bin is -sampled from a uniform distribution and then interpolated between values -corresponding to neighboring incoming energies: - -.. math:: - :label: inelastic-energy - - E = E_{i,j} + f (E_{i+1,j} - E_{i,j}) - -where :math:`E_{i,j}` is the j-th outgoing energy corresponding to the i-th -incoming energy. For each combination of incoming and outgoing energies, there -is a series equiprobable outgoing cosines. An outgoing cosine bin is sampled -uniformly and then the final cosine is interpolated on the incoming energy grid: - -.. math:: - :label: inelastic-angle - - \mu = \mu_{i,j,k} + f (\mu_{i+1,j,k} - \mu_{i,j,k}) - -where :math:`\mu_{i,j,k}` is the k-th outgoing cosine corresponding to the j-th -outgoing energy and the i-th incoming energy. - -Skewed Equi-Probable Outgoing Energies -++++++++++++++++++++++++++++++++++++++ - -If the thermal data was processed with :math:`iwt=0` in NJOY, then the -outgoing energy spectra is represented in the ACE data according to the -following: the first and last outgoing energies have a relative probability of -1, the second and second-to-last energies have a relative probability of 4, and -all other energies have a relative probability of 10. The procedure to -determine the outgoing energy and angle is similar to the method discussed -above, except that the sampled probability distribution is now skewed -accordingly. - -Continuous Outgoing Energies -++++++++++++++++++++++++++++ - -If the thermal data was processed with :math:`iwt=2` in NJOY, then the -outgoing energy spectra is represented by a continuous outgoing energy spectra -in tabular form with linear-linear interpolation. The sampling of the outgoing -energy portion of this format is very similar to :ref:`ACE Law 61`, -but the sampling of the correlated angle is performed as it was in the other -two representations discussed in this sub-section. In the Law 61 algorithm, -we found an interpolation factor :math:`f`, statistically sampled an incoming -energy bin :math:`\ell`, and sampled an outgoing energy bin :math:`j` based on -the tabulated cumulative distribution function. Once the outgoing energy has -been determined with equation :eq:`ace-law-4-energy`, we then need to decide -which angular distribution data to use. Like the linear-linear interpolation -case in Law 61, the angular distribution closest to the sampled value of the -cumulative distribution function for the outgoing energy is utilized. The -actual algorithm utilized to sample the outgoing angle is shown in equation -:eq:`inelastic-angle`. - -.. _probability_tables: - ----------------------------------------------- -Unresolved Resonance Region Probability Tables ----------------------------------------------- - -In the unresolved resonance energy range, resonances may be so closely spaced -that it is not possible for experimental measurements to resolve all -resonances. To properly account for self-shielding in this energy range, OpenMC -uses the probability table method [Levitt]_. For most thermal reactors, the use -of probability tables will not significantly affect problem results. However, -for some fast reactors and other problems with an appreciable flux spectrum in -the unresolved resonance range, not using probability tables may lead to -incorrect results. - -Probability tables in the ACE format are generated from the UNRESR module in -NJOY following the method of Levitt. A similar method employed for the RACER and -MC21_ Monte Carlo codes is described in a paper by `Sutton and Brown`_. For the -discussion here, we will focus only on use of the probability table table as it -appears in the ACE format. - -Each probability table for a nuclide contains the following information at a -number of incoming energies within the unresolved resonance range: - -- Cumulative probabilities for cross section bands; -- Total cross section (or factor) in each band; -- Elastic scattering cross section (or factor) in each band; -- Fission cross section (or factor) in each band; -- :math:`(n,\gamma)` cross section (or factor) in each band; and -- Neutron heating number (or factor) in each band. - -It should be noted that unresolved resonance probability tables affect only -integrated cross sections and no extra data need be given for secondary -angle/energy distributions. Secondary distributions for elastic and inelastic -scattering would be specified whether or not probability tables were present. - -The procedure for determining cross sections in the unresolved range using -probability tables is as follows. First, the bounding incoming energies are -determined, i.e. find :math:`i` such that :math:`E_i < E < E_{i+1}`. We then -sample a cross section band :math:`j` using the cumulative probabilities for -table :math:`i`. This allows us to then calculate the elastic, fission, and -capture cross sections from the probability tables interpolating between -neighboring incoming energies. If interpolation is specified, then -the cross sections are calculated as - -.. math:: - :label: ptables-linlin - - \sigma = \sigma_{i,j} + f (\sigma_{i+1,j} - \sigma{i,j}) - -where :math:`\sigma_{i,j}` is the j-th band cross section corresponding to the -i-th incoming neutron energy and :math:`f` is the interpolation factor defined -in the same manner as :eq:`sab-interpolation-factor`. If logarithmic -interpolation is specified, the cross sections are calculated as - -.. math:: - :label: ptables-loglog - - \sigma = \exp \left ( \log \sigma_{i,j} + f \log - \frac{\sigma_{i+1,j}}{\sigma_{i,j}} \right ) - -where the interpolation factor is now defined as - -.. math:: - :label: log-interpolation-factor - - f = \frac{\log \frac{E}{E_i}}{\log \frac{E_{i+1}}{E_i}}. - -A flag is also present in the probability table that specifies whether an -inelastic cross section should be calculated. If so, this is done from a normal -reaction cross section (either MT=51 or a special MT). Finally, if the -cross sections defined are above are specified to be factors and not true -cross sections, they are multiplied by the underlying smooth cross section in -the unresolved range to get the actual cross sections. Lastly, the total cross -section is calculated as the sum of the elastic, fission, capture, and inelastic -cross sections. - ------------------------------ -Variance Reduction Techniques ------------------------------ - -Survival Biasing ----------------- - -In problems with highly absorbing materials, a large fraction of neutrons may be -killed through absorption reactions, thus leading to tallies with very few -scoring events. To remedy this situation, an algorithm known as *survival -biasing* or *implicit absorption* (or sometimes *implicit capture*, even though -this is a misnomer) is commonly used. - -In survival biasing, absorption reactions are prohibited from occurring and -instead, at every collision, the weight of neutron is reduced by probability of -absorption occurring, i.e. - -.. math:: - :label: survival-biasing-weight - - w' = w \left ( 1 - \frac{\sigma_a (E)}{\sigma_t (E)} \right ) - -where :math:`w'` is the weight of the neutron after adjustment and :math:`w` is -the weight of the neutron before adjustment. A few other things need to be -handled differently if survival biasing is turned on. Although fission reactions -never actually occur with survival biasing, we still need to create fission -sites to serve as source sites for the next generation in the method of -successive generations. The algorithm for sampling fission sites is the same as -that described in :ref:`fission`. The only difference is in equation -:eq:`fission-neutrons`. We now need to produce - -.. math:: - :label: fission-neutrons-survival - - \nu = \frac{w}{k} \frac{\nu_t \sigma_f(E)}{\sigma_t (E)} - -fission sites, where :math:`w` is the weight of the neutron before being -adjusted. One should note this is just the expected number of neutrons produced -*per collision* rather than the expected number of neutrons produced given that -fission has already occurred. - -Additionally, since survival biasing can reduce the weight of the neutron to -very low values, it is always used in conjunction with a weight cutoff and -Russian rouletting. Two user adjustable parameters :math:`w_c` and :math:`w_s` -are given which are the weight below which neutrons should undergo Russian -roulette and the weight should they survive Russian roulette. The algorithm for -Russian rouletting is as follows. After a collision if :math:`w < w_c`, then the -neutron is killed with probability :math:`1 - w/w_s`. If it survives, the weight -is set equal to :math:`w_s`. One can confirm that the average weight following -Russian roulette is simply :math:`w`, so the game can be considered "fair". By -default, the cutoff weight in OpenMC is :math:`w_c = 0.25` and the survival -weight is :math:`w_s = 1.0`. These parameters vary from one Monte Carlo code to -another. - -.. only:: html - - .. rubric:: References - -.. [Doyas] Richard J. Doyas and Sterrett T. Perkins, "Interpolation of Tabular - Secondary Neutron and Photon Energy Distributions," *Nucl. Sci. Eng.*, - **50**, 390-392 (1972). - -.. [Gelbard] Ely M. Gelbard, "Epithermal Scattering in VIM," FRA-TM-123, Argonne - National Laboratory (1979). - -.. [Levitt] Leo B. Levitt, "The Probability Table Method for Treating Unresolved - Neutron Resonances in Monte Carlo Calculations," *Nucl. Sci. Eng.*, **49**, - pp. 450-457 (1972). - -.. [SIGMA1] Dermett E. Cullen and Charles R. Weisbin, "Exact Doppler Broadening - of Tabulated Cross Sections," *Nucl. Sci. Eng.*, **60**, pp. 199-229 (1976). - -.. [Squires] G. L. Squires, *Introduction to the Theory of Thermal Neutron - Scattering*, Cambridge University Press (1978). - -.. [Watt] B. E. Watt, "Energy Spectrum of Neutrons from Thermal Fission of - U235," *Phys. Rev.*, **87** (6), 1037-1041 (1952). - -.. [Williams] M. M. R. Williams, *The Slowing Down and Thermalization of - Neutrons*, North-Holland Publishing Co., Amsterdam (1966). **Note:** This - book can be obtained for free from the OECD_. - -.. |sab| replace:: S(:math:`\alpha,\beta,T`) - -.. _Foderaro: http://hdl.handle.net/1721.1/1716 - -.. _OECD: http://www.oecd-nea.org/dbprog/MMRW-BOOKS.html - -.. _NJOY: http://t2.lanl.gov/codes.shtml - -.. _PREPRO: http://www-nds.iaea.org/ndspub/endf/prepro/ - -.. _ENDF-6 Format: http://www-nds.iaea.org/ndspub/documents/endf/endf102/endf102.pdf - -.. _Monte Carlo Sampler: https://laws.lanl.gov/vhosts/mcnp.lanl.gov/pdf_files/la-9721_3rdmcsampler.pdf - -.. _LA-UR-14-27694: http://permalink.lanl.gov/object/tr?what=info:lanl-repo/lareport/LA-UR-14-27694 - -.. _MC21: http://www.osti.gov/bridge/servlets/purl/903083-HT5p1o/903083.pdf - -.. _Sutton and Brown: http://www.osti.gov/bridge/product.biblio.jsp?osti_id=307911 - -.. _lectures: https://laws.lanl.gov/vhosts/mcnp.lanl.gov/pdf_files/la-ur-05-4983.pdf - -.. _MCNP Manual: https://laws.lanl.gov/vhosts/mcnp.lanl.gov/pdf_files/MCNP5_Manual_Volume_I_LA-UR-03-1987.pdf diff --git a/_sources/methods/random_numbers.txt b/_sources/methods/random_numbers.txt deleted file mode 100644 index 3ea61719c..000000000 --- a/_sources/methods/random_numbers.txt +++ /dev/null @@ -1,74 +0,0 @@ -.. _methods_random_numbers: - -======================== -Random Number Generation -======================== - -In order to sample probability distributions, one must be able to produce random -numbers. The standard technique to do this is to generate numbers on the -interval :math:`[0,1)` from a deterministic sequence that has properties that -make it appear to be random, e.g. being uniformly distributed and not exhibiting -correlation between successive terms. Since the numbers produced this way are -not truly "random" in a strict sense, they are typically referred to as -pseudorandom numbers, and the techniques used to generate them are pseudorandom -number generators (PRNGs). Numbers sampled on the unit interval can then be -transformed for the purpose of sampling other continuous or discrete probability -distributions. - ------------------------------- -Linear Congruential Generators ------------------------------- - -There are a great number of algorithms for generating random numbers. One of the -simplest and commonly used algorithms is called a `linear congruential -generator`_. We start with a random number *seed* :math:`\xi_0` and a sequence -of random numbers can then be generated using the following recurrence relation: - -.. math:: - :label: lcg - - \xi_{i+1} = g \xi_i + c \mod M - -where :math:`g`, :math:`c`, and :math:`M` are constants. The choice of these -constants will have a profound effect on the quality and performance of the -generator, so they should not be chosen arbitrarily. As Donald Knuth stated in -his seminal work *The Art of Computer Programming*, "random numbers should not -be generated with a method chosen at random. Some theory should be used." -Typically, :math:`M` is chosen to be a power of two as this enables :math:`x -\mod M` to be performed using the bitwise AND operator with a bit mask. The -constants for the linear congruential generator used by default in OpenMC are -:math:`g = 2806196910506780709`, :math:`c = 1`, and :math:`M = 2^{63}` (see -[LEcuyer]_). - -Skip-ahead Capability ---------------------- - -One of the important capabilities for a random number generator is to be able to -skip ahead in the sequence of random numbers. Without this capability, it would -be very difficult to maintain reproducibility in a parallel calculation. If we -want to skip ahead :math:`N` random numbers and :math:`N` is large, the cost of -sampling :math:`N` random numbers to get to that position may be prohibitively -expensive. Fortunately, algorithms have been developed that allow us to skip -ahead in :math:`O(\log_2 N)` operations instead of :math:`O(N)`. One algorithm -to do so is described in a paper by Brown_. This algorithm relies on the following -relationship: - -.. math:: - :label: lcg-skipahead - - \xi_{i+k} = g^k \xi_i + c \frac{g^k - 1}{g - 1} \mod M - -Note that :eq:`lcg-skipahead` has the same general form as \eqref{eq:lcg}, so -the idea is to determine the new multiplicative and additive constants in -:math:`O(\log_2 N)` operations. - -.. only:: html - - .. rubric:: References - -.. [LEcuyer] P. L’Ecuyer, "Tables of Linear Congruential Generators of - Different Sizes and Good Lattice Structures," *Math. Comput.*, **68**, 249 - (1999). - -.. _Brown: https://laws.lanl.gov/vhosts/mcnp.lanl.gov/pdf_files/anl_rn_arb-strides_1994.pdf -.. _linear congruential generator: http://en.wikipedia.org/wiki/Linear_congruential_generator diff --git a/_sources/methods/tallies.txt b/_sources/methods/tallies.txt deleted file mode 100644 index fd0812245..000000000 --- a/_sources/methods/tallies.txt +++ /dev/null @@ -1,512 +0,0 @@ -.. _methods_tallies: - -======= -Tallies -======= - ------------------- -Filters and Scores ------------------- - -The tally capability in OpenMC takes a similar philosophy as that employed in -the MC21_ Monte Carlo code to give maximum flexibility in specifying tallies -while still maintaining scalability. Any tally in a Monte Carlo simulation can -be written in the following form: - -.. math:: - :label: tally-integral - - X = \underbrace{\int d\mathbf{r} \int d\mathbf{\Omega} \int - dE}_{\text{filters}} \underbrace{f(\mathbf{r}, \mathbf{\Omega}, - E)}_{\text{scores}} \psi (\mathbf{r}, \mathbf{\Omega}, E) - - -A user can specify one or more filters which identify which regions of phase -space should score to a given tally (the limits of integration as shown in -equation :eq:`tally-integral`) as well as the scoring function (:math:`f` in -equation :eq:`tally-integral`). For example, if the desired tally was the -:math:`(n,\gamma)` reaction rate in a fuel pin, the filter would specify the -cell which contains the fuel pin and the scoring function would be the radiative -capture macroscopic cross section. The following quantities can be scored in -OpenMC: flux, total reaction rate, scattering reaction rate, neutron production -from scattering, higher scattering moments, :math:`(n,xn)` reaction rates, -absorption reaction rate, fission reaction rate, neutron production rate from -fission, and surface currents. The following variables can be used as filters: -universe, material, cell, birth cell, surface, mesh, pre-collision energy, and -post-collision energy. - -With filters for pre- and post-collision energy and scoring functions for -scattering and fission production, it is possible to use OpenMC to generate -cross sections with user-defined group structures. These multigroup cross -sections can subsequently be used in deterministic solvers such as coarse mesh -finite difference (CMFD) diffusion. - ------------------------------- -Using Maps for Filter-Matching ------------------------------- - -Some Monte Carlo codes suffer severe performance penalties when tallying a large -number of quantities. Care must be taken to ensure that a tally system scales -well with the total number of tally bins. In OpenMC, a mapping technique is used -that allows for a fast determination of what tally/bin combinations need to be -scored to a given particle's phase space coordinates. For each discrete filter -variable, a list is stored that contains the tally/bin combinations that could -be scored to for each value of the filter variable. If a particle is in cell -:math:`n`, the mapping would identify what tally/bin combinations specify cell -:math:`n` for the cell filter variable. In this manner, it is not necessary to -check the phase space variables against each tally. Note that this technique -only applies to discrete filter variables and cannot be applied to energy -bins. For energy filters, it is necessary to perform a binary search on the -specified energy grid. - ------------------------------------------ -Volume-Integrated Flux and Reaction Rates ------------------------------------------ - -One quantity we may wish to compute during the course of a Monte Carlo -simulation is the flux or a reaction rate integrated over a finite volume. The -volume may be a particular cell, a collection of cells, or the entire -geometry. There are various methods by which we can estimate reaction rates - -Analog Estimator ----------------- - -The analog estimator is the simplest type of estimator for reaction rates. The -basic idea is that we simply count the number of actual reactions that take -place and use that as our estimate for the reaction rate. This can be written -mathematically as - -.. math:: - :label: analog-estimator - - R_x = \frac{1}{W} \sum_{i \in A} w_i - -where :math:`R_x` is the reaction rate for reaction :math:`x`, :math:`i` denotes -an index for each event, :math:`A` is the set of all events resulting in -reaction :math:`x`, and :math:`W` is the total starting weight of the particles, -and :math:`w_i` is the pre-collision weight of the particle as it enters event -:math:`i`. One should note that equation :eq:`analog-estimator` is -volume-integrated so if we want a volume-averaged quantity, we need to divided -by the volume of the region of integration. If survival biasing is employed, the -analog estimator cannot be used for any reactions with zero neutrons in the exit -channel. - -Collision Estimator -------------------- - -While the analog estimator is conceptually very simple and easy to implement, it -can suffer higher variance due to the fact low probability events will not occur -often enough to get good statistics if they are being tallied. Thus, it is -desirable to use a different estimator that allows us to score to the tally more -often. One such estimator is the collision estimator. Instead of tallying a -reaction only when it happens, the idea is to make a contribution to the tally -at every collision. - -We can start by writing a formula for the collision estimate of the flux. Since -:math:`R = \Sigma_t \phi` where :math:`R` is the total reaction rate, -:math:`\Sigma_t` is the total macroscopic cross section, and :math:`\phi` is the -scalar flux, it stands to reason that we can estimate the flux by taking an -estimate of the total reaction rate and dividing it by the total macroscopic -cross section. This gives us the following formula: - -.. math:: - :label: collision-estimator-flux - - \phi = \frac{1}{W} \sum_{i \in C} \frac{w_i}{\Sigma_t (E_i)} - -where :math:`W` is again the total starting weight of the particles, :math:`C` -is the set of all events resulting in a collision with a nucleus, and -:math:`\Sigma_t (E)` is the total macroscopic cross section of the target -material at the incoming energy of the particle :math:`E_i`. - -If we multiply both sides of equation :eq:`collision-estimator-flux` by the -macroscopic cross section for some reaction :math:`x`, then we get the collision -estimate for the reaction rate for that reaction: - -.. math:: - :label: collision-estimator - - R_x = \frac{1}{W} \sum_{i \in C} \frac{w_i \Sigma_x (E_i)}{\Sigma_t (E_i)} - -where :math:`\Sigma_x (E_i)` is the macroscopic cross section for reaction -:math:`x` at the incoming energy of the particle :math:`E_i`. In comparison to -equation :eq:`analog-estimator`, we see that the collision estimate will result -in a tally with a larger number of events that score to it with smaller -contributions (since we have multiplied it by :math:`\Sigma_x / \Sigma_t`). - -Track-length Estimator ----------------------- - -One other method we can use to increase the number of events that scores to -tallies is to use an estimator the scores contributions to a tally at every -track for the particle rather than every collision. This is known as a -track-length estimator, sometimes also called a path-length estimator. We first -start with an expression for the volume integrated flux, which can be written as - -.. math:: - :label: flux-integrated - - V \phi = \int d\mathbf{r} \int dE \int d\mathbf{\Omega} \int dt \, - \psi(\mathbf{r}, \mathbf{\hat{\Omega}}, E, t) - -where :math:`V` is the volume, :math:`\psi` is the angular flux, -:math:`\mathbf{r}` is the position of the particle, :math:`\mathbf{\hat{\Omega}}` -is the direction of the particle, :math:`E` is the energy of the particle, and -:math:`t` is the time. By noting that :math:`\psi(\mathbf{r}, -\mathbf{\hat{\Omega}}, E, t) = v n(\mathbf{r}, \mathbf{\hat{\Omega}}, E, t)` -where :math:`n` is the angular neutron density, we can rewrite equation -:eq:`flux-integrated` as - -.. math:: - :label: flux-integrated-2 - - V \phi = \int d\mathbf{r} \int dE \int dt v \int d\mathbf{\Omega} \, n(\mathbf{r}, - \mathbf{\hat{\Omega}}, E, t)). - -Using the relations :math:`N(\mathbf{r}, E, t) = \int d\mathbf{\Omega} -n(\mathbf{r}, \mathbf{\hat{\Omega}}, E, t)` and :math:`d\ell = v \, dt` where -:math:`d\ell` is the differential unit of track length, we then obtain - -.. math:: - :label: track-length-integral - - V \phi = \int d\mathbf{r} \int dE \int d\ell N(\mathbf{r}, E, t). - -Equation :eq:`track-length-integral` indicates that we can use the length of a -particle's trajectory as an estimate for the flux, i.e. the track-length -estimator of the flux would be - -.. math:: - :label: track-length-flux - - \phi = \frac{1}{W} \sum_{i \in T} w_i \ell_i - -where :math:`T` is the set of all the particle's trajectories within the desired -volume and :math:`\ell_i` is the length of the :math:`i`-th trajectory. In the -same vein as equation :eq:`collision-estimator`, the track-length estimate of a -reaction rate is found by multiplying equation :eq:`track-length-flux` by a -macroscopic reaction cross section: - -.. math:: - :label: track-length-estimator - - R_x = \frac{1}{W} \sum_{i \in T} w_i \ell_i \Sigma_x (E_i). - -One important fact to take into consideration is that the use of a track-length -estimator precludes us from using any filter that requires knowledge of the -particle's state following a collision because by definition, it will not have -had a collision at every event. Thus, for tallies with outgoing-energy filters -(which require the post-collision energy) or for tallies of scattering moments -(which require the scattering cosine), we must use an analog estimator. - -.. TODO: Add description of surface current tallies - ----------- -Statistics ----------- - -As was discussed briefly in :ref:`methods_introduction`, any given result from a -Monte Carlo calculation, colloquially known as a "tally", represents an estimate -of the mean of some `random variable`_ of interest. This random variable -typically corresponds to some physical quantity like a reaction rate, a net -current across some surface, or the neutron flux in a region. Given that all -tallies are produced by a `stochastic process`_, there is an associated -uncertainty with each value reported. It is important to understand how the -uncertainty is calculated and what it tells us about our results. To that end, -we will introduce a number of theorems and results from statistics that should -shed some light on the interpretation of uncertainties. - -Law of Large Numbers --------------------- - -The `law of large numbers`_ is an important statistical result that tells us -that the average value of the result a large number of repeated experiments -should be close to the `expected value`_. Let :math:`X_1, X_2, \dots, X_n` be an -infinite sequence of `independent, identically-distributed random variables`_ -with expected values :math:`E(X_1) = E(X_2) = \mu`. One form of the law of large -numbers states that the sample mean :math:`\bar{X_n} = \frac{X_1 + \dots + -X_n}{n}` `converges in probability`_ to the true mean, i.e. for all -:math:`\epsilon > 0` - -.. math:: - - \lim\limits_{n\rightarrow\infty} P \left ( \left | \bar{X}_n - \mu \right | - \ge \epsilon \right ) = 0. - -.. _central-limit-theorem: - -Central Limit Theorem ---------------------- - -The `central limit theorem`_ (CLT) is perhaps the most well-known and ubiquitous -statistical theorem that has far-reaching implications across many -disciplines. The CLT is similar to the law of large numbers in that it tells us -the limiting behavior of the sample mean. Whereas the law of large numbers tells -us only that the value of the sample mean will converge to the expected value of -the distribution, the CLT says that the distribution of the sample mean will -converge to a `normal distribution`_. As we defined before, let :math:`X_1, X_2, -\dots, X_n` be an infinite sequence of independent, identically-distributed -random variables with expected values :math:`E(X_i) = \mu` and variances -:math:`\text{Var} (X_i) = \sigma^2 < \infty`. Note that we don't require that -these random variables take on any particular distribution -- they can be -normal, log-normal, Weibull, etc. The central limit theorem states that as -:math:`n \rightarrow \infty`, the random variable :math:`\sqrt{n} (\bar{X}_n - -\mu)` `converges in distribution`_ to the standard normal distribution: - -.. math:: - :label: central-limit-theorem - - \sqrt{n} \left ( \frac{1}{n} \sum_{i=1}^n X_i - \mu \right ) \xrightarrow{d} - \mathcal{N} (0, \sigma^2) - -Estimating Statistics of a Random Variable ------------------------------------------- - -Mean -++++ - -Given independent samples drawn from a random variable, the sample mean is -simply an estimate of the average value of the random variable. In a Monte Carlo -simulation, the random variable represents physical quantities that we want -tallied. If :math:`X` is the random variable with :math:`N` observations -:math:`x_1, x_2, \dots, x_N`, then an unbiased estimator for the population mean -is the sample mean, defined as - -.. math:: - :label: sample-mean - - \bar{x} = \frac{1}{N} \sum_{i=1}^N x_i. - -Variance -++++++++ - -The variance of a population indicates how spread out different members of the -population are. For a Monte Carlo simulation, the variance of a tally is a -measure of how precisely we know the tally value, with a lower variance -indicating a higher precision. There are a few different estimators for the -population variance. One of these is the second central moment of the -distribution also known as the biased sample variance: - -.. math:: - :label: biased-variance - - s_N^2 = \frac{1}{N} \sum_{i=1}^N \left ( x_i - \bar{x} \right )^2 = \left ( - \frac{1}{N} \sum_{i=1}^N x_i^2 \right ) - \bar{x}^2. - -This estimator is biased because its expected value is actually not equal to the -population variance: - -.. math:: - :label: biased-variance-expectation - - E[s_N^2] = \frac{N - 1}{N} \sigma^2 - -where :math:`\sigma^2` is the actual population variance. As a result, this -estimator should not be used in practice. Instead, one can use `Bessel's -correction`_ to come up with an unbiased sample variance estimator: - -.. math:: - :label: unbiased-variance - - s^2 = \frac{1}{N - 1} \sum_{i=1}^N \left ( x_i - \bar{x} \right )^2 = - \frac{1}{N - 1} \left ( \sum_{i=1}^N x_i^2 - N\bar{x}^2 \right ). - -This is the estimator normally used to calculate sample variance. The final form -in equation :eq:`unbiased-variance` is especially suitable for computation since -we do not need to store the values at every realization of the random variable -as the simulation proceeds. Instead, we can simply keep a running sum and sum of -squares of the values at each realization of the random variable and use that to -calculate the variance. - -Variance of the Mean -++++++++++++++++++++ - -The previous sections discussed how to estimate the mean and variance of a -random variable using statistics on a finite sample. However, we are generally -not interested in the *variance of the random variable* itself; we are more -interested in the *variance of the estimated mean*. The sample mean is the -result of our simulation, and the variance of the sample mean will tell us how -confident we should be in our answers. - -Fortunately, it is quite easy to estimate the variance of the mean if we are -able to estimate the variance of the random variable. We start with the -observation that if we have a series of uncorrelated random variables, we can -write the variance of their sum as the sum of their variances: - -.. math:: - :label: bienayme-formula - - \text{Var} \left ( \sum_{i=1}^N X_i \right ) = \sum_{i=1}^N \text{Var} \left - ( X_i \right ) - -This result is known as the Bienaymé formula. We can use this result to -determine a formula for the variance of the sample mean. Assuming that the -realizations of our random variable are again identical, -independently-distributed samples, then we have that - -.. math:: - :label: sample-variance-mean - - \text{Var} \left ( \bar{X} \right ) = \text{Var} \left ( \frac{1}{N} - \sum_{i=1}^N X_i \right ) = \frac{1}{N^2} \sum_{i=1}^N \text{Var} \left ( - X_i \right ) = \frac{1}{N^2} \left ( N\sigma^2 \right ) = - \frac{\sigma^2}{N}. - -We can combine this result with equation :eq:`unbiased-variance` to come up with -an unbiased estimator for the variance of the sample mean: - -.. math:: - :label: sample-variance-mean-formula - - s_{\bar{X}}^2 = \frac{1}{N - 1} \left ( \frac{1}{N} \sum_{i=1}^N x_i^2 - - \bar{x}^2 \right ). - -At this point, an important distinction should be made between the estimator for -the variance of the population and the estimator for the variance of the -mean. As the number of realizations increases, the estimated variance of the -population based on equation :eq:`unbiased-variance` will tend to the true -population variance. On the other hand, the estimated variance of the mean will -tend to zero as the number of realizations increases. A practical interpretation -of this is that the longer you run a simulation, the better you know your -results. Therefore, by running a simulation long enough, it is possible to -reduce the stochastic uncertainty to arbitrarily low levels. - -Confidence Intervals -++++++++++++++++++++ - -While the sample variance and standard deviation gives us some idea about the -variability of the estimate of the mean of whatever quantities we've tallied, it -does not help us interpret how confidence we should be in the results. To -quantity the reliability of our estimates, we can use `confidence intervals`_ -based on the calculated sample variance. - -A :math:`1-\alpha` confidence interval for a population parameter is defined as -such: if we repeat the same experiment many times and calculate the confidence -interval for each experiment, then :math:`1 - \alpha` percent of the calculated -intervals would encompass the true population parameter. Let :math:`x_1, x_2, -\dots, x_N` be samples from a set of independent, identically-distributed random -variables each with population mean :math:`\mu` and variance -:math:`\sigma^2`. The t-statistic is defined as - -.. math:: - :label: t-statistic - - t = \frac{\bar{x} - \mu}{s/\sqrt{N}} - -where :math:`\bar{x}` is the sample mean from equation :eq:`sample-mean` and -:math:`s` is the standard deviation based on equation -:eq:`unbiased-variance`. If the random variables :math:`X_i` are -normally-distributed, then the t-statistic has a `Student's t-distribution`_ -with :math:`N-1` degrees of freedom. This implies that - -.. math:: - :label: t-probability - - Pr \left ( -t_{1 - \alpha/2, N - 1} \le \frac{\bar{x} - \mu}{s/\sqrt{N}} \le - t_{1 - \alpha/2, N - 1} \right ) = 1 - \alpha - -where :math:`t_{1-\alpha/2, N-1}` is the :math:`1 - \alpha/2` percentile of a -t-distribution with :math:`N-1` degrees of freedom. Thus, the :math:`1 - \alpha` -two sided confidence interval for the sample mean is - -.. math:: - :label: two-sided-ci - - \bar{x} \pm t_{1 - \alpha/2, N-1} \frac{s}{\sqrt{N}}. - -One should be cautioned that equation :eq:`two-sided-ci` only applies if the -*underlying random variables* are normally-distributed. In general, this may not -be true for a tally random variable --- the central limit theorem guarantees -only that the sample mean is normally distributed, not the underlying random -variable. If batching is used, then the underlying random variable, which would -then be the averages from each batch, will be normally distributed as long as -the conditions of the central limit theorem are met. - -Let us now outline the method used to calculate the percentile of the Student's -t-distribution. For one or two degrees of freedom, the percentile can be written -analytically. For one degree of freedom, the t-distribution becomes a standard -`Cauchy distribution`_ whose cumulative distribution function is - -.. math:: - :label: cauchy-cdf - - c(x) = \frac{1}{\pi} \arctan x + \frac{1}{2}. - -Thus, inverting the cumulative distribution function, we find the :math:`x` -percentile of the standard Cauchy distribution to be - -.. math:: - :label: percentile-1 - - t_{x,1} = \tan \left ( \pi \left ( x - \frac{1}{2} \right ) \right ). - -For two degrees of freedom, the cumulative distribution function is the -second-degree polynomial - -.. math:: - :label: t-2-polynomial - - c(x) = \frac{1}{2} + \frac{x}{2\sqrt{x^2 + 2}} - -Solving for :math:`x`, we find the :math:`x` percentile to be - -.. math:: - :label: percentile-2 - - t_{x,2} = \frac{2\sqrt{2} (x - 1/2)}{\sqrt{1 - 4 (x - 1/2)^2}} - -For degrees of freedom greater than two, it is not possible to obtain an -analytical formula for the inverse of the cumulative distribution function. We -must resort to either numerically solving for the inverse or to an -approximation. Approximations for percentiles of the t-distribution have been -found with high levels of accuracy. OpenMC uses the approximation from -[George]_: - -.. math:: - :label: percentile-n - - t_{x,n} = \sqrt{\frac{n}{n-2}} \left ( z_x + \frac{1}{4} \frac{z_x^3 - - 3z_x}{n-2} + \frac{1}{96} \frac{5z_x^5 - 56z_x^3 + 75z_x}{(n-2)^2} + - \frac{1}{384} \frac{3z_x^7 - 81z_x^5 + 417z_x^3 - 315z_x}{(n-2)^3} \right ) - -where :math:`z_x` is the :math:`x` percentile of the standard normal -distribution. In order to determine an arbitrary percentile of the standard -normal distribution, we use an `unpublished rational approximation`_. After -using the rational approximation, one iteration of Newton's method is applied to -improve the estimate of the percentile. - -.. only:: html - - .. rubric:: References - -.. [George] E. E. Olusegun George and Meenakshi Sivaram, "A modification of the - Fisher-Cornish approximation for the student t percentiles," Communication - in Statistics - Simulation and Computation, 16 (4), pp. 1123-1132 (1987). - -.. _Bessel's correction: http://en.wikipedia.org/wiki/Bessel's_correction - -.. _random variable: http://en.wikipedia.org/wiki/Random_variable - -.. _stochastic process: http://en.wikipedia.org/wiki/Stochastic_process - -.. _independent, identically-distributed random variables: http://en.wikipedia.org/wiki/Independent_and_identically_distributed_random_variables - -.. _law of large numbers: http://en.wikipedia.org/wiki/Law_of_large_numbers - -.. _expected value: http://en.wikipedia.org/wiki/Expected_value - -.. _converges in probability: http://en.wikipedia.org/wiki/Convergence_of_random_variables#Convergence_in_probability - -.. _normal distribution: http://en.wikipedia.org/wiki/Normal_distribution - -.. _converges in distribution: http://en.wikipedia.org/wiki/Convergence_of_random_variables#Convergence_in_distribution - -.. _confidence intervals: http://en.wikipedia.org/wiki/Confidence_interval - -.. _Student's t-distribution: http://en.wikipedia.org/wiki/Student%27s_t-distribution - -.. _Cauchy distribution: http://en.wikipedia.org/wiki/Cauchy_distribution - -.. _unpublished rational approximation: http://home.online.no/~pjacklam/notes/invnorm/ - -.. _MC21: http://www.osti.gov/bridge/servlets/purl/903083-HT5p1o/903083.pdf diff --git a/_sources/publications.txt b/_sources/publications.txt deleted file mode 100644 index 369b9d977..000000000 --- a/_sources/publications.txt +++ /dev/null @@ -1,230 +0,0 @@ -.. _publications: - -============ -Publications -============ - ---------- -Overviews ---------- - -- Paul K. Romano, Nicholas E. Horelik, Bryan R. Herman, Adam G. Nelson, Benoit - Forget, and Kord Smith, "OpenMC: A State-of-the-Art Monte Carlo Code for - Research and Development," *Ann. Nucl. Energy*, **82**, 90--97 - (2015). ``_ - -- Paul K. Romano, Bryan R. Herman, Nicholas E. Horelik, Benoit Forget, Kord - Smith, and Andrew R. Siegel, "Progress and Status of the OpenMC Monte Carlo - Code," *Proc. Int. Conf. Mathematics and Computational Methods Applied to - Nuclear Science and Engineering*, Sun Valley, Idaho, May 5--9 (2013). - -- Paul K. Romano and Benoit Forget, "The OpenMC Monte Carlo Particle Transport - Code," *Ann. Nucl. Energy*, **51**, 274--281 - (2013). ``_ - ------------- -Benchmarking ------------- - -- Khurrum S. Chaudri and Sikander M. Mirza, "Burnup dependent Monte Carlo - neutron physics calculations of IAEA MTR benchmark," *Prog. Nucl. Energy*, - **81**, 43-52 (2015). ``_ - -- Daniel J. Kelly, Brian N. Aviles, Paul K. Romano, Bryan R. Herman, - Nicholas E. Horelik, and Benoit Forget, "Analysis of select BEAVRS PWR - benchmark cycle 1 results using MC21 and OpenMC," *Proc. PHYSOR*, Kyoto, - Japan, Sep. 28--Oct. 3 (2014). - -- Bryan R. Herman, Benoit Forget, Kord Smith, Paul K. Romano, Thomas M. Sutton, - Daniel J. Kelly, III, and Brian N. Aviles, "Analysis of tally correlations in - large light water reactors," *Proc. PHYSOR*, Kyoto, Japan, Sep. 28--Oct. 3 - (2014). - -- Nicholas Horelik, Bryan Herman, Benoit Forget, and Kord Smith, "Benchmark for - Evaluation and Validation of Reactor Simulations," - *Proc. Int. Conf. Mathematics and Computational Methods Applied to Nuclear - Science and Engineering*, Sun Valley, Idaho, May 5--9 (2013). - -- Jonathan A. Walsh, Benoit Forget, and Kord S. Smith, "Validation of OpenMC - Reactor Physics Simulations with the B&W 1810 Series Benchmarks," - *Trans. Am. Nucl. Soc.*, **109**, 1301--1304 (2013). - --------------------------- -Coupling and Multi-physics --------------------------- - -- Matt Ellis, Benoit Forget, Kord Smith, and Derek Gaston, "Preliminary coupling - of the Monte Carlo code OpenMC and the Multiphysics Object-Oriented Simulation - Environment (MOOSE) for analyzing Doppler feedback in Monte Carlo - simulations," *Proc. Joint Int. Conf. M&C+SNA+MC*, Nashville, Tennessee, - Apr. 19--23 (2015). - -- Bryan R. Herman, Benoit Forget, and Kord Smith, "Progress toward Monte - Carlo-thermal hydraulic coupling using low-order nonlinear diffusion - acceleration methods." *Ann. Nucl. Energy*, **84**, 63-72 - (2015). ``_ - -- Bryan R. Herman, Benoit Forget, and Kord Smith, "Utilizing CMFD in OpenMC to - Estimate Dominance Ratio and Adjoint," *Trans. Am. Nucl. Soc.*, **109**, - 1389-1392 (2013). - --------- -Geometry --------- - -- Derek Lax, William Boyd, Nicholas Horelik, Benoit Forget, and Kord Smith, "A - memory efficient algorithm for classifying unique regions in constructive - solid geometries," *Proc. PHYSOR*, Kyoto, Japan, Sep. 28--Oct. 3 (2014). - -------------- -Miscellaneous -------------- - -- William Boyd, Sterling Harper, and Paul K. Romano, "Equipping OpenMC for the - big data era," Accepted, *PHYSOR 2016*, Sun Valley, Idaho, May 1-5, 2016. - -- Qicang Shen, William Boyd, Benoit Forget, and Kord Smith, "Tally precision - triggers for the OpenMC Monte Carlo code," *Trans. Am. Nucl. Soc.*, **112**, - 637-640 (2015). - -- Timothy P. Burke, Brian C. Kiedrowski, and William R. Martin, "Flux and - Reaction Rate Kernel Density Estimators in OpenMC," *Trans. Am. Nucl. Soc.*, - **109**, 683-686 (2013). - ------------------------------------- -Multi-group Cross Section Generation ------------------------------------- - -- Adam G. Nelson and William R. Martin, "Improved Monte Carlo tallying of - multi-group scattering moments using the NDPP code," *Trans. Am. Nucl. Soc.*, - **113**, 645-648 (2015) - -- Adam G. Nelson and William R. Martin, "Improved Monte Carlo tallying of - multi-group scattering moment matrices," *Trans. Am. Nucl. Soc.*, **110**, - 217-220 (2014). - -- Adam G. Nelson and William R. Martin, "Improved Convergence of Monte Carlo - Generated Multi-Group Scattering Moments," *Proc. Int. Conf. Mathematics and - Computational Methods Applied to Nuclear Science and Engineering*, Sun Valley, - Idaho, May 5--9 (2013). - ------------- -Nuclear Data ------------- - -- Colin Josey, Pablo Ducru, Benoit Forget, and Kord Smith, "Windowed multipole - for cross section Doppler broadening," *J. Comput. Phys.*, In Press - (2016). ``_ - -- Colin Josey, Benoit Forget, and Kord Smith, "Windowed multipole sensitivity to - target accuracy of the optimization procedure," *J. Nucl. Sci. Technol.*, - **52**, 987-992 (2015). ``_ - -- Jonathan A. Walsh, Paul K. Romano, Benoit Forget, and Kord S. Smith, - "Optimizations of the energy grid search algorithm in continuous-energy Monte - Carlo particle transport codes", *Comput. Phys. Commun.*, **196**, 134-142 - (2015). ``_ - -- Jonathan A. Walsh, Benoit Forget, Kord S. Smith, Brian C. Kiedrowski, and - Forrest B. Brown, "Direct, on-the-fly calculation of unresolved resonance - region cross sections in Monte Carlo simulations," *Proc. Joint - Int. Conf. M&C+SNA+MC*, Nashville, Tennessee, Apr. 19--23 (2015). - -- Amanda L. Lund, Andrew R. Siegel, Benoit Forget, Colin Josey, and - Paul K. Romano, "Using fractional cascading to accelerate cross section - lookups in Monte Carlo particle transport calculations," *Proc. Joint - Int. Conf. M&C+SNA+MC*, Nashville, Tennessee, Apr. 19--23 (2015). - -- Ronald O. Rahaman, Andrew R. Siegel, and Paul K. Romano, "Monte Carlo - performance analysis for varying cross section parameter regimes," - *Proc. Joint Int. Conf. M&C+SNA+MC*, Nashville, Tennessee, Apr. 19--23 (2015). - -- Paul K. Romano and Timothy H. Trumbull, "Comparison of algorithms for Doppler - broadening pointwise tabulated cross sections," *Ann. Nucl. Energy*, **75**, - 358--364 (2015). ``_ - -- Tuomas Viitanen, Jaakko Leppanen, and Benoit Forget, "Target motion sampling - temperature treatment technique with track-length esimators in OpenMC -- - Preliminary results," *Proc. PHYSOR*, Kyoto, Japan, Sep. 28--Oct. 3 (2014). - -- Jonathan A. Walsh, Benoit Forget, and Kord S. Smith, "Accelerated sampling - of the free gas resonance elastic scattering kernel," *Ann. Nucl. Energy*, - **69**, 116--124 (2014). ``_ - -- Benoit Forget, Sheng Xu, and Kord Smith, "Direct Doppler broadening in Monte - Carlo simulations using the multipole representation," *Ann. Nucl. Energy*, - **64**, 78--85 (2014). ``_ - ------------ -Parallelism ------------ - -- Paul K. Romano, John R. Tramm, and Andrew R. Siegel, "Efficacy of hardware - threading for Monte Carlo particle transport calculations on multi- and - many-core systems," Accepted, *PHYSOR 2016*, Sun Valley, Idaho, May 1-5, 2016. - -- David Ozog, Allen D. Malony, and Andrew R. Siegel, "A performance analysis of - SIMD algorithms for Monte Carlo simulations of nuclear reactor cores," - *Proc. IEEE Int. Parallel and Distributed Processing Symposium*, Hyderabad, - India, May 25--29 (2015). - -- David Ozog, Allen D. Malony, and Andrew Siegel, "Full-core PWR transport - simulations on Xeon Phi clusters," *Proc. Joint Int. Conf. M&C+SNA+MC*, - Nashville, Tennessee, Apr. 19--23 (2015). - -- Paul K. Romano, Andrew R. Siegel, and Ronald O. Rahaman, "Influence of the - memory subsystem on Monte Carlo code performance," *Proc. Joint - Int. Conf. M&C+SNA+MC*, Nashville, Tennessee, Apr. 19--23 (2015). - -- Nicholas Horelik, Benoit Forget, Kord Smith, and Andrew Siegel, "Domain - decomposition and terabyte tallies with the OpenMC Monte Carlo neutron - transport code," *Proc. PHYSOR*, Kyoto Japan, Sep. 28--Oct. 3 (2014). - -- Nicholas Horelik, Andrew Siegel, Benoit Forget, and Kord Smith, "Monte Carlo - domain decomposition for robust nuclear reactor analysis," *Parallel Comput.*, - **40**, 646--660 (2014). ``_ - -- Andrew Siegel, Kord Smith, Kyle Felker, Paul Romano, Benoit Forget, and Peter - Beckman, "Improved cache performance in Monte Carlo transport calculations - using energy banding," *Comput. Phys. Commun.*, **185** (4), 1195--1199 - (2014). ``_ - -- Paul K. Romano, Benoit Forget, Kord Smith, and Andrew Siegel, "On the use of - tally servers in Monte Carlo simulations of light-water reactors," - *Proc. Joint International Conference on Supercomputing in Nuclear - Applications and Monte Carlo*, Paris, France, Oct. 27--31 - (2013). ``_ - -- Kyle G. Felker, Andrew R. Siegel, Kord S. Smith, Paul K. Romano, and Benoit - Forget, "The energy band memory server algorithm for parallel Monte Carlo - calculations," *Proc. Joint International Conference on Supercomputing in - Nuclear Applications and Monte Carlo*, Paris, France, Oct. 27--31 - (2013). ``_ - -- John R. Tramm and Andrew R. Siegel, "Memory Bottlenecks and Memory Contention - in Multi-Core Monte Carlo Transport Codes," *Proc. Joint International - Conference on Supercomputing in Nuclear Applications and Monte Carlo*, Paris, - France, Oct. 27--31 (2013). ``_ - -- Andrew R. Siegel, Kord Smith, Paul K. Romano, Benoit Forget, and Kyle Felker, - "Multi-core performance studies of a Monte Carlo neutron transport code," - *Int. J. High Perform. Comput. Appl.*, **28** (1), 87--96 - (2014). ``_ - -- Paul K. Romano, Andrew R. Siegel, Benoit Forget, and Kord Smith, "Data - decomposition of Monte Carlo particle transport simulations via tally - servers," *J. Comput. Phys.*, **252**, 20--36 - (2013). ``_ - -- Andrew R. Siegel, Kord Smith, Paul K. Romano, Benoit Forget, and Kyle Felker, - "The effect of load imbalances on the performance of Monte Carlo codes in LWR - analysis", *J. Comput. Phys.*, **235**, 901--911 (2013). - ``_ - -- Paul K. Romano and Benoit Forget, "Reducing Parallel Communication in Monte - Carlo Simulations via Batch Statistics," *Trans. Am. Nucl. Soc.*, **107**, - 519--522 (2012). - -- Paul K. Romano and Benoit Forget, "Parallel Fission Bank Algorithms in Monte - Carlo Criticality Calculations," *Nucl. Sci. Eng.*, **170**, 125--135 - (2012). ``_ diff --git a/_sources/pythonapi/ace.txt b/_sources/pythonapi/ace.txt deleted file mode 100644 index 4810ec4bb..000000000 --- a/_sources/pythonapi/ace.txt +++ /dev/null @@ -1,8 +0,0 @@ -.. _pythonapi_ace: - -========== -ACE Format -========== - -.. automodule:: openmc.ace - :members: diff --git a/_sources/pythonapi/cmfd.txt b/_sources/pythonapi/cmfd.txt deleted file mode 100644 index 51470069f..000000000 --- a/_sources/pythonapi/cmfd.txt +++ /dev/null @@ -1,8 +0,0 @@ -.. _pythonapi_cmfd: - -==== -CMFD -==== - -.. automodule:: openmc.cmfd - :members: diff --git a/_sources/pythonapi/element.txt b/_sources/pythonapi/element.txt deleted file mode 100644 index 473cbba45..000000000 --- a/_sources/pythonapi/element.txt +++ /dev/null @@ -1,8 +0,0 @@ -.. _pythonapi_element: - -======= -Element -======= - -.. automodule:: openmc.element - :members: diff --git a/_sources/pythonapi/energy_groups.txt b/_sources/pythonapi/energy_groups.txt deleted file mode 100644 index 28ca6f3fe..000000000 --- a/_sources/pythonapi/energy_groups.txt +++ /dev/null @@ -1,8 +0,0 @@ -.. _pythonapi_energy_groups: - -============= -Energy Groups -============= - -.. automodule:: openmc.mgxs.groups - :members: diff --git a/_sources/pythonapi/examples/mgxs-part-i-content.txt b/_sources/pythonapi/examples/mgxs-part-i-content.txt deleted file mode 100644 index 1a2e0af1b..000000000 --- a/_sources/pythonapi/examples/mgxs-part-i-content.txt +++ /dev/null @@ -1,910 +0,0 @@ - -This IPython Notebook introduces the use of the ``openmc.mgxs`` module -to calculate multi-group cross sections for an infinite homogeneous -medium. In particular, this Notebook introduces the the following -features: - -- **General equations** for scalar-flux averaged multi-group cross - sections -- Creation of multi-group cross sections for an **infinite homogeneous - medium** -- Use of **tally arithmetic** to manipulate multi-group cross sections - -**Note:** This Notebook illustrates the use of -`Pandas `__ ``DataFrames`` to containerize -multi-group cross section data. We recommend using -`Pandas `__ >v0.15.0 or later since OpenMC's -Python API leverages the multi-indexing feature included in the most -recent releases of `Pandas `__. - -Introduction to Multi-Group Cross Sections (MGXS) -------------------------------------------------- - -Many Monte Carlo particle transport codes, including OpenMC, use -continuous-energy nuclear cross section data. However, most -deterministic neutron transport codes use *multi-group cross sections* -defined over discretized energy bins or *energy groups*. An example of -U-235's continuous-energy fission cross section along with a 16-group -cross section computed for a light water reactor spectrum is displayed -below. - -.. code:: python - - from IPython.display import Image - Image(filename='images/mgxs.png', width=350) - - - - -.. image:: mgxs-part-i-content_files/mgxs-part-i-content_3_0.png - - - -A variety of tools employing different methodologies have been developed -over the years to compute multi-group cross sections for certain -applications, including NJOY (LANL), MC\ :math:`^2`-3 (ANL), and Serpent -(VTT). The ``openmc.mgxs`` Python module is designed to leverage -OpenMC's tally system to calculate multi-group cross sections with -arbitrary energy discretizations for fine-mesh heterogeneous -deterministic neutron transport applications. - -Before proceeding to illustrate how one may use the ``openmc.mgxs`` -module, it is worthwhile to define the general equations used to -calculate multi-group cross sections. This is only intended as a brief -overview of the methodology used by ``openmc.mgxs`` - we refer the -interested reader to the large body of literature on the subject for a -more comprehensive understanding of this complex topic. - -Introductory Notation -~~~~~~~~~~~~~~~~~~~~~ - -The continuous real-valued microscopic cross section may be denoted -:math:`\sigma_{n,x}(\mathbf{r}, E)` for position vector -:math:`\mathbf{r}`, energy :math:`E`, nuclide :math:`n` and interaction -type :math:`x`. Similarly, the scalar neutron flux may be denoted by -:math:`\Phi(\mathbf{r},E)` for position :math:`\mathbf{r}` and energy -:math:`E`. **Note**: Although nuclear cross sections are dependent on -the temperature :math:`T` of the interacting medium, the temperature -variable is neglected here for brevity. - -Spatial and Energy Discretization -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - -The energy domain for critical systems such as thermal reactors spans -more than 10 orders of magnitude of neutron energies from -10\ :math:`^{-5}` - 10\ :math:`^7` eV. The multi-group approximation -discretization divides this energy range into one or more energy groups. -In particular, for :math:`G` total groups, we denote an energy group -index :math:`g` such that :math:`g \in \{1, 2, ..., G\}`. The energy -group indices are defined such that the smaller group the higher the -energy, and vice versa. The integration over neutron energies across a -discrete energy group is commonly referred to as **energy -condensation**. - -Multi-group cross sections are computed for discretized spatial zones in -the geometry of interest. The spatial zones may be defined on a -structured and regular fuel assembly or pin cell mesh, an arbitrary -unstructured mesh or the constructive solid geometry used by OpenMC. For -a geometry with :math:`K` distinct spatial zones, we designate each -spatial zone an index :math:`k` such that -:math:`k \in \{1, 2, ..., K\}`. The volume of each spatial zone is -denoted by :math:`V_{k}`. The integration over discrete spatial zones is -commonly referred to as **spatial homogenization**. - -General Scalar-Flux Weighted MGXS -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - -The multi-group cross sections computed by ``openmc.mgxs`` are defined -as a *scalar flux-weighted average* of the microscopic cross sections -across each discrete energy group. This formulation is employed in order -to preserve the reaction rates within each energy group and spatial -zone. In particular, spatial homogenization and energy condensation are -used to compute the general multi-group cross section -:math:`\sigma_{n,x,k,g}` as follows: - -.. math:: \sigma_{n,x,k,g} = \frac{\int_{E_{g}}^{E_{g-1}}\mathrm{d}E'\int_{\mathbf{r} \in V_{k}}\mathrm{d}\mathbf{r}\sigma_{n,x}(\mathbf{r},E')\Phi(\mathbf{r},E')}{\int_{E_{g}}^{E_{g-1}}\mathrm{d}E'\int_{\mathbf{r} \in V_{k}}\mathrm{d}\mathbf{r}\Phi(\mathbf{r},E')} - -This scalar flux-weighted average microscopic cross section is computed -by ``openmc.mgxs`` for most multi-group cross sections, including total, -absorption, and fission reaction types. These double integrals are -stochastically computed with OpenMC's tally system - in particular, -`filters `__ on -the energy range and spatial zone (material, cell or universe) define -the bounds of integration for both numerator and denominator. - -Multi-Group Scattering Matrices -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - -The general multi-group cross section :math:`\sigma_{n,x,k,g}` is a -vector of :math:`G` values for each energy group :math:`g`. The equation -presented above only discretizes the energy of the incoming neutron and -neglects the outgoing energy of the neutron (if any). Hence, this -formulation must be extended to account for the outgoing energy of -neutrons in the discretized scattering matrix cross section used by -deterministic neutron transport codes. - -We denote the incoming and outgoing neutron energy groups as :math:`g` -and :math:`g'` for the microscopic scattering matrix cross section -:math:`\sigma_{n,s}(\mathbf{r},E)`. As before, spatial homogenization -and energy condensation are used to find the multi-group scattering -matrix cross section :math:`\sigma_{n,s,k,g \to g'}` as follows: - -.. math:: \sigma_{n,s,k,g\rightarrow g'} = \frac{\int_{E_{g'}}^{E_{g'-1}}\mathrm{d}E''\int_{E_{g}}^{E_{g-1}}\mathrm{d}E'\int_{\mathbf{r} \in V_{k}}\mathrm{d}\mathbf{r}\sigma_{n,s}(\mathbf{r},E'\rightarrow E'')\Phi(\mathbf{r},E')}{\int_{E_{g}}^{E_{g-1}}\mathrm{d}E'\int_{\mathbf{r} \in V_{k}}\mathrm{d}\mathbf{r}\Phi(\mathbf{r},E')} - -This scalar flux-weighted multi-group microscopic scattering matrix is -computed using OpenMC tallies with both energy in and energy out -filters. - -Multi-Group Fission Spectrum -~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - -The energy spectrum of neutrons emitted from fission is denoted by -:math:`\chi_{n}(\mathbf{r},E' \rightarrow E'')` for incoming and -outgoing energies :math:`E'` and :math:`E''`, respectively. Unlike the -multi-group cross sections :math:`\sigma_{n,x,k,g}` considered up to -this point, the fission spectrum is a probability distribution and must -sum to unity. The outgoing energy is typically much less dependent on -the incoming energy for fission than for scattering interactions. As a -result, it is common practice to integrate over the incoming neutron -energy when computing the multi-group fission spectrum. The fission -spectrum may be simplified as :math:`\chi_{n}(\mathbf{r},E)` with -outgoing energy :math:`E`. - -Unlike the multi-group cross sections defined up to this point, the -multi-group fission spectrum is weighted by the fission production rate -rather than the scalar flux. This formulation is intended to preserve -the total fission production rate in the multi-group deterministic -calculation. In order to mathematically define the multi-group fission -spectrum, we denote the microscopic fission cross section as -:math:`\sigma_{n,f}(\mathbf{r},E)` and the average number of neutrons -emitted from fission interactions with nuclide :math:`n` as -:math:`\nu_{n}(\mathbf{r},E)`. The multi-group fission spectrum -:math:`\chi_{n,k,g}` is then the probability of fission neutrons emitted -into energy group :math:`g`. - -Similar to before, spatial homogenization and energy condensation are -used to find the multi-group fission spectrum :math:`\chi_{n,k,g}` as -follows: - -.. math:: \chi_{n,k,g'} = \frac{\int_{E_{g'}}^{E_{g'-1}}\mathrm{d}E''\int_{0}^{\infty}\mathrm{d}E'\int_{\mathbf{r} \in V_{k}}\mathrm{d}\mathbf{r}\chi_{n}(\mathbf{r},E'\rightarrow E'')\nu_{n}(\mathbf{r},E')\sigma_{n,f}(\mathbf{r},E')\Phi(\mathbf{r},E')}{\int_{0}^{\infty}\mathrm{d}E'\int_{\mathbf{r} \in V_{k}}\mathrm{d}\mathbf{r}\nu_{n}(\mathbf{r},E')\sigma_{n,f}(\mathbf{r},E')\Phi(\mathbf{r},E')} - -The fission production-weighted multi-group fission spectrum is computed -using OpenMC tallies with both energy in and energy out filters. - -This concludes our brief overview on the methodology to compute -multi-group cross sections. The following sections detail more -concretely how users may employ the ``openmc.mgxs`` module to power -simulation workflows requiring multi-group cross sections for downstream -deterministic calculations. - -Generate Input Files --------------------- - -.. code:: python - - import numpy as np - import matplotlib.pyplot as plt - - import openmc - import openmc.mgxs as mgxs - - %matplotlib inline - -First we need to define materials that will be used in the problem. -Before defining a material, we must create nuclides that are used in the -material. - -.. code:: python - - # Instantiate some Nuclides - h1 = openmc.Nuclide('H-1') - o16 = openmc.Nuclide('O-16') - u235 = openmc.Nuclide('U-235') - u238 = openmc.Nuclide('U-238') - zr90 = openmc.Nuclide('Zr-90') - -With the nuclides we defined, we will now create a material for the -homogeneous medium. - -.. code:: python - - # Instantiate a Material and register the Nuclides - inf_medium = openmc.Material(name='moderator') - inf_medium.set_density('g/cc', 5.) - inf_medium.add_nuclide(h1, 0.028999667) - inf_medium.add_nuclide(o16, 0.01450188) - inf_medium.add_nuclide(u235, 0.000114142) - inf_medium.add_nuclide(u238, 0.006886019) - inf_medium.add_nuclide(zr90, 0.002116053) - -With our material, we can now create a ``MaterialsFile`` object that can -be exported to an actual XML file. - -.. code:: python - - # Instantiate a MaterialsFile, register all Materials, and export to XML - materials_file = openmc.MaterialsFile() - materials_file.default_xs = '71c' - materials_file.add_material(inf_medium) - materials_file.export_to_xml() - -Now let's move on to the geometry. This problem will be a simple square -cell with reflective boundary conditions to simulate an infinite -homogeneous medium. The first step is to create the outer bounding -surfaces of the problem. - -.. code:: python - - # Instantiate boundary Planes - min_x = openmc.XPlane(boundary_type='reflective', x0=-0.63) - max_x = openmc.XPlane(boundary_type='reflective', x0=0.63) - min_y = openmc.YPlane(boundary_type='reflective', y0=-0.63) - max_y = openmc.YPlane(boundary_type='reflective', y0=0.63) - -With the surfaces defined, we can now create a cell that is defined by -intersections of half-spaces created by the surfaces. - -.. code:: python - - # Instantiate a Cell - cell = openmc.Cell(cell_id=1, name='cell') - - # Register bounding Surfaces with the Cell - cell.region = +min_x & -max_x & +min_y & -max_y - - # Fill the Cell with the Material - cell.fill = inf_medium - -OpenMC requires that there is a "root" universe. Let us create a root -universe and add our square cell to it. - -.. code:: python - - # Instantiate Universe - root_universe = openmc.Universe(universe_id=0, name='root universe') - root_universe.add_cell(cell) - -We now must create a geometry that is assigned a root universe, put the -geometry into a ``GeometryFile`` object, and export it to XML. - -.. code:: python - - # Create Geometry and set root Universe - openmc_geometry = openmc.Geometry() - openmc_geometry.root_universe = root_universe - - # Instantiate a GeometryFile - geometry_file = openmc.GeometryFile() - geometry_file.geometry = openmc_geometry - - # Export to "geometry.xml" - geometry_file.export_to_xml() - -Next, we must define simulation parameters. In this case, we will use 10 -inactive batches and 40 active batches each with 2500 particles. - -.. code:: python - - # OpenMC simulation parameters - batches = 50 - inactive = 10 - particles = 2500 - - # Instantiate a SettingsFile - settings_file = openmc.SettingsFile() - settings_file.batches = batches - settings_file.inactive = inactive - settings_file.particles = particles - settings_file.output = {'tallies': True, 'summary': True} - bounds = [-0.63, -0.63, -0.63, 0.63, 0.63, 0.63] - settings_file.set_source_space('fission', bounds) - - # Export to "settings.xml" - settings_file.export_to_xml() - -Now we are ready to generate multi-group cross sections! First, let's -define a 2-group structure using the built-in ``EnergyGroups`` class. - -.. code:: python - - # Instantiate a 2-group EnergyGroups object - groups = mgxs.EnergyGroups() - groups.group_edges = np.array([0., 0.625e-6, 20.]) - -We can now use the ``EnergyGroups`` object, along with our previously -created materials and geometry, to instantiate some ``MGXS`` objects -from the ``openmc.mgxs`` module. In particular, the following are -subclasses of the generic and abstract ``MGXS`` class: - -- ``TotalXS`` -- ``TransportXS`` -- ``AbsorptionXS`` -- ``CaptureXS`` -- ``FissionXS`` -- ``NuFissionXS`` -- ``ScatterXS`` -- ``NuScatterXS`` -- ``ScatterMatrixXS`` -- ``NuScatterMatrixXS`` -- ``Chi`` - -These classes provide us with an interface to generate the tally inputs -as well as perform post-processing of OpenMC's tally data to compute the -respective multi-group cross sections. In this case, let's create the -multi-group total, absorption and scattering cross sections with our -2-group structure. - -.. code:: python - - # Instantiate a few different sections - total = mgxs.TotalXS(domain=cell, domain_type='cell', groups=groups) - absorption = mgxs.AbsorptionXS(domain=cell, domain_type='cell', groups=groups) - scattering = mgxs.ScatterXS(domain=cell, domain_type='cell', groups=groups) - -Each multi-group cross section object stores its tallies in a Python -dictionary called ``tallies``. We can inspect the tallies in the -dictionary for our ``Absorption`` object as follows. - -.. code:: python - - absorption.tallies - - - - -.. parsed-literal:: - - OrderedDict([('flux', Tally - ID = 10000 - Name = - Filters = - cell [1] - energy [ 0.00000000e+00 6.25000000e-07 2.00000000e+01] - Nuclides = total - Scores = ['flux'] - Estimator = tracklength - ), ('absorption', Tally - ID = 10001 - Name = - Filters = - cell [1] - energy [ 0.00000000e+00 6.25000000e-07 2.00000000e+01] - Nuclides = total - Scores = ['absorption'] - Estimator = tracklength - )]) - - - -The ``Absorption`` object includes tracklength tallies for the -'absorption' and 'flux' scores in the 2-group structure in cell 1. Now -that each ``MGXS`` object contains the tallies that it needs, we must -add these tallies to a ``TalliesFile`` object to generate the -"tallies.xml" input file for OpenMC. - -.. code:: python - - # Instantiate an empty TalliesFile - tallies_file = openmc.TalliesFile() - - # Add total tallies to the tallies file - for tally in total.tallies.values(): - tallies_file.add_tally(tally) - - # Add absorption tallies to the tallies file - for tally in absorption.tallies.values(): - tallies_file.add_tally(tally) - - # Add scattering tallies to the tallies file - for tally in scattering.tallies.values(): - tallies_file.add_tally(tally) - - # Export to "tallies.xml" - tallies_file.export_to_xml() - -Now we a have a complete set of inputs, so we can go ahead and run our -simulation. - -.. code:: python - - # Run OpenMC - executor = openmc.Executor() - executor.run_simulation() - - -.. parsed-literal:: - - - .d88888b. 888b d888 .d8888b. - d88P" "Y88b 8888b d8888 d88P Y88b - 888 888 88888b.d88888 888 888 - 888 888 88888b. .d88b. 88888b. 888Y88888P888 888 - 888 888 888 "88b d8P Y8b 888 "88b 888 Y888P 888 888 - 888 888 888 888 88888888 888 888 888 Y8P 888 888 888 - Y88b. .d88P 888 d88P Y8b. 888 888 888 " 888 Y88b d88P - "Y88888P" 88888P" "Y8888 888 888 888 888 "Y8888P" - __________________888______________________________________________________ - 888 - 888 - - Copyright: 2011-2015 Massachusetts Institute of Technology - License: http://mit-crpg.github.io/openmc/license.html - Version: 0.7.0 - Git SHA1: c4b14a5ef87f004528d35cbf33fef3ed15a386ca - Date/Time: 2015-12-02 09:11:05 - MPI Processes: 1 - - =========================================================================== - ========================> INITIALIZATION <========================= - =========================================================================== - - Reading settings XML file... - Reading cross sections XML file... - Reading geometry XML file... - Reading materials XML file... - Reading tallies XML file... - Building neighboring cells lists for each surface... - Loading ACE cross section table: 1001.71c - Loading ACE cross section table: 8016.71c - Loading ACE cross section table: 92235.71c - Loading ACE cross section table: 92238.71c - Loading ACE cross section table: 40090.71c - Maximum neutron transport energy: 20.0000 MeV for 1001.71c - Initializing source particles... - - =========================================================================== - ====================> K EIGENVALUE SIMULATION <==================== - =========================================================================== - - Bat./Gen. k Average k - ========= ======== ==================== - 1/1 1.19804 - 2/1 1.12945 - 3/1 1.15573 - 4/1 1.13929 - 5/1 1.16300 - 6/1 1.22117 - 7/1 1.19012 - 8/1 1.11299 - 9/1 1.16066 - 10/1 1.12566 - 11/1 1.20854 - 12/1 1.14691 1.17773 +/- 0.03082 - 13/1 1.17204 1.17583 +/- 0.01789 - 14/1 1.14148 1.16724 +/- 0.01529 - 15/1 1.17272 1.16834 +/- 0.01189 - 16/1 1.18575 1.17124 +/- 0.01014 - 17/1 1.20498 1.17606 +/- 0.00983 - 18/1 1.14754 1.17249 +/- 0.00923 - 19/1 1.18141 1.17348 +/- 0.00820 - 20/1 1.15074 1.17121 +/- 0.00768 - 21/1 1.15914 1.17011 +/- 0.00703 - 22/1 1.14586 1.16809 +/- 0.00673 - 23/1 1.18999 1.16978 +/- 0.00642 - 24/1 1.15101 1.16844 +/- 0.00609 - 25/1 1.13791 1.16640 +/- 0.00602 - 26/1 1.19791 1.16837 +/- 0.00597 - 27/1 1.19818 1.17012 +/- 0.00587 - 28/1 1.14160 1.16854 +/- 0.00576 - 29/1 1.11487 1.16571 +/- 0.00614 - 30/1 1.17538 1.16620 +/- 0.00584 - 31/1 1.20210 1.16791 +/- 0.00581 - 32/1 1.20078 1.16940 +/- 0.00574 - 33/1 1.14624 1.16839 +/- 0.00558 - 34/1 1.14618 1.16747 +/- 0.00542 - 35/1 1.16866 1.16752 +/- 0.00520 - 36/1 1.18565 1.16821 +/- 0.00504 - 37/1 1.16824 1.16821 +/- 0.00485 - 38/1 1.18299 1.16874 +/- 0.00471 - 39/1 1.21418 1.17031 +/- 0.00480 - 40/1 1.11167 1.16835 +/- 0.00504 - 41/1 1.11545 1.16665 +/- 0.00516 - 42/1 1.11114 1.16491 +/- 0.00529 - 43/1 1.14227 1.16423 +/- 0.00517 - 44/1 1.14104 1.16355 +/- 0.00506 - 45/1 1.16756 1.16366 +/- 0.00492 - 46/1 1.13065 1.16274 +/- 0.00487 - 47/1 1.11251 1.16139 +/- 0.00492 - 48/1 1.14731 1.16101 +/- 0.00481 - 49/1 1.16691 1.16117 +/- 0.00469 - 50/1 1.19679 1.16206 +/- 0.00465 - Creating state point statepoint.50.h5... - - =========================================================================== - ======================> SIMULATION FINISHED <====================== - =========================================================================== - - - =======================> TIMING STATISTICS <======================= - - Total time for initialization = 4.1700E-01 seconds - Reading cross sections = 8.9000E-02 seconds - Total time in simulation = 1.4728E+01 seconds - Time in transport only = 1.4712E+01 seconds - Time in inactive batches = 1.7890E+00 seconds - Time in active batches = 1.2939E+01 seconds - Time synchronizing fission bank = 5.0000E-03 seconds - Sampling source sites = 3.0000E-03 seconds - SEND/RECV source sites = 2.0000E-03 seconds - Time accumulating tallies = 1.0000E-03 seconds - Total time for finalization = 1.0000E-03 seconds - Total time elapsed = 1.5155E+01 seconds - Calculation Rate (inactive) = 13974.3 neutrons/second - Calculation Rate (active) = 7728.57 neutrons/second - - ============================> RESULTS <============================ - - k-effective (Collision) = 1.16131 +/- 0.00453 - k-effective (Track-length) = 1.16206 +/- 0.00465 - k-effective (Absorption) = 1.16096 +/- 0.00364 - Combined k-effective = 1.16120 +/- 0.00325 - Leakage Fraction = 0.00000 +/- 0.00000 - - - - - -.. parsed-literal:: - - 0 - - - -Tally Data Processing ---------------------- - -Our simulation ran successfully and created statepoint and summary -output files. We begin our analysis by instantiating a ``StatePoint`` -object. - -.. code:: python - - # Load the last statepoint file - sp = openmc.StatePoint('statepoint.50.h5') - -In addition to the statepoint file, our simulation also created a -summary file which encapsulates information about the materials and -geometry. This is necessary for the ``openmc.mgxs`` module to properly -process the tally data. We first create a ``Summary`` object and link it -with the statepoint. - -.. code:: python - - # Load the summary file and link it with the statepoint - su = openmc.Summary('summary.h5') - sp.link_with_summary(su) - -The statepoint is now ready to be analyzed by our multi-group cross -sections. We simply have to load the tallies from the ``StatePoint`` -into each object as follows and our ``MGXS`` objects will compute the -cross sections for us under-the-hood. - -.. code:: python - - # Load the tallies from the statepoint into each MGXS object - total.load_from_statepoint(sp) - absorption.load_from_statepoint(sp) - scattering.load_from_statepoint(sp) - -Voila! Our multi-group cross sections are now ready to rock 'n roll! - -Extracting and Storing MGXS Data --------------------------------- - -Let's first inspect our total cross section by printing it to the -screen. - -.. code:: python - - total.print_xs() - - -.. parsed-literal:: - - Multi-Group XS - Reaction Type = total - Domain Type = cell - Domain ID = 1 - Cross Sections [cm^-1]: - Group 1 [6.25e-07 - 20.0 MeV]: 6.81e-01 +/- 1.88e-01% - Group 2 [0.0 - 6.25e-07 MeV]: 1.40e+00 +/- 5.91e-01% - - - - - -Since the ``openmc.mgxs`` module uses `tally -arithmetic `__ -under-the-hood, the cross section is stored as a "derived" ``Tally`` -object. This means that it can be queried and manipulated using all of -the same methods supported for the ``Tally`` class in the OpenMC Python -API. For example, we can construct a -`Pandas `__ ``DataFrame`` of the multi-group -cross section data. - -.. code:: python - - df = scattering.get_pandas_dataframe() - df.head(10) - - - - -.. raw:: html - -
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
cellgroup innuclidemeanstd. dev.
111total0.6683230.001264
012total1.2932580.007624
-
- - - -Each multi-group cross section object can be easily exported to a -variety of file formats, including CSV, Excel, and LaTeX for storage or -data processing. - -.. code:: python - - absorption.export_xs_data(filename='absorption-xs', format='excel') - -The following code snippet shows how to export all three ``MGXS`` to the -same HDF5 binary data store. - -.. code:: python - - total.build_hdf5_store(filename='mgxs', append=True) - absorption.build_hdf5_store(filename='mgxs', append=True) - scattering.build_hdf5_store(filename='mgxs', append=True) - -Comparing MGXS with Tally Arithmetic ------------------------------------- - -Finally, we illustrate how one can leverage OpenMC's `tally -arithmetic `__ -data processing feature with ``MGXS`` objects. The ``openmc.mgxs`` -module uses tally arithmetic to compute multi-group cross sections with -automated uncertainty propagation. Each ``MGXS`` object includes an -``xs_tally`` attribute which is a "derived" ``Tally`` based on the -tallies needed to compute the cross section type of interest. These -derived tallies can be used in subsequent tally arithmetic operations. -For example, we can use tally artithmetic to confirm that the -``TotalXS`` is equal to the sum of the ``AbsorptionXS`` and -``ScatterXS`` objects. - -.. code:: python - - # Use tally arithmetic to compute the difference between the total, absorption and scattering - difference = total.xs_tally - absorption.xs_tally - scattering.xs_tally - - # The difference is a derived tally which can generate Pandas DataFrames for inspection - difference.get_pandas_dataframe() - - - - -.. raw:: html - -
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
cellenergy [MeV]nuclidescoremeanstd. dev.
01(0.0e+00 - 6.3e-07)total(((total / flux) - (absorption / flux)) - (sca...4.884981e-150.011274
11(6.3e-07 - 2.0e+01)total(((total / flux) - (absorption / flux)) - (sca...1.221245e-150.001802
-
- - - -Similarly, we can use tally arithmetic to compute the ratio of -``AbsorptionXS`` and ``ScatterXS`` to the ``TotalXS``. - -.. code:: python - - # Use tally arithmetic to compute the absorption-to-total MGXS ratio - absorption_to_total = absorption.xs_tally / total.xs_tally - - # The absorption-to-total ratio is a derived tally which can generate Pandas DataFrames for inspection - absorption_to_total.get_pandas_dataframe() - - - - -.. raw:: html - -
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
cellenergy [MeV]nuclidescoremeanstd. dev.
01(0.0e+00 - 6.3e-07)total((absorption / flux) / (total / flux))0.0762190.000651
11(6.3e-07 - 2.0e+01)total((absorption / flux) / (total / flux))0.0193190.000086
-
- - - -.. code:: python - - # Use tally arithmetic to compute the scattering-to-total MGXS ratio - scattering_to_total = scattering.xs_tally / total.xs_tally - - # The scattering-to-total ratio is a derived tally which can generate Pandas DataFrames for inspection - scattering_to_total.get_pandas_dataframe() - - - - -.. raw:: html - -
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
cellenergy [MeV]nuclidescoremeanstd. dev.
01(0.0e+00 - 6.3e-07)total((scatter / flux) / (total / flux))0.9237810.007714
11(6.3e-07 - 2.0e+01)total((scatter / flux) / (total / flux))0.9806810.002617
-
- - - -Lastly, we sum the derived scatter-to-total and absorption-to-total -ratios to confirm that they sum to unity. - -.. code:: python - - # Use tally arithmetic to ensure that the absorption- and scattering-to-total MGXS ratios sum to unity - sum_ratio = absorption_to_total + scattering_to_total - - # The scattering-to-total ratio is a derived tally which can generate Pandas DataFrames for inspection - sum_ratio.get_pandas_dataframe() - - - - -.. raw:: html - -
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
cellenergy [MeV]nuclidescoremeanstd. dev.
01(0.0e+00 - 6.3e-07)total(((absorption / flux) / (total / flux)) + ((sc...10.007741
11(6.3e-07 - 2.0e+01)total(((absorption / flux) / (total / flux)) + ((sc...10.002619
-
- - diff --git a/_sources/pythonapi/examples/mgxs-part-i.txt b/_sources/pythonapi/examples/mgxs-part-i.txt deleted file mode 100644 index 8b29183f0..000000000 --- a/_sources/pythonapi/examples/mgxs-part-i.txt +++ /dev/null @@ -1,13 +0,0 @@ -.. _notebook_mgxs_part_i: - -========================= -MGXS Part I: Introduction -========================= - -.. only:: html - - .. notebook:: mgxs-part-i.ipynb - -.. only:: latex - - IPython notebooks must be viewed in the online HTML documentation. diff --git a/_sources/pythonapi/examples/mgxs-part-ii-content.txt b/_sources/pythonapi/examples/mgxs-part-ii-content.txt deleted file mode 100644 index b549a8961..000000000 --- a/_sources/pythonapi/examples/mgxs-part-ii-content.txt +++ /dev/null @@ -1,1532 +0,0 @@ - -This IPython Notebook illustrates the use of the ``openmc.mgxs`` module -to calculate multi-group cross sections for a heterogeneous fuel pin -cell geometry. In particular, this Notebook illustrates the following -features: - -- Creation of multi-group cross sections on a **heterogeneous - geometry** -- Calculation of cross sections on a **nuclide-by-nuclide basis** -- The use of **`tally precision - triggers `__** - with multi-group cross sections -- Built-in features for **energy condensation** in downstream data - processing -- The use of **`PyNE `__ to plot** continuous-energy - vs. multi-group cross sections -- **Validation** of multi-group cross sections with - **`OpenMOC `__** - -**Note:** This Notebook was created using -`OpenMOC `__ to verify the -multi-group cross-sections generated by OpenMC. In order to run this -Notebook in its entirety, you must have -`OpenMOC `__ installed on your -system, along with OpenCG to convert the OpenMC geometries into OpenMOC -geometries. In addition, this Notebook illustrates the use of -`Pandas `__ ``DataFrames`` to containerize -multi-group cross section data. We recommend using -`Pandas `__ >v0.15.0 or later since OpenMC's -Python API leverages the multi-indexing feature included in the most -recent releases of `Pandas `__. - -Generate Input Files --------------------- - -.. code:: python - - import numpy as np - import matplotlib.pyplot as plt - import seaborn as sns - - import openmc - import openmc.mgxs as mgxs - import openmoc - from openmoc.compatible import get_openmoc_geometry - import pyne.ace - - %matplotlib inline - - -.. parsed-literal:: - - /usr/lib/pymodules/python2.7/matplotlib/__init__.py:1173: UserWarning: This call to matplotlib.use() has no effect - because the backend has already been chosen; - matplotlib.use() must be called *before* pylab, matplotlib.pyplot, - or matplotlib.backends is imported for the first time. - - warnings.warn(_use_error_msg) - /usr/local/lib/python2.7/dist-packages/IPython/kernel/__main__.py:9: QAWarning: pyne.rxname is not yet QA compliant. - /usr/local/lib/python2.7/dist-packages/IPython/kernel/__main__.py:9: QAWarning: pyne.ace is not yet QA compliant. - - -First we need to define materials that will be used in the problem. -Before defining a material, we must create nuclides that are used in the -material. - -.. code:: python - - # Instantiate some Nuclides - h1 = openmc.Nuclide('H-1') - o16 = openmc.Nuclide('O-16') - u235 = openmc.Nuclide('U-235') - u238 = openmc.Nuclide('U-238') - zr90 = openmc.Nuclide('Zr-90') - -With the nuclides we defined, we will now create three distinct -materials for water, clad and fuel. - -.. code:: python - - # 1.6% enriched fuel - fuel = openmc.Material(name='1.6% Fuel') - fuel.set_density('g/cm3', 10.31341) - fuel.add_nuclide(u235, 3.7503e-4) - fuel.add_nuclide(u238, 2.2625e-2) - fuel.add_nuclide(o16, 4.6007e-2) - - # borated water - water = openmc.Material(name='Borated Water') - water.set_density('g/cm3', 0.740582) - water.add_nuclide(h1, 4.9457e-2) - water.add_nuclide(o16, 2.4732e-2) - - # zircaloy - zircaloy = openmc.Material(name='Zircaloy') - zircaloy.set_density('g/cm3', 6.55) - zircaloy.add_nuclide(zr90, 7.2758e-3) - -With our materials, we can now create a ``MaterialsFile`` object that -can be exported to an actual XML file. - -.. code:: python - - # Instantiate a MaterialsFile, add Materials - materials_file = openmc.MaterialsFile() - materials_file.add_material(fuel) - materials_file.add_material(water) - materials_file.add_material(zircaloy) - materials_file.default_xs = '71c' - - # Export to "materials.xml" - materials_file.export_to_xml() - -Now let's move on to the geometry. Our problem will have three regions -for the fuel, the clad, and the surrounding coolant. The first step is -to create the bounding surfaces -- in this case two cylinders and six -reflective planes. - -.. code:: python - - # Create cylinders for the fuel and clad - fuel_outer_radius = openmc.ZCylinder(x0=0.0, y0=0.0, R=0.39218) - clad_outer_radius = openmc.ZCylinder(x0=0.0, y0=0.0, R=0.45720) - - # Create boundary planes to surround the geometry - min_x = openmc.XPlane(x0=-0.63, boundary_type='reflective') - max_x = openmc.XPlane(x0=+0.63, boundary_type='reflective') - min_y = openmc.YPlane(y0=-0.63, boundary_type='reflective') - max_y = openmc.YPlane(y0=+0.63, boundary_type='reflective') - min_z = openmc.ZPlane(z0=-0.63, boundary_type='reflective') - max_z = openmc.ZPlane(z0=+0.63, boundary_type='reflective') - -With the surfaces defined, we can now create cells that are defined by -intersections of half-spaces created by the surfaces. - -.. code:: python - - # Create a Universe to encapsulate a fuel pin - pin_cell_universe = openmc.Universe(name='1.6% Fuel Pin') - - # Create fuel Cell - fuel_cell = openmc.Cell(name='1.6% Fuel') - fuel_cell.fill = fuel - fuel_cell.region = -fuel_outer_radius - pin_cell_universe.add_cell(fuel_cell) - - # Create a clad Cell - clad_cell = openmc.Cell(name='1.6% Clad') - clad_cell.fill = zircaloy - clad_cell.region = +fuel_outer_radius & -clad_outer_radius - pin_cell_universe.add_cell(clad_cell) - - # Create a moderator Cell - moderator_cell = openmc.Cell(name='1.6% Moderator') - moderator_cell.fill = water - moderator_cell.region = +clad_outer_radius - pin_cell_universe.add_cell(moderator_cell) - -OpenMC requires that there is a "root" universe. Let us create a root -cell that is filled by the pin cell universe and then assign it to the -root universe. - -.. code:: python - - # Create root Cell - root_cell = openmc.Cell(name='root cell') - root_cell.region = +min_x & -max_x & +min_y & -max_y - root_cell.fill = pin_cell_universe - - # Create root Universe - root_universe = openmc.Universe(universe_id=0, name='root universe') - root_universe.add_cell(root_cell) - -We now must create a geometry that is assigned a root universe, put the -geometry into a ``GeometryFile`` object, and export it to XML. - -.. code:: python - - # Create Geometry and set root Universe - openmc_geometry = openmc.Geometry() - openmc_geometry.root_universe = root_universe - - # Instantiate a GeometryFile - geometry_file = openmc.GeometryFile() - geometry_file.geometry = openmc_geometry - - # Export to "geometry.xml" - geometry_file.export_to_xml() - -Next, we must define simulation parameters. In this case, we will use 10 -inactive batches and 190 active batches each with 10,000 particles. - -.. code:: python - - # OpenMC simulation parameters - batches = 50 - inactive = 10 - particles = 10000 - - # Instantiate a SettingsFile - settings_file = openmc.SettingsFile() - settings_file.batches = batches - settings_file.inactive = inactive - settings_file.particles = particles - settings_file.output = {'tallies': True, 'summary': True} - bounds = [-0.63, -0.63, -0.63, 0.63, 0.63, 0.63] - settings_file.set_source_space('fission', bounds) - - # Activate tally precision triggers - settings_file.trigger_active = True - settings_file.trigger_max_batches = settings_file.batches * 4 - - # Export to "settings.xml" - settings_file.export_to_xml() - -Now we are finally ready to make use of the ``openmc.mgxs`` module to -generate multi-group cross sections! First, let's define "coarse" -2-group and "fine" 8-group structures using the built-in -``EnergyGroups`` class. - -.. code:: python - - # Instantiate a "coarse" 2-group EnergyGroups object - coarse_groups = mgxs.EnergyGroups() - coarse_groups.group_edges = np.array([0., 0.625e-6, 20.]) - - # Instantiate a "fine" 8-group EnergyGroups object - fine_groups = mgxs.EnergyGroups() - fine_groups.group_edges = np.array([0., 0.058e-6, 0.14e-6, 0.28e-6, - 0.625e-6, 4.e-6, 5.53e-3, 821.e-3, 20.]) - -Now we will instantiate a variety of ``MGXS`` objects needed to run an -OpenMOC simulation to verify the accuracy of our cross sections. In -particular, we define transport, fission, nu-fission, nu-scatter and chi -cross sections for each of the three cells in the fuel pin with the -8-group structure as our energy groups. - -.. code:: python - - # Extract all Cells filled by Materials - openmc_cells = openmc_geometry.get_all_material_cells() - - # Create dictionary to store multi-group cross sections for all cells - xs_library = {} - - # Instantiate 8-group cross sections for each cell - for cell in openmc_cells: - xs_library[cell.id] = {} - xs_library[cell.id]['transport'] = mgxs.TransportXS(groups=fine_groups) - xs_library[cell.id]['fission'] = mgxs.FissionXS(groups=fine_groups) - xs_library[cell.id]['nu-fission'] = mgxs.NuFissionXS(groups=fine_groups) - xs_library[cell.id]['nu-scatter'] = mgxs.NuScatterMatrixXS(groups=fine_groups) - xs_library[cell.id]['chi'] = mgxs.Chi(groups=fine_groups) - -Next, we showcase the use of OpenMC's `tally precision -trigger `__ -feature in conjunction with the ``openmc.mgxs`` module. In particular, -we will assign a tally trigger of 1E-2 on the standard deviation for -each of the tallies used to compute multi-group cross sections. - -.. code:: python - - # Create a tally trigger for +/- 0.01 on each tally used to compute the multi-group cross sections - tally_trigger = openmc.Trigger('std_dev', 1E-2) - - # Add the tally trigger to each of the multi-group cross section tallies - for cell in openmc_cells: - for mgxs_type in xs_library[cell.id]: - xs_library[cell.id][mgxs_type].tally_trigger = tally_trigger - -Now, we must loop over all cells to set the cross section domains to the -various cells - fuel, clad and moderator - included in the geometry. In -addition, we will set each cross section to tally cross sections on a -per-nuclide basis through the use of the ``MGXS`` class' boolean -``by_nuclide`` instance attribute. - -.. code:: python - - # Instantiate an empty TalliesFile - tallies_file = openmc.TalliesFile() - - # Iterate over all cells and cross section types - for cell in openmc_cells: - for rxn_type in xs_library[cell.id]: - - # Set the cross sections domain type to the cell - xs_library[cell.id][rxn_type].domain = cell - xs_library[cell.id][rxn_type].domain_type = 'cell' - - # Tally cross sections by nuclide - xs_library[cell.id][rxn_type].by_nuclide = True - - # Add OpenMC tallies to the tallies file for XML generation - for tally in xs_library[cell.id][rxn_type].tallies.values(): - tallies_file.add_tally(tally, merge=True) - - # Export to "tallies.xml" - tallies_file.export_to_xml() - -Now we a have a complete set of inputs, so we can go ahead and run our -simulation. - -.. code:: python - - # Run OpenMC - executor = openmc.Executor() - executor.run_simulation(output=True, mpi_procs=3) - - -.. parsed-literal:: - - - .d88888b. 888b d888 .d8888b. - d88P" "Y88b 8888b d8888 d88P Y88b - 888 888 88888b.d88888 888 888 - 888 888 88888b. .d88b. 88888b. 888Y88888P888 888 - 888 888 888 "88b d8P Y8b 888 "88b 888 Y888P 888 888 - 888 888 888 888 88888888 888 888 888 Y8P 888 888 888 - Y88b. .d88P 888 d88P Y8b. 888 888 888 " 888 Y88b d88P - "Y88888P" 88888P" "Y8888 888 888 888 888 "Y8888P" - __________________888______________________________________________________ - 888 - 888 - - Copyright: 2011-2015 Massachusetts Institute of Technology - License: http://mit-crpg.github.io/openmc/license.html - Version: 0.7.0 - Git SHA1: c4b14a5ef87f004528d35cbf33fef3ed15a386ca - Date/Time: 2015-12-02 09:13:42 - MPI Processes: 3 - - =========================================================================== - ========================> INITIALIZATION <========================= - =========================================================================== - - Reading settings XML file... - Reading cross sections XML file... - Reading geometry XML file... - Reading materials XML file... - Reading tallies XML file... - Building neighboring cells lists for each surface... - Loading ACE cross section table: 92235.71c - Loading ACE cross section table: 92238.71c - Loading ACE cross section table: 8016.71c - Loading ACE cross section table: 1001.71c - Loading ACE cross section table: 40090.71c - Maximum neutron transport energy: 20.0000 MeV for 92235.71c - Initializing source particles... - - =========================================================================== - ====================> K EIGENVALUE SIMULATION <==================== - =========================================================================== - - Bat./Gen. k Average k - ========= ======== ==================== - 1/1 1.22593 - 2/1 1.24245 - 3/1 1.24545 - 4/1 1.21868 - 5/1 1.22429 - 6/1 1.22607 - 7/1 1.21456 - 8/1 1.23816 - 9/1 1.25060 - 10/1 1.22806 - 11/1 1.19821 - 12/1 1.19897 1.19859 +/- 0.00038 - 13/1 1.22119 1.20612 +/- 0.00754 - 14/1 1.20701 1.20634 +/- 0.00533 - 15/1 1.24784 1.21464 +/- 0.00927 - 16/1 1.22413 1.21622 +/- 0.00773 - 17/1 1.25050 1.22112 +/- 0.00817 - 18/1 1.22006 1.22099 +/- 0.00707 - 19/1 1.22813 1.22178 +/- 0.00629 - 20/1 1.22791 1.22239 +/- 0.00566 - 21/1 1.22729 1.22284 +/- 0.00514 - 22/1 1.19867 1.22083 +/- 0.00510 - 23/1 1.23796 1.22214 +/- 0.00488 - 24/1 1.22412 1.22228 +/- 0.00452 - 25/1 1.22638 1.22256 +/- 0.00421 - 26/1 1.22181 1.22251 +/- 0.00394 - 27/1 1.19055 1.22063 +/- 0.00415 - 28/1 1.20683 1.21986 +/- 0.00399 - 29/1 1.21689 1.21971 +/- 0.00378 - 30/1 1.23670 1.22056 +/- 0.00368 - 31/1 1.21396 1.22024 +/- 0.00352 - 32/1 1.21389 1.21995 +/- 0.00337 - 33/1 1.24649 1.22111 +/- 0.00342 - 34/1 1.23204 1.22156 +/- 0.00330 - 35/1 1.20768 1.22101 +/- 0.00322 - 36/1 1.22271 1.22107 +/- 0.00309 - 37/1 1.21796 1.22096 +/- 0.00298 - 38/1 1.23842 1.22158 +/- 0.00293 - 39/1 1.23080 1.22190 +/- 0.00285 - 40/1 1.23572 1.22236 +/- 0.00279 - 41/1 1.21691 1.22218 +/- 0.00271 - 42/1 1.24616 1.22293 +/- 0.00272 - 43/1 1.21903 1.22282 +/- 0.00264 - 44/1 1.22967 1.22302 +/- 0.00257 - 45/1 1.22053 1.22295 +/- 0.00250 - 46/1 1.24087 1.22344 +/- 0.00248 - 47/1 1.20251 1.22288 +/- 0.00248 - 48/1 1.20331 1.22236 +/- 0.00246 - 49/1 1.22724 1.22249 +/- 0.00240 - 50/1 1.24798 1.22313 +/- 0.00243 - Triggers unsatisfied, max unc./thresh. is 1.32110 for scatter-p1 in tally 10054 - The estimated number of batches is 80 - Creating state point statepoint.050.h5... - 51/1 1.22253 1.22311 +/- 0.00237 - 52/1 1.24330 1.22359 +/- 0.00236 - 53/1 1.23251 1.22380 +/- 0.00231 - 54/1 1.21133 1.22352 +/- 0.00228 - 55/1 1.24503 1.22399 +/- 0.00228 - 56/1 1.22013 1.22391 +/- 0.00223 - 57/1 1.23877 1.22423 +/- 0.00220 - 58/1 1.23793 1.22451 +/- 0.00218 - 59/1 1.21018 1.22422 +/- 0.00215 - 60/1 1.22417 1.22422 +/- 0.00211 - 61/1 1.23094 1.22435 +/- 0.00207 - 62/1 1.23310 1.22452 +/- 0.00204 - 63/1 1.22488 1.22453 +/- 0.00200 - 64/1 1.22702 1.22457 +/- 0.00196 - 65/1 1.18834 1.22391 +/- 0.00204 - 66/1 1.23112 1.22404 +/- 0.00200 - 67/1 1.21611 1.22390 +/- 0.00197 - 68/1 1.22513 1.22392 +/- 0.00194 - 69/1 1.21741 1.22381 +/- 0.00191 - 70/1 1.22484 1.22383 +/- 0.00188 - 71/1 1.19662 1.22338 +/- 0.00190 - 72/1 1.23315 1.22354 +/- 0.00187 - 73/1 1.22796 1.22361 +/- 0.00185 - 74/1 1.21417 1.22346 +/- 0.00182 - 75/1 1.21020 1.22326 +/- 0.00181 - 76/1 1.23413 1.22343 +/- 0.00179 - 77/1 1.22184 1.22340 +/- 0.00176 - 78/1 1.20309 1.22310 +/- 0.00176 - 79/1 1.23458 1.22327 +/- 0.00174 - 80/1 1.20724 1.22304 +/- 0.00173 - Triggers satisfied for batch 80 - Creating state point statepoint.080.h5... - - =========================================================================== - ======================> SIMULATION FINISHED <====================== - =========================================================================== - - - =======================> TIMING STATISTICS <======================= - - Total time for initialization = 7.5700E-01 seconds - Reading cross sections = 1.5800E-01 seconds - Total time in simulation = 1.4921E+02 seconds - Time in transport only = 1.4336E+02 seconds - Time in inactive batches = 8.6210E+00 seconds - Time in active batches = 1.4059E+02 seconds - Time synchronizing fission bank = 5.6060E+00 seconds - Sampling source sites = 1.4000E-02 seconds - SEND/RECV source sites = 4.0000E-03 seconds - Time accumulating tallies = 6.0000E-03 seconds - Total time for finalization = 1.3000E-02 seconds - Total time elapsed = 1.5002E+02 seconds - Calculation Rate (inactive) = 11599.6 neutrons/second - Calculation Rate (active) = 2845.11 neutrons/second - - ============================> RESULTS <============================ - - k-effective (Collision) = 1.22327 +/- 0.00148 - k-effective (Track-length) = 1.22304 +/- 0.00173 - k-effective (Absorption) = 1.22407 +/- 0.00129 - Combined k-effective = 1.22373 +/- 0.00113 - Leakage Fraction = 0.00000 +/- 0.00000 - - - - - -.. parsed-literal:: - - 0 - - - -Tally Data Processing ---------------------- - -Our simulation ran successfully and created statepoint and summary -output files. We begin our analysis by instantiating a ``StatePoint`` -object. - -.. code:: python - - # Load the last statepoint file - sp = openmc.StatePoint('statepoint.080.h5') - -In addition to the statepoint file, our simulation also created a -summary file which encapsulates information about the materials and -geometry. This is necessary for the ``openmc.mgxs`` module to properly -process the tally data. We first create a ``Summary`` object and link it -with the statepoint. - -.. code:: python - - # Load the summary file and link it with the statepoint - su = openmc.Summary('summary.h5') - sp.link_with_summary(su) - -The statepoint is now ready to be analyzed by our multi-group cross -sections. We simply have to load the tallies from the ``StatePoint`` -into each object as follows and our ``MGXS`` objects will compute the -cross sections for us under-the-hood. - -.. code:: python - - # Iterate over all cells and cross section types - for cell in openmc_cells: - for rxn_type in xs_library[cell.id]: - xs_library[cell.id][rxn_type].load_from_statepoint(sp) - -That's it! Our multi-group cross sections are now ready for the big -spotlight. This time we have cross sections in three distinct spatial -zones - fuel, clad and moderator - on a per-nuclide basis. - -Extracting and Storing MGXS Data --------------------------------- - -Let's first inspect one of our cross sections by printing it to the -screen as a microscopic cross section in units of barns. - -.. code:: python - - nufission = xs_library[fuel_cell.id]['nu-fission'] - nufission.print_xs(xs_type='micro', nuclides=['U-235', 'U-238']) - - -.. parsed-literal:: - - Multi-Group XS - Reaction Type = nu-fission - Domain Type = cell - Domain ID = 10000 - Nuclide = U-235 - Cross Sections [barns]: - Group 1 [0.821 - 20.0 MeV]: 3.31e+00 +/- 1.88e-01% - Group 2 [0.00553 - 0.821 MeV]: 3.97e+00 +/- 1.24e-01% - Group 3 [4e-06 - 0.00553 MeV]: 5.50e+01 +/- 2.02e-01% - Group 4 [6.25e-07 - 4e-06 MeV]: 8.83e+01 +/- 3.56e-01% - Group 5 [2.8e-07 - 6.25e-07 MeV]: 2.90e+02 +/- 4.54e-01% - Group 6 [1.4e-07 - 2.8e-07 MeV]: 4.49e+02 +/- 4.10e-01% - Group 7 [5.8e-08 - 1.4e-07 MeV]: 6.87e+02 +/- 2.56e-01% - Group 8 [0.0 - 5.8e-08 MeV]: 1.44e+03 +/- 2.82e-01% - - Nuclide = U-238 - Cross Sections [barns]: - Group 1 [0.821 - 20.0 MeV]: 1.06e+00 +/- 2.30e-01% - Group 2 [0.00553 - 0.821 MeV]: 1.21e-03 +/- 2.25e-01% - Group 3 [4e-06 - 0.00553 MeV]: 5.82e-04 +/- 3.09e+00% - Group 4 [6.25e-07 - 4e-06 MeV]: 6.54e-06 +/- 3.27e-01% - Group 5 [2.8e-07 - 6.25e-07 MeV]: 1.07e-05 +/- 4.39e-01% - Group 6 [1.4e-07 - 2.8e-07 MeV]: 1.55e-05 +/- 4.12e-01% - Group 7 [5.8e-08 - 1.4e-07 MeV]: 2.30e-05 +/- 2.57e-01% - Group 8 [0.0 - 5.8e-08 MeV]: 4.24e-05 +/- 2.81e-01% - - - - - -Our multi-group cross sections are capable of summing across all -nuclides to provide us with macroscopic cross sections as well. - -.. code:: python - - nufission = xs_library[fuel_cell.id]['nu-fission'] - nufission.print_xs(xs_type='macro', nuclides='sum') - - -.. parsed-literal:: - - Multi-Group XS - Reaction Type = nu-fission - Domain Type = cell - Domain ID = 10000 - Cross Sections [cm^-1]: - Group 1 [0.821 - 20.0 MeV]: 2.52e-02 +/- 2.19e-01% - Group 2 [0.00553 - 0.821 MeV]: 1.51e-03 +/- 1.22e-01% - Group 3 [4e-06 - 0.00553 MeV]: 2.06e-02 +/- 2.02e-01% - Group 4 [6.25e-07 - 4e-06 MeV]: 3.31e-02 +/- 3.56e-01% - Group 5 [2.8e-07 - 6.25e-07 MeV]: 1.09e-01 +/- 4.54e-01% - Group 6 [1.4e-07 - 2.8e-07 MeV]: 1.69e-01 +/- 4.10e-01% - Group 7 [5.8e-08 - 1.4e-07 MeV]: 2.58e-01 +/- 2.56e-01% - Group 8 [0.0 - 5.8e-08 MeV]: 5.40e-01 +/- 2.82e-01% - - - - - -Although a printed report is nice, it is not scalable or flexible. Let's -extract the microscopic cross section data for the moderator as a -`Pandas `__ ``DataFrame`` . - -.. code:: python - - nuscatter = xs_library[moderator_cell.id]['nu-scatter'] - df = nuscatter.get_pandas_dataframe(xs_type='micro') - df.head(10) - - - - -.. raw:: html - -
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
cellgroup ingroup outnuclidemeanstd. dev.
1261000211H-10.2340220.003645
1271000211O-161.5603050.006280
1241000212H-11.5880250.002815
1251000212O-160.2851470.001392
1221000213H-10.0107760.000186
1231000213O-160.0000000.000000
1201000214H-10.0000230.000010
1211000214O-160.0000000.000000
1181000215H-10.0000000.000000
1191000215O-160.0000000.000000
-
- - - -Next, we illustate how one can easily take multi-group cross sections -and condense them down to a coarser energy group structure. The ``MGXS`` -class includes a ``get_condensed_xs(...)`` method which takes an -``EnergyGroups`` parameter with a coarse(r) group structure and returns -a new ``MGXS`` condensed to the coarse groups. We illustrate this -process below using the 2-group structure created earlier. - -.. code:: python - - # Extract the 16-group transport cross section for the fuel - fine_xs = xs_library[fuel_cell.id]['transport'] - - # Condense to the 2-group structure - condensed_xs = fine_xs.get_condensed_xs(coarse_groups) - -Group condensation is as simple as that! We now have a new coarse -2-group ``TransportXS`` in addition to our original 16-group -``TransportXS``. Let's inspect the 2-group ``TransportXS`` by printing -it to the screen and extracting a Pandas ``DataFrame`` as we have -already learned how to do. - -.. code:: python - - condensed_xs.print_xs() - - -.. parsed-literal:: - - Multi-Group XS - Reaction Type = transport - Domain Type = cell - Domain ID = 10000 - Nuclide = U-235 - Cross Sections [cm^-1]: - Group 1 [6.25e-07 - 20.0 MeV]: 7.81e-03 +/- 4.75e-01% - Group 2 [0.0 - 6.25e-07 MeV]: 1.82e-01 +/- 1.89e-01% - - Nuclide = U-238 - Cross Sections [cm^-1]: - Group 1 [6.25e-07 - 20.0 MeV]: 2.17e-01 +/- 1.31e-01% - Group 2 [0.0 - 6.25e-07 MeV]: 2.53e-01 +/- 2.08e-01% - - Nuclide = O-16 - Cross Sections [cm^-1]: - Group 1 [6.25e-07 - 20.0 MeV]: 1.45e-01 +/- 1.50e-01% - Group 2 [0.0 - 6.25e-07 MeV]: 1.74e-01 +/- 2.66e-01% - - - - - -.. code:: python - - df = condensed_xs.get_pandas_dataframe(xs_type='micro') - df - - - - -.. raw:: html - -
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
cellgroup innuclidemeanstd. dev.
3100001U-23520.8281270.098842
4100001U-2389.5822950.012550
5100001O-163.1573580.004725
0100002U-235485.2176490.916465
1100002U-23811.1760810.023196
2100002O-163.7881670.010090
-
- - - -Verification with OpenMOC -------------------------- - -Now, let's verify our cross sections using OpenMOC. First, we use OpenCG -construct an equivalent OpenMOC geometry. - -.. code:: python - - # Create an OpenMOC Geometry from the OpenCG Geometry - openmoc_geometry = get_openmoc_geometry(su.opencg_geometry) - -Next, we we can inject the multi-group cross sections into the -equivalent fuel pin cell OpenMOC geometry. - -.. code:: python - - # Get all OpenMOC cells in the gometry - openmoc_cells = openmoc_geometry.getRootUniverse().getAllCells() - - # Inject multi-group cross sections into OpenMOC Materials - for cell_id, cell in openmoc_cells.items(): - - # Ignore the root cell - if cell.getName() == 'root cell': - continue - - # Get a reference to the Material filling this Cell - openmoc_material = cell.getFillMaterial() - - # Set the number of energy groups for the Material - openmoc_material.setNumEnergyGroups(fine_groups.num_groups) - - # Extract the appropriate cross section objects for this cell - transport = xs_library[cell_id]['transport'] - nufission = xs_library[cell_id]['nu-fission'] - nuscatter = xs_library[cell_id]['nu-scatter'] - chi = xs_library[cell_id]['chi'] - - # Inject NumPy arrays of cross section data into the Material - # NOTE: Sum across nuclides to get macro cross sections needed by OpenMOC - openmoc_material.setSigmaT(transport.get_xs(nuclides='sum').flatten()) - openmoc_material.setNuSigmaF(nufission.get_xs(nuclides='sum').flatten()) - openmoc_material.setSigmaS(nuscatter.get_xs(nuclides='sum').flatten()) - openmoc_material.setChi(chi.get_xs(nuclides='sum').flatten()) - -We are now ready to run OpenMOC to verify our cross-sections from -OpenMC. - -.. code:: python - - # Generate tracks for OpenMOC - openmoc_geometry.initializeFlatSourceRegions() - track_generator = openmoc.TrackGenerator(openmoc_geometry, num_azim=128, spacing=0.1) - track_generator.generateTracks() - - # Run OpenMOC - solver = openmoc.CPUSolver(track_generator) - solver.computeEigenvalue() - - -.. parsed-literal:: - - [ NORMAL ] Importing ray tracing data from file... - [ NORMAL ] Computing the eigenvalue... - [ NORMAL ] Iteration 0: k_eff = 0.574633 res = 1.959E-316 - [ NORMAL ] Iteration 1: k_eff = 0.679931 res = 4.254E-01 - [ NORMAL ] Iteration 2: k_eff = 0.660910 res = 1.832E-01 - [ NORMAL ] Iteration 3: k_eff = 0.658975 res = 2.797E-02 - [ NORMAL ] Iteration 4: k_eff = 0.642976 res = 2.928E-03 - [ NORMAL ] Iteration 5: k_eff = 0.625710 res = 2.428E-02 - [ NORMAL ] Iteration 6: k_eff = 0.606520 res = 2.685E-02 - [ NORMAL ] Iteration 7: k_eff = 0.587277 res = 3.067E-02 - [ NORMAL ] Iteration 8: k_eff = 0.568777 res = 3.173E-02 - [ NORMAL ] Iteration 9: k_eff = 0.551415 res = 3.150E-02 - [ NORMAL ] Iteration 10: k_eff = 0.535708 res = 3.052E-02 - [ NORMAL ] Iteration 11: k_eff = 0.521916 res = 2.849E-02 - [ NORMAL ] Iteration 12: k_eff = 0.510221 res = 2.575E-02 - [ NORMAL ] Iteration 13: k_eff = 0.500691 res = 2.241E-02 - [ NORMAL ] Iteration 14: k_eff = 0.493392 res = 1.868E-02 - [ NORMAL ] Iteration 15: k_eff = 0.488317 res = 1.458E-02 - [ NORMAL ] Iteration 16: k_eff = 0.485438 res = 1.028E-02 - [ NORMAL ] Iteration 17: k_eff = 0.484705 res = 5.896E-03 - [ NORMAL ] Iteration 18: k_eff = 0.486045 res = 1.510E-03 - [ NORMAL ] Iteration 19: k_eff = 0.489362 res = 2.766E-03 - [ NORMAL ] Iteration 20: k_eff = 0.494546 res = 6.824E-03 - [ NORMAL ] Iteration 21: k_eff = 0.501481 res = 1.059E-02 - [ NORMAL ] Iteration 22: k_eff = 0.510041 res = 1.402E-02 - [ NORMAL ] Iteration 23: k_eff = 0.520094 res = 1.707E-02 - [ NORMAL ] Iteration 24: k_eff = 0.531507 res = 1.971E-02 - [ NORMAL ] Iteration 25: k_eff = 0.544144 res = 2.194E-02 - [ NORMAL ] Iteration 26: k_eff = 0.557872 res = 2.378E-02 - [ NORMAL ] Iteration 27: k_eff = 0.572557 res = 2.523E-02 - [ NORMAL ] Iteration 28: k_eff = 0.588072 res = 2.632E-02 - [ NORMAL ] Iteration 29: k_eff = 0.604293 res = 2.710E-02 - [ NORMAL ] Iteration 30: k_eff = 0.621101 res = 2.758E-02 - [ NORMAL ] Iteration 31: k_eff = 0.638382 res = 2.781E-02 - [ NORMAL ] Iteration 32: k_eff = 0.656032 res = 2.782E-02 - [ NORMAL ] Iteration 33: k_eff = 0.673950 res = 2.765E-02 - [ NORMAL ] Iteration 34: k_eff = 0.692043 res = 2.731E-02 - [ NORMAL ] Iteration 35: k_eff = 0.710227 res = 2.685E-02 - [ NORMAL ] Iteration 36: k_eff = 0.728423 res = 2.628E-02 - [ NORMAL ] Iteration 37: k_eff = 0.746558 res = 2.562E-02 - [ NORMAL ] Iteration 38: k_eff = 0.764569 res = 2.490E-02 - [ NORMAL ] Iteration 39: k_eff = 0.782396 res = 2.412E-02 - [ NORMAL ] Iteration 40: k_eff = 0.799989 res = 2.332E-02 - [ NORMAL ] Iteration 41: k_eff = 0.817301 res = 2.249E-02 - [ NORMAL ] Iteration 42: k_eff = 0.834292 res = 2.164E-02 - [ NORMAL ] Iteration 43: k_eff = 0.850927 res = 2.079E-02 - [ NORMAL ] Iteration 44: k_eff = 0.867177 res = 1.994E-02 - [ NORMAL ] Iteration 45: k_eff = 0.883017 res = 1.910E-02 - [ NORMAL ] Iteration 46: k_eff = 0.898427 res = 1.827E-02 - [ NORMAL ] Iteration 47: k_eff = 0.913389 res = 1.745E-02 - [ NORMAL ] Iteration 48: k_eff = 0.927891 res = 1.665E-02 - [ NORMAL ] Iteration 49: k_eff = 0.941925 res = 1.588E-02 - [ NORMAL ] Iteration 50: k_eff = 0.955483 res = 1.512E-02 - [ NORMAL ] Iteration 51: k_eff = 0.968562 res = 1.439E-02 - [ NORMAL ] Iteration 52: k_eff = 0.981161 res = 1.369E-02 - [ NORMAL ] Iteration 53: k_eff = 0.993282 res = 1.301E-02 - [ NORMAL ] Iteration 54: k_eff = 1.004928 res = 1.235E-02 - [ NORMAL ] Iteration 55: k_eff = 1.016104 res = 1.172E-02 - [ NORMAL ] Iteration 56: k_eff = 1.026816 res = 1.112E-02 - [ NORMAL ] Iteration 57: k_eff = 1.037073 res = 1.054E-02 - [ NORMAL ] Iteration 58: k_eff = 1.046883 res = 9.989E-03 - [ NORMAL ] Iteration 59: k_eff = 1.056257 res = 9.460E-03 - [ NORMAL ] Iteration 60: k_eff = 1.065205 res = 8.954E-03 - [ NORMAL ] Iteration 61: k_eff = 1.073739 res = 8.472E-03 - [ NORMAL ] Iteration 62: k_eff = 1.081871 res = 8.012E-03 - [ NORMAL ] Iteration 63: k_eff = 1.089613 res = 7.573E-03 - [ NORMAL ] Iteration 64: k_eff = 1.096979 res = 7.156E-03 - [ NORMAL ] Iteration 65: k_eff = 1.103980 res = 6.760E-03 - [ NORMAL ] Iteration 66: k_eff = 1.110631 res = 6.382E-03 - [ NORMAL ] Iteration 67: k_eff = 1.116943 res = 6.024E-03 - [ NORMAL ] Iteration 68: k_eff = 1.122931 res = 5.684E-03 - [ NORMAL ] Iteration 69: k_eff = 1.128607 res = 5.361E-03 - [ NORMAL ] Iteration 70: k_eff = 1.133984 res = 5.055E-03 - [ NORMAL ] Iteration 71: k_eff = 1.139075 res = 4.764E-03 - [ NORMAL ] Iteration 72: k_eff = 1.143892 res = 4.489E-03 - [ NORMAL ] Iteration 73: k_eff = 1.148447 res = 4.229E-03 - [ NORMAL ] Iteration 74: k_eff = 1.152752 res = 3.982E-03 - [ NORMAL ] Iteration 75: k_eff = 1.156819 res = 3.749E-03 - [ NORMAL ] Iteration 76: k_eff = 1.160659 res = 3.528E-03 - [ NORMAL ] Iteration 77: k_eff = 1.164282 res = 3.319E-03 - [ NORMAL ] Iteration 78: k_eff = 1.167701 res = 3.122E-03 - [ NORMAL ] Iteration 79: k_eff = 1.170923 res = 2.936E-03 - [ NORMAL ] Iteration 80: k_eff = 1.173961 res = 2.760E-03 - [ NORMAL ] Iteration 81: k_eff = 1.176822 res = 2.594E-03 - [ NORMAL ] Iteration 82: k_eff = 1.179516 res = 2.437E-03 - [ NORMAL ] Iteration 83: k_eff = 1.182052 res = 2.289E-03 - [ NORMAL ] Iteration 84: k_eff = 1.184438 res = 2.150E-03 - [ NORMAL ] Iteration 85: k_eff = 1.186682 res = 2.019E-03 - [ NORMAL ] Iteration 86: k_eff = 1.188792 res = 1.895E-03 - [ NORMAL ] Iteration 87: k_eff = 1.190775 res = 1.778E-03 - [ NORMAL ] Iteration 88: k_eff = 1.192639 res = 1.668E-03 - [ NORMAL ] Iteration 89: k_eff = 1.194389 res = 1.565E-03 - [ NORMAL ] Iteration 90: k_eff = 1.196032 res = 1.468E-03 - [ NORMAL ] Iteration 91: k_eff = 1.197575 res = 1.376E-03 - [ NORMAL ] Iteration 92: k_eff = 1.199023 res = 1.290E-03 - [ NORMAL ] Iteration 93: k_eff = 1.200381 res = 1.209E-03 - [ NORMAL ] Iteration 94: k_eff = 1.201654 res = 1.133E-03 - [ NORMAL ] Iteration 95: k_eff = 1.202849 res = 1.061E-03 - [ NORMAL ] Iteration 96: k_eff = 1.203968 res = 9.939E-04 - [ NORMAL ] Iteration 97: k_eff = 1.205017 res = 9.307E-04 - [ NORMAL ] Iteration 98: k_eff = 1.206000 res = 8.714E-04 - [ NORMAL ] Iteration 99: k_eff = 1.206921 res = 8.157E-04 - [ NORMAL ] Iteration 100: k_eff = 1.207783 res = 7.634E-04 - [ NORMAL ] Iteration 101: k_eff = 1.208590 res = 7.144E-04 - [ NORMAL ] Iteration 102: k_eff = 1.209346 res = 6.684E-04 - [ NORMAL ] Iteration 103: k_eff = 1.210053 res = 6.252E-04 - [ NORMAL ] Iteration 104: k_eff = 1.210715 res = 5.848E-04 - [ NORMAL ] Iteration 105: k_eff = 1.211334 res = 5.468E-04 - [ NORMAL ] Iteration 106: k_eff = 1.211913 res = 5.113E-04 - [ NORMAL ] Iteration 107: k_eff = 1.212454 res = 4.779E-04 - [ NORMAL ] Iteration 108: k_eff = 1.212960 res = 4.467E-04 - [ NORMAL ] Iteration 109: k_eff = 1.213434 res = 4.175E-04 - [ NORMAL ] Iteration 110: k_eff = 1.213876 res = 3.901E-04 - [ NORMAL ] Iteration 111: k_eff = 1.214289 res = 3.644E-04 - [ NORMAL ] Iteration 112: k_eff = 1.214675 res = 3.404E-04 - [ NORMAL ] Iteration 113: k_eff = 1.215036 res = 3.180E-04 - [ NORMAL ] Iteration 114: k_eff = 1.215373 res = 2.969E-04 - [ NORMAL ] Iteration 115: k_eff = 1.215687 res = 2.773E-04 - [ NORMAL ] Iteration 116: k_eff = 1.215981 res = 2.589E-04 - [ NORMAL ] Iteration 117: k_eff = 1.216255 res = 2.416E-04 - [ NORMAL ] Iteration 118: k_eff = 1.216511 res = 2.256E-04 - [ NORMAL ] Iteration 119: k_eff = 1.216750 res = 2.105E-04 - [ NORMAL ] Iteration 120: k_eff = 1.216973 res = 1.964E-04 - [ NORMAL ] Iteration 121: k_eff = 1.217181 res = 1.833E-04 - [ NORMAL ] Iteration 122: k_eff = 1.217376 res = 1.710E-04 - [ NORMAL ] Iteration 123: k_eff = 1.217557 res = 1.595E-04 - [ NORMAL ] Iteration 124: k_eff = 1.217726 res = 1.488E-04 - [ NORMAL ] Iteration 125: k_eff = 1.217883 res = 1.388E-04 - [ NORMAL ] Iteration 126: k_eff = 1.218030 res = 1.294E-04 - [ NORMAL ] Iteration 127: k_eff = 1.218167 res = 1.207E-04 - [ NORMAL ] Iteration 128: k_eff = 1.218295 res = 1.125E-04 - [ NORMAL ] Iteration 129: k_eff = 1.218414 res = 1.049E-04 - [ NORMAL ] Iteration 130: k_eff = 1.218525 res = 9.777E-05 - [ NORMAL ] Iteration 131: k_eff = 1.218629 res = 9.113E-05 - [ NORMAL ] Iteration 132: k_eff = 1.218725 res = 8.494E-05 - [ NORMAL ] Iteration 133: k_eff = 1.218815 res = 7.916E-05 - [ NORMAL ] Iteration 134: k_eff = 1.218899 res = 7.376E-05 - [ NORMAL ] Iteration 135: k_eff = 1.218977 res = 6.873E-05 - [ NORMAL ] Iteration 136: k_eff = 1.219050 res = 6.404E-05 - [ NORMAL ] Iteration 137: k_eff = 1.219117 res = 5.966E-05 - [ NORMAL ] Iteration 138: k_eff = 1.219180 res = 5.557E-05 - [ NORMAL ] Iteration 139: k_eff = 1.219239 res = 5.177E-05 - [ NORMAL ] Iteration 140: k_eff = 1.219294 res = 4.822E-05 - [ NORMAL ] Iteration 141: k_eff = 1.219345 res = 4.491E-05 - [ NORMAL ] Iteration 142: k_eff = 1.219392 res = 4.182E-05 - [ NORMAL ] Iteration 143: k_eff = 1.219437 res = 3.894E-05 - [ NORMAL ] Iteration 144: k_eff = 1.219478 res = 3.626E-05 - [ NORMAL ] Iteration 145: k_eff = 1.219516 res = 3.376E-05 - [ NORMAL ] Iteration 146: k_eff = 1.219552 res = 3.144E-05 - [ NORMAL ] Iteration 147: k_eff = 1.219585 res = 2.927E-05 - [ NORMAL ] Iteration 148: k_eff = 1.219616 res = 2.724E-05 - [ NORMAL ] Iteration 149: k_eff = 1.219645 res = 2.536E-05 - [ NORMAL ] Iteration 150: k_eff = 1.219672 res = 2.361E-05 - [ NORMAL ] Iteration 151: k_eff = 1.219696 res = 2.197E-05 - [ NORMAL ] Iteration 152: k_eff = 1.219720 res = 2.045E-05 - [ NORMAL ] Iteration 153: k_eff = 1.219741 res = 1.903E-05 - [ NORMAL ] Iteration 154: k_eff = 1.219761 res = 1.771E-05 - [ NORMAL ] Iteration 155: k_eff = 1.219780 res = 1.648E-05 - [ NORMAL ] Iteration 156: k_eff = 1.219797 res = 1.534E-05 - [ NORMAL ] Iteration 157: k_eff = 1.219814 res = 1.427E-05 - [ NORMAL ] Iteration 158: k_eff = 1.219829 res = 1.328E-05 - [ NORMAL ] Iteration 159: k_eff = 1.219843 res = 1.235E-05 - [ NORMAL ] Iteration 160: k_eff = 1.219856 res = 1.149E-05 - [ NORMAL ] Iteration 161: k_eff = 1.219868 res = 1.069E-05 - - -We report the eigenvalues computed by OpenMC and OpenMOC here together -to summarize our results. - -.. code:: python - - # Print report of keff and bias with OpenMC - openmoc_keff = solver.getKeff() - openmc_keff = sp.k_combined[0] - bias = (openmoc_keff - openmc_keff) * 1e5 - - print('openmc keff = {0:1.6f}'.format(openmc_keff)) - print('openmoc keff = {0:1.6f}'.format(openmoc_keff)) - print('bias [pcm]: {0:1.1f}'.format(bias)) - - -.. parsed-literal:: - - openmc keff = 1.223729 - openmoc keff = 1.219868 - bias [pcm]: -386.1 - - -As a sanity check, let's run a simulation with the coarse 2-group cross -sections to ensure that they also produce a reasonable result. - -.. code:: python - - openmoc_geometry = get_openmoc_geometry(su.opencg_geometry) - openmoc_cells = openmoc_geometry.getRootUniverse().getAllCells() - - # Inject multi-group cross sections into OpenMOC Materials - for cell_id, cell in openmoc_cells.items(): - - # Ignore the root cell - if cell.getName() == 'root cell': - continue - - openmoc_material = cell.getFillMaterial() - openmoc_material.setNumEnergyGroups(coarse_groups.num_groups) - - # Extract the appropriate cross section objects for this cell - transport = xs_library[cell_id]['transport'] - nufission = xs_library[cell_id]['nu-fission'] - nuscatter = xs_library[cell_id]['nu-scatter'] - chi = xs_library[cell_id]['chi'] - - # Perform group condensation - transport = transport.get_condensed_xs(coarse_groups) - nufission = nufission.get_condensed_xs(coarse_groups) - nuscatter = nuscatter.get_condensed_xs(coarse_groups) - chi = chi.get_condensed_xs(coarse_groups) - - # Inject NumPy arrays of cross section data into the Material - openmoc_material.setSigmaT(transport.get_xs(nuclides='sum').flatten()) - openmoc_material.setNuSigmaF(nufission.get_xs(nuclides='sum').flatten()) - openmoc_material.setSigmaS(nuscatter.get_xs(nuclides='sum').flatten()) - openmoc_material.setChi(chi.get_xs(nuclides='sum').flatten()) - -.. code:: python - - # Generate tracks for OpenMOC - openmoc_geometry.initializeFlatSourceRegions() - track_generator = openmoc.TrackGenerator(openmoc_geometry, num_azim=128, spacing=0.1) - track_generator.generateTracks() - - # Run OpenMOC - solver = openmoc.CPUSolver(track_generator) - solver.computeEigenvalue() - - -.. parsed-literal:: - - [ NORMAL ] Importing ray tracing data from file... - [ NORMAL ] Computing the eigenvalue... - [ NORMAL ] Iteration 0: k_eff = 0.495594 res = 1.959E-316 - [ NORMAL ] Iteration 1: k_eff = 0.557312 res = 5.044E-01 - [ NORMAL ] Iteration 2: k_eff = 0.518115 res = 1.245E-01 - [ NORMAL ] Iteration 3: k_eff = 0.509016 res = 7.033E-02 - [ NORMAL ] Iteration 4: k_eff = 0.496279 res = 1.756E-02 - [ NORMAL ] Iteration 5: k_eff = 0.488357 res = 2.502E-02 - [ NORMAL ] Iteration 6: k_eff = 0.482659 res = 1.596E-02 - [ NORMAL ] Iteration 7: k_eff = 0.479523 res = 1.167E-02 - [ NORMAL ] Iteration 8: k_eff = 0.478568 res = 6.497E-03 - [ NORMAL ] Iteration 9: k_eff = 0.479590 res = 1.991E-03 - [ NORMAL ] Iteration 10: k_eff = 0.482388 res = 2.136E-03 - [ NORMAL ] Iteration 11: k_eff = 0.486774 res = 5.834E-03 - [ NORMAL ] Iteration 12: k_eff = 0.492575 res = 9.091E-03 - [ NORMAL ] Iteration 13: k_eff = 0.499632 res = 1.192E-02 - [ NORMAL ] Iteration 14: k_eff = 0.507799 res = 1.433E-02 - [ NORMAL ] Iteration 15: k_eff = 0.516943 res = 1.635E-02 - [ NORMAL ] Iteration 16: k_eff = 0.526942 res = 1.801E-02 - [ NORMAL ] Iteration 17: k_eff = 0.537681 res = 1.934E-02 - [ NORMAL ] Iteration 18: k_eff = 0.549060 res = 2.038E-02 - [ NORMAL ] Iteration 19: k_eff = 0.560984 res = 2.116E-02 - [ NORMAL ] Iteration 20: k_eff = 0.573368 res = 2.172E-02 - [ NORMAL ] Iteration 21: k_eff = 0.586133 res = 2.207E-02 - [ NORMAL ] Iteration 22: k_eff = 0.599207 res = 2.226E-02 - [ NORMAL ] Iteration 23: k_eff = 0.612528 res = 2.231E-02 - [ NORMAL ] Iteration 24: k_eff = 0.626035 res = 2.223E-02 - [ NORMAL ] Iteration 25: k_eff = 0.639676 res = 2.205E-02 - [ NORMAL ] Iteration 26: k_eff = 0.653402 res = 2.179E-02 - [ NORMAL ] Iteration 27: k_eff = 0.667170 res = 2.146E-02 - [ NORMAL ] Iteration 28: k_eff = 0.680942 res = 2.107E-02 - [ NORMAL ] Iteration 29: k_eff = 0.694681 res = 2.064E-02 - [ NORMAL ] Iteration 30: k_eff = 0.708356 res = 2.018E-02 - [ NORMAL ] Iteration 31: k_eff = 0.721940 res = 1.969E-02 - [ NORMAL ] Iteration 32: k_eff = 0.735406 res = 1.918E-02 - [ NORMAL ] Iteration 33: k_eff = 0.748734 res = 1.865E-02 - [ NORMAL ] Iteration 34: k_eff = 0.761904 res = 1.812E-02 - [ NORMAL ] Iteration 35: k_eff = 0.774897 res = 1.759E-02 - [ NORMAL ] Iteration 36: k_eff = 0.787700 res = 1.705E-02 - [ NORMAL ] Iteration 37: k_eff = 0.800299 res = 1.652E-02 - [ NORMAL ] Iteration 38: k_eff = 0.812684 res = 1.600E-02 - [ NORMAL ] Iteration 39: k_eff = 0.824844 res = 1.547E-02 - [ NORMAL ] Iteration 40: k_eff = 0.836772 res = 1.496E-02 - [ NORMAL ] Iteration 41: k_eff = 0.848462 res = 1.446E-02 - [ NORMAL ] Iteration 42: k_eff = 0.859908 res = 1.397E-02 - [ NORMAL ] Iteration 43: k_eff = 0.871105 res = 1.349E-02 - [ NORMAL ] Iteration 44: k_eff = 0.882052 res = 1.302E-02 - [ NORMAL ] Iteration 45: k_eff = 0.892745 res = 1.257E-02 - [ NORMAL ] Iteration 46: k_eff = 0.903184 res = 1.212E-02 - [ NORMAL ] Iteration 47: k_eff = 0.913367 res = 1.169E-02 - [ NORMAL ] Iteration 48: k_eff = 0.923297 res = 1.128E-02 - [ NORMAL ] Iteration 49: k_eff = 0.932972 res = 1.087E-02 - [ NORMAL ] Iteration 50: k_eff = 0.942394 res = 1.048E-02 - [ NORMAL ] Iteration 51: k_eff = 0.951566 res = 1.010E-02 - [ NORMAL ] Iteration 52: k_eff = 0.960490 res = 9.733E-03 - [ NORMAL ] Iteration 53: k_eff = 0.969168 res = 9.378E-03 - [ NORMAL ] Iteration 54: k_eff = 0.977604 res = 9.035E-03 - [ NORMAL ] Iteration 55: k_eff = 0.985800 res = 8.704E-03 - [ NORMAL ] Iteration 56: k_eff = 0.993761 res = 8.384E-03 - [ NORMAL ] Iteration 57: k_eff = 1.001491 res = 8.076E-03 - [ NORMAL ] Iteration 58: k_eff = 1.008992 res = 7.778E-03 - [ NORMAL ] Iteration 59: k_eff = 1.016271 res = 7.490E-03 - [ NORMAL ] Iteration 60: k_eff = 1.023330 res = 7.213E-03 - [ NORMAL ] Iteration 61: k_eff = 1.030174 res = 6.946E-03 - [ NORMAL ] Iteration 62: k_eff = 1.036809 res = 6.688E-03 - [ NORMAL ] Iteration 63: k_eff = 1.043238 res = 6.440E-03 - [ NORMAL ] Iteration 64: k_eff = 1.049466 res = 6.201E-03 - [ NORMAL ] Iteration 65: k_eff = 1.055498 res = 5.970E-03 - [ NORMAL ] Iteration 66: k_eff = 1.061339 res = 5.748E-03 - [ NORMAL ] Iteration 67: k_eff = 1.066993 res = 5.534E-03 - [ NORMAL ] Iteration 68: k_eff = 1.072465 res = 5.327E-03 - [ NORMAL ] Iteration 69: k_eff = 1.077760 res = 5.129E-03 - [ NORMAL ] Iteration 70: k_eff = 1.082882 res = 4.937E-03 - [ NORMAL ] Iteration 71: k_eff = 1.087837 res = 4.753E-03 - [ NORMAL ] Iteration 72: k_eff = 1.092628 res = 4.575E-03 - [ NORMAL ] Iteration 73: k_eff = 1.097260 res = 4.404E-03 - [ NORMAL ] Iteration 74: k_eff = 1.101737 res = 4.239E-03 - [ NORMAL ] Iteration 75: k_eff = 1.106065 res = 4.081E-03 - [ NORMAL ] Iteration 76: k_eff = 1.110247 res = 3.928E-03 - [ NORMAL ] Iteration 77: k_eff = 1.114288 res = 3.781E-03 - [ NORMAL ] Iteration 78: k_eff = 1.118191 res = 3.639E-03 - [ NORMAL ] Iteration 79: k_eff = 1.121961 res = 3.503E-03 - [ NORMAL ] Iteration 80: k_eff = 1.125603 res = 3.372E-03 - [ NORMAL ] Iteration 81: k_eff = 1.129119 res = 3.245E-03 - [ NORMAL ] Iteration 82: k_eff = 1.132513 res = 3.124E-03 - [ NORMAL ] Iteration 83: k_eff = 1.135790 res = 3.007E-03 - [ NORMAL ] Iteration 84: k_eff = 1.138954 res = 2.894E-03 - [ NORMAL ] Iteration 85: k_eff = 1.142007 res = 2.785E-03 - [ NORMAL ] Iteration 86: k_eff = 1.144953 res = 2.681E-03 - [ NORMAL ] Iteration 87: k_eff = 1.147796 res = 2.580E-03 - [ NORMAL ] Iteration 88: k_eff = 1.150539 res = 2.483E-03 - [ NORMAL ] Iteration 89: k_eff = 1.153185 res = 2.390E-03 - [ NORMAL ] Iteration 90: k_eff = 1.155738 res = 2.300E-03 - [ NORMAL ] Iteration 91: k_eff = 1.158200 res = 2.214E-03 - [ NORMAL ] Iteration 92: k_eff = 1.160575 res = 2.130E-03 - [ NORMAL ] Iteration 93: k_eff = 1.162865 res = 2.050E-03 - [ NORMAL ] Iteration 94: k_eff = 1.165073 res = 1.973E-03 - [ NORMAL ] Iteration 95: k_eff = 1.167202 res = 1.899E-03 - [ NORMAL ] Iteration 96: k_eff = 1.169255 res = 1.828E-03 - [ NORMAL ] Iteration 97: k_eff = 1.171234 res = 1.759E-03 - [ NORMAL ] Iteration 98: k_eff = 1.173142 res = 1.693E-03 - [ NORMAL ] Iteration 99: k_eff = 1.174980 res = 1.629E-03 - [ NORMAL ] Iteration 100: k_eff = 1.176753 res = 1.567E-03 - [ NORMAL ] Iteration 101: k_eff = 1.178461 res = 1.508E-03 - [ NORMAL ] Iteration 102: k_eff = 1.180107 res = 1.452E-03 - [ NORMAL ] Iteration 103: k_eff = 1.181694 res = 1.397E-03 - [ NORMAL ] Iteration 104: k_eff = 1.183222 res = 1.344E-03 - [ NORMAL ] Iteration 105: k_eff = 1.184695 res = 1.294E-03 - [ NORMAL ] Iteration 106: k_eff = 1.186115 res = 1.245E-03 - [ NORMAL ] Iteration 107: k_eff = 1.187482 res = 1.198E-03 - [ NORMAL ] Iteration 108: k_eff = 1.188799 res = 1.153E-03 - [ NORMAL ] Iteration 109: k_eff = 1.190068 res = 1.109E-03 - [ NORMAL ] Iteration 110: k_eff = 1.191290 res = 1.067E-03 - [ NORMAL ] Iteration 111: k_eff = 1.192468 res = 1.027E-03 - [ NORMAL ] Iteration 112: k_eff = 1.193602 res = 9.883E-04 - [ NORMAL ] Iteration 113: k_eff = 1.194694 res = 9.510E-04 - [ NORMAL ] Iteration 114: k_eff = 1.195746 res = 9.151E-04 - [ NORMAL ] Iteration 115: k_eff = 1.196759 res = 8.805E-04 - [ NORMAL ] Iteration 116: k_eff = 1.197735 res = 8.473E-04 - [ NORMAL ] Iteration 117: k_eff = 1.198674 res = 8.152E-04 - [ NORMAL ] Iteration 118: k_eff = 1.199579 res = 7.844E-04 - [ NORMAL ] Iteration 119: k_eff = 1.200450 res = 7.548E-04 - [ NORMAL ] Iteration 120: k_eff = 1.201289 res = 7.262E-04 - [ NORMAL ] Iteration 121: k_eff = 1.202097 res = 6.988E-04 - [ NORMAL ] Iteration 122: k_eff = 1.202874 res = 6.723E-04 - [ NORMAL ] Iteration 123: k_eff = 1.203623 res = 6.469E-04 - [ NORMAL ] Iteration 124: k_eff = 1.204344 res = 6.224E-04 - [ NORMAL ] Iteration 125: k_eff = 1.205038 res = 5.989E-04 - [ NORMAL ] Iteration 126: k_eff = 1.205706 res = 5.762E-04 - [ NORMAL ] Iteration 127: k_eff = 1.206349 res = 5.544E-04 - [ NORMAL ] Iteration 128: k_eff = 1.206968 res = 5.334E-04 - [ NORMAL ] Iteration 129: k_eff = 1.207564 res = 5.132E-04 - [ NORMAL ] Iteration 130: k_eff = 1.208138 res = 4.938E-04 - [ NORMAL ] Iteration 131: k_eff = 1.208690 res = 4.751E-04 - [ NORMAL ] Iteration 132: k_eff = 1.209221 res = 4.570E-04 - [ NORMAL ] Iteration 133: k_eff = 1.209733 res = 4.397E-04 - [ NORMAL ] Iteration 134: k_eff = 1.210225 res = 4.231E-04 - [ NORMAL ] Iteration 135: k_eff = 1.210699 res = 4.070E-04 - [ NORMAL ] Iteration 136: k_eff = 1.211155 res = 3.916E-04 - [ NORMAL ] Iteration 137: k_eff = 1.211594 res = 3.767E-04 - [ NORMAL ] Iteration 138: k_eff = 1.212017 res = 3.624E-04 - [ NORMAL ] Iteration 139: k_eff = 1.212423 res = 3.487E-04 - [ NORMAL ] Iteration 140: k_eff = 1.212815 res = 3.355E-04 - [ NORMAL ] Iteration 141: k_eff = 1.213191 res = 3.227E-04 - [ NORMAL ] Iteration 142: k_eff = 1.213554 res = 3.105E-04 - [ NORMAL ] Iteration 143: k_eff = 1.213902 res = 2.987E-04 - [ NORMAL ] Iteration 144: k_eff = 1.214238 res = 2.874E-04 - [ NORMAL ] Iteration 145: k_eff = 1.214561 res = 2.764E-04 - [ NORMAL ] Iteration 146: k_eff = 1.214872 res = 2.659E-04 - [ NORMAL ] Iteration 147: k_eff = 1.215171 res = 2.558E-04 - [ NORMAL ] Iteration 148: k_eff = 1.215458 res = 2.461E-04 - [ NORMAL ] Iteration 149: k_eff = 1.215735 res = 2.368E-04 - [ NORMAL ] Iteration 150: k_eff = 1.216002 res = 2.278E-04 - [ NORMAL ] Iteration 151: k_eff = 1.216258 res = 2.191E-04 - [ NORMAL ] Iteration 152: k_eff = 1.216504 res = 2.108E-04 - [ NORMAL ] Iteration 153: k_eff = 1.216742 res = 2.028E-04 - [ NORMAL ] Iteration 154: k_eff = 1.216970 res = 1.951E-04 - [ NORMAL ] Iteration 155: k_eff = 1.217190 res = 1.876E-04 - [ NORMAL ] Iteration 156: k_eff = 1.217401 res = 1.805E-04 - [ NORMAL ] Iteration 157: k_eff = 1.217604 res = 1.736E-04 - [ NORMAL ] Iteration 158: k_eff = 1.217800 res = 1.670E-04 - [ NORMAL ] Iteration 159: k_eff = 1.217988 res = 1.607E-04 - [ NORMAL ] Iteration 160: k_eff = 1.218169 res = 1.546E-04 - [ NORMAL ] Iteration 161: k_eff = 1.218344 res = 1.487E-04 - [ NORMAL ] Iteration 162: k_eff = 1.218511 res = 1.430E-04 - [ NORMAL ] Iteration 163: k_eff = 1.218673 res = 1.376E-04 - [ NORMAL ] Iteration 164: k_eff = 1.218828 res = 1.324E-04 - [ NORMAL ] Iteration 165: k_eff = 1.218977 res = 1.273E-04 - [ NORMAL ] Iteration 166: k_eff = 1.219121 res = 1.225E-04 - [ NORMAL ] Iteration 167: k_eff = 1.219259 res = 1.178E-04 - [ NORMAL ] Iteration 168: k_eff = 1.219392 res = 1.133E-04 - [ NORMAL ] Iteration 169: k_eff = 1.219520 res = 1.090E-04 - [ NORMAL ] Iteration 170: k_eff = 1.219643 res = 1.049E-04 - [ NORMAL ] Iteration 171: k_eff = 1.219761 res = 1.009E-04 - [ NORMAL ] Iteration 172: k_eff = 1.219875 res = 9.702E-05 - [ NORMAL ] Iteration 173: k_eff = 1.219984 res = 9.332E-05 - [ NORMAL ] Iteration 174: k_eff = 1.220090 res = 8.976E-05 - [ NORMAL ] Iteration 175: k_eff = 1.220191 res = 8.634E-05 - [ NORMAL ] Iteration 176: k_eff = 1.220288 res = 8.305E-05 - [ NORMAL ] Iteration 177: k_eff = 1.220382 res = 7.989E-05 - [ NORMAL ] Iteration 178: k_eff = 1.220472 res = 7.684E-05 - [ NORMAL ] Iteration 179: k_eff = 1.220559 res = 7.392E-05 - [ NORMAL ] Iteration 180: k_eff = 1.220643 res = 7.110E-05 - [ NORMAL ] Iteration 181: k_eff = 1.220723 res = 6.839E-05 - [ NORMAL ] Iteration 182: k_eff = 1.220800 res = 6.578E-05 - [ NORMAL ] Iteration 183: k_eff = 1.220874 res = 6.327E-05 - [ NORMAL ] Iteration 184: k_eff = 1.220946 res = 6.086E-05 - [ NORMAL ] Iteration 185: k_eff = 1.221015 res = 5.854E-05 - [ NORMAL ] Iteration 186: k_eff = 1.221081 res = 5.631E-05 - [ NORMAL ] Iteration 187: k_eff = 1.221144 res = 5.416E-05 - [ NORMAL ] Iteration 188: k_eff = 1.221206 res = 5.209E-05 - [ NORMAL ] Iteration 189: k_eff = 1.221264 res = 5.011E-05 - [ NORMAL ] Iteration 190: k_eff = 1.221321 res = 4.820E-05 - [ NORMAL ] Iteration 191: k_eff = 1.221375 res = 4.636E-05 - [ NORMAL ] Iteration 192: k_eff = 1.221428 res = 4.459E-05 - [ NORMAL ] Iteration 193: k_eff = 1.221478 res = 4.289E-05 - [ NORMAL ] Iteration 194: k_eff = 1.221527 res = 4.125E-05 - [ NORMAL ] Iteration 195: k_eff = 1.221573 res = 3.968E-05 - [ NORMAL ] Iteration 196: k_eff = 1.221618 res = 3.816E-05 - [ NORMAL ] Iteration 197: k_eff = 1.221661 res = 3.671E-05 - [ NORMAL ] Iteration 198: k_eff = 1.221703 res = 3.531E-05 - [ NORMAL ] Iteration 199: k_eff = 1.221743 res = 3.396E-05 - [ NORMAL ] Iteration 200: k_eff = 1.221781 res = 3.266E-05 - [ NORMAL ] Iteration 201: k_eff = 1.221818 res = 3.142E-05 - [ NORMAL ] Iteration 202: k_eff = 1.221853 res = 3.022E-05 - [ NORMAL ] Iteration 203: k_eff = 1.221888 res = 2.906E-05 - [ NORMAL ] Iteration 204: k_eff = 1.221920 res = 2.795E-05 - [ NORMAL ] Iteration 205: k_eff = 1.221952 res = 2.689E-05 - [ NORMAL ] Iteration 206: k_eff = 1.221982 res = 2.586E-05 - [ NORMAL ] Iteration 207: k_eff = 1.222012 res = 2.487E-05 - [ NORMAL ] Iteration 208: k_eff = 1.222040 res = 2.392E-05 - [ NORMAL ] Iteration 209: k_eff = 1.222067 res = 2.301E-05 - [ NORMAL ] Iteration 210: k_eff = 1.222093 res = 2.213E-05 - [ NORMAL ] Iteration 211: k_eff = 1.222118 res = 2.129E-05 - [ NORMAL ] Iteration 212: k_eff = 1.222142 res = 2.047E-05 - [ NORMAL ] Iteration 213: k_eff = 1.222165 res = 1.969E-05 - [ NORMAL ] Iteration 214: k_eff = 1.222187 res = 1.894E-05 - [ NORMAL ] Iteration 215: k_eff = 1.222209 res = 1.822E-05 - [ NORMAL ] Iteration 216: k_eff = 1.222229 res = 1.752E-05 - [ NORMAL ] Iteration 217: k_eff = 1.222249 res = 1.685E-05 - [ NORMAL ] Iteration 218: k_eff = 1.222268 res = 1.621E-05 - [ NORMAL ] Iteration 219: k_eff = 1.222287 res = 1.559E-05 - [ NORMAL ] Iteration 220: k_eff = 1.222304 res = 1.499E-05 - [ NORMAL ] Iteration 221: k_eff = 1.222321 res = 1.442E-05 - [ NORMAL ] Iteration 222: k_eff = 1.222337 res = 1.387E-05 - [ NORMAL ] Iteration 223: k_eff = 1.222353 res = 1.334E-05 - [ NORMAL ] Iteration 224: k_eff = 1.222368 res = 1.283E-05 - [ NORMAL ] Iteration 225: k_eff = 1.222383 res = 1.234E-05 - [ NORMAL ] Iteration 226: k_eff = 1.222397 res = 1.187E-05 - [ NORMAL ] Iteration 227: k_eff = 1.222410 res = 1.142E-05 - [ NORMAL ] Iteration 228: k_eff = 1.222423 res = 1.098E-05 - [ NORMAL ] Iteration 229: k_eff = 1.222435 res = 1.056E-05 - [ NORMAL ] Iteration 230: k_eff = 1.222447 res = 1.016E-05 - - -.. code:: python - - # Print report of keff and bias with OpenMC - openmoc_keff = solver.getKeff() - openmc_keff = sp.k_combined[0] - bias = (openmoc_keff - openmc_keff) * 1e5 - - print('openmc keff = {0:1.6f}'.format(openmc_keff)) - print('openmoc keff = {0:1.6f}'.format(openmoc_keff)) - print('bias [pcm]: {0:1.1f}'.format(bias)) - - -.. parsed-literal:: - - openmc keff = 1.223729 - openmoc keff = 1.222447 - bias [pcm]: -128.2 - - -There is a non-trivial bias in both the 2-group and 8-group cases. In -the case of a pin cell, one can show that these biases do not converge -to <100 pcm with more particle histories. For heterogeneous geometries, -additional measures must be taken to address the following three sources -of bias: - -- Appropriate transport-corrected cross sections -- Spatial discretization of OpenMOC's mesh -- Constant-in-angle multi-group cross sections - -Visualizing MGXS Data ---------------------- - -It is often insightful to generate visual depictions of multi-group -cross sections. There are many different types of plots which may be -useful for multi-group cross section visualization, only a few of which -will be shown here for enrichment and inspiration. - -One particularly useful visualization is a comparison of the -continuous-energy and multi-group cross sections for a particular -nuclide and reaction type. We illustrate one option for generating such -plots with the use of the open source `PyNE `__ library -to parse continuous-energy cross sections from the cross section data -library provided with OpenMC. First, we instantiate a -``pyne.ace.Library`` object for U-235 as follows. - -.. code:: python - - # Instantiate a PyNE ACE continuous-energy cross sections library - pyne_lib = pyne.ace.Library('../../../../data/nndc/293.6K/U_235_293.6K.ace') - pyne_lib.read('92235.71c') - - # Extract the U-235 data from the library - u235 = pyne_lib.tables['92235.71c'] - - # Extract the continuous-energy U-235 fission cross section data - fission = u235.reactions[18] - -Now, we use ```matplotlib`` `__ and -```seaborn`` `__ to plot -the continuous-energy and multi-group cross sections on a single plot. - -.. code:: python - - # Create a loglog plot of the U-235 continuous-energy fission cross section - plt.loglog(u235.energy, fission.sigma, color='b', linewidth=1) - - # Extract energy group bounds and MGXS values to plot - nufission = xs_library[fuel_cell.id]['fission'] - energy_groups = nufission.energy_groups - x = energy_groups.group_edges - y = nufission.get_xs(nuclides=['U-235'], order_groups='decreasing', xs_type='micro') - - # Fix low energy bound to the value defined by the ACE library - x[0] = u235.energy[0] - - # Extend the mgxs values array for matplotlib's step plot - y = np.insert(y, 0, y[0]) - - # Create a step plot for the MGXS - plt.plot(x, y, drawstyle='steps', color='r', linewidth=3) - - plt.title('U-235 Fission Cross Section') - plt.xlabel('Energy [MeV]') - plt.ylabel('Micro Fission XS') - plt.legend(['Continuous', 'Multi-Group']) - plt.xlim((x.min(), x.max())) - - - - -.. parsed-literal:: - - (9.9999999999999994e-12, 20.0) - - - - -.. image:: mgxs-part-ii-content_files/mgxs-part-ii-content_67_1.png - - -Another useful type of illustration is scattering matrix sparsity -structures. First, we extract Pandas ``DataFrames`` for the H-1 and O-16 -scattering matrices. - -.. code:: python - - # Construct a Pandas DataFrame for the microscopic nu-scattering matrix - nuscatter = xs_library[moderator_cell.id]['nu-scatter'] - df = nuscatter.get_pandas_dataframe(xs_type='micro') - - # Slice DataFrame in two for each nuclide's mean values - h1 = df[df['nuclide'] == 'H-1']['mean'] - o16 = df[df['nuclide'] == 'O-16']['mean'] - - # Cast DataFrames as NumPy arrays - h1 = h1.as_matrix() - o16 = o16.as_matrix() - - # Reshape arrays to 2D matrix for plotting - h1.shape = (fine_groups.num_groups, fine_groups.num_groups) - o16.shape = (fine_groups.num_groups, fine_groups.num_groups) - -Matplotlib's ``imshow`` routine can be used to plot the matrices to -illustrate their sparsity structures. - -.. code:: python - - # Create plot of the H-1 scattering matrix - fig = plt.subplot(121) - fig.imshow(h1, interpolation='nearest', cmap='jet') - plt.title('H-1 Scattering Matrix') - plt.xlabel('Group Out') - plt.ylabel('Group In') - plt.grid() - - # Create plot of the O-16 scattering matrix - fig2 = plt.subplot(122) - fig2.imshow(o16, interpolation='nearest', cmap='jet') - plt.title('O-16 Scattering Matrix') - plt.xlabel('Group Out') - plt.ylabel('Group In') - plt.grid() - - # Show the plot on screen - plt.show() - - - -.. image:: mgxs-part-ii-content_files/mgxs-part-ii-content_71_0.png - diff --git a/_sources/pythonapi/examples/mgxs-part-ii.txt b/_sources/pythonapi/examples/mgxs-part-ii.txt deleted file mode 100644 index 1f6dd2214..000000000 --- a/_sources/pythonapi/examples/mgxs-part-ii.txt +++ /dev/null @@ -1,13 +0,0 @@ -.. _notebook_mgxs_part_ii: - -=============================== -MGXS Part II: Advanced Features -=============================== - -.. only:: html - - .. notebook:: mgxs-part-ii.ipynb - -.. only:: latex - - IPython notebooks must be viewed in the online HTML documentation. diff --git a/_sources/pythonapi/examples/mgxs-part-iii-content.txt b/_sources/pythonapi/examples/mgxs-part-iii-content.txt deleted file mode 100644 index 8d4da1284..000000000 --- a/_sources/pythonapi/examples/mgxs-part-iii-content.txt +++ /dev/null @@ -1,1168 +0,0 @@ - -This IPython Notebook illustrates the use of the -**``openmc.mgxs.Library``** class. The ``Library`` class is designed to -automate the calculation of multi-group cross sections for use cases -with one or more domains, cross section types, and/or nuclides. In -particular, this Notebook illustrates the following features: - -- Calculation of multi-group cross sections for a **fuel assembly** -- Automated creation, manipulation and storage of ``MGXS`` with - **``openmc.mgxs.Library``** -- **Validation** of multi-group cross sections with - **`OpenMOC `__** -- Steady-state pin-by-pin **fission rates comparison** between OpenMC - and `OpenMOC `__ - -**Note:** This Notebook was created using -`OpenMOC `__ to verify the -multi-group cross-sections generated by OpenMC. In order to run this -Notebook in its entirety, you must have -`OpenMOC `__ installed on your -system, along with OpenCG to convert the OpenMC geometries into OpenMOC -geometries. In addition, this Notebook illustrates the use of -`Pandas `__ ``DataFrames`` to containerize -multi-group cross section data. We recommend using -`Pandas `__ >v0.15.0 or later since OpenMC's -Python API leverages the multi-indexing feature included in the most -recent releases of `Pandas `__. - -Generate Input Files --------------------- - -.. code:: python - - import math - import pickle - from IPython.display import Image - import matplotlib.pylab as pylab - import numpy as np - - import openmc - import openmc.mgxs - from openmc.statepoint import StatePoint - from openmc.summary import Summary - - import openmoc - import openmoc.process - from openmoc.compatible import get_openmoc_geometry - from openmoc.materialize import load_openmc_mgxs_lib - - %matplotlib inline - - -.. parsed-literal:: - - /usr/lib/pymodules/python2.7/matplotlib/__init__.py:1173: UserWarning: This call to matplotlib.use() has no effect - because the backend has already been chosen; - matplotlib.use() must be called *before* pylab, matplotlib.pyplot, - or matplotlib.backends is imported for the first time. - - warnings.warn(_use_error_msg) - - -First we need to define materials that will be used in the problem. -Before defining a material, we must create nuclides that are used in the -material. - -.. code:: python - - # Instantiate some Nuclides - h1 = openmc.Nuclide('H-1') - b10 = openmc.Nuclide('B-10') - o16 = openmc.Nuclide('O-16') - u235 = openmc.Nuclide('U-235') - u238 = openmc.Nuclide('U-238') - zr90 = openmc.Nuclide('Zr-90') - -With the nuclides we defined, we will now create three materials for the -fuel, water, and cladding of the fuel pins. - -.. code:: python - - # 1.6 enriched fuel - fuel = openmc.Material(name='1.6% Fuel') - fuel.set_density('g/cm3', 10.31341) - fuel.add_nuclide(u235, 3.7503e-4) - fuel.add_nuclide(u238, 2.2625e-2) - fuel.add_nuclide(o16, 4.6007e-2) - - # borated water - water = openmc.Material(name='Borated Water') - water.set_density('g/cm3', 0.740582) - water.add_nuclide(h1, 4.9457e-2) - water.add_nuclide(o16, 2.4732e-2) - water.add_nuclide(b10, 8.0042e-6) - - # zircaloy - zircaloy = openmc.Material(name='Zircaloy') - zircaloy.set_density('g/cm3', 6.55) - zircaloy.add_nuclide(zr90, 7.2758e-3) - -With our three materials, we can now create a ``MaterialsFile`` object -that can be exported to an actual XML file. - -.. code:: python - - # Instantiate a MaterialsFile, add Materials - materials_file = openmc.MaterialsFile() - materials_file.add_material(fuel) - materials_file.add_material(water) - materials_file.add_material(zircaloy) - materials_file.default_xs = '71c' - - # Export to "materials.xml" - materials_file.export_to_xml() - -Now let's move on to the geometry. This problem will be a square array -of fuel pins and control rod guide tubes for which we can use OpenMC's -lattice/universe feature. The basic universe will have three regions for -the fuel, the clad, and the surrounding coolant. The first step is to -create the bounding surfaces for fuel and clad, as well as the outer -bounding surfaces of the problem. - -.. code:: python - - # Create cylinders for the fuel and clad - fuel_outer_radius = openmc.ZCylinder(x0=0.0, y0=0.0, R=0.39218) - clad_outer_radius = openmc.ZCylinder(x0=0.0, y0=0.0, R=0.45720) - - # Create boundary planes to surround the geometry - min_x = openmc.XPlane(x0=-10.71, boundary_type='reflective') - max_x = openmc.XPlane(x0=+10.71, boundary_type='reflective') - min_y = openmc.YPlane(y0=-10.71, boundary_type='reflective') - max_y = openmc.YPlane(y0=+10.71, boundary_type='reflective') - min_z = openmc.ZPlane(z0=-10., boundary_type='reflective') - max_z = openmc.ZPlane(z0=+10., boundary_type='reflective') - -With the surfaces defined, we can now construct a fuel pin cell from -cells that are defined by intersections of half-spaces created by the -surfaces. - -.. code:: python - - # Create a Universe to encapsulate a fuel pin - fuel_pin_universe = openmc.Universe(name='1.6% Fuel Pin') - - # Create fuel Cell - fuel_cell = openmc.Cell(name='1.6% Fuel') - fuel_cell.fill = fuel - fuel_cell.region = -fuel_outer_radius - fuel_pin_universe.add_cell(fuel_cell) - - # Create a clad Cell - clad_cell = openmc.Cell(name='1.6% Clad') - clad_cell.fill = zircaloy - clad_cell.region = +fuel_outer_radius & -clad_outer_radius - fuel_pin_universe.add_cell(clad_cell) - - # Create a moderator Cell - moderator_cell = openmc.Cell(name='1.6% Moderator') - moderator_cell.fill = water - moderator_cell.region = +clad_outer_radius - fuel_pin_universe.add_cell(moderator_cell) - -Likewise, we can construct a control rod guide tube with the same -surfaces. - -.. code:: python - - # Create a Universe to encapsulate a control rod guide tube - guide_tube_universe = openmc.Universe(name='Guide Tube') - - # Create guide tube Cell - guide_tube_cell = openmc.Cell(name='Guide Tube Water') - guide_tube_cell.fill = water - guide_tube_cell.region = -fuel_outer_radius - guide_tube_universe.add_cell(guide_tube_cell) - - # Create a clad Cell - clad_cell = openmc.Cell(name='Guide Clad') - clad_cell.fill = zircaloy - clad_cell.region = +fuel_outer_radius & -clad_outer_radius - guide_tube_universe.add_cell(clad_cell) - - # Create a moderator Cell - moderator_cell = openmc.Cell(name='Guide Tube Moderator') - moderator_cell.fill = water - moderator_cell.region = +clad_outer_radius - guide_tube_universe.add_cell(moderator_cell) - -Using the pin cell universe, we can construct a 17x17 rectangular -lattice with a 1.26 cm pitch. - -.. code:: python - - # Create fuel assembly Lattice - assembly = openmc.RectLattice(name='1.6% Fuel Assembly') - assembly.dimension = (17, 17) - assembly.pitch = (1.26, 1.26) - assembly.lower_left = [-1.26 * 17. / 2.0] * 2 - -Next, we create a NumPy array of fuel pin and guide tube universes for -the lattice. - -.. code:: python - - # Create array indices for guide tube locations in lattice - template_x = np.array([5, 8, 11, 3, 13, 2, 5, 8, 11, 14, 2, 5, 8, - 11, 14, 2, 5, 8, 11, 14, 3, 13, 5, 8, 11]) - template_y = np.array([2, 2, 2, 3, 3, 5, 5, 5, 5, 5, 8, 8, 8, 8, - 8, 11, 11, 11, 11, 11, 13, 13, 14, 14, 14]) - - # Initialize an empty 17x17 array of the lattice universes - universes = np.empty((17, 17), dtype=openmc.Universe) - - # Fill the array with the fuel pin and guide tube universes - universes[:,:] = fuel_pin_universe - universes[template_x, template_y] = guide_tube_universe - - # Store the array of universes in the lattice - assembly.universes = universes - -OpenMC requires that there is a "root" universe. Let us create a root -cell that is filled by the pin cell universe and then assign it to the -root universe. - -.. code:: python - - # Create root Cell - root_cell = openmc.Cell(name='root cell') - root_cell.fill = assembly - - # Add boundary planes - root_cell.region = +min_x & -max_x & +min_y & -max_y & +min_z & -max_z - - # Create root Universe - root_universe = openmc.Universe(universe_id=0, name='root universe') - root_universe.add_cell(root_cell) - -We now must create a geometry that is assigned a root universe, put the -geometry into a ``GeometryFile`` object, and export it to XML. - -.. code:: python - - # Create Geometry and set root Universe - geometry = openmc.Geometry() - geometry.root_universe = root_universe - -.. code:: python - - # Instantiate a GeometryFile - geometry_file = openmc.GeometryFile() - geometry_file.geometry = geometry - - # Export to "geometry.xml" - geometry_file.export_to_xml() - -With the geometry and materials finished, we now just need to define -simulation parameters. In this case, we will use 10 inactive batches and -40 active batches each with 2500 particles. - -.. code:: python - - # OpenMC simulation parameters - batches = 50 - inactive = 10 - particles = 2500 - - # Instantiate a SettingsFile - settings_file = openmc.SettingsFile() - settings_file.batches = batches - settings_file.inactive = inactive - settings_file.particles = particles - settings_file.output = {'tallies': False, 'summary': True} - source_bounds = [-10.71, -10.71, -10, 10.71, 10.71, 10.] - settings_file.set_source_space('fission', source_bounds) - - # Export to "settings.xml" - settings_file.export_to_xml() - -Let us also create a ``PlotsFile`` that we can use to verify that our -fuel assembly geometry was created successfully. - -.. code:: python - - # Instantiate a Plot - plot = openmc.Plot(plot_id=1) - plot.filename = 'materials-xy' - plot.origin = [0, 0, 0] - plot.width = [21.5, 21.5] - plot.pixels = [250, 250] - plot.color = 'mat' - - # Instantiate a PlotsFile, add Plot, and export to "plots.xml" - plot_file = openmc.PlotsFile() - plot_file.add_plot(plot) - plot_file.export_to_xml() - -With the plots.xml file, we can now generate and view the plot. OpenMC -outputs plots in .ppm format, which can be converted into a compressed -format like .png with the convert utility. - -.. code:: python - - # Run openmc in plotting mode - executor = openmc.Executor() - executor.plot_geometry(output=False) - - - - -.. parsed-literal:: - - 0 - - - -.. code:: python - - # Convert OpenMC's funky ppm to png - !convert materials-xy.ppm materials-xy.png - - # Display the materials plot inline - Image(filename='materials-xy.png') - - - - -.. image:: mgxs-part-iii-content_files/mgxs-part-iii-content_30_0.png - - - -As we can see from the plot, we have a nice array of fuel and guide tube -pin cells with fuel, cladding, and water! - -Create an MGXS Library ----------------------- - -Now we are ready to generate multi-group cross sections! First, let's -define a 2-group structure using the built-in ``EnergyGroups`` class. - -.. code:: python - - # Instantiate a 2-group EnergyGroups object - groups = openmc.mgxs.EnergyGroups() - groups.group_edges = np.array([0., 0.625e-6, 20.]) - -Next, we will instantiate an ``openmc.mgxs.Library`` for the energy -groups with our the fuel assembly geometry. - -.. code:: python - - # Initialize an 2-group MGXS Library for OpenMOC - mgxs_lib = openmc.mgxs.Library(geometry) - mgxs_lib.energy_groups = groups - -Now, we must specify to the ``Library`` which types of cross sections to -compute. In particular, the following are the multi-group cross section -``MGXS`` subclasses that are mapped to string codes accepted by the -``Library`` class: - -- ``TotalXS`` (``"total"``) -- ``TransportXS`` (``"transport"``) -- ``AbsorptionXS`` (``"absorption"``) -- ``CaptureXS`` (``"capture"``) -- ``FissionXS`` (``"fission"``) -- ``NuFissionXS`` (``"nu-fission"``) -- ``ScatterXS`` (``"scatter"``) -- ``NuScatterXS`` (``"nu-scatter"``) -- ``ScatterMatrixXS`` (``"scatter matrix"``) -- ``NuScatterMatrixXS`` (``"nu-scatter matrix"``) -- ``Chi`` (``"chi"``) - -In this case, let's create the multi-group cross sections needed to run -an OpenMOC simulation to verify the accuracy of our cross sections. In -particular, we will define ``"transport"``, ``"nu-fission"``, -``"nu-scatter matrix"`` and ``"chi"`` cross sections for our -``Library``. - -**Note**: A variety of different approximate transport-corrected total -multi-group cross sections (and corresponding scattering matrices) can -be found in the literature. At the present time, the ``openmc.mgxs`` -module only supports the ``"P0"`` transport correction. This correction -can be turned on and off through the boolean ``Library.correction`` -property which may take values of ``"P0"`` (default) or ``None``. - -.. code:: python - - # Specify multi-group cross section types to compute - mgxs_lib.mgxs_types = ['transport', 'nu-fission', 'nu-scatter matrix', 'chi'] - -Now we must specify the type of domain over which we would like the -``Library`` to compute multi-group cross sections. The domain type -corresponds to the type of tally filter to be used in the tallies -created to compute multi-group cross sections. At the present time, the -``Library`` supports ``"material,"`` ``"cell,"`` and ``"universe"`` -domain types. We will use a ``"cell"`` domain type here to compute cross -sections in each of the cells in the fuel assembly geometry. - -**Note:** By default, the ``Library`` class will instantiate ``MGXS`` -objects for each and every domain (material, cell or universe) in the -geometry of interest. However, one may specify a subset of these domains -to the ``Library.domains`` property. In our case, we wish to compute -multi-group cross sections in each and every cell since they will be -needed in our downstream OpenMOC calculation on the identical -combinatorial geometry mesh. - -.. code:: python - - # Specify a "cell" domain type for the cross section tally filters - mgxs_lib.domain_type = "cell" - - # Specify the cell domains over which to compute multi-group cross sections - mgxs_lib.domains = geometry.get_all_material_cells() - -We can easily instruct the ``Library`` to compute multi-group cross -sections on a nuclide-by-nuclide basis with the boolean -``Library.by_nuclide`` property. By default, ``by_nuclide`` is set to -``False``, but we will set it to ``True`` here. - -.. code:: python - - # Compute cross sections on a nuclide-by-nuclide basis - mgxs_lib.by_nuclide = True - -Lastly, we use the ``Library`` to construct the tallies needed to -compute all of the requested multi-group cross sections in each domain -and nuclide. - -.. code:: python - - # Construct all tallies needed for the multi-group cross section library - mgxs_lib.build_library() - -The tallies can now be export to a "tallies.xml" input file for OpenMC. - -**NOTE**: At this point the ``Library`` has constructed nearly 100 -distinct ``Tally`` objects. The overhead to tally in OpenMC scales as -:math:`O(N)` for :math:`N` tallies, which can become a bottleneck for -large tally datasets. To compensate for this, the Python API's -``Tally``, ``Filter`` and ``TalliesFile`` classes allow for the smart -*merging* of tallies when possible. The ``Library`` class supports this -runtime optimization with the use of the optional ``merge`` paramter -(``False`` by default) for the ``Library.add_to_tallies_file(...)`` -method, as shown below. - -.. code:: python - - # Create a "tallies.xml" file for the MGXS Library - tallies_file = openmc.TalliesFile() - mgxs_lib.add_to_tallies_file(tallies_file, merge=True) - -In addition, we instantiate a fission rate mesh tally to compare with -OpenMOC. - -.. code:: python - - # Instantiate a tally Mesh - mesh = openmc.Mesh(mesh_id=1) - mesh.type = 'regular' - mesh.dimension = [17, 17] - mesh.lower_left = [-10.71, -10.71] - mesh.width = [1.26, 1.26] - - # Instantiate tally Filter - mesh_filter = openmc.Filter() - mesh_filter.mesh = mesh - - # Instantiate the Tally - tally = openmc.Tally(name='mesh tally') - tally.add_filter(mesh_filter) - tally.add_score('fission') - tally.add_score('nu-fission') - - # Add mesh and Tally to TalliesFile - tallies_file.add_mesh(mesh) - tallies_file.add_tally(tally) - -.. code:: python - - # Export all tallies to a "tallies.xml" file - tallies_file.export_to_xml() - -.. code:: python - - # Run OpenMC - executor.run_simulation() - - -.. parsed-literal:: - - - .d88888b. 888b d888 .d8888b. - d88P" "Y88b 8888b d8888 d88P Y88b - 888 888 88888b.d88888 888 888 - 888 888 88888b. .d88b. 88888b. 888Y88888P888 888 - 888 888 888 "88b d8P Y8b 888 "88b 888 Y888P 888 888 - 888 888 888 888 88888888 888 888 888 Y8P 888 888 888 - Y88b. .d88P 888 d88P Y8b. 888 888 888 " 888 Y88b d88P - "Y88888P" 88888P" "Y8888 888 888 888 888 "Y8888P" - __________________888______________________________________________________ - 888 - 888 - - Copyright: 2011-2015 Massachusetts Institute of Technology - License: http://mit-crpg.github.io/openmc/license.html - Version: 0.7.0 - Git SHA1: c4b14a5ef87f004528d35cbf33fef3ed15a386ca - Date/Time: 2015-11-30 21:20:07 - MPI Processes: 1 - - =========================================================================== - ========================> INITIALIZATION <========================= - =========================================================================== - - Reading settings XML file... - Reading cross sections XML file... - Reading geometry XML file... - Reading materials XML file... - Reading tallies XML file... - Building neighboring cells lists for each surface... - Loading ACE cross section table: 92235.71c - Loading ACE cross section table: 92238.71c - Loading ACE cross section table: 8016.71c - Loading ACE cross section table: 1001.71c - Loading ACE cross section table: 5010.71c - Loading ACE cross section table: 40090.71c - Maximum neutron transport energy: 20.0000 MeV for 92235.71c - Initializing source particles... - - =========================================================================== - ====================> K EIGENVALUE SIMULATION <==================== - =========================================================================== - - Bat./Gen. k Average k - ========= ======== ==================== - 1/1 1.02650 - 2/1 1.01386 - 3/1 1.01045 - 4/1 1.05511 - 5/1 1.04873 - 6/1 1.04558 - 7/1 1.03840 - 8/1 1.02086 - 9/1 1.08845 - 10/1 1.03932 - 11/1 1.01271 - 12/1 1.03448 1.02360 +/- 0.01088 - 13/1 1.04395 1.03038 +/- 0.00925 - 14/1 1.05477 1.03648 +/- 0.00894 - 15/1 1.00485 1.03015 +/- 0.00938 - 16/1 1.04523 1.03267 +/- 0.00806 - 17/1 1.01328 1.02990 +/- 0.00735 - 18/1 1.01476 1.02800 +/- 0.00664 - 19/1 1.01490 1.02655 +/- 0.00604 - 20/1 1.00926 1.02482 +/- 0.00567 - 21/1 0.98504 1.02120 +/- 0.00627 - 22/1 1.00397 1.01977 +/- 0.00591 - 23/1 1.02556 1.02021 +/- 0.00545 - 24/1 0.99808 1.01863 +/- 0.00529 - 25/1 0.99638 1.01715 +/- 0.00514 - 26/1 0.99615 1.01584 +/- 0.00499 - 27/1 1.01843 1.01599 +/- 0.00469 - 28/1 1.00315 1.01528 +/- 0.00447 - 29/1 1.00633 1.01480 +/- 0.00426 - 30/1 1.02159 1.01514 +/- 0.00405 - 31/1 1.03395 1.01604 +/- 0.00396 - 32/1 1.02672 1.01652 +/- 0.00381 - 33/1 1.03778 1.01745 +/- 0.00375 - 34/1 1.03807 1.01831 +/- 0.00369 - 35/1 1.07854 1.02072 +/- 0.00428 - 36/1 1.03524 1.02128 +/- 0.00415 - 37/1 1.03100 1.02164 +/- 0.00401 - 38/1 1.03853 1.02224 +/- 0.00391 - 39/1 1.04089 1.02288 +/- 0.00383 - 40/1 1.02150 1.02284 +/- 0.00370 - 41/1 0.98470 1.02161 +/- 0.00379 - 42/1 1.00658 1.02114 +/- 0.00370 - 43/1 0.98652 1.02009 +/- 0.00373 - 44/1 1.02787 1.02032 +/- 0.00363 - 45/1 0.98800 1.01939 +/- 0.00364 - 46/1 1.00286 1.01893 +/- 0.00357 - 47/1 1.02559 1.01911 +/- 0.00348 - 48/1 1.03729 1.01959 +/- 0.00342 - 49/1 1.02538 1.01974 +/- 0.00333 - 50/1 1.01478 1.01962 +/- 0.00325 - Creating state point statepoint.50.h5... - - =========================================================================== - ======================> SIMULATION FINISHED <====================== - =========================================================================== - - - =======================> TIMING STATISTICS <======================= - - Total time for initialization = 4.2800E-01 seconds - Reading cross sections = 9.1000E-02 seconds - Total time in simulation = 4.1240E+01 seconds - Time in transport only = 4.1215E+01 seconds - Time in inactive batches = 4.0230E+00 seconds - Time in active batches = 3.7217E+01 seconds - Time synchronizing fission bank = 8.0000E-03 seconds - Sampling source sites = 6.0000E-03 seconds - SEND/RECV source sites = 2.0000E-03 seconds - Time accumulating tallies = 2.0000E-03 seconds - Total time for finalization = 0.0000E+00 seconds - Total time elapsed = 4.1683E+01 seconds - Calculation Rate (inactive) = 6214.27 neutrons/second - Calculation Rate (active) = 2686.94 neutrons/second - - ============================> RESULTS <============================ - - k-effective (Collision) = 1.01805 +/- 0.00261 - k-effective (Track-length) = 1.01962 +/- 0.00325 - k-effective (Absorption) = 1.01554 +/- 0.00339 - Combined k-effective = 1.01711 +/- 0.00235 - Leakage Fraction = 0.00000 +/- 0.00000 - - - - - -.. parsed-literal:: - - 0 - - - -Tally Data Processing ---------------------- - -Our simulation ran successfully and created statepoint and summary -output files. We begin our analysis by instantiating a ``StatePoint`` -object. - -.. code:: python - - # Load the last statepoint file - sp = openmc.StatePoint('statepoint.50.h5') - -In addition to the statepoint file, our simulation also created a -summary file which encapsulates information about the materials and -geometry. This is necessary for the ``openmc.mgxs`` module to properly -process the tally data. We first create a ``Summary`` object and link it -with the statepoint. - -.. code:: python - - su = openmc.Summary('summary.h5') - sp.link_with_summary(su) - -The statepoint is now ready to be analyzed by the ``Library``. We simply -have to load the tallies from the statepoint into the ``Library`` and -our ``MGXS`` objects will compute the cross sections for us -under-the-hood. - -.. code:: python - - # Initialize MGXS Library with OpenMC statepoint data - mgxs_lib.load_from_statepoint(sp) - - -.. parsed-literal:: - - /usr/local/lib/python2.7/dist-packages/openmc-0.7.0-py2.7.egg/openmc/tallies.py:1514: RuntimeWarning: invalid value encountered in true_divide - /usr/local/lib/python2.7/dist-packages/openmc-0.7.0-py2.7.egg/openmc/tallies.py:1515: RuntimeWarning: invalid value encountered in true_divide - /usr/local/lib/python2.7/dist-packages/openmc-0.7.0-py2.7.egg/openmc/tallies.py:1516: RuntimeWarning: invalid value encountered in true_divide - - -Voila! Our multi-group cross sections are now ready to rock 'n roll! - -Extracting and Storing MGXS Data --------------------------------- - -The ``Library`` supports a rich API to automate a variety of tasks, -including multi-group cross section data retrieval and storage. We will -highlight a few of these features here. First, the -``Library.get_mgxs(...)`` method allows one to extract an ``MGXS`` -object from the ``Library`` for a particular domain and cross section -type. The following cell illustrates how one may extract the -``NuFissionXS`` object for the fuel cell. - -**Note:** The ``MGXS.get_mgxs(...)`` method will accept either the -domain *or* the integer domain ID of interest. - -.. code:: python - - # Retrieve the NuFissionXS object for the fuel cell from the library - fuel_mgxs = mgxs_lib.get_mgxs(fuel_cell, 'nu-fission') - -The ``NuFissionXS`` object supports all of the methods described -previously the ``openmc.mgxs`` tutorials, such as -`Pandas `__ ``DataFrames``: - -.. code:: python - - df = fuel_mgxs.get_pandas_dataframe() - df - - -.. parsed-literal:: - - /usr/local/lib/python2.7/dist-packages/openmc-0.7.0-py2.7.egg/openmc/mgxs/mgxs.py:1254: FutureWarning: elementwise comparison failed; returning scalar instead, but in the future will perform elementwise comparison - - - - -.. raw:: html - -
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
cellgroup innuclidemeanstd. dev.
3100001U-2358.063513e-034.062984e-05
4100001U-2387.335515e-034.459335e-05
5100001O-160.000000e+000.000000e+00
0100002U-2353.613274e-011.902492e-03
1100002U-2386.738424e-073.536787e-09
2100002O-160.000000e+000.000000e+00
-
- - - -Similarly, we can use the ``MGXS.print_xs(...)`` method to view a string -representation of the multi-group cross section data. - -.. code:: python - - fuel_mgxs.print_xs() - - -.. parsed-literal:: - - Multi-Group XS - Reaction Type = nu-fission - Domain Type = cell - Domain ID = 10000 - Nuclide = U-235 - Cross Sections [cm^-1]: - Group 1 [6.25e-07 - 20.0 MeV]: 8.06e-03 +/- 5.04e-01% - Group 2 [0.0 - 6.25e-07 MeV]: 3.61e-01 +/- 5.27e-01% - - Nuclide = U-238 - Cross Sections [cm^-1]: - Group 1 [6.25e-07 - 20.0 MeV]: 7.34e-03 +/- 6.08e-01% - Group 2 [0.0 - 6.25e-07 MeV]: 6.74e-07 +/- 5.25e-01% - - Nuclide = O-16 - Cross Sections [cm^-1]: - Group 1 [6.25e-07 - 20.0 MeV]: 0.00e+00 +/- nan% - Group 2 [0.0 - 6.25e-07 MeV]: 0.00e+00 +/- nan% - - - - - -One can export the entire ``Library`` to HDF5 with the -``Library.build_hdf5_store(...)`` method as follows: - -.. code:: python - - # Store the cross section data in an "mgxs/mgxs.h5" HDF5 binary file - mgxs_lib.build_hdf5_store(filename='mgxs.h5', directory='mgxs') - -The HDF5 store will contain the numerical multi-group cross section data -indexed by domain, nuclide and cross section type. Some data workflows -may be optimized by storing and retrieving binary representations of the -``MGXS`` objects in the ``Library``. This feature is supported through -the ``Library.dump_to_file(...)`` and ``Library.load_from_file(...)`` -routines which use Python's -```pickle`` `__ module. -This is illustrated as follows. - -.. code:: python - - # Store a Library and its MGXS objects in a pickled binary file "mgxs/mgxs.pkl" - mgxs_lib.dump_to_file(filename='mgxs', directory='mgxs') - -.. code:: python - - # Instantiate a new MGXS Library from the pickled binary file "mgxs/mgxs.pkl" - mgxs_lib = openmc.mgxs.Library.load_from_file(filename='mgxs', directory='mgxs') - -The ``Library`` class may be used to leverage the energy condensation -features supported by the ``MGXS`` class. In particular, one can use the -``Library.get_condensed_library(...)`` with a coarse group structure -which is a subset of the original "fine" group structure as shown below. - -.. code:: python - - # Create a 1-group structure - coarse_groups = openmc.mgxs.EnergyGroups(group_edges=[0., 20.]) - - # Create a new MGXS Library on the coarse 1-group structure - coarse_mgxs_lib = mgxs_lib.get_condensed_library(coarse_groups) - -.. code:: python - - # Retrieve the NuFissionXS object for the fuel cell from the 1-group library - coarse_fuel_mgxs = coarse_mgxs_lib.get_mgxs(fuel_cell, 'nu-fission') - - # Show the Pandas DataFrame for the 1-group MGXS - coarse_fuel_mgxs.get_pandas_dataframe() - - - - -.. raw:: html - -
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
cellgroup innuclidemeanstd. dev.
0100001U-2350.0743830.000280
1100001U-2380.0059590.000036
2100001O-160.0000000.000000
-
- - - -Verification with OpenMOC -------------------------- - -Of course it is always a good idea to verify that one's cross sections -are accurate. We can easily do so here with the deterministic transport -code `OpenMOC `__. We will extract -an OpenCG geometry from the summary file and convert it into an -equivalent OpenMOC geometry. - -.. code:: python - - # Create an OpenMOC Geometry from the OpenCG Geometry - openmoc_geometry = get_openmoc_geometry(mgxs_lib.opencg_geometry) - -Now, we can inject the multi-group cross sections into the equivalent -fuel assembly OpenMOC geometry. The ``openmoc.materialize`` module -supports the loading of ``Library`` objects from OpenMC as illustrated -below. - -.. code:: python - - # Load the library into the OpenMOC geometry - materials = load_openmc_mgxs_lib(mgxs_lib, openmoc_geometry) - -We are now ready to run OpenMOC to verify our cross-sections from -OpenMC. - -.. code:: python - - # Generate tracks for OpenMOC - openmoc_geometry.initializeFlatSourceRegions() - track_generator = openmoc.TrackGenerator(openmoc_geometry, num_azim=32, spacing=0.1) - track_generator.generateTracks() - - # Run OpenMOC - solver = openmoc.CPUSolver(track_generator) - solver.computeEigenvalue() - - -.. parsed-literal:: - - [ NORMAL ] Ray tracing for track segmentation... - [ NORMAL ] Dumping tracks to file... - [ NORMAL ] Computing the eigenvalue... - [ NORMAL ] Iteration 0: k_eff = 0.854316 res = 0.000E+00 - [ NORMAL ] Iteration 1: k_eff = 0.801593 res = 1.522E-01 - [ NORMAL ] Iteration 2: k_eff = 0.761131 res = 6.380E-02 - [ NORMAL ] Iteration 3: k_eff = 0.731467 res = 5.066E-02 - [ NORMAL ] Iteration 4: k_eff = 0.709897 res = 3.910E-02 - [ NORMAL ] Iteration 5: k_eff = 0.695110 res = 2.954E-02 - [ NORMAL ] Iteration 6: k_eff = 0.685966 res = 2.085E-02 - [ NORMAL ] Iteration 7: k_eff = 0.681511 res = 1.317E-02 - [ NORMAL ] Iteration 8: k_eff = 0.680926 res = 6.520E-03 - [ NORMAL ] Iteration 9: k_eff = 0.683509 res = 1.046E-03 - [ NORMAL ] Iteration 10: k_eff = 0.688659 res = 3.848E-03 - [ NORMAL ] Iteration 11: k_eff = 0.695860 res = 7.565E-03 - [ NORMAL ] Iteration 12: k_eff = 0.704674 res = 1.048E-02 - [ NORMAL ] Iteration 13: k_eff = 0.714726 res = 1.269E-02 - [ NORMAL ] Iteration 14: k_eff = 0.725700 res = 1.428E-02 - [ NORMAL ] Iteration 15: k_eff = 0.737329 res = 1.537E-02 - [ NORMAL ] Iteration 16: k_eff = 0.749388 res = 1.604E-02 - [ NORMAL ] Iteration 17: k_eff = 0.761690 res = 1.637E-02 - [ NORMAL ] Iteration 18: k_eff = 0.774081 res = 1.643E-02 - [ NORMAL ] Iteration 19: k_eff = 0.786432 res = 1.628E-02 - [ NORMAL ] Iteration 20: k_eff = 0.798638 res = 1.597E-02 - [ NORMAL ] Iteration 21: k_eff = 0.810618 res = 1.553E-02 - [ NORMAL ] Iteration 22: k_eff = 0.822303 res = 1.501E-02 - [ NORMAL ] Iteration 23: k_eff = 0.833643 res = 1.443E-02 - [ NORMAL ] Iteration 24: k_eff = 0.844598 res = 1.380E-02 - [ NORMAL ] Iteration 25: k_eff = 0.855140 res = 1.315E-02 - [ NORMAL ] Iteration 26: k_eff = 0.865249 res = 1.249E-02 - [ NORMAL ] Iteration 27: k_eff = 0.874914 res = 1.183E-02 - [ NORMAL ] Iteration 28: k_eff = 0.884128 res = 1.118E-02 - [ NORMAL ] Iteration 29: k_eff = 0.892891 res = 1.054E-02 - [ NORMAL ] Iteration 30: k_eff = 0.901206 res = 9.920E-03 - [ NORMAL ] Iteration 31: k_eff = 0.909080 res = 9.320E-03 - [ NORMAL ] Iteration 32: k_eff = 0.916523 res = 8.745E-03 - [ NORMAL ] Iteration 33: k_eff = 0.923546 res = 8.194E-03 - [ NORMAL ] Iteration 34: k_eff = 0.930162 res = 7.669E-03 - [ NORMAL ] Iteration 35: k_eff = 0.936387 res = 7.171E-03 - [ NORMAL ] Iteration 36: k_eff = 0.942236 res = 6.698E-03 - [ NORMAL ] Iteration 37: k_eff = 0.947725 res = 6.252E-03 - [ NORMAL ] Iteration 38: k_eff = 0.952869 res = 5.830E-03 - [ NORMAL ] Iteration 39: k_eff = 0.957687 res = 5.433E-03 - [ NORMAL ] Iteration 40: k_eff = 0.962193 res = 5.060E-03 - [ NORMAL ] Iteration 41: k_eff = 0.966404 res = 4.710E-03 - [ NORMAL ] Iteration 42: k_eff = 0.970337 res = 4.381E-03 - [ NORMAL ] Iteration 43: k_eff = 0.974006 res = 4.073E-03 - [ NORMAL ] Iteration 44: k_eff = 0.977426 res = 3.785E-03 - [ NORMAL ] Iteration 45: k_eff = 0.980613 res = 3.515E-03 - [ NORMAL ] Iteration 46: k_eff = 0.983580 res = 3.264E-03 - [ NORMAL ] Iteration 47: k_eff = 0.986341 res = 3.029E-03 - [ NORMAL ] Iteration 48: k_eff = 0.988908 res = 2.809E-03 - [ NORMAL ] Iteration 49: k_eff = 0.991293 res = 2.605E-03 - [ NORMAL ] Iteration 50: k_eff = 0.993509 res = 2.415E-03 - [ NORMAL ] Iteration 51: k_eff = 0.995566 res = 2.238E-03 - [ NORMAL ] Iteration 52: k_eff = 0.997475 res = 2.073E-03 - [ NORMAL ] Iteration 53: k_eff = 0.999246 res = 1.920E-03 - [ NORMAL ] Iteration 54: k_eff = 1.000888 res = 1.777E-03 - [ NORMAL ] Iteration 55: k_eff = 1.002409 res = 1.645E-03 - [ NORMAL ] Iteration 56: k_eff = 1.003818 res = 1.522E-03 - [ NORMAL ] Iteration 57: k_eff = 1.005123 res = 1.408E-03 - [ NORMAL ] Iteration 58: k_eff = 1.006331 res = 1.302E-03 - [ NORMAL ] Iteration 59: k_eff = 1.007450 res = 1.203E-03 - [ NORMAL ] Iteration 60: k_eff = 1.008484 res = 1.112E-03 - [ NORMAL ] Iteration 61: k_eff = 1.009440 res = 1.028E-03 - [ NORMAL ] Iteration 62: k_eff = 1.010324 res = 9.496E-04 - [ NORMAL ] Iteration 63: k_eff = 1.011141 res = 8.771E-04 - [ NORMAL ] Iteration 64: k_eff = 1.011897 res = 8.100E-04 - [ NORMAL ] Iteration 65: k_eff = 1.012594 res = 7.478E-04 - [ NORMAL ] Iteration 66: k_eff = 1.013238 res = 6.903E-04 - [ NORMAL ] Iteration 67: k_eff = 1.013833 res = 6.371E-04 - [ NORMAL ] Iteration 68: k_eff = 1.014382 res = 5.879E-04 - [ NORMAL ] Iteration 69: k_eff = 1.014889 res = 5.424E-04 - [ NORMAL ] Iteration 70: k_eff = 1.015357 res = 5.004E-04 - [ NORMAL ] Iteration 71: k_eff = 1.015789 res = 4.615E-04 - [ NORMAL ] Iteration 72: k_eff = 1.016187 res = 4.255E-04 - [ NORMAL ] Iteration 73: k_eff = 1.016554 res = 3.923E-04 - [ NORMAL ] Iteration 74: k_eff = 1.016892 res = 3.617E-04 - [ NORMAL ] Iteration 75: k_eff = 1.017204 res = 3.333E-04 - [ NORMAL ] Iteration 76: k_eff = 1.017492 res = 3.072E-04 - [ NORMAL ] Iteration 77: k_eff = 1.017757 res = 2.831E-04 - [ NORMAL ] Iteration 78: k_eff = 1.018001 res = 2.608E-04 - [ NORMAL ] Iteration 79: k_eff = 1.018226 res = 2.403E-04 - [ NORMAL ] Iteration 80: k_eff = 1.018433 res = 2.213E-04 - [ NORMAL ] Iteration 81: k_eff = 1.018624 res = 2.038E-04 - [ NORMAL ] Iteration 82: k_eff = 1.018800 res = 1.877E-04 - [ NORMAL ] Iteration 83: k_eff = 1.018962 res = 1.728E-04 - [ NORMAL ] Iteration 84: k_eff = 1.019110 res = 1.591E-04 - [ NORMAL ] Iteration 85: k_eff = 1.019248 res = 1.465E-04 - [ NORMAL ] Iteration 86: k_eff = 1.019374 res = 1.348E-04 - [ NORMAL ] Iteration 87: k_eff = 1.019490 res = 1.241E-04 - [ NORMAL ] Iteration 88: k_eff = 1.019597 res = 1.142E-04 - [ NORMAL ] Iteration 89: k_eff = 1.019695 res = 1.051E-04 - [ NORMAL ] Iteration 90: k_eff = 1.019786 res = 9.670E-05 - [ NORMAL ] Iteration 91: k_eff = 1.019869 res = 8.895E-05 - [ NORMAL ] Iteration 92: k_eff = 1.019946 res = 8.183E-05 - [ NORMAL ] Iteration 93: k_eff = 1.020016 res = 7.528E-05 - [ NORMAL ] Iteration 94: k_eff = 1.020081 res = 6.922E-05 - [ NORMAL ] Iteration 95: k_eff = 1.020141 res = 6.368E-05 - [ NORMAL ] Iteration 96: k_eff = 1.020195 res = 5.857E-05 - [ NORMAL ] Iteration 97: k_eff = 1.020246 res = 5.385E-05 - [ NORMAL ] Iteration 98: k_eff = 1.020292 res = 4.954E-05 - [ NORMAL ] Iteration 99: k_eff = 1.020335 res = 4.553E-05 - [ NORMAL ] Iteration 100: k_eff = 1.020374 res = 4.185E-05 - [ NORMAL ] Iteration 101: k_eff = 1.020410 res = 3.848E-05 - [ NORMAL ] Iteration 102: k_eff = 1.020443 res = 3.537E-05 - [ NORMAL ] Iteration 103: k_eff = 1.020474 res = 3.253E-05 - [ NORMAL ] Iteration 104: k_eff = 1.020502 res = 2.989E-05 - [ NORMAL ] Iteration 105: k_eff = 1.020527 res = 2.746E-05 - [ NORMAL ] Iteration 106: k_eff = 1.020551 res = 2.526E-05 - [ NORMAL ] Iteration 107: k_eff = 1.020573 res = 2.319E-05 - [ NORMAL ] Iteration 108: k_eff = 1.020593 res = 2.134E-05 - [ NORMAL ] Iteration 109: k_eff = 1.020611 res = 1.960E-05 - [ NORMAL ] Iteration 110: k_eff = 1.020628 res = 1.800E-05 - [ NORMAL ] Iteration 111: k_eff = 1.020643 res = 1.652E-05 - [ NORMAL ] Iteration 112: k_eff = 1.020657 res = 1.518E-05 - [ NORMAL ] Iteration 113: k_eff = 1.020670 res = 1.398E-05 - [ NORMAL ] Iteration 114: k_eff = 1.020682 res = 1.283E-05 - [ NORMAL ] Iteration 115: k_eff = 1.020693 res = 1.178E-05 - [ NORMAL ] Iteration 116: k_eff = 1.020704 res = 1.083E-05 - - -We report the eigenvalues computed by OpenMC and OpenMOC here together -to summarize our results. - -.. code:: python - - # Print report of keff and bias with OpenMC - openmoc_keff = solver.getKeff() - openmc_keff = sp.k_combined[0] - bias = (openmoc_keff - openmc_keff) * 1e5 - - print('openmc keff = {0:1.6f}'.format(openmc_keff)) - print('openmoc keff = {0:1.6f}'.format(openmoc_keff)) - print('bias [pcm]: {0:1.1f}'.format(bias)) - - -.. parsed-literal:: - - openmc keff = 1.017105 - openmoc keff = 1.020704 - bias [pcm]: 359.8 - - -There is a non-trivial bias between the eigenvalues computed by OpenMC -and OpenMOC. One can show that these biases do not converge to <100 pcm -with more particle histories. For heterogeneous geometries, additional -measures must be taken to address the following three sources of bias: - -- Appropriate transport-corrected cross sections -- Spatial discretization of OpenMOC's mesh -- Constant-in-angle multi-group cross sections - -Flux and Pin Power Visualizations ---------------------------------- - -We will conclude this tutorial by illustrating how to visualize the -fission rates computed by OpenMOC and OpenMC. First, we extract -volume-integrated fission rates from OpenMC's mesh fission rate tally -for each pin cell in the fuel assembly. - -.. code:: python - - # Get the OpenMC fission rate mesh tally data - mesh_tally = sp.get_tally(name='mesh tally') - openmc_fission_rates = mesh_tally.get_values(scores=['nu-fission']) - - # Reshape array to 2D for plotting - openmc_fission_rates.shape = (17,17) - - # Normalize to the average pin power - openmc_fission_rates /= np.mean(openmc_fission_rates) - -Next, we extract OpenMOC's volume-averaged fission rates into a 2D 17x17 -NumPy array. - -.. code:: python - - # Export OpenMOC's fission rates for each pin cell instance in the fuel assembly - openmoc.process.compute_fission_rates(solver) - - # Open the pickle file with the fission rates - fission_rates = pickle.load(open('fission-rates/fission-rates.pkl', 'rb' )) - - # Allocate array for fission rates in each fuel pin - openmoc_fission_rates = np.zeros((17, 17)) - - # Extract fission rates for each fuel pin - for key, value in fission_rates.items(): - lat_x = int(key.split(':')[1].split()[3][1:-1]) - lat_y = int(key.split(':')[1].split()[4][:-1]) - openmoc_fission_rates[lat_x, lat_y] = value - - # Normalize to the average pin fission rate - openmoc_fission_rates /= np.mean(openmoc_fission_rates) - -Now we can easily use Matplotlib to visualize the fission rates from -OpenMC and OpenMOC side-by-side. - -.. code:: python - - # Plot OpenMC's fission rates in the left subplot - fig = pylab.subplot(121) - pylab.imshow(openmc_fission_rates, interpolation='none', cmap='jet') - pylab.title('OpenMC Fission Rates') - - # Plot OpenMOC's fission rates in the right subplot - fig2 = pylab.subplot(122) - pylab.imshow(openmoc_fission_rates, interpolation='none', cmap='jet') - pylab.title('OpenMOC Fission Rates') - - - - -.. parsed-literal:: - - - - - - -.. image:: mgxs-part-iii-content_files/mgxs-part-iii-content_90_1.png - diff --git a/_sources/pythonapi/examples/mgxs-part-iii.txt b/_sources/pythonapi/examples/mgxs-part-iii.txt deleted file mode 100644 index f44102862..000000000 --- a/_sources/pythonapi/examples/mgxs-part-iii.txt +++ /dev/null @@ -1,13 +0,0 @@ -.. _notebook_mgxs_part_iii: - -======================== -MGXS Part III: Libraries -======================== - -.. only:: html - - .. notebook:: mgxs-part-iii.ipynb - -.. only:: latex - - IPython notebooks must be viewed in the online HTML documentation. diff --git a/_sources/pythonapi/examples/pandas-dataframes-content.txt b/_sources/pythonapi/examples/pandas-dataframes-content.txt deleted file mode 100644 index db40a3697..000000000 --- a/_sources/pythonapi/examples/pandas-dataframes-content.txt +++ /dev/null @@ -1,1805 +0,0 @@ - -This notebook demonstrates how systematic analysis of tally scores is -possible using Pandas dataframes. A dataframe can be automatically -generated using the ``Tally.get_pandas_dataframe(...)`` method. -Furthermore, by linking the tally data in a statepoint file with -geometry and material information from a summary file, the dataframe can -be shown with user-supplied labels. - -**Note:** that this Notebook was created using the latest Pandas -v0.16.1. Everything in the Notebook will wun with older versions of -Pandas, but the multi-indexing option in >v0.15.0 makes the tables look -prettier. - -.. code:: python - - import glob - from IPython.display import Image - import matplotlib.pylab as pylab - import scipy.stats - import numpy as np - - import openmc - from openmc.statepoint import StatePoint - from openmc.summary import Summary - - %matplotlib inline - -Generate Input Files --------------------- - -First we need to define materials that will be used in the problem. -Before defining a material, we must create nuclides that are used in the -material. - -.. code:: python - - # Instantiate some Nuclides - h1 = openmc.Nuclide('H-1') - b10 = openmc.Nuclide('B-10') - o16 = openmc.Nuclide('O-16') - u235 = openmc.Nuclide('U-235') - u238 = openmc.Nuclide('U-238') - zr90 = openmc.Nuclide('Zr-90') - -With the nuclides we defined, we will now create three materials for the -fuel, water, and cladding of the fuel pin. - -.. code:: python - - # 1.6 enriched fuel - fuel = openmc.Material(name='1.6% Fuel') - fuel.set_density('g/cm3', 10.31341) - fuel.add_nuclide(u235, 3.7503e-4) - fuel.add_nuclide(u238, 2.2625e-2) - fuel.add_nuclide(o16, 4.6007e-2) - - # borated water - water = openmc.Material(name='Borated Water') - water.set_density('g/cm3', 0.740582) - water.add_nuclide(h1, 4.9457e-2) - water.add_nuclide(o16, 2.4732e-2) - water.add_nuclide(b10, 8.0042e-6) - - # zircaloy - zircaloy = openmc.Material(name='Zircaloy') - zircaloy.set_density('g/cm3', 6.55) - zircaloy.add_nuclide(zr90, 7.2758e-3) - -With our three materials, we can now create a materials file object that -can be exported to an actual XML file. - -.. code:: python - - # Instantiate a MaterialsFile, add Materials - materials_file = openmc.MaterialsFile() - materials_file.add_material(fuel) - materials_file.add_material(water) - materials_file.add_material(zircaloy) - materials_file.default_xs = '71c' - - # Export to "materials.xml" - materials_file.export_to_xml() - -Now let's move on to the geometry. This problem will be a square array -of fuel pins for which we can use OpenMC's lattice/universe feature. The -basic universe will have three regions for the fuel, the clad, and the -surrounding coolant. The first step is to create the bounding surfaces -for fuel and clad, as well as the outer bounding surfaces of the -problem. - -.. code:: python - - # Create cylinders for the fuel and clad - fuel_outer_radius = openmc.ZCylinder(x0=0.0, y0=0.0, R=0.39218) - clad_outer_radius = openmc.ZCylinder(x0=0.0, y0=0.0, R=0.45720) - - # Create boundary planes to surround the geometry - # Use both reflective and vacuum boundaries to make life interesting - min_x = openmc.XPlane(x0=-10.71, boundary_type='reflective') - max_x = openmc.XPlane(x0=+10.71, boundary_type='vacuum') - min_y = openmc.YPlane(y0=-10.71, boundary_type='vacuum') - max_y = openmc.YPlane(y0=+10.71, boundary_type='reflective') - min_z = openmc.ZPlane(z0=-10.71, boundary_type='reflective') - max_z = openmc.ZPlane(z0=+10.71, boundary_type='reflective') - -With the surfaces defined, we can now construct a fuel pin cell from -cells that are defined by intersections of half-spaces created by the -surfaces. - -.. code:: python - - # Create a Universe to encapsulate a fuel pin - pin_cell_universe = openmc.Universe(name='1.6% Fuel Pin') - - # Create fuel Cell - fuel_cell = openmc.Cell(name='1.6% Fuel') - fuel_cell.fill = fuel - fuel_cell.region = -fuel_outer_radius - pin_cell_universe.add_cell(fuel_cell) - - # Create a clad Cell - clad_cell = openmc.Cell(name='1.6% Clad') - clad_cell.fill = zircaloy - clad_cell.region = +fuel_outer_radius & -clad_outer_radius - pin_cell_universe.add_cell(clad_cell) - - # Create a moderator Cell - moderator_cell = openmc.Cell(name='1.6% Moderator') - moderator_cell.fill = water - moderator_cell.region = +clad_outer_radius - pin_cell_universe.add_cell(moderator_cell) - -Using the pin cell universe, we can construct a 17x17 rectangular -lattice with a 1.26 cm pitch. - -.. code:: python - - # Create fuel assembly Lattice - assembly = openmc.RectLattice(name='1.6% Fuel - 0BA') - assembly.dimension = (17, 17) - assembly.pitch = (1.26, 1.26) - assembly.lower_left = [-1.26 * 17. / 2.0] * 2 - assembly.universes = [[pin_cell_universe] * 17] * 17 - -OpenMC requires that there is a "root" universe. Let us create a root -cell that is filled by the pin cell universe and then assign it to the -root universe. - -.. code:: python - - # Create root Cell - root_cell = openmc.Cell(name='root cell') - root_cell.fill = assembly - - # Add boundary planes - root_cell.region = +min_x & -max_x & +min_y & -max_y & +min_z & -max_z - - # Create root Universe - root_universe = openmc.Universe(universe_id=0, name='root universe') - root_universe.add_cell(root_cell) - -We now must create a geometry that is assigned a root universe, put the -geometry into a ``GeometryFile`` object, and export it to XML. - -.. code:: python - - # Create Geometry and set root Universe - geometry = openmc.Geometry() - geometry.root_universe = root_universe - -.. code:: python - - # Instantiate a GeometryFile - geometry_file = openmc.GeometryFile() - geometry_file.geometry = geometry - - # Export to "geometry.xml" - geometry_file.export_to_xml() - -With the geometry and materials finished, we now just need to define -simulation parameters. In this case, we will use 5 inactive batches and -15 minimum active batches each with 2500 particles. We also tell OpenMC -to turn tally triggers on, which means it will keep running until some -criterion on the uncertainty of tallies is reached. - -.. code:: python - - # OpenMC simulation parameters - min_batches = 20 - max_batches = 200 - inactive = 5 - particles = 2500 - - # Instantiate a SettingsFile - settings_file = openmc.SettingsFile() - settings_file.batches = min_batches - settings_file.inactive = inactive - settings_file.particles = particles - settings_file.output = {'tallies': False, 'summary': True} - settings_file.trigger_active = True - settings_file.trigger_max_batches = max_batches - source_bounds = [-10.71, -10.71, -10, 10.71, 10.71, 10.] - settings_file.set_source_space('box', source_bounds) - - # Export to "settings.xml" - settings_file.export_to_xml() - -Let us also create a plot file that we can use to verify that our pin -cell geometry was created successfully. - -.. code:: python - - # Instantiate a Plot - plot = openmc.Plot(plot_id=1) - plot.filename = 'materials-xy' - plot.origin = [0, 0, 0] - plot.width = [21.5, 21.5] - plot.pixels = [250, 250] - plot.color = 'mat' - - # Instantiate a PlotsFile, add Plot, and export to "plots.xml" - plot_file = openmc.PlotsFile() - plot_file.add_plot(plot) - plot_file.export_to_xml() - -With the plots.xml file, we can now generate and view the plot. OpenMC -outputs plots in .ppm format, which can be converted into a compressed -format like .png with the convert utility. - -.. code:: python - - # Run openmc in plotting mode - executor = openmc.Executor() - executor.plot_geometry(output=False) - - - - -.. parsed-literal:: - - 0 - - - -.. code:: python - - # Convert OpenMC's funky ppm to png - !convert materials-xy.ppm materials-xy.png - - # Display the materials plot inline - Image(filename='materials-xy.png') - - - - -.. image:: pandas-dataframes-content_files/pandas-dataframes-content_26_0.png - - - -As we can see from the plot, we have a nice array of pin cells with -fuel, cladding, and water! Before we run our simulation, we need to tell -the code what we want to tally. The following code shows how to create a -variety of tallies. - -.. code:: python - - # Instantiate an empty TalliesFile - tallies_file = openmc.TalliesFile() - tallies_file._tallies = [] - -Instantiate a fission rate mesh Tally - -.. code:: python - - # Instantiate a tally Mesh - mesh = openmc.Mesh(mesh_id=1) - mesh.type = 'regular' - mesh.dimension = [17, 17] - mesh.lower_left = [-10.71, -10.71] - mesh.width = [1.26, 1.26] - - # Instantiate tally Filter - mesh_filter = openmc.Filter() - mesh_filter.mesh = mesh - - # Instantiate energy Filter - energy_filter = openmc.Filter() - energy_filter.type = 'energy' - energy_filter.bins = np.array([0, 0.625e-6, 20.]) - - # Instantiate the Tally - tally = openmc.Tally(name='mesh tally') - tally.add_filter(mesh_filter) - tally.add_filter(energy_filter) - tally.add_score('fission') - tally.add_score('nu-fission') - - # Add mesh and Tally to TalliesFile - tallies_file.add_mesh(mesh) - tallies_file.add_tally(tally) - -Instantiate a cell Tally with nuclides - -.. code:: python - - # Instantiate tally Filter - cell_filter = openmc.Filter(type='cell', bins=[fuel_cell.id]) - - # Instantiate the tally - tally = openmc.Tally(name='cell tally') - tally.add_filter(cell_filter) - tally.add_score('scatter-y2') - tally.add_nuclide(u235) - tally.add_nuclide(u238) - - # Add mesh and tally to TalliesFile - tallies_file.add_tally(tally) - -Create a "distribcell" Tally. The distribcell filter allows us to tally -multiple repeated instances of the same cell throughout the geometry. - -.. code:: python - - # Instantiate tally Filter - distribcell_filter = openmc.Filter(type='distribcell', bins=[moderator_cell.id]) - - # Instantiate tally Trigger for kicks - trigger = openmc.Trigger(trigger_type='std_dev', threshold=5e-5) - trigger.add_score('absorption') - - # Instantiate the Tally - tally = openmc.Tally(name='distribcell tally') - tally.add_filter(distribcell_filter) - tally.add_score('absorption') - tally.add_score('scatter') - tally.add_trigger(trigger) - - # Add mesh and tally to TalliesFile - tallies_file.add_tally(tally) - -.. code:: python - - # Export to "tallies.xml" - tallies_file.export_to_xml() - -Now we a have a complete set of inputs, so we can go ahead and run our -simulation. - -.. code:: python - - # Remove old HDF5 (summary, statepoint) files - !rm statepoint.* - - # Run OpenMC with MPI! - executor.run_simulation() - - -.. parsed-literal:: - - - .d88888b. 888b d888 .d8888b. - d88P" "Y88b 8888b d8888 d88P Y88b - 888 888 88888b.d88888 888 888 - 888 888 88888b. .d88b. 88888b. 888Y88888P888 888 - 888 888 888 "88b d8P Y8b 888 "88b 888 Y888P 888 888 - 888 888 888 888 88888888 888 888 888 Y8P 888 888 888 - Y88b. .d88P 888 d88P Y8b. 888 888 888 " 888 Y88b d88P - "Y88888P" 88888P" "Y8888 888 888 888 888 "Y8888P" - __________________888______________________________________________________ - 888 - 888 - - Copyright: 2011-2015 Massachusetts Institute of Technology - License: http://mit-crpg.github.io/openmc/license.html - Version: 0.7.0 - Git SHA1: 21738db07debeabde824c9b955bd3bf0c9a16366 - Date/Time: 2015-10-28 20:55:18 - MPI Processes: 1 - - =========================================================================== - ========================> INITIALIZATION <========================= - =========================================================================== - - Reading settings XML file... - Reading cross sections XML file... - Reading geometry XML file... - Reading materials XML file... - Reading tallies XML file... - Building neighboring cells lists for each surface... - Loading ACE cross section table: 92235.71c - Loading ACE cross section table: 92238.71c - Loading ACE cross section table: 8016.71c - Loading ACE cross section table: 1001.71c - Loading ACE cross section table: 5010.71c - Loading ACE cross section table: 40090.71c - Maximum neutron transport energy: 20.0000 MeV for 92235.71c - Initializing source particles... - - =========================================================================== - ====================> K EIGENVALUE SIMULATION <==================== - =========================================================================== - - Bat./Gen. k Average k - ========= ======== ==================== - 1/1 0.54958 - 2/1 0.67628 - 3/1 0.70618 - 4/1 0.66601 - 5/1 0.70876 - 6/1 0.69708 - 7/1 0.68623 0.69166 +/- 0.00543 - 8/1 0.69159 0.69163 +/- 0.00313 - 9/1 0.69908 0.69349 +/- 0.00289 - 10/1 0.63865 0.68253 +/- 0.01120 - 11/1 0.65439 0.67784 +/- 0.01027 - 12/1 0.68518 0.67889 +/- 0.00875 - 13/1 0.69507 0.68091 +/- 0.00784 - 14/1 0.70129 0.68317 +/- 0.00728 - 15/1 0.71336 0.68619 +/- 0.00717 - 16/1 0.68725 0.68629 +/- 0.00649 - 17/1 0.72579 0.68958 +/- 0.00678 - 18/1 0.67149 0.68819 +/- 0.00639 - 19/1 0.67771 0.68744 +/- 0.00596 - 20/1 0.68035 0.68697 +/- 0.00557 - Triggers unsatisfied, max unc./thresh. is 1.09851 for absorption in tally 10002 - The estimated number of batches is 24 - Creating state point statepoint.020.h5... - 21/1 0.68105 0.68660 +/- 0.00522 - 22/1 0.67168 0.68572 +/- 0.00498 - 23/1 0.67520 0.68514 +/- 0.00473 - 24/1 0.67940 0.68483 +/- 0.00449 - Triggers satisfied for batch 24 - Creating state point statepoint.024.h5... - - =========================================================================== - ======================> SIMULATION FINISHED <====================== - =========================================================================== - - - =======================> TIMING STATISTICS <======================= - - Total time for initialization = 7.3800E-01 seconds - Reading cross sections = 1.5600E-01 seconds - Total time in simulation = 1.5998E+01 seconds - Time in transport only = 1.5965E+01 seconds - Time in inactive batches = 2.3990E+00 seconds - Time in active batches = 1.3599E+01 seconds - Time synchronizing fission bank = 3.0000E-03 seconds - Sampling source sites = 1.0000E-03 seconds - SEND/RECV source sites = 2.0000E-03 seconds - Time accumulating tallies = 3.0000E-03 seconds - Total time for finalization = 0.0000E+00 seconds - Total time elapsed = 1.6754E+01 seconds - Calculation Rate (inactive) = 5210.50 neutrons/second - Calculation Rate (active) = 2757.56 neutrons/second - - ============================> RESULTS <============================ - - k-effective (Collision) = 0.68264 +/- 0.00405 - k-effective (Track-length) = 0.68483 +/- 0.00449 - k-effective (Absorption) = 0.68225 +/- 0.00336 - Combined k-effective = 0.68275 +/- 0.00346 - Leakage Fraction = 0.34345 +/- 0.00167 - - - - - -.. parsed-literal:: - - 0 - - - -Tally Data Processing ---------------------- - -.. code:: python - - # We do not know how many batches were needed to satisfy the - # tally trigger(s), so find the statepoint file(s) - statepoints = glob.glob('statepoint.*.h5') - - # Load the last statepoint file - sp = StatePoint(statepoints[-1]) - -.. code:: python - - # Load the summary file and link with statepoint - su = Summary('summary.h5') - sp.link_with_summary(su) - -**Analyze the mesh fission rate tally** - -.. code:: python - - # Find the mesh tally with the StatePoint API - tally = sp.get_tally(name='mesh tally') - - # Print a little info about the mesh tally to the screen - print(tally) - - -.. parsed-literal:: - - Tally - ID = 10000 - Name = mesh tally - Filters = - mesh [1] - energy [ 0.00000000e+00 6.25000000e-07 2.00000000e+01] - Nuclides = total - Scores = [u'fission', u'nu-fission'] - Estimator = tracklength - - - -Use the new Tally data retrieval API with pure NumPy - -.. code:: python - - # Get the relative error for the thermal fission reaction - # rates in the four corner pins - data = tally.get_values(scores=['fission'], filters=['mesh', 'energy'], \ - filter_bins=[((1,1),(1,17), (17,1), (17,17)), \ - ((0., 0.625e-6),)], value='rel_err') - print(data) - - -.. parsed-literal:: - - [[[ 0.18257268]] - - [[ 0.07111957]] - - [[ 0.40880276]] - - [[ 0.16407535]]] - - -.. code:: python - - # Get a pandas dataframe for the mesh tally data - df = tally.get_pandas_dataframe(nuclides=False) - - # Print the first twenty rows in the dataframe - df.head(20) - - - - -.. raw:: html - -
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
mesh 1energy [MeV]scoremeanstd. dev.
xyz
0111(0.0e+00 - 6.3e-07)fission0.0002020.000037
1111(0.0e+00 - 6.3e-07)nu-fission0.0004920.000090
2111(6.3e-07 - 2.0e+01)fission0.0000760.000004
3111(6.3e-07 - 2.0e+01)nu-fission0.0002040.000010
4121(0.0e+00 - 6.3e-07)fission0.0003750.000039
5121(0.0e+00 - 6.3e-07)nu-fission0.0009140.000094
6121(6.3e-07 - 2.0e+01)fission0.0001070.000013
7121(6.3e-07 - 2.0e+01)nu-fission0.0002780.000032
8131(0.0e+00 - 6.3e-07)fission0.0005640.000056
9131(0.0e+00 - 6.3e-07)nu-fission0.0013740.000137
10131(6.3e-07 - 2.0e+01)fission0.0001490.000007
11131(6.3e-07 - 2.0e+01)nu-fission0.0003880.000018
12141(0.0e+00 - 6.3e-07)fission0.0006690.000044
13141(0.0e+00 - 6.3e-07)nu-fission0.0016310.000108
14141(6.3e-07 - 2.0e+01)fission0.0001650.000011
15141(6.3e-07 - 2.0e+01)nu-fission0.0004330.000029
16151(0.0e+00 - 6.3e-07)fission0.0009320.000069
17151(0.0e+00 - 6.3e-07)nu-fission0.0022700.000168
18151(6.3e-07 - 2.0e+01)fission0.0001830.000011
19151(6.3e-07 - 2.0e+01)nu-fission0.0004770.000028
-
- - - -.. code:: python - - # Create a boxplot to view the distribution of - # fission and nu-fission rates in the pins - bp = df.boxplot(column='mean', by='score') - - - -.. image:: pandas-dataframes-content_files/pandas-dataframes-content_46_0.png - - -.. code:: python - - # Extract thermal nu-fission rates from pandas - fiss = df[df['score'] == 'nu-fission'] - fiss = fiss[fiss['energy [MeV]'] == '(0.0e+00 - 6.3e-07)'] - - # Extract mean and reshape as 2D NumPy arrays - mean = fiss['mean'].reshape((17,17)) - - pylab.imshow(mean, interpolation='nearest') - pylab.title('fission rate') - pylab.xlabel('x') - pylab.ylabel('y') - pylab.colorbar() - - - - -.. parsed-literal:: - - - - - - -.. image:: pandas-dataframes-content_files/pandas-dataframes-content_47_1.png - - -**Analyze the cell+nuclides scatter-y2 rate tally** - -.. code:: python - - # Find the cell Tally with the StatePoint API - tally = sp.get_tally(name='cell tally') - - # Print a little info about the cell tally to the screen - print(tally) - - -.. parsed-literal:: - - Tally - ID = 10001 - Name = cell tally - Filters = - cell [10000] - Nuclides = U-235 U-238 - Scores = [u'scatter-Y0,0', u'scatter-Y1,-1', u'scatter-Y1,0', u'scatter-Y1,1', u'scatter-Y2,-2', u'scatter-Y2,-1', u'scatter-Y2,0', u'scatter-Y2,1', u'scatter-Y2,2'] - Estimator = analog - - - -.. code:: python - - # Get a pandas dataframe for the cell tally data - df = tally.get_pandas_dataframe() - - # Print the first twenty rows in the dataframe - df.head(100) - - - - -.. raw:: html - -
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
cellnuclidescoremeanstd. dev.
010000U-235scatter-Y0,00.0370950.001150
110000U-235scatter-Y1,-10.0002660.000323
210000U-235scatter-Y1,0-0.0004170.000274
310000U-235scatter-Y1,1-0.0002280.000237
410000U-235scatter-Y2,-20.0000260.000199
510000U-235scatter-Y2,-1-0.0001150.000185
610000U-235scatter-Y2,00.0001510.000159
710000U-235scatter-Y2,1-0.0001220.000280
810000U-235scatter-Y2,20.0000080.000181
910000U-238scatter-Y0,02.3286320.013107
1010000U-238scatter-Y1,-10.0245300.002272
1110000U-238scatter-Y1,0-0.0000590.002804
1210000U-238scatter-Y1,1-0.0279900.002536
1310000U-238scatter-Y2,-2-0.0048610.001575
1410000U-238scatter-Y2,-10.0005570.002018
1510000U-238scatter-Y2,00.0062360.001627
1610000U-238scatter-Y2,1-0.0006480.001551
1710000U-238scatter-Y2,2-0.0010310.001310
-
- - - -Use the new Tally data retrieval API with pure NumPy - -.. code:: python - - # Get the standard deviations for two of the spherical harmonic - # scattering reaction rates - data = tally.get_values(scores=['scatter-Y2,2', 'scatter-Y0,0'], - nuclides=['U-238', 'U-235'], value='std_dev') - print(data) - - -.. parsed-literal:: - - [[[ 0.00131009 0.01310707] - [ 0.00018089 0.00114976]]] - - -**Analyze the distribcell tally** - -.. code:: python - - # Find the distribcell Tally with the StatePoint API - tally = sp.get_tally(name='distribcell tally') - - # Print a little info about the distribcell tally to the screen - print(tally) - - -.. parsed-literal:: - - Tally - ID = 10002 - Name = distribcell tally - Filters = - distribcell [10002] - Nuclides = total - Scores = [u'absorption', u'scatter'] - Estimator = tracklength - - - -Use the new Tally data retrieval API with pure NumPy - -.. code:: python - - # Get the relative error for the scattering reaction rates in - # the first 30 distribcell instances - data = tally.get_values(scores=['scatter'], filters=['distribcell'], - filter_bins=[(i,) for i in range(10)], value='rel_err') - print(data) - - -.. parsed-literal:: - - [[[ 0.04537029]]] - - -Print the distribcell tally dataframe **without** OpenCG info - -.. code:: python - - # Get a pandas dataframe for the distribcell tally data - df = tally.get_pandas_dataframe(nuclides=False) - - # Print the last twenty rows in the dataframe - df.tail(20) - - - - -.. raw:: html - -
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
distribcellscoremeanstd. dev.
558279absorption0.0000930.000013
559279scatter0.0135040.000805
560280absorption0.0000840.000010
561280scatter0.0142150.000612
562281absorption0.0000910.000008
563281scatter0.0145450.000590
564282absorption0.0001120.000012
565282scatter0.0163210.000729
566283absorption0.0000920.000007
567283scatter0.0161630.000661
568284absorption0.0001040.000011
569284scatter0.0173840.000599
570285absorption0.0001110.000011
571285scatter0.0180150.000774
572286absorption0.0001250.000012
573286scatter0.0182940.000828
574287absorption0.0001190.000013
575287scatter0.0174830.000757
576288absorption0.0001130.000014
577288scatter0.0182480.000782
-
- - - -Print the distribcell tally dataframe **with** OpenCG info - -.. code:: python - - # Get a pandas dataframe for the distribcell tally data - df = tally.get_pandas_dataframe(summary=su, nuclides=False) - - # Print the last twenty rows in the dataframe - df.head(20) - - - - -.. raw:: html - -
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
level 1level 2level 3distribcellscoremeanstd. dev.
cellunivlatcelluniv
idididxyzidid
01000301000100010002100000absorption0.0001230.000012
11000301000100010002100000scatter0.0178050.000808
21000301000110010002100001absorption0.0002170.000020
31000301000110010002100001scatter0.0288670.001263
41000301000120010002100002absorption0.0003180.000020
51000301000120010002100002scatter0.0404930.001269
61000301000130010002100003absorption0.0003860.000018
71000301000130010002100003scatter0.0485760.001337
81000301000140010002100004absorption0.0005010.000026
91000301000140010002100004scatter0.0570630.001715
101000301000150010002100005absorption0.0004840.000026
111000301000150010002100005scatter0.0608220.001581
121000301000160010002100006absorption0.0005320.000039
131000301000160010002100006scatter0.0691010.002249
141000301000170010002100007absorption0.0005770.000039
151000301000170010002100007scatter0.0767220.002335
161000301000180010002100008absorption0.0006490.000039
171000301000180010002100008scatter0.0815640.001610
181000301000190010002100009absorption0.0006800.000032
191000301000190010002100009scatter0.0877150.001959
-
- - - -.. code:: python - - # Show summary statistics for absorption distribcell tally data - absorption = df[df['score'] == 'absorption'] - absorption[['mean', 'std. dev.']].dropna().describe() - - # Note that the maximum standard deviation does indeed - # meet the 5e-4 threshold set by the tally trigger - - - - -.. raw:: html - -
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
meanstd. dev.
count289.000000289.000000
mean0.0004180.000022
std0.0002390.000009
min0.0000180.000004
25%0.0002020.000015
50%0.0004020.000021
75%0.0006150.000027
max0.0008920.000044
-
- - - -Perform a statistical test comparing the tally sample distributions for -two categories of fuel pins. - -.. code:: python - - # Extract tally data from pins in the pins divided along y=x diagonal - multi_index = ('level 2', 'lat',) - lower = df[df[multi_index + ('x',)] + df[multi_index + ('y',)] < 16] - upper = df[df[multi_index + ('x',)] + df[multi_index + ('y',)] > 16] - lower = lower[lower['score'] == 'absorption'] - upper = upper[upper['score'] == 'absorption'] - - # Perform non-parametric Mann-Whitney U Test to see if the - # absorption rates (may) come from same sampling distribution - u, p = scipy.stats.mannwhitneyu(lower['mean'], upper['mean']) - print('Mann-Whitney Test p-value: {0}'.format(p)) - - -.. parsed-literal:: - - Mann-Whitney Test p-value: 0.414863173548 - - -Note that the symmetry implied by the y=x diagonal ensures that the two -sampling distributions are identical. Indeed, as illustrated by the test -above, for any reasonable significance level (*e.g.*, -:math:`\alpha`\ =0.05) one would **not reject** the null hypothesis that -the two sampling distributions are identical. - -Next, perform the same test but with two groupings of pins which are not -symmetrically identical to one another. - -.. code:: python - - # Extract tally data from pins in the pins divided along y=-x diagonal - multi_index = ('level 2', 'lat',) - lower = df[df[multi_index + ('x',)] > df[multi_index + ('y',)]] - upper = df[df[multi_index + ('x',)] < df[multi_index + ('y',)]] - lower = lower[lower['score'] == 'absorption'] - upper = upper[upper['score'] == 'absorption'] - - # Perform non-parametric Mann-Whitney U Test to see if the - # absorption rates (may) come from same sampling distribution - u, p = scipy.stats.mannwhitneyu(lower['mean'], upper['mean']) - print('Mann-Whitney Test p-value: {0}'.format(p)) - - -.. parsed-literal:: - - Mann-Whitney Test p-value: 3.28554363741e-42 - - -Note that the asymmetry implied by the y=-x diagonal ensures that the -two sampling distributions are *not* identical. Indeed, as illustrated -by the test above, for any reasonable significance level (*e.g.*, -:math:`\alpha`\ =0.05) one would **reject** the null hypothesis that the -two sampling distributions are identical. - -.. code:: python - - # Extract the scatter tally data from pandas - scatter = df[df['score'] == 'scatter'] - - scatter['rel. err.'] = scatter['std. dev.'] / scatter['mean'] - - # Show a scatter plot of the mean vs. the std. dev. - scatter.plot(kind='scatter', x='mean', y='rel. err.', title='Scattering Rates') - - -.. parsed-literal:: - - /usr/local/lib/python2.7/dist-packages/IPython/kernel/__main__.py:4: SettingWithCopyWarning: - A value is trying to be set on a copy of a slice from a DataFrame. - Try using .loc[row_indexer,col_indexer] = value instead - - See the the caveats in the documentation: http://pandas.pydata.org/pandas-docs/stable/indexing.html#indexing-view-versus-copy - - - - -.. parsed-literal:: - - - - - - -.. image:: pandas-dataframes-content_files/pandas-dataframes-content_67_2.png - - -.. code:: python - - # Plot a histogram and kernel density estimate for the scattering rates - scatter['mean'].plot(kind='hist', bins=25) - scatter['mean'].plot(kind='kde') - pylab.title('Scattering Rates') - pylab.xlabel('Mean') - pylab.legend(['KDE', 'Histogram']) - - - - -.. parsed-literal:: - - - - - - -.. image:: pandas-dataframes-content_files/pandas-dataframes-content_68_1.png - diff --git a/_sources/pythonapi/examples/pandas-dataframes.txt b/_sources/pythonapi/examples/pandas-dataframes.txt deleted file mode 100644 index 7eacf4d32..000000000 --- a/_sources/pythonapi/examples/pandas-dataframes.txt +++ /dev/null @@ -1,11 +0,0 @@ -================= -Pandas Dataframes -================= - -.. only:: html - - .. notebook:: pandas-dataframes.ipynb - -.. only:: latex - - IPython notebooks must be viewed in the online HTML documentation. diff --git a/_sources/pythonapi/examples/post-processing-content.txt b/_sources/pythonapi/examples/post-processing-content.txt deleted file mode 100644 index 660b3f3b0..000000000 --- a/_sources/pythonapi/examples/post-processing-content.txt +++ /dev/null @@ -1,767 +0,0 @@ - -This notebook demonstrates some basic post-processing tasks that can be -performed with the Python API, such as plotting a 2D mesh tally and -plotting neutron source sites from an eigenvalue calculation. The -problem we will use is a simple reflected pin-cell. - -.. code:: python - - from IPython.display import Image - import numpy as np - import matplotlib.pyplot as plt - - import openmc - from openmc.statepoint import StatePoint - - %matplotlib inline - -Generate Input Files --------------------- - -First we need to define materials that will be used in the problem. -Before defining a material, we must create nuclides that are used in the -material. - -.. code:: python - - # Instantiate some Nuclides - h1 = openmc.Nuclide('H-1') - b10 = openmc.Nuclide('B-10') - o16 = openmc.Nuclide('O-16') - u235 = openmc.Nuclide('U-235') - u238 = openmc.Nuclide('U-238') - zr90 = openmc.Nuclide('Zr-90') - -With the nuclides we defined, we will now create three materials for the -fuel, water, and cladding of the fuel pin. - -.. code:: python - - # 1.6 enriched fuel - fuel = openmc.Material(name='1.6% Fuel') - fuel.set_density('g/cm3', 10.31341) - fuel.add_nuclide(u235, 3.7503e-4) - fuel.add_nuclide(u238, 2.2625e-2) - fuel.add_nuclide(o16, 4.6007e-2) - - # borated water - water = openmc.Material(name='Borated Water') - water.set_density('g/cm3', 0.740582) - water.add_nuclide(h1, 4.9457e-2) - water.add_nuclide(o16, 2.4732e-2) - water.add_nuclide(b10, 8.0042e-6) - - # zircaloy - zircaloy = openmc.Material(name='Zircaloy') - zircaloy.set_density('g/cm3', 6.55) - zircaloy.add_nuclide(zr90, 7.2758e-3) - -With our three materials, we can now create a materials file object that -can be exported to an actual XML file. - -.. code:: python - - # Instantiate a MaterialsFile, add Materials - materials_file = openmc.MaterialsFile() - materials_file.add_material(fuel) - materials_file.add_material(water) - materials_file.add_material(zircaloy) - materials_file.default_xs = '71c' - - # Export to "materials.xml" - materials_file.export_to_xml() - -Now let's move on to the geometry. Our problem will have three regions -for the fuel, the clad, and the surrounding coolant. The first step is -to create the bounding surfaces -- in this case two cylinders and six -reflective planes. - -.. code:: python - - # Create cylinders for the fuel and clad - fuel_outer_radius = openmc.ZCylinder(x0=0.0, y0=0.0, R=0.39218) - clad_outer_radius = openmc.ZCylinder(x0=0.0, y0=0.0, R=0.45720) - - # Create boundary planes to surround the geometry - # Use both reflective and vacuum boundaries to make life interesting - min_x = openmc.XPlane(x0=-0.63, boundary_type='reflective') - max_x = openmc.XPlane(x0=+0.63, boundary_type='reflective') - min_y = openmc.YPlane(y0=-0.63, boundary_type='reflective') - max_y = openmc.YPlane(y0=+0.63, boundary_type='reflective') - min_z = openmc.ZPlane(z0=-0.63, boundary_type='reflective') - max_z = openmc.ZPlane(z0=+0.63, boundary_type='reflective') - -With the surfaces defined, we can now create cells that are defined by -intersections of half-spaces created by the surfaces. - -.. code:: python - - # Create a Universe to encapsulate a fuel pin - pin_cell_universe = openmc.Universe(name='1.6% Fuel Pin') - - # Create fuel Cell - fuel_cell = openmc.Cell(name='1.6% Fuel') - fuel_cell.fill = fuel - fuel_cell.region = -fuel_outer_radius - pin_cell_universe.add_cell(fuel_cell) - - # Create a clad Cell - clad_cell = openmc.Cell(name='1.6% Clad') - clad_cell.fill = zircaloy - clad_cell.region = +fuel_outer_radius & -clad_outer_radius - pin_cell_universe.add_cell(clad_cell) - - # Create a moderator Cell - moderator_cell = openmc.Cell(name='1.6% Moderator') - moderator_cell.fill = water - moderator_cell.region = +clad_outer_radius - pin_cell_universe.add_cell(moderator_cell) - -OpenMC requires that there is a "root" universe. Let us create a root -cell that is filled by the pin cell universe and then assign it to the -root universe. - -.. code:: python - - # Create root Cell - root_cell = openmc.Cell(name='root cell') - root_cell.fill = pin_cell_universe - - # Add boundary planes - root_cell.region = +min_x & -max_x & +min_y & -max_y & +min_z & -max_z - - # Create root Universe - root_universe = openmc.Universe(universe_id=0, name='root universe') - root_universe.add_cell(root_cell) - -We now must create a geometry that is assigned a root universe, put the -geometry into a geometry file, and export it to XML. - -.. code:: python - - # Create Geometry and set root Universe - geometry = openmc.Geometry() - geometry.root_universe = root_universe - -.. code:: python - - # Instantiate a GeometryFile - geometry_file = openmc.GeometryFile() - geometry_file.geometry = geometry - - # Export to "geometry.xml" - geometry_file.export_to_xml() - -With the geometry and materials finished, we now just need to define -simulation parameters. In this case, we will use 10 inactive batches and -90 active batches each with 5000 particles. - -.. code:: python - - # OpenMC simulation parameters - batches = 100 - inactive = 10 - particles = 5000 - - # Instantiate a SettingsFile - settings_file = openmc.SettingsFile() - settings_file.batches = batches - settings_file.inactive = inactive - settings_file.particles = particles - source_bounds = [-0.63, -0.63, -0.63, 0.63, 0.63, 0.63] - settings_file.set_source_space('box', source_bounds) - - # Export to "settings.xml" - settings_file.export_to_xml() - -Let us also create a plot file that we can use to verify that our pin -cell geometry was created successfully. - -.. code:: python - - # Instantiate a Plot - plot = openmc.Plot(plot_id=1) - plot.filename = 'materials-xy' - plot.origin = [0, 0, 0] - plot.width = [1.26, 1.26] - plot.pixels = [250, 250] - plot.color = 'mat' - - # Instantiate a PlotsFile, add Plot, and export to "plots.xml" - plot_file = openmc.PlotsFile() - plot_file.add_plot(plot) - plot_file.export_to_xml() - -With the plots.xml file, we can now generate and view the plot. OpenMC -outputs plots in .ppm format, which can be converted into a compressed -format like .png with the convert utility. - -.. code:: python - - # Run openmc in plotting mode - executor = openmc.Executor() - executor.plot_geometry(output=False) - - - - -.. parsed-literal:: - - 0 - - - -.. code:: python - - # Convert OpenMC's funky ppm to png - !convert materials-xy.ppm materials-xy.png - - # Display the materials plot inline - Image(filename='materials-xy.png') - - - - -.. image:: post-processing-content_files/post-processing-content_24_0.png - - - -As we can see from the plot, we have a nice pin cell with fuel, -cladding, and water! Before we run our simulation, we need to tell the -code what we want to tally. The following code shows how to create a 2D -mesh tally. - -.. code:: python - - # Instantiate an empty TalliesFile - tallies_file = openmc.TalliesFile() - -.. code:: python - - # Create mesh which will be used for tally - mesh = openmc.Mesh() - mesh.dimension = [100, 100] - mesh.lower_left = [-0.63, -0.63] - mesh.upper_right = [0.63, 0.63] - tallies_file.add_mesh(mesh) - - # Create mesh filter for tally - mesh_filter = openmc.Filter(type='mesh', bins=[1]) - mesh_filter.mesh = mesh - - # Create mesh tally to score flux and fission rate - tally = openmc.Tally(name='flux') - tally.add_filter(mesh_filter) - tally.add_score('flux') - tally.add_score('fission') - tallies_file.add_tally(tally) - -.. code:: python - - # Export to "tallies.xml" - tallies_file.export_to_xml() - -Now we a have a complete set of inputs, so we can go ahead and run our -simulation. - -.. code:: python - - # Run OpenMC! - executor.run_simulation() - - -.. parsed-literal:: - - - .d88888b. 888b d888 .d8888b. - d88P" "Y88b 8888b d8888 d88P Y88b - 888 888 88888b.d88888 888 888 - 888 888 88888b. .d88b. 88888b. 888Y88888P888 888 - 888 888 888 "88b d8P Y8b 888 "88b 888 Y888P 888 888 - 888 888 888 888 88888888 888 888 888 Y8P 888 888 888 - Y88b. .d88P 888 d88P Y8b. 888 888 888 " 888 Y88b d88P - "Y88888P" 88888P" "Y8888 888 888 888 888 "Y8888P" - __________________888______________________________________________________ - 888 - 888 - - Copyright: 2011-2015 Massachusetts Institute of Technology - License: http://mit-crpg.github.io/openmc/license.html - Version: 0.7.0 - Git SHA1: c4b14a5ef87f004528d35cbf33fef3ed15a386ca - Date/Time: 2015-11-29 16:46:53 - MPI Processes: 1 - - =========================================================================== - ========================> INITIALIZATION <========================= - =========================================================================== - - Reading settings XML file... - Reading cross sections XML file... - Reading geometry XML file... - Reading materials XML file... - Reading tallies XML file... - Building neighboring cells lists for each surface... - Loading ACE cross section table: 92235.71c - Loading ACE cross section table: 92238.71c - Loading ACE cross section table: 8016.71c - Loading ACE cross section table: 1001.71c - Loading ACE cross section table: 5010.71c - Loading ACE cross section table: 40090.71c - Maximum neutron transport energy: 20.0000 MeV for 92235.71c - Initializing source particles... - - =========================================================================== - ====================> K EIGENVALUE SIMULATION <==================== - =========================================================================== - - Bat./Gen. k Average k - ========= ======== ==================== - 1/1 1.04894 - 2/1 1.01711 - 3/1 1.05357 - 4/1 1.03052 - 5/1 1.06523 - 6/1 1.06806 - 7/1 1.05161 - 8/1 1.04199 - 9/1 1.05010 - 10/1 1.04617 - 11/1 1.04894 - 12/1 1.06806 1.05850 +/- 0.00956 - 13/1 1.05002 1.05567 +/- 0.00620 - 14/1 1.03471 1.05043 +/- 0.00683 - 15/1 1.01803 1.04395 +/- 0.00837 - 16/1 1.05588 1.04594 +/- 0.00712 - 17/1 1.07503 1.05010 +/- 0.00731 - 18/1 1.02786 1.04732 +/- 0.00691 - 19/1 1.00071 1.04214 +/- 0.00800 - 20/1 1.05587 1.04351 +/- 0.00729 - 21/1 1.03886 1.04309 +/- 0.00660 - 22/1 1.04335 1.04311 +/- 0.00603 - 23/1 1.04057 1.04292 +/- 0.00555 - 24/1 1.01976 1.04126 +/- 0.00540 - 25/1 1.05811 1.04238 +/- 0.00515 - 26/1 1.02351 1.04120 +/- 0.00496 - 27/1 1.05261 1.04188 +/- 0.00471 - 28/1 1.03355 1.04141 +/- 0.00446 - 29/1 1.02797 1.04071 +/- 0.00428 - 30/1 1.03758 1.04055 +/- 0.00406 - 31/1 1.04883 1.04094 +/- 0.00388 - 32/1 1.03557 1.04070 +/- 0.00371 - 33/1 1.02947 1.04021 +/- 0.00358 - 34/1 1.03651 1.04006 +/- 0.00343 - 35/1 1.03331 1.03979 +/- 0.00330 - 36/1 1.05947 1.04054 +/- 0.00326 - 37/1 1.05093 1.04093 +/- 0.00316 - 38/1 1.06787 1.04189 +/- 0.00319 - 39/1 1.01451 1.04095 +/- 0.00322 - 40/1 1.02351 1.04037 +/- 0.00317 - 41/1 1.04826 1.04062 +/- 0.00307 - 42/1 1.04228 1.04067 +/- 0.00298 - 43/1 1.03214 1.04041 +/- 0.00290 - 44/1 1.04950 1.04068 +/- 0.00282 - 45/1 1.06616 1.04141 +/- 0.00284 - 46/1 1.07039 1.04221 +/- 0.00287 - 47/1 1.00292 1.04115 +/- 0.00299 - 48/1 1.04477 1.04125 +/- 0.00291 - 49/1 1.03360 1.04105 +/- 0.00284 - 50/1 1.04783 1.04122 +/- 0.00277 - 51/1 1.03985 1.04119 +/- 0.00271 - 52/1 1.02507 1.04080 +/- 0.00267 - 53/1 1.03477 1.04066 +/- 0.00261 - 54/1 1.00412 1.03983 +/- 0.00268 - 55/1 1.02239 1.03945 +/- 0.00265 - 56/1 1.04308 1.03952 +/- 0.00259 - 57/1 1.05534 1.03986 +/- 0.00256 - 58/1 1.06667 1.04042 +/- 0.00257 - 59/1 1.06458 1.04091 +/- 0.00256 - 60/1 1.00304 1.04015 +/- 0.00262 - 61/1 1.05038 1.04036 +/- 0.00258 - 62/1 1.02904 1.04014 +/- 0.00254 - 63/1 1.00249 1.03943 +/- 0.00259 - 64/1 1.01779 1.03903 +/- 0.00257 - 65/1 1.05335 1.03929 +/- 0.00254 - 66/1 1.06231 1.03970 +/- 0.00253 - 67/1 1.02382 1.03942 +/- 0.00250 - 68/1 1.03796 1.03939 +/- 0.00245 - 69/1 1.03672 1.03935 +/- 0.00241 - 70/1 1.02926 1.03918 +/- 0.00238 - 71/1 1.05834 1.03950 +/- 0.00236 - 72/1 1.04332 1.03956 +/- 0.00232 - 73/1 1.05613 1.03982 +/- 0.00230 - 74/1 1.01963 1.03950 +/- 0.00228 - 75/1 1.02228 1.03924 +/- 0.00226 - 76/1 1.04842 1.03938 +/- 0.00223 - 77/1 1.02157 1.03911 +/- 0.00222 - 78/1 1.02810 1.03895 +/- 0.00219 - 79/1 1.05030 1.03912 +/- 0.00216 - 80/1 1.02391 1.03890 +/- 0.00214 - 81/1 1.02488 1.03870 +/- 0.00212 - 82/1 1.04957 1.03885 +/- 0.00210 - 83/1 1.03499 1.03880 +/- 0.00207 - 84/1 1.05922 1.03907 +/- 0.00206 - 85/1 1.05898 1.03934 +/- 0.00205 - 86/1 1.02242 1.03912 +/- 0.00204 - 87/1 1.03278 1.03904 +/- 0.00201 - 88/1 1.06134 1.03932 +/- 0.00201 - 89/1 1.04521 1.03940 +/- 0.00198 - 90/1 1.04277 1.03944 +/- 0.00196 - 91/1 1.04214 1.03947 +/- 0.00193 - 92/1 1.05610 1.03967 +/- 0.00192 - 93/1 1.04531 1.03974 +/- 0.00190 - 94/1 1.01534 1.03945 +/- 0.00190 - 95/1 1.03971 1.03945 +/- 0.00187 - 96/1 1.07183 1.03983 +/- 0.00189 - 97/1 1.07214 1.04020 +/- 0.00191 - 98/1 1.03710 1.04017 +/- 0.00188 - 99/1 1.02532 1.04000 +/- 0.00187 - 100/1 1.03965 1.04000 +/- 0.00185 - Creating state point statepoint.100.h5... - - =========================================================================== - ======================> SIMULATION FINISHED <====================== - =========================================================================== - - - =======================> TIMING STATISTICS <======================= - - Total time for initialization = 3.7900E-01 seconds - Reading cross sections = 8.7000E-02 seconds - Total time in simulation = 2.2064E+02 seconds - Time in transport only = 2.2060E+02 seconds - Time in inactive batches = 8.7100E+00 seconds - Time in active batches = 2.1193E+02 seconds - Time synchronizing fission bank = 1.4000E-02 seconds - Sampling source sites = 8.0000E-03 seconds - SEND/RECV source sites = 2.0000E-03 seconds - Time accumulating tallies = 1.3000E-02 seconds - Total time for finalization = 1.6600E-01 seconds - Total time elapsed = 2.2120E+02 seconds - Calculation Rate (inactive) = 5740.53 neutrons/second - Calculation Rate (active) = 2123.37 neutrons/second - - ============================> RESULTS <============================ - - k-effective (Collision) = 1.03912 +/- 0.00160 - k-effective (Track-length) = 1.04000 +/- 0.00185 - k-effective (Absorption) = 1.04240 +/- 0.00156 - Combined k-effective = 1.04078 +/- 0.00127 - Leakage Fraction = 0.00000 +/- 0.00000 - - - - - -.. parsed-literal:: - - 0 - - - -Tally Data Processing ---------------------- - -Our simulation ran successfully and created a statepoint file with all -the tally data in it. We begin our analysis here loading the statepoint -file and 'reading' the results. By default, data from the statepoint -file is only read into memory when it is requested. This helps keep the -memory use to a minimum even when a statepoint file may be huge. - -.. code:: python - - # Load the statepoint file - sp = StatePoint('statepoint.100.h5') - -Next we need to get the tally, which can be done with the -``StatePoint.get_tally(...)`` method. - -.. code:: python - - tally = sp.get_tally(scores=['flux']) - print(tally) - - -.. parsed-literal:: - - Tally - ID = 10000 - Name = - Filters = - mesh [10000] - Nuclides = total - Scores = [u'flux', u'fission'] - Estimator = tracklength - - - -The statepoint file actually stores the sum and sum-of-squares for each -tally bin from which the mean and variance can be calculated as -described -`here `__. -The sum and sum-of-squares can be accessed using the ``sum`` and -``sum_sq`` properties: - -.. code:: python - - tally.sum - - - - -.. parsed-literal:: - - array([[[ 0.4107676 , 0. ]], - - [[ 0.40849402, 0. ]], - - [[ 0.41014343, 0. ]], - - ..., - [[ 0.41049467, 0. ]], - - [[ 0.40982242, 0. ]], - - [[ 0.40996987, 0. ]]]) - - - -However, the mean and standard deviation of the mean are usually what -you are more interested in. The Tally class also has properties ``mean`` -and ``std_dev`` which automatically calculate these statistics -on-the-fly. - -.. code:: python - - print(tally.mean.shape) - (tally.mean, tally.std_dev) - - -.. parsed-literal:: - - (10000, 1, 2) - - - - -.. parsed-literal:: - - (array([[[ 0.00456408, 0. ]], - - [[ 0.00453882, 0. ]], - - [[ 0.00455715, 0. ]], - - ..., - [[ 0.00456105, 0. ]], - - [[ 0.00455358, 0. ]], - - [[ 0.00455522, 0. ]]]), - array([[[ 1.95085625e-05, 0.00000000e+00]], - - [[ 1.78129859e-05, 0.00000000e+00]], - - [[ 1.89709648e-05, 0.00000000e+00]], - - ..., - [[ 1.56286612e-05, 0.00000000e+00]], - - [[ 1.65813279e-05, 0.00000000e+00]], - - [[ 1.67530331e-05, 0.00000000e+00]]])) - - - -The tally data has three dimensions: one for filter combinations, one -for nuclides, and one for scores. We see that there are 10000 filter -combinations (corresponding to the 100 x 100 mesh bins), a single -nuclide (since none was specified), and two scores. If we only want to -look at a single score, we can use the ``get_slice(...)`` method as -follows. - -.. code:: python - - flux = tally.get_slice(scores=['flux']) - fission = tally.get_slice(scores=['fission']) - print(flux) - - -.. parsed-literal:: - - Tally - ID = 10000 - Name = - Filters = - mesh [10000] - Nuclides = total - Scores = [u'flux'] - Estimator = tracklength - - - -To get the bins into a form that we can plot, we can simply change the -shape of the array since it is a numpy array. - -.. code:: python - - flux.std_dev.shape = (100, 100) - flux.mean.shape = (100, 100) - fission.std_dev.shape = (100, 100) - fission.mean.shape = (100, 100) - -.. code:: python - - fig = plt.subplot(121) - fig.imshow(flux.mean) - fig2 = plt.subplot(122) - fig2.imshow(fission.mean) - - - - -.. parsed-literal:: - - - - - - -.. image:: post-processing-content_files/post-processing-content_44_1.png - - -Now let's say we want to look at the distribution of relative errors of -our tally bins for flux. First we create a new variable called -``relative_error`` and set it to the ratio of the standard deviation and -the mean, being careful not to divide by zero in case some bins were -never scored to. - -.. code:: python - - # Determine relative error - relative_error = np.zeros_like(flux.std_dev) - nonzero = flux.mean > 0 - relative_error[nonzero] = flux.std_dev[nonzero] / flux.mean[nonzero] - - # distribution of relative errors - ret = plt.hist(relative_error[nonzero], bins=50) - - - -.. image:: post-processing-content_files/post-processing-content_46_0.png - - -Source Sites ------------- - -Source sites can be accessed from the ``source`` property. As shown -below, the source sites are represented as a numpy array with a -structured datatype. - -.. code:: python - - sp.source - - - - -.. parsed-literal:: - - array([ (1.0, [0.2712169917165897, -0.04844236597355761, -0.1887902218343974], [0.3889598463000694, 0.8470657529949065, 0.36220139158953857], 2.2746035619924734, 0), - (1.0, [0.080729018085932, 0.19838688738571317, -0.38053428394017363], [-0.6604834049157511, -0.6893239101986768, 0.2976478097673534], 0.7833467555325838, 0), - (1.0, [0.019430574216787868, 0.06594180627832635, 0.23329810254580194], [-0.7472138923667574, 0.13227244377548197, -0.651287493870243], 1.1632342240714935, 0), - ..., - (1.0, [0.18544614514351207, -0.0113070561851496, 0.5468392238881264], [-0.8006491411918817, 0.43855795172388223, -0.4082007786475368], 1.4358240241589555, 0), - (1.0, [0.18544614514351207, -0.0113070561851496, 0.5468392238881264], [-0.5150076397044656, -0.34922134026850293, 0.7828228321575105], 1.5771133724329802, 0), - (1.0, [-0.2722999793764598, 0.22680062445008103, 0.2987060438567475], [0.9207818175032396, -0.2884020326181676, 0.26265017063984586], 2.932342523379745, 0)], - dtype=[('wgt', ' - - - - -.. image:: post-processing-content_files/post-processing-content_53_2.png - - -Let's also look at the spatial distribution of the sites. To make the -plot a little more interesting, we can also include the direction of the -particle emitted from the source and color each source by the logarithm -of its energy. - -.. code:: python - - plt.quiver(sp.source['xyz'][:,0], sp.source['xyz'][:,1], - sp.source['uvw'][:,0], sp.source['uvw'][:,1], - np.log(sp.source['E']), cmap='jet', scale=20.0) - plt.colorbar() - plt.xlim((-0.5,0.5)) - plt.ylim((-0.5,0.5)) - - - - -.. parsed-literal:: - - (-0.5, 0.5) - - - -.. parsed-literal:: - - /usr/lib/pymodules/python2.7/matplotlib/collections.py:548: FutureWarning: elementwise comparison failed; returning scalar instead, but in the future will perform elementwise comparison - if self._edgecolors == 'face': - - - -.. image:: post-processing-content_files/post-processing-content_55_2.png - diff --git a/_sources/pythonapi/examples/post-processing.txt b/_sources/pythonapi/examples/post-processing.txt deleted file mode 100644 index b488d15ff..000000000 --- a/_sources/pythonapi/examples/post-processing.txt +++ /dev/null @@ -1,13 +0,0 @@ -.. _notebook_post_processing: - -=============== -Post Processing -=============== - -.. only:: html - - .. notebook:: post-processing.ipynb - -.. only:: latex - - IPython notebooks must be viewed in the online HTML documentation. diff --git a/_sources/pythonapi/examples/tally-arithmetic-content.txt b/_sources/pythonapi/examples/tally-arithmetic-content.txt deleted file mode 100644 index e79d87b54..000000000 --- a/_sources/pythonapi/examples/tally-arithmetic-content.txt +++ /dev/null @@ -1,1127 +0,0 @@ - -This notebook shows the how tallies can be combined (added, subtracted, -multiplied, etc.) using the Python API in order to create derived -tallies. Since no covariance information is obtained, it is assumed that -tallies are completely independent of one another when propagating -uncertainties. The target problem is a simple pin cell. - -**Note:** that this Notebook was created using the latest Pandas -v0.16.1. Everything in the Notebook will wun with older versions of -Pandas, but the multi-indexing option in >v0.15.0 makes the tables look -prettier. - -.. code:: python - - %load_ext autoreload - %autoreload 2 - -.. code:: python - - import glob - from IPython.display import Image - import numpy as np - - import openmc - from openmc.statepoint import StatePoint - from openmc.summary import Summary - - %matplotlib inline - -Generate Input Files --------------------- - -First we need to define materials that will be used in the problem. -Before defining a material, we must create nuclides that are used in the -material. - -.. code:: python - - # Instantiate some Nuclides - h1 = openmc.Nuclide('H-1') - b10 = openmc.Nuclide('B-10') - o16 = openmc.Nuclide('O-16') - u235 = openmc.Nuclide('U-235') - u238 = openmc.Nuclide('U-238') - zr90 = openmc.Nuclide('Zr-90') - -With the nuclides we defined, we will now create three materials for the -fuel, water, and cladding of the fuel pin. - -.. code:: python - - # 1.6 enriched fuel - fuel = openmc.Material(name='1.6% Fuel') - fuel.set_density('g/cm3', 10.31341) - fuel.add_nuclide(u235, 3.7503e-4) - fuel.add_nuclide(u238, 2.2625e-2) - fuel.add_nuclide(o16, 4.6007e-2) - - # borated water - water = openmc.Material(name='Borated Water') - water.set_density('g/cm3', 0.740582) - water.add_nuclide(h1, 4.9457e-2) - water.add_nuclide(o16, 2.4732e-2) - water.add_nuclide(b10, 8.0042e-6) - - # zircaloy - zircaloy = openmc.Material(name='Zircaloy') - zircaloy.set_density('g/cm3', 6.55) - zircaloy.add_nuclide(zr90, 7.2758e-3) - -With our three materials, we can now create a materials file object that -can be exported to an actual XML file. - -.. code:: python - - # Instantiate a MaterialsFile, add Materials - materials_file = openmc.MaterialsFile() - materials_file.add_material(fuel) - materials_file.add_material(water) - materials_file.add_material(zircaloy) - materials_file.default_xs = '71c' - - # Export to "materials.xml" - materials_file.export_to_xml() - -Now let's move on to the geometry. Our problem will have three regions -for the fuel, the clad, and the surrounding coolant. The first step is -to create the bounding surfaces -- in this case two cylinders and six -reflective planes. - -.. code:: python - - # Create cylinders for the fuel and clad - fuel_outer_radius = openmc.ZCylinder(x0=0.0, y0=0.0, R=0.39218) - clad_outer_radius = openmc.ZCylinder(x0=0.0, y0=0.0, R=0.45720) - - # Create boundary planes to surround the geometry - # Use both reflective and vacuum boundaries to make life interesting - min_x = openmc.XPlane(x0=-0.63, boundary_type='reflective') - max_x = openmc.XPlane(x0=+0.63, boundary_type='reflective') - min_y = openmc.YPlane(y0=-0.63, boundary_type='reflective') - max_y = openmc.YPlane(y0=+0.63, boundary_type='reflective') - min_z = openmc.ZPlane(z0=-0.63, boundary_type='reflective') - max_z = openmc.ZPlane(z0=+0.63, boundary_type='reflective') - -With the surfaces defined, we can now create cells that are defined by -intersections of half-spaces created by the surfaces. - -.. code:: python - - # Create a Universe to encapsulate a fuel pin - pin_cell_universe = openmc.Universe(name='1.6% Fuel Pin') - - # Create fuel Cell - fuel_cell = openmc.Cell(name='1.6% Fuel') - fuel_cell.fill = fuel - fuel_cell.region = -fuel_outer_radius - pin_cell_universe.add_cell(fuel_cell) - - # Create a clad Cell - clad_cell = openmc.Cell(name='1.6% Clad') - clad_cell.fill = zircaloy - clad_cell.region = +fuel_outer_radius & -clad_outer_radius - pin_cell_universe.add_cell(clad_cell) - - # Create a moderator Cell - moderator_cell = openmc.Cell(name='1.6% Moderator') - moderator_cell.fill = water - moderator_cell.region = +clad_outer_radius - pin_cell_universe.add_cell(moderator_cell) - -OpenMC requires that there is a "root" universe. Let us create a root -cell that is filled by the pin cell universe and then assign it to the -root universe. - -.. code:: python - - # Create root Cell - root_cell = openmc.Cell(name='root cell') - root_cell.fill = pin_cell_universe - - # Add boundary planes - root_cell.region = +min_x & -max_x & +min_y & -max_y & +min_z & -max_z - - # Create root Universe - root_universe = openmc.Universe(universe_id=0, name='root universe') - root_universe.add_cell(root_cell) - -We now must create a geometry that is assigned a root universe, put the -geometry into a geometry file, and export it to XML. - -.. code:: python - - # Create Geometry and set root Universe - geometry = openmc.Geometry() - geometry.root_universe = root_universe - -.. code:: python - - # Instantiate a GeometryFile - geometry_file = openmc.GeometryFile() - geometry_file.geometry = geometry - - # Export to "geometry.xml" - geometry_file.export_to_xml() - -With the geometry and materials finished, we now just need to define -simulation parameters. In this case, we will use 5 inactive batches and -15 active batches each with 2500 particles. - -.. code:: python - - # OpenMC simulation parameters - batches = 20 - inactive = 5 - particles = 2500 - - # Instantiate a SettingsFile - settings_file = openmc.SettingsFile() - settings_file.batches = batches - settings_file.inactive = inactive - settings_file.particles = particles - settings_file.output = {'tallies': True, 'summary': True} - source_bounds = [-0.63, -0.63, -0.63, 0.63, 0.63, 0.63] - settings_file.set_source_space('box', source_bounds) - - # Export to "settings.xml" - settings_file.export_to_xml() - -Let us also create a plot file that we can use to verify that our pin -cell geometry was created successfully. - -.. code:: python - - # Instantiate a Plot - plot = openmc.Plot(plot_id=1) - plot.filename = 'materials-xy' - plot.origin = [0, 0, 0] - plot.width = [1.26, 1.26] - plot.pixels = [250, 250] - plot.color = 'mat' - - # Instantiate a PlotsFile, add Plot, and export to "plots.xml" - plot_file = openmc.PlotsFile() - plot_file.add_plot(plot) - plot_file.export_to_xml() - -With the plots.xml file, we can now generate and view the plot. OpenMC -outputs plots in .ppm format, which can be converted into a compressed -format like .png with the convert utility. - -.. code:: python - - # Run openmc in plotting mode - executor = openmc.Executor() - executor.plot_geometry(output=False) - - - - -.. parsed-literal:: - - 0 - - - -.. code:: python - - # Convert OpenMC's funky ppm to png - !convert materials-xy.ppm materials-xy.png - - # Display the materials plot inline - Image(filename='materials-xy.png') - - - - -.. image:: tally-arithmetic-content_files/tally-arithmetic-content_25_0.png - - - -As we can see from the plot, we have a nice pin cell with fuel, -cladding, and water! Before we run our simulation, we need to tell the -code what we want to tally. The following code shows how to create a -variety of tallies. - -.. code:: python - - # Instantiate an empty TalliesFile - tallies_file = openmc.TalliesFile() - -.. code:: python - - # Create Tallies to compute microscopic multi-group cross-sections - - # Instantiate energy filter for multi-group cross-section Tallies - energy_filter = openmc.Filter(type='energy', bins=[0., 0.625e-6, 20.]) - - # Instantiate flux Tally in moderator and fuel - tally = openmc.Tally(name='flux') - tally.add_filter(openmc.Filter(type='cell', bins=[fuel_cell.id, moderator_cell.id])) - tally.add_filter(energy_filter) - tally.add_score('flux') - tallies_file.add_tally(tally) - - # Instantiate reaction rate Tally in fuel - tally = openmc.Tally(name='fuel rxn rates') - tally.add_filter(openmc.Filter(type='cell', bins=[fuel_cell.id])) - tally.add_filter(energy_filter) - tally.add_score('nu-fission') - tally.add_score('scatter') - tally.add_nuclide(u238) - tally.add_nuclide(u235) - tallies_file.add_tally(tally) - - # Instantiate reaction rate Tally in moderator - tally = openmc.Tally(name='moderator rxn rates') - tally.add_filter(openmc.Filter(type='cell', bins=[moderator_cell.id])) - tally.add_filter(energy_filter) - tally.add_score('absorption') - tally.add_score('total') - tally.add_nuclide(o16) - tally.add_nuclide(h1) - tallies_file.add_tally(tally) - -.. code:: python - - # K-Eigenvalue (infinity) tallies - fiss_rate = openmc.Tally(name='fiss. rate') - abs_rate = openmc.Tally(name='abs. rate') - fiss_rate.add_score('nu-fission') - abs_rate.add_score('absorption') - tallies_file.add_tally(fiss_rate) - tallies_file.add_tally(abs_rate) - -.. code:: python - - # Resonance Escape Probability tallies - therm_abs_rate = openmc.Tally(name='therm. abs. rate') - therm_abs_rate.add_score('absorption') - therm_abs_rate.add_filter(openmc.Filter(type='energy', bins=[0., 0.625])) - tallies_file.add_tally(therm_abs_rate) - -.. code:: python - - # Thermal Flux Utilization tallies - fuel_therm_abs_rate = openmc.Tally(name='fuel therm. abs. rate') - fuel_therm_abs_rate.add_score('absorption') - fuel_therm_abs_rate.add_filter(openmc.Filter(type='energy', bins=[0., 0.625])) - fuel_therm_abs_rate.add_filter(openmc.Filter(type='cell', bins=[fuel_cell.id])) - tallies_file.add_tally(fuel_therm_abs_rate) - -.. code:: python - - # Fast Fission Factor tallies - therm_fiss_rate = openmc.Tally(name='therm. fiss. rate') - therm_fiss_rate.add_score('nu-fission') - therm_fiss_rate.add_filter(openmc.Filter(type='energy', bins=[0., 0.625])) - tallies_file.add_tally(therm_fiss_rate) - -.. code:: python - - # Instantiate energy filter to illustrate Tally slicing - energy_filter = openmc.Filter(type='energy', bins=np.logspace(np.log10(1e-8), np.log10(20), 10)) - - # Instantiate flux Tally in moderator and fuel - tally = openmc.Tally(name='need-to-slice') - tally.add_filter(openmc.Filter(type='cell', bins=[fuel_cell.id, moderator_cell.id])) - tally.add_filter(energy_filter) - tally.add_score('nu-fission') - tally.add_score('scatter') - tally.add_nuclide(h1) - tally.add_nuclide(u238) - tallies_file.add_tally(tally) - -.. code:: python - - # Export to "tallies.xml" - tallies_file.export_to_xml() - -Now we a have a complete set of inputs, so we can go ahead and run our -simulation. - -.. code:: python - - # Remove old HDF5 (summary, statepoint) files - !rm statepoint.* - - # Run OpenMC with MPI! - executor.run_simulation() - - -.. parsed-literal:: - - - .d88888b. 888b d888 .d8888b. - d88P" "Y88b 8888b d8888 d88P Y88b - 888 888 88888b.d88888 888 888 - 888 888 88888b. .d88b. 88888b. 888Y88888P888 888 - 888 888 888 "88b d8P Y8b 888 "88b 888 Y888P 888 888 - 888 888 888 888 88888888 888 888 888 Y8P 888 888 888 - Y88b. .d88P 888 d88P Y8b. 888 888 888 " 888 Y88b d88P - "Y88888P" 88888P" "Y8888 888 888 888 888 "Y8888P" - __________________888______________________________________________________ - 888 - 888 - - Copyright: 2011-2015 Massachusetts Institute of Technology - License: http://mit-crpg.github.io/openmc/license.html - Version: 0.7.0 - Git SHA1: 74ffcb447521c968fb64fdaa63e40598783f2fba - Date/Time: 2015-11-25 14:20:51 - MPI Processes: 1 - - =========================================================================== - ========================> INITIALIZATION <========================= - =========================================================================== - - Reading settings XML file... - Reading cross sections XML file... - Reading geometry XML file... - Reading materials XML file... - Reading tallies XML file... - Building neighboring cells lists for each surface... - Loading ACE cross section table: 92235.71c - Loading ACE cross section table: 92238.71c - Loading ACE cross section table: 8016.71c - Loading ACE cross section table: 1001.71c - Loading ACE cross section table: 5010.71c - Loading ACE cross section table: 40090.71c - Maximum neutron transport energy: 20.0000 MeV for 92235.71c - Initializing source particles... - - =========================================================================== - ====================> K EIGENVALUE SIMULATION <==================== - =========================================================================== - - Bat./Gen. k Average k - ========= ======== ==================== - 1/1 1.05992 - 2/1 1.05251 - 3/1 1.05204 - 4/1 1.02100 - 5/1 1.07784 - 6/1 1.04814 - 7/1 1.02335 1.03574 +/- 0.01239 - 8/1 1.02415 1.03188 +/- 0.00813 - 9/1 1.10331 1.04974 +/- 0.01876 - 10/1 1.05452 1.05069 +/- 0.01456 - 11/1 1.07867 1.05536 +/- 0.01277 - 12/1 1.04203 1.05345 +/- 0.01096 - 13/1 1.04482 1.05237 +/- 0.00955 - 14/1 1.04116 1.05113 +/- 0.00852 - 15/1 1.07569 1.05358 +/- 0.00800 - 16/1 1.04188 1.05252 +/- 0.00732 - 17/1 1.03775 1.05129 +/- 0.00679 - 18/1 0.98462 1.04616 +/- 0.00808 - 19/1 1.08613 1.04902 +/- 0.00801 - 20/1 1.00571 1.04613 +/- 0.00800 - Creating state point statepoint.20.h5... - - =========================================================================== - ======================> SIMULATION FINISHED <====================== - =========================================================================== - - - =======================> TIMING STATISTICS <======================= - - Total time for initialization = 7.9600E-01 seconds - Reading cross sections = 2.1200E-01 seconds - Total time in simulation = 1.8740E+01 seconds - Time in transport only = 1.8727E+01 seconds - Time in inactive batches = 2.5970E+00 seconds - Time in active batches = 1.6143E+01 seconds - Time synchronizing fission bank = 2.0000E-03 seconds - Sampling source sites = 1.0000E-03 seconds - SEND/RECV source sites = 1.0000E-03 seconds - Time accumulating tallies = 0.0000E+00 seconds - Total time for finalization = 2.0000E-03 seconds - Total time elapsed = 1.9553E+01 seconds - Calculation Rate (inactive) = 4813.25 neutrons/second - Calculation Rate (active) = 2322.99 neutrons/second - - ============================> RESULTS <============================ - - k-effective (Collision) = 1.04597 +/- 0.00663 - k-effective (Track-length) = 1.04613 +/- 0.00800 - k-effective (Absorption) = 1.04087 +/- 0.00627 - Combined k-effective = 1.04322 +/- 0.00570 - Leakage Fraction = 0.00000 +/- 0.00000 - - - - - -.. parsed-literal:: - - 0 - - - -Tally Data Processing ---------------------- - -Our simulation ran successfully and created a statepoint file with all -the tally data in it. We begin our analysis here loading the statepoint -file and 'reading' the results. By default, the tally results are not -read into memory because they might be large, even large enough to -exceed the available memory on a computer. - -.. code:: python - - # Load the statepoint file - sp = StatePoint('statepoint.20.h5') - -You may have also noticed we instructed OpenMC to create a summary file -with lots of geometry information in it. This can help to produce more -sensible output from the Python API, so we will use the summary file to -link against. - -.. code:: python - - # Load the summary file and link with statepoint - su = Summary('summary.h5') - sp.link_with_summary(su) - -We have a tally of the total fission rate and the total absorption rate, -so we can calculate k-infinity as: - -.. math:: k_\infty = \frac{\langle \nu \Sigma_f \phi \rangle}{\langle \Sigma_a \phi \rangle} - -In this notation, :math:`\langle \cdot \rangle^a_b` represents an OpenMC -that is integrated over region :math:`a` and energy range :math:`b`. If -:math:`a` or :math:`b` is not reported, it means the value represents an -integral over all space or all energy, respectively. - -.. code:: python - - # Compute k-infinity using tally arithmetic - fiss_rate = sp.get_tally(name='fiss. rate') - abs_rate = sp.get_tally(name='abs. rate') - keff = fiss_rate / abs_rate - keff.get_pandas_dataframe() - - - - -.. raw:: html - -
- - - - - - - - - - - - - - - - - - - -
nuclidescoremeanstd. dev.
0 total (nu-fission / absorption) 1.040687 0.010913
-
- - - -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! - -Often in textbooks you'll see k-infinity represented using the -four-factor formula - -.. math:: k_\infty = p \epsilon f \eta. - -Let's analyze each of these factors, starting with the resonance escape -probability which is defined as - -.. math:: p=\frac{\langle\Sigma_a\phi\rangle_T}{\langle\Sigma_a\phi\rangle} - - where the subscript :math:`T` means thermal energies. - -.. code:: python - - # Compute resonance escape probability using tally arithmetic - therm_abs_rate = sp.get_tally(name='therm. abs. rate') - res_esc = therm_abs_rate / abs_rate - res_esc.get_pandas_dataframe() - - - - -.. raw:: html - -
- - - - - - - - - - - - - - - - - - - - - -
energy [MeV]nuclidescoremeanstd. dev.
0 (0.0e+00 - 6.2e-01) total absorption 0.959302 0.010033
-
- - - -The fast fission factor can be calculated as - -.. math:: \epsilon=\frac{\langle\nu\Sigma_f\phi\rangle}{\langle\nu\Sigma_f\phi\rangle_T} - -.. code:: python - - # Compute fast fission factor factor using tally arithmetic - therm_fiss_rate = sp.get_tally(name='therm. fiss. rate') - fast_fiss = fiss_rate / therm_fiss_rate - fast_fiss.get_pandas_dataframe() - - - - -.. raw:: html - -
- - - - - - - - - - - - - - - - - - - - - -
energy [MeV]nuclidescoremeanstd. dev.
0 (0.0e+00 - 6.2e-01) total nu-fission 1.09103 0.012491
-
- - - -The thermal flux utilization is calculated as - -.. math:: f=\frac{\langle\Sigma_a\phi\rangle^F_T}{\langle\Sigma_a\phi\rangle_T} - -where the superscript :math:`F` denotes fuel. - -.. code:: python - - # Compute thermal flux utilization factor using tally arithmetic - fuel_therm_abs_rate = sp.get_tally(name='fuel therm. abs. rate') - therm_util = fuel_therm_abs_rate / therm_abs_rate - therm_util.get_pandas_dataframe() - - - - -.. raw:: html - -
- - - - - - - - - - - - - - - - - - - - - - - -
energy [MeV]cellnuclidescoremeanstd. dev.
0 (0.0e+00 - 6.2e-01) 10000 total absorption 0.803182 0.008664
-
- - - -The final factor is the number of fission neutrons produced per -absorption in fuel, calculated as - -.. math:: \eta = \frac{\langle \nu\Sigma_f\phi \rangle_T}{\langle \Sigma_a \phi \rangle^F_T} - -.. code:: python - - # Compute neutrons produced per absorption (eta) using tally arithmetic - eta = therm_fiss_rate / fuel_therm_abs_rate - eta.get_pandas_dataframe() - - - - -.. raw:: html - -
- - - - - - - - - - - - - - - - - - - - - - - -
energy [MeV]cellnuclidescoremeanstd. dev.
0 (0.0e+00 - 6.2e-01) 10000 total (nu-fission / absorption) 1.237982 0.014179
-
- - - -Now we can calculate :math:`k_\infty` using the product of the factors -form the four-factor formula. - -.. code:: python - - keff = res_esc * fast_fiss * therm_util * eta - keff.get_pandas_dataframe() - - - - -.. raw:: html - -
- - - - - - - - - - - - - - - - - - - - - - - -
energy [MeV]cellnuclidescoremeanstd. dev.
0 (0.0e+00 - 6.2e-01) 10000 total (((absorption * nu-fission) * absorption) * (n... 1.040687 0.022989
-
- - - -We see that the value we've obtained here has exactly the same mean as -before. However, because of the way it was calculated, the standard -deviation appears to be larger. - -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. - -.. code:: python - - # Compute microscopic multi-group cross-sections - flux = sp.get_tally(name='flux') - flux = flux.get_slice(filters=['cell'], filter_bins=[(fuel_cell.id,)]) - fuel_rxn_rates = sp.get_tally(name='fuel rxn rates') - mod_rxn_rates = sp.get_tally(name='moderator rxn rates') - -.. code:: python - - fuel_xs = fuel_rxn_rates / flux - fuel_xs.get_pandas_dataframe() - - - - -.. raw:: html - -
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
cellenergy [MeV]nuclidescoremeanstd. dev.
0 10000 (0.0e+00 - 6.3e-07) (U-238 / total) (nu-fission / flux) 0.000001 8.078651e-09
1 10000 (0.0e+00 - 6.3e-07) (U-238 / total) (scatter / flux) 0.209990 2.449396e-03
2 10000 (0.0e+00 - 6.3e-07) (U-235 / total) (nu-fission / flux) 0.356117 4.364366e-03
3 10000 (0.0e+00 - 6.3e-07) (U-235 / total) (scatter / flux) 0.005555 6.495710e-05
4 10000 (6.3e-07 - 2.0e+01) (U-238 / total) (nu-fission / flux) 0.007190 7.596666e-05
5 10000 (6.3e-07 - 2.0e+01) (U-238 / total) (scatter / flux) 0.227843 1.024510e-03
6 10000 (6.3e-07 - 2.0e+01) (U-235 / total) (nu-fission / flux) 0.008086 6.251590e-05
7 10000 (6.3e-07 - 2.0e+01) (U-235 / total) (scatter / flux) 0.003365 1.646663e-05
-
- - - -We see that when the two tallies with multiple bins were divided, the -derived tally contains the outer product of the combinations. If the -filters/scores are the same, no outer product is needed. The -``get_values(...)`` method allows us to obtain a subset of tally scores. -In the following example, we obtain just the neutron production -microscopic cross sections. - -.. code:: python - - # Show how to use Tally.get_values(...) with a CrossScore - nu_fiss_xs = fuel_xs.get_values(scores=['(nu-fission / flux)']) - print(nu_fiss_xs) - - -.. parsed-literal:: - - [[[ 6.65302296e-07] - [ 3.56116716e-01]] - - [[ 7.19004460e-03] - [ 8.08598751e-03]]] - - -The same idea can be used not only for scores but also for filters and -nuclides. - -.. code:: python - - # Show how to use Tally.get_values(...) with a CrossScore and CrossNuclide - u235_scatter_xs = fuel_xs.get_values(nuclides=['(U-235 / total)'], - scores=['(scatter / flux)']) - print(u235_scatter_xs) - - -.. parsed-literal:: - - [[[ 0.00555516]] - - [[ 0.00336498]]] - - -.. code:: python - - # Show how to use Tally.get_values(...) with a CrossFilter and CrossScore - fast_scatter_xs = fuel_xs.get_values(filters=['energy'], - filter_bins=[((0.625e-6, 20.),)], - scores=['(scatter / flux)']) - print(fast_scatter_xs) - - -.. parsed-literal:: - - [[[ 0.22784316] - [ 0.00336498]]] - - -A more advanced method is to use ``get_slice(...)`` to create a new -derived tally that is a subset of an existing tally. This has the -benefit that we can use ``get_pandas_dataframe()`` to see the tallies in -a more human-readable format. - -.. code:: python - - # "Slice" the nu-fission data into a new derived Tally - nu_fission_rates = fuel_rxn_rates.get_slice(scores=['nu-fission']) - nu_fission_rates.get_pandas_dataframe() - - - - -.. raw:: html - -
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
cellenergy [MeV]nuclidescoremeanstd. dev.
0 10000 (0.0e+00 - 6.3e-07) U-238 nu-fission 0.000002 1.450189e-08
1 10000 (0.0e+00 - 6.3e-07) U-235 nu-fission 0.870882 7.895515e-03
2 10000 (6.3e-07 - 2.0e+01) U-238 nu-fission 0.082484 8.253437e-04
3 10000 (6.3e-07 - 2.0e+01) U-235 nu-fission 0.092762 6.444580e-04
-
- - - -.. code:: python - - # "Slice" the H-1 scatter data in the moderator Cell into a new derived Tally - need_to_slice = sp.get_tally(name='need-to-slice') - slice_test = need_to_slice.get_slice(scores=['scatter'], nuclides=['H-1'], - filters=['cell'], filter_bins=[(moderator_cell.id,)]) - slice_test.get_pandas_dataframe() - - - - -.. raw:: html - -
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
cellenergy [MeV]nuclidescoremeanstd. dev.
0 10002 (1.0e-08 - 1.1e-07) H-1 scatter 4.630154 0.044512
1 10002 (1.1e-07 - 1.2e-06) H-1 scatter 2.042984 0.011429
2 10002 (1.2e-06 - 1.3e-05) H-1 scatter 1.657517 0.008617
3 10002 (1.3e-05 - 1.4e-04) H-1 scatter 1.863326 0.008848
4 10002 (1.4e-04 - 1.5e-03) H-1 scatter 2.043916 0.014195
5 10002 (1.5e-03 - 1.6e-02) H-1 scatter 2.134458 0.007561
6 10002 (1.6e-02 - 1.7e-01) H-1 scatter 2.209947 0.013848
7 10002 (1.7e-01 - 1.9e+00) H-1 scatter 2.006967 0.009368
8 10002 (1.9e+00 - 2.0e+01) H-1 scatter 0.373895 0.002964
-
- - diff --git a/_sources/pythonapi/examples/tally-arithmetic.txt b/_sources/pythonapi/examples/tally-arithmetic.txt deleted file mode 100644 index 5f3cf775e..000000000 --- a/_sources/pythonapi/examples/tally-arithmetic.txt +++ /dev/null @@ -1,11 +0,0 @@ -================ -Tally Arithmetic -================ - -.. only:: html - - .. notebook:: tally-arithmetic.ipynb - -.. only:: latex - - IPython notebooks must be viewed in the online HTML documentation. diff --git a/_sources/pythonapi/executor.txt b/_sources/pythonapi/executor.txt deleted file mode 100644 index ef6693ec9..000000000 --- a/_sources/pythonapi/executor.txt +++ /dev/null @@ -1,8 +0,0 @@ -.. _pythonapi_executor: - -======== -Executor -======== - -.. automodule:: openmc.executor - :members: diff --git a/_sources/pythonapi/filter.txt b/_sources/pythonapi/filter.txt deleted file mode 100644 index f93ba5a15..000000000 --- a/_sources/pythonapi/filter.txt +++ /dev/null @@ -1,8 +0,0 @@ -.. _pythonapi_filter: - -====== -Filter -====== - -.. automodule:: openmc.filter - :members: diff --git a/_sources/pythonapi/geometry.txt b/_sources/pythonapi/geometry.txt deleted file mode 100644 index 6b87edb97..000000000 --- a/_sources/pythonapi/geometry.txt +++ /dev/null @@ -1,8 +0,0 @@ -.. _pythonapi_geometry: - -======== -Geometry -======== - -.. automodule:: openmc.geometry - :members: diff --git a/_sources/pythonapi/index.txt b/_sources/pythonapi/index.txt deleted file mode 100644 index 6d513d5d5..000000000 --- a/_sources/pythonapi/index.txt +++ /dev/null @@ -1,84 +0,0 @@ -.. _pythonapi: - -========== -Python API -========== - -OpenMC includes a rich Python API that enables programmatic pre- and -post-processing. The easiest way to begin using the API is to take a look at the -example Jupyter_ notebooks provided. However, this assumes that you are already -familiar with Python and common third-party packages such as NumPy_. If you have -never programmed in Python before, there are many good tutorials available -online. We recommend going through the modules from Codecademy_ and/or the -`Scipy lectures`_. The full API documentation serves to provide more information -on a given module or class. - -**Handling nuclear data:** - -.. toctree:: - :maxdepth: 1 - - ace - -**Creating input files:** - -.. toctree:: - :maxdepth: 1 - - cmfd - element - filter - geometry - material - mesh - nuclide - opencg_compatible - plots - settings - surface - tallies - trigger - universe - -**Running OpenMC:** - -.. toctree:: - :maxdepth: 1 - - executor - -**Post-processing:** - -.. toctree:: - :maxdepth: 1 - - particle_restart - statepoint - summary - tallies - -**Multi-Group Cross Section Generation** - -.. toctree:: - :maxdepth: 1 - - mgxs - energy_groups - mgxs_library - -**Example Jupyter Notebooks:** - -.. toctree:: - :maxdepth: 1 - - examples/post-processing - examples/pandas-dataframes - examples/tally-arithmetic - examples/mgxs-part-i - examples/mgxs-part-ii - examples/mgxs-part-iii - -.. _Jupyter: https://jupyter.org/ -.. _NumPy: http://www.numpy.org/ -.. _Codecademy: https://www.codecademy.com/tracks/python -.. _Scipy lectures: https://scipy-lectures.github.io/ diff --git a/_sources/pythonapi/material.txt b/_sources/pythonapi/material.txt deleted file mode 100644 index 16a3af701..000000000 --- a/_sources/pythonapi/material.txt +++ /dev/null @@ -1,8 +0,0 @@ -.. _pythonapi_material: - -========= -Materials -========= - -.. automodule:: openmc.material - :members: diff --git a/_sources/pythonapi/mesh.txt b/_sources/pythonapi/mesh.txt deleted file mode 100644 index dbecd7c31..000000000 --- a/_sources/pythonapi/mesh.txt +++ /dev/null @@ -1,8 +0,0 @@ -.. _pythonapi_mesh: - -==== -Mesh -==== - -.. automodule:: openmc.mesh - :members: diff --git a/_sources/pythonapi/mgxs.txt b/_sources/pythonapi/mgxs.txt deleted file mode 100644 index c7084e565..000000000 --- a/_sources/pythonapi/mgxs.txt +++ /dev/null @@ -1,66 +0,0 @@ -.. _pythonapi_mgxs: - -========================== -Multi-Group Cross Sections -========================== - -.. currentmodule:: openmc.mgxs.mgxs - ----------------------------- -Summary of Available Classes ----------------------------- - -.. autosummary:: - - MGXS - AbsorptionXS - CaptureXS - Chi - FissionXS - NuFissionXS - NuScatterXS - NuScatterMatrixXS - ScatterXS - ScatterMatrixXS - TotalXS - TransportXS - -------------------- -Class Documentation -------------------- - -.. autoclass:: MGXS - :members: - -.. autoclass:: AbsorptionXS - :members: - -.. autoclass:: CaptureXS - :members: - -.. autoclass:: Chi - :members: - -.. autoclass:: FissionXS - :members: - -.. autoclass:: NuFissionXS - :members: - -.. autoclass:: NuScatterXS - :members: - -.. autoclass:: NuScatterMatrixXS - :members: - -.. autoclass:: ScatterXS - :members: - -.. autoclass:: ScatterMatrixXS - :members: - -.. autoclass:: TotalXS - :members: - -.. autoclass:: TransportXS - :members: diff --git a/_sources/pythonapi/mgxs_library.txt b/_sources/pythonapi/mgxs_library.txt deleted file mode 100644 index 8ac545700..000000000 --- a/_sources/pythonapi/mgxs_library.txt +++ /dev/null @@ -1,8 +0,0 @@ -.. _pythonapi_mgxs_library: - -============ -MGXS Library -============ - -.. automodule:: openmc.mgxs.library - :members: diff --git a/_sources/pythonapi/nuclide.txt b/_sources/pythonapi/nuclide.txt deleted file mode 100644 index 9e3214e92..000000000 --- a/_sources/pythonapi/nuclide.txt +++ /dev/null @@ -1,8 +0,0 @@ -.. _pythonapi_nuclide: - -======= -Nuclide -======= - -.. automodule:: openmc.nuclide - :members: diff --git a/_sources/pythonapi/opencg_compatible.txt b/_sources/pythonapi/opencg_compatible.txt deleted file mode 100644 index c807e19cc..000000000 --- a/_sources/pythonapi/opencg_compatible.txt +++ /dev/null @@ -1,8 +0,0 @@ -.. _pythonapi_opencg_compatible: - -==================== -OpenCG Compatibility -==================== - -.. automodule:: openmc.opencg_compatible - :members: diff --git a/_sources/pythonapi/particle_restart.txt b/_sources/pythonapi/particle_restart.txt deleted file mode 100644 index 66ed89988..000000000 --- a/_sources/pythonapi/particle_restart.txt +++ /dev/null @@ -1,8 +0,0 @@ -.. _pythonapi_particle_restart: - -================ -Particle Restart -================ - -.. automodule:: openmc.particle_restart - :members: diff --git a/_sources/pythonapi/plots.txt b/_sources/pythonapi/plots.txt deleted file mode 100644 index 8ad5348be..000000000 --- a/_sources/pythonapi/plots.txt +++ /dev/null @@ -1,8 +0,0 @@ -.. _pythonapi_plots: - -===== -Plots -===== - -.. automodule:: openmc.plots - :members: diff --git a/_sources/pythonapi/settings.txt b/_sources/pythonapi/settings.txt deleted file mode 100644 index 3a3915ff5..000000000 --- a/_sources/pythonapi/settings.txt +++ /dev/null @@ -1,8 +0,0 @@ -.. _pythonapi_settings: - -======== -Settings -======== - -.. automodule:: openmc.settings - :members: diff --git a/_sources/pythonapi/statepoint.txt b/_sources/pythonapi/statepoint.txt deleted file mode 100644 index 737fc03fc..000000000 --- a/_sources/pythonapi/statepoint.txt +++ /dev/null @@ -1,8 +0,0 @@ -.. _pythonapi_statepoint: - -========== -Statepoint -========== - -.. automodule:: openmc.statepoint - :members: diff --git a/_sources/pythonapi/summary.txt b/_sources/pythonapi/summary.txt deleted file mode 100644 index 9a791127b..000000000 --- a/_sources/pythonapi/summary.txt +++ /dev/null @@ -1,8 +0,0 @@ -.. _pythonapi_summary: - -======= -Summary -======= - -.. automodule:: openmc.summary - :members: diff --git a/_sources/pythonapi/surface.txt b/_sources/pythonapi/surface.txt deleted file mode 100644 index cc31f5b3e..000000000 --- a/_sources/pythonapi/surface.txt +++ /dev/null @@ -1,8 +0,0 @@ -.. _pythonapi_surface: - -======= -Surface -======= - -.. automodule:: openmc.surface - :members: diff --git a/_sources/pythonapi/tallies.txt b/_sources/pythonapi/tallies.txt deleted file mode 100644 index 2f24edf3a..000000000 --- a/_sources/pythonapi/tallies.txt +++ /dev/null @@ -1,8 +0,0 @@ -.. _pythonapi_tallies: - -======= -Tallies -======= - -.. automodule:: openmc.tallies - :members: diff --git a/_sources/pythonapi/trigger.txt b/_sources/pythonapi/trigger.txt deleted file mode 100644 index 82567c2cf..000000000 --- a/_sources/pythonapi/trigger.txt +++ /dev/null @@ -1,8 +0,0 @@ -.. _pythonapi_trigger: - -======= -Trigger -======= - -.. automodule:: openmc.trigger - :members: diff --git a/_sources/pythonapi/universe.txt b/_sources/pythonapi/universe.txt deleted file mode 100644 index fd4a3c1e2..000000000 --- a/_sources/pythonapi/universe.txt +++ /dev/null @@ -1,8 +0,0 @@ -.. _pythonapi_universe: - -======== -Universe -======== - -.. automodule:: openmc.universe - :members: diff --git a/_sources/quickinstall.txt b/_sources/quickinstall.txt deleted file mode 100644 index 9ce752be7..000000000 --- a/_sources/quickinstall.txt +++ /dev/null @@ -1,62 +0,0 @@ -.. _quickinstall: - -=================== -Quick Install Guide -=================== - -This quick install guide outlines the basic steps needed to install OpenMC on -your computer. For more detailed instructions on configuring and installing -OpenMC, see :ref:`usersguide_install` in the User's Manual. - --------------------------------- -Installing on Ubuntu through PPA --------------------------------- - -For users with Ubuntu 11.10 or later, a binary package for OpenMC is available -through a `Personal Package Archive`_ (PPA) and can be installed through the `APT -package manager`_. Simply enter the following commands into the terminal: - -.. code-block:: sh - - sudo apt-add-repository ppa:paulromano/staging - sudo apt-get update - sudo apt-get install openmc - -Currently, the binary package does not allow for parallel simulations or use of -HDF5_. Users who need such capabilities should build OpenMC from source as is -described in :ref:`usersguide_install`. - -.. _Personal Package Archive: https://launchpad.net/~paulromano/+archive/staging -.. _APT package manager: https://help.ubuntu.com/community/AptGet/Howto -.. _HDF5: http://www.hdfgroup.org/HDF5/ - -------------------------------------------- -Installing from Source on Linux or Mac OS X -------------------------------------------- - -All OpenMC source code is hosted on GitHub_. If you have git_, the gfortran_ -compiler, CMake_, and HDF5_ installed, you can download and install OpenMC be -entering the following commands in a terminal: - -.. code-block:: sh - - git clone https://github.com/mit-crpg/openmc.git - cd openmc - git checkout -b master origin/master - mkdir build && cd build - cmake .. - make - sudo make install - -This will build an executable named ``openmc`` and install it (by default in -/usr/local/bin). If you do not have administrator privileges, the cmake command -should specify an installation directory where you have write access, e.g. - -.. code-block:: sh - - cmake -DCMAKE_INSTALL_PREFIX=$HOME/.local .. - -.. _GitHub: https://github.com/mit-crpg/openmc -.. _git: http://git-scm.com -.. _gfortran: http://gcc.gnu.org/wiki/GFortran -.. _CMake: http://www.cmake.org diff --git a/_sources/releasenotes.txt b/_sources/releasenotes.txt deleted file mode 100644 index 65309fd70..000000000 --- a/_sources/releasenotes.txt +++ /dev/null @@ -1,91 +0,0 @@ -.. _releasenotes: - -============================== -Release Notes for OpenMC 0.7.1 -============================== - -This release of OpenMC provides some substantial improvements over version -0.7.0. Non-simple cell regions can now be defined through the ``|`` (union) and -``~`` (complement) operators. Similar changes in the Python API also allow -complex cell regions to be defined. A true secondary particle bank now exists; -this is crucial for photon transport (to be added in the next minor release). A -rich API for multi-group cross section generation has been added via the -``openmc.mgxs`` Python module. - -Various improvements to tallies have also been made. It is now possible to -explicitly specify that a collision estimator be used in a tally. A new -``delayedgroup`` filter and ``delayed-nu-fission`` score allow a user to obtain -delayed fission neutron production rates filtered by delayed group. Finally, the -new ``inverse-velocity`` score may be useful for calculating kinetics -parameters. - -.. caution:: In previous versions, depending on how OpenMC was compiled binary - output was either given in HDF5 or a flat binary format. With this - version, all binary output is now HDF5 which means you **must** - have HDF5 in order to install OpenMC. Please consult the user's - guide for instructions on how to compile with HDF5. - -------------------- -System Requirements -------------------- - -There are no special requirements for running the OpenMC code. As of this -release, OpenMC has been tested on a variety of Linux distributions, Mac OS X, -and Microsoft Windows 7. Memory requirements will vary depending on the size of -the problem at hand (mostly on the number of nuclides in the problem). - ------------- -New Features ------------- - -- Support for complex cell regions (union and complement operators) -- Generic quadric surface type -- Improved handling of secondary particles -- Binary output is now solely HDF5 -- ``openmc.mgxs`` Python module enabling multi-group cross section generation -- Collision estimator for tallies -- Delayed fission neutron production tallies with ability to filter by delayed - group -- Inverse velocity tally score -- Performance improvements for binary search -- Performance improvements for reaction rate tallies - ---------- -Bug Fixes ---------- - -- 299322_: Bug with material filter when void material present -- d74840_: Fix triggers on tallies with multiple filters -- c29a81_: Correctly handle maximum transport energy -- 3edc23_: Fixes in the nu-scatter score -- 629e3b_: Assume unspecified surface coefficients are zero in Python API -- 5dbe8b_: Fix energy filters for openmc-plot-mesh-tally -- ff66f4_: Fixes in the openmc-plot-mesh-tally script -- 441fd4_: Fix bug in kappa-fission score -- 7e5974_: Allow fixed source simulations from Python API - -.. _299322: https://github.com/mit-crpg/openmc/commit/299322 -.. _d74840: https://github.com/mit-crpg/openmc/commit/d74840 -.. _c29a81: https://github.com/mit-crpg/openmc/commit/c29a81 -.. _3edc23: https://github.com/mit-crpg/openmc/commit/3edc23 -.. _629e3b: https://github.com/mit-crpg/openmc/commit/629e3b -.. _5dbe8b: https://github.com/mit-crpg/openmc/commit/5dbe8b -.. _ff66f4: https://github.com/mit-crpg/openmc/commit/ff66f4 -.. _441fd4: https://github.com/mit-crpg/openmc/commit/441fd4 -.. _7e5974: https://github.com/mit-crpg/openmc/commit/7e5974 - ------------- -Contributors ------------- - -This release contains new contributions from the following people: - -- `Will Boyd `_ -- `Sterling Harper `_ -- `Bryan Herman `_ -- `Colin Josey `_ -- `Adam Nelson `_ -- `Paul Romano `_ -- `Kelly Rowland `_ -- `Sam Shaner `_ -- `Jon Walsh `_ diff --git a/_sources/usersguide/beginners.txt b/_sources/usersguide/beginners.txt deleted file mode 100644 index d65ee1f83..000000000 --- a/_sources/usersguide/beginners.txt +++ /dev/null @@ -1,157 +0,0 @@ -.. _usersguide_beginners: - -============================ -A Beginner's Guide to OpenMC -============================ - --------------------- -What does OpenMC do? --------------------- - -In a nutshell, OpenMC simulates neutrons moving around randomly in a `nuclear -reactor`_ (or other fissile system). This is what's known as `Monte Carlo`_ -simulation. Neutrons are important in nuclear reactors because they are the -particles that induce `fission`_ in uranium and other nuclides. Knowing the -behavior of neutrons allows you to figure out how often and where fission -occurs. The amount of energy released is then directly proportional to the -fission reaction rate since most heat is produced by fission. By simulating many -neutrons (millions or billions), it is possible to determine the average -behavior of these neutrons (or the behavior of the energy produced or any other -quantity one is interested in) very accurately. - -Using Monte Carlo methods to determine the average behavior of various physical -quantities in a nuclear reactor is quite different from other means of solving -the same problem. The other class of methods for determining the behavior of -neutrons and reactions rates in a reactor is so-called `deterministic`_ -methods. In these methods, the starting point is not randomly simulating -particles but rather writing an equation that describes the average behavior of -the particles. The equation that describes the average behavior of neutrons is -called the `neutron transport`_ equation. This equation is a seven-dimensional -equation (three for space, three for velocity, and one for time) and is very -difficult to solve directly. For all but the simplest problems, it is necessary -to make some sort of `discretization`_. As an example, we can divide up all -space into small sections which are homogeneous and then solve the equation on -those small sections. After these discretizations and various approximations, -one can arrive at forms that are suitable for solution on a computer. Among -these are discrete ordinates, method of characteristics, finite-difference -diffusion, and nodal methods. - -So why choose Monte Carlo over deterministic methods? Each method has its pros -and cons. Let us first take a look at few of the salient pros and cons of -deterministic methods: - -- **Pro**: Depending on what method is used, solution can be determined very - quickly. - -- **Pro**: The solution is a global solution, i.e. we know the average behavior - everywhere. - -- **Pro**: Once the problem is converged, the solution is known. - -- **Con**: If the model is complex, it is necessary to do sophisticated mesh - generation. - -- **Con**: It is necessary to generate multi-group cross sections which requires - knowing the solution *a priori*. - -Now let's look at the pros and cons of Monte Carlo methods: - -- **Pro**: No mesh generation is required to build geometry. By using - `constructive solid geometry`_, it's possible to build arbitrarily complex - models with curved surfaces. - -- **Pro**: Monte Carlo methods can be used with either continuous-energy or - multi-group cross sections. - -- **Pro**: Running simulations in parallel is conceptually very simple. - -- **Con**: Because they related on repeated random sampling, they are - computationally very expensive. - -- **Con**: A simulation doesn't automatically give you the global solution - everywhere -- you have to specifically ask for those quantities you want. - -- **Con**: Even after the problem is converged, it is necessary to simulate - many particles to reduce stochastic uncertainty. - -Because fewer approximations are made in solving a problem by the Monte Carlo -method, it is often seen as a "gold standard" which can be used as a benchmark -for a solution of the same problem by deterministic means. However, it comes at -the expense of a potentially longer simulation. - ------------------ -How does it work? ------------------ - -In order to do anything, the code first needs to have a model of some problem of -interest. This could be a nuclear reactor or any other physical system with -fissioning material. You, as the code user, will need to describe the model so -that the code can do something with it. A basic model consists of a few things: - -- A description of the geometry -- the problem should be split up into regions - of homogeneous material. -- For each different material in the problem, a description of what nuclides are - in the material and at what density. -- Various parameters telling the code how many particles to simulate and what - options to use. -- A list of different physical quantities that the code should return at the end - of the simulation. Remember, in a Monte Carlo simulation, if you don't ask for - anything, it will not give you any answers (other than a few default - quantities). - ------------------------ -What do I need to know? ------------------------ - -If you are starting to work with OpenMC, there are a few things you should be -familiar with. Whether you plan on working in Linux, Mac OS X, or Windows, you -should be comfortable working in a command line environment. There are many -resources online for learning command line environments. If you are using Linux -or Mac OS X (also Unix-derived), `this tutorial -`_ will help you get acquainted with -commonly-used commands. It is also helpful to be familiar with `Python -`_, as most of the post-processing utilities provided -with OpenMC rely on it for data manipulation and results visualization. - -OpenMC uses a version control software called `git`_ to keep track of changes to -the code, document bugs and issues, and other development tasks. While you don't -necessarily have to have git installed in order to download and run OpenMC, it -makes it much easier to receive updates if you do have it installed and have a -basic understanding of how it works. There are a list of good `git tutorials`_ -at the git documentation website. The `OpenMC source code`_ and documentation -are hosted at `GitHub`_. In order to receive updates to the code directly, -submit `bug reports`_, and perform other development tasks, you may want to sign -up for a free account on GitHub. Once you have an account, you can follow `these -instructions `_ on how to set up -your computer for using GitHub. - -If you are new to nuclear engineering, you may want to review the NRC's `Reactor -Concepts Manual`_. This manual describes the basics of nuclear power for -electricity generation, the fission process, and the overall systems in a -pressurized or boiling water reactor. Another resource that is a bit more -technical than the Reactor Concepts Manual but still at an elementary level is -the DOE Fundamentals Handbook on Nuclear Physics and Reactor Theory `Volume I`_ -and `Volume II`_. You may also find it helpful to review the following terms: - -- `Neutron cross section`_ -- `Effective multiplication factor`_ -- `Flux`_ - -.. _nuclear reactor: http://en.wikipedia.org/wiki/Nuclear_reactor -.. _Monte Carlo: http://en.wikipedia.org/wiki/Monte_Carlo_method -.. _fission: http://en.wikipedia.org/wiki/Nuclear_fission -.. _deterministic: http://en.wikipedia.org/wiki/Deterministic_algorithm -.. _neutron transport: http://en.wikipedia.org/wiki/Neutron_transport -.. _discretization: http://en.wikipedia.org/wiki/Discretization -.. _constructive solid geometry: http://en.wikipedia.org/wiki/Constructive_solid_geometry -.. _git: http://git-scm.com/ -.. _git tutorials: http://git-scm.com/documentation -.. _Reactor Concepts Manual: http://www.tayloredge.com/periodic/trivia/ReactorConcepts.pdf -.. _Volume I: http://energy.gov/sites/prod/files/2013/06/f2/h1019v1.pdf -.. _Volume II: http://energy.gov/sites/prod/files/2013/06/f2/h1019v2.pdf -.. _OpenMC source code: https://github.com/mit-crpg/openmc -.. _GitHub: https://github.com/ -.. _bug reports: https://github.com/mit-crpg/openmc/issues -.. _Neutron cross section: http://en.wikipedia.org/wiki/Neutron_cross_section -.. _Effective multiplication factor: http://en.wikipedia.org/wiki/Effective_multiplication_factor -.. _Flux: http://en.wikipedia.org/wiki/Neutron_flux diff --git a/_sources/usersguide/index.txt b/_sources/usersguide/index.txt deleted file mode 100644 index 5a7e7addf..000000000 --- a/_sources/usersguide/index.txt +++ /dev/null @@ -1,19 +0,0 @@ -.. _usersguide: - -============ -User's Guide -============ - -Welcome to the OpenMC User's Guide! This tutorial will guide you through the -essential aspects of using OpenMC to perform simulations. - -.. toctree:: - :numbered: - :maxdepth: 3 - - beginners - install - input - output/index - processing - troubleshoot diff --git a/_sources/usersguide/input.txt b/_sources/usersguide/input.txt deleted file mode 100644 index fa43ca1d2..000000000 --- a/_sources/usersguide/input.txt +++ /dev/null @@ -1,2006 +0,0 @@ -.. _usersguide_input: - -======================= -Writing XML Input Files -======================= - -Unlike many other Monte Carlo codes which use an arbitrary-format ASCII file -with "cards" to specify a particular geometry, materials, and associated run -settings, the input files for OpenMC are structured in a set of XML_ files. XML, -which stands for eXtensible Markup Language, is a simple format that allows data -to be exchanged efficiently between different programs and interfaces. - -Anyone who has ever seen webpages written in HTML will be familiar with the -structure of XML whereby "tags" enclosed in angle brackets denote that a -particular piece of data will follow. Let us examine the follow example: - -.. code-block:: xml - - - John - Smith - 27 - Health Physicist - - -Here we see that the first tag indicates that the following data will describe a -person. The nested tags *firstname*, *lastname*, *age*, and *occupation* -indicate characteristics about the person being described. - -In much the same way, OpenMC input uses XML tags to describe the geometry, the -materials, and settings for a Monte Carlo simulation. - -.. _XML: http://www.w3.org/XML/ - ------------------ -Overview of Files ------------------ - -To assemble a complete model for OpenMC, one needs to create separate XML files -for the geometry, materials, and settings. Additionally, there are three optional -input files. The first is a tallies XML file that specifies physical quantities -to be tallied. The second is a plots XML file that specifies regions of geometry -which should be plotted. The third is a CMFD XML file that specifies coarse mesh -acceleration geometry and execution parameters. OpenMC expects that these -files are called: - -* ``geometry.xml`` -* ``materials.xml`` -* ``settings.xml`` -* ``tallies.xml`` -* ``plots.xml`` -* ``cmfd.xml`` - --------------------- -Validating XML Files --------------------- - -Input files can be checked before executing OpenMC using the -``openmc-validate-xml`` script which is installed alongside the Python API. Two -command line arguments can be set when running ``openmc-validate-xml``: - -* ``-i``, ``--input-path`` - Location of OpenMC input files. - *Default*: current working directory -* ``-r``, ``--relaxng-path`` - Location of OpenMC RelaxNG files. - *Default*: None - -If the RelaxNG path is not set, the script will search for these files because -it expects that the user is either running the script located in the install -directory ``bin`` folder or in ``src/utils``. Once executed, it will match -OpenMC XML files with their RelaxNG schema and check if they are valid. Below -is a table of the messages that will be printed after each file is checked. - -======================== =================================== -Message Description -======================== =================================== -[XML ERROR] Cannot parse XML file. -[NO RELAXNG FOUND] No RelaxNG file found for XML file. -[NOT VALID] XML file does not match RelaxNG. -[VALID] XML file matches RelaxNG. -======================== =================================== - -As an example, if OpenMC is installed in the directory ``/opt/openmc/`` and the -current working directory is where OpenMC XML input files are located, they can -be validated using the following command: - -.. code-block:: bash - - /opt/openmc/bin/openmc-validate-xml - --------------------------------------- -Settings Specification -- settings.xml --------------------------------------- - -All simulation parameters and miscellaneous options are specified in the -settings.xml file. - -```` Element ----------------------------------- - -The ```` element has no attributes and has an accepted -value of "true" or "false". If set to "true", uncertainties on tally results -will be reported as the half-width of the 95% two-sided confidence interval. If -set to "false", uncertainties on tally results will be reported as the sample -standard deviation. - - *Default*: false - -.. _cross_sections: - -```` Element ----------------------------- - -The ```` element has no attributes and simply indicates the path -to an XML cross section listing file (usually named cross_sections.xml). If this -element is absent from the settings.xml file, the :envvar:`CROSS_SECTIONS` -environment variable will be used to find the path to the XML cross section -listing. - -```` Element --------------------- - -The ```` element indicates the weight cutoff used below which particles -undergo Russian roulette. Surviving particles are assigned a user-determined -weight. Note that weight cutoffs and Russian rouletting are not turned on by -default. This element has the following attributes/sub-elements: - - :weight: - The weight below which particles undergo Russian roulette. - - *Default*: 0.25 - - :weight_avg: - The weight that is assigned to particles that are not killed after Russian - roulette. - - *Default*: 1.0 - -.. _eigenvalue: - -```` Element ------------------------- - -The ```` element indicates that a :math:`k`-eigenvalue calculation -should be performed. It has the following attributes/sub-elements: - - :batches: - The total number of batches, where each batch corresponds to multiple - fission source iterations. Batching is done to eliminate correlation between - realizations of random variables. - - *Default*: None - - :generations_per_batch: - The number of total fission source iterations per batch. - - *Default*: 1 - - :inactive: - The number of inactive batches. In general, the starting cycles in a - criticality calculation can not be used to contribute to tallies since the - fission source distribution and eigenvalue are generally not converged - immediately. - - *Default*: None - - :particles: - The number of neutrons to simulate per fission source iteration. - - *Default*: None - - :keff_trigger: - This tag specifies a precision trigger on the combined :math:`k_{eff}`. The - trigger is a convergence criterion on the uncertainty of the estimated - eigenvalue. It has the following attributes/sub-elements: - - :type: - The type of precision trigger. Accepted options are "variance", "std_dev", - and "rel_err". - - :variance: - Variance of the batch mean :math:`\sigma^2` - - :std_dev: - Standard deviation of the batch mean :math:`\sigma` - - :rel_err: - Relative error of the batch mean :math:`\frac{\sigma}{\mu}` - - *Default*: None - - :threshold: - The precision trigger's convergence criterion for the - combined :math:`k_{eff}`. - - *Default*: None - - .. note:: See section on the :ref:`trigger` for more information. - -```` Element -------------------------- - -The ```` element determines the treatment of the energy grid during -a simulation. The valid options are "nuclide", "logarithm", and -"material-union". Setting this element to "nuclide" will cause OpenMC to use a -nuclide's energy grid when determining what points to interpolate between for -determining cross sections (i.e. non-unionized energy grid). Setting this -element to "logarithm" causes OpenMC to use a logarithmic mapping technique -described in LA-UR-14-24530_. Setting this element to "material-union" will -cause OpenMC to create energy grids that are unionized material-by-material and -use these grids when determining the energy-cross section pairs to interpolate -cross section values between. - - *Default*: logarithm - -.. _LA-UR-14-24530: https://laws.lanl.gov/vhosts/mcnp.lanl.gov/pdf_files/la-ur-14-24530.pdf - -```` Element ---------------------- - -The ```` element describes a mesh that is used for calculating Shannon -entropy. This mesh should cover all possible fissionable materials in the -problem. It has the following attributes/sub-elements: - - :dimension: - The number of mesh cells in the x, y, and z directions, respectively. - - *Default*: If this tag is not present, the number of mesh cells is - automatically determined by the code. - - :lower_left: - The Cartesian coordinates of the lower-left corner of the mesh. - - *Default*: None - - :upper_right: - The Cartesian coordinates of the upper-right corner of the mesh. - - *Default*: None - -```` Element --------------------------- - -The ```` element indicates that a fixed source calculation should -be performed. It has the following attributes/sub-elements: - - :batches: - The total number of batches. For fixed source calculations, each batch - represents a realization of random variables for tallies. - - *Default*: None - - :particles: - The number of particles to simulate per batch. - - *Default*: None - -```` Element ---------------------------- - -The ```` element indicates the number of bins to use for the -logarithmic-mapped energy grid. Using more bins will result in energy grid -searches over a smaller range at the expense of more memory. The default is -based on the recommended value in LA-UR-14-24530_. - - *Default*: 8000 - -.. _natural_elements: - -```` Element ------------------------------- - -The ```` element indicates to OpenMC what nuclides are -available in the cross section library when expanding an ```` into -separate isotopes (see :ref:`material`). The accepted values are: - - - ENDF/B-VII.0 - - ENDF/B-VII.1 - - JEFF-3.1.1 - - JEFF-3.1.2 - - JEFF-3.2 - - JENDL-3.2 - - JENDL-3.3 - - JENDL-4.0 - -Note that the value is case-insensitive, so "ENDF/B-VII.1" is equivalent to -"endf/b-vii.1". - - *Default*: ENDF/B-VII.1 - -```` Element ------------------------ - -The ```` element has no attributes and has an accepted value of -"true" or "false". If set to "true", all user-defined tallies and global tallies -will not be reduced across processors in a parallel calculation. This means that -the accumulate score in one batch on a single processor is considered as an -independent realization for the tally random variable. For a problem with large -tally data, this option can significantly improve the parallel efficiency. - - *Default*: false - -```` Element --------------------- - -The ```` element determines what output files should be written to disk -during the run. The sub-elements are described below, where "true" will write -out the file and "false" will not. - - :cross_sections: - Writes out an ASCII summary file of the cross sections that were read in. - - *Default*: false - - :summary: - Writes out an ASCII summary file describing all of the user input files that - were read in. - - *Default*: false - - :tallies: - Write out an ASCII file of tally results. - - *Default*: true - - .. note:: The tally results will always be written to a binary/HDF5 state - point file. - -```` Element -------------------------- - -The ```` element specifies an absolute or relative path where all -output files should be written to. The specified path must exist or else OpenMC -will abort. - - *Default*: Current working directory - -```` Element ---------------------- - -The ```` element determines whether probability tables should be used -in the unresolved resonance range if available. This element has no attributes -or sub-elements and can be set to either "false" or "true". - - *Default*: true - -```` Element ----------------------------------- - -The ``resonance_scattering`` element can contain one or more of the following -attributes or sub-elements: - - :scatterer: - An element with attributes/sub-elements called ``nuclide``, ``method``, - ``xs_label``, ``xs_label_0K``, ``E_min``, and ``E_max``. The ``nuclide`` - attribute is the name, as given by the ``name`` attribute within the - ``nuclide`` sub-element of the ``material`` element in ``materials.xml``, - of the nuclide to which a resonance scattering treatment is to be applied. - The ``method`` attribute gives the type of resonance scattering treatment - that is to be applied to the ``nuclide``. Acceptable inputs - none of - which are case-sensitive - for the ``method`` attribute are ``ARES``, - ``CXS``, ``WCM``, and ``DBRC``. Descriptions of each of these methods - are documented here_. The ``xs_label`` attribute gives the label for the - cross section data of the ``nuclide`` at a given temperature. The - ``xs_label_0K`` gives the label for the 0 K cross section data for the - ``nuclide``. The ``E_min`` attribute gives the minimum energy above - which the ``method`` is applied. The ``E_max`` attribute gives the - maximum energy below which the ``method`` is applied. One example would - be as follows: - - .. _here: http://dx.doi.org/10.1016/j.anucene.2014.01.017 - - .. code-block:: xml - - - - U-238 - ARES - 92238.72c - 92238.00c - 5.0e-6 - 40.0e-6 - - - Pu-239 - dbrc - 94239.72c - 94239.00c - 0.01e-6 - 210.0e-6 - - - - .. note:: If the ``resonance_scattering`` element is not given, the free gas, - constant cross section (``cxs``) scattering model, which has - historically been used by Monte Carlo codes to sample target - velocities, is used to treat the target motion of all nuclides. If - ``resonance_scattering`` is present, the ``cxs`` method is applied - below ``E_min`` and the target-at-rest (asymptotic) kernel is used - above ``E_max``. An arbitrary number of ``scatterer`` elements may - be specified, each corresponding to a single nuclide at a single - temperature. - - *Defaults*: None (scatterer), ARES (method), 0.01 eV (E_min), 1.0 keV (E_max) - -```` Element ----------------------- - -The ```` element indicates whether or not CMFD acceleration should be -turned on or off. This element has no attributes or sub-elements and can be set -to either "false" or "true". - - *Defualt*: false - -```` Element ------------------- - -The ``seed`` element is used to set the seed used for the linear congruential -pseudo-random number generator. - - *Default*: 1 - -```` Element --------------------- - -The ``source`` element gives information on an external source distribution to -be used either as the source for a fixed source calculation or the initial -source guess for criticality calculations. It takes the following -attributes/sub-elements: - - :file: - If this attribute is given, it indicates that the source is to be read from - a binary source file whose path is given by the value of this element. Note, - the number of source sites needs to be the same as the number of particles - simulated in a fission source generation. - - *Default*: None - - :space: - An element specifying the spatial distribution of source sites. This element - has the following attributes: - - :type: - - The type of spatial distribution. Valid options are "box", "fission", and - "point". A "box" spatial distribution has coordinates sampled uniformly in - a parallelepiped. A "fission" spatial distribution samples locations from - a "box" distribution but only locations in fissionable materials are - accepted. A "point" spatial distribution has coordinates specified by a - triplet. - - *Default*: None - - :parameters: - For a "box" or "fission" spatial distribution, ``parameters`` should be - given as six real numbers, the first three of which specify the lower-left - corner of a parallelepiped and the last three of which specify the - upper-right corner. Source sites are sampled uniformly through that - parallelepiped. - - For a "point" spatial distribution, ``parameters`` should be given as - three real numbers which specify the (x,y,z) location of an isotropic - point source - - *Default*: None - - :angle: - An element specifying the angular distribution of source sites. This element - has the following attributes: - - :type: - The type of angular distribution. Valid options are "isotropic" and - "monodirectional". The angle of the particle emitted from a source site is - isotropic if the "isotropic" option is given. The angle of the particle - emitted from a source site is the direction specified in the - attribute if "monodirectional" option is given. - - *Default*: isotropic - - :parameters: - For an "isotropic" angular distribution, ``parameters`` should not be - specified. - - For a "monodirectional" angular distribution, ``parameters`` should be - given as three real numbers which specify the angular cosines with respect - to each axis. - - *Default*: None - - :energy: - An element specifying the energy distribution of source sites. This element - has the following attributes: - - :type: - - The type of energy distribution. Valid options are "monoenergetic", - "watt", and "maxwell". The "monoenergetic" option produces source sites at - a single energy. The "watt" option produces source sites whose energy is - sampled from a Watt fission spectrum. The "maxwell" option produce source - sites whose energy is sampled from a Maxwell fission spectrum. - - *Default*: watt - - :parameters: - For a "monoenergetic" energy distribution, ``parameters`` should be - given as the energy in MeV of the source sites. - - For a "watt" energy distribution, ``parameters`` should be given as two - real numbers :math:`a` and :math:`b` that parameterize the distribution - :math:`p(E) dE = c e^{-E/a} \sinh \sqrt{b \, E} dE`. - - For a "maxwell" energy distribution, ``parameters`` should be given as one - real number :math:`a` that parameterizes the distribution :math:`p(E) dE = - c E e^{-E/a} dE`. - - *Default*: 0.988 2.249 - - :write_initial: - An element specifying whether to write out the initial source bank used at - the beginning of the first batch. The output file is named - "initial_source.binary(h5)" - - *Default*: false - -```` Element -------------------------- - -The ```` element indicates at what batches a state point file -should be written. A state point file can be used to restart a run or to get -tally results at any batch. The default behavior when using this tag is to -write out the source bank in the state_point file. This behavior can be -customized by using the ```` element. This element has the -following attributes/sub-elements: - - :batches: - A list of integers separated by spaces indicating at what batches a state - point file should be written. - - *Default*: Last batch only - - :interval: - A single integer :math:`n` indicating that a state point should be written - every :math:`n` batches. This option can be given in lieu of listing - batches explicitly. - - *Default*: None - -```` Element --------------------------- - -The ```` element indicates at what batches the source bank -should be written. The source bank can be either written out within a state -point file or separately in a source point file. This element has the following -attributes/sub-elements: - - :batches: - A list of integers separated by spaces indicating at what batches a state - point file should be written. It should be noted that if the ``separate`` - attribute is not set to "true", this list must be a subset of state point - batches. - - *Default*: Last batch only - - :interval: - A single integer :math:`n` indicating that a state point should be written - every :math:`n` batches. This option can be given in lieu of listing batches - explicitly. It should be noted that if the ``separate`` attribute is not set - to "true", this value should produce a list of batches that is a subset of - state point batches. - - *Default*: None - - :separate: - If this element is set to "true", a separate binary source point file will - be written. Otherwise, the source sites will be written in the state point - directly. - - *Default*: false - - :source_write: - If this element is set to "false", source sites are not written - to the state point or source point file. This can substantially reduce the - size of state points if large numbers of particles per batch are used. - - *Default*: true - - :overwrite_latest: - If this element is set to "true", a source point file containing - the source bank will be written out to a separate file named - ``source.binary`` or ``source.h5`` depending on if HDF5 is enabled. - This file will be overwritten at every single batch so that the latest - source bank will be available. It should be noted that a user can set both - this element to "true" and specify batches to write a permanent source bank. - - *Default*: false - -```` Element ------------------------------- - -The ```` element has no attributes and has an accepted value -of "true" or "false". If set to "true", this option will enable the use of -survival biasing, otherwise known as implicit capture or absorption. - - *Default*: false - -```` Element ---------------------- - -The ```` element indicates the number of OpenMP threads to be used for -a simulation. It has no attributes and accepts a positive integer value. - - *Default*: None (Determined by environment variable :envvar:`OMP_NUM_THREADS`) - -.. _trace: - -```` Element -------------------- - -The ```` element can be used to print out detailed information about a -single particle during a simulation. This element should be followed by three -integers: the batch number, generation number, and particle number. - - *Default*: None - -.. _track: - -```` Element -------------------- - -The ```` element specifies particles for which OpenMC will output binary -files describing particle position at every step of its transport. This element -should be followed by triplets of integers. Each triplet describes one -particle. The integers in each triplet specify the batch number, generation -number, and particle number, respectively. - - *Default*: None - -.. _trigger: - -```` Element -------------------------- - -OpenMC includes tally precision triggers which allow the user to define -uncertainty thresholds on :math:`k_{eff}` in the ```` subelement of -``settings.xml``, and/or tallies in ``tallies.xml``. When using triggers, -OpenMC will run until it completes as many batches as defined by ````. -At this point, the uncertainties on all tallied values are computed and -compared with their corresponding trigger thresholds. If any triggers have not -been met, OpenMC will continue until either all trigger thresholds have been -satisfied or ```` has been reached. - -The ```` element provides an active "toggle switch" for tally -precision trigger(s), the maximum number of batches and the batch interval. It -has the following attributes/sub-elements: - - :active: - This determines whether or not to use trigger(s). Trigger(s) are used when - this tag is set to "true". - - :max_batches: - This describes the maximum number of batches allowed when using trigger(s). - - .. note:: When max_batches is set, the number of ``batches`` shown in - ```` element represents minimum number of batches to - simulate when using the trigger(s). - - :batch_interval: - This tag describes the number of batches in between convergence checks. - OpenMC will check if the trigger has been reached at each batch defined - by ``batch_interval`` after the minimum number of batches is reached. - - .. note:: If this tag is not present, the ``batch_interval`` is predicted - dynamically by OpenMC for each convergence check. The predictive - model assumes no correlation between fission sources - distributions from batch-to-batch. This assumption is reasonable - for fixed source and small criticality calculations, but is very - optimistic for highly coupled full-core reactor problems. - - -```` Element ------------------------- - -The ```` element describes a mesh that is used for re-weighting -source sites at every generation based on the uniform fission site methodology -described in Kelly et al., "MC21 Analysis of the Nuclear Energy Agency Monte -Carlo Performance Benchmark Problem," Proceedings of *Physor 2012*, Knoxville, -TN (2012). This mesh should cover all possible fissionable materials in the -problem. It has the following attributes/sub-elements: - - :dimension: - The number of mesh cells in the x, y, and z directions, respectively. - - *Default*: None - - :lower_left: - The Cartesian coordinates of the lower-left corner of the mesh. - - *Default*: None - - :upper_right: - The Cartesian coordinates of the upper-right corner of the mesh. - - *Default*: None - -```` Element ------------------------ - -The ```` element tells the code how much information to display to -the standard output. A higher verbosity corresponds to more information being -displayed. This element takes the following attributes: - - :value: - The specified verbosity between 1 and 10. - - *Default*: 5 - --------------------------------------- -Geometry Specification -- geometry.xml --------------------------------------- - -The geometry in OpenMC is described using `constructive solid geometry`_ (CSG), -also sometimes referred to as combinatorial geometry. CSG allows a user to -create complex objects using Boolean operators on a set of simpler surfaces. In -the geometry model, each unique volume is defined by its bounding surfaces. In -OpenMC, most `quadratic surfaces`_ can be modeled and used as bounding surfaces. - -Every geometry.xml must have an XML declaration at the beginning of the file and -a root element named geometry. Within the root element the user can define any -number of cells, surfaces, and lattices. Let us look at the following example: - -.. code-block:: xml - - - - - - - 1 - sphere - 0.0 0.0 0.0 5.0 - vacuum - - - - 1 - 0 - 1 - -1 - - - -At the beginning of this file is a comment, denoted by a tag starting with -````. Comments, as well as any other type of input, -may span multiple lines. One convenient feature of the XML input format is that -sub-elements of the ``cell`` and ``surface`` elements can also be equivalently -expressed of attributes of the original element, e.g. the geometry file above -could be written as: - -.. code-block:: xml - - - - - - - - - - -.. _surface_element: - -```` Element ---------------------- - -Each ```` element can have the following attributes or sub-elements: - - :id: - A unique integer that can be used to identify the surface. - - *Default*: None - - :name: - An optional string name to identify the surface in summary output - files. This string is limited to 52 characters for formatting purposes. - - *Default*: "" - - :type: - The type of the surfaces. This can be "x-plane", "y-plane", "z-plane", - "plane", "x-cylinder", "y-cylinder", "z-cylinder", "sphere", "x-cone", - "y-cone", "z-cone", or "quadric". - - *Default*: None - - :coeffs: - The corresponding coefficients for the given type of surface. See below for - a list a what coefficients to specify for a given surface - - *Default*: None - - :boundary: - The boundary condition for the surface. This can be "transmission", - "vacuum", or "reflective". - - *Default*: "transmission" - -The following quadratic surfaces can be modeled: - - :x-plane: - A plane perpendicular to the x axis, i.e. a surface of the form :math:`x - - x_0 = 0`. The coefficients specified are ":math:`x_0`". - - :y-plane: - A plane perpendicular to the y axis, i.e. a surface of the form :math:`y - - y_0 = 0`. The coefficients specified are ":math:`y_0`". - - :z-plane: - A plane perpendicular to the z axis, i.e. a surface of the form :math:`z - - z_0 = 0`. The coefficients specified are ":math:`z_0`". - - :plane: - An arbitrary plane of the form :math:`Ax + By + Cz = D`. The coefficients - specified are ":math:`A \: B \: C \: D`". - - :x-cylinder: - An infinite cylinder whose length is parallel to the x-axis. This is a - quadratic surface of the form :math:`(y - y_0)^2 + (z - z_0)^2 = R^2`. The - coefficients specified are ":math:`y_0 \: z_0 \: R`". - - :y-cylinder: - An infinite cylinder whose length is parallel to the y-axis. This is a - quadratic surface of the form :math:`(x - x_0)^2 + (z - z_0)^2 = R^2`. The - coefficients specified are ":math:`x_0 \: z_0 \: R`". - - :z-cylinder: - An infinite cylinder whose length is parallel to the z-axis. This is a - quadratic surface of the form :math:`(x - x_0)^2 + (y - y_0)^2 = R^2`. The - coefficients specified are ":math:`x_0 \: y_0 \: R`". - - :sphere: - A sphere of the form :math:`(x - x_0)^2 + (y - y_0)^2 + (z - z_0)^2 = - R^2`. The coefficients specified are ":math:`x_0 \: y_0 \: z_0 \: R`". - - :x-cone: - A cone parallel to the x-axis of the form :math:`(y - y_0)^2 + (z - z_0)^2 = - R^2 (x - x_0)^2`. The coefficients specified are ":math:`x_0 \: y_0 \: z_0 - \: R^2`". - - :y-cone: - A cone parallel to the y-axis of the form :math:`(x - x_0)^2 + (z - z_0)^2 = - R^2 (y - y_0)^2`. The coefficients specified are ":math:`x_0 \: y_0 \: z_0 - \: R^2`". - - :z-cone: - A cone parallel to the x-axis of the form :math:`(x - x_0)^2 + (y - y_0)^2 = - R^2 (z - z_0)^2`. The coefficients specified are ":math:`x_0 \: y_0 \: z_0 - \: R^2`". - - :quadric: - A general quadric surface of the form :math:`Ax^2 + By^2 + Cz^2 + Dxy + - Eyz + Fxz + Gx + Hy + Jz + K = 0` The coefficients specified are ":math:`A - \: B \: C \: D \: E \: F \: G \: H \: J \: K`". - - -```` Element ------------------- - -Each ```` element can have the following attributes or sub-elements: - - :id: - A unique integer that can be used to identify the cell. - - *Default*: None - - :name: - An optional string name to identify the cell in summary output files. - This string is limmited to 52 characters for formatting purposes. - - *Default*: "" - - :universe: - The ``id`` of the universe that this cell is contained in. - - *Default*: 0 - - :fill: - The ``id`` of the universe that fills this cell. - - .. note:: If a fill is specified, no material should be given. - - *Default*: None - - :material: - The ``id`` of the material that this cell contains. If the cell should - contain no material, this can also be set to "void". - - .. note:: If a material is specified, no fill should be given. - - *Default*: None - - :region: - A Boolean expression of half-spaces that defines the spatial region which - the cell occupies. Each half-space is identified by the unique ID of the - surface prefixed by `-` or `+` to indicate that it is the negative or - positive half-space, respectively. The `+` sign for a positive half-space - can be omitted. Valid Boolean operators are parentheses, union `|`, - complement `~`, and intersection. Intersection is implicit and indicated by - the presence of whitespace. The order of operator precedence is parentheses, - complement, intersection, and then union. - - As an example, the following code gives a cell that is the union of the - negative half-space of surface 3 and the complement of the intersection of - the positive half-space of surface 5 and the negative half-space of surface - 2: - - .. code-block:: xml - - - - .. note:: The ``region`` attribute/element can be omitted to make a cell - fill its entire universe. - - *Default*: A region filling all space. - - :rotation: - If the cell is filled with a universe, this element specifies the angles in - degrees about the x, y, and z axes that the filled universe should be - rotated. Should be given as three real numbers. For example, if you wanted - to rotate the filled universe by 90 degrees about the z-axis, the cell - element would look something like: - - .. code-block:: xml - - - - *Default*: None - - :translation: - If the cell is filled with a universe, this element specifies a vector that - is used to translate (shift) the universe. Should be given as three real - numbers. - - .. note:: Any translation operation is applied after a rotation, if also - specified. - - *Default*: None - - -```` Element ---------------------- - -The ```` can be used to represent repeating structures (e.g. fuel pins -in an assembly) or other geometry which fits onto a rectilinear grid. Each cell -within the lattice is filled with a specified universe. A ```` accepts -the following attributes or sub-elements: - - :id: - A unique integer that can be used to identify the lattice. - - :name: - An optional string name to identify the lattice in summary output - files. This string is limited to 52 characters for formatting purposes. - - *Default*: "" - - :dimension: - Two or three integers representing the number of lattice cells in the x- and - y- (and z-) directions, respectively. - - *Default*: None - - :lower_left: - The coordinates of the lower-left corner of the lattice. If the lattice is - two-dimensional, only the x- and y-coordinates are specified. - - *Default*: None - - :pitch: - If the lattice is 3D, then three real numbers that express the distance - between the centers of lattice cells in the x-, y-, and z- directions. If - the lattice is 2D, then omit the third value. - - *Default*: None - - :outer: - The unique integer identifier of a universe that will be used to fill all - space outside of the lattice. The universe will be tiled repeatedly as if - it were placed in a lattice of infinite size. This element is optional. - - *Default*: An error will be raised if a particle leaves a lattice with no - outer universe. - - :universes: - A list of the universe numbers that fill each cell of the lattice. - - *Default*: None - -Here is an example of a properly defined 2d rectangular lattice: - -.. code-block:: xml - - - -1.5 -1.5 - 1.0 1.0 - - 2 2 2 - 2 1 2 - 2 2 2 - - - -```` Element -------------------------- - -The ```` can be used to represent repeating structures (e.g. fuel -pins in an assembly) or other geometry which naturally fits onto a hexagonal -grid or hexagonal prism grid. Each cell within the lattice is filled with a -specified universe. This lattice uses the "flat-topped hexagon" scheme where two -of the six edges are perpendicular to the y-axis. A ```` accepts -the following attributes or sub-elements: - - :id: - A unique integer that can be used to identify the lattice. - - :name: - An optional string name to identify the hex_lattice in summary output - files. This string is limited to 52 characters for formatting purposes. - - *Default*: "" - - :n_rings: - An integer representing the number of radial ring positions in the xy-plane. - Note that this number includes the degenerate center ring which only has one - element. - - *Default*: None - - :n_axial: - An integer representing the number of positions along the z-axis. This - element is optional. - - *Default*: None - - :center: - The coordinates of the center of the lattice. If the lattice does not have - axial sections then only the x- and y-coordinates are specified. - - *Default*: None - - :pitch: - If the lattice is 3D, then two real numbers that express the distance - between the centers of lattice cells in the xy-plane and along the z-axis, - respectively. If the lattice is 2D, then omit the second value. - - *Default*: None - - :outer: - The unique integer identifier of a universe that will be used to fill all - space outside of the lattice. The universe will be tiled repeatedly as if - it were placed in a lattice of infinite size. This element is optional. - - *Default*: An error will be raised if a particle leaves a lattice with no - outer universe. - - :universes: - A list of the universe numbers that fill each cell of the lattice. - - *Default*: None - -Here is an example of a properly defined 2d hexagonal lattice: - -.. code-block:: xml - - -
0.0 0.0
- 1.0 - - 202 - 202 202 - 202 202 202 - 202 202 - 202 101 202 - 202 202 - 202 202 202 - 202 202 - 202 - -
- -.. _constructive solid geometry: http://en.wikipedia.org/wiki/Constructive_solid_geometry - -.. _quadratic surfaces: http://en.wikipedia.org/wiki/Quadric - ----------------------------------------- -Materials Specification -- materials.xml ----------------------------------------- - -.. _material: - -```` Element ----------------------- - -Each ``material`` element can have the following attributes or sub-elements: - - :id: - A unique integer that can be used to identify the material. - - :name: - An optional string name to identify the material in summary output - files. This string is limited to 52 characters for formatting purposes. - - *Default*: "" - - :density: - An element with attributes/sub-elements called ``value`` and ``units``. The - ``value`` attribute is the numeric value of the density while the ``units`` - can be "g/cm3", "kg/m3", "atom/b-cm", "atom/cm3", or "sum". The "sum" unit - indicates that values appearing in ``ao`` attributes for ```` and - ```` sub-elements are to be interpreted as nuclide/element - densities in atom/b-cm, and the total density of the material is taken as - the sum of all nuclides/elements. The "sum" option cannot be used in - conjunction with weight percents. - - *Default*: None - - :nuclide: - An element with attributes/sub-elements called ``name``, ``xs``, and ``ao`` - or ``wo``. The ``name`` attribute is the name of the cross-section for a - desired nuclide while the ``xs`` attribute is the cross-section - identifier. Finally, the ``ao`` and ``wo`` attributes specify the atom or - weight percent of that nuclide within the material, respectively. One - example would be as follows: - - .. code-block:: xml - - - - - .. note:: If one nuclide is specified in atom percent, all others must also - be given in atom percent. The same applies for weight percentages. - - An optional attribute/sub-element for each nuclide is ``scattering``. This - attribute may be set to "data" to use the scattering laws specified by the - cross section library (default). Alternatively, when set to "iso-in-lab", - the scattering laws are used to sample the outgoing energy but an - isotropic-in-lab distribution is used to sample the outgoing angle at each - scattering interaction. The ``scattering`` attribute may be most useful - when using OpenMC to compute multi-group cross-sections for deterministic - transport codes and to quantify the effects of anisotropic scattering. - - *Default*: None - - :element: - - Specifies that a natural element is present in the material. The natural - element is split up into individual isotopes based on `IUPAC Isotopic - Compositions of the Elements 2009`_. This element has - attributes/sub-elements called ``name``, ``xs``, and ``ao``. The ``name`` - attribute is the atomic symbol of the element while the ``xs`` attribute is - the cross-section identifier. Finally, the ``ao`` attribute specifies the - atom percent of the element within the material, respectively. One example - would be as follows: - - .. code-block:: xml - - - - - - - In some cross section libraries, certain naturally occurring isotopes do not - have cross sections. The :ref:`natural_elements` option determines how a - natural element is split into isotopes in these cases. - - *Default*: None - - An optional attribute/sub-element for each element is ``scattering``. This - attribute may be set to "data" to use the scattering laws specified by the - cross section library (default). Alternatively, when set to "iso-in-lab", - the scattering laws are used to sample the outgoing energy but an - isotropic-in-lab distribution is used to sample the outgoing angle at each - scattering interaction. The ``scattering`` attribute may be most useful - when using OpenMC to compute multi-group cross-sections for deterministic - transport codes and to quantify the effects of anisotropic scattering. - - *Default*: None - - :sab: - Associates an S(a,b) table with the material. This element has - attributes/sub-elements called ``name`` and ``xs``. The ``name`` attribute - is the name of the S(a,b) table that should be associated with the material, - and ``xs`` is the cross-section identifier for the table. - - *Default*: None - -.. _IUPAC Isotopic Compositions of the Elements 2009: - http://pac.iupac.org/publications/pac/pdf/2011/pdf/8302x0397.pdf - -```` Element ------------------------- - -In some circumstances, the cross-section identifier may be the same for many or -all nuclides in a given problem. In this case, rather than specifying the -``xs=...`` attribute on every nuclide, a ```` element can be used to -set the default cross-section identifier for any nuclide without an identifier -explicitly listed. This element has no attributes and accepts a 3-letter string -that indicates the default cross-section identifier, e.g. "70c". - - *Default*: None - ------------------------------------- -Tallies Specification -- tallies.xml ------------------------------------- - -The tallies.xml file allows the user to tell the code what results he/she is -interested in, e.g. the fission rate in a given cell or the current across a -given surface. There are two pieces of information that determine what -quantities should be scored. First, one needs to specify what region of phase -space should count towards the tally and secondly, the actual quantity to be -scored also needs to be specified. The first set of parameters we call *filters* -since they effectively serve to filter events, allowing some to score and -preventing others from scoring to the tally. - -The structure of tallies in OpenMC is flexible in that any combination of -filters can be used for a tally. The following types of filter are available: -cell, universe, material, surface, birth region, pre-collision energy, -post-collision energy, and an arbitrary structured mesh. - -The three valid elements in the tallies.xml file are ````, ````, -and ````. - -.. _tally: - -```` Element -------------------- - -The ```` element accepts the following sub-elements: - - :name: - An optional string name to identify the tally in summary output - files. This string is limited to 52 characters for formatting purposes. - - *Default*: "" - - :filter: - Specify a filter that restricts contributions to the tally to particles - within certain regions of phase space. This element and its - attributes/sub-elements are described below. - - .. note:: - You may specify zero, one, or multiple filters to apply to the tally. To - specify multiple filters, you must use multiple ```` elements. - - The ``filter`` element has the following attributes/sub-elements: - - :type: - The type of the filter. Accepted options are "cell", "cellborn", - "material", "universe", "energy", "energyout", "mesh", "distribcell", - and "delayedgroup". - - :bins: - For each filter type, the corresponding ``bins`` entry is given as - follows: - - :cell: - A list of cells in which the tally should be accumulated. - - :cellborn: - This filter allows the tally to be scored to only when particles were - originally born in a specified cell. - - :surface: - A list of surfaces for which the tally should be accumulated. - - :material: - A list of materials for which the tally should be accumulated. - - :universe: - A list of universes for which the tally should be accumulated. - - :energy: - A monotonically increasing list of bounding **pre-collision** energies - for a number of groups. For example, if this filter is specified as - - .. code-block:: xml - - - - then two energy bins will be created, one with energies between 0 and - 1 MeV and the other with energies between 1 and 20 MeV. - - :energyout: - A monotonically increasing list of bounding **post-collision** - energies for a number of groups. For example, if this filter is - specified as - - .. code-block:: xml - - - - then two post-collision energy bins will be created, one with energies - between 0 and 1 MeV and the other with energies between 1 and 20 MeV. - - :mu: - A monotonically increasing list of bounding **post-collision** cosines - of the change in a particle's angle (i.e., :math:`\mu = \hat{\Omega} - \cdot \hat{\Omega}'`), which represents a portion of the possible - values of :math:`[-1,1]`. For example, spanning all of :math:`[-1,1]` - with five equi-width bins can be specified as: - - .. code-block:: xml - - - - Alternatively, if only one value is provided as a bin, OpenMC will - interpret this to mean the complete range of :math:`[-1,1]` should - be automatically subdivided in to the provided value for the bin. - That is, the above example of five equi-width bins spanning - :math:`[-1,1]` can be instead written as: - - .. code-block:: xml - - - - :polar: - A monotonically increasing list of bounding particle polar angles - which represents a portion of the possible values of :math:`[0,\pi]`. - For example, spanning all of :math:`[0,\pi]` with five equi-width - bins can be specified as: - - .. code-block:: xml - - - - Alternatively, if only one value is provided as a bin, OpenMC will - interpret this to mean the complete range of :math:`[0,\pi]` should - be automatically subdivided in to the provided value for the bin. - That is, the above example of five equi-width bins spanning - :math:`[0,\pi]` can be instead written as: - - .. code-block:: xml - - - - :azimuthal: - A monotonically increasing list of bounding particle azimuthal angles - which represents a portion of the possible values of :math:`[-\pi,\pi)`. - For example, spanning all of :math:`[-\pi,\pi)` with two equi-width - bins can be specified as: - - .. code-block:: xml - - - - Alternatively, if only one value is provided as a bin, OpenMC will - interpret this to mean the complete range of :math:`[-\pi,\pi)` should - be automatically subdivided in to the provided value for the bin. - That is, the above example of five equi-width bins spanning - :math:`[-\pi,\pi)` can be instead written as: - - .. code-block:: xml - - - - :mesh: - The ``id`` of a structured mesh to be tallied over. - - :distribcell: - The single cell which should be tallied uniquely for all instances. - - .. note:: - The distribcell filter will take a single cell ID and will tally - each unique occurrence of that cell separately. This filter will - not accept more than one cell ID. It is not recommended to combine - this filter with a cell or mesh filter. - - :delayedgroup: - A list of delayed neutron precursor groups for which the tally should - be accumulated. For instance, to tally to all 6 delayed groups in the - ENDF/B-VII.1 library the filter is specified as: - - .. code-block:: xml - - - - :nuclides: - If specified, the scores listed will be for particular nuclides, not the - summation of reactions from all nuclides. The format for nuclides should be - [Atomic symbol]-[Mass number], e.g. "U-235". The reaction rate for all - nuclides can be obtained with "total". For example, to obtain the reaction - rates for U-235, Pu-239, and all nuclides in a material, this element should - be: - - .. code-block:: xml - - U-235 Pu-239 total - - *Default*: total - - :estimator: - The estimator element is used to force the use of either ``analog``, - ``collision``, or ``tracklength`` tally estimation. ``analog`` is generally - the least efficient though it can be used with every score type. - ``tracklength`` is generally the most efficient, but neither ``tracklength`` - nor ``collision`` can be used to score a tally that requires post-collision - information. For example, a scattering tally with outgoing energy filters - cannot be used with ``tracklength`` or ``collision`` because the code will - not know the outgoing energy distribution. - - *Default*: ``tracklength`` but will revert to ``analog`` if necessary. - - :scores: - A space-separated list of the desired responses to be accumulated. Accepted - options are "flux", "total", "scatter", "absorption", "fission", - "nu-fission", "delayed-nu-fission", "kappa-fission", "nu-scatter", - "scatter-N", "scatter-PN", "scatter-YN", "nu-scatter-N", "nu-scatter-PN", - "nu-scatter-YN", "flux-YN", "total-YN", "current", "inverse-velocity" and - "events". These correspond to the following physical quantities: - - :flux: - Total flux in particle-cm per source particle. - - .. note:: - The ``analog`` estimator is actually identical to the ``collision`` - estimator for the flux score. - - :total: - Total reaction rate in reactions per source particle. - - :scatter: - Total scattering rate. Can also be identified with the ``scatter-0`` - response type. Units are reactions per source particle. - - :absorption: - Total absorption rate. This accounts for all reactions which do not - produce secondary neutrons. Units are reactions per source particle. - - :fission: - Total fission rate in reactions per source particle. - - :nu-fission: - Total production of neutrons due to fission. Units are neutrons produced - per source neutron. - - :delayed-nu-fission: - Total production of delayed neutrons due to fission. Units are neutrons produced - per source neutron. - - :kappa-fission: - The recoverable energy production rate due to fission. The recoverable - energy is defined as the fission product kinetic energy, prompt and - delayed neutron kinetic energies, prompt and delayed :math:`\gamma`-ray - total energies, and the total energy released by the delayed :math:`\beta` - particles. The neutrino energy does not contribute to this response. The - prompt and delayed :math:`\gamma`-rays are assumed to deposit their energy - locally. Units are MeV per source particle. - - :scatter-N: - Tally the N\ :sup:`th` \ scattering moment, where N is the Legendre - expansion order of the change in particle angle :math:`\left(\mu\right)`. - N must be between 0 and 10. As an example, tallying the 2\ :sup:`nd` \ - scattering moment would be specified as `` scatter-2 - ``. Units are reactions per source particle. - - :scatter-PN: - Tally all of the scattering moments from order 0 to N, where N is the - Legendre expansion order of the change in particle angle - :math:`\left(\mu\right)`. That is, ``scatter-P1`` is equivalent to - requesting tallies of ``scatter-0`` and ``scatter-1``. Like for - ``scatter-N``, N must be between 0 and 10. As an example, tallying up to - the 2\ :sup:`nd` \ scattering moment would be specified as `` - scatter-P2 ``. Units are reactions per source particle. - - :scatter-YN: - ``scatter-YN`` is similar to ``scatter-PN`` except an additional expansion - is performed for the incoming particle direction - :math:`\left(\Omega\right)` using the real spherical harmonics. This is - useful for performing angular flux moment weighting of the scattering - moments. Like ``scatter-PN``, ``scatter-YN`` will tally all of the moments - from order 0 to N; N again must be between 0 and 10. Units are reactions - per source particle. - - :nu-scatter, nu-scatter-N, nu-scatter-PN, nu-scatter-YN: - These scores are similar in functionality to their ``scatter*`` - equivalents except the total production of neutrons due to scattering is - scored vice simply the scattering rate. This accounts for multiplicity - from (n,2n), (n,3n), and (n,4n) reactions. Units are neutrons produced per - source particle. - - :flux-YN: - Spherical harmonic expansion of the direction of motion - :math:`\left(\Omega\right)` of the total flux. This score will tally all - of the harmonic moments of order 0 to N. N must be between 0 - and 10. Units are particle-cm per source particle. - - :total-YN: - The total reaction rate expanded via spherical harmonics about the - direction of motion of the neutron, :math:`\Omega`. - This score will tally all of the harmonic moments of order 0 to N. N must - be between 0 and 10. Units are reactions per source particle. - - :current: - Partial currents on the boundaries of each cell in a mesh. Units are - particles per source particle. - - .. note:: - This score can only be used if a mesh filter has been - specified. Furthermore, it may not be used in conjunction with any - other score. - - :inverse-velocity: - The flux-weighted inverse velocity where the velocity is in units of - centimeters per second. - - .. note:: - The ``analog`` estimator is actually identical to the ``collision`` - estimator for the inverse-velocity score. - - :events: - Number of scoring events. Units are events per source particle. - - :trigger: - Precision trigger applied to all filter bins and nuclides for this tally. - It must specify the trigger's type, threshold and scores to which it will - be applied. It has the following attributes/sub-elements: - - :type: - The type of the trigger. Accepted options are "variance", "std_dev", - and "rel_err". - - :variance: - Variance of the batch mean :math:`\sigma^2` - - :std_dev: - Standard deviation of the batch mean :math:`\sigma` - - :rel_err: - Relative error of the batch mean :math:`\frac{\sigma}{\mu}` - - *Default*: None - - :threshold: - The precision trigger's convergence criterion for tallied values. - - *Default*: None - - :scores: - The score(s) in this tally to which the trigger should be applied. - - .. note:: The ``scores`` in ``trigger`` must have been defined in - ``scores`` in ``tally``. An optional "all" may be used to - select all scores in this tally. - - *Default*: "all" - -```` Element ------------------- - -If a structured mesh is desired as a filter for a tally, it must be specified in -a separate element with the tag name ````. This element has the following -attributes/sub-elements: - - :type: - The type of structured mesh. The only valid option is "regular". - - :dimension: - The number of mesh cells in each direction. - - :lower_left: - The lower-left corner of the structured mesh. If only two coordinates are - given, it is assumed that the mesh is an x-y mesh. - - :upper_right: - The upper-right corner of the structured mesh. If only two coordinates are - given, it is assumed that the mesh is an x-y mesh. - - :width: - The width of mesh cells in each direction. - - .. note:: - One of ```` or ```` must be specified, but not both - (even if they are consistent with one another). - -```` Element ------------------------------ - -In cases where the user needs to specify many different tallies each of which -are spatially separate, this tag can be used to cut down on some of the tally -overhead. The effect of assuming all tallies are spatially separate is that once -one tally is scored to, the same event is assumed not to score to any other -tallies. This element should be followed by "true" or "false". - - .. warning:: If used incorrectly, the assumption that all tallies are - spatially separate can lead to incorrect results. - - *Default*: false - -.. _usersguide_plotting: - --------------------------------------------- -Geometry Plotting Specification -- plots.xml --------------------------------------------- - -Basic plotting capabilities are available in OpenMC by creating a plots.xml -file and subsequently running with the command-line flag ``-plot``. The root -element of the plots.xml is simply ```` and any number output plots can -be defined with ```` sub-elements. Two plot types are currently -implemented in openMC: - -* ``slice`` 2D pixel plot along one of the major axes. Produces a PPM image - file. -* ``voxel`` 3D voxel data dump. Produces a binary file containing voxel xyz - position and cell or material id. - - -```` Element ------------------- - -Each plot is specified by a combination of the following attributes or -sub-elements: - - :id: - The unique ``id`` of the plot. - - *Default*: None - Required entry - - :filename: - Filename for the output plot file. - - *Default*: "plot" - - :color: - Keyword for plot coloring. This can only be either ``cell`` or ``mat``, - which colors regions by cells and materials, respectively. For voxel plots, - this determines which id (cell or material) is associated with each - position. - - *Default*: ``cell`` - - :level: - Universe depth to plot at (optional). This parameter controls how many - universe levels deep to pull cell and material ids from when setting plot - colors. If a given location does not have as many levels as specified, - colors will be taken from the lowest level at that location. For example, if - ``level`` is set to zero colors will be taken from top-level (universe zero) - cells only. However, if ``level`` is set to 1 colors will be taken from - cells in universes that fill top-level fill-cells, and from top-level cells - that contain materials. - - *Default*: Whatever the deepest universe is in the model - - :origin: - Specifies the (x,y,z) coordinate of the center of the plot. Should be three - floats separated by spaces. - - *Default*: None - Required entry - - :width: - Specifies the width of the plot along each of the basis directions. Should - be two or three floats separated by spaces for 2D plots and 3D plots, - respectively. - - *Default*: None - Required entry - - :type: - Keyword for type of plot to be produced. Currently only "slice" and "voxel" - plots are implemented. The "slice" plot type creates 2D pixel maps saved in - the PPM file format. PPM files can be displayed in most viewers (e.g. the - default Gnome viewer, IrfanView, etc.). The "voxel" plot type produces a - binary datafile containing voxel grid positioning and the cell or material - (specified by the ``color`` tag) at the center of each voxel. These - datafiles can be processed into 3D SILO files using the - ``openmc-voxel-to-silovtk`` utility provided with the OpenMC source, and - subsequently viewed with a 3D viewer such as VISIT or Paraview. See the - :ref:`usersguide_voxel` for information about the datafile structure. - - .. note:: Since the PPM format is saved without any kind of compression, - the resulting file sizes can be quite large. Saving the image in - the PNG format can often times reduce the file size by orders of - magnitude without any loss of image quality. Likewise, - high-resolution voxel files produced by OpenMC can be quite large, - but the equivalent SILO files will be significantly smaller. - - *Default*: "slice" - -```` elements of ``type`` "slice" and "voxel" must contain the ``pixels`` -attribute or sub-element: - - :pixels: - Specifies the number of pixels or voxels to be used along each of the basis - directions for "slice" and "voxel" plots, respectively. Should be two or - three integers separated by spaces. - - .. warning:: The ``pixels`` input determines the output file size. For the - PPM format, 10 million pixels will result in a file just under - 30 MB in size. A 10 million voxel binary file will be around - 40 MB. - - .. warning:: If the aspect ratio defined in ``pixels`` does not match the - aspect ratio defined in ``width`` the plot may appear stretched - or squeezed. - - .. warning:: Geometry features along a basis direction smaller than - ``width``/``pixels`` along that basis direction may not appear - in the plot. - - *Default*: None - Required entry for "slice" and "voxel" plots - -```` elements of ``type`` "slice" can also contain the following -attributes or sub-elements. These are not used in "voxel" plots: - - :basis: - Keyword specifying the plane of the plot for "slice" type plots. Can be - one of: "xy", "xz", "yz". - - *Default*: "xy" - - :background: - Specifies the RGB color of the regions where no OpenMC cell can be found. - Should be three integers separated by spaces. - - *Default*: 0 0 0 (black) - - :col_spec: - Any number of this optional tag may be included in each ```` element, - which can override the default random colors for cells or materials. Each - ``col_spec`` element must contain ``id`` and ``rgb`` sub-elements. - - :id: - Specifies the cell or material unique id for the color specification. - - :rgb: - Specifies the custom color for the cell or material. Should be 3 integers - separated by spaces. - - As an example, if your plot is colored by material and you want material 23 - to be blue, the corresponding ``col_spec`` element would look like: - - .. code-block:: xml - - - - *Default*: None - - :mask: - The special ``mask`` sub-element allows for the selective plotting of *only* - user-specified cells or materials. Only one ``mask`` element is allowed per - ``plot`` element, and it must contain as attributes or sub-elements a - background masking color and a list of cells or materials to plot: - - :components: - List of unique ``id`` numbers of the cells or materials to plot. Should be - any number of integers separated by spaces. - - :background: - Color to apply to all cells or materials not in the ``components`` list of - cells or materials to plot. This overrides any ``col_spec`` color - specifications. - - *Default*: None - - :meshlines: - The ``meshlines`` sub-element allows for plotting the boundaries of - a tally mesh on top of a plot. Only one ``meshlines`` element is allowed per - ``plot`` element, and it must contain as attributes or sub-elements a mesh - type and a linewidth. Optionally, a color may be specified for the overlay: - - :meshtype: - The type of the mesh to be plotted. Valid options are "tally", "entropy", - "ufs", and "cmfd". If plotting "tally" meshes, the id of the mesh to plot - must be specified with the ``id`` sub-element. - - :id: - A single integer id number for the mesh specified on ``tallies.xml`` that - should be plotted. This element is only required for ``meshtype="tally"``. - - :linewidth: - A single integer number of pixels of linewidth to specify for the mesh - boundaries. Specifying this as 0 indicates that lines will be 1 pixel - thick, specifying 1 indicates 3 pixels thick, specifying 2 indicates - 5 pixels thick, etc. - - :color: - Specifies the custom color for the meshlines boundaries. Should be 3 - integers separated by whitespace. This element is optional. - - *Default*: 0 0 0 (black) - - *Default*: None - -.. _usersguide_cmfd: - ------------------------------- -CMFD Specification -- cmfd.xml ------------------------------- - -Coarse mesh finite difference acceleration method has been implemented in -OpenMC. Currently, it allows users to accelerate fission source convergence -during inactive neutron batches. To run CMFD, the ```` element in -``settings.xml`` should be set to "true". - -```` Element -------------------- - -The ```` element controls what batch CMFD calculations should begin. - - *Default*: 1 - -```` Element ------------------------- - -The ```` element controls whether :math:`\widehat{D}` nonlinear -CMFD parameters should be reset to zero before solving CMFD eigenproblem. -It can be turned on with "true" and off with "false". - - *Default*: false - -```` Element ---------------------- - -The ```` element sets one additional CMFD output column. Options are: - -* "balance" - prints the RMS [%] of the resdiual from the neutron balance - equation on CMFD tallies. -* "dominance" - prints the estimated dominance ratio from the CMFD iterations. - **This will only work for power iteration eigensolver**. -* "entropy" - prints the *entropy* of the CMFD predicted fission source. - **Can only be used if OpenMC entropy is active as well**. -* "source" - prints the RMS [%] between the OpenMC fission source and CMFD - fission source. - - *Default*: balance - -```` Element -------------------------- - -The ```` element controls whether an effective downscatter cross -section should be used when using 2-group CMFD. It can be turned on with "true" -and off with "false". - - *Default*: false - -```` Element ----------------------- - -The ```` element controls whether or not the CMFD diffusion result is -used to adjust the weight of fission source neutrons on the next OpenMC batch. -It can be turned on with "true" and off with "false". - - *Default*: false - -```` Element ------------------------------------- - -The ```` element specifies two parameters. The first is -the absolute inner tolerance for Gauss-Seidel iterations when performing CMFD -and the second is the relative inner tolerance for Gauss-Seidel iterations -for CMFD calculations. - - *Default*: 1.e-10 1.e-5 - -```` Element --------------------- - -The ```` element specifies the tolerance on the eigenvalue when performing -CMFD power iteration. - - *Default*: 1.e-8 - -```` Element ------------------- - -The CMFD mesh is a structured Cartesian mesh. This element has the following -attributes/sub-elements: - - :lower_left: - The lower-left corner of the structured mesh. If only two coordinates are - given, it is assumed that the mesh is an x-y mesh. - - :upper_right: - The upper-right corner of the structrued mesh. If only two coordinates are - given, it is assumed that the mesh is an x-y mesh. - - :dimension: - The number of mesh cells in each direction. - - :width: - The width of mesh cells in each direction. - - :energy: - Energy bins [in MeV], listed in ascending order (e.g. 0.0 0.625e-7 20.0) - for CMFD tallies and acceleration. If no energy bins are listed, OpenMC - automatically assumes a one energy group calculation over the entire - energy range. - - :albedo: - Surface ratio of incoming to outgoing partial currents on global boundary - conditions. They are listed in the following order: -x +x -y +y -z +z. - - *Default*: 1.0 1.0 1.0 1.0 1.0 1.0 - - :map: - An optional acceleration map can be specified to overlay on the coarse - mesh spatial grid. If this option is used, a ``1`` is used for a - non-accelerated region and a ``2`` is used for an accelerated region. - For a simple 4x4 coarse mesh with a 2x2 fuel lattice surrounded by - reflector, the map is: - - ``1 1 1 1`` - - ``1 2 2 1`` - - ``1 2 2 1`` - - ``1 1 1 1`` - - Therefore a 2x2 system of equations is solved rather than a 4x4. This - is extremely important to use in reflectors as neutrons will not - contribute to any tallies far away from fission source neutron regions. - A ``2`` must be used to identify any fission source region. - - .. note:: Only two of the following three sub-elements are needed: - ``lower_left``, ``upper_right`` and ``width``. Any combination - of two of these will yield the third. - -```` Element ------------------- - -The ```` element is used to normalize the CMFD fission source distribution -to a particular value. For example, if a fission source is calculated for a -17 x 17 lattice of pins, the fission source may be normalized to the number of -fission source regions, in this case 289. This is useful when visualizing this -distribution as the average peaking factor will be unity. This parameter will -not impact the calculation. - - *Default*: 1.0 - -```` Element ---------------------------- - -The ```` element is used to view the convergence of power -iteration. This option can be turned on with "true" and turned off with "false". - - *Default*: false - -```` Element -------------------------- - -The ```` element can be turned on with "true" to have an adjoint -calculation be performed on the last batch when CMFD is active. - - *Default*: false - -```` Element --------------------- - -The ```` element specifies an optional Wielandt shift parameter for -accelerating power iterations. It is by default very large so the impact of the -shift is effectively zero. - - *Default*: 1e6 - -```` Element ----------------------- - -The ```` element specifies an optional spectral radius that can be set to -accelerate the convergence of Gauss-Seidel iterations during CMFD power iteration -solve. - - *Default*: 0.0 - -```` Element ------------------- - -The ```` element specifies the tolerance on the fission source when performing -CMFD power iteration. - - *Default*: 1.e-8 - -```` Element -------------------------- - -The ```` element contains a list of batch numbers in which CMFD tallies -should be reset. - - *Default*: None - -```` Element ----------------------------- - -The ```` element is used to write the sparse matrices created -when solving CMFD equations. This option can be turned on with "true" and off -with "false". - - *Default*: false - ------------------------------------- -ERSN-OpenMC Graphical User Interface ------------------------------------- - -A third-party Java-based user-friendly graphical user interface for creating XML -input files called ERSN-OpenMC_ is developed and maintained by members of the -Radiation and Nuclear Systems Group at the Faculty of Sciences Tetouan, Morocco. -The GUI also allows one to automatically download prerequisites for installing and -running OpenMC. - -.. _ERSN-OpenMC: https://github.com/EL-Bakkali-Jaafar/ERSN-OpenMC diff --git a/_sources/usersguide/install.txt b/_sources/usersguide/install.txt deleted file mode 100644 index e3f0df5e9..000000000 --- a/_sources/usersguide/install.txt +++ /dev/null @@ -1,518 +0,0 @@ -.. _usersguide_install: - -============================== -Installation and Configuration -============================== - ------------------------------ -Installing on Ubuntu with PPA ------------------------------ - -For users with Ubuntu 15.04 or later, a binary package for OpenMC is available -through a Personal Package Archive (PPA) and can be installed through the APT -package manager. First, add the following PPA to the repository sources: - -.. code-block:: sh - - sudo apt-add-repository ppa:paulromano/staging - -Next, resynchronize the package index files: - -.. code-block:: sh - - sudo apt-get update - -Now OpenMC should be recognized within the repository and can be installed: - -.. code-block:: sh - - sudo apt-get install openmc - -Binary packages from this PPA may exist for earlier versions of Ubuntu, but they -are no longer supported. - --------------------- -Building from Source --------------------- - -Prerequisites -------------- - -.. admonition:: Required - - * A Fortran compiler such as gfortran_ - - In order to compile OpenMC, you will need to have a Fortran compiler - installed on your machine. Since a number of Fortran 2003/2008 features - are used in the code, it is recommended that you use the latest version of - whatever compiler you choose. For gfortran_, it is necessary to use - version 4.6.0 or above. - - If you are using Debian or a Debian derivative such as Ubuntu, you can - install the gfortran compiler using the following command:: - - sudo apt-get install gfortran - - * CMake_ cross-platform build system - - The compiling and linking of source files is handled by CMake in a - platform-independent manner. If you are using Debian or a Debian - derivative such as Ubuntu, you can install CMake using the following - command:: - - sudo apt-get install cmake - - * HDF5_ Library for portable binary output format - - OpenMC uses HDF5 for binary output files. As such, you will need to have - HDF5 installed on your computer. The installed version will need to have - been compiled with the same compiler you intend to compile OpenMC with. If - you are using HDF5 in conjunction with MPI, we recommend that your HDF5 - installation be built with parallel I/O features. An example of - configuring HDF5_ is listed below:: - - FC=/opt/mpich/3.1/bin/mpif90 CC=/opt/mpich/3.1/bin/mpicc \ - ./configure --prefix=/opt/hdf5/1.8.12 --enable-fortran \ - --enable-fortran2003 --enable-parallel - - You may omit ``--enable-parallel`` if you want to compile HDF5_ in serial. - - .. important:: - - OpenMC uses various parts of the HDF5 Fortran 2003 API; as such you - must include ``--enable-fortran2003`` or else OpenMC will not be able - to compile. - - On Debian derivatives, HDF5 and/or parallel HDF5 can be installed through - the APT package manager: - - .. code-block:: sh - - sudo apt-get install libhdf5-8 libhdf5-dev hdf5-helpers - - Note that the exact package names may vary depending on your particular - distribution and version. - -.. admonition:: Optional - - * An MPI implementation for distributed-memory parallel runs - - To compile with support for parallel runs on a distributed-memory - architecture, you will need to have a valid implementation of MPI - installed on your machine. The code has been tested and is known to work - with the latest versions of both OpenMPI_ and MPICH_. OpenMPI and/or MPICH - can be installed on Debian derivatives with:: - - sudo apt-get install mpich libmpich-dev - sudo apt-get install openmpi-bin libopenmpi1.6 libopenmpi-dev - - * git_ version control software for obtaining source code - -.. _gfortran: http://gcc.gnu.org/wiki/GFortran -.. _CMake: http://www.cmake.org -.. _OpenMPI: http://www.open-mpi.org -.. _MPICH: http://www.mpich.org -.. _HDF5: http://www.hdfgroup.org/HDF5/ - -Obtaining the Source --------------------- - -All OpenMC source code is hosted on GitHub_. You can download the source code -directly from GitHub or, if you have the git_ version control software installed -on your computer, you can use git to obtain the source code. The latter method -has the benefit that it is easy to receive updates directly from the GitHub -repository. GitHub has a good set of `instructions -`_ for how to set up git to work -with GitHub since this involves setting up ssh_ keys. With git installed and -setup, the following command will download the full source code from the GitHub -repository:: - - git clone https://github.com/mit-crpg/openmc.git - -By default, the cloned repository will be set to the development branch. To -switch to the source of the latest stable release, run the following commands:: - - cd openmc - git checkout master - -.. _GitHub: https://github.com/mit-crpg/openmc -.. _git: http://git-scm.com -.. _ssh: http://en.wikipedia.org/wiki/Secure_Shell - -Build Configuration -------------------- - -Compiling OpenMC with CMake is carried out in two steps. First, ``cmake`` is run -to determine the compiler, whether optional packages (MPI, HDF5) are available, -to generate a list of dependencies between source files so that they may be -compiled in the correct order, and to generate a normal Makefile. The Makefile -is then used by ``make`` to actually carry out the compile and linking -commands. A typical out-of-source build would thus look something like the -following - -.. code-block:: sh - - mkdir build && cd build - cmake .. - make - -Note that first a build directory is created as a subdirectory of the source -directory. The Makefile in the top-level directory will automatically perform an -out-of-source build with default options. - -CMakeLists.txt Options -++++++++++++++++++++++ - -The following options are available in the CMakeLists.txt file: - -debug - Enables debugging when compiling. The flags added are dependent on which - compiler is used. - -profile - Enables profiling using the GNU profiler, gprof. - -optimize - Enables high-optimization using compiler-dependent flags. For gfortran and - Intel Fortran, this compiles with -O3. - -openmp - Enables shared-memory parallelism using the OpenMP API. The Fortran compiler - being used must support OpenMP. - -coverage - Compile and link code instrumented for coverage analysis. This is typically - used in conjunction with gcov_. - -maxcoord - Maximum number of nested coordinate levels in geometry. Defaults to 10. - -To set any of these options (e.g. turning on debug mode), the following form -should be used: - -.. code-block:: sh - - cmake -Ddebug=on /path/to/openmc - -.. _gcov: https://gcc.gnu.org/onlinedocs/gcc/Gcov.html - -Compiling with MPI -++++++++++++++++++ - -To compile with MPI, set the :envvar:`FC` environment variable to the path to -the MPI Fortran wrapper. For example, in a bash shell: - -.. code-block:: sh - - export FC=mpif90 - cmake /path/to/openmc - -Note that in many shells, an environment variable can be set for a single -command, i.e. - -.. code-block:: sh - - FC=mpif90 cmake /path/to/openmc - -Selecting HDF5 Installation -+++++++++++++++++++++++++++ - -CMakeLists.txt searches for the ``h5fc`` or ``h5pfc`` HDF5 Fortran wrapper on -your PATH environment variable and subsequently uses it to determine library -locations and compile flags. If you have multiple installations of HDF5 or one -that does not appear on your PATH, you can set the HDF5_ROOT environment -variable to the root directory of the HDF5 installation, e.g. -.. code-block:: sh - - export HDF5_ROOT=/opt/hdf5/1.8.15 - cmake /path/to/openmc - -This will cause CMake to search first in /opt/hdf5/1.8.15/bin for ``h5fc`` / -``h5pfc`` before it searches elsewhere. As noted above, an environment variable -can typically be set for a single command, i.e. - -.. code-block:: sh - - HDF5_ROOT=/opt/hdf5/1.8.15 cmake /path/to/openmc - -Compiling on Linux and Mac OS X -------------------------------- - -To compile OpenMC on Linux or Max OS X, run the following commands from within -the root directory of the source code: - -.. code-block:: sh - - mkdir build && cd build - cmake .. - make - make install - -This will build an executable named ``openmc`` and install it (by default in -/usr/local/bin). If you do not have administrative privileges, you can install -OpenMC locally by specifying an install prefix when running cmake: - -.. code-block:: sh - - cmake -DCMAKE_INSTALL_PREFIX=$HOME/.local .. - -The ``CMAKE_INSTALL_PREFIX`` variable can be changed to any path for which you -have write-access. - -Compiling on Windows --------------------- - -Using Cygwin -++++++++++++ - -One option for compiling OpenMC on a Windows operating system is to use Cygwin_, -a Linux-like environment for Windows. You will need to first `install -Cygwin`_. When you are asked to select packages, make sure the following are -selected: - -* Devel: gcc-core -* Devel: gcc-fortran -* Devel: make -* Devel: cmake - -If you plan on obtaining the source code directly using git, select the -following packages: - -* Devel: git -* Devel: git-completion (Optional) -* Devel: gitk (Optional) - -In order to use the Python scripts provided with OpenMC, you will also need to -install Python. This can be done within Cygwin or directly in Windows. To -install within Cygwin, select the following packages: - -* Python: python (Version > 2.7 recommended) - -Once you have obtained the source code, run the following commands from within -the source code root directory: - -.. code-block:: sh - - mkdir build && cd build - cmake .. - make - -This will build an executable named ``openmc``. - -.. _Cygwin: http://cygwin.com/ -.. _install Cygwin: http://cygwin.com/setup.exe - -Using MinGW -+++++++++++ - -An alternate option for installing OpenMC on Windows is using MinGW_, which -stands for Minimalist GNU for Windows. An executable for installing the MinGW -distribution is available on SourceForge_. When installing MinGW, make sure the -following components are selected: - -* MinGW Compiler Suite: Fortran Compiler -* MSYS Basic System - -Once MinGW is installed, copy the OpenMC source distribution to your MinGW home -directory (usually C:\\MinGW\\msys\\1.0\\home\\YourUsername). Once you have -the source code in place, run the following commands from within the MinGW shell -in the root directory of the OpenMC distribution: - -.. code-block:: sh - - make - -This will build an executable named ``openmc``. - -.. _MinGW: http://www.mingw.org -.. _SourceForge: http://sourceforge.net/projects/mingw - -Compiling for the Intel Xeon Phi --------------------------------- - -In order to build OpenMC for the Intel Xeon Phi using the Intel Fortran -compiler, it is necessary to specify that all objects be compiled with the -``-mmic`` flag as follows: - -.. code-block:: sh - - mkdir build && cd build - FC=ifort FFLAGS=-mmic cmake -Dopenmp=on .. - make - -Note that unless an HDF5 build for the Intel Xeon Phi is already on your target -machine, you will need to cross-compile HDF5 for the Xeon Phi. An `example -script`_ to build zlib and HDF5 provides several necessary workarounds. - -.. _example script: https://github.com/paulromano/install-scripts/blob/master/install-hdf5-mic - -Testing Build -------------- - -If you have ENDF/B-VII.1 cross sections from NNDC_ you can test your build. -Make sure the **CROSS_SECTIONS** environmental variable is set to the -*cross_sections.xml* file in the *data/nndc* directory. -There are two ways to run tests. The first is to use the Makefile present in -the source directory and run the following: - -.. code-block:: sh - - make test - -If you want more options for testing you can use ctest_ command. For example, -if we wanted to run only the plot tests with 4 processors, we run: - -.. code-block:: sh - - cd build - ctest -j 4 -R plot - -If you want to run the full test suite with different build options please -refer to our :ref:`test suite` documentation. - ---------------------------- -Cross Section Configuration ---------------------------- - -In order to run a simulation with OpenMC, you will need cross section data for -each nuclide in your problem. Since OpenMC uses ACE format cross sections, you -can use nuclear data that was processed with NJOY_, such as that distributed -with MCNP_ or Serpent_. Several sources provide free processed ACE data as -described below. The TALYS-based evaluated nuclear data library, TENDL_, is also -openly available in ACE format. - -Using ENDF/B-VII.1 Cross Sections from NNDC -------------------------------------------- - -The NNDC_ provides ACE data from the ENDF/B-VII.1 neutron and thermal scattering -sublibraries at four temperatures processed using NJOY_. To use this data with -OpenMC, a script is provided with OpenMC that will automatically download, -extract, and set up a confiuration file: - -.. code-block:: sh - - cd openmc/data - python get_nndc_data.py - -At this point, you should set the :envvar:`CROSS_SECTIONS` environment variable -to the absolute path of the file ``openmc/data/nndc/cross_sections.xml``. This -cross section set is used by the test suite. - -Using JEFF Cross Sections from OECD/NEA ---------------------------------------- - -The NEA_ provides processed ACE data from the JEFF_ nuclear library upon -request. A DVD of the data can be requested here_. To use this data with OpenMC, -the following steps must be taken: - -1. Copy and unzip the data on the DVD to a directory on your computer. -2. In the root directory, a file named ``xsdir``, or some variant thereof, - should be present. This file contains a listing of all the cross sections and - is used by MCNP. This file should be converted to a ``cross_sections.xml`` - file for use with OpenMC. A utility is provided in the OpenMC distribution - for this purpose: - - .. code-block:: sh - - openmc/scripts/openmc-xsdir-to-xml xsdir31 cross_sections.xml - -3. In the converted ``cross_sections.xml`` file, change the contents of the - element to the absolute path of the directory containing the - actual ACE files. -4. Additionally, you may need to change any occurrences of upper-case "ACE" - within the ``cross_sections.xml`` file to lower-case. -5. Either set the :ref:`cross_sections` in a settings.xml file or the - :envvar:`CROSS_SECTIONS` environment variable to the absolute path of the - ``cross_sections.xml`` file. - -Using Cross Sections from MCNP ------------------------------- - -To use cross sections distributed with MCNP, change the element in -the ``cross_sections.xml`` file in the root directory of the OpenMC distribution -to the location of the MCNP cross sections. Then, either set the -:ref:`cross_sections` in a settings.xml file or the :envvar:`CROSS_SECTIONS` -environment variable to the absolute path of the ``cross_sections.xml`` file. - -Using Cross Sections from Serpent ---------------------------------- - -To use cross sections distributed with Serpent, change the element -in the ``cross_sections_serpent.xml`` file in the root directory of the OpenMC -distribution to the location of the Serpent cross sections. Then, either set the -:ref:`cross_sections` in a settings.xml file or the :envvar:`CROSS_SECTIONS` -environment variable to the absolute path of the ``cross_sections_serpent.xml`` -file. - -.. _NJOY: http://t2.lanl.gov/nis/codes.shtml -.. _NNDC: http://www.nndc.bnl.gov/endf/b7.1/acefiles.html -.. _NEA: http://www.oecd-nea.org -.. _JEFF: http://www.oecd-nea.org/dbdata/jeff/ -.. _here: http://www.oecd-nea.org/dbdata/pubs/jeff312-cd.html -.. _MCNP: http://mcnp.lanl.gov -.. _Serpent: http://montecarlo.vtt.fi -.. _TENDL: ftp://ftp.nrg.eu/pub/www/talys/tendl2012/tendl2012.html - --------------- -Running OpenMC --------------- - -Once you have a model built (see :ref:`usersguide_input`), you can either run -the openmc executable directly from the directory containing your XML input -files, or you can specify as a command-line argument the directory containing -the XML input files. For example, if your XML input files are in the directory -``/home/username/somemodel/``, one way to run the simulation would be: - -.. code-block:: sh - - cd /home/username/somemodel - openmc - -Alternatively, you could run from any directory: - -.. code-block:: sh - - openmc /home/username/somemodel - -Note that in the latter case, any output files will be placed in the present -working directory which may be different from ``/home/username/somemodel``. - -Command-Line Flags ------------------- - -OpenMC accepts the following command line flags: - --g, --geometry-debug Run in geometry debugging mode, where cell overlaps are - checked for after each move of a particle --n, --particles N Use *N* particles per generation or batch --p, --plot Run in plotting mode --r, --restart file Restart a previous run from a state point or a particle - restart file --s, --threads N Run with *N* OpenMP threads --t, --track Write tracks for all particles --v, --version Show version information - ------------------------------------------------------ -Configuring Input Validation with GNU Emacs nXML mode ------------------------------------------------------ - -The `GNU Emacs`_ text editor has a built-in mode that extends functionality for -editing XML files. One of the features in nXML mode is the ability to perform -real-time `validation`_ of XML files against a `RELAX NG`_ schema. The OpenMC -source contains RELAX NG schemas for each type of user input file. In order for -nXML mode to know about these schemas, you need to tell emacs where to find a -"locating files" description. Adding the following lines to your ``~/.emacs`` -file will enable real-time validation of XML input files: - -.. code-block:: common-lisp - - (require 'rng-loc) - (add-to-list 'rng-schema-locating-files "~/openmc/schemas.xml") - -Make sure to replace the last string on the second line with the path to the -schemas.xml file in your own OpenMC source directory. - -.. _GNU Emacs: http://www.gnu.org/software/emacs/ -.. _validation: http://en.wikipedia.org/wiki/XML_validation -.. _RELAX NG: http://relaxng.org/ -.. _ctest: http://www.cmake.org/cmake/help/v2.8.12/ctest.html diff --git a/_sources/usersguide/output/index.txt b/_sources/usersguide/output/index.txt deleted file mode 100644 index 31bd1da91..000000000 --- a/_sources/usersguide/output/index.txt +++ /dev/null @@ -1,16 +0,0 @@ -.. _usersguide_output: - -=================== -Output File Formats -=================== - -.. toctree:: - :numbered: - :maxdepth: 3 - - statepoint - source - summary - particle_restart - track - voxel diff --git a/_sources/usersguide/output/particle_restart.txt b/_sources/usersguide/output/particle_restart.txt deleted file mode 100644 index e0d89a515..000000000 --- a/_sources/usersguide/output/particle_restart.txt +++ /dev/null @@ -1,57 +0,0 @@ -.. _usersguide_particle_restart: - -============================ -Particle Restart File Format -============================ - -The current revision of the particle restart file format is 1. - -**/filetype** (*char[]*) - - String indicating the type of file. - -**/revision** (*int*) - - Revision of the particle restart file format. Any time a change is made in - the format, this integer is incremented. - -**/current_batch** (*int*) - - The number of batches already simulated. - -**/gen_per_batch** (*int*) - - Number of generations per batch. - -**/current_gen** (*int*) - - The number of generations already simulated. - -**/n_particles** (*int8_t*) - - Number of particles used per generation. - -**/run_mode** (*int*) - - Run mode used. A value of 1 indicates a fixed-source run and a value of 2 - indicates an eigenvalue run. - -**/id** (*int8_t*) - - Unique identifier of the particle. - -**/weight** (*double*) - - Weight of the particle. - -**/energy** (*double*) - - Energy of the particle in MeV. - -**/xyz** (*double[3]*) - - Position of the particle. - -**/uvw** (*double[3]*) - - Direction of the particle. diff --git a/_sources/usersguide/output/source.txt b/_sources/usersguide/output/source.txt deleted file mode 100644 index 2981b0f66..000000000 --- a/_sources/usersguide/output/source.txt +++ /dev/null @@ -1,19 +0,0 @@ -.. _usersguide_source: - -================== -Source File Format -================== - -Normally, source data is stored in a state point file. However, it is possible -to request that the source be written separately, in which case the format used -is that documented here. - -**/filetype** (*char[]*) - - String indicating the type of file. - -**/source_bank** (Compound type) - - Source bank information for each particle. The compound type has fields - ``wgt``, ``xyz``, ``uvw``, and ``E`` which represent the weight, position, - direction, and energy of the source particle, respectively. diff --git a/_sources/usersguide/output/statepoint.txt b/_sources/usersguide/output/statepoint.txt deleted file mode 100644 index d3c1729af..000000000 --- a/_sources/usersguide/output/statepoint.txt +++ /dev/null @@ -1,259 +0,0 @@ -.. _usersguide_statepoint: - -======================= -State Point File Format -======================= - -The current revision of the statepoint file format is 14. - -**/filetype** (*char[]*) - - String indicating the type of file. - -**/revision** (*int*) - - Revision of the state point file format. Any time a change is made in the - format, this integer is incremented. - -**/version_major** (*int*) - - Major version number for OpenMC - -**/version_minor** (*int*) - - Minor version number for OpenMC - -**/version_release** (*int*) - - Release version number for OpenMC - -**/date_and_time** (*char[]*) - - Date and time the state point was written. - -**/path** (*char[]*) - - Absolute path to directory containing input files. - -**/seed** (*int8_t*) - - Pseudo-random number generator seed. - -**/run_mode** (*char[]*) - - Run mode used. A value of 1 indicates a fixed-source run and a value of 2 - indicates an eigenvalue run. - -**/n_particles** (*int8_t*) - - Number of particles used per generation. - -**/n_batches** (*int*) - - Number of batches to simulate. - -**/current_batch** (*int*) - - The number of batches already simulated. - -if run_mode == 'k-eigenvalue': - - **/n_inactive** (*int*) - - Number of inactive batches. - - **/gen_per_batch** (*int*) - - Number of generations per batch. - - **/k_generation** (*double[]*) - - k-effective for each generation simulated. - - **/entropy** (*double[]*) - - Shannon entropy for each generation simulated - - **/k_col_abs** (*double*) - - Sum of product of collision/absorption estimates of k-effective - - **/k_col_tra** (*double*) - - Sum of product of collision/track-length estimates of k-effective - - **/k_abs_tra** (*double*) - - Sum of product of absorption/track-length estimates of k-effective - - **/k_combined** (*double[2]*) - - Mean and standard deviation of a combined estimate of k-effective - - **/cmfd_on** (*int*) - - Flag indicating whether CMFD is on (1) or off (0). - - if (cmfd_on) - - **/cmfd/indices** (*int[4]*) - - Indices for cmfd mesh (i,j,k,g) - - **/cmfd/k_cmfd** (*double[]*) - - CMFD eigenvalues - - **/cmfd/cmfd_src** (*double[][][][]*) - - CMFD fission source - - **/cmfd/cmfd_entropy** (*double[]*) - - CMFD estimate of Shannon entropy - - **/cmfd/cmfd_balance** (*double[]*) - - RMS of the residual neutron balance equation on CMFD mesh - - **/cmfd/cmfd_dominance** (*double[]*) - - CMFD estimate of dominance ratio - - **/cmfd/cmfd_srccmp** (*double[]*) - - RMS comparison of difference between OpenMC and CMFD fission source - -**/tallies/n_meshes** (*int*) - - Number of meshes in tallies.xml file - -**/tally/meshes/ids** (*int[]*) - - Internal unique ID of each mesh. - -**/tally/meshes/keys** (*int[]*) - - User-identified unique ID of each mesh. - -**/tallies/meshes/mesh /type** (*char[]*) - - Type of mesh. - -**/tallies/meshes/mesh /dimension** (*int*) - - Number of mesh cells in each dimension. - -**/tallies/meshes/mesh /lower_left** (*double[]*) - - Coordinates of lower-left corner of mesh. - -**/tallies/meshes/mesh /upper_right** (*double[]*) - - Coordinates of upper-right corner of mesh. - -**/tallies/meshes/mesh /width** (*double[]*) - - Width of each mesh cell in each dimension. - -**/tallies/n_tallies** (*int*) - - Number of user-defined tallies. - -**/tallies/ids** (*int[]*) - - Internal unique ID of each tally. - -**/tallies/keys** (*int[]*) - - User-identified unique ID of each tally. - -**/tallies/tally /estimator** (*char[]*) - - Type of tally estimator, either 'analog', 'tracklength', or 'collision'. - -**/tallies/tally /n_realizations** (*int*) - - Number of realizations. - -**/tallies/tally /n_filters** (*int*) - - Number of filters used. - -**/tallies/tally /filter /type** (*char[]*) - - Type of the j-th filter. Can be 'universe', 'material', 'cell', 'cellborn', - 'surface', 'mesh', 'energy', 'energyout', or 'distribcell'. - -**/tallies/tally /filter /offset** (*int*) - - Filter offset (used for distribcell filter). - -**/tallies/tally /filter /n_bins** (*int*) - - Number of bins for the j-th filter. - -**/tallies/tally /filter /bins** (*int[]* or *double[]*) - - Value for each filter bin of this type. - -**/tallies/tally /nuclides** (*char[][]*) - - Array of nuclides to tally. Note that if no nuclide is specified in the user - input, a single 'total' nuclide appears here. - -**/tallies/tally /n_score_bins** (*int*) - - Number of scoring bins for a single nuclide. In general, this can be greater - than the number of user-specified scores since each score might have - multiple scoring bins, e.g., scatter-PN. - -**/tallies/tally /score_bins** (*char[][]*) - - Values of specified scores. - -**/tallies/tally /n_user_scores** (*int*) - - Number of scores without accounting for those added by expansions, - e.g. scatter-PN. - -**/tallies/tally /moment_orders** (*char[][]*) - - Tallying moment orders for Legendre and spherical harmonic tally expansions - (*e.g.*, 'P2', 'Y1,2', etc.). - -**/tallies/tally /results** (Compound type) - - Accumulated sum and sum-of-squares for each bin of the i-th tally. This is a - two-dimensional array, the first dimension of which represents combinations - of filter bins and the second dimensions of which represents scoring - bins. Each element of the array has fields 'sum' and 'sum_sq'. - -**/source_present** (*int*) - - Flag indicated if source bank is present in the file - -**/n_realizations** (*int*) - - Number of realizations for global tallies. - -**/n_global_tallies** (*int*) - - Number of global tally scores. - -**/global_tallies** (Compound type) - - Accumulated sum and sum-of-squares for each global tally. The compound type - has fields named ``sum`` and ``sum_sq``. - -**tallies_present** (*int*) - - Flag indicated if tallies are present in the file. - -if (run_mode == 'k-eigenvalue' and source_present > 0) - - **/source_bank** (Compound type) - - Source bank information for each particle. The compound type has fields - ``wgt``, ``xyz``, ``uvw``, and ``E`` which represent the weight, - position, direction, and energy of the source particle, respectively. diff --git a/_sources/usersguide/output/summary.txt b/_sources/usersguide/output/summary.txt deleted file mode 100644 index f87f60c4a..000000000 --- a/_sources/usersguide/output/summary.txt +++ /dev/null @@ -1,311 +0,0 @@ -.. _usersguide_summary: - -=================== -Summary File Format -=================== - -The current revision of the summary file format is 1. - -**/filetype** (*char[]*) - - String indicating the type of file. - -**/revision** (*int*) - - Revision of the summary file format. Any time a change is made in the - format, this integer is incremented. - -**/version_major** (*int*) - - Major version number for OpenMC - -**/version_minor** (*int*) - - Minor version number for OpenMC - -**/version_release** (*int*) - - Release version number for OpenMC - -**/date_and_time** (*char[]*) - - Date and time the summary was written. - -**/n_procs** (*int*) - - Number of MPI processes used. - -**/n_particles** (*int8_t*) - - Number of particles used per generation. - -**/n_batches** (*int*) - - Number of batches to simulate. - -**/n_inactive** (*int*) - - Number of inactive batches. Only present if /run_mode is set to - 'k-eigenvalue'. - -**/n_active** (*int*) - - Number of active batches. Only present if /run_mode is set to - 'k-eigenvalue'. - -**/gen_per_batch** (*int*) - - Number of generations per batch. Only present if /run_mode is set to - 'k-eigenvalue'. - -**/geometry/n_cells** (*int*) - - Number of cells in the problem. - -**/geometry/n_surfaces** (*int*) - - Number of surfaces in the problem. - -**/geometry/n_universes** (*int*) - - Number of unique universes in the problem. - -**/geometry/n_lattices** (*int*) - - Number of lattices in the problem. - -**/geometry/cells/cell /index** (*int*) - - Index in cells array used internally in OpenMC. - -**/geometry/cells/cell /name** (*char[]*) - - Name of the cell. - -**/geometry/cells/cell /universe** (*int*) - - Universe assigned to the cell. If none is specified, the default - universe (0) is assigned. - -**/geometry/cells/cell /fill_type** (*char[]*) - - Type of fill for the cell. Can be 'normal', 'universe', or 'lattice'. - -**/geometry/cells/cell /material** (*int*) - - Unique ID of the material assigned to the cell. This dataset is present only - if fill_type is set to 'normal'. - -**/geometry/cells/cell /offset** (*int[]*) - - Offsets used for distribcell tally filter. This dataset is present only if - fill_type is set to 'universe'. - -**/geometry/cells/cell /translation** (*double[3]*) - - Translation applied to the fill universe. This dataset is present only if - fill_type is set to 'universe'. - -**/geometry/cells/cell /rotation** (*double[3]*) - - Angles in degrees about the x-, y-, and z-axes for which the fill universe - should be rotated. This dataset is present only if fill_type is set to - 'universe'. - -**/geometry/cells/cell /lattice** (*int*) - - Unique ID of the lattice which fills the cell. Only present if fill_type is - set to 'lattice'. - -**/geometry/cells/cell /region** (*char[]*) - - Region specification for the cell. - -**/geometry/surfaces/surface /index** (*int*) - - Index in surfaces array used internally in OpenMC. - -**/geometry/surfaces/surface /name** (*char[]*) - - Name of the surface. - -**/geometry/surfaces/surface /type** (*char[]*) - - Type of the surface. Can be 'x-plane', 'y-plane', 'z-plane', 'plane', - 'x-cylinder', 'y-cylinder', 'sphere', 'x-cone', 'y-cone', 'z-cone', or - 'quadric'. - -**/geometry/surfaces/surface /coefficients** (*double[]*) - - Array of coefficients that define the surface. See :ref:`surface_element` - for what coefficients are defined for each surface type. - -**/geometry/surfaces/surface /boundary_condition** (*char[]*) - - Boundary condition applied to the surface. Can be 'transmission', 'vacuum', - 'reflective', or 'periodic'. - -**/geometry/universes/universe /index** (*int*) - - Index in the universes array used internally in OpenMC. - -**/geometry/universes/universe /cells** (*int[]*) - - Array of unique IDs of cells that appear in the universe. - -**/geometry/lattices/lattice /index** (*int*) - - Index in the lattices array used internally in OpenMC. - -**/geometry/lattices/lattice /name** (*char[]*) - - Name of the lattice. - -**/geometry/lattices/lattice /type** (*char[]*) - - Type of the lattice, either 'rectangular' or 'hexagonal'. - -**/geometry/lattices/lattice /pitch** (*double[]*) - - Pitch of the lattice. - -**/geometry/lattices/lattice /outer** (*int*) - - Outer universe assigned to lattice cells outside the defined range. - -**/geometry/lattices/lattice /offsets** (*int[]*) - - Offsets used for distribcell tally filter. - -**/geometry/lattices/lattice /universes** (*int[]*) - - Three-dimensional array of universes assigned to each cell of the lattice. - -**/geometry/lattices/lattice /dimension** (*int[]*) - - The number of lattice cells in each direction. This dataset is present only - when the 'type' dataset is set to 'rectangular'. - -**/geometry/lattices/lattice /lower_left** (*double[]*) - - The coordinates of the lower-left corner of the lattice. This dataset is - present only when the 'type' dataset is set to 'rectangular'. - -**/geometry/lattices/lattice /n_rings** (*int*) - - Number of radial ring positions in the xy-plane. This dataset is present - only when the 'type' dataset is set to 'hexagonal'. - -**/geometry/lattices/lattice /n_axial** (*int*) - - Number of lattice positions along the z-axis. This dataset is present only - when the 'type' dataset is set to 'hexagonal'. - -**/geometry/lattices/lattice /center** (*double[]*) - - Coordinates of the center of the lattice. This dataset is present only when - the 'type' dataset is set to 'hexagonal'. - -**/n_materials** (*int*) - - Number of materials in the problem. - -**/materials/material /index** (*int*) - - Index in materials array used internally in OpenMC. - -**/materials/material /name** (*char[]*) - - Name of the material. - -**/materials/material /atom_density** (*double[]*) - - Total atom density of the material in atom/b-cm. - -**/materials/material /nuclides** (*char[][]*) - - Array of nuclides present in the material, e.g., 'U-235.71c'. - -**/materials/material /nuclide_densities** (*double[]*) - - Atom density of each nuclide. - -**/materials/material /sab_names** (*char[][]*) - - Names of S(:math:`\alpha`,:math:`\beta`) tables assigned to the material. - -**/tallies/n_tallies** (*int*) - - Number of tallies in the problem. - -**/tallies/n_meshes** (*int*) - - Number of meshes in the problem. - -**/tallies/mesh /index** (*int*) - - Index in the meshes array used internally in OpenMC. - -**/tallies/mesh /type** (*char[]*) - - Type of the mesh. The only valid option is currently 'regular'. - -**/tallies/mesh /dimension** (*int[]*) - - Number of mesh cells in each direction. - -**/tallies/mesh /lower_left** (*double[]*) - - Coordinates of the lower-left corner of the mesh. - -**/tallies/mesh /upper_right** (*double[]*) - - Coordinates of the upper-right corner of the mesh. - -**/tallies/mesh /width** (*double[]*) - - Width of a single mesh cell in each direction. - -**/tallies/tally /index** (*int*) - - Index in tallies array used internally in OpenMC. - -**/tallies/tally /name** (*char[]*) - - Name of the tally. - -**/tallies/tally /n_filters** (*int*) - - Number of filters applied to the tally. - -**/tallies/tally /filter /type** (*char[]*) - - Type of the j-th filter. Can be 'universe', 'material', 'cell', 'cellborn', - 'surface', 'mesh', 'energy', 'energyout', or 'distribcell'. - -**/tallies/tally /filter /offset** (*int*) - - Filter offset (used for distribcell filter). - -**/tallies/tally /filter /n_bins** (*int*) - - Number of bins for the j-th filter. - -**/tallies/tally /filter /bins** (*int[]* or *double[]*) - - Value for each filter bin of this type. - -**/tallies/tally /nuclides** (*char[][]*) - - Array of nuclides to tally. Note that if no nuclide is specified in the user - input, a single 'total' nuclide appears here. - -**/tallies/tally /n_score_bins** (*int*) - - Number of scoring bins for a single nuclide. In general, this can be greater - than the number of user-specified scores since each score might have - multiple scoring bins, e.g., scatter-PN. - -**/tallies/tally /score_bins** (*char[][]*) - - Scoring bins for the tally. diff --git a/_sources/usersguide/output/track.txt b/_sources/usersguide/output/track.txt deleted file mode 100644 index d3c7a27d8..000000000 --- a/_sources/usersguide/output/track.txt +++ /dev/null @@ -1,30 +0,0 @@ -.. _usersguide_track: - -================= -Track File Format -================= - -The current revision of the particle track file format is 1. - -**/filetype** (*char[]*) - - String indicating the type of file. - -**/revision** (*int*) - - Revision of the track file format. Any time a change is made in the format, - this integer is incremented. - -**/n_particles** (*int*) - - Number of particles for which tracks are recorded. - -**/n_coords** (*int[]*) - - Number of coordinates for each particle. - -*do i = 1, n_particles* - - **/coordinates_i** (*double[][3]*) - - (x,y,z) coordinates for the *i*-th particle. diff --git a/_sources/usersguide/output/voxel.txt b/_sources/usersguide/output/voxel.txt deleted file mode 100644 index 1da501fb5..000000000 --- a/_sources/usersguide/output/voxel.txt +++ /dev/null @@ -1,25 +0,0 @@ -.. _usersguide_voxel: - -====================== -Voxel Plot File Format -====================== - -**/filetype** (*char[]*) - - String indicating the type of file. - -**/num_voxels** (*int[3]*) - - Number of voxels in the x-, y-, and z- directions. - -**/voxel_width** (*double[3]*) - - Width of a voxel in centimeters. - -**/lower_left** (*double[3]*) - - Cartesian coordinates of the lower-left corner of the plot. - -**/data** (*int[][][]*) - - Data for each voxel that represents a material or cell ID. diff --git a/_sources/usersguide/processing.txt b/_sources/usersguide/processing.txt deleted file mode 100644 index b18569ec6..000000000 --- a/_sources/usersguide/processing.txt +++ /dev/null @@ -1,373 +0,0 @@ -.. _usersguide_processing: - -================================= -Data Processing and Visualization -================================= - -This section is intended to explain in detail the recommended procedures for -carrying out common post-processing tasks with OpenMC. While several utilities -of varying complexity are provided to help automate the process, the most -powerful capabilities for post-processing derive from use of the :ref:`Python -API `. Both the provided scripts and the Python API rely on a number -third-party Python packages, including: - -* [1]_ `NumPy `_ -* [2]_ `h5py `_ -* [3]_ `pandas `_ -* [4]_ `matplotlib `_ -* [4]_ `Silomesh `_ -* [4]_ `VTK `_ -* [4]_ `lxml `_ - -Most of these are can easily be installed with `pip `_ -or alternatively obtaining through a package manager. - -.. [1] Required for most post-processing tasks -.. [2] Required for reading HDF5 output files -.. [3] Optional dependency for advanced features in Python API -.. [4] Not used directly by the Python API, but are optional dependencies for a - number of scripts. - ----------------------- -Geometry Visualization ----------------------- - -Geometry plotting is carried out by creating a plots.xml, specifying plots, and -running OpenMC with the --plot or -p command-line option (See -:ref:`usersguide_plotting`). - -Plotting in 2D --------------- - -.. image:: ../_images/atr.png - :height: 200px - -See below for a simple example of a plots xml file that demonstrates the -capabilities of 2D slice plots. Here we assume that there is a ``geometry.xml`` -file containing 7 cells. - -.. code-block:: xml - - - - - - myplot - 0 0 - 10 10 - 2000 2000 - 0 0 0 - - - - - - - 1 3 4 5 6 - - - - - - -In this example, OpenMC will produce a plot named ``myplot.ppm`` when run in -plotting mode. The picture will be on the xy-plane, depicting the rectangle -between points (-5,-5) and (5,5) with 2000 pixels along each dimension. The -color of each pixel is determined by placing a particle at the center of that -pixel and using OpenMC's internal ``find_cell`` routine (the same one used for -particle tracking during simulation) to determine the cell and material at that -location. In this example, pixels are 10/2000=0.005 cm wide, so points will be -at (-4.9975,-4.9975), (-4.9950,-4.9975), (-4.9925,-4.9975), etc. This is pointed -out to demonstrate that this plot may miss any features smaller than 0.005 cm, -since they could exist between pixel centers. More pixels can be used to resolve -finer features, but could result in larger files. - -The ``background``, ``col_spec``, and ``mask`` elements define how to set pixel -colors based on the cell ids at each pixel center. In this example, RGB colors -are specified for cells 1,2,3,4, and 7, a random color will be assigned to cells -5 and 6, and a black background color (``rgb="0 0 0"``) will be applied to -locations where no cell is defined. However, the ``mask`` element here says that -only cells 1,3,4,5, and 6 should be displayed, with other cells taking a white -color (``rgb="255 255 255"``), which overrides the ``col_spec`` for cell 2 and -the random color assigned to cell 7. - -After running OpenMC to obtain PPM files, images should be saved to another -format before using them elsewhere. This cuts down the size of the file by -orders of magnitude. Most image viewers and editors that can view PPM images -can also save to other formats (e.g. `Gimp `_, `IrfanView -`_, etc.). However, more likely the user will want to -convert to another format on the command line. This is easily accomplished with -the ``convert`` command available on most Linux distributions as part of the -`ImageMagick `_ package. (On -Ubuntu: ``sudo apt-get install imagemagick``). Images are then converted like: - -.. code-block:: sh - - convert myplot.ppm myplot.png - -Plotting in 3D --------------- - -.. image:: ../_images/3dgeomplot.png - :height: 200px - -See below for a simple example of a plots xml file that demonstrates the -capabilities of 3D voxel plots. - -.. code-block:: xml - - - - - - myplot - 0 0 0 - 10 10 10 - 500 500 500 - - - - -Voxel plots are built the same way 2D slice plots are, by determining the cell -or material id of a particle at the center of each voxel. In this example, the -space covered is the cube between the points (-5,-5,-5) and (5,5,5), with voxel -centers 10/500 = 0.02 cm apart. The HDF5 voxel files that are produced do not -specify any color - instead containing only material or cell ids (material id -in this example) - and thus the ``background``, ``col_spec``, and ``mask`` -elements are not used. If no cell is found at a voxel center, an id of -1 is -stored. - -The voxel plot data is written to an HDF5 file. The voxel file can subsequently -be converted into a standard mesh format that can be viewed in ParaView, Visit, -etc. This typically will compress the size of the file significantly. The -provided utility openmc-voxel-to-silovtk accomplishes this for SILO: - -.. code-block:: sh - - openmc-voxel-to-silovtk myplot.voxel -o output.silo - -and VTK file formats: - -.. code-block:: sh - - openmc-voxel-to-silovtk myplot.voxel --vtk -o output.vti - -To use this utility you need either - -* `Silomesh `_ - -or - -* `VTK `_ with python bindings. On debian derivatives, - these are easily obtained with ``sudo apt-get install python-vtk`` - -For the HDF5 file structure, see :ref:`usersguide_voxel`. - -Once processed into a standard 3D file format, colors and masks can be defined -using the stored id numbers to better explore the geometry. The process for -doing this will depend on the 3D viewer, but should be straightforward. - -.. image:: ../_images/3dba.png - :height: 200px - -.. note:: 3D voxel plotting can be very computer intensive for the viewing - program (Visit, ParaView, etc.) if the number of voxels is large (>10 - million or so). Thus if you want an accurate picture that renders - smoothly, consider using only one voxel in a certain direction. For - instance, the 3D pin lattice figure at the beginning of this section - was generated with a 500x500x1 voxel mesh, which allows for resolution - of the cylinders without wasting too many voxels on the axial - dimension. - - -------------------- -Tally Visualization -------------------- - -Tally results are saved in both a text file (tallies.out) as well as an HDF5 -statepoint file. While the tallies.out file may be fine for simple tallies, in -many cases the user requires more information about the tally or the run, or has -to deal with a large number of result values (e.g. for mesh tallies). In these -cases, extracting data from the statepoint file via the :ref:`pythonapi` is the -preferred method of data analysis and visualization. - -Data Extraction ---------------- - -A great deal of information is available in statepoint files (See -:ref:`usersguide_statepoint`), all of which is accessible through the Python -API. The ``openmc.statepoint`` module (see :ref:`pythonapi_statepoint`) provides -a class to load statepoints and access data as requested; it is used in many of -the provided plotting utilities, OpenMC's regression test suite, and can be used -in user-created scripts to carry out manipulations of the data. - -An :ref:`example IPython notebook ` demonstrates how -to extract data from a statepoint using the Python API. - -Plotting in 2D --------------- - -The :ref:`IPython notebook example ` also demonstrates -how to plot a mesh tally in two dimensions using the Python API. Note, however, -that there is also a script distributed with OpenMC, ``openmc-plot-mesh-tally``, -that provides an interactive GUI to explore and plot mesh tallies for any scores -and filter bins. - -.. image:: ../_images/plotmeshtally.png - :height: 200px - -Plotting in 3D --------------- - -.. image:: ../_images/3dcore.png - :height: 200px - -As with 3D plots of the geometry, meshtally data needs to be put into a standard -format for viewing. The utility ``openmc-statepoint-3d`` is provided to -accomplish this for both VTK and SILO. By default ``openmc-statepoint-3d`` -processes a statepoint into a 3D file with all mesh tallies and filter/score -combinations, - -.. code-block:: sh - - openmc-statepoint-3d -o output.silo - openmc-statepoint-3d --vtk -o output.vtm - -but it also provides several command-line options to selectively process only -certain data arrays in order to keep file sizes down. - -.. code-block:: sh - - openmc-statepoint-3d --tallies 2,4 --scores 4.1,4.3 -o output.silo - openmc-statepoint-3d --filters 2.energyin.1 --vtk -o output.vtm - -All available options for specifying a subset of tallies, scores, and filters -can be listed with the ``--list`` or ``-l`` command line options. - -.. note:: Note that while SILO files can contain multiple meshes in one file, - VTK needs to use a multi-block dataset, which stores each mesh piece - in a different file in a subfolder. All meshes can be loaded at once - with the main VTM file, or each VTI file in the subfolder can be - loaded individually. - -Alternatively, the user can write their own Python script to manipulate the data -appropriately before insertion into a SILO or VTK file. For instance, if the -data has been extracted as was done in the 2D plotting example script above, a -SILO file can be created with: - -.. code-block:: python - - import silomesh as sm - sm.init_silo("fluxtally.silo") - sm.init_mesh('tally_mesh', *mesh.dimension, *mesh.lower_left, *mesh.upper_right) - sm.init_var('flux_tally_thermal') - for x in range(1,nx+1): - for y in range(1,ny+1): - for z in range(1,nz+1): - sm.set_value(float(thermal[(x,y,z)]),x,y,z) - sm.finalize_var() - sm.init_var('flux_tally_fast') - for x in range(1,nx+1): - for y in range(1,ny+1): - for z in range(1,nz+1): - sm.set_value(float(fast[(x,y,z)]),x,y,z) - sm.finalize_var() - sm.finalize_mesh() - sm.finalize_silo() - -and the equivalent VTK file with: - -.. code-block:: python - - import vtk - - grid = vtk.vtkImageData() - grid.SetDimensions(nx+1,ny+1,nz+1) - grid.SetOrigin(*mesh.lower_left) - grid.SetSpacing(*mesh.width) - - # vtk cell arrays have x on the inners, so we need to reorder the data - idata = {} - for x in range(nx): - for y in range(ny): - for z in range(nz): - i = z*nx*ny + y*nx + x - idata[i] = (x,y,z) - - vtkfastdata = vtk.vtkDoubleArray() - vtkfastdata.SetName("fast") - for i in range(nx*ny*nz): - vtkfastdata.InsertNextValue(fast[idata[i]]) - - vtkthermaldata = vtk.vtkDoubleArray() - vtkthermaldata.SetName("thermal") - for i in range(nx*ny*nz): - vtkthermaldata.InsertNextValue(thermal[idata[i]]) - - grid.GetCellData().AddArray(vtkfastdata) - grid.GetCellData().AddArray(vtkthermaldata) - - writer = vtk.vtkXMLImageDataWriter() - writer.SetInput(grid) - writer.SetFileName('tally.vti') - writer.Write() - -Getting Data into MATLAB ------------------------- - -There is currently no front-end utility to dump tally data to MATLAB files, but -the process is straightforward. First extract the data using the Python API via -``openmc.statepoint`` and then use the `Scipy MATLAB IO routines -`_ to save to a MAT -file. Note that all arrays that are accessible in a statepoint are already in -NumPy arrays that can be reshaped and dumped to MATLAB in one step. - ----------------------------- -Particle Track Visualization ----------------------------- - -.. image:: ../_images/Tracks.png - :height: 200px - -OpenMC can dump particle tracks—the position of particles as they are -transported through the geometry. There are two ways to make OpenMC output -tracks: all particle tracks through a command line argument or specific particle -tracks through settings.xml. - -Running OpenMC with the argument "-t", "-track", or "--track" will cause a track -file to be created for every particle transported in the code. - -The settings.xml file can dictate that specific particle tracks are output. -These particles are specified within a ''track'' element. The ''track'' element -should contain triplets of integers specifying the batch, generation, and -particle numbers, respectively. For example, to output the tracks for particles -3 and 4 of batch 1 and generation 2 the settings.xml file should contain: - -.. code-block:: xml - - - 1 2 3 - 1 2 4 - - -After running OpenMC, the directory should contain a file of the form -"track_(batch #)_(generation #)_(particle #).h5" for each particle tracked. -These track files can be converted into VTK poly data files with the -``openmc-track-to-vtk`` utility. The usage of ``openmc-track-to-vtk`` is of the -form "openmc-track-to-vtk [-o OUT] IN" where OUT is the optional output filename -and IN is one or more filenames describing track files. The default output name -is "track.pvtp". A common usage of track.py is "openmc-track-to-vtk track*.h5" -which will use the data from all binary track files in the directory to write a -"track.pvtp" VTK output file. The .pvtp file can then be read and plotted by 3d -visualization programs such as ParaView. - ----------------------- -Source Site Processing ----------------------- - -For eigenvalue problems, OpenMC will store information on the fission source -sites in the statepoint file by default. For each source site, the weight, -position, sampled direction, and sampled energy are stored. To extract this data -from a statepoint file, the ``openmc.statepoint`` module can be used. An -:ref:`example IPython notebook ` demontrates how to -analyze and plot source information. diff --git a/_sources/usersguide/troubleshoot.txt b/_sources/usersguide/troubleshoot.txt deleted file mode 100644 index c5e4e7c1e..000000000 --- a/_sources/usersguide/troubleshoot.txt +++ /dev/null @@ -1,125 +0,0 @@ -.. _usersguide_troubleshoot: - -=============== -Troubleshooting -=============== - -------------------------- -Problems with Compilation -------------------------- - -If you are experiencing problems trying to compile OpenMC, first check if the -error you are receiving is among the following options. - -undefined reference to \`_vtab$... -********************************** - -If you see this message when trying to compile, the most likely cause is that -you are using a compiler that does not support type-bound procedures from -Fortran 2003. This affects any version of gfortran prior to 4.6. Downloading and -installing the latest gfortran_ compiler should resolve this problem. - -gfortran: unrecognized option '-cpp' -************************************ - -You are probably using a version of the gfortran compiler that is too -old. Download and install the latest version of gfortran_. - -f951: error: unrecognized command line option "-fbacktrace" -*********************************************************** - -You are probably using a version of the gfortran compiler that is too -old. Download and install the latest version of gfortran_. - -------------------------- -Problems with Simulations -------------------------- - -Segmentation Fault -****************** - -A segmentation fault occurs when the program tries to access a variable in -memory that was outside the memory allocated for the program. The best way to -debug a segmentation fault is to re-compile OpenMC with debug options turned -on. Create a new build directory and type the following commands: - -.. code-block:: sh - - mkdir build-debug && cd build-debug - cmake -Ddebug=on /path/to/openmc - make - -Now when you re-run your problem, it should report exactly where the program -failed. If after reading the debug output, you are still unsure why the program -failed, send an email to the OpenMC User's Group `mailing list`_. - -ERROR: No cross_sections.xml file was specified in settings.xml or in the CROSS_SECTIONS environment variable. -************************************************************************************************************** - -OpenMC needs to know where to find cross section data for each -nuclide. Information on what data is available and in what files is summarized -in a cross_sections.xml file. You need to tell OpenMC where to find the -cross_sections.xml file either with the :ref:`cross_sections` in settings.xml or -with the :envvar:`CROSS_SECTIONS` environment variable. It is recommended to add -a line in your ``.profile`` or ``.bash_profile`` setting the -:envvar:`CROSS_SECTIONS` environment variable. - -Geometry Debugging -****************** - -Overlapping Cells -^^^^^^^^^^^^^^^^^ - -For fast run times, normal simulations do not check if the geometry is -incorrectly defined to have overlapping cells. This can lead to incorrect -results that may or may not be obvious when there are errors in the geometry -input file. The built-in 2D and 3D plotters will check for cell overlaps at -the center of every pixel or voxel position they process, however this might -not be a sufficient check to ensure correctly defined geometry. For instance, -if an overlap is of small aspect ratio, the plotting resolution might not be -high enough to produce any pixels in the overlapping area. - -To reliably validate a geometry input, it is best to run the problem in -geometry debugging mode with the ``-g``, ``-geometry-debug``, or -``--geometry-debug`` command-line options. This will enable checks for -overlapping cells at every move of esch simulated particle. Depending on the -complexity of the geometry input file, this could add considerable overhead to -the run (these runs can still be done in parallel). As a result, for this run -mode the user will probably want to run fewer particles than a normal -simulation run. In this case it is important to be aware of how much coverage -each area of the geometry is getting. For instance, if certain regions do not -have many particles travelling through them there will not be many locations -where overlaps are checked for in that region. The user should refer to the -output after a geometry debug run to see how many checks were performed in each -cell, and then adjust the number of starting particles or starting source -distributions accordingly to achieve good coverage. - -ERROR: After particle __ crossed surface __ it could not be located in any cell and it did not leak. -^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ - -This error can arise either if a problem is specified with no boundary -conditions or if there is an error in the geometry itself. First check to ensure -that all of the outer surfaces of your geometry have been given vacuum or -reflective boundary conditions. If proper boundary conditions have been applied -and you still receive this error, it means that a surface/cell/lattice in your -geometry has been specified incorrectly or is missing. - -The best way to debug this error is to turn on a trace for the particle getting -lost. After the error message, the code will display what batch, generation, and -particle number caused the error. In your settings.xml, add a :ref:`trace` -followed by the batch, generation, and particle number. This will give you -detailed output every time that particle enters a cell, crosses a boundary, or -has a collision. For example, if you received this error at cycle 5, generation -1, particle 4032, you would enter: - -.. code-block:: xml - - 5 1 4032 - -For large runs it is often advantageous to run only the offending particle by -using particle restart mode with the ``-s``, ``-particle``, or ``--particle`` -command-line options in conjunction with the particle restart files that are -created when particles are lost with this error. - -.. _gfortran: http://gcc.gnu.org/wiki/GFortran -.. _mailing list: https://groups.google.com/forum/?fromgroups=#!forum/openmc-users diff --git a/_static/ajax-loader.gif b/_static/ajax-loader.gif deleted file mode 100644 index 61faf8cab..000000000 Binary files a/_static/ajax-loader.gif and /dev/null differ diff --git a/_static/alert_info_32.png b/_static/alert_info_32.png deleted file mode 100644 index 05b4fe898..000000000 Binary files a/_static/alert_info_32.png and /dev/null differ diff --git a/_static/alert_warning_32.png b/_static/alert_warning_32.png deleted file mode 100644 index f13611cde..000000000 Binary files a/_static/alert_warning_32.png and /dev/null differ diff --git a/_static/basic.css b/_static/basic.css deleted file mode 100644 index 391ef2e19..000000000 --- a/_static/basic.css +++ /dev/null @@ -1,599 +0,0 @@ -/* - * basic.css - * ~~~~~~~~~ - * - * Sphinx stylesheet -- basic theme. - * - * :copyright: Copyright 2007-2015 by the Sphinx team, see AUTHORS. - * :license: BSD, see LICENSE for details. - * - */ - -/* -- main layout ----------------------------------------------------------- */ - -div.clearer { - clear: both; -} - -/* -- relbar ---------------------------------------------------------------- */ - -div.related { - width: 100%; - font-size: 90%; -} - -div.related h3 { - display: none; -} - -div.related ul { - margin: 0; - padding: 0 0 0 10px; - list-style: none; -} - -div.related li { - display: inline; -} - -div.related li.right { - float: right; - margin-right: 5px; -} - -/* -- sidebar --------------------------------------------------------------- */ - -div.sphinxsidebarwrapper { - padding: 10px 5px 0 10px; -} - -div.sphinxsidebar { - float: left; - width: 230px; - margin-left: -100%; - font-size: 90%; -} - -div.sphinxsidebar ul { - list-style: none; -} - -div.sphinxsidebar ul ul, -div.sphinxsidebar ul.want-points { - margin-left: 20px; - list-style: square; -} - -div.sphinxsidebar ul ul { - margin-top: 0; - margin-bottom: 0; -} - -div.sphinxsidebar form { - margin-top: 10px; -} - -div.sphinxsidebar input { - border: 1px solid #98dbcc; - font-family: sans-serif; - font-size: 1em; -} - -div.sphinxsidebar #searchbox input[type="text"] { - width: 170px; -} - -div.sphinxsidebar #searchbox input[type="submit"] { - width: 30px; -} - -img { - border: 0; - max-width: 100%; -} - -/* -- search page ----------------------------------------------------------- */ - -ul.search { - margin: 10px 0 0 20px; - padding: 0; -} - -ul.search li { - padding: 5px 0 5px 20px; - background-image: url(file.png); - background-repeat: no-repeat; - background-position: 0 7px; -} - -ul.search li a { - font-weight: bold; -} - -ul.search li div.context { - color: #888; - margin: 2px 0 0 30px; - text-align: left; -} - -ul.keywordmatches li.goodmatch a { - font-weight: bold; -} - -/* -- index page ------------------------------------------------------------ */ - -table.contentstable { - width: 90%; -} - -table.contentstable p.biglink { - line-height: 150%; -} - -a.biglink { - font-size: 1.3em; -} - -span.linkdescr { - font-style: italic; - padding-top: 5px; - font-size: 90%; -} - -/* -- general index --------------------------------------------------------- */ - -table.indextable { - width: 100%; -} - -table.indextable td { - text-align: left; - vertical-align: top; -} - -table.indextable dl, table.indextable dd { - margin-top: 0; - margin-bottom: 0; -} - -table.indextable tr.pcap { - height: 10px; -} - -table.indextable tr.cap { - margin-top: 10px; - background-color: #f2f2f2; -} - -img.toggler { - margin-right: 3px; - margin-top: 3px; - cursor: pointer; -} - -div.modindex-jumpbox { - border-top: 1px solid #ddd; - border-bottom: 1px solid #ddd; - margin: 1em 0 1em 0; - padding: 0.4em; -} - -div.genindex-jumpbox { - border-top: 1px solid #ddd; - border-bottom: 1px solid #ddd; - margin: 1em 0 1em 0; - padding: 0.4em; -} - -/* -- general body styles --------------------------------------------------- */ - -a.headerlink { - visibility: hidden; -} - -h1:hover > a.headerlink, -h2:hover > a.headerlink, -h3:hover > a.headerlink, -h4:hover > a.headerlink, -h5:hover > a.headerlink, -h6:hover > a.headerlink, -dt:hover > a.headerlink, -caption:hover > a.headerlink, -p.caption:hover > a.headerlink, -div.code-block-caption:hover > a.headerlink { - visibility: visible; -} - -div.content p.caption { - text-align: inherit; -} - -div.content td { - text-align: left; -} - -.field-list ul { - padding-left: 1em; -} - -.first { - margin-top: 0 !important; -} - -p.rubric { - margin-top: 30px; - font-weight: bold; -} - -img.align-left, .figure.align-left, object.align-left { - clear: left; - float: left; - margin-right: 1em; -} - -img.align-right, .figure.align-right, object.align-right { - clear: right; - float: right; - margin-left: 1em; -} - -img.align-center, .figure.align-center, object.align-center { - display: block; - margin-left: auto; - margin-right: auto; -} - -.align-left { - text-align: left; -} - -.align-center { - text-align: center; -} - -.align-right { - text-align: right; -} - -/* -- sidebars -------------------------------------------------------------- */ - -div.sidebar { - margin: 0 0 0.5em 1em; - border: 1px solid #ddb; - padding: 7px 7px 0 7px; - background-color: #ffe; - width: 40%; - float: right; -} - -p.sidebar-title { - font-weight: bold; -} - -/* -- topics ---------------------------------------------------------------- */ - -div.topic { - border: 1px solid #ccc; - padding: 7px 7px 0 7px; - margin: 10px 0 10px 0; -} - -p.topic-title { - font-size: 1.1em; - font-weight: bold; - margin-top: 10px; -} - -/* -- admonitions ----------------------------------------------------------- */ - -div.admonition { - margin-top: 10px; - margin-bottom: 10px; - padding: 7px; -} - -div.admonition dt { - font-weight: bold; -} - -div.admonition dl { - margin-bottom: 0; -} - -p.admonition-title { - margin: 0px 10px 5px 0px; - font-weight: bold; -} - -div.content p.centered { - text-align: center; - margin-top: 25px; -} - -/* -- tables ---------------------------------------------------------------- */ - -table.docutils { - border: 0; - border-collapse: collapse; -} - -table caption span.caption-number { - font-style: italic; -} - -table caption span.caption-text { -} - -table.docutils td, table.docutils th { - padding: 1px 8px 1px 5px; - border-top: 0; - border-left: 0; - border-right: 0; - border-bottom: 1px solid #aaa; -} - -table.field-list td, table.field-list th { - border: 0 !important; -} - -table.footnote td, table.footnote th { - border: 0 !important; -} - -th { - text-align: left; - padding-right: 5px; -} - -table.citation { - border-left: solid 1px gray; - margin-left: 1px; -} - -table.citation td { - border-bottom: none; -} - -/* -- figures --------------------------------------------------------------- */ - -div.figure { - margin: 0.5em; - padding: 0.5em; -} - -div.figure p.caption { - padding: 0.3em; -} - -div.figure p.caption span.caption-number { - font-style: italic; -} - -div.figure p.caption span.caption-text { -} - - -/* -- other body styles ----------------------------------------------------- */ - -ol.arabic { - list-style: decimal; -} - -ol.loweralpha { - list-style: lower-alpha; -} - -ol.upperalpha { - list-style: upper-alpha; -} - -ol.lowerroman { - list-style: lower-roman; -} - -ol.upperroman { - list-style: upper-roman; -} - -dl { - margin-bottom: 15px; -} - -dd p { - margin-top: 0px; -} - -dd ul, dd table { - margin-bottom: 10px; -} - -dd { - margin-top: 3px; - margin-bottom: 10px; - margin-left: 30px; -} - -dt:target, .highlighted { - background-color: #fbe54e; -} - -dl.glossary dt { - font-weight: bold; - font-size: 1.1em; -} - -.field-list ul { - margin: 0; - padding-left: 1em; -} - -.field-list p { - margin: 0; -} - -.optional { - font-size: 1.3em; -} - -.sig-paren { - font-size: larger; -} - -.versionmodified { - font-style: italic; -} - -.system-message { - background-color: #fda; - padding: 5px; - border: 3px solid red; -} - -.footnote:target { - background-color: #ffa; -} - -.line-block { - display: block; - margin-top: 1em; - margin-bottom: 1em; -} - -.line-block .line-block { - margin-top: 0; - margin-bottom: 0; - margin-left: 1.5em; -} - -.guilabel, .menuselection { - font-family: sans-serif; -} - -.accelerator { - text-decoration: underline; -} - -.classifier { - font-style: oblique; -} - -abbr, acronym { - border-bottom: dotted 1px; - cursor: help; -} - -/* -- code displays --------------------------------------------------------- */ - -pre { - overflow: auto; - overflow-y: hidden; /* fixes display issues on Chrome browsers */ -} - -td.linenos pre { - padding: 5px 0px; - border: 0; - background-color: transparent; - color: #aaa; -} - -table.highlighttable { - margin-left: 0.5em; -} - -table.highlighttable td { - padding: 0 0.5em 0 0.5em; -} - -div.code-block-caption { - padding: 2px 5px; - font-size: small; -} - -div.code-block-caption code { - background-color: transparent; -} - -div.code-block-caption + div > div.highlight > pre { - margin-top: 0; -} - -div.code-block-caption span.caption-number { - padding: 0.1em 0.3em; - font-style: italic; -} - -div.code-block-caption span.caption-text { -} - -div.literal-block-wrapper { - padding: 1em 1em 0; -} - -div.literal-block-wrapper div.highlight { - margin: 0; -} - -code.descname { - background-color: transparent; - font-weight: bold; - font-size: 1.2em; -} - -code.descclassname { - background-color: transparent; -} - -code.xref, a code { - background-color: transparent; - font-weight: bold; -} - -h1 code, h2 code, h3 code, h4 code, h5 code, h6 code { - background-color: transparent; -} - -.viewcode-link { - float: right; -} - -.viewcode-back { - float: right; - font-family: sans-serif; -} - -div.viewcode-block:target { - margin: -1px -10px; - padding: 0 10px; -} - -/* -- math display ---------------------------------------------------------- */ - -img.math { - vertical-align: middle; -} - -div.content div.math p { - text-align: center; -} - -span.eqno { - float: right; -} - -/* -- printout stylesheet --------------------------------------------------- */ - -@media print { - div.document, - div.documentwrapper, - div.contentwrapper { - margin: 0 !important; - width: 100%; - } - - div.sphinxsidebar, - div.related, - div.footer, - #top-link { - display: none; - } -} \ No newline at end of file diff --git a/_static/bg-page.png b/_static/bg-page.png deleted file mode 100644 index 0103ee1a7..000000000 Binary files a/_static/bg-page.png and /dev/null differ diff --git a/_static/bullet_orange.png b/_static/bullet_orange.png deleted file mode 100644 index ad5d02f34..000000000 Binary files a/_static/bullet_orange.png and /dev/null differ diff --git a/_static/comment-bright.png b/_static/comment-bright.png deleted file mode 100644 index 551517b8c..000000000 Binary files a/_static/comment-bright.png and /dev/null differ diff --git a/_static/comment-close.png b/_static/comment-close.png deleted file mode 100644 index 09b54be46..000000000 Binary files a/_static/comment-close.png and /dev/null differ diff --git a/_static/comment.png b/_static/comment.png deleted file mode 100644 index 92feb52b8..000000000 Binary files a/_static/comment.png and /dev/null differ diff --git a/_static/doctools.js b/_static/doctools.js deleted file mode 100644 index c7bfe760a..000000000 --- a/_static/doctools.js +++ /dev/null @@ -1,263 +0,0 @@ -/* - * doctools.js - * ~~~~~~~~~~~ - * - * Sphinx JavaScript utilities for all documentation. - * - * :copyright: Copyright 2007-2015 by the Sphinx team, see AUTHORS. - * :license: BSD, see LICENSE for details. - * - */ - -/** - * select a different prefix for underscore - */ -$u = _.noConflict(); - -/** - * make the code below compatible with browsers without - * an installed firebug like debugger -if (!window.console || !console.firebug) { - var names = ["log", "debug", "info", "warn", "error", "assert", "dir", - "dirxml", "group", "groupEnd", "time", "timeEnd", "count", "trace", - "profile", "profileEnd"]; - window.console = {}; - for (var i = 0; i < names.length; ++i) - window.console[names[i]] = function() {}; -} - */ - -/** - * small helper function to urldecode strings - */ -jQuery.urldecode = function(x) { - return decodeURIComponent(x).replace(/\+/g, ' '); -}; - -/** - * small helper function to urlencode strings - */ -jQuery.urlencode = encodeURIComponent; - -/** - * This function returns the parsed url parameters of the - * current request. Multiple values per key are supported, - * it will always return arrays of strings for the value parts. - */ -jQuery.getQueryParameters = function(s) { - if (typeof s == 'undefined') - s = document.location.search; - var parts = s.substr(s.indexOf('?') + 1).split('&'); - var result = {}; - for (var i = 0; i < parts.length; i++) { - var tmp = parts[i].split('=', 2); - var key = jQuery.urldecode(tmp[0]); - var value = jQuery.urldecode(tmp[1]); - if (key in result) - result[key].push(value); - else - result[key] = [value]; - } - return result; -}; - -/** - * highlight a given string on a jquery object by wrapping it in - * span elements with the given class name. - */ -jQuery.fn.highlightText = function(text, className) { - function highlight(node) { - if (node.nodeType == 3) { - var val = node.nodeValue; - var pos = val.toLowerCase().indexOf(text); - if (pos >= 0 && !jQuery(node.parentNode).hasClass(className)) { - var span = document.createElement("span"); - span.className = className; - span.appendChild(document.createTextNode(val.substr(pos, text.length))); - node.parentNode.insertBefore(span, node.parentNode.insertBefore( - document.createTextNode(val.substr(pos + text.length)), - node.nextSibling)); - node.nodeValue = val.substr(0, pos); - } - } - else if (!jQuery(node).is("button, select, textarea")) { - jQuery.each(node.childNodes, function() { - highlight(this); - }); - } - } - return this.each(function() { - highlight(this); - }); -}; - -/* - * backward compatibility for jQuery.browser - * This will be supported until firefox bug is fixed. - */ -if (!jQuery.browser) { - jQuery.uaMatch = function(ua) { - ua = ua.toLowerCase(); - - var match = /(chrome)[ \/]([\w.]+)/.exec(ua) || - /(webkit)[ \/]([\w.]+)/.exec(ua) || - /(opera)(?:.*version|)[ \/]([\w.]+)/.exec(ua) || - /(msie) ([\w.]+)/.exec(ua) || - ua.indexOf("compatible") < 0 && /(mozilla)(?:.*? rv:([\w.]+)|)/.exec(ua) || - []; - - return { - browser: match[ 1 ] || "", - version: match[ 2 ] || "0" - }; - }; - jQuery.browser = {}; - jQuery.browser[jQuery.uaMatch(navigator.userAgent).browser] = true; -} - -/** - * Small JavaScript module for the documentation. - */ -var Documentation = { - - init : function() { - this.fixFirefoxAnchorBug(); - this.highlightSearchWords(); - this.initIndexTable(); - }, - - /** - * i18n support - */ - TRANSLATIONS : {}, - PLURAL_EXPR : function(n) { return n == 1 ? 0 : 1; }, - LOCALE : 'unknown', - - // gettext and ngettext don't access this so that the functions - // can safely bound to a different name (_ = Documentation.gettext) - gettext : function(string) { - var translated = Documentation.TRANSLATIONS[string]; - if (typeof translated == 'undefined') - return string; - return (typeof translated == 'string') ? translated : translated[0]; - }, - - ngettext : function(singular, plural, n) { - var translated = Documentation.TRANSLATIONS[singular]; - if (typeof translated == 'undefined') - return (n == 1) ? singular : plural; - return translated[Documentation.PLURALEXPR(n)]; - }, - - addTranslations : function(catalog) { - for (var key in catalog.messages) - this.TRANSLATIONS[key] = catalog.messages[key]; - this.PLURAL_EXPR = new Function('n', 'return +(' + catalog.plural_expr + ')'); - this.LOCALE = catalog.locale; - }, - - /** - * add context elements like header anchor links - */ - addContextElements : function() { - $('div[id] > :header:first').each(function() { - $('\u00B6'). - attr('href', '#' + this.id). - attr('title', _('Permalink to this headline')). - appendTo(this); - }); - $('dt[id]').each(function() { - $('\u00B6'). - attr('href', '#' + this.id). - attr('title', _('Permalink to this definition')). - appendTo(this); - }); - }, - - /** - * workaround a firefox stupidity - * see: https://bugzilla.mozilla.org/show_bug.cgi?id=645075 - */ - fixFirefoxAnchorBug : function() { - if (document.location.hash) - window.setTimeout(function() { - document.location.href += ''; - }, 10); - }, - - /** - * highlight the search words provided in the url in the text - */ - highlightSearchWords : function() { - var params = $.getQueryParameters(); - var terms = (params.highlight) ? params.highlight[0].split(/\s+/) : []; - if (terms.length) { - var body = $('div.body'); - if (!body.length) { - body = $('body'); - } - window.setTimeout(function() { - $.each(terms, function() { - body.highlightText(this.toLowerCase(), 'highlighted'); - }); - }, 10); - $('') - .appendTo($('#searchbox')); - } - }, - - /** - * init the domain index toggle buttons - */ - initIndexTable : function() { - var togglers = $('img.toggler').click(function() { - var src = $(this).attr('src'); - var idnum = $(this).attr('id').substr(7); - $('tr.cg-' + idnum).toggle(); - if (src.substr(-9) == 'minus.png') - $(this).attr('src', src.substr(0, src.length-9) + 'plus.png'); - else - $(this).attr('src', src.substr(0, src.length-8) + 'minus.png'); - }).css('display', ''); - if (DOCUMENTATION_OPTIONS.COLLAPSE_INDEX) { - togglers.click(); - } - }, - - /** - * helper function to hide the search marks again - */ - hideSearchWords : function() { - $('#searchbox .highlight-link').fadeOut(300); - $('span.highlighted').removeClass('highlighted'); - }, - - /** - * make the url absolute - */ - makeURL : function(relativeURL) { - return DOCUMENTATION_OPTIONS.URL_ROOT + '/' + relativeURL; - }, - - /** - * get the current relative url - */ - getCurrentURL : function() { - var path = document.location.pathname; - var parts = path.split(/\//); - $.each(DOCUMENTATION_OPTIONS.URL_ROOT.split(/\//), function() { - if (this == '..') - parts.pop(); - }); - var url = parts.join('/'); - return path.substring(url.lastIndexOf('/') + 1, path.length - 1); - } -}; - -// quick alias for translations -_ = Documentation.gettext; - -$(document).ready(function() { - Documentation.init(); -}); diff --git a/_static/down-pressed.png b/_static/down-pressed.png deleted file mode 100644 index 7c30d004b..000000000 Binary files a/_static/down-pressed.png and /dev/null differ diff --git a/_static/down.png b/_static/down.png deleted file mode 100644 index f48098a43..000000000 Binary files a/_static/down.png and /dev/null differ diff --git a/_static/file.png b/_static/file.png deleted file mode 100644 index 254c60bfb..000000000 Binary files a/_static/file.png and /dev/null differ diff --git a/_static/haiku.css b/_static/haiku.css deleted file mode 100644 index 20457f140..000000000 --- a/_static/haiku.css +++ /dev/null @@ -1,371 +0,0 @@ -/* - * haiku.css_t - * ~~~~~~~~~~~ - * - * Sphinx stylesheet -- haiku theme. - * - * Adapted from http://haiku-os.org/docs/Haiku-doc.css. - * Original copyright message: - * - * Copyright 2008-2009, Haiku. All rights reserved. - * Distributed under the terms of the MIT License. - * - * Authors: - * Francois Revol - * Stephan Assmus - * Braden Ewing - * Humdinger - * - * :copyright: Copyright 2007-2015 by the Sphinx team, see AUTHORS. - * :license: BSD, see LICENSE for details. - * - */ - -@import url("basic.css"); - -html { - margin: 0px; - padding: 0px; - background: #FFF url(bg-page.png) top left repeat-x; -} - -body { - line-height: 1.5; - margin: auto; - padding: 0px; - font-family: "DejaVu Sans", Arial, Helvetica, sans-serif; - min-width: 59em; - max-width: 70em; - color: #333333; -} - -div.footer { - padding: 8px; - font-size: 11px; - text-align: center; - letter-spacing: 0.5px; -} - -/* link colors and text decoration */ - -a:link { - font-weight: bold; - text-decoration: none; - color: #0c3762; -} - -a:visited { - font-weight: bold; - text-decoration: none; - color: #0c3762; -} - -a:hover, a:active { - text-decoration: underline; - color: #ff4500; -} - -/* Some headers act as anchors, don't give them a hover effect */ - -h1 a:hover, a:active { - text-decoration: none; - color: #0c3762; -} - -h2 a:hover, a:active { - text-decoration: none; - color: #0c3762; -} - -h3 a:hover, a:active { - text-decoration: none; - color: #0c3762; -} - -h4 a:hover, a:active { - text-decoration: none; - color: #0c3762; -} - -a.headerlink { - color: #a7ce38; - padding-left: 5px; -} - -a.headerlink:hover { - color: #a7ce38; -} - -/* basic text elements */ - -div.content { - margin-top: 20px; - margin-left: 40px; - margin-right: 40px; - margin-bottom: 50px; - font-size: 0.9em; -} - -/* heading and navigation */ - -div.header { - position: relative; - left: 0px; - top: 0px; - height: 85px; - /* background: #eeeeee; */ - padding: 0 40px; -} -div.header h1 { - font-size: 1.6em; - font-weight: normal; - letter-spacing: 1px; - color: #0c3762; - border: 0; - margin: 0; - padding-top: 15px; -} -div.header h1 a { - font-weight: normal; - color: #0c3762; -} -div.header h2 { - font-size: 1.3em; - font-weight: normal; - letter-spacing: 1px; - text-transform: uppercase; - color: #aaa; - border: 0; - margin-top: -3px; - padding: 0; -} - -div.header img.rightlogo { - float: right; -} - - -div.title { - font-size: 1.3em; - font-weight: bold; - color: #0c3762; - border-bottom: dotted thin #e0e0e0; - margin-bottom: 25px; -} -div.topnav { - /* background: #e0e0e0; */ -} -div.topnav p { - margin-top: 0; - margin-left: 40px; - margin-right: 40px; - margin-bottom: 0px; - text-align: right; - font-size: 0.8em; -} -div.bottomnav { - background: #eeeeee; -} -div.bottomnav p { - margin-right: 40px; - text-align: right; - font-size: 0.8em; -} - -a.uplink { - font-weight: normal; -} - - -/* contents box */ - -table.index { - margin: 0px 0px 30px 30px; - padding: 1px; - border-width: 1px; - border-style: dotted; - border-color: #e0e0e0; -} -table.index tr.heading { - background-color: #e0e0e0; - text-align: center; - font-weight: bold; - font-size: 1.1em; -} -table.index tr.index { - background-color: #eeeeee; -} -table.index td { - padding: 5px 20px; -} - -table.index a:link, table.index a:visited { - font-weight: normal; - text-decoration: none; - color: #0c3762; -} -table.index a:hover, table.index a:active { - text-decoration: underline; - color: #ff4500; -} - - -/* Haiku User Guide styles and layout */ - -/* Rounded corner boxes */ -/* Common declarations */ -div.admonition { - -webkit-border-radius: 10px; - -khtml-border-radius: 10px; - -moz-border-radius: 10px; - border-radius: 10px; - border-style: dotted; - border-width: thin; - border-color: #dcdcdc; - padding: 10px 15px 10px 15px; - margin-bottom: 15px; - margin-top: 15px; -} -div.note { - padding: 10px 15px 10px 80px; - background: #e4ffde url(alert_info_32.png) 15px 15px no-repeat; - min-height: 42px; -} -div.warning { - padding: 10px 15px 10px 80px; - background: #fffbc6 url(alert_warning_32.png) 15px 15px no-repeat; - min-height: 42px; -} -div.seealso { - background: #e4ffde; -} - -/* More layout and styles */ -h1 { - font-size: 1.3em; - font-weight: bold; - color: #0c3762; - border-bottom: dotted thin #e0e0e0; - margin-top: 30px; -} - -h2 { - font-size: 1.2em; - font-weight: normal; - color: #0c3762; - border-bottom: dotted thin #e0e0e0; - margin-top: 30px; -} - -h3 { - font-size: 1.1em; - font-weight: normal; - color: #0c3762; - margin-top: 30px; -} - -h4 { - font-size: 1.0em; - font-weight: normal; - color: #0c3762; - margin-top: 30px; -} - -p { - text-align: justify; -} - -p.last { - margin-bottom: 0; -} - -ol { - padding-left: 20px; -} - -ul { - padding-left: 5px; - margin-top: 3px; -} - -li { - line-height: 1.3; -} - -div.content ul > li { - -moz-background-clip:border; - -moz-background-inline-policy:continuous; - -moz-background-origin:padding; - background: transparent url(bullet_orange.png) no-repeat scroll left 0.45em; - list-style-image: none; - list-style-type: none; - padding: 0 0 0 1.666em; - margin-bottom: 3px; -} - -td { - vertical-align: top; -} - -code { - background-color: #e2e2e2; - font-size: 1.0em; - font-family: monospace; -} - -pre { - border-color: #0c3762; - border-style: dotted; - border-width: thin; - margin: 0 0 12px 0; - padding: 0.8em; - background-color: #f0f0f0; -} - -hr { - border-top: 1px solid #ccc; - border-bottom: 0; - border-right: 0; - border-left: 0; - margin-bottom: 10px; - margin-top: 20px; -} - -/* printer only pretty stuff */ -@media print { - .noprint { - display: none; - } - /* for acronyms we want their definitions inlined at print time */ - acronym[title]:after { - font-size: small; - content: " (" attr(title) ")"; - font-style: italic; - } - /* and not have mozilla dotted underline */ - acronym { - border: none; - } - div.topnav, div.bottomnav, div.header, table.index { - display: none; - } - div.content { - margin: 0px; - padding: 0px; - } - html { - background: #FFF; - } -} - -.viewcode-back { - font-family: "DejaVu Sans", Arial, Helvetica, sans-serif; -} - -div.viewcode-block:target { - background-color: #f4debf; - border-top: 1px solid #ac9; - border-bottom: 1px solid #ac9; - margin: -1px -10px; - padding: 0 12px; -} \ No newline at end of file diff --git a/_static/jquery-1.11.1.js b/_static/jquery-1.11.1.js deleted file mode 100644 index d4b67f7e6..000000000 --- a/_static/jquery-1.11.1.js +++ /dev/null @@ -1,10308 +0,0 @@ -/*! - * jQuery JavaScript Library v1.11.1 - * http://jquery.com/ - * - * Includes Sizzle.js - * http://sizzlejs.com/ - * - * Copyright 2005, 2014 jQuery Foundation, Inc. and other contributors - * Released under the MIT license - * http://jquery.org/license - * - * Date: 2014-05-01T17:42Z - */ - -(function( global, factory ) { - - if ( typeof module === "object" && typeof module.exports === "object" ) { - // For CommonJS and CommonJS-like environments where a proper window is present, - // execute the factory and get jQuery - // For environments that do not inherently posses a window with a document - // (such as Node.js), expose a jQuery-making factory as module.exports - // This accentuates the need for the creation of a real window - // e.g. var jQuery = require("jquery")(window); - // See ticket #14549 for more info - module.exports = global.document ? - factory( global, true ) : - function( w ) { - if ( !w.document ) { - throw new Error( "jQuery requires a window with a document" ); - } - return factory( w ); - }; - } else { - factory( global ); - } - -// Pass this if window is not defined yet -}(typeof window !== "undefined" ? window : this, function( window, noGlobal ) { - -// Can't do this because several apps including ASP.NET trace -// the stack via arguments.caller.callee and Firefox dies if -// you try to trace through "use strict" call chains. (#13335) -// Support: Firefox 18+ -// - -var deletedIds = []; - -var slice = deletedIds.slice; - -var concat = deletedIds.concat; - -var push = deletedIds.push; - -var indexOf = deletedIds.indexOf; - -var class2type = {}; - -var toString = class2type.toString; - -var hasOwn = class2type.hasOwnProperty; - -var support = {}; - - - -var - version = "1.11.1", - - // Define a local copy of jQuery - jQuery = function( selector, context ) { - // The jQuery object is actually just the init constructor 'enhanced' - // Need init if jQuery is called (just allow error to be thrown if not included) - return new jQuery.fn.init( selector, context ); - }, - - // Support: Android<4.1, IE<9 - // Make sure we trim BOM and NBSP - rtrim = /^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g, - - // Matches dashed string for camelizing - rmsPrefix = /^-ms-/, - rdashAlpha = /-([\da-z])/gi, - - // Used by jQuery.camelCase as callback to replace() - fcamelCase = function( all, letter ) { - return letter.toUpperCase(); - }; - -jQuery.fn = jQuery.prototype = { - // The current version of jQuery being used - jquery: version, - - constructor: jQuery, - - // Start with an empty selector - selector: "", - - // The default length of a jQuery object is 0 - length: 0, - - toArray: function() { - return slice.call( this ); - }, - - // Get the Nth element in the matched element set OR - // Get the whole matched element set as a clean array - get: function( num ) { - return num != null ? - - // Return just the one element from the set - ( num < 0 ? this[ num + this.length ] : this[ num ] ) : - - // Return all the elements in a clean array - slice.call( this ); - }, - - // Take an array of elements and push it onto the stack - // (returning the new matched element set) - pushStack: function( elems ) { - - // Build a new jQuery matched element set - var ret = jQuery.merge( this.constructor(), elems ); - - // Add the old object onto the stack (as a reference) - ret.prevObject = this; - ret.context = this.context; - - // Return the newly-formed element set - return ret; - }, - - // Execute a callback for every element in the matched set. - // (You can seed the arguments with an array of args, but this is - // only used internally.) - each: function( callback, args ) { - return jQuery.each( this, callback, args ); - }, - - map: function( callback ) { - return this.pushStack( jQuery.map(this, function( elem, i ) { - return callback.call( elem, i, elem ); - })); - }, - - slice: function() { - return this.pushStack( slice.apply( this, arguments ) ); - }, - - first: function() { - return this.eq( 0 ); - }, - - last: function() { - return this.eq( -1 ); - }, - - eq: function( i ) { - var len = this.length, - j = +i + ( i < 0 ? len : 0 ); - return this.pushStack( j >= 0 && j < len ? [ this[j] ] : [] ); - }, - - end: function() { - return this.prevObject || this.constructor(null); - }, - - // For internal use only. - // Behaves like an Array's method, not like a jQuery method. - push: push, - sort: deletedIds.sort, - splice: deletedIds.splice -}; - -jQuery.extend = jQuery.fn.extend = function() { - var src, copyIsArray, copy, name, options, clone, - target = arguments[0] || {}, - i = 1, - length = arguments.length, - deep = false; - - // Handle a deep copy situation - if ( typeof target === "boolean" ) { - deep = target; - - // skip the boolean and the target - target = arguments[ i ] || {}; - i++; - } - - // Handle case when target is a string or something (possible in deep copy) - if ( typeof target !== "object" && !jQuery.isFunction(target) ) { - target = {}; - } - - // extend jQuery itself if only one argument is passed - if ( i === length ) { - target = this; - i--; - } - - for ( ; i < length; i++ ) { - // Only deal with non-null/undefined values - if ( (options = arguments[ i ]) != null ) { - // Extend the base object - for ( name in options ) { - src = target[ name ]; - copy = options[ name ]; - - // Prevent never-ending loop - if ( target === copy ) { - continue; - } - - // Recurse if we're merging plain objects or arrays - if ( deep && copy && ( jQuery.isPlainObject(copy) || (copyIsArray = jQuery.isArray(copy)) ) ) { - if ( copyIsArray ) { - copyIsArray = false; - clone = src && jQuery.isArray(src) ? src : []; - - } else { - clone = src && jQuery.isPlainObject(src) ? src : {}; - } - - // Never move original objects, clone them - target[ name ] = jQuery.extend( deep, clone, copy ); - - // Don't bring in undefined values - } else if ( copy !== undefined ) { - target[ name ] = copy; - } - } - } - } - - // Return the modified object - return target; -}; - -jQuery.extend({ - // Unique for each copy of jQuery on the page - expando: "jQuery" + ( version + Math.random() ).replace( /\D/g, "" ), - - // Assume jQuery is ready without the ready module - isReady: true, - - error: function( msg ) { - throw new Error( msg ); - }, - - noop: function() {}, - - // See test/unit/core.js for details concerning isFunction. - // Since version 1.3, DOM methods and functions like alert - // aren't supported. They return false on IE (#2968). - isFunction: function( obj ) { - return jQuery.type(obj) === "function"; - }, - - isArray: Array.isArray || function( obj ) { - return jQuery.type(obj) === "array"; - }, - - isWindow: function( obj ) { - /* jshint eqeqeq: false */ - return obj != null && obj == obj.window; - }, - - isNumeric: function( obj ) { - // parseFloat NaNs numeric-cast false positives (null|true|false|"") - // ...but misinterprets leading-number strings, particularly hex literals ("0x...") - // subtraction forces infinities to NaN - return !jQuery.isArray( obj ) && obj - parseFloat( obj ) >= 0; - }, - - isEmptyObject: function( obj ) { - var name; - for ( name in obj ) { - return false; - } - return true; - }, - - isPlainObject: function( obj ) { - var key; - - // Must be an Object. - // Because of IE, we also have to check the presence of the constructor property. - // Make sure that DOM nodes and window objects don't pass through, as well - if ( !obj || jQuery.type(obj) !== "object" || obj.nodeType || jQuery.isWindow( obj ) ) { - return false; - } - - try { - // Not own constructor property must be Object - if ( obj.constructor && - !hasOwn.call(obj, "constructor") && - !hasOwn.call(obj.constructor.prototype, "isPrototypeOf") ) { - return false; - } - } catch ( e ) { - // IE8,9 Will throw exceptions on certain host objects #9897 - return false; - } - - // Support: IE<9 - // Handle iteration over inherited properties before own properties. - if ( support.ownLast ) { - for ( key in obj ) { - return hasOwn.call( obj, key ); - } - } - - // Own properties are enumerated firstly, so to speed up, - // if last one is own, then all properties are own. - for ( key in obj ) {} - - return key === undefined || hasOwn.call( obj, key ); - }, - - type: function( obj ) { - if ( obj == null ) { - return obj + ""; - } - return typeof obj === "object" || typeof obj === "function" ? - class2type[ toString.call(obj) ] || "object" : - typeof obj; - }, - - // Evaluates a script in a global context - // Workarounds based on findings by Jim Driscoll - // http://weblogs.java.net/blog/driscoll/archive/2009/09/08/eval-javascript-global-context - globalEval: function( data ) { - if ( data && jQuery.trim( data ) ) { - // We use execScript on Internet Explorer - // We use an anonymous function so that context is window - // rather than jQuery in Firefox - ( window.execScript || function( data ) { - window[ "eval" ].call( window, data ); - } )( data ); - } - }, - - // Convert dashed to camelCase; used by the css and data modules - // Microsoft forgot to hump their vendor prefix (#9572) - camelCase: function( string ) { - return string.replace( rmsPrefix, "ms-" ).replace( rdashAlpha, fcamelCase ); - }, - - nodeName: function( elem, name ) { - return elem.nodeName && elem.nodeName.toLowerCase() === name.toLowerCase(); - }, - - // args is for internal usage only - each: function( obj, callback, args ) { - var value, - i = 0, - length = obj.length, - isArray = isArraylike( obj ); - - if ( args ) { - if ( isArray ) { - for ( ; i < length; i++ ) { - value = callback.apply( obj[ i ], args ); - - if ( value === false ) { - break; - } - } - } else { - for ( i in obj ) { - value = callback.apply( obj[ i ], args ); - - if ( value === false ) { - break; - } - } - } - - // A special, fast, case for the most common use of each - } else { - if ( isArray ) { - for ( ; i < length; i++ ) { - value = callback.call( obj[ i ], i, obj[ i ] ); - - if ( value === false ) { - break; - } - } - } else { - for ( i in obj ) { - value = callback.call( obj[ i ], i, obj[ i ] ); - - if ( value === false ) { - break; - } - } - } - } - - return obj; - }, - - // Support: Android<4.1, IE<9 - trim: function( text ) { - return text == null ? - "" : - ( text + "" ).replace( rtrim, "" ); - }, - - // results is for internal usage only - makeArray: function( arr, results ) { - var ret = results || []; - - if ( arr != null ) { - if ( isArraylike( Object(arr) ) ) { - jQuery.merge( ret, - typeof arr === "string" ? - [ arr ] : arr - ); - } else { - push.call( ret, arr ); - } - } - - return ret; - }, - - inArray: function( elem, arr, i ) { - var len; - - if ( arr ) { - if ( indexOf ) { - return indexOf.call( arr, elem, i ); - } - - len = arr.length; - i = i ? i < 0 ? Math.max( 0, len + i ) : i : 0; - - for ( ; i < len; i++ ) { - // Skip accessing in sparse arrays - if ( i in arr && arr[ i ] === elem ) { - return i; - } - } - } - - return -1; - }, - - merge: function( first, second ) { - var len = +second.length, - j = 0, - i = first.length; - - while ( j < len ) { - first[ i++ ] = second[ j++ ]; - } - - // Support: IE<9 - // Workaround casting of .length to NaN on otherwise arraylike objects (e.g., NodeLists) - if ( len !== len ) { - while ( second[j] !== undefined ) { - first[ i++ ] = second[ j++ ]; - } - } - - first.length = i; - - return first; - }, - - grep: function( elems, callback, invert ) { - var callbackInverse, - matches = [], - i = 0, - length = elems.length, - callbackExpect = !invert; - - // Go through the array, only saving the items - // that pass the validator function - for ( ; i < length; i++ ) { - callbackInverse = !callback( elems[ i ], i ); - if ( callbackInverse !== callbackExpect ) { - matches.push( elems[ i ] ); - } - } - - return matches; - }, - - // arg is for internal usage only - map: function( elems, callback, arg ) { - var value, - i = 0, - length = elems.length, - isArray = isArraylike( elems ), - ret = []; - - // Go through the array, translating each of the items to their new values - if ( isArray ) { - for ( ; i < length; i++ ) { - value = callback( elems[ i ], i, arg ); - - if ( value != null ) { - ret.push( value ); - } - } - - // Go through every key on the object, - } else { - for ( i in elems ) { - value = callback( elems[ i ], i, arg ); - - if ( value != null ) { - ret.push( value ); - } - } - } - - // Flatten any nested arrays - return concat.apply( [], ret ); - }, - - // A global GUID counter for objects - guid: 1, - - // Bind a function to a context, optionally partially applying any - // arguments. - proxy: function( fn, context ) { - var args, proxy, tmp; - - if ( typeof context === "string" ) { - tmp = fn[ context ]; - context = fn; - fn = tmp; - } - - // Quick check to determine if target is callable, in the spec - // this throws a TypeError, but we will just return undefined. - if ( !jQuery.isFunction( fn ) ) { - return undefined; - } - - // Simulated bind - args = slice.call( arguments, 2 ); - proxy = function() { - return fn.apply( context || this, args.concat( slice.call( arguments ) ) ); - }; - - // Set the guid of unique handler to the same of original handler, so it can be removed - proxy.guid = fn.guid = fn.guid || jQuery.guid++; - - return proxy; - }, - - now: function() { - return +( new Date() ); - }, - - // jQuery.support is not used in Core but other projects attach their - // properties to it so it needs to exist. - support: support -}); - -// Populate the class2type map -jQuery.each("Boolean Number String Function Array Date RegExp Object Error".split(" "), function(i, name) { - class2type[ "[object " + name + "]" ] = name.toLowerCase(); -}); - -function isArraylike( obj ) { - var length = obj.length, - type = jQuery.type( obj ); - - if ( type === "function" || jQuery.isWindow( obj ) ) { - return false; - } - - if ( obj.nodeType === 1 && length ) { - return true; - } - - return type === "array" || length === 0 || - typeof length === "number" && length > 0 && ( length - 1 ) in obj; -} -var Sizzle = -/*! - * Sizzle CSS Selector Engine v1.10.19 - * http://sizzlejs.com/ - * - * Copyright 2013 jQuery Foundation, Inc. and other contributors - * Released under the MIT license - * http://jquery.org/license - * - * Date: 2014-04-18 - */ -(function( window ) { - -var i, - support, - Expr, - getText, - isXML, - tokenize, - compile, - select, - outermostContext, - sortInput, - hasDuplicate, - - // Local document vars - setDocument, - document, - docElem, - documentIsHTML, - rbuggyQSA, - rbuggyMatches, - matches, - contains, - - // Instance-specific data - expando = "sizzle" + -(new Date()), - preferredDoc = window.document, - dirruns = 0, - done = 0, - classCache = createCache(), - tokenCache = createCache(), - compilerCache = createCache(), - sortOrder = function( a, b ) { - if ( a === b ) { - hasDuplicate = true; - } - return 0; - }, - - // General-purpose constants - strundefined = typeof undefined, - MAX_NEGATIVE = 1 << 31, - - // Instance methods - hasOwn = ({}).hasOwnProperty, - arr = [], - pop = arr.pop, - push_native = arr.push, - push = arr.push, - slice = arr.slice, - // Use a stripped-down indexOf if we can't use a native one - indexOf = arr.indexOf || function( elem ) { - var i = 0, - len = this.length; - for ( ; i < len; i++ ) { - if ( this[i] === elem ) { - return i; - } - } - return -1; - }, - - booleans = "checked|selected|async|autofocus|autoplay|controls|defer|disabled|hidden|ismap|loop|multiple|open|readonly|required|scoped", - - // Regular expressions - - // Whitespace characters http://www.w3.org/TR/css3-selectors/#whitespace - whitespace = "[\\x20\\t\\r\\n\\f]", - // http://www.w3.org/TR/css3-syntax/#characters - characterEncoding = "(?:\\\\.|[\\w-]|[^\\x00-\\xa0])+", - - // Loosely modeled on CSS identifier characters - // An unquoted value should be a CSS identifier http://www.w3.org/TR/css3-selectors/#attribute-selectors - // Proper syntax: http://www.w3.org/TR/CSS21/syndata.html#value-def-identifier - identifier = characterEncoding.replace( "w", "w#" ), - - // Attribute selectors: http://www.w3.org/TR/selectors/#attribute-selectors - attributes = "\\[" + whitespace + "*(" + characterEncoding + ")(?:" + whitespace + - // Operator (capture 2) - "*([*^$|!~]?=)" + whitespace + - // "Attribute values must be CSS identifiers [capture 5] or strings [capture 3 or capture 4]" - "*(?:'((?:\\\\.|[^\\\\'])*)'|\"((?:\\\\.|[^\\\\\"])*)\"|(" + identifier + "))|)" + whitespace + - "*\\]", - - pseudos = ":(" + characterEncoding + ")(?:\\((" + - // To reduce the number of selectors needing tokenize in the preFilter, prefer arguments: - // 1. quoted (capture 3; capture 4 or capture 5) - "('((?:\\\\.|[^\\\\'])*)'|\"((?:\\\\.|[^\\\\\"])*)\")|" + - // 2. simple (capture 6) - "((?:\\\\.|[^\\\\()[\\]]|" + attributes + ")*)|" + - // 3. anything else (capture 2) - ".*" + - ")\\)|)", - - // Leading and non-escaped trailing whitespace, capturing some non-whitespace characters preceding the latter - rtrim = new RegExp( "^" + whitespace + "+|((?:^|[^\\\\])(?:\\\\.)*)" + whitespace + "+$", "g" ), - - rcomma = new RegExp( "^" + whitespace + "*," + whitespace + "*" ), - rcombinators = new RegExp( "^" + whitespace + "*([>+~]|" + whitespace + ")" + whitespace + "*" ), - - rattributeQuotes = new RegExp( "=" + whitespace + "*([^\\]'\"]*?)" + whitespace + "*\\]", "g" ), - - rpseudo = new RegExp( pseudos ), - ridentifier = new RegExp( "^" + identifier + "$" ), - - matchExpr = { - "ID": new RegExp( "^#(" + characterEncoding + ")" ), - "CLASS": new RegExp( "^\\.(" + characterEncoding + ")" ), - "TAG": new RegExp( "^(" + characterEncoding.replace( "w", "w*" ) + ")" ), - "ATTR": new RegExp( "^" + attributes ), - "PSEUDO": new RegExp( "^" + pseudos ), - "CHILD": new RegExp( "^:(only|first|last|nth|nth-last)-(child|of-type)(?:\\(" + whitespace + - "*(even|odd|(([+-]|)(\\d*)n|)" + whitespace + "*(?:([+-]|)" + whitespace + - "*(\\d+)|))" + whitespace + "*\\)|)", "i" ), - "bool": new RegExp( "^(?:" + booleans + ")$", "i" ), - // For use in libraries implementing .is() - // We use this for POS matching in `select` - "needsContext": new RegExp( "^" + whitespace + "*[>+~]|:(even|odd|eq|gt|lt|nth|first|last)(?:\\(" + - whitespace + "*((?:-\\d)?\\d*)" + whitespace + "*\\)|)(?=[^-]|$)", "i" ) - }, - - rinputs = /^(?:input|select|textarea|button)$/i, - rheader = /^h\d$/i, - - rnative = /^[^{]+\{\s*\[native \w/, - - // Easily-parseable/retrievable ID or TAG or CLASS selectors - rquickExpr = /^(?:#([\w-]+)|(\w+)|\.([\w-]+))$/, - - rsibling = /[+~]/, - rescape = /'|\\/g, - - // CSS escapes http://www.w3.org/TR/CSS21/syndata.html#escaped-characters - runescape = new RegExp( "\\\\([\\da-f]{1,6}" + whitespace + "?|(" + whitespace + ")|.)", "ig" ), - funescape = function( _, escaped, escapedWhitespace ) { - var high = "0x" + escaped - 0x10000; - // NaN means non-codepoint - // Support: Firefox<24 - // Workaround erroneous numeric interpretation of +"0x" - return high !== high || escapedWhitespace ? - escaped : - high < 0 ? - // BMP codepoint - String.fromCharCode( high + 0x10000 ) : - // Supplemental Plane codepoint (surrogate pair) - String.fromCharCode( high >> 10 | 0xD800, high & 0x3FF | 0xDC00 ); - }; - -// Optimize for push.apply( _, NodeList ) -try { - push.apply( - (arr = slice.call( preferredDoc.childNodes )), - preferredDoc.childNodes - ); - // Support: Android<4.0 - // Detect silently failing push.apply - arr[ preferredDoc.childNodes.length ].nodeType; -} catch ( e ) { - push = { apply: arr.length ? - - // Leverage slice if possible - function( target, els ) { - push_native.apply( target, slice.call(els) ); - } : - - // Support: IE<9 - // Otherwise append directly - function( target, els ) { - var j = target.length, - i = 0; - // Can't trust NodeList.length - while ( (target[j++] = els[i++]) ) {} - target.length = j - 1; - } - }; -} - -function Sizzle( selector, context, results, seed ) { - var match, elem, m, nodeType, - // QSA vars - i, groups, old, nid, newContext, newSelector; - - if ( ( context ? context.ownerDocument || context : preferredDoc ) !== document ) { - setDocument( context ); - } - - context = context || document; - results = results || []; - - if ( !selector || typeof selector !== "string" ) { - return results; - } - - if ( (nodeType = context.nodeType) !== 1 && nodeType !== 9 ) { - return []; - } - - if ( documentIsHTML && !seed ) { - - // Shortcuts - if ( (match = rquickExpr.exec( selector )) ) { - // Speed-up: Sizzle("#ID") - if ( (m = match[1]) ) { - if ( nodeType === 9 ) { - elem = context.getElementById( m ); - // Check parentNode to catch when Blackberry 4.6 returns - // nodes that are no longer in the document (jQuery #6963) - if ( elem && elem.parentNode ) { - // Handle the case where IE, Opera, and Webkit return items - // by name instead of ID - if ( elem.id === m ) { - results.push( elem ); - return results; - } - } else { - return results; - } - } else { - // Context is not a document - if ( context.ownerDocument && (elem = context.ownerDocument.getElementById( m )) && - contains( context, elem ) && elem.id === m ) { - results.push( elem ); - return results; - } - } - - // Speed-up: Sizzle("TAG") - } else if ( match[2] ) { - push.apply( results, context.getElementsByTagName( selector ) ); - return results; - - // Speed-up: Sizzle(".CLASS") - } else if ( (m = match[3]) && support.getElementsByClassName && context.getElementsByClassName ) { - push.apply( results, context.getElementsByClassName( m ) ); - return results; - } - } - - // QSA path - if ( support.qsa && (!rbuggyQSA || !rbuggyQSA.test( selector )) ) { - nid = old = expando; - newContext = context; - newSelector = nodeType === 9 && selector; - - // qSA works strangely on Element-rooted queries - // We can work around this by specifying an extra ID on the root - // and working up from there (Thanks to Andrew Dupont for the technique) - // IE 8 doesn't work on object elements - if ( nodeType === 1 && context.nodeName.toLowerCase() !== "object" ) { - groups = tokenize( selector ); - - if ( (old = context.getAttribute("id")) ) { - nid = old.replace( rescape, "\\$&" ); - } else { - context.setAttribute( "id", nid ); - } - nid = "[id='" + nid + "'] "; - - i = groups.length; - while ( i-- ) { - groups[i] = nid + toSelector( groups[i] ); - } - newContext = rsibling.test( selector ) && testContext( context.parentNode ) || context; - newSelector = groups.join(","); - } - - if ( newSelector ) { - try { - push.apply( results, - newContext.querySelectorAll( newSelector ) - ); - return results; - } catch(qsaError) { - } finally { - if ( !old ) { - context.removeAttribute("id"); - } - } - } - } - } - - // All others - return select( selector.replace( rtrim, "$1" ), context, results, seed ); -} - -/** - * Create key-value caches of limited size - * @returns {Function(string, Object)} Returns the Object data after storing it on itself with - * property name the (space-suffixed) string and (if the cache is larger than Expr.cacheLength) - * deleting the oldest entry - */ -function createCache() { - var keys = []; - - function cache( key, value ) { - // Use (key + " ") to avoid collision with native prototype properties (see Issue #157) - if ( keys.push( key + " " ) > Expr.cacheLength ) { - // Only keep the most recent entries - delete cache[ keys.shift() ]; - } - return (cache[ key + " " ] = value); - } - return cache; -} - -/** - * Mark a function for special use by Sizzle - * @param {Function} fn The function to mark - */ -function markFunction( fn ) { - fn[ expando ] = true; - return fn; -} - -/** - * Support testing using an element - * @param {Function} fn Passed the created div and expects a boolean result - */ -function assert( fn ) { - var div = document.createElement("div"); - - try { - return !!fn( div ); - } catch (e) { - return false; - } finally { - // Remove from its parent by default - if ( div.parentNode ) { - div.parentNode.removeChild( div ); - } - // release memory in IE - div = null; - } -} - -/** - * Adds the same handler for all of the specified attrs - * @param {String} attrs Pipe-separated list of attributes - * @param {Function} handler The method that will be applied - */ -function addHandle( attrs, handler ) { - var arr = attrs.split("|"), - i = attrs.length; - - while ( i-- ) { - Expr.attrHandle[ arr[i] ] = handler; - } -} - -/** - * Checks document order of two siblings - * @param {Element} a - * @param {Element} b - * @returns {Number} Returns less than 0 if a precedes b, greater than 0 if a follows b - */ -function siblingCheck( a, b ) { - var cur = b && a, - diff = cur && a.nodeType === 1 && b.nodeType === 1 && - ( ~b.sourceIndex || MAX_NEGATIVE ) - - ( ~a.sourceIndex || MAX_NEGATIVE ); - - // Use IE sourceIndex if available on both nodes - if ( diff ) { - return diff; - } - - // Check if b follows a - if ( cur ) { - while ( (cur = cur.nextSibling) ) { - if ( cur === b ) { - return -1; - } - } - } - - return a ? 1 : -1; -} - -/** - * Returns a function to use in pseudos for input types - * @param {String} type - */ -function createInputPseudo( type ) { - return function( elem ) { - var name = elem.nodeName.toLowerCase(); - return name === "input" && elem.type === type; - }; -} - -/** - * Returns a function to use in pseudos for buttons - * @param {String} type - */ -function createButtonPseudo( type ) { - return function( elem ) { - var name = elem.nodeName.toLowerCase(); - return (name === "input" || name === "button") && elem.type === type; - }; -} - -/** - * Returns a function to use in pseudos for positionals - * @param {Function} fn - */ -function createPositionalPseudo( fn ) { - return markFunction(function( argument ) { - argument = +argument; - return markFunction(function( seed, matches ) { - var j, - matchIndexes = fn( [], seed.length, argument ), - i = matchIndexes.length; - - // Match elements found at the specified indexes - while ( i-- ) { - if ( seed[ (j = matchIndexes[i]) ] ) { - seed[j] = !(matches[j] = seed[j]); - } - } - }); - }); -} - -/** - * Checks a node for validity as a Sizzle context - * @param {Element|Object=} context - * @returns {Element|Object|Boolean} The input node if acceptable, otherwise a falsy value - */ -function testContext( context ) { - return context && typeof context.getElementsByTagName !== strundefined && context; -} - -// Expose support vars for convenience -support = Sizzle.support = {}; - -/** - * Detects XML nodes - * @param {Element|Object} elem An element or a document - * @returns {Boolean} True iff elem is a non-HTML XML node - */ -isXML = Sizzle.isXML = function( elem ) { - // documentElement is verified for cases where it doesn't yet exist - // (such as loading iframes in IE - #4833) - var documentElement = elem && (elem.ownerDocument || elem).documentElement; - return documentElement ? documentElement.nodeName !== "HTML" : false; -}; - -/** - * Sets document-related variables once based on the current document - * @param {Element|Object} [doc] An element or document object to use to set the document - * @returns {Object} Returns the current document - */ -setDocument = Sizzle.setDocument = function( node ) { - var hasCompare, - doc = node ? node.ownerDocument || node : preferredDoc, - parent = doc.defaultView; - - // If no document and documentElement is available, return - if ( doc === document || doc.nodeType !== 9 || !doc.documentElement ) { - return document; - } - - // Set our document - document = doc; - docElem = doc.documentElement; - - // Support tests - documentIsHTML = !isXML( doc ); - - // Support: IE>8 - // If iframe document is assigned to "document" variable and if iframe has been reloaded, - // IE will throw "permission denied" error when accessing "document" variable, see jQuery #13936 - // IE6-8 do not support the defaultView property so parent will be undefined - if ( parent && parent !== parent.top ) { - // IE11 does not have attachEvent, so all must suffer - if ( parent.addEventListener ) { - parent.addEventListener( "unload", function() { - setDocument(); - }, false ); - } else if ( parent.attachEvent ) { - parent.attachEvent( "onunload", function() { - setDocument(); - }); - } - } - - /* Attributes - ---------------------------------------------------------------------- */ - - // Support: IE<8 - // Verify that getAttribute really returns attributes and not properties (excepting IE8 booleans) - support.attributes = assert(function( div ) { - div.className = "i"; - return !div.getAttribute("className"); - }); - - /* getElement(s)By* - ---------------------------------------------------------------------- */ - - // Check if getElementsByTagName("*") returns only elements - support.getElementsByTagName = assert(function( div ) { - div.appendChild( doc.createComment("") ); - return !div.getElementsByTagName("*").length; - }); - - // Check if getElementsByClassName can be trusted - support.getElementsByClassName = rnative.test( doc.getElementsByClassName ) && assert(function( div ) { - div.innerHTML = "
"; - - // Support: Safari<4 - // Catch class over-caching - div.firstChild.className = "i"; - // Support: Opera<10 - // Catch gEBCN failure to find non-leading classes - return div.getElementsByClassName("i").length === 2; - }); - - // Support: IE<10 - // Check if getElementById returns elements by name - // The broken getElementById methods don't pick up programatically-set names, - // so use a roundabout getElementsByName test - support.getById = assert(function( div ) { - docElem.appendChild( div ).id = expando; - return !doc.getElementsByName || !doc.getElementsByName( expando ).length; - }); - - // ID find and filter - if ( support.getById ) { - Expr.find["ID"] = function( id, context ) { - if ( typeof context.getElementById !== strundefined && documentIsHTML ) { - var m = context.getElementById( id ); - // Check parentNode to catch when Blackberry 4.6 returns - // nodes that are no longer in the document #6963 - return m && m.parentNode ? [ m ] : []; - } - }; - Expr.filter["ID"] = function( id ) { - var attrId = id.replace( runescape, funescape ); - return function( elem ) { - return elem.getAttribute("id") === attrId; - }; - }; - } else { - // Support: IE6/7 - // getElementById is not reliable as a find shortcut - delete Expr.find["ID"]; - - Expr.filter["ID"] = function( id ) { - var attrId = id.replace( runescape, funescape ); - return function( elem ) { - var node = typeof elem.getAttributeNode !== strundefined && elem.getAttributeNode("id"); - return node && node.value === attrId; - }; - }; - } - - // Tag - Expr.find["TAG"] = support.getElementsByTagName ? - function( tag, context ) { - if ( typeof context.getElementsByTagName !== strundefined ) { - return context.getElementsByTagName( tag ); - } - } : - function( tag, context ) { - var elem, - tmp = [], - i = 0, - results = context.getElementsByTagName( tag ); - - // Filter out possible comments - if ( tag === "*" ) { - while ( (elem = results[i++]) ) { - if ( elem.nodeType === 1 ) { - tmp.push( elem ); - } - } - - return tmp; - } - return results; - }; - - // Class - Expr.find["CLASS"] = support.getElementsByClassName && function( className, context ) { - if ( typeof context.getElementsByClassName !== strundefined && documentIsHTML ) { - return context.getElementsByClassName( className ); - } - }; - - /* QSA/matchesSelector - ---------------------------------------------------------------------- */ - - // QSA and matchesSelector support - - // matchesSelector(:active) reports false when true (IE9/Opera 11.5) - rbuggyMatches = []; - - // qSa(:focus) reports false when true (Chrome 21) - // We allow this because of a bug in IE8/9 that throws an error - // whenever `document.activeElement` is accessed on an iframe - // So, we allow :focus to pass through QSA all the time to avoid the IE error - // See http://bugs.jquery.com/ticket/13378 - rbuggyQSA = []; - - if ( (support.qsa = rnative.test( doc.querySelectorAll )) ) { - // Build QSA regex - // Regex strategy adopted from Diego Perini - assert(function( div ) { - // Select is set to empty string on purpose - // This is to test IE's treatment of not explicitly - // setting a boolean content attribute, - // since its presence should be enough - // http://bugs.jquery.com/ticket/12359 - div.innerHTML = ""; - - // Support: IE8, Opera 11-12.16 - // Nothing should be selected when empty strings follow ^= or $= or *= - // The test attribute must be unknown in Opera but "safe" for WinRT - // http://msdn.microsoft.com/en-us/library/ie/hh465388.aspx#attribute_section - if ( div.querySelectorAll("[msallowclip^='']").length ) { - rbuggyQSA.push( "[*^$]=" + whitespace + "*(?:''|\"\")" ); - } - - // Support: IE8 - // Boolean attributes and "value" are not treated correctly - if ( !div.querySelectorAll("[selected]").length ) { - rbuggyQSA.push( "\\[" + whitespace + "*(?:value|" + booleans + ")" ); - } - - // Webkit/Opera - :checked should return selected option elements - // http://www.w3.org/TR/2011/REC-css3-selectors-20110929/#checked - // IE8 throws error here and will not see later tests - if ( !div.querySelectorAll(":checked").length ) { - rbuggyQSA.push(":checked"); - } - }); - - assert(function( div ) { - // Support: Windows 8 Native Apps - // The type and name attributes are restricted during .innerHTML assignment - var input = doc.createElement("input"); - input.setAttribute( "type", "hidden" ); - div.appendChild( input ).setAttribute( "name", "D" ); - - // Support: IE8 - // Enforce case-sensitivity of name attribute - if ( div.querySelectorAll("[name=d]").length ) { - rbuggyQSA.push( "name" + whitespace + "*[*^$|!~]?=" ); - } - - // FF 3.5 - :enabled/:disabled and hidden elements (hidden elements are still enabled) - // IE8 throws error here and will not see later tests - if ( !div.querySelectorAll(":enabled").length ) { - rbuggyQSA.push( ":enabled", ":disabled" ); - } - - // Opera 10-11 does not throw on post-comma invalid pseudos - div.querySelectorAll("*,:x"); - rbuggyQSA.push(",.*:"); - }); - } - - if ( (support.matchesSelector = rnative.test( (matches = docElem.matches || - docElem.webkitMatchesSelector || - docElem.mozMatchesSelector || - docElem.oMatchesSelector || - docElem.msMatchesSelector) )) ) { - - assert(function( div ) { - // Check to see if it's possible to do matchesSelector - // on a disconnected node (IE 9) - support.disconnectedMatch = matches.call( div, "div" ); - - // This should fail with an exception - // Gecko does not error, returns false instead - matches.call( div, "[s!='']:x" ); - rbuggyMatches.push( "!=", pseudos ); - }); - } - - rbuggyQSA = rbuggyQSA.length && new RegExp( rbuggyQSA.join("|") ); - rbuggyMatches = rbuggyMatches.length && new RegExp( rbuggyMatches.join("|") ); - - /* Contains - ---------------------------------------------------------------------- */ - hasCompare = rnative.test( docElem.compareDocumentPosition ); - - // Element contains another - // Purposefully does not implement inclusive descendent - // As in, an element does not contain itself - contains = hasCompare || rnative.test( docElem.contains ) ? - function( a, b ) { - var adown = a.nodeType === 9 ? a.documentElement : a, - bup = b && b.parentNode; - return a === bup || !!( bup && bup.nodeType === 1 && ( - adown.contains ? - adown.contains( bup ) : - a.compareDocumentPosition && a.compareDocumentPosition( bup ) & 16 - )); - } : - function( a, b ) { - if ( b ) { - while ( (b = b.parentNode) ) { - if ( b === a ) { - return true; - } - } - } - return false; - }; - - /* Sorting - ---------------------------------------------------------------------- */ - - // Document order sorting - sortOrder = hasCompare ? - function( a, b ) { - - // Flag for duplicate removal - if ( a === b ) { - hasDuplicate = true; - return 0; - } - - // Sort on method existence if only one input has compareDocumentPosition - var compare = !a.compareDocumentPosition - !b.compareDocumentPosition; - if ( compare ) { - return compare; - } - - // Calculate position if both inputs belong to the same document - compare = ( a.ownerDocument || a ) === ( b.ownerDocument || b ) ? - a.compareDocumentPosition( b ) : - - // Otherwise we know they are disconnected - 1; - - // Disconnected nodes - if ( compare & 1 || - (!support.sortDetached && b.compareDocumentPosition( a ) === compare) ) { - - // Choose the first element that is related to our preferred document - if ( a === doc || a.ownerDocument === preferredDoc && contains(preferredDoc, a) ) { - return -1; - } - if ( b === doc || b.ownerDocument === preferredDoc && contains(preferredDoc, b) ) { - return 1; - } - - // Maintain original order - return sortInput ? - ( indexOf.call( sortInput, a ) - indexOf.call( sortInput, b ) ) : - 0; - } - - return compare & 4 ? -1 : 1; - } : - function( a, b ) { - // Exit early if the nodes are identical - if ( a === b ) { - hasDuplicate = true; - return 0; - } - - var cur, - i = 0, - aup = a.parentNode, - bup = b.parentNode, - ap = [ a ], - bp = [ b ]; - - // Parentless nodes are either documents or disconnected - if ( !aup || !bup ) { - return a === doc ? -1 : - b === doc ? 1 : - aup ? -1 : - bup ? 1 : - sortInput ? - ( indexOf.call( sortInput, a ) - indexOf.call( sortInput, b ) ) : - 0; - - // If the nodes are siblings, we can do a quick check - } else if ( aup === bup ) { - return siblingCheck( a, b ); - } - - // Otherwise we need full lists of their ancestors for comparison - cur = a; - while ( (cur = cur.parentNode) ) { - ap.unshift( cur ); - } - cur = b; - while ( (cur = cur.parentNode) ) { - bp.unshift( cur ); - } - - // Walk down the tree looking for a discrepancy - while ( ap[i] === bp[i] ) { - i++; - } - - return i ? - // Do a sibling check if the nodes have a common ancestor - siblingCheck( ap[i], bp[i] ) : - - // Otherwise nodes in our document sort first - ap[i] === preferredDoc ? -1 : - bp[i] === preferredDoc ? 1 : - 0; - }; - - return doc; -}; - -Sizzle.matches = function( expr, elements ) { - return Sizzle( expr, null, null, elements ); -}; - -Sizzle.matchesSelector = function( elem, expr ) { - // Set document vars if needed - if ( ( elem.ownerDocument || elem ) !== document ) { - setDocument( elem ); - } - - // Make sure that attribute selectors are quoted - expr = expr.replace( rattributeQuotes, "='$1']" ); - - if ( support.matchesSelector && documentIsHTML && - ( !rbuggyMatches || !rbuggyMatches.test( expr ) ) && - ( !rbuggyQSA || !rbuggyQSA.test( expr ) ) ) { - - try { - var ret = matches.call( elem, expr ); - - // IE 9's matchesSelector returns false on disconnected nodes - if ( ret || support.disconnectedMatch || - // As well, disconnected nodes are said to be in a document - // fragment in IE 9 - elem.document && elem.document.nodeType !== 11 ) { - return ret; - } - } catch(e) {} - } - - return Sizzle( expr, document, null, [ elem ] ).length > 0; -}; - -Sizzle.contains = function( context, elem ) { - // Set document vars if needed - if ( ( context.ownerDocument || context ) !== document ) { - setDocument( context ); - } - return contains( context, elem ); -}; - -Sizzle.attr = function( elem, name ) { - // Set document vars if needed - if ( ( elem.ownerDocument || elem ) !== document ) { - setDocument( elem ); - } - - var fn = Expr.attrHandle[ name.toLowerCase() ], - // Don't get fooled by Object.prototype properties (jQuery #13807) - val = fn && hasOwn.call( Expr.attrHandle, name.toLowerCase() ) ? - fn( elem, name, !documentIsHTML ) : - undefined; - - return val !== undefined ? - val : - support.attributes || !documentIsHTML ? - elem.getAttribute( name ) : - (val = elem.getAttributeNode(name)) && val.specified ? - val.value : - null; -}; - -Sizzle.error = function( msg ) { - throw new Error( "Syntax error, unrecognized expression: " + msg ); -}; - -/** - * Document sorting and removing duplicates - * @param {ArrayLike} results - */ -Sizzle.uniqueSort = function( results ) { - var elem, - duplicates = [], - j = 0, - i = 0; - - // Unless we *know* we can detect duplicates, assume their presence - hasDuplicate = !support.detectDuplicates; - sortInput = !support.sortStable && results.slice( 0 ); - results.sort( sortOrder ); - - if ( hasDuplicate ) { - while ( (elem = results[i++]) ) { - if ( elem === results[ i ] ) { - j = duplicates.push( i ); - } - } - while ( j-- ) { - results.splice( duplicates[ j ], 1 ); - } - } - - // Clear input after sorting to release objects - // See https://github.com/jquery/sizzle/pull/225 - sortInput = null; - - return results; -}; - -/** - * Utility function for retrieving the text value of an array of DOM nodes - * @param {Array|Element} elem - */ -getText = Sizzle.getText = function( elem ) { - var node, - ret = "", - i = 0, - nodeType = elem.nodeType; - - if ( !nodeType ) { - // If no nodeType, this is expected to be an array - while ( (node = elem[i++]) ) { - // Do not traverse comment nodes - ret += getText( node ); - } - } else if ( nodeType === 1 || nodeType === 9 || nodeType === 11 ) { - // Use textContent for elements - // innerText usage removed for consistency of new lines (jQuery #11153) - if ( typeof elem.textContent === "string" ) { - return elem.textContent; - } else { - // Traverse its children - for ( elem = elem.firstChild; elem; elem = elem.nextSibling ) { - ret += getText( elem ); - } - } - } else if ( nodeType === 3 || nodeType === 4 ) { - return elem.nodeValue; - } - // Do not include comment or processing instruction nodes - - return ret; -}; - -Expr = Sizzle.selectors = { - - // Can be adjusted by the user - cacheLength: 50, - - createPseudo: markFunction, - - match: matchExpr, - - attrHandle: {}, - - find: {}, - - relative: { - ">": { dir: "parentNode", first: true }, - " ": { dir: "parentNode" }, - "+": { dir: "previousSibling", first: true }, - "~": { dir: "previousSibling" } - }, - - preFilter: { - "ATTR": function( match ) { - match[1] = match[1].replace( runescape, funescape ); - - // Move the given value to match[3] whether quoted or unquoted - match[3] = ( match[3] || match[4] || match[5] || "" ).replace( runescape, funescape ); - - if ( match[2] === "~=" ) { - match[3] = " " + match[3] + " "; - } - - return match.slice( 0, 4 ); - }, - - "CHILD": function( match ) { - /* matches from matchExpr["CHILD"] - 1 type (only|nth|...) - 2 what (child|of-type) - 3 argument (even|odd|\d*|\d*n([+-]\d+)?|...) - 4 xn-component of xn+y argument ([+-]?\d*n|) - 5 sign of xn-component - 6 x of xn-component - 7 sign of y-component - 8 y of y-component - */ - match[1] = match[1].toLowerCase(); - - if ( match[1].slice( 0, 3 ) === "nth" ) { - // nth-* requires argument - if ( !match[3] ) { - Sizzle.error( match[0] ); - } - - // numeric x and y parameters for Expr.filter.CHILD - // remember that false/true cast respectively to 0/1 - match[4] = +( match[4] ? match[5] + (match[6] || 1) : 2 * ( match[3] === "even" || match[3] === "odd" ) ); - match[5] = +( ( match[7] + match[8] ) || match[3] === "odd" ); - - // other types prohibit arguments - } else if ( match[3] ) { - Sizzle.error( match[0] ); - } - - return match; - }, - - "PSEUDO": function( match ) { - var excess, - unquoted = !match[6] && match[2]; - - if ( matchExpr["CHILD"].test( match[0] ) ) { - return null; - } - - // Accept quoted arguments as-is - if ( match[3] ) { - match[2] = match[4] || match[5] || ""; - - // Strip excess characters from unquoted arguments - } else if ( unquoted && rpseudo.test( unquoted ) && - // Get excess from tokenize (recursively) - (excess = tokenize( unquoted, true )) && - // advance to the next closing parenthesis - (excess = unquoted.indexOf( ")", unquoted.length - excess ) - unquoted.length) ) { - - // excess is a negative index - match[0] = match[0].slice( 0, excess ); - match[2] = unquoted.slice( 0, excess ); - } - - // Return only captures needed by the pseudo filter method (type and argument) - return match.slice( 0, 3 ); - } - }, - - filter: { - - "TAG": function( nodeNameSelector ) { - var nodeName = nodeNameSelector.replace( runescape, funescape ).toLowerCase(); - return nodeNameSelector === "*" ? - function() { return true; } : - function( elem ) { - return elem.nodeName && elem.nodeName.toLowerCase() === nodeName; - }; - }, - - "CLASS": function( className ) { - var pattern = classCache[ className + " " ]; - - return pattern || - (pattern = new RegExp( "(^|" + whitespace + ")" + className + "(" + whitespace + "|$)" )) && - classCache( className, function( elem ) { - return pattern.test( typeof elem.className === "string" && elem.className || typeof elem.getAttribute !== strundefined && elem.getAttribute("class") || "" ); - }); - }, - - "ATTR": function( name, operator, check ) { - return function( elem ) { - var result = Sizzle.attr( elem, name ); - - if ( result == null ) { - return operator === "!="; - } - if ( !operator ) { - return true; - } - - result += ""; - - return operator === "=" ? result === check : - operator === "!=" ? result !== check : - operator === "^=" ? check && result.indexOf( check ) === 0 : - operator === "*=" ? check && result.indexOf( check ) > -1 : - operator === "$=" ? check && result.slice( -check.length ) === check : - operator === "~=" ? ( " " + result + " " ).indexOf( check ) > -1 : - operator === "|=" ? result === check || result.slice( 0, check.length + 1 ) === check + "-" : - false; - }; - }, - - "CHILD": function( type, what, argument, first, last ) { - var simple = type.slice( 0, 3 ) !== "nth", - forward = type.slice( -4 ) !== "last", - ofType = what === "of-type"; - - return first === 1 && last === 0 ? - - // Shortcut for :nth-*(n) - function( elem ) { - return !!elem.parentNode; - } : - - function( elem, context, xml ) { - var cache, outerCache, node, diff, nodeIndex, start, - dir = simple !== forward ? "nextSibling" : "previousSibling", - parent = elem.parentNode, - name = ofType && elem.nodeName.toLowerCase(), - useCache = !xml && !ofType; - - if ( parent ) { - - // :(first|last|only)-(child|of-type) - if ( simple ) { - while ( dir ) { - node = elem; - while ( (node = node[ dir ]) ) { - if ( ofType ? node.nodeName.toLowerCase() === name : node.nodeType === 1 ) { - return false; - } - } - // Reverse direction for :only-* (if we haven't yet done so) - start = dir = type === "only" && !start && "nextSibling"; - } - return true; - } - - start = [ forward ? parent.firstChild : parent.lastChild ]; - - // non-xml :nth-child(...) stores cache data on `parent` - if ( forward && useCache ) { - // Seek `elem` from a previously-cached index - outerCache = parent[ expando ] || (parent[ expando ] = {}); - cache = outerCache[ type ] || []; - nodeIndex = cache[0] === dirruns && cache[1]; - diff = cache[0] === dirruns && cache[2]; - node = nodeIndex && parent.childNodes[ nodeIndex ]; - - while ( (node = ++nodeIndex && node && node[ dir ] || - - // Fallback to seeking `elem` from the start - (diff = nodeIndex = 0) || start.pop()) ) { - - // When found, cache indexes on `parent` and break - if ( node.nodeType === 1 && ++diff && node === elem ) { - outerCache[ type ] = [ dirruns, nodeIndex, diff ]; - break; - } - } - - // Use previously-cached element index if available - } else if ( useCache && (cache = (elem[ expando ] || (elem[ expando ] = {}))[ type ]) && cache[0] === dirruns ) { - diff = cache[1]; - - // xml :nth-child(...) or :nth-last-child(...) or :nth(-last)?-of-type(...) - } else { - // Use the same loop as above to seek `elem` from the start - while ( (node = ++nodeIndex && node && node[ dir ] || - (diff = nodeIndex = 0) || start.pop()) ) { - - if ( ( ofType ? node.nodeName.toLowerCase() === name : node.nodeType === 1 ) && ++diff ) { - // Cache the index of each encountered element - if ( useCache ) { - (node[ expando ] || (node[ expando ] = {}))[ type ] = [ dirruns, diff ]; - } - - if ( node === elem ) { - break; - } - } - } - } - - // Incorporate the offset, then check against cycle size - diff -= last; - return diff === first || ( diff % first === 0 && diff / first >= 0 ); - } - }; - }, - - "PSEUDO": function( pseudo, argument ) { - // pseudo-class names are case-insensitive - // http://www.w3.org/TR/selectors/#pseudo-classes - // Prioritize by case sensitivity in case custom pseudos are added with uppercase letters - // Remember that setFilters inherits from pseudos - var args, - fn = Expr.pseudos[ pseudo ] || Expr.setFilters[ pseudo.toLowerCase() ] || - Sizzle.error( "unsupported pseudo: " + pseudo ); - - // The user may use createPseudo to indicate that - // arguments are needed to create the filter function - // just as Sizzle does - if ( fn[ expando ] ) { - return fn( argument ); - } - - // But maintain support for old signatures - if ( fn.length > 1 ) { - args = [ pseudo, pseudo, "", argument ]; - return Expr.setFilters.hasOwnProperty( pseudo.toLowerCase() ) ? - markFunction(function( seed, matches ) { - var idx, - matched = fn( seed, argument ), - i = matched.length; - while ( i-- ) { - idx = indexOf.call( seed, matched[i] ); - seed[ idx ] = !( matches[ idx ] = matched[i] ); - } - }) : - function( elem ) { - return fn( elem, 0, args ); - }; - } - - return fn; - } - }, - - pseudos: { - // Potentially complex pseudos - "not": markFunction(function( selector ) { - // Trim the selector passed to compile - // to avoid treating leading and trailing - // spaces as combinators - var input = [], - results = [], - matcher = compile( selector.replace( rtrim, "$1" ) ); - - return matcher[ expando ] ? - markFunction(function( seed, matches, context, xml ) { - var elem, - unmatched = matcher( seed, null, xml, [] ), - i = seed.length; - - // Match elements unmatched by `matcher` - while ( i-- ) { - if ( (elem = unmatched[i]) ) { - seed[i] = !(matches[i] = elem); - } - } - }) : - function( elem, context, xml ) { - input[0] = elem; - matcher( input, null, xml, results ); - return !results.pop(); - }; - }), - - "has": markFunction(function( selector ) { - return function( elem ) { - return Sizzle( selector, elem ).length > 0; - }; - }), - - "contains": markFunction(function( text ) { - return function( elem ) { - return ( elem.textContent || elem.innerText || getText( elem ) ).indexOf( text ) > -1; - }; - }), - - // "Whether an element is represented by a :lang() selector - // is based solely on the element's language value - // being equal to the identifier C, - // or beginning with the identifier C immediately followed by "-". - // The matching of C against the element's language value is performed case-insensitively. - // The identifier C does not have to be a valid language name." - // http://www.w3.org/TR/selectors/#lang-pseudo - "lang": markFunction( function( lang ) { - // lang value must be a valid identifier - if ( !ridentifier.test(lang || "") ) { - Sizzle.error( "unsupported lang: " + lang ); - } - lang = lang.replace( runescape, funescape ).toLowerCase(); - return function( elem ) { - var elemLang; - do { - if ( (elemLang = documentIsHTML ? - elem.lang : - elem.getAttribute("xml:lang") || elem.getAttribute("lang")) ) { - - elemLang = elemLang.toLowerCase(); - return elemLang === lang || elemLang.indexOf( lang + "-" ) === 0; - } - } while ( (elem = elem.parentNode) && elem.nodeType === 1 ); - return false; - }; - }), - - // Miscellaneous - "target": function( elem ) { - var hash = window.location && window.location.hash; - return hash && hash.slice( 1 ) === elem.id; - }, - - "root": function( elem ) { - return elem === docElem; - }, - - "focus": function( elem ) { - return elem === document.activeElement && (!document.hasFocus || document.hasFocus()) && !!(elem.type || elem.href || ~elem.tabIndex); - }, - - // Boolean properties - "enabled": function( elem ) { - return elem.disabled === false; - }, - - "disabled": function( elem ) { - return elem.disabled === true; - }, - - "checked": function( elem ) { - // In CSS3, :checked should return both checked and selected elements - // http://www.w3.org/TR/2011/REC-css3-selectors-20110929/#checked - var nodeName = elem.nodeName.toLowerCase(); - return (nodeName === "input" && !!elem.checked) || (nodeName === "option" && !!elem.selected); - }, - - "selected": function( elem ) { - // Accessing this property makes selected-by-default - // options in Safari work properly - if ( elem.parentNode ) { - elem.parentNode.selectedIndex; - } - - return elem.selected === true; - }, - - // Contents - "empty": function( elem ) { - // http://www.w3.org/TR/selectors/#empty-pseudo - // :empty is negated by element (1) or content nodes (text: 3; cdata: 4; entity ref: 5), - // but not by others (comment: 8; processing instruction: 7; etc.) - // nodeType < 6 works because attributes (2) do not appear as children - for ( elem = elem.firstChild; elem; elem = elem.nextSibling ) { - if ( elem.nodeType < 6 ) { - return false; - } - } - return true; - }, - - "parent": function( elem ) { - return !Expr.pseudos["empty"]( elem ); - }, - - // Element/input types - "header": function( elem ) { - return rheader.test( elem.nodeName ); - }, - - "input": function( elem ) { - return rinputs.test( elem.nodeName ); - }, - - "button": function( elem ) { - var name = elem.nodeName.toLowerCase(); - return name === "input" && elem.type === "button" || name === "button"; - }, - - "text": function( elem ) { - var attr; - return elem.nodeName.toLowerCase() === "input" && - elem.type === "text" && - - // Support: IE<8 - // New HTML5 attribute values (e.g., "search") appear with elem.type === "text" - ( (attr = elem.getAttribute("type")) == null || attr.toLowerCase() === "text" ); - }, - - // Position-in-collection - "first": createPositionalPseudo(function() { - return [ 0 ]; - }), - - "last": createPositionalPseudo(function( matchIndexes, length ) { - return [ length - 1 ]; - }), - - "eq": createPositionalPseudo(function( matchIndexes, length, argument ) { - return [ argument < 0 ? argument + length : argument ]; - }), - - "even": createPositionalPseudo(function( matchIndexes, length ) { - var i = 0; - for ( ; i < length; i += 2 ) { - matchIndexes.push( i ); - } - return matchIndexes; - }), - - "odd": createPositionalPseudo(function( matchIndexes, length ) { - var i = 1; - for ( ; i < length; i += 2 ) { - matchIndexes.push( i ); - } - return matchIndexes; - }), - - "lt": createPositionalPseudo(function( matchIndexes, length, argument ) { - var i = argument < 0 ? argument + length : argument; - for ( ; --i >= 0; ) { - matchIndexes.push( i ); - } - return matchIndexes; - }), - - "gt": createPositionalPseudo(function( matchIndexes, length, argument ) { - var i = argument < 0 ? argument + length : argument; - for ( ; ++i < length; ) { - matchIndexes.push( i ); - } - return matchIndexes; - }) - } -}; - -Expr.pseudos["nth"] = Expr.pseudos["eq"]; - -// Add button/input type pseudos -for ( i in { radio: true, checkbox: true, file: true, password: true, image: true } ) { - Expr.pseudos[ i ] = createInputPseudo( i ); -} -for ( i in { submit: true, reset: true } ) { - Expr.pseudos[ i ] = createButtonPseudo( i ); -} - -// Easy API for creating new setFilters -function setFilters() {} -setFilters.prototype = Expr.filters = Expr.pseudos; -Expr.setFilters = new setFilters(); - -tokenize = Sizzle.tokenize = function( selector, parseOnly ) { - var matched, match, tokens, type, - soFar, groups, preFilters, - cached = tokenCache[ selector + " " ]; - - if ( cached ) { - return parseOnly ? 0 : cached.slice( 0 ); - } - - soFar = selector; - groups = []; - preFilters = Expr.preFilter; - - while ( soFar ) { - - // Comma and first run - if ( !matched || (match = rcomma.exec( soFar )) ) { - if ( match ) { - // Don't consume trailing commas as valid - soFar = soFar.slice( match[0].length ) || soFar; - } - groups.push( (tokens = []) ); - } - - matched = false; - - // Combinators - if ( (match = rcombinators.exec( soFar )) ) { - matched = match.shift(); - tokens.push({ - value: matched, - // Cast descendant combinators to space - type: match[0].replace( rtrim, " " ) - }); - soFar = soFar.slice( matched.length ); - } - - // Filters - for ( type in Expr.filter ) { - if ( (match = matchExpr[ type ].exec( soFar )) && (!preFilters[ type ] || - (match = preFilters[ type ]( match ))) ) { - matched = match.shift(); - tokens.push({ - value: matched, - type: type, - matches: match - }); - soFar = soFar.slice( matched.length ); - } - } - - if ( !matched ) { - break; - } - } - - // Return the length of the invalid excess - // if we're just parsing - // Otherwise, throw an error or return tokens - return parseOnly ? - soFar.length : - soFar ? - Sizzle.error( selector ) : - // Cache the tokens - tokenCache( selector, groups ).slice( 0 ); -}; - -function toSelector( tokens ) { - var i = 0, - len = tokens.length, - selector = ""; - for ( ; i < len; i++ ) { - selector += tokens[i].value; - } - return selector; -} - -function addCombinator( matcher, combinator, base ) { - var dir = combinator.dir, - checkNonElements = base && dir === "parentNode", - doneName = done++; - - return combinator.first ? - // Check against closest ancestor/preceding element - function( elem, context, xml ) { - while ( (elem = elem[ dir ]) ) { - if ( elem.nodeType === 1 || checkNonElements ) { - return matcher( elem, context, xml ); - } - } - } : - - // Check against all ancestor/preceding elements - function( elem, context, xml ) { - var oldCache, outerCache, - newCache = [ dirruns, doneName ]; - - // We can't set arbitrary data on XML nodes, so they don't benefit from dir caching - if ( xml ) { - while ( (elem = elem[ dir ]) ) { - if ( elem.nodeType === 1 || checkNonElements ) { - if ( matcher( elem, context, xml ) ) { - return true; - } - } - } - } else { - while ( (elem = elem[ dir ]) ) { - if ( elem.nodeType === 1 || checkNonElements ) { - outerCache = elem[ expando ] || (elem[ expando ] = {}); - if ( (oldCache = outerCache[ dir ]) && - oldCache[ 0 ] === dirruns && oldCache[ 1 ] === doneName ) { - - // Assign to newCache so results back-propagate to previous elements - return (newCache[ 2 ] = oldCache[ 2 ]); - } else { - // Reuse newcache so results back-propagate to previous elements - outerCache[ dir ] = newCache; - - // A match means we're done; a fail means we have to keep checking - if ( (newCache[ 2 ] = matcher( elem, context, xml )) ) { - return true; - } - } - } - } - } - }; -} - -function elementMatcher( matchers ) { - return matchers.length > 1 ? - function( elem, context, xml ) { - var i = matchers.length; - while ( i-- ) { - if ( !matchers[i]( elem, context, xml ) ) { - return false; - } - } - return true; - } : - matchers[0]; -} - -function multipleContexts( selector, contexts, results ) { - var i = 0, - len = contexts.length; - for ( ; i < len; i++ ) { - Sizzle( selector, contexts[i], results ); - } - return results; -} - -function condense( unmatched, map, filter, context, xml ) { - var elem, - newUnmatched = [], - i = 0, - len = unmatched.length, - mapped = map != null; - - for ( ; i < len; i++ ) { - if ( (elem = unmatched[i]) ) { - if ( !filter || filter( elem, context, xml ) ) { - newUnmatched.push( elem ); - if ( mapped ) { - map.push( i ); - } - } - } - } - - return newUnmatched; -} - -function setMatcher( preFilter, selector, matcher, postFilter, postFinder, postSelector ) { - if ( postFilter && !postFilter[ expando ] ) { - postFilter = setMatcher( postFilter ); - } - if ( postFinder && !postFinder[ expando ] ) { - postFinder = setMatcher( postFinder, postSelector ); - } - return markFunction(function( seed, results, context, xml ) { - var temp, i, elem, - preMap = [], - postMap = [], - preexisting = results.length, - - // Get initial elements from seed or context - elems = seed || multipleContexts( selector || "*", context.nodeType ? [ context ] : context, [] ), - - // Prefilter to get matcher input, preserving a map for seed-results synchronization - matcherIn = preFilter && ( seed || !selector ) ? - condense( elems, preMap, preFilter, context, xml ) : - elems, - - matcherOut = matcher ? - // If we have a postFinder, or filtered seed, or non-seed postFilter or preexisting results, - postFinder || ( seed ? preFilter : preexisting || postFilter ) ? - - // ...intermediate processing is necessary - [] : - - // ...otherwise use results directly - results : - matcherIn; - - // Find primary matches - if ( matcher ) { - matcher( matcherIn, matcherOut, context, xml ); - } - - // Apply postFilter - if ( postFilter ) { - temp = condense( matcherOut, postMap ); - postFilter( temp, [], context, xml ); - - // Un-match failing elements by moving them back to matcherIn - i = temp.length; - while ( i-- ) { - if ( (elem = temp[i]) ) { - matcherOut[ postMap[i] ] = !(matcherIn[ postMap[i] ] = elem); - } - } - } - - if ( seed ) { - if ( postFinder || preFilter ) { - if ( postFinder ) { - // Get the final matcherOut by condensing this intermediate into postFinder contexts - temp = []; - i = matcherOut.length; - while ( i-- ) { - if ( (elem = matcherOut[i]) ) { - // Restore matcherIn since elem is not yet a final match - temp.push( (matcherIn[i] = elem) ); - } - } - postFinder( null, (matcherOut = []), temp, xml ); - } - - // Move matched elements from seed to results to keep them synchronized - i = matcherOut.length; - while ( i-- ) { - if ( (elem = matcherOut[i]) && - (temp = postFinder ? indexOf.call( seed, elem ) : preMap[i]) > -1 ) { - - seed[temp] = !(results[temp] = elem); - } - } - } - - // Add elements to results, through postFinder if defined - } else { - matcherOut = condense( - matcherOut === results ? - matcherOut.splice( preexisting, matcherOut.length ) : - matcherOut - ); - if ( postFinder ) { - postFinder( null, results, matcherOut, xml ); - } else { - push.apply( results, matcherOut ); - } - } - }); -} - -function matcherFromTokens( tokens ) { - var checkContext, matcher, j, - len = tokens.length, - leadingRelative = Expr.relative[ tokens[0].type ], - implicitRelative = leadingRelative || Expr.relative[" "], - i = leadingRelative ? 1 : 0, - - // The foundational matcher ensures that elements are reachable from top-level context(s) - matchContext = addCombinator( function( elem ) { - return elem === checkContext; - }, implicitRelative, true ), - matchAnyContext = addCombinator( function( elem ) { - return indexOf.call( checkContext, elem ) > -1; - }, implicitRelative, true ), - matchers = [ function( elem, context, xml ) { - return ( !leadingRelative && ( xml || context !== outermostContext ) ) || ( - (checkContext = context).nodeType ? - matchContext( elem, context, xml ) : - matchAnyContext( elem, context, xml ) ); - } ]; - - for ( ; i < len; i++ ) { - if ( (matcher = Expr.relative[ tokens[i].type ]) ) { - matchers = [ addCombinator(elementMatcher( matchers ), matcher) ]; - } else { - matcher = Expr.filter[ tokens[i].type ].apply( null, tokens[i].matches ); - - // Return special upon seeing a positional matcher - if ( matcher[ expando ] ) { - // Find the next relative operator (if any) for proper handling - j = ++i; - for ( ; j < len; j++ ) { - if ( Expr.relative[ tokens[j].type ] ) { - break; - } - } - return setMatcher( - i > 1 && elementMatcher( matchers ), - i > 1 && toSelector( - // If the preceding token was a descendant combinator, insert an implicit any-element `*` - tokens.slice( 0, i - 1 ).concat({ value: tokens[ i - 2 ].type === " " ? "*" : "" }) - ).replace( rtrim, "$1" ), - matcher, - i < j && matcherFromTokens( tokens.slice( i, j ) ), - j < len && matcherFromTokens( (tokens = tokens.slice( j )) ), - j < len && toSelector( tokens ) - ); - } - matchers.push( matcher ); - } - } - - return elementMatcher( matchers ); -} - -function matcherFromGroupMatchers( elementMatchers, setMatchers ) { - var bySet = setMatchers.length > 0, - byElement = elementMatchers.length > 0, - superMatcher = function( seed, context, xml, results, outermost ) { - var elem, j, matcher, - matchedCount = 0, - i = "0", - unmatched = seed && [], - setMatched = [], - contextBackup = outermostContext, - // We must always have either seed elements or outermost context - elems = seed || byElement && Expr.find["TAG"]( "*", outermost ), - // Use integer dirruns iff this is the outermost matcher - dirrunsUnique = (dirruns += contextBackup == null ? 1 : Math.random() || 0.1), - len = elems.length; - - if ( outermost ) { - outermostContext = context !== document && context; - } - - // Add elements passing elementMatchers directly to results - // Keep `i` a string if there are no elements so `matchedCount` will be "00" below - // Support: IE<9, Safari - // Tolerate NodeList properties (IE: "length"; Safari: ) matching elements by id - for ( ; i !== len && (elem = elems[i]) != null; i++ ) { - if ( byElement && elem ) { - j = 0; - while ( (matcher = elementMatchers[j++]) ) { - if ( matcher( elem, context, xml ) ) { - results.push( elem ); - break; - } - } - if ( outermost ) { - dirruns = dirrunsUnique; - } - } - - // Track unmatched elements for set filters - if ( bySet ) { - // They will have gone through all possible matchers - if ( (elem = !matcher && elem) ) { - matchedCount--; - } - - // Lengthen the array for every element, matched or not - if ( seed ) { - unmatched.push( elem ); - } - } - } - - // Apply set filters to unmatched elements - matchedCount += i; - if ( bySet && i !== matchedCount ) { - j = 0; - while ( (matcher = setMatchers[j++]) ) { - matcher( unmatched, setMatched, context, xml ); - } - - if ( seed ) { - // Reintegrate element matches to eliminate the need for sorting - if ( matchedCount > 0 ) { - while ( i-- ) { - if ( !(unmatched[i] || setMatched[i]) ) { - setMatched[i] = pop.call( results ); - } - } - } - - // Discard index placeholder values to get only actual matches - setMatched = condense( setMatched ); - } - - // Add matches to results - push.apply( results, setMatched ); - - // Seedless set matches succeeding multiple successful matchers stipulate sorting - if ( outermost && !seed && setMatched.length > 0 && - ( matchedCount + setMatchers.length ) > 1 ) { - - Sizzle.uniqueSort( results ); - } - } - - // Override manipulation of globals by nested matchers - if ( outermost ) { - dirruns = dirrunsUnique; - outermostContext = contextBackup; - } - - return unmatched; - }; - - return bySet ? - markFunction( superMatcher ) : - superMatcher; -} - -compile = Sizzle.compile = function( selector, match /* Internal Use Only */ ) { - var i, - setMatchers = [], - elementMatchers = [], - cached = compilerCache[ selector + " " ]; - - if ( !cached ) { - // Generate a function of recursive functions that can be used to check each element - if ( !match ) { - match = tokenize( selector ); - } - i = match.length; - while ( i-- ) { - cached = matcherFromTokens( match[i] ); - if ( cached[ expando ] ) { - setMatchers.push( cached ); - } else { - elementMatchers.push( cached ); - } - } - - // Cache the compiled function - cached = compilerCache( selector, matcherFromGroupMatchers( elementMatchers, setMatchers ) ); - - // Save selector and tokenization - cached.selector = selector; - } - return cached; -}; - -/** - * A low-level selection function that works with Sizzle's compiled - * selector functions - * @param {String|Function} selector A selector or a pre-compiled - * selector function built with Sizzle.compile - * @param {Element} context - * @param {Array} [results] - * @param {Array} [seed] A set of elements to match against - */ -select = Sizzle.select = function( selector, context, results, seed ) { - var i, tokens, token, type, find, - compiled = typeof selector === "function" && selector, - match = !seed && tokenize( (selector = compiled.selector || selector) ); - - results = results || []; - - // Try to minimize operations if there is no seed and only one group - if ( match.length === 1 ) { - - // Take a shortcut and set the context if the root selector is an ID - tokens = match[0] = match[0].slice( 0 ); - if ( tokens.length > 2 && (token = tokens[0]).type === "ID" && - support.getById && context.nodeType === 9 && documentIsHTML && - Expr.relative[ tokens[1].type ] ) { - - context = ( Expr.find["ID"]( token.matches[0].replace(runescape, funescape), context ) || [] )[0]; - if ( !context ) { - return results; - - // Precompiled matchers will still verify ancestry, so step up a level - } else if ( compiled ) { - context = context.parentNode; - } - - selector = selector.slice( tokens.shift().value.length ); - } - - // Fetch a seed set for right-to-left matching - i = matchExpr["needsContext"].test( selector ) ? 0 : tokens.length; - while ( i-- ) { - token = tokens[i]; - - // Abort if we hit a combinator - if ( Expr.relative[ (type = token.type) ] ) { - break; - } - if ( (find = Expr.find[ type ]) ) { - // Search, expanding context for leading sibling combinators - if ( (seed = find( - token.matches[0].replace( runescape, funescape ), - rsibling.test( tokens[0].type ) && testContext( context.parentNode ) || context - )) ) { - - // If seed is empty or no tokens remain, we can return early - tokens.splice( i, 1 ); - selector = seed.length && toSelector( tokens ); - if ( !selector ) { - push.apply( results, seed ); - return results; - } - - break; - } - } - } - } - - // Compile and execute a filtering function if one is not provided - // Provide `match` to avoid retokenization if we modified the selector above - ( compiled || compile( selector, match ) )( - seed, - context, - !documentIsHTML, - results, - rsibling.test( selector ) && testContext( context.parentNode ) || context - ); - return results; -}; - -// One-time assignments - -// Sort stability -support.sortStable = expando.split("").sort( sortOrder ).join("") === expando; - -// Support: Chrome<14 -// Always assume duplicates if they aren't passed to the comparison function -support.detectDuplicates = !!hasDuplicate; - -// Initialize against the default document -setDocument(); - -// Support: Webkit<537.32 - Safari 6.0.3/Chrome 25 (fixed in Chrome 27) -// Detached nodes confoundingly follow *each other* -support.sortDetached = assert(function( div1 ) { - // Should return 1, but returns 4 (following) - return div1.compareDocumentPosition( document.createElement("div") ) & 1; -}); - -// Support: IE<8 -// Prevent attribute/property "interpolation" -// http://msdn.microsoft.com/en-us/library/ms536429%28VS.85%29.aspx -if ( !assert(function( div ) { - div.innerHTML = ""; - return div.firstChild.getAttribute("href") === "#" ; -}) ) { - addHandle( "type|href|height|width", function( elem, name, isXML ) { - if ( !isXML ) { - return elem.getAttribute( name, name.toLowerCase() === "type" ? 1 : 2 ); - } - }); -} - -// Support: IE<9 -// Use defaultValue in place of getAttribute("value") -if ( !support.attributes || !assert(function( div ) { - div.innerHTML = ""; - div.firstChild.setAttribute( "value", "" ); - return div.firstChild.getAttribute( "value" ) === ""; -}) ) { - addHandle( "value", function( elem, name, isXML ) { - if ( !isXML && elem.nodeName.toLowerCase() === "input" ) { - return elem.defaultValue; - } - }); -} - -// Support: IE<9 -// Use getAttributeNode to fetch booleans when getAttribute lies -if ( !assert(function( div ) { - return div.getAttribute("disabled") == null; -}) ) { - addHandle( booleans, function( elem, name, isXML ) { - var val; - if ( !isXML ) { - return elem[ name ] === true ? name.toLowerCase() : - (val = elem.getAttributeNode( name )) && val.specified ? - val.value : - null; - } - }); -} - -return Sizzle; - -})( window ); - - - -jQuery.find = Sizzle; -jQuery.expr = Sizzle.selectors; -jQuery.expr[":"] = jQuery.expr.pseudos; -jQuery.unique = Sizzle.uniqueSort; -jQuery.text = Sizzle.getText; -jQuery.isXMLDoc = Sizzle.isXML; -jQuery.contains = Sizzle.contains; - - - -var rneedsContext = jQuery.expr.match.needsContext; - -var rsingleTag = (/^<(\w+)\s*\/?>(?:<\/\1>|)$/); - - - -var risSimple = /^.[^:#\[\.,]*$/; - -// Implement the identical functionality for filter and not -function winnow( elements, qualifier, not ) { - if ( jQuery.isFunction( qualifier ) ) { - return jQuery.grep( elements, function( elem, i ) { - /* jshint -W018 */ - return !!qualifier.call( elem, i, elem ) !== not; - }); - - } - - if ( qualifier.nodeType ) { - return jQuery.grep( elements, function( elem ) { - return ( elem === qualifier ) !== not; - }); - - } - - if ( typeof qualifier === "string" ) { - if ( risSimple.test( qualifier ) ) { - return jQuery.filter( qualifier, elements, not ); - } - - qualifier = jQuery.filter( qualifier, elements ); - } - - return jQuery.grep( elements, function( elem ) { - return ( jQuery.inArray( elem, qualifier ) >= 0 ) !== not; - }); -} - -jQuery.filter = function( expr, elems, not ) { - var elem = elems[ 0 ]; - - if ( not ) { - expr = ":not(" + expr + ")"; - } - - return elems.length === 1 && elem.nodeType === 1 ? - jQuery.find.matchesSelector( elem, expr ) ? [ elem ] : [] : - jQuery.find.matches( expr, jQuery.grep( elems, function( elem ) { - return elem.nodeType === 1; - })); -}; - -jQuery.fn.extend({ - find: function( selector ) { - var i, - ret = [], - self = this, - len = self.length; - - if ( typeof selector !== "string" ) { - return this.pushStack( jQuery( selector ).filter(function() { - for ( i = 0; i < len; i++ ) { - if ( jQuery.contains( self[ i ], this ) ) { - return true; - } - } - }) ); - } - - for ( i = 0; i < len; i++ ) { - jQuery.find( selector, self[ i ], ret ); - } - - // Needed because $( selector, context ) becomes $( context ).find( selector ) - ret = this.pushStack( len > 1 ? jQuery.unique( ret ) : ret ); - ret.selector = this.selector ? this.selector + " " + selector : selector; - return ret; - }, - filter: function( selector ) { - return this.pushStack( winnow(this, selector || [], false) ); - }, - not: function( selector ) { - return this.pushStack( winnow(this, selector || [], true) ); - }, - is: function( selector ) { - return !!winnow( - this, - - // If this is a positional/relative selector, check membership in the returned set - // so $("p:first").is("p:last") won't return true for a doc with two "p". - typeof selector === "string" && rneedsContext.test( selector ) ? - jQuery( selector ) : - selector || [], - false - ).length; - } -}); - - -// Initialize a jQuery object - - -// A central reference to the root jQuery(document) -var rootjQuery, - - // Use the correct document accordingly with window argument (sandbox) - document = window.document, - - // A simple way to check for HTML strings - // Prioritize #id over to avoid XSS via location.hash (#9521) - // Strict HTML recognition (#11290: must start with <) - rquickExpr = /^(?:\s*(<[\w\W]+>)[^>]*|#([\w-]*))$/, - - init = jQuery.fn.init = function( selector, context ) { - var match, elem; - - // HANDLE: $(""), $(null), $(undefined), $(false) - if ( !selector ) { - return this; - } - - // Handle HTML strings - if ( typeof selector === "string" ) { - if ( selector.charAt(0) === "<" && selector.charAt( selector.length - 1 ) === ">" && selector.length >= 3 ) { - // Assume that strings that start and end with <> are HTML and skip the regex check - match = [ null, selector, null ]; - - } else { - match = rquickExpr.exec( selector ); - } - - // Match html or make sure no context is specified for #id - if ( match && (match[1] || !context) ) { - - // HANDLE: $(html) -> $(array) - if ( match[1] ) { - context = context instanceof jQuery ? context[0] : context; - - // scripts is true for back-compat - // Intentionally let the error be thrown if parseHTML is not present - jQuery.merge( this, jQuery.parseHTML( - match[1], - context && context.nodeType ? context.ownerDocument || context : document, - true - ) ); - - // HANDLE: $(html, props) - if ( rsingleTag.test( match[1] ) && jQuery.isPlainObject( context ) ) { - for ( match in context ) { - // Properties of context are called as methods if possible - if ( jQuery.isFunction( this[ match ] ) ) { - this[ match ]( context[ match ] ); - - // ...and otherwise set as attributes - } else { - this.attr( match, context[ match ] ); - } - } - } - - return this; - - // HANDLE: $(#id) - } else { - elem = document.getElementById( match[2] ); - - // Check parentNode to catch when Blackberry 4.6 returns - // nodes that are no longer in the document #6963 - if ( elem && elem.parentNode ) { - // Handle the case where IE and Opera return items - // by name instead of ID - if ( elem.id !== match[2] ) { - return rootjQuery.find( selector ); - } - - // Otherwise, we inject the element directly into the jQuery object - this.length = 1; - this[0] = elem; - } - - this.context = document; - this.selector = selector; - return this; - } - - // HANDLE: $(expr, $(...)) - } else if ( !context || context.jquery ) { - return ( context || rootjQuery ).find( selector ); - - // HANDLE: $(expr, context) - // (which is just equivalent to: $(context).find(expr) - } else { - return this.constructor( context ).find( selector ); - } - - // HANDLE: $(DOMElement) - } else if ( selector.nodeType ) { - this.context = this[0] = selector; - this.length = 1; - return this; - - // HANDLE: $(function) - // Shortcut for document ready - } else if ( jQuery.isFunction( selector ) ) { - return typeof rootjQuery.ready !== "undefined" ? - rootjQuery.ready( selector ) : - // Execute immediately if ready is not present - selector( jQuery ); - } - - if ( selector.selector !== undefined ) { - this.selector = selector.selector; - this.context = selector.context; - } - - return jQuery.makeArray( selector, this ); - }; - -// Give the init function the jQuery prototype for later instantiation -init.prototype = jQuery.fn; - -// Initialize central reference -rootjQuery = jQuery( document ); - - -var rparentsprev = /^(?:parents|prev(?:Until|All))/, - // methods guaranteed to produce a unique set when starting from a unique set - guaranteedUnique = { - children: true, - contents: true, - next: true, - prev: true - }; - -jQuery.extend({ - dir: function( elem, dir, until ) { - var matched = [], - cur = elem[ dir ]; - - while ( cur && cur.nodeType !== 9 && (until === undefined || cur.nodeType !== 1 || !jQuery( cur ).is( until )) ) { - if ( cur.nodeType === 1 ) { - matched.push( cur ); - } - cur = cur[dir]; - } - return matched; - }, - - sibling: function( n, elem ) { - var r = []; - - for ( ; n; n = n.nextSibling ) { - if ( n.nodeType === 1 && n !== elem ) { - r.push( n ); - } - } - - return r; - } -}); - -jQuery.fn.extend({ - has: function( target ) { - var i, - targets = jQuery( target, this ), - len = targets.length; - - return this.filter(function() { - for ( i = 0; i < len; i++ ) { - if ( jQuery.contains( this, targets[i] ) ) { - return true; - } - } - }); - }, - - closest: function( selectors, context ) { - var cur, - i = 0, - l = this.length, - matched = [], - pos = rneedsContext.test( selectors ) || typeof selectors !== "string" ? - jQuery( selectors, context || this.context ) : - 0; - - for ( ; i < l; i++ ) { - for ( cur = this[i]; cur && cur !== context; cur = cur.parentNode ) { - // Always skip document fragments - if ( cur.nodeType < 11 && (pos ? - pos.index(cur) > -1 : - - // Don't pass non-elements to Sizzle - cur.nodeType === 1 && - jQuery.find.matchesSelector(cur, selectors)) ) { - - matched.push( cur ); - break; - } - } - } - - return this.pushStack( matched.length > 1 ? jQuery.unique( matched ) : matched ); - }, - - // Determine the position of an element within - // the matched set of elements - index: function( elem ) { - - // No argument, return index in parent - if ( !elem ) { - return ( this[0] && this[0].parentNode ) ? this.first().prevAll().length : -1; - } - - // index in selector - if ( typeof elem === "string" ) { - return jQuery.inArray( this[0], jQuery( elem ) ); - } - - // Locate the position of the desired element - return jQuery.inArray( - // If it receives a jQuery object, the first element is used - elem.jquery ? elem[0] : elem, this ); - }, - - add: function( selector, context ) { - return this.pushStack( - jQuery.unique( - jQuery.merge( this.get(), jQuery( selector, context ) ) - ) - ); - }, - - addBack: function( selector ) { - return this.add( selector == null ? - this.prevObject : this.prevObject.filter(selector) - ); - } -}); - -function sibling( cur, dir ) { - do { - cur = cur[ dir ]; - } while ( cur && cur.nodeType !== 1 ); - - return cur; -} - -jQuery.each({ - parent: function( elem ) { - var parent = elem.parentNode; - return parent && parent.nodeType !== 11 ? parent : null; - }, - parents: function( elem ) { - return jQuery.dir( elem, "parentNode" ); - }, - parentsUntil: function( elem, i, until ) { - return jQuery.dir( elem, "parentNode", until ); - }, - next: function( elem ) { - return sibling( elem, "nextSibling" ); - }, - prev: function( elem ) { - return sibling( elem, "previousSibling" ); - }, - nextAll: function( elem ) { - return jQuery.dir( elem, "nextSibling" ); - }, - prevAll: function( elem ) { - return jQuery.dir( elem, "previousSibling" ); - }, - nextUntil: function( elem, i, until ) { - return jQuery.dir( elem, "nextSibling", until ); - }, - prevUntil: function( elem, i, until ) { - return jQuery.dir( elem, "previousSibling", until ); - }, - siblings: function( elem ) { - return jQuery.sibling( ( elem.parentNode || {} ).firstChild, elem ); - }, - children: function( elem ) { - return jQuery.sibling( elem.firstChild ); - }, - contents: function( elem ) { - return jQuery.nodeName( elem, "iframe" ) ? - elem.contentDocument || elem.contentWindow.document : - jQuery.merge( [], elem.childNodes ); - } -}, function( name, fn ) { - jQuery.fn[ name ] = function( until, selector ) { - var ret = jQuery.map( this, fn, until ); - - if ( name.slice( -5 ) !== "Until" ) { - selector = until; - } - - if ( selector && typeof selector === "string" ) { - ret = jQuery.filter( selector, ret ); - } - - if ( this.length > 1 ) { - // Remove duplicates - if ( !guaranteedUnique[ name ] ) { - ret = jQuery.unique( ret ); - } - - // Reverse order for parents* and prev-derivatives - if ( rparentsprev.test( name ) ) { - ret = ret.reverse(); - } - } - - return this.pushStack( ret ); - }; -}); -var rnotwhite = (/\S+/g); - - - -// String to Object options format cache -var optionsCache = {}; - -// Convert String-formatted options into Object-formatted ones and store in cache -function createOptions( options ) { - var object = optionsCache[ options ] = {}; - jQuery.each( options.match( rnotwhite ) || [], function( _, flag ) { - object[ flag ] = true; - }); - return object; -} - -/* - * Create a callback list using the following parameters: - * - * options: an optional list of space-separated options that will change how - * the callback list behaves or a more traditional option object - * - * By default a callback list will act like an event callback list and can be - * "fired" multiple times. - * - * Possible options: - * - * once: will ensure the callback list can only be fired once (like a Deferred) - * - * memory: will keep track of previous values and will call any callback added - * after the list has been fired right away with the latest "memorized" - * values (like a Deferred) - * - * unique: will ensure a callback can only be added once (no duplicate in the list) - * - * stopOnFalse: interrupt callings when a callback returns false - * - */ -jQuery.Callbacks = function( options ) { - - // Convert options from String-formatted to Object-formatted if needed - // (we check in cache first) - options = typeof options === "string" ? - ( optionsCache[ options ] || createOptions( options ) ) : - jQuery.extend( {}, options ); - - var // Flag to know if list is currently firing - firing, - // Last fire value (for non-forgettable lists) - memory, - // Flag to know if list was already fired - fired, - // End of the loop when firing - firingLength, - // Index of currently firing callback (modified by remove if needed) - firingIndex, - // First callback to fire (used internally by add and fireWith) - firingStart, - // Actual callback list - list = [], - // Stack of fire calls for repeatable lists - stack = !options.once && [], - // Fire callbacks - fire = function( data ) { - memory = options.memory && data; - fired = true; - firingIndex = firingStart || 0; - firingStart = 0; - firingLength = list.length; - firing = true; - for ( ; list && firingIndex < firingLength; firingIndex++ ) { - if ( list[ firingIndex ].apply( data[ 0 ], data[ 1 ] ) === false && options.stopOnFalse ) { - memory = false; // To prevent further calls using add - break; - } - } - firing = false; - if ( list ) { - if ( stack ) { - if ( stack.length ) { - fire( stack.shift() ); - } - } else if ( memory ) { - list = []; - } else { - self.disable(); - } - } - }, - // Actual Callbacks object - self = { - // Add a callback or a collection of callbacks to the list - add: function() { - if ( list ) { - // First, we save the current length - var start = list.length; - (function add( args ) { - jQuery.each( args, function( _, arg ) { - var type = jQuery.type( arg ); - if ( type === "function" ) { - if ( !options.unique || !self.has( arg ) ) { - list.push( arg ); - } - } else if ( arg && arg.length && type !== "string" ) { - // Inspect recursively - add( arg ); - } - }); - })( arguments ); - // Do we need to add the callbacks to the - // current firing batch? - if ( firing ) { - firingLength = list.length; - // With memory, if we're not firing then - // we should call right away - } else if ( memory ) { - firingStart = start; - fire( memory ); - } - } - return this; - }, - // Remove a callback from the list - remove: function() { - if ( list ) { - jQuery.each( arguments, function( _, arg ) { - var index; - while ( ( index = jQuery.inArray( arg, list, index ) ) > -1 ) { - list.splice( index, 1 ); - // Handle firing indexes - if ( firing ) { - if ( index <= firingLength ) { - firingLength--; - } - if ( index <= firingIndex ) { - firingIndex--; - } - } - } - }); - } - return this; - }, - // Check if a given callback is in the list. - // If no argument is given, return whether or not list has callbacks attached. - has: function( fn ) { - return fn ? jQuery.inArray( fn, list ) > -1 : !!( list && list.length ); - }, - // Remove all callbacks from the list - empty: function() { - list = []; - firingLength = 0; - return this; - }, - // Have the list do nothing anymore - disable: function() { - list = stack = memory = undefined; - return this; - }, - // Is it disabled? - disabled: function() { - return !list; - }, - // Lock the list in its current state - lock: function() { - stack = undefined; - if ( !memory ) { - self.disable(); - } - return this; - }, - // Is it locked? - locked: function() { - return !stack; - }, - // Call all callbacks with the given context and arguments - fireWith: function( context, args ) { - if ( list && ( !fired || stack ) ) { - args = args || []; - args = [ context, args.slice ? args.slice() : args ]; - if ( firing ) { - stack.push( args ); - } else { - fire( args ); - } - } - return this; - }, - // Call all the callbacks with the given arguments - fire: function() { - self.fireWith( this, arguments ); - return this; - }, - // To know if the callbacks have already been called at least once - fired: function() { - return !!fired; - } - }; - - return self; -}; - - -jQuery.extend({ - - Deferred: function( func ) { - var tuples = [ - // action, add listener, listener list, final state - [ "resolve", "done", jQuery.Callbacks("once memory"), "resolved" ], - [ "reject", "fail", jQuery.Callbacks("once memory"), "rejected" ], - [ "notify", "progress", jQuery.Callbacks("memory") ] - ], - state = "pending", - promise = { - state: function() { - return state; - }, - always: function() { - deferred.done( arguments ).fail( arguments ); - return this; - }, - then: function( /* fnDone, fnFail, fnProgress */ ) { - var fns = arguments; - return jQuery.Deferred(function( newDefer ) { - jQuery.each( tuples, function( i, tuple ) { - var fn = jQuery.isFunction( fns[ i ] ) && fns[ i ]; - // deferred[ done | fail | progress ] for forwarding actions to newDefer - deferred[ tuple[1] ](function() { - var returned = fn && fn.apply( this, arguments ); - if ( returned && jQuery.isFunction( returned.promise ) ) { - returned.promise() - .done( newDefer.resolve ) - .fail( newDefer.reject ) - .progress( newDefer.notify ); - } else { - newDefer[ tuple[ 0 ] + "With" ]( this === promise ? newDefer.promise() : this, fn ? [ returned ] : arguments ); - } - }); - }); - fns = null; - }).promise(); - }, - // Get a promise for this deferred - // If obj is provided, the promise aspect is added to the object - promise: function( obj ) { - return obj != null ? jQuery.extend( obj, promise ) : promise; - } - }, - deferred = {}; - - // Keep pipe for back-compat - promise.pipe = promise.then; - - // Add list-specific methods - jQuery.each( tuples, function( i, tuple ) { - var list = tuple[ 2 ], - stateString = tuple[ 3 ]; - - // promise[ done | fail | progress ] = list.add - promise[ tuple[1] ] = list.add; - - // Handle state - if ( stateString ) { - list.add(function() { - // state = [ resolved | rejected ] - state = stateString; - - // [ reject_list | resolve_list ].disable; progress_list.lock - }, tuples[ i ^ 1 ][ 2 ].disable, tuples[ 2 ][ 2 ].lock ); - } - - // deferred[ resolve | reject | notify ] - deferred[ tuple[0] ] = function() { - deferred[ tuple[0] + "With" ]( this === deferred ? promise : this, arguments ); - return this; - }; - deferred[ tuple[0] + "With" ] = list.fireWith; - }); - - // Make the deferred a promise - promise.promise( deferred ); - - // Call given func if any - if ( func ) { - func.call( deferred, deferred ); - } - - // All done! - return deferred; - }, - - // Deferred helper - when: function( subordinate /* , ..., subordinateN */ ) { - var i = 0, - resolveValues = slice.call( arguments ), - length = resolveValues.length, - - // the count of uncompleted subordinates - remaining = length !== 1 || ( subordinate && jQuery.isFunction( subordinate.promise ) ) ? length : 0, - - // the master Deferred. If resolveValues consist of only a single Deferred, just use that. - deferred = remaining === 1 ? subordinate : jQuery.Deferred(), - - // Update function for both resolve and progress values - updateFunc = function( i, contexts, values ) { - return function( value ) { - contexts[ i ] = this; - values[ i ] = arguments.length > 1 ? slice.call( arguments ) : value; - if ( values === progressValues ) { - deferred.notifyWith( contexts, values ); - - } else if ( !(--remaining) ) { - deferred.resolveWith( contexts, values ); - } - }; - }, - - progressValues, progressContexts, resolveContexts; - - // add listeners to Deferred subordinates; treat others as resolved - if ( length > 1 ) { - progressValues = new Array( length ); - progressContexts = new Array( length ); - resolveContexts = new Array( length ); - for ( ; i < length; i++ ) { - if ( resolveValues[ i ] && jQuery.isFunction( resolveValues[ i ].promise ) ) { - resolveValues[ i ].promise() - .done( updateFunc( i, resolveContexts, resolveValues ) ) - .fail( deferred.reject ) - .progress( updateFunc( i, progressContexts, progressValues ) ); - } else { - --remaining; - } - } - } - - // if we're not waiting on anything, resolve the master - if ( !remaining ) { - deferred.resolveWith( resolveContexts, resolveValues ); - } - - return deferred.promise(); - } -}); - - -// The deferred used on DOM ready -var readyList; - -jQuery.fn.ready = function( fn ) { - // Add the callback - jQuery.ready.promise().done( fn ); - - return this; -}; - -jQuery.extend({ - // Is the DOM ready to be used? Set to true once it occurs. - isReady: false, - - // A counter to track how many items to wait for before - // the ready event fires. See #6781 - readyWait: 1, - - // Hold (or release) the ready event - holdReady: function( hold ) { - if ( hold ) { - jQuery.readyWait++; - } else { - jQuery.ready( true ); - } - }, - - // Handle when the DOM is ready - ready: function( wait ) { - - // Abort if there are pending holds or we're already ready - if ( wait === true ? --jQuery.readyWait : jQuery.isReady ) { - return; - } - - // Make sure body exists, at least, in case IE gets a little overzealous (ticket #5443). - if ( !document.body ) { - return setTimeout( jQuery.ready ); - } - - // Remember that the DOM is ready - jQuery.isReady = true; - - // If a normal DOM Ready event fired, decrement, and wait if need be - if ( wait !== true && --jQuery.readyWait > 0 ) { - return; - } - - // If there are functions bound, to execute - readyList.resolveWith( document, [ jQuery ] ); - - // Trigger any bound ready events - if ( jQuery.fn.triggerHandler ) { - jQuery( document ).triggerHandler( "ready" ); - jQuery( document ).off( "ready" ); - } - } -}); - -/** - * Clean-up method for dom ready events - */ -function detach() { - if ( document.addEventListener ) { - document.removeEventListener( "DOMContentLoaded", completed, false ); - window.removeEventListener( "load", completed, false ); - - } else { - document.detachEvent( "onreadystatechange", completed ); - window.detachEvent( "onload", completed ); - } -} - -/** - * The ready event handler and self cleanup method - */ -function completed() { - // readyState === "complete" is good enough for us to call the dom ready in oldIE - if ( document.addEventListener || event.type === "load" || document.readyState === "complete" ) { - detach(); - jQuery.ready(); - } -} - -jQuery.ready.promise = function( obj ) { - if ( !readyList ) { - - readyList = jQuery.Deferred(); - - // Catch cases where $(document).ready() is called after the browser event has already occurred. - // we once tried to use readyState "interactive" here, but it caused issues like the one - // discovered by ChrisS here: http://bugs.jquery.com/ticket/12282#comment:15 - if ( document.readyState === "complete" ) { - // Handle it asynchronously to allow scripts the opportunity to delay ready - setTimeout( jQuery.ready ); - - // Standards-based browsers support DOMContentLoaded - } else if ( document.addEventListener ) { - // Use the handy event callback - document.addEventListener( "DOMContentLoaded", completed, false ); - - // A fallback to window.onload, that will always work - window.addEventListener( "load", completed, false ); - - // If IE event model is used - } else { - // Ensure firing before onload, maybe late but safe also for iframes - document.attachEvent( "onreadystatechange", completed ); - - // A fallback to window.onload, that will always work - window.attachEvent( "onload", completed ); - - // If IE and not a frame - // continually check to see if the document is ready - var top = false; - - try { - top = window.frameElement == null && document.documentElement; - } catch(e) {} - - if ( top && top.doScroll ) { - (function doScrollCheck() { - if ( !jQuery.isReady ) { - - try { - // Use the trick by Diego Perini - // http://javascript.nwbox.com/IEContentLoaded/ - top.doScroll("left"); - } catch(e) { - return setTimeout( doScrollCheck, 50 ); - } - - // detach all dom ready events - detach(); - - // and execute any waiting functions - jQuery.ready(); - } - })(); - } - } - } - return readyList.promise( obj ); -}; - - -var strundefined = typeof undefined; - - - -// Support: IE<9 -// Iteration over object's inherited properties before its own -var i; -for ( i in jQuery( support ) ) { - break; -} -support.ownLast = i !== "0"; - -// Note: most support tests are defined in their respective modules. -// false until the test is run -support.inlineBlockNeedsLayout = false; - -// Execute ASAP in case we need to set body.style.zoom -jQuery(function() { - // Minified: var a,b,c,d - var val, div, body, container; - - body = document.getElementsByTagName( "body" )[ 0 ]; - if ( !body || !body.style ) { - // Return for frameset docs that don't have a body - return; - } - - // Setup - div = document.createElement( "div" ); - container = document.createElement( "div" ); - container.style.cssText = "position:absolute;border:0;width:0;height:0;top:0;left:-9999px"; - body.appendChild( container ).appendChild( div ); - - if ( typeof div.style.zoom !== strundefined ) { - // Support: IE<8 - // Check if natively block-level elements act like inline-block - // elements when setting their display to 'inline' and giving - // them layout - div.style.cssText = "display:inline;margin:0;border:0;padding:1px;width:1px;zoom:1"; - - support.inlineBlockNeedsLayout = val = div.offsetWidth === 3; - if ( val ) { - // Prevent IE 6 from affecting layout for positioned elements #11048 - // Prevent IE from shrinking the body in IE 7 mode #12869 - // Support: IE<8 - body.style.zoom = 1; - } - } - - body.removeChild( container ); -}); - - - - -(function() { - var div = document.createElement( "div" ); - - // Execute the test only if not already executed in another module. - if (support.deleteExpando == null) { - // Support: IE<9 - support.deleteExpando = true; - try { - delete div.test; - } catch( e ) { - support.deleteExpando = false; - } - } - - // Null elements to avoid leaks in IE. - div = null; -})(); - - -/** - * Determines whether an object can have data - */ -jQuery.acceptData = function( elem ) { - var noData = jQuery.noData[ (elem.nodeName + " ").toLowerCase() ], - nodeType = +elem.nodeType || 1; - - // Do not set data on non-element DOM nodes because it will not be cleared (#8335). - return nodeType !== 1 && nodeType !== 9 ? - false : - - // Nodes accept data unless otherwise specified; rejection can be conditional - !noData || noData !== true && elem.getAttribute("classid") === noData; -}; - - -var rbrace = /^(?:\{[\w\W]*\}|\[[\w\W]*\])$/, - rmultiDash = /([A-Z])/g; - -function dataAttr( elem, key, data ) { - // If nothing was found internally, try to fetch any - // data from the HTML5 data-* attribute - if ( data === undefined && elem.nodeType === 1 ) { - - var name = "data-" + key.replace( rmultiDash, "-$1" ).toLowerCase(); - - data = elem.getAttribute( name ); - - if ( typeof data === "string" ) { - try { - data = data === "true" ? true : - data === "false" ? false : - data === "null" ? null : - // Only convert to a number if it doesn't change the string - +data + "" === data ? +data : - rbrace.test( data ) ? jQuery.parseJSON( data ) : - data; - } catch( e ) {} - - // Make sure we set the data so it isn't changed later - jQuery.data( elem, key, data ); - - } else { - data = undefined; - } - } - - return data; -} - -// checks a cache object for emptiness -function isEmptyDataObject( obj ) { - var name; - for ( name in obj ) { - - // if the public data object is empty, the private is still empty - if ( name === "data" && jQuery.isEmptyObject( obj[name] ) ) { - continue; - } - if ( name !== "toJSON" ) { - return false; - } - } - - return true; -} - -function internalData( elem, name, data, pvt /* Internal Use Only */ ) { - if ( !jQuery.acceptData( elem ) ) { - return; - } - - var ret, thisCache, - internalKey = jQuery.expando, - - // We have to handle DOM nodes and JS objects differently because IE6-7 - // can't GC object references properly across the DOM-JS boundary - isNode = elem.nodeType, - - // Only DOM nodes need the global jQuery cache; JS object data is - // attached directly to the object so GC can occur automatically - cache = isNode ? jQuery.cache : elem, - - // Only defining an ID for JS objects if its cache already exists allows - // the code to shortcut on the same path as a DOM node with no cache - id = isNode ? elem[ internalKey ] : elem[ internalKey ] && internalKey; - - // Avoid doing any more work than we need to when trying to get data on an - // object that has no data at all - if ( (!id || !cache[id] || (!pvt && !cache[id].data)) && data === undefined && typeof name === "string" ) { - return; - } - - if ( !id ) { - // Only DOM nodes need a new unique ID for each element since their data - // ends up in the global cache - if ( isNode ) { - id = elem[ internalKey ] = deletedIds.pop() || jQuery.guid++; - } else { - id = internalKey; - } - } - - if ( !cache[ id ] ) { - // Avoid exposing jQuery metadata on plain JS objects when the object - // is serialized using JSON.stringify - cache[ id ] = isNode ? {} : { toJSON: jQuery.noop }; - } - - // An object can be passed to jQuery.data instead of a key/value pair; this gets - // shallow copied over onto the existing cache - if ( typeof name === "object" || typeof name === "function" ) { - if ( pvt ) { - cache[ id ] = jQuery.extend( cache[ id ], name ); - } else { - cache[ id ].data = jQuery.extend( cache[ id ].data, name ); - } - } - - thisCache = cache[ id ]; - - // jQuery data() is stored in a separate object inside the object's internal data - // cache in order to avoid key collisions between internal data and user-defined - // data. - if ( !pvt ) { - if ( !thisCache.data ) { - thisCache.data = {}; - } - - thisCache = thisCache.data; - } - - if ( data !== undefined ) { - thisCache[ jQuery.camelCase( name ) ] = data; - } - - // Check for both converted-to-camel and non-converted data property names - // If a data property was specified - if ( typeof name === "string" ) { - - // First Try to find as-is property data - ret = thisCache[ name ]; - - // Test for null|undefined property data - if ( ret == null ) { - - // Try to find the camelCased property - ret = thisCache[ jQuery.camelCase( name ) ]; - } - } else { - ret = thisCache; - } - - return ret; -} - -function internalRemoveData( elem, name, pvt ) { - if ( !jQuery.acceptData( elem ) ) { - return; - } - - var thisCache, i, - isNode = elem.nodeType, - - // See jQuery.data for more information - cache = isNode ? jQuery.cache : elem, - id = isNode ? elem[ jQuery.expando ] : jQuery.expando; - - // If there is already no cache entry for this object, there is no - // purpose in continuing - if ( !cache[ id ] ) { - return; - } - - if ( name ) { - - thisCache = pvt ? cache[ id ] : cache[ id ].data; - - if ( thisCache ) { - - // Support array or space separated string names for data keys - if ( !jQuery.isArray( name ) ) { - - // try the string as a key before any manipulation - if ( name in thisCache ) { - name = [ name ]; - } else { - - // split the camel cased version by spaces unless a key with the spaces exists - name = jQuery.camelCase( name ); - if ( name in thisCache ) { - name = [ name ]; - } else { - name = name.split(" "); - } - } - } else { - // If "name" is an array of keys... - // When data is initially created, via ("key", "val") signature, - // keys will be converted to camelCase. - // Since there is no way to tell _how_ a key was added, remove - // both plain key and camelCase key. #12786 - // This will only penalize the array argument path. - name = name.concat( jQuery.map( name, jQuery.camelCase ) ); - } - - i = name.length; - while ( i-- ) { - delete thisCache[ name[i] ]; - } - - // If there is no data left in the cache, we want to continue - // and let the cache object itself get destroyed - if ( pvt ? !isEmptyDataObject(thisCache) : !jQuery.isEmptyObject(thisCache) ) { - return; - } - } - } - - // See jQuery.data for more information - if ( !pvt ) { - delete cache[ id ].data; - - // Don't destroy the parent cache unless the internal data object - // had been the only thing left in it - if ( !isEmptyDataObject( cache[ id ] ) ) { - return; - } - } - - // Destroy the cache - if ( isNode ) { - jQuery.cleanData( [ elem ], true ); - - // Use delete when supported for expandos or `cache` is not a window per isWindow (#10080) - /* jshint eqeqeq: false */ - } else if ( support.deleteExpando || cache != cache.window ) { - /* jshint eqeqeq: true */ - delete cache[ id ]; - - // When all else fails, null - } else { - cache[ id ] = null; - } -} - -jQuery.extend({ - cache: {}, - - // The following elements (space-suffixed to avoid Object.prototype collisions) - // throw uncatchable exceptions if you attempt to set expando properties - noData: { - "applet ": true, - "embed ": true, - // ...but Flash objects (which have this classid) *can* handle expandos - "object ": "clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" - }, - - hasData: function( elem ) { - elem = elem.nodeType ? jQuery.cache[ elem[jQuery.expando] ] : elem[ jQuery.expando ]; - return !!elem && !isEmptyDataObject( elem ); - }, - - data: function( elem, name, data ) { - return internalData( elem, name, data ); - }, - - removeData: function( elem, name ) { - return internalRemoveData( elem, name ); - }, - - // For internal use only. - _data: function( elem, name, data ) { - return internalData( elem, name, data, true ); - }, - - _removeData: function( elem, name ) { - return internalRemoveData( elem, name, true ); - } -}); - -jQuery.fn.extend({ - data: function( key, value ) { - var i, name, data, - elem = this[0], - attrs = elem && elem.attributes; - - // Special expections of .data basically thwart jQuery.access, - // so implement the relevant behavior ourselves - - // Gets all values - if ( key === undefined ) { - if ( this.length ) { - data = jQuery.data( elem ); - - if ( elem.nodeType === 1 && !jQuery._data( elem, "parsedAttrs" ) ) { - i = attrs.length; - while ( i-- ) { - - // Support: IE11+ - // The attrs elements can be null (#14894) - if ( attrs[ i ] ) { - name = attrs[ i ].name; - if ( name.indexOf( "data-" ) === 0 ) { - name = jQuery.camelCase( name.slice(5) ); - dataAttr( elem, name, data[ name ] ); - } - } - } - jQuery._data( elem, "parsedAttrs", true ); - } - } - - return data; - } - - // Sets multiple values - if ( typeof key === "object" ) { - return this.each(function() { - jQuery.data( this, key ); - }); - } - - return arguments.length > 1 ? - - // Sets one value - this.each(function() { - jQuery.data( this, key, value ); - }) : - - // Gets one value - // Try to fetch any internally stored data first - elem ? dataAttr( elem, key, jQuery.data( elem, key ) ) : undefined; - }, - - removeData: function( key ) { - return this.each(function() { - jQuery.removeData( this, key ); - }); - } -}); - - -jQuery.extend({ - queue: function( elem, type, data ) { - var queue; - - if ( elem ) { - type = ( type || "fx" ) + "queue"; - queue = jQuery._data( elem, type ); - - // Speed up dequeue by getting out quickly if this is just a lookup - if ( data ) { - if ( !queue || jQuery.isArray(data) ) { - queue = jQuery._data( elem, type, jQuery.makeArray(data) ); - } else { - queue.push( data ); - } - } - return queue || []; - } - }, - - dequeue: function( elem, type ) { - type = type || "fx"; - - var queue = jQuery.queue( elem, type ), - startLength = queue.length, - fn = queue.shift(), - hooks = jQuery._queueHooks( elem, type ), - next = function() { - jQuery.dequeue( elem, type ); - }; - - // If the fx queue is dequeued, always remove the progress sentinel - if ( fn === "inprogress" ) { - fn = queue.shift(); - startLength--; - } - - if ( fn ) { - - // Add a progress sentinel to prevent the fx queue from being - // automatically dequeued - if ( type === "fx" ) { - queue.unshift( "inprogress" ); - } - - // clear up the last queue stop function - delete hooks.stop; - fn.call( elem, next, hooks ); - } - - if ( !startLength && hooks ) { - hooks.empty.fire(); - } - }, - - // not intended for public consumption - generates a queueHooks object, or returns the current one - _queueHooks: function( elem, type ) { - var key = type + "queueHooks"; - return jQuery._data( elem, key ) || jQuery._data( elem, key, { - empty: jQuery.Callbacks("once memory").add(function() { - jQuery._removeData( elem, type + "queue" ); - jQuery._removeData( elem, key ); - }) - }); - } -}); - -jQuery.fn.extend({ - queue: function( type, data ) { - var setter = 2; - - if ( typeof type !== "string" ) { - data = type; - type = "fx"; - setter--; - } - - if ( arguments.length < setter ) { - return jQuery.queue( this[0], type ); - } - - return data === undefined ? - this : - this.each(function() { - var queue = jQuery.queue( this, type, data ); - - // ensure a hooks for this queue - jQuery._queueHooks( this, type ); - - if ( type === "fx" && queue[0] !== "inprogress" ) { - jQuery.dequeue( this, type ); - } - }); - }, - dequeue: function( type ) { - return this.each(function() { - jQuery.dequeue( this, type ); - }); - }, - clearQueue: function( type ) { - return this.queue( type || "fx", [] ); - }, - // Get a promise resolved when queues of a certain type - // are emptied (fx is the type by default) - promise: function( type, obj ) { - var tmp, - count = 1, - defer = jQuery.Deferred(), - elements = this, - i = this.length, - resolve = function() { - if ( !( --count ) ) { - defer.resolveWith( elements, [ elements ] ); - } - }; - - if ( typeof type !== "string" ) { - obj = type; - type = undefined; - } - type = type || "fx"; - - while ( i-- ) { - tmp = jQuery._data( elements[ i ], type + "queueHooks" ); - if ( tmp && tmp.empty ) { - count++; - tmp.empty.add( resolve ); - } - } - resolve(); - return defer.promise( obj ); - } -}); -var pnum = (/[+-]?(?:\d*\.|)\d+(?:[eE][+-]?\d+|)/).source; - -var cssExpand = [ "Top", "Right", "Bottom", "Left" ]; - -var isHidden = function( elem, el ) { - // isHidden might be called from jQuery#filter function; - // in that case, element will be second argument - elem = el || elem; - return jQuery.css( elem, "display" ) === "none" || !jQuery.contains( elem.ownerDocument, elem ); - }; - - - -// Multifunctional method to get and set values of a collection -// The value/s can optionally be executed if it's a function -var access = jQuery.access = function( elems, fn, key, value, chainable, emptyGet, raw ) { - var i = 0, - length = elems.length, - bulk = key == null; - - // Sets many values - if ( jQuery.type( key ) === "object" ) { - chainable = true; - for ( i in key ) { - jQuery.access( elems, fn, i, key[i], true, emptyGet, raw ); - } - - // Sets one value - } else if ( value !== undefined ) { - chainable = true; - - if ( !jQuery.isFunction( value ) ) { - raw = true; - } - - if ( bulk ) { - // Bulk operations run against the entire set - if ( raw ) { - fn.call( elems, value ); - fn = null; - - // ...except when executing function values - } else { - bulk = fn; - fn = function( elem, key, value ) { - return bulk.call( jQuery( elem ), value ); - }; - } - } - - if ( fn ) { - for ( ; i < length; i++ ) { - fn( elems[i], key, raw ? value : value.call( elems[i], i, fn( elems[i], key ) ) ); - } - } - } - - return chainable ? - elems : - - // Gets - bulk ? - fn.call( elems ) : - length ? fn( elems[0], key ) : emptyGet; -}; -var rcheckableType = (/^(?:checkbox|radio)$/i); - - - -(function() { - // Minified: var a,b,c - var input = document.createElement( "input" ), - div = document.createElement( "div" ), - fragment = document.createDocumentFragment(); - - // Setup - div.innerHTML = "
a"; - - // IE strips leading whitespace when .innerHTML is used - support.leadingWhitespace = div.firstChild.nodeType === 3; - - // Make sure that tbody elements aren't automatically inserted - // IE will insert them into empty tables - support.tbody = !div.getElementsByTagName( "tbody" ).length; - - // Make sure that link elements get serialized correctly by innerHTML - // This requires a wrapper element in IE - support.htmlSerialize = !!div.getElementsByTagName( "link" ).length; - - // Makes sure cloning an html5 element does not cause problems - // Where outerHTML is undefined, this still works - support.html5Clone = - document.createElement( "nav" ).cloneNode( true ).outerHTML !== "<:nav>"; - - // Check if a disconnected checkbox will retain its checked - // value of true after appended to the DOM (IE6/7) - input.type = "checkbox"; - input.checked = true; - fragment.appendChild( input ); - support.appendChecked = input.checked; - - // Make sure textarea (and checkbox) defaultValue is properly cloned - // Support: IE6-IE11+ - div.innerHTML = ""; - support.noCloneChecked = !!div.cloneNode( true ).lastChild.defaultValue; - - // #11217 - WebKit loses check when the name is after the checked attribute - fragment.appendChild( div ); - div.innerHTML = ""; - - // Support: Safari 5.1, iOS 5.1, Android 4.x, Android 2.3 - // old WebKit doesn't clone checked state correctly in fragments - support.checkClone = div.cloneNode( true ).cloneNode( true ).lastChild.checked; - - // Support: IE<9 - // Opera does not clone events (and typeof div.attachEvent === undefined). - // IE9-10 clones events bound via attachEvent, but they don't trigger with .click() - support.noCloneEvent = true; - if ( div.attachEvent ) { - div.attachEvent( "onclick", function() { - support.noCloneEvent = false; - }); - - div.cloneNode( true ).click(); - } - - // Execute the test only if not already executed in another module. - if (support.deleteExpando == null) { - // Support: IE<9 - support.deleteExpando = true; - try { - delete div.test; - } catch( e ) { - support.deleteExpando = false; - } - } -})(); - - -(function() { - var i, eventName, - div = document.createElement( "div" ); - - // Support: IE<9 (lack submit/change bubble), Firefox 23+ (lack focusin event) - for ( i in { submit: true, change: true, focusin: true }) { - eventName = "on" + i; - - if ( !(support[ i + "Bubbles" ] = eventName in window) ) { - // Beware of CSP restrictions (https://developer.mozilla.org/en/Security/CSP) - div.setAttribute( eventName, "t" ); - support[ i + "Bubbles" ] = div.attributes[ eventName ].expando === false; - } - } - - // Null elements to avoid leaks in IE. - div = null; -})(); - - -var rformElems = /^(?:input|select|textarea)$/i, - rkeyEvent = /^key/, - rmouseEvent = /^(?:mouse|pointer|contextmenu)|click/, - rfocusMorph = /^(?:focusinfocus|focusoutblur)$/, - rtypenamespace = /^([^.]*)(?:\.(.+)|)$/; - -function returnTrue() { - return true; -} - -function returnFalse() { - return false; -} - -function safeActiveElement() { - try { - return document.activeElement; - } catch ( err ) { } -} - -/* - * Helper functions for managing events -- not part of the public interface. - * Props to Dean Edwards' addEvent library for many of the ideas. - */ -jQuery.event = { - - global: {}, - - add: function( elem, types, handler, data, selector ) { - var tmp, events, t, handleObjIn, - special, eventHandle, handleObj, - handlers, type, namespaces, origType, - elemData = jQuery._data( elem ); - - // Don't attach events to noData or text/comment nodes (but allow plain objects) - if ( !elemData ) { - return; - } - - // Caller can pass in an object of custom data in lieu of the handler - if ( handler.handler ) { - handleObjIn = handler; - handler = handleObjIn.handler; - selector = handleObjIn.selector; - } - - // Make sure that the handler has a unique ID, used to find/remove it later - if ( !handler.guid ) { - handler.guid = jQuery.guid++; - } - - // Init the element's event structure and main handler, if this is the first - if ( !(events = elemData.events) ) { - events = elemData.events = {}; - } - if ( !(eventHandle = elemData.handle) ) { - eventHandle = elemData.handle = function( e ) { - // Discard the second event of a jQuery.event.trigger() and - // when an event is called after a page has unloaded - return typeof jQuery !== strundefined && (!e || jQuery.event.triggered !== e.type) ? - jQuery.event.dispatch.apply( eventHandle.elem, arguments ) : - undefined; - }; - // Add elem as a property of the handle fn to prevent a memory leak with IE non-native events - eventHandle.elem = elem; - } - - // Handle multiple events separated by a space - types = ( types || "" ).match( rnotwhite ) || [ "" ]; - t = types.length; - while ( t-- ) { - tmp = rtypenamespace.exec( types[t] ) || []; - type = origType = tmp[1]; - namespaces = ( tmp[2] || "" ).split( "." ).sort(); - - // There *must* be a type, no attaching namespace-only handlers - if ( !type ) { - continue; - } - - // If event changes its type, use the special event handlers for the changed type - special = jQuery.event.special[ type ] || {}; - - // If selector defined, determine special event api type, otherwise given type - type = ( selector ? special.delegateType : special.bindType ) || type; - - // Update special based on newly reset type - special = jQuery.event.special[ type ] || {}; - - // handleObj is passed to all event handlers - handleObj = jQuery.extend({ - type: type, - origType: origType, - data: data, - handler: handler, - guid: handler.guid, - selector: selector, - needsContext: selector && jQuery.expr.match.needsContext.test( selector ), - namespace: namespaces.join(".") - }, handleObjIn ); - - // Init the event handler queue if we're the first - if ( !(handlers = events[ type ]) ) { - handlers = events[ type ] = []; - handlers.delegateCount = 0; - - // Only use addEventListener/attachEvent if the special events handler returns false - if ( !special.setup || special.setup.call( elem, data, namespaces, eventHandle ) === false ) { - // Bind the global event handler to the element - if ( elem.addEventListener ) { - elem.addEventListener( type, eventHandle, false ); - - } else if ( elem.attachEvent ) { - elem.attachEvent( "on" + type, eventHandle ); - } - } - } - - if ( special.add ) { - special.add.call( elem, handleObj ); - - if ( !handleObj.handler.guid ) { - handleObj.handler.guid = handler.guid; - } - } - - // Add to the element's handler list, delegates in front - if ( selector ) { - handlers.splice( handlers.delegateCount++, 0, handleObj ); - } else { - handlers.push( handleObj ); - } - - // Keep track of which events have ever been used, for event optimization - jQuery.event.global[ type ] = true; - } - - // Nullify elem to prevent memory leaks in IE - elem = null; - }, - - // Detach an event or set of events from an element - remove: function( elem, types, handler, selector, mappedTypes ) { - var j, handleObj, tmp, - origCount, t, events, - special, handlers, type, - namespaces, origType, - elemData = jQuery.hasData( elem ) && jQuery._data( elem ); - - if ( !elemData || !(events = elemData.events) ) { - return; - } - - // Once for each type.namespace in types; type may be omitted - types = ( types || "" ).match( rnotwhite ) || [ "" ]; - t = types.length; - while ( t-- ) { - tmp = rtypenamespace.exec( types[t] ) || []; - type = origType = tmp[1]; - namespaces = ( tmp[2] || "" ).split( "." ).sort(); - - // Unbind all events (on this namespace, if provided) for the element - if ( !type ) { - for ( type in events ) { - jQuery.event.remove( elem, type + types[ t ], handler, selector, true ); - } - continue; - } - - special = jQuery.event.special[ type ] || {}; - type = ( selector ? special.delegateType : special.bindType ) || type; - handlers = events[ type ] || []; - tmp = tmp[2] && new RegExp( "(^|\\.)" + namespaces.join("\\.(?:.*\\.|)") + "(\\.|$)" ); - - // Remove matching events - origCount = j = handlers.length; - while ( j-- ) { - handleObj = handlers[ j ]; - - if ( ( mappedTypes || origType === handleObj.origType ) && - ( !handler || handler.guid === handleObj.guid ) && - ( !tmp || tmp.test( handleObj.namespace ) ) && - ( !selector || selector === handleObj.selector || selector === "**" && handleObj.selector ) ) { - handlers.splice( j, 1 ); - - if ( handleObj.selector ) { - handlers.delegateCount--; - } - if ( special.remove ) { - special.remove.call( elem, handleObj ); - } - } - } - - // Remove generic event handler if we removed something and no more handlers exist - // (avoids potential for endless recursion during removal of special event handlers) - if ( origCount && !handlers.length ) { - if ( !special.teardown || special.teardown.call( elem, namespaces, elemData.handle ) === false ) { - jQuery.removeEvent( elem, type, elemData.handle ); - } - - delete events[ type ]; - } - } - - // Remove the expando if it's no longer used - if ( jQuery.isEmptyObject( events ) ) { - delete elemData.handle; - - // removeData also checks for emptiness and clears the expando if empty - // so use it instead of delete - jQuery._removeData( elem, "events" ); - } - }, - - trigger: function( event, data, elem, onlyHandlers ) { - var handle, ontype, cur, - bubbleType, special, tmp, i, - eventPath = [ elem || document ], - type = hasOwn.call( event, "type" ) ? event.type : event, - namespaces = hasOwn.call( event, "namespace" ) ? event.namespace.split(".") : []; - - cur = tmp = elem = elem || document; - - // Don't do events on text and comment nodes - if ( elem.nodeType === 3 || elem.nodeType === 8 ) { - return; - } - - // focus/blur morphs to focusin/out; ensure we're not firing them right now - if ( rfocusMorph.test( type + jQuery.event.triggered ) ) { - return; - } - - if ( type.indexOf(".") >= 0 ) { - // Namespaced trigger; create a regexp to match event type in handle() - namespaces = type.split("."); - type = namespaces.shift(); - namespaces.sort(); - } - ontype = type.indexOf(":") < 0 && "on" + type; - - // Caller can pass in a jQuery.Event object, Object, or just an event type string - event = event[ jQuery.expando ] ? - event : - new jQuery.Event( type, typeof event === "object" && event ); - - // Trigger bitmask: & 1 for native handlers; & 2 for jQuery (always true) - event.isTrigger = onlyHandlers ? 2 : 3; - event.namespace = namespaces.join("."); - event.namespace_re = event.namespace ? - new RegExp( "(^|\\.)" + namespaces.join("\\.(?:.*\\.|)") + "(\\.|$)" ) : - null; - - // Clean up the event in case it is being reused - event.result = undefined; - if ( !event.target ) { - event.target = elem; - } - - // Clone any incoming data and prepend the event, creating the handler arg list - data = data == null ? - [ event ] : - jQuery.makeArray( data, [ event ] ); - - // Allow special events to draw outside the lines - special = jQuery.event.special[ type ] || {}; - if ( !onlyHandlers && special.trigger && special.trigger.apply( elem, data ) === false ) { - return; - } - - // Determine event propagation path in advance, per W3C events spec (#9951) - // Bubble up to document, then to window; watch for a global ownerDocument var (#9724) - if ( !onlyHandlers && !special.noBubble && !jQuery.isWindow( elem ) ) { - - bubbleType = special.delegateType || type; - if ( !rfocusMorph.test( bubbleType + type ) ) { - cur = cur.parentNode; - } - for ( ; cur; cur = cur.parentNode ) { - eventPath.push( cur ); - tmp = cur; - } - - // Only add window if we got to document (e.g., not plain obj or detached DOM) - if ( tmp === (elem.ownerDocument || document) ) { - eventPath.push( tmp.defaultView || tmp.parentWindow || window ); - } - } - - // Fire handlers on the event path - i = 0; - while ( (cur = eventPath[i++]) && !event.isPropagationStopped() ) { - - event.type = i > 1 ? - bubbleType : - special.bindType || type; - - // jQuery handler - handle = ( jQuery._data( cur, "events" ) || {} )[ event.type ] && jQuery._data( cur, "handle" ); - if ( handle ) { - handle.apply( cur, data ); - } - - // Native handler - handle = ontype && cur[ ontype ]; - if ( handle && handle.apply && jQuery.acceptData( cur ) ) { - event.result = handle.apply( cur, data ); - if ( event.result === false ) { - event.preventDefault(); - } - } - } - event.type = type; - - // If nobody prevented the default action, do it now - if ( !onlyHandlers && !event.isDefaultPrevented() ) { - - if ( (!special._default || special._default.apply( eventPath.pop(), data ) === false) && - jQuery.acceptData( elem ) ) { - - // Call a native DOM method on the target with the same name name as the event. - // Can't use an .isFunction() check here because IE6/7 fails that test. - // Don't do default actions on window, that's where global variables be (#6170) - if ( ontype && elem[ type ] && !jQuery.isWindow( elem ) ) { - - // Don't re-trigger an onFOO event when we call its FOO() method - tmp = elem[ ontype ]; - - if ( tmp ) { - elem[ ontype ] = null; - } - - // Prevent re-triggering of the same event, since we already bubbled it above - jQuery.event.triggered = type; - try { - elem[ type ](); - } catch ( e ) { - // IE<9 dies on focus/blur to hidden element (#1486,#12518) - // only reproducible on winXP IE8 native, not IE9 in IE8 mode - } - jQuery.event.triggered = undefined; - - if ( tmp ) { - elem[ ontype ] = tmp; - } - } - } - } - - return event.result; - }, - - dispatch: function( event ) { - - // Make a writable jQuery.Event from the native event object - event = jQuery.event.fix( event ); - - var i, ret, handleObj, matched, j, - handlerQueue = [], - args = slice.call( arguments ), - handlers = ( jQuery._data( this, "events" ) || {} )[ event.type ] || [], - special = jQuery.event.special[ event.type ] || {}; - - // Use the fix-ed jQuery.Event rather than the (read-only) native event - args[0] = event; - event.delegateTarget = this; - - // Call the preDispatch hook for the mapped type, and let it bail if desired - if ( special.preDispatch && special.preDispatch.call( this, event ) === false ) { - return; - } - - // Determine handlers - handlerQueue = jQuery.event.handlers.call( this, event, handlers ); - - // Run delegates first; they may want to stop propagation beneath us - i = 0; - while ( (matched = handlerQueue[ i++ ]) && !event.isPropagationStopped() ) { - event.currentTarget = matched.elem; - - j = 0; - while ( (handleObj = matched.handlers[ j++ ]) && !event.isImmediatePropagationStopped() ) { - - // Triggered event must either 1) have no namespace, or - // 2) have namespace(s) a subset or equal to those in the bound event (both can have no namespace). - if ( !event.namespace_re || event.namespace_re.test( handleObj.namespace ) ) { - - event.handleObj = handleObj; - event.data = handleObj.data; - - ret = ( (jQuery.event.special[ handleObj.origType ] || {}).handle || handleObj.handler ) - .apply( matched.elem, args ); - - if ( ret !== undefined ) { - if ( (event.result = ret) === false ) { - event.preventDefault(); - event.stopPropagation(); - } - } - } - } - } - - // Call the postDispatch hook for the mapped type - if ( special.postDispatch ) { - special.postDispatch.call( this, event ); - } - - return event.result; - }, - - handlers: function( event, handlers ) { - var sel, handleObj, matches, i, - handlerQueue = [], - delegateCount = handlers.delegateCount, - cur = event.target; - - // Find delegate handlers - // Black-hole SVG instance trees (#13180) - // Avoid non-left-click bubbling in Firefox (#3861) - if ( delegateCount && cur.nodeType && (!event.button || event.type !== "click") ) { - - /* jshint eqeqeq: false */ - for ( ; cur != this; cur = cur.parentNode || this ) { - /* jshint eqeqeq: true */ - - // Don't check non-elements (#13208) - // Don't process clicks on disabled elements (#6911, #8165, #11382, #11764) - if ( cur.nodeType === 1 && (cur.disabled !== true || event.type !== "click") ) { - matches = []; - for ( i = 0; i < delegateCount; i++ ) { - handleObj = handlers[ i ]; - - // Don't conflict with Object.prototype properties (#13203) - sel = handleObj.selector + " "; - - if ( matches[ sel ] === undefined ) { - matches[ sel ] = handleObj.needsContext ? - jQuery( sel, this ).index( cur ) >= 0 : - jQuery.find( sel, this, null, [ cur ] ).length; - } - if ( matches[ sel ] ) { - matches.push( handleObj ); - } - } - if ( matches.length ) { - handlerQueue.push({ elem: cur, handlers: matches }); - } - } - } - } - - // Add the remaining (directly-bound) handlers - if ( delegateCount < handlers.length ) { - handlerQueue.push({ elem: this, handlers: handlers.slice( delegateCount ) }); - } - - return handlerQueue; - }, - - fix: function( event ) { - if ( event[ jQuery.expando ] ) { - return event; - } - - // Create a writable copy of the event object and normalize some properties - var i, prop, copy, - type = event.type, - originalEvent = event, - fixHook = this.fixHooks[ type ]; - - if ( !fixHook ) { - this.fixHooks[ type ] = fixHook = - rmouseEvent.test( type ) ? this.mouseHooks : - rkeyEvent.test( type ) ? this.keyHooks : - {}; - } - copy = fixHook.props ? this.props.concat( fixHook.props ) : this.props; - - event = new jQuery.Event( originalEvent ); - - i = copy.length; - while ( i-- ) { - prop = copy[ i ]; - event[ prop ] = originalEvent[ prop ]; - } - - // Support: IE<9 - // Fix target property (#1925) - if ( !event.target ) { - event.target = originalEvent.srcElement || document; - } - - // Support: Chrome 23+, Safari? - // Target should not be a text node (#504, #13143) - if ( event.target.nodeType === 3 ) { - event.target = event.target.parentNode; - } - - // Support: IE<9 - // For mouse/key events, metaKey==false if it's undefined (#3368, #11328) - event.metaKey = !!event.metaKey; - - return fixHook.filter ? fixHook.filter( event, originalEvent ) : event; - }, - - // Includes some event props shared by KeyEvent and MouseEvent - props: "altKey bubbles cancelable ctrlKey currentTarget eventPhase metaKey relatedTarget shiftKey target timeStamp view which".split(" "), - - fixHooks: {}, - - keyHooks: { - props: "char charCode key keyCode".split(" "), - filter: function( event, original ) { - - // Add which for key events - if ( event.which == null ) { - event.which = original.charCode != null ? original.charCode : original.keyCode; - } - - return event; - } - }, - - mouseHooks: { - props: "button buttons clientX clientY fromElement offsetX offsetY pageX pageY screenX screenY toElement".split(" "), - filter: function( event, original ) { - var body, eventDoc, doc, - button = original.button, - fromElement = original.fromElement; - - // Calculate pageX/Y if missing and clientX/Y available - if ( event.pageX == null && original.clientX != null ) { - eventDoc = event.target.ownerDocument || document; - doc = eventDoc.documentElement; - body = eventDoc.body; - - event.pageX = original.clientX + ( doc && doc.scrollLeft || body && body.scrollLeft || 0 ) - ( doc && doc.clientLeft || body && body.clientLeft || 0 ); - event.pageY = original.clientY + ( doc && doc.scrollTop || body && body.scrollTop || 0 ) - ( doc && doc.clientTop || body && body.clientTop || 0 ); - } - - // Add relatedTarget, if necessary - if ( !event.relatedTarget && fromElement ) { - event.relatedTarget = fromElement === event.target ? original.toElement : fromElement; - } - - // Add which for click: 1 === left; 2 === middle; 3 === right - // Note: button is not normalized, so don't use it - if ( !event.which && button !== undefined ) { - event.which = ( button & 1 ? 1 : ( button & 2 ? 3 : ( button & 4 ? 2 : 0 ) ) ); - } - - return event; - } - }, - - special: { - load: { - // Prevent triggered image.load events from bubbling to window.load - noBubble: true - }, - focus: { - // Fire native event if possible so blur/focus sequence is correct - trigger: function() { - if ( this !== safeActiveElement() && this.focus ) { - try { - this.focus(); - return false; - } catch ( e ) { - // Support: IE<9 - // If we error on focus to hidden element (#1486, #12518), - // let .trigger() run the handlers - } - } - }, - delegateType: "focusin" - }, - blur: { - trigger: function() { - if ( this === safeActiveElement() && this.blur ) { - this.blur(); - return false; - } - }, - delegateType: "focusout" - }, - click: { - // For checkbox, fire native event so checked state will be right - trigger: function() { - if ( jQuery.nodeName( this, "input" ) && this.type === "checkbox" && this.click ) { - this.click(); - return false; - } - }, - - // For cross-browser consistency, don't fire native .click() on links - _default: function( event ) { - return jQuery.nodeName( event.target, "a" ); - } - }, - - beforeunload: { - postDispatch: function( event ) { - - // Support: Firefox 20+ - // Firefox doesn't alert if the returnValue field is not set. - if ( event.result !== undefined && event.originalEvent ) { - event.originalEvent.returnValue = event.result; - } - } - } - }, - - simulate: function( type, elem, event, bubble ) { - // Piggyback on a donor event to simulate a different one. - // Fake originalEvent to avoid donor's stopPropagation, but if the - // simulated event prevents default then we do the same on the donor. - var e = jQuery.extend( - new jQuery.Event(), - event, - { - type: type, - isSimulated: true, - originalEvent: {} - } - ); - if ( bubble ) { - jQuery.event.trigger( e, null, elem ); - } else { - jQuery.event.dispatch.call( elem, e ); - } - if ( e.isDefaultPrevented() ) { - event.preventDefault(); - } - } -}; - -jQuery.removeEvent = document.removeEventListener ? - function( elem, type, handle ) { - if ( elem.removeEventListener ) { - elem.removeEventListener( type, handle, false ); - } - } : - function( elem, type, handle ) { - var name = "on" + type; - - if ( elem.detachEvent ) { - - // #8545, #7054, preventing memory leaks for custom events in IE6-8 - // detachEvent needed property on element, by name of that event, to properly expose it to GC - if ( typeof elem[ name ] === strundefined ) { - elem[ name ] = null; - } - - elem.detachEvent( name, handle ); - } - }; - -jQuery.Event = function( src, props ) { - // Allow instantiation without the 'new' keyword - if ( !(this instanceof jQuery.Event) ) { - return new jQuery.Event( src, props ); - } - - // Event object - if ( src && src.type ) { - this.originalEvent = src; - this.type = src.type; - - // Events bubbling up the document may have been marked as prevented - // by a handler lower down the tree; reflect the correct value. - this.isDefaultPrevented = src.defaultPrevented || - src.defaultPrevented === undefined && - // Support: IE < 9, Android < 4.0 - src.returnValue === false ? - returnTrue : - returnFalse; - - // Event type - } else { - this.type = src; - } - - // Put explicitly provided properties onto the event object - if ( props ) { - jQuery.extend( this, props ); - } - - // Create a timestamp if incoming event doesn't have one - this.timeStamp = src && src.timeStamp || jQuery.now(); - - // Mark it as fixed - this[ jQuery.expando ] = true; -}; - -// jQuery.Event is based on DOM3 Events as specified by the ECMAScript Language Binding -// http://www.w3.org/TR/2003/WD-DOM-Level-3-Events-20030331/ecma-script-binding.html -jQuery.Event.prototype = { - isDefaultPrevented: returnFalse, - isPropagationStopped: returnFalse, - isImmediatePropagationStopped: returnFalse, - - preventDefault: function() { - var e = this.originalEvent; - - this.isDefaultPrevented = returnTrue; - if ( !e ) { - return; - } - - // If preventDefault exists, run it on the original event - if ( e.preventDefault ) { - e.preventDefault(); - - // Support: IE - // Otherwise set the returnValue property of the original event to false - } else { - e.returnValue = false; - } - }, - stopPropagation: function() { - var e = this.originalEvent; - - this.isPropagationStopped = returnTrue; - if ( !e ) { - return; - } - // If stopPropagation exists, run it on the original event - if ( e.stopPropagation ) { - e.stopPropagation(); - } - - // Support: IE - // Set the cancelBubble property of the original event to true - e.cancelBubble = true; - }, - stopImmediatePropagation: function() { - var e = this.originalEvent; - - this.isImmediatePropagationStopped = returnTrue; - - if ( e && e.stopImmediatePropagation ) { - e.stopImmediatePropagation(); - } - - this.stopPropagation(); - } -}; - -// Create mouseenter/leave events using mouseover/out and event-time checks -jQuery.each({ - mouseenter: "mouseover", - mouseleave: "mouseout", - pointerenter: "pointerover", - pointerleave: "pointerout" -}, function( orig, fix ) { - jQuery.event.special[ orig ] = { - delegateType: fix, - bindType: fix, - - handle: function( event ) { - var ret, - target = this, - related = event.relatedTarget, - handleObj = event.handleObj; - - // For mousenter/leave call the handler if related is outside the target. - // NB: No relatedTarget if the mouse left/entered the browser window - if ( !related || (related !== target && !jQuery.contains( target, related )) ) { - event.type = handleObj.origType; - ret = handleObj.handler.apply( this, arguments ); - event.type = fix; - } - return ret; - } - }; -}); - -// IE submit delegation -if ( !support.submitBubbles ) { - - jQuery.event.special.submit = { - setup: function() { - // Only need this for delegated form submit events - if ( jQuery.nodeName( this, "form" ) ) { - return false; - } - - // Lazy-add a submit handler when a descendant form may potentially be submitted - jQuery.event.add( this, "click._submit keypress._submit", function( e ) { - // Node name check avoids a VML-related crash in IE (#9807) - var elem = e.target, - form = jQuery.nodeName( elem, "input" ) || jQuery.nodeName( elem, "button" ) ? elem.form : undefined; - if ( form && !jQuery._data( form, "submitBubbles" ) ) { - jQuery.event.add( form, "submit._submit", function( event ) { - event._submit_bubble = true; - }); - jQuery._data( form, "submitBubbles", true ); - } - }); - // return undefined since we don't need an event listener - }, - - postDispatch: function( event ) { - // If form was submitted by the user, bubble the event up the tree - if ( event._submit_bubble ) { - delete event._submit_bubble; - if ( this.parentNode && !event.isTrigger ) { - jQuery.event.simulate( "submit", this.parentNode, event, true ); - } - } - }, - - teardown: function() { - // Only need this for delegated form submit events - if ( jQuery.nodeName( this, "form" ) ) { - return false; - } - - // Remove delegated handlers; cleanData eventually reaps submit handlers attached above - jQuery.event.remove( this, "._submit" ); - } - }; -} - -// IE change delegation and checkbox/radio fix -if ( !support.changeBubbles ) { - - jQuery.event.special.change = { - - setup: function() { - - if ( rformElems.test( this.nodeName ) ) { - // IE doesn't fire change on a check/radio until blur; trigger it on click - // after a propertychange. Eat the blur-change in special.change.handle. - // This still fires onchange a second time for check/radio after blur. - if ( this.type === "checkbox" || this.type === "radio" ) { - jQuery.event.add( this, "propertychange._change", function( event ) { - if ( event.originalEvent.propertyName === "checked" ) { - this._just_changed = true; - } - }); - jQuery.event.add( this, "click._change", function( event ) { - if ( this._just_changed && !event.isTrigger ) { - this._just_changed = false; - } - // Allow triggered, simulated change events (#11500) - jQuery.event.simulate( "change", this, event, true ); - }); - } - return false; - } - // Delegated event; lazy-add a change handler on descendant inputs - jQuery.event.add( this, "beforeactivate._change", function( e ) { - var elem = e.target; - - if ( rformElems.test( elem.nodeName ) && !jQuery._data( elem, "changeBubbles" ) ) { - jQuery.event.add( elem, "change._change", function( event ) { - if ( this.parentNode && !event.isSimulated && !event.isTrigger ) { - jQuery.event.simulate( "change", this.parentNode, event, true ); - } - }); - jQuery._data( elem, "changeBubbles", true ); - } - }); - }, - - handle: function( event ) { - var elem = event.target; - - // Swallow native change events from checkbox/radio, we already triggered them above - if ( this !== elem || event.isSimulated || event.isTrigger || (elem.type !== "radio" && elem.type !== "checkbox") ) { - return event.handleObj.handler.apply( this, arguments ); - } - }, - - teardown: function() { - jQuery.event.remove( this, "._change" ); - - return !rformElems.test( this.nodeName ); - } - }; -} - -// Create "bubbling" focus and blur events -if ( !support.focusinBubbles ) { - jQuery.each({ focus: "focusin", blur: "focusout" }, function( orig, fix ) { - - // Attach a single capturing handler on the document while someone wants focusin/focusout - var handler = function( event ) { - jQuery.event.simulate( fix, event.target, jQuery.event.fix( event ), true ); - }; - - jQuery.event.special[ fix ] = { - setup: function() { - var doc = this.ownerDocument || this, - attaches = jQuery._data( doc, fix ); - - if ( !attaches ) { - doc.addEventListener( orig, handler, true ); - } - jQuery._data( doc, fix, ( attaches || 0 ) + 1 ); - }, - teardown: function() { - var doc = this.ownerDocument || this, - attaches = jQuery._data( doc, fix ) - 1; - - if ( !attaches ) { - doc.removeEventListener( orig, handler, true ); - jQuery._removeData( doc, fix ); - } else { - jQuery._data( doc, fix, attaches ); - } - } - }; - }); -} - -jQuery.fn.extend({ - - on: function( types, selector, data, fn, /*INTERNAL*/ one ) { - var type, origFn; - - // Types can be a map of types/handlers - if ( typeof types === "object" ) { - // ( types-Object, selector, data ) - if ( typeof selector !== "string" ) { - // ( types-Object, data ) - data = data || selector; - selector = undefined; - } - for ( type in types ) { - this.on( type, selector, data, types[ type ], one ); - } - return this; - } - - if ( data == null && fn == null ) { - // ( types, fn ) - fn = selector; - data = selector = undefined; - } else if ( fn == null ) { - if ( typeof selector === "string" ) { - // ( types, selector, fn ) - fn = data; - data = undefined; - } else { - // ( types, data, fn ) - fn = data; - data = selector; - selector = undefined; - } - } - if ( fn === false ) { - fn = returnFalse; - } else if ( !fn ) { - return this; - } - - if ( one === 1 ) { - origFn = fn; - fn = function( event ) { - // Can use an empty set, since event contains the info - jQuery().off( event ); - return origFn.apply( this, arguments ); - }; - // Use same guid so caller can remove using origFn - fn.guid = origFn.guid || ( origFn.guid = jQuery.guid++ ); - } - return this.each( function() { - jQuery.event.add( this, types, fn, data, selector ); - }); - }, - one: function( types, selector, data, fn ) { - return this.on( types, selector, data, fn, 1 ); - }, - off: function( types, selector, fn ) { - var handleObj, type; - if ( types && types.preventDefault && types.handleObj ) { - // ( event ) dispatched jQuery.Event - handleObj = types.handleObj; - jQuery( types.delegateTarget ).off( - handleObj.namespace ? handleObj.origType + "." + handleObj.namespace : handleObj.origType, - handleObj.selector, - handleObj.handler - ); - return this; - } - if ( typeof types === "object" ) { - // ( types-object [, selector] ) - for ( type in types ) { - this.off( type, selector, types[ type ] ); - } - return this; - } - if ( selector === false || typeof selector === "function" ) { - // ( types [, fn] ) - fn = selector; - selector = undefined; - } - if ( fn === false ) { - fn = returnFalse; - } - return this.each(function() { - jQuery.event.remove( this, types, fn, selector ); - }); - }, - - trigger: function( type, data ) { - return this.each(function() { - jQuery.event.trigger( type, data, this ); - }); - }, - triggerHandler: function( type, data ) { - var elem = this[0]; - if ( elem ) { - return jQuery.event.trigger( type, data, elem, true ); - } - } -}); - - -function createSafeFragment( document ) { - var list = nodeNames.split( "|" ), - safeFrag = document.createDocumentFragment(); - - if ( safeFrag.createElement ) { - while ( list.length ) { - safeFrag.createElement( - list.pop() - ); - } - } - return safeFrag; -} - -var nodeNames = "abbr|article|aside|audio|bdi|canvas|data|datalist|details|figcaption|figure|footer|" + - "header|hgroup|mark|meter|nav|output|progress|section|summary|time|video", - rinlinejQuery = / jQuery\d+="(?:null|\d+)"/g, - rnoshimcache = new RegExp("<(?:" + nodeNames + ")[\\s/>]", "i"), - rleadingWhitespace = /^\s+/, - rxhtmlTag = /<(?!area|br|col|embed|hr|img|input|link|meta|param)(([\w:]+)[^>]*)\/>/gi, - rtagName = /<([\w:]+)/, - rtbody = /\s*$/g, - - // We have to close these tags to support XHTML (#13200) - wrapMap = { - option: [ 1, "" ], - legend: [ 1, "
", "
" ], - area: [ 1, "", "" ], - param: [ 1, "", "" ], - thead: [ 1, "", "
" ], - tr: [ 2, "", "
" ], - col: [ 2, "", "
" ], - td: [ 3, "", "
" ], - - // IE6-8 can't serialize link, script, style, or any html5 (NoScope) tags, - // unless wrapped in a div with non-breaking characters in front of it. - _default: support.htmlSerialize ? [ 0, "", "" ] : [ 1, "X
", "
" ] - }, - safeFragment = createSafeFragment( document ), - fragmentDiv = safeFragment.appendChild( document.createElement("div") ); - -wrapMap.optgroup = wrapMap.option; -wrapMap.tbody = wrapMap.tfoot = wrapMap.colgroup = wrapMap.caption = wrapMap.thead; -wrapMap.th = wrapMap.td; - -function getAll( context, tag ) { - var elems, elem, - i = 0, - found = typeof context.getElementsByTagName !== strundefined ? context.getElementsByTagName( tag || "*" ) : - typeof context.querySelectorAll !== strundefined ? context.querySelectorAll( tag || "*" ) : - undefined; - - if ( !found ) { - for ( found = [], elems = context.childNodes || context; (elem = elems[i]) != null; i++ ) { - if ( !tag || jQuery.nodeName( elem, tag ) ) { - found.push( elem ); - } else { - jQuery.merge( found, getAll( elem, tag ) ); - } - } - } - - return tag === undefined || tag && jQuery.nodeName( context, tag ) ? - jQuery.merge( [ context ], found ) : - found; -} - -// Used in buildFragment, fixes the defaultChecked property -function fixDefaultChecked( elem ) { - if ( rcheckableType.test( elem.type ) ) { - elem.defaultChecked = elem.checked; - } -} - -// Support: IE<8 -// Manipulating tables requires a tbody -function manipulationTarget( elem, content ) { - return jQuery.nodeName( elem, "table" ) && - jQuery.nodeName( content.nodeType !== 11 ? content : content.firstChild, "tr" ) ? - - elem.getElementsByTagName("tbody")[0] || - elem.appendChild( elem.ownerDocument.createElement("tbody") ) : - elem; -} - -// Replace/restore the type attribute of script elements for safe DOM manipulation -function disableScript( elem ) { - elem.type = (jQuery.find.attr( elem, "type" ) !== null) + "/" + elem.type; - return elem; -} -function restoreScript( elem ) { - var match = rscriptTypeMasked.exec( elem.type ); - if ( match ) { - elem.type = match[1]; - } else { - elem.removeAttribute("type"); - } - return elem; -} - -// Mark scripts as having already been evaluated -function setGlobalEval( elems, refElements ) { - var elem, - i = 0; - for ( ; (elem = elems[i]) != null; i++ ) { - jQuery._data( elem, "globalEval", !refElements || jQuery._data( refElements[i], "globalEval" ) ); - } -} - -function cloneCopyEvent( src, dest ) { - - if ( dest.nodeType !== 1 || !jQuery.hasData( src ) ) { - return; - } - - var type, i, l, - oldData = jQuery._data( src ), - curData = jQuery._data( dest, oldData ), - events = oldData.events; - - if ( events ) { - delete curData.handle; - curData.events = {}; - - for ( type in events ) { - for ( i = 0, l = events[ type ].length; i < l; i++ ) { - jQuery.event.add( dest, type, events[ type ][ i ] ); - } - } - } - - // make the cloned public data object a copy from the original - if ( curData.data ) { - curData.data = jQuery.extend( {}, curData.data ); - } -} - -function fixCloneNodeIssues( src, dest ) { - var nodeName, e, data; - - // We do not need to do anything for non-Elements - if ( dest.nodeType !== 1 ) { - return; - } - - nodeName = dest.nodeName.toLowerCase(); - - // IE6-8 copies events bound via attachEvent when using cloneNode. - if ( !support.noCloneEvent && dest[ jQuery.expando ] ) { - data = jQuery._data( dest ); - - for ( e in data.events ) { - jQuery.removeEvent( dest, e, data.handle ); - } - - // Event data gets referenced instead of copied if the expando gets copied too - dest.removeAttribute( jQuery.expando ); - } - - // IE blanks contents when cloning scripts, and tries to evaluate newly-set text - if ( nodeName === "script" && dest.text !== src.text ) { - disableScript( dest ).text = src.text; - restoreScript( dest ); - - // IE6-10 improperly clones children of object elements using classid. - // IE10 throws NoModificationAllowedError if parent is null, #12132. - } else if ( nodeName === "object" ) { - if ( dest.parentNode ) { - dest.outerHTML = src.outerHTML; - } - - // This path appears unavoidable for IE9. When cloning an object - // element in IE9, the outerHTML strategy above is not sufficient. - // If the src has innerHTML and the destination does not, - // copy the src.innerHTML into the dest.innerHTML. #10324 - if ( support.html5Clone && ( src.innerHTML && !jQuery.trim(dest.innerHTML) ) ) { - dest.innerHTML = src.innerHTML; - } - - } else if ( nodeName === "input" && rcheckableType.test( src.type ) ) { - // IE6-8 fails to persist the checked state of a cloned checkbox - // or radio button. Worse, IE6-7 fail to give the cloned element - // a checked appearance if the defaultChecked value isn't also set - - dest.defaultChecked = dest.checked = src.checked; - - // IE6-7 get confused and end up setting the value of a cloned - // checkbox/radio button to an empty string instead of "on" - if ( dest.value !== src.value ) { - dest.value = src.value; - } - - // IE6-8 fails to return the selected option to the default selected - // state when cloning options - } else if ( nodeName === "option" ) { - dest.defaultSelected = dest.selected = src.defaultSelected; - - // IE6-8 fails to set the defaultValue to the correct value when - // cloning other types of input fields - } else if ( nodeName === "input" || nodeName === "textarea" ) { - dest.defaultValue = src.defaultValue; - } -} - -jQuery.extend({ - clone: function( elem, dataAndEvents, deepDataAndEvents ) { - var destElements, node, clone, i, srcElements, - inPage = jQuery.contains( elem.ownerDocument, elem ); - - if ( support.html5Clone || jQuery.isXMLDoc(elem) || !rnoshimcache.test( "<" + elem.nodeName + ">" ) ) { - clone = elem.cloneNode( true ); - - // IE<=8 does not properly clone detached, unknown element nodes - } else { - fragmentDiv.innerHTML = elem.outerHTML; - fragmentDiv.removeChild( clone = fragmentDiv.firstChild ); - } - - if ( (!support.noCloneEvent || !support.noCloneChecked) && - (elem.nodeType === 1 || elem.nodeType === 11) && !jQuery.isXMLDoc(elem) ) { - - // We eschew Sizzle here for performance reasons: http://jsperf.com/getall-vs-sizzle/2 - destElements = getAll( clone ); - srcElements = getAll( elem ); - - // Fix all IE cloning issues - for ( i = 0; (node = srcElements[i]) != null; ++i ) { - // Ensure that the destination node is not null; Fixes #9587 - if ( destElements[i] ) { - fixCloneNodeIssues( node, destElements[i] ); - } - } - } - - // Copy the events from the original to the clone - if ( dataAndEvents ) { - if ( deepDataAndEvents ) { - srcElements = srcElements || getAll( elem ); - destElements = destElements || getAll( clone ); - - for ( i = 0; (node = srcElements[i]) != null; i++ ) { - cloneCopyEvent( node, destElements[i] ); - } - } else { - cloneCopyEvent( elem, clone ); - } - } - - // Preserve script evaluation history - destElements = getAll( clone, "script" ); - if ( destElements.length > 0 ) { - setGlobalEval( destElements, !inPage && getAll( elem, "script" ) ); - } - - destElements = srcElements = node = null; - - // Return the cloned set - return clone; - }, - - buildFragment: function( elems, context, scripts, selection ) { - var j, elem, contains, - tmp, tag, tbody, wrap, - l = elems.length, - - // Ensure a safe fragment - safe = createSafeFragment( context ), - - nodes = [], - i = 0; - - for ( ; i < l; i++ ) { - elem = elems[ i ]; - - if ( elem || elem === 0 ) { - - // Add nodes directly - if ( jQuery.type( elem ) === "object" ) { - jQuery.merge( nodes, elem.nodeType ? [ elem ] : elem ); - - // Convert non-html into a text node - } else if ( !rhtml.test( elem ) ) { - nodes.push( context.createTextNode( elem ) ); - - // Convert html into DOM nodes - } else { - tmp = tmp || safe.appendChild( context.createElement("div") ); - - // Deserialize a standard representation - tag = (rtagName.exec( elem ) || [ "", "" ])[ 1 ].toLowerCase(); - wrap = wrapMap[ tag ] || wrapMap._default; - - tmp.innerHTML = wrap[1] + elem.replace( rxhtmlTag, "<$1>" ) + wrap[2]; - - // Descend through wrappers to the right content - j = wrap[0]; - while ( j-- ) { - tmp = tmp.lastChild; - } - - // Manually add leading whitespace removed by IE - if ( !support.leadingWhitespace && rleadingWhitespace.test( elem ) ) { - nodes.push( context.createTextNode( rleadingWhitespace.exec( elem )[0] ) ); - } - - // Remove IE's autoinserted from table fragments - if ( !support.tbody ) { - - // String was a , *may* have spurious - elem = tag === "table" && !rtbody.test( elem ) ? - tmp.firstChild : - - // String was a bare or - wrap[1] === "
" && !rtbody.test( elem ) ? - tmp : - 0; - - j = elem && elem.childNodes.length; - while ( j-- ) { - if ( jQuery.nodeName( (tbody = elem.childNodes[j]), "tbody" ) && !tbody.childNodes.length ) { - elem.removeChild( tbody ); - } - } - } - - jQuery.merge( nodes, tmp.childNodes ); - - // Fix #12392 for WebKit and IE > 9 - tmp.textContent = ""; - - // Fix #12392 for oldIE - while ( tmp.firstChild ) { - tmp.removeChild( tmp.firstChild ); - } - - // Remember the top-level container for proper cleanup - tmp = safe.lastChild; - } - } - } - - // Fix #11356: Clear elements from fragment - if ( tmp ) { - safe.removeChild( tmp ); - } - - // Reset defaultChecked for any radios and checkboxes - // about to be appended to the DOM in IE 6/7 (#8060) - if ( !support.appendChecked ) { - jQuery.grep( getAll( nodes, "input" ), fixDefaultChecked ); - } - - i = 0; - while ( (elem = nodes[ i++ ]) ) { - - // #4087 - If origin and destination elements are the same, and this is - // that element, do not do anything - if ( selection && jQuery.inArray( elem, selection ) !== -1 ) { - continue; - } - - contains = jQuery.contains( elem.ownerDocument, elem ); - - // Append to fragment - tmp = getAll( safe.appendChild( elem ), "script" ); - - // Preserve script evaluation history - if ( contains ) { - setGlobalEval( tmp ); - } - - // Capture executables - if ( scripts ) { - j = 0; - while ( (elem = tmp[ j++ ]) ) { - if ( rscriptType.test( elem.type || "" ) ) { - scripts.push( elem ); - } - } - } - } - - tmp = null; - - return safe; - }, - - cleanData: function( elems, /* internal */ acceptData ) { - var elem, type, id, data, - i = 0, - internalKey = jQuery.expando, - cache = jQuery.cache, - deleteExpando = support.deleteExpando, - special = jQuery.event.special; - - for ( ; (elem = elems[i]) != null; i++ ) { - if ( acceptData || jQuery.acceptData( elem ) ) { - - id = elem[ internalKey ]; - data = id && cache[ id ]; - - if ( data ) { - if ( data.events ) { - for ( type in data.events ) { - if ( special[ type ] ) { - jQuery.event.remove( elem, type ); - - // This is a shortcut to avoid jQuery.event.remove's overhead - } else { - jQuery.removeEvent( elem, type, data.handle ); - } - } - } - - // Remove cache only if it was not already removed by jQuery.event.remove - if ( cache[ id ] ) { - - delete cache[ id ]; - - // IE does not allow us to delete expando properties from nodes, - // nor does it have a removeAttribute function on Document nodes; - // we must handle all of these cases - if ( deleteExpando ) { - delete elem[ internalKey ]; - - } else if ( typeof elem.removeAttribute !== strundefined ) { - elem.removeAttribute( internalKey ); - - } else { - elem[ internalKey ] = null; - } - - deletedIds.push( id ); - } - } - } - } - } -}); - -jQuery.fn.extend({ - text: function( value ) { - return access( this, function( value ) { - return value === undefined ? - jQuery.text( this ) : - this.empty().append( ( this[0] && this[0].ownerDocument || document ).createTextNode( value ) ); - }, null, value, arguments.length ); - }, - - append: function() { - return this.domManip( arguments, function( elem ) { - if ( this.nodeType === 1 || this.nodeType === 11 || this.nodeType === 9 ) { - var target = manipulationTarget( this, elem ); - target.appendChild( elem ); - } - }); - }, - - prepend: function() { - return this.domManip( arguments, function( elem ) { - if ( this.nodeType === 1 || this.nodeType === 11 || this.nodeType === 9 ) { - var target = manipulationTarget( this, elem ); - target.insertBefore( elem, target.firstChild ); - } - }); - }, - - before: function() { - return this.domManip( arguments, function( elem ) { - if ( this.parentNode ) { - this.parentNode.insertBefore( elem, this ); - } - }); - }, - - after: function() { - return this.domManip( arguments, function( elem ) { - if ( this.parentNode ) { - this.parentNode.insertBefore( elem, this.nextSibling ); - } - }); - }, - - remove: function( selector, keepData /* Internal Use Only */ ) { - var elem, - elems = selector ? jQuery.filter( selector, this ) : this, - i = 0; - - for ( ; (elem = elems[i]) != null; i++ ) { - - if ( !keepData && elem.nodeType === 1 ) { - jQuery.cleanData( getAll( elem ) ); - } - - if ( elem.parentNode ) { - if ( keepData && jQuery.contains( elem.ownerDocument, elem ) ) { - setGlobalEval( getAll( elem, "script" ) ); - } - elem.parentNode.removeChild( elem ); - } - } - - return this; - }, - - empty: function() { - var elem, - i = 0; - - for ( ; (elem = this[i]) != null; i++ ) { - // Remove element nodes and prevent memory leaks - if ( elem.nodeType === 1 ) { - jQuery.cleanData( getAll( elem, false ) ); - } - - // Remove any remaining nodes - while ( elem.firstChild ) { - elem.removeChild( elem.firstChild ); - } - - // If this is a select, ensure that it displays empty (#12336) - // Support: IE<9 - if ( elem.options && jQuery.nodeName( elem, "select" ) ) { - elem.options.length = 0; - } - } - - return this; - }, - - clone: function( dataAndEvents, deepDataAndEvents ) { - dataAndEvents = dataAndEvents == null ? false : dataAndEvents; - deepDataAndEvents = deepDataAndEvents == null ? dataAndEvents : deepDataAndEvents; - - return this.map(function() { - return jQuery.clone( this, dataAndEvents, deepDataAndEvents ); - }); - }, - - html: function( value ) { - return access( this, function( value ) { - var elem = this[ 0 ] || {}, - i = 0, - l = this.length; - - if ( value === undefined ) { - return elem.nodeType === 1 ? - elem.innerHTML.replace( rinlinejQuery, "" ) : - undefined; - } - - // See if we can take a shortcut and just use innerHTML - if ( typeof value === "string" && !rnoInnerhtml.test( value ) && - ( support.htmlSerialize || !rnoshimcache.test( value ) ) && - ( support.leadingWhitespace || !rleadingWhitespace.test( value ) ) && - !wrapMap[ (rtagName.exec( value ) || [ "", "" ])[ 1 ].toLowerCase() ] ) { - - value = value.replace( rxhtmlTag, "<$1>" ); - - try { - for (; i < l; i++ ) { - // Remove element nodes and prevent memory leaks - elem = this[i] || {}; - if ( elem.nodeType === 1 ) { - jQuery.cleanData( getAll( elem, false ) ); - elem.innerHTML = value; - } - } - - elem = 0; - - // If using innerHTML throws an exception, use the fallback method - } catch(e) {} - } - - if ( elem ) { - this.empty().append( value ); - } - }, null, value, arguments.length ); - }, - - replaceWith: function() { - var arg = arguments[ 0 ]; - - // Make the changes, replacing each context element with the new content - this.domManip( arguments, function( elem ) { - arg = this.parentNode; - - jQuery.cleanData( getAll( this ) ); - - if ( arg ) { - arg.replaceChild( elem, this ); - } - }); - - // Force removal if there was no new content (e.g., from empty arguments) - return arg && (arg.length || arg.nodeType) ? this : this.remove(); - }, - - detach: function( selector ) { - return this.remove( selector, true ); - }, - - domManip: function( args, callback ) { - - // Flatten any nested arrays - args = concat.apply( [], args ); - - var first, node, hasScripts, - scripts, doc, fragment, - i = 0, - l = this.length, - set = this, - iNoClone = l - 1, - value = args[0], - isFunction = jQuery.isFunction( value ); - - // We can't cloneNode fragments that contain checked, in WebKit - if ( isFunction || - ( l > 1 && typeof value === "string" && - !support.checkClone && rchecked.test( value ) ) ) { - return this.each(function( index ) { - var self = set.eq( index ); - if ( isFunction ) { - args[0] = value.call( this, index, self.html() ); - } - self.domManip( args, callback ); - }); - } - - if ( l ) { - fragment = jQuery.buildFragment( args, this[ 0 ].ownerDocument, false, this ); - first = fragment.firstChild; - - if ( fragment.childNodes.length === 1 ) { - fragment = first; - } - - if ( first ) { - scripts = jQuery.map( getAll( fragment, "script" ), disableScript ); - hasScripts = scripts.length; - - // Use the original fragment for the last item instead of the first because it can end up - // being emptied incorrectly in certain situations (#8070). - for ( ; i < l; i++ ) { - node = fragment; - - if ( i !== iNoClone ) { - node = jQuery.clone( node, true, true ); - - // Keep references to cloned scripts for later restoration - if ( hasScripts ) { - jQuery.merge( scripts, getAll( node, "script" ) ); - } - } - - callback.call( this[i], node, i ); - } - - if ( hasScripts ) { - doc = scripts[ scripts.length - 1 ].ownerDocument; - - // Reenable scripts - jQuery.map( scripts, restoreScript ); - - // Evaluate executable scripts on first document insertion - for ( i = 0; i < hasScripts; i++ ) { - node = scripts[ i ]; - if ( rscriptType.test( node.type || "" ) && - !jQuery._data( node, "globalEval" ) && jQuery.contains( doc, node ) ) { - - if ( node.src ) { - // Optional AJAX dependency, but won't run scripts if not present - if ( jQuery._evalUrl ) { - jQuery._evalUrl( node.src ); - } - } else { - jQuery.globalEval( ( node.text || node.textContent || node.innerHTML || "" ).replace( rcleanScript, "" ) ); - } - } - } - } - - // Fix #11809: Avoid leaking memory - fragment = first = null; - } - } - - return this; - } -}); - -jQuery.each({ - appendTo: "append", - prependTo: "prepend", - insertBefore: "before", - insertAfter: "after", - replaceAll: "replaceWith" -}, function( name, original ) { - jQuery.fn[ name ] = function( selector ) { - var elems, - i = 0, - ret = [], - insert = jQuery( selector ), - last = insert.length - 1; - - for ( ; i <= last; i++ ) { - elems = i === last ? this : this.clone(true); - jQuery( insert[i] )[ original ]( elems ); - - // Modern browsers can apply jQuery collections as arrays, but oldIE needs a .get() - push.apply( ret, elems.get() ); - } - - return this.pushStack( ret ); - }; -}); - - -var iframe, - elemdisplay = {}; - -/** - * Retrieve the actual display of a element - * @param {String} name nodeName of the element - * @param {Object} doc Document object - */ -// Called only from within defaultDisplay -function actualDisplay( name, doc ) { - var style, - elem = jQuery( doc.createElement( name ) ).appendTo( doc.body ), - - // getDefaultComputedStyle might be reliably used only on attached element - display = window.getDefaultComputedStyle && ( style = window.getDefaultComputedStyle( elem[ 0 ] ) ) ? - - // Use of this method is a temporary fix (more like optmization) until something better comes along, - // since it was removed from specification and supported only in FF - style.display : jQuery.css( elem[ 0 ], "display" ); - - // We don't have any data stored on the element, - // so use "detach" method as fast way to get rid of the element - elem.detach(); - - return display; -} - -/** - * Try to determine the default display value of an element - * @param {String} nodeName - */ -function defaultDisplay( nodeName ) { - var doc = document, - display = elemdisplay[ nodeName ]; - - if ( !display ) { - display = actualDisplay( nodeName, doc ); - - // If the simple way fails, read from inside an iframe - if ( display === "none" || !display ) { - - // Use the already-created iframe if possible - iframe = (iframe || jQuery( "