Generating the test model outside of the class definition.

This commit is contained in:
Patrick Shriwise 2020-03-27 12:02:28 -05:00
parent 25fe1ef4f3
commit e2f230263f
9 changed files with 354 additions and 357 deletions

View file

@ -1,34 +1,34 @@
<?xml version='1.0' encoding='utf-8'?>
<geometry>
<cell id="13" material="13" name="fuel" region="9 -10 11 -12 13 -14" universe="9" />
<cell id="14" material="14" name="clad" region="(-9 | 10 | -11 | 12 | -13 | 14) (15 -16 17 -18 19 -20)" universe="9" />
<cell id="15" material="15" name="water" region="(-15 | 16 | -17 | 18 | -19 | 20) (21 -22 23 -24 25 -26)" universe="9" />
<surface coeffs="-5.0" id="9" name="minimum x" type="x-plane" />
<surface coeffs="5.0" id="10" name="maximum x" type="x-plane" />
<surface coeffs="-5.0" id="11" name="minimum y" type="y-plane" />
<surface coeffs="5.0" id="12" name="maximum y" type="y-plane" />
<surface coeffs="-5.0" id="13" name="minimum z" type="z-plane" />
<surface coeffs="5.0" id="14" name="maximum z" type="z-plane" />
<surface coeffs="-6.0" id="15" name="minimum x" type="x-plane" />
<surface coeffs="6.0" id="16" name="maximum x" type="x-plane" />
<surface coeffs="-6.0" id="17" name="minimum y" type="y-plane" />
<surface coeffs="6.0" id="18" name="maximum y" type="y-plane" />
<surface coeffs="-6.0" id="19" name="minimum z" type="z-plane" />
<surface coeffs="6.0" id="20" name="maximum z" type="z-plane" />
<surface boundary="vacuum" coeffs="-15" id="21" name="minimum x" type="x-plane" />
<surface boundary="vacuum" coeffs="15" id="22" name="maximum x" type="x-plane" />
<surface boundary="vacuum" coeffs="-15" id="23" name="minimum y" type="y-plane" />
<surface boundary="vacuum" coeffs="15" id="24" name="maximum y" type="y-plane" />
<surface boundary="vacuum" coeffs="-15" id="25" name="minimum z" type="z-plane" />
<surface boundary="vacuum" coeffs="15" id="26" name="maximum z" type="z-plane" />
<cell id="1" material="1" name="fuel" region="1 -2 3 -4 5 -6" universe="1" />
<cell id="2" material="2" name="clad" region="(-1 | 2 | -3 | 4 | -5 | 6) (7 -8 9 -10 11 -12)" universe="1" />
<cell id="3" material="3" name="water" region="(-7 | 8 | -9 | 10 | -11 | 12) (13 -14 15 -16 17 -18)" universe="1" />
<surface coeffs="-5.0" id="1" name="minimum x" type="x-plane" />
<surface coeffs="5.0" id="2" name="maximum x" type="x-plane" />
<surface coeffs="-5.0" id="3" name="minimum y" type="y-plane" />
<surface coeffs="5.0" id="4" name="maximum y" type="y-plane" />
<surface coeffs="-5.0" id="5" name="minimum z" type="z-plane" />
<surface coeffs="5.0" id="6" name="maximum z" type="z-plane" />
<surface coeffs="-6.0" id="7" name="minimum x" type="x-plane" />
<surface coeffs="6.0" id="8" name="maximum x" type="x-plane" />
<surface coeffs="-6.0" id="9" name="minimum y" type="y-plane" />
<surface coeffs="6.0" id="10" name="maximum y" type="y-plane" />
<surface coeffs="-6.0" id="11" name="minimum z" type="z-plane" />
<surface coeffs="6.0" id="12" name="maximum z" type="z-plane" />
<surface boundary="vacuum" coeffs="-15" id="13" name="minimum x" type="x-plane" />
<surface boundary="vacuum" coeffs="15" id="14" name="maximum x" type="x-plane" />
<surface boundary="vacuum" coeffs="-15" id="15" name="minimum y" type="y-plane" />
<surface boundary="vacuum" coeffs="15" id="16" name="maximum y" type="y-plane" />
<surface boundary="vacuum" coeffs="-15" id="17" name="minimum z" type="z-plane" />
<surface boundary="vacuum" coeffs="15" id="18" name="maximum z" type="z-plane" />
</geometry>
<?xml version='1.0' encoding='utf-8'?>
<materials>
<material depletable="true" id="13" name="fuel">
<material depletable="true" id="1" name="fuel">
<density units="g/cc" value="4.5" />
<nuclide ao="1.0" name="U235" />
</material>
<material id="14" name="zircaloy">
<material id="2" name="zircaloy">
<density units="g/cc" value="5.77" />
<nuclide ao="0.5145" name="Zr90" />
<nuclide ao="0.1122" name="Zr91" />
@ -36,7 +36,7 @@
<nuclide ao="0.1738" name="Zr94" />
<nuclide ao="0.028" name="Zr96" />
</material>
<material id="15" name="water">
<material id="3" name="water">
<density units="atom/b-cm" value="0.07416" />
<nuclide ao="2.0" name="H1" />
<nuclide ao="1.0" name="O16" />

View file

@ -1,34 +1,34 @@
<?xml version='1.0' encoding='utf-8'?>
<geometry>
<cell id="16" material="16" name="fuel" region="27 -28 29 -30 40 -41" universe="10" />
<cell id="17" material="17" name="clad" region="(-27 | 28 | -29 | 30 | -40 | 41) (42 -43 44 -45 46 -47)" universe="10" />
<cell id="18" material="18" name="water" region="(-42 | 43 | -44 | 45 | -46 | 47) (48 -49 50 -51 52 -53)" universe="10" />
<surface coeffs="-5.0" id="27" name="minimum x" type="x-plane" />
<surface coeffs="5.0" id="28" name="maximum x" type="x-plane" />
<surface coeffs="-5.0" id="29" name="minimum y" type="y-plane" />
<surface coeffs="5.0" id="30" name="maximum y" type="y-plane" />
<surface coeffs="-5.0" id="40" name="minimum z" type="z-plane" />
<surface coeffs="5.0" id="41" name="maximum z" type="z-plane" />
<surface coeffs="-6.0" id="42" name="minimum x" type="x-plane" />
<surface coeffs="6.0" id="43" name="maximum x" type="x-plane" />
<surface coeffs="-6.0" id="44" name="minimum y" type="y-plane" />
<surface coeffs="6.0" id="45" name="maximum y" type="y-plane" />
<surface coeffs="-6.0" id="46" name="minimum z" type="z-plane" />
<surface coeffs="6.0" id="47" name="maximum z" type="z-plane" />
<surface boundary="vacuum" coeffs="-15" id="48" name="minimum x" type="x-plane" />
<surface boundary="vacuum" coeffs="15" id="49" name="maximum x" type="x-plane" />
<surface boundary="vacuum" coeffs="-15" id="50" name="minimum y" type="y-plane" />
<surface boundary="vacuum" coeffs="15" id="51" name="maximum y" type="y-plane" />
<surface boundary="vacuum" coeffs="-15" id="52" name="minimum z" type="z-plane" />
<surface boundary="vacuum" coeffs="15" id="53" name="maximum z" type="z-plane" />
<cell id="4" material="4" name="fuel" region="19 -20 21 -22 23 -24" universe="2" />
<cell id="5" material="5" name="clad" region="(-19 | 20 | -21 | 22 | -23 | 24) (25 -26 27 -28 29 -30)" universe="2" />
<cell id="6" material="6" name="water" region="(-25 | 26 | -27 | 28 | -29 | 30) (31 -32 33 -34 35 -36)" universe="2" />
<surface coeffs="-5.0" id="19" name="minimum x" type="x-plane" />
<surface coeffs="5.0" id="20" name="maximum x" type="x-plane" />
<surface coeffs="-5.0" id="21" name="minimum y" type="y-plane" />
<surface coeffs="5.0" id="22" name="maximum y" type="y-plane" />
<surface coeffs="-5.0" id="23" name="minimum z" type="z-plane" />
<surface coeffs="5.0" id="24" name="maximum z" type="z-plane" />
<surface coeffs="-6.0" id="25" name="minimum x" type="x-plane" />
<surface coeffs="6.0" id="26" name="maximum x" type="x-plane" />
<surface coeffs="-6.0" id="27" name="minimum y" type="y-plane" />
<surface coeffs="6.0" id="28" name="maximum y" type="y-plane" />
<surface coeffs="-6.0" id="29" name="minimum z" type="z-plane" />
<surface coeffs="6.0" id="30" name="maximum z" type="z-plane" />
<surface boundary="vacuum" coeffs="-15" id="31" name="minimum x" type="x-plane" />
<surface boundary="vacuum" coeffs="15" id="32" name="maximum x" type="x-plane" />
<surface boundary="vacuum" coeffs="-15" id="33" name="minimum y" type="y-plane" />
<surface boundary="vacuum" coeffs="15" id="34" name="maximum y" type="y-plane" />
<surface boundary="vacuum" coeffs="-15" id="35" name="minimum z" type="z-plane" />
<surface boundary="vacuum" coeffs="15" id="36" name="maximum z" type="z-plane" />
</geometry>
<?xml version='1.0' encoding='utf-8'?>
<materials>
<material depletable="true" id="16" name="fuel">
<material depletable="true" id="4" name="fuel">
<density units="g/cc" value="4.5" />
<nuclide ao="1.0" name="U235" />
</material>
<material id="17" name="zircaloy">
<material id="5" name="zircaloy">
<density units="g/cc" value="5.77" />
<nuclide ao="0.5145" name="Zr90" />
<nuclide ao="0.1122" name="Zr91" />
@ -36,7 +36,7 @@
<nuclide ao="0.1738" name="Zr94" />
<nuclide ao="0.028" name="Zr96" />
</material>
<material id="18" name="water">
<material id="6" name="water">
<density units="atom/b-cm" value="0.07416" />
<nuclide ao="2.0" name="H1" />
<nuclide ao="1.0" name="O16" />

View file

@ -1,34 +1,34 @@
<?xml version='1.0' encoding='utf-8'?>
<geometry>
<cell id="19" material="19" name="fuel" region="54 -55 56 -57 58 -59" universe="11" />
<cell id="20" material="20" name="clad" region="(-54 | 55 | -56 | 57 | -58 | 59) (60 -61 62 -63 64 -65)" universe="11" />
<cell id="33" material="21" name="water" region="(-60 | 61 | -62 | 63 | -64 | 65) (66 -67 68 -69 70 -71)" universe="11" />
<surface coeffs="-5.0" id="54" name="minimum x" type="x-plane" />
<surface coeffs="5.0" id="55" name="maximum x" type="x-plane" />
<surface coeffs="-5.0" id="56" name="minimum y" type="y-plane" />
<surface coeffs="5.0" id="57" name="maximum y" type="y-plane" />
<surface coeffs="-5.0" id="58" name="minimum z" type="z-plane" />
<surface coeffs="5.0" id="59" name="maximum z" type="z-plane" />
<surface coeffs="-6.0" id="60" name="minimum x" type="x-plane" />
<surface coeffs="6.0" id="61" name="maximum x" type="x-plane" />
<surface coeffs="-6.0" id="62" name="minimum y" type="y-plane" />
<surface coeffs="6.0" id="63" name="maximum y" type="y-plane" />
<surface coeffs="-6.0" id="64" name="minimum z" type="z-plane" />
<surface coeffs="6.0" id="65" name="maximum z" type="z-plane" />
<surface boundary="vacuum" coeffs="-10" id="66" name="minimum x" type="x-plane" />
<surface boundary="vacuum" coeffs="10" id="67" name="maximum x" type="x-plane" />
<surface boundary="vacuum" coeffs="-10" id="68" name="minimum y" type="y-plane" />
<surface boundary="vacuum" coeffs="10" id="69" name="maximum y" type="y-plane" />
<surface boundary="vacuum" coeffs="-10" id="70" name="minimum z" type="z-plane" />
<surface boundary="vacuum" coeffs="10" id="71" name="maximum z" type="z-plane" />
<cell id="7" material="7" name="fuel" region="37 -38 39 -40 41 -42" universe="3" />
<cell id="8" material="8" name="clad" region="(-37 | 38 | -39 | 40 | -41 | 42) (43 -44 45 -46 47 -48)" universe="3" />
<cell id="9" material="9" name="water" region="(-43 | 44 | -45 | 46 | -47 | 48) (49 -50 51 -52 53 -54)" universe="3" />
<surface coeffs="-5.0" id="37" name="minimum x" type="x-plane" />
<surface coeffs="5.0" id="38" name="maximum x" type="x-plane" />
<surface coeffs="-5.0" id="39" name="minimum y" type="y-plane" />
<surface coeffs="5.0" id="40" name="maximum y" type="y-plane" />
<surface coeffs="-5.0" id="41" name="minimum z" type="z-plane" />
<surface coeffs="5.0" id="42" name="maximum z" type="z-plane" />
<surface coeffs="-6.0" id="43" name="minimum x" type="x-plane" />
<surface coeffs="6.0" id="44" name="maximum x" type="x-plane" />
<surface coeffs="-6.0" id="45" name="minimum y" type="y-plane" />
<surface coeffs="6.0" id="46" name="maximum y" type="y-plane" />
<surface coeffs="-6.0" id="47" name="minimum z" type="z-plane" />
<surface coeffs="6.0" id="48" name="maximum z" type="z-plane" />
<surface boundary="vacuum" coeffs="-10" id="49" name="minimum x" type="x-plane" />
<surface boundary="vacuum" coeffs="10" id="50" name="maximum x" type="x-plane" />
<surface boundary="vacuum" coeffs="-10" id="51" name="minimum y" type="y-plane" />
<surface boundary="vacuum" coeffs="10" id="52" name="maximum y" type="y-plane" />
<surface boundary="vacuum" coeffs="-10" id="53" name="minimum z" type="z-plane" />
<surface boundary="vacuum" coeffs="10" id="54" name="maximum z" type="z-plane" />
</geometry>
<?xml version='1.0' encoding='utf-8'?>
<materials>
<material depletable="true" id="19" name="fuel">
<material depletable="true" id="7" name="fuel">
<density units="g/cc" value="4.5" />
<nuclide ao="1.0" name="U235" />
</material>
<material id="20" name="zircaloy">
<material id="8" name="zircaloy">
<density units="g/cc" value="5.77" />
<nuclide ao="0.5145" name="Zr90" />
<nuclide ao="0.1122" name="Zr91" />
@ -36,7 +36,7 @@
<nuclide ao="0.1738" name="Zr94" />
<nuclide ao="0.028" name="Zr96" />
</material>
<material id="21" name="water">
<material id="9" name="water">
<density units="atom/b-cm" value="0.07416" />
<nuclide ao="2.0" name="H1" />
<nuclide ao="1.0" name="O16" />

View file

@ -1,34 +1,34 @@
<?xml version='1.0' encoding='utf-8'?>
<geometry>
<cell id="34" material="22" name="fuel" region="72 -73 74 -75 76 -77" universe="12" />
<cell id="35" material="23" name="clad" region="(-72 | 73 | -74 | 75 | -76 | 77) (78 -79 80 -81 82 -83)" universe="12" />
<cell id="36" material="24" name="water" region="(-78 | 79 | -80 | 81 | -82 | 83) (84 -85 86 -87 88 -89)" universe="12" />
<surface coeffs="-5.0" id="72" name="minimum x" type="x-plane" />
<surface coeffs="5.0" id="73" name="maximum x" type="x-plane" />
<surface coeffs="-5.0" id="74" name="minimum y" type="y-plane" />
<surface coeffs="5.0" id="75" name="maximum y" type="y-plane" />
<surface coeffs="-5.0" id="76" name="minimum z" type="z-plane" />
<surface coeffs="5.0" id="77" name="maximum z" type="z-plane" />
<surface coeffs="-6.0" id="78" name="minimum x" type="x-plane" />
<surface coeffs="6.0" id="79" name="maximum x" type="x-plane" />
<surface coeffs="-6.0" id="80" name="minimum y" type="y-plane" />
<surface coeffs="6.0" id="81" name="maximum y" type="y-plane" />
<surface coeffs="-6.0" id="82" name="minimum z" type="z-plane" />
<surface coeffs="6.0" id="83" name="maximum z" type="z-plane" />
<surface boundary="vacuum" coeffs="-10" id="84" name="minimum x" type="x-plane" />
<surface boundary="vacuum" coeffs="10" id="85" name="maximum x" type="x-plane" />
<surface boundary="vacuum" coeffs="-10" id="86" name="minimum y" type="y-plane" />
<surface boundary="vacuum" coeffs="10" id="87" name="maximum y" type="y-plane" />
<surface boundary="vacuum" coeffs="-10" id="88" name="minimum z" type="z-plane" />
<surface boundary="vacuum" coeffs="10" id="89" name="maximum z" type="z-plane" />
<cell id="10" material="10" name="fuel" region="55 -56 57 -58 59 -60" universe="4" />
<cell id="11" material="11" name="clad" region="(-55 | 56 | -57 | 58 | -59 | 60) (61 -62 63 -64 65 -66)" universe="4" />
<cell id="12" material="12" name="water" region="(-61 | 62 | -63 | 64 | -65 | 66) (67 -68 69 -70 71 -72)" universe="4" />
<surface coeffs="-5.0" id="55" name="minimum x" type="x-plane" />
<surface coeffs="5.0" id="56" name="maximum x" type="x-plane" />
<surface coeffs="-5.0" id="57" name="minimum y" type="y-plane" />
<surface coeffs="5.0" id="58" name="maximum y" type="y-plane" />
<surface coeffs="-5.0" id="59" name="minimum z" type="z-plane" />
<surface coeffs="5.0" id="60" name="maximum z" type="z-plane" />
<surface coeffs="-6.0" id="61" name="minimum x" type="x-plane" />
<surface coeffs="6.0" id="62" name="maximum x" type="x-plane" />
<surface coeffs="-6.0" id="63" name="minimum y" type="y-plane" />
<surface coeffs="6.0" id="64" name="maximum y" type="y-plane" />
<surface coeffs="-6.0" id="65" name="minimum z" type="z-plane" />
<surface coeffs="6.0" id="66" name="maximum z" type="z-plane" />
<surface boundary="vacuum" coeffs="-10" id="67" name="minimum x" type="x-plane" />
<surface boundary="vacuum" coeffs="10" id="68" name="maximum x" type="x-plane" />
<surface boundary="vacuum" coeffs="-10" id="69" name="minimum y" type="y-plane" />
<surface boundary="vacuum" coeffs="10" id="70" name="maximum y" type="y-plane" />
<surface boundary="vacuum" coeffs="-10" id="71" name="minimum z" type="z-plane" />
<surface boundary="vacuum" coeffs="10" id="72" name="maximum z" type="z-plane" />
</geometry>
<?xml version='1.0' encoding='utf-8'?>
<materials>
<material depletable="true" id="22" name="fuel">
<material depletable="true" id="10" name="fuel">
<density units="g/cc" value="4.5" />
<nuclide ao="1.0" name="U235" />
</material>
<material id="23" name="zircaloy">
<material id="11" name="zircaloy">
<density units="g/cc" value="5.77" />
<nuclide ao="0.5145" name="Zr90" />
<nuclide ao="0.1122" name="Zr91" />
@ -36,7 +36,7 @@
<nuclide ao="0.1738" name="Zr94" />
<nuclide ao="0.028" name="Zr96" />
</material>
<material id="24" name="water">
<material id="12" name="water">
<density units="atom/b-cm" value="0.07416" />
<nuclide ao="2.0" name="H1" />
<nuclide ao="1.0" name="O16" />

View file

@ -1,34 +1,34 @@
<?xml version='1.0' encoding='utf-8'?>
<geometry>
<cell id="37" material="25" name="fuel" region="90 -91 92 -93 94 -95" universe="13" />
<cell id="38" material="26" name="clad" region="(-90 | 91 | -92 | 93 | -94 | 95) (96 -97 98 -99 100 -101)" universe="13" />
<cell id="39" material="27" name="water" region="(-96 | 97 | -98 | 99 | -100 | 101) (102 -103 104 -105 106 -107)" universe="13" />
<surface coeffs="-5.0" id="90" name="minimum x" type="x-plane" />
<surface coeffs="5.0" id="91" name="maximum x" type="x-plane" />
<surface coeffs="-5.0" id="92" name="minimum y" type="y-plane" />
<surface coeffs="5.0" id="93" name="maximum y" type="y-plane" />
<surface coeffs="-5.0" id="94" name="minimum z" type="z-plane" />
<surface coeffs="5.0" id="95" name="maximum z" type="z-plane" />
<surface coeffs="-6.0" id="96" name="minimum x" type="x-plane" />
<surface coeffs="6.0" id="97" name="maximum x" type="x-plane" />
<surface coeffs="-6.0" id="98" name="minimum y" type="y-plane" />
<surface coeffs="6.0" id="99" name="maximum y" type="y-plane" />
<surface coeffs="-6.0" id="100" name="minimum z" type="z-plane" />
<surface coeffs="6.0" id="101" name="maximum z" type="z-plane" />
<surface boundary="vacuum" coeffs="-15" id="102" name="minimum x" type="x-plane" />
<surface boundary="vacuum" coeffs="15" id="103" name="maximum x" type="x-plane" />
<surface boundary="vacuum" coeffs="-15" id="104" name="minimum y" type="y-plane" />
<surface boundary="vacuum" coeffs="15" id="105" name="maximum y" type="y-plane" />
<surface boundary="vacuum" coeffs="-15" id="106" name="minimum z" type="z-plane" />
<surface boundary="vacuum" coeffs="15" id="107" name="maximum z" type="z-plane" />
<cell id="13" material="13" name="fuel" region="73 -74 75 -76 77 -78" universe="5" />
<cell id="14" material="14" name="clad" region="(-73 | 74 | -75 | 76 | -77 | 78) (79 -80 81 -82 83 -84)" universe="5" />
<cell id="15" material="15" name="water" region="(-79 | 80 | -81 | 82 | -83 | 84) (85 -86 87 -88 89 -90)" universe="5" />
<surface coeffs="-5.0" id="73" name="minimum x" type="x-plane" />
<surface coeffs="5.0" id="74" name="maximum x" type="x-plane" />
<surface coeffs="-5.0" id="75" name="minimum y" type="y-plane" />
<surface coeffs="5.0" id="76" name="maximum y" type="y-plane" />
<surface coeffs="-5.0" id="77" name="minimum z" type="z-plane" />
<surface coeffs="5.0" id="78" name="maximum z" type="z-plane" />
<surface coeffs="-6.0" id="79" name="minimum x" type="x-plane" />
<surface coeffs="6.0" id="80" name="maximum x" type="x-plane" />
<surface coeffs="-6.0" id="81" name="minimum y" type="y-plane" />
<surface coeffs="6.0" id="82" name="maximum y" type="y-plane" />
<surface coeffs="-6.0" id="83" name="minimum z" type="z-plane" />
<surface coeffs="6.0" id="84" name="maximum z" type="z-plane" />
<surface boundary="vacuum" coeffs="-15" id="85" name="minimum x" type="x-plane" />
<surface boundary="vacuum" coeffs="15" id="86" name="maximum x" type="x-plane" />
<surface boundary="vacuum" coeffs="-15" id="87" name="minimum y" type="y-plane" />
<surface boundary="vacuum" coeffs="15" id="88" name="maximum y" type="y-plane" />
<surface boundary="vacuum" coeffs="-15" id="89" name="minimum z" type="z-plane" />
<surface boundary="vacuum" coeffs="15" id="90" name="maximum z" type="z-plane" />
</geometry>
<?xml version='1.0' encoding='utf-8'?>
<materials>
<material depletable="true" id="25" name="fuel">
<material depletable="true" id="13" name="fuel">
<density units="g/cc" value="4.5" />
<nuclide ao="1.0" name="U235" />
</material>
<material id="26" name="zircaloy">
<material id="14" name="zircaloy">
<density units="g/cc" value="5.77" />
<nuclide ao="0.5145" name="Zr90" />
<nuclide ao="0.1122" name="Zr91" />
@ -36,7 +36,7 @@
<nuclide ao="0.1738" name="Zr94" />
<nuclide ao="0.028" name="Zr96" />
</material>
<material id="27" name="water">
<material id="15" name="water">
<density units="atom/b-cm" value="0.07416" />
<nuclide ao="2.0" name="H1" />
<nuclide ao="1.0" name="O16" />

View file

@ -1,34 +1,34 @@
<?xml version='1.0' encoding='utf-8'?>
<geometry>
<cell id="40" material="28" name="fuel" region="108 -109 110 -111 112 -113" universe="14" />
<cell id="41" material="29" name="clad" region="(-108 | 109 | -110 | 111 | -112 | 113) (114 -115 116 -117 118 -119)" universe="14" />
<cell id="42" material="30" name="water" region="(-114 | 115 | -116 | 117 | -118 | 119) (120 -121 122 -123 124 -125)" universe="14" />
<surface coeffs="-5.0" id="108" name="minimum x" type="x-plane" />
<surface coeffs="5.0" id="109" name="maximum x" type="x-plane" />
<surface coeffs="-5.0" id="110" name="minimum y" type="y-plane" />
<surface coeffs="5.0" id="111" name="maximum y" type="y-plane" />
<surface coeffs="-5.0" id="112" name="minimum z" type="z-plane" />
<surface coeffs="5.0" id="113" name="maximum z" type="z-plane" />
<surface coeffs="-6.0" id="114" name="minimum x" type="x-plane" />
<surface coeffs="6.0" id="115" name="maximum x" type="x-plane" />
<surface coeffs="-6.0" id="116" name="minimum y" type="y-plane" />
<surface coeffs="6.0" id="117" name="maximum y" type="y-plane" />
<surface coeffs="-6.0" id="118" name="minimum z" type="z-plane" />
<surface coeffs="6.0" id="119" name="maximum z" type="z-plane" />
<surface boundary="vacuum" coeffs="-15" id="120" name="minimum x" type="x-plane" />
<surface boundary="vacuum" coeffs="15" id="121" name="maximum x" type="x-plane" />
<surface boundary="vacuum" coeffs="-15" id="122" name="minimum y" type="y-plane" />
<surface boundary="vacuum" coeffs="15" id="123" name="maximum y" type="y-plane" />
<surface boundary="vacuum" coeffs="-15" id="124" name="minimum z" type="z-plane" />
<surface boundary="vacuum" coeffs="15" id="125" name="maximum z" type="z-plane" />
<cell id="16" material="16" name="fuel" region="91 -92 93 -94 95 -96" universe="6" />
<cell id="17" material="17" name="clad" region="(-91 | 92 | -93 | 94 | -95 | 96) (97 -98 99 -100 101 -102)" universe="6" />
<cell id="18" material="18" name="water" region="(-97 | 98 | -99 | 100 | -101 | 102) (103 -104 105 -106 107 -108)" universe="6" />
<surface coeffs="-5.0" id="91" name="minimum x" type="x-plane" />
<surface coeffs="5.0" id="92" name="maximum x" type="x-plane" />
<surface coeffs="-5.0" id="93" name="minimum y" type="y-plane" />
<surface coeffs="5.0" id="94" name="maximum y" type="y-plane" />
<surface coeffs="-5.0" id="95" name="minimum z" type="z-plane" />
<surface coeffs="5.0" id="96" name="maximum z" type="z-plane" />
<surface coeffs="-6.0" id="97" name="minimum x" type="x-plane" />
<surface coeffs="6.0" id="98" name="maximum x" type="x-plane" />
<surface coeffs="-6.0" id="99" name="minimum y" type="y-plane" />
<surface coeffs="6.0" id="100" name="maximum y" type="y-plane" />
<surface coeffs="-6.0" id="101" name="minimum z" type="z-plane" />
<surface coeffs="6.0" id="102" name="maximum z" type="z-plane" />
<surface boundary="vacuum" coeffs="-15" id="103" name="minimum x" type="x-plane" />
<surface boundary="vacuum" coeffs="15" id="104" name="maximum x" type="x-plane" />
<surface boundary="vacuum" coeffs="-15" id="105" name="minimum y" type="y-plane" />
<surface boundary="vacuum" coeffs="15" id="106" name="maximum y" type="y-plane" />
<surface boundary="vacuum" coeffs="-15" id="107" name="minimum z" type="z-plane" />
<surface boundary="vacuum" coeffs="15" id="108" name="maximum z" type="z-plane" />
</geometry>
<?xml version='1.0' encoding='utf-8'?>
<materials>
<material depletable="true" id="28" name="fuel">
<material depletable="true" id="16" name="fuel">
<density units="g/cc" value="4.5" />
<nuclide ao="1.0" name="U235" />
</material>
<material id="29" name="zircaloy">
<material id="17" name="zircaloy">
<density units="g/cc" value="5.77" />
<nuclide ao="0.5145" name="Zr90" />
<nuclide ao="0.1122" name="Zr91" />
@ -36,7 +36,7 @@
<nuclide ao="0.1738" name="Zr94" />
<nuclide ao="0.028" name="Zr96" />
</material>
<material id="30" name="water">
<material id="18" name="water">
<density units="atom/b-cm" value="0.07416" />
<nuclide ao="2.0" name="H1" />
<nuclide ao="1.0" name="O16" />

View file

@ -1,34 +1,34 @@
<?xml version='1.0' encoding='utf-8'?>
<geometry>
<cell id="43" material="31" name="fuel" region="126 -127 128 -129 130 -131" universe="15" />
<cell id="44" material="32" name="clad" region="(-126 | 127 | -128 | 129 | -130 | 131) (132 -133 134 -135 136 -137)" universe="15" />
<cell id="45" material="33" name="water" region="(-132 | 133 | -134 | 135 | -136 | 137) (138 -139 140 -141 142 -143)" universe="15" />
<surface coeffs="-5.0" id="126" name="minimum x" type="x-plane" />
<surface coeffs="5.0" id="127" name="maximum x" type="x-plane" />
<surface coeffs="-5.0" id="128" name="minimum y" type="y-plane" />
<surface coeffs="5.0" id="129" name="maximum y" type="y-plane" />
<surface coeffs="-5.0" id="130" name="minimum z" type="z-plane" />
<surface coeffs="5.0" id="131" name="maximum z" type="z-plane" />
<surface coeffs="-6.0" id="132" name="minimum x" type="x-plane" />
<surface coeffs="6.0" id="133" name="maximum x" type="x-plane" />
<surface coeffs="-6.0" id="134" name="minimum y" type="y-plane" />
<surface coeffs="6.0" id="135" name="maximum y" type="y-plane" />
<surface coeffs="-6.0" id="136" name="minimum z" type="z-plane" />
<surface coeffs="6.0" id="137" name="maximum z" type="z-plane" />
<surface boundary="vacuum" coeffs="-10" id="138" name="minimum x" type="x-plane" />
<surface boundary="vacuum" coeffs="10" id="139" name="maximum x" type="x-plane" />
<surface boundary="vacuum" coeffs="-10" id="140" name="minimum y" type="y-plane" />
<surface boundary="vacuum" coeffs="10" id="141" name="maximum y" type="y-plane" />
<surface boundary="vacuum" coeffs="-10" id="142" name="minimum z" type="z-plane" />
<surface boundary="vacuum" coeffs="10" id="143" name="maximum z" type="z-plane" />
<cell id="19" material="19" name="fuel" region="109 -110 111 -112 113 -114" universe="7" />
<cell id="20" material="20" name="clad" region="(-109 | 110 | -111 | 112 | -113 | 114) (115 -116 117 -118 119 -120)" universe="7" />
<cell id="21" material="21" name="water" region="(-115 | 116 | -117 | 118 | -119 | 120) (121 -122 123 -124 125 -126)" universe="7" />
<surface coeffs="-5.0" id="109" name="minimum x" type="x-plane" />
<surface coeffs="5.0" id="110" name="maximum x" type="x-plane" />
<surface coeffs="-5.0" id="111" name="minimum y" type="y-plane" />
<surface coeffs="5.0" id="112" name="maximum y" type="y-plane" />
<surface coeffs="-5.0" id="113" name="minimum z" type="z-plane" />
<surface coeffs="5.0" id="114" name="maximum z" type="z-plane" />
<surface coeffs="-6.0" id="115" name="minimum x" type="x-plane" />
<surface coeffs="6.0" id="116" name="maximum x" type="x-plane" />
<surface coeffs="-6.0" id="117" name="minimum y" type="y-plane" />
<surface coeffs="6.0" id="118" name="maximum y" type="y-plane" />
<surface coeffs="-6.0" id="119" name="minimum z" type="z-plane" />
<surface coeffs="6.0" id="120" name="maximum z" type="z-plane" />
<surface boundary="vacuum" coeffs="-10" id="121" name="minimum x" type="x-plane" />
<surface boundary="vacuum" coeffs="10" id="122" name="maximum x" type="x-plane" />
<surface boundary="vacuum" coeffs="-10" id="123" name="minimum y" type="y-plane" />
<surface boundary="vacuum" coeffs="10" id="124" name="maximum y" type="y-plane" />
<surface boundary="vacuum" coeffs="-10" id="125" name="minimum z" type="z-plane" />
<surface boundary="vacuum" coeffs="10" id="126" name="maximum z" type="z-plane" />
</geometry>
<?xml version='1.0' encoding='utf-8'?>
<materials>
<material depletable="true" id="31" name="fuel">
<material depletable="true" id="19" name="fuel">
<density units="g/cc" value="4.5" />
<nuclide ao="1.0" name="U235" />
</material>
<material id="32" name="zircaloy">
<material id="20" name="zircaloy">
<density units="g/cc" value="5.77" />
<nuclide ao="0.5145" name="Zr90" />
<nuclide ao="0.1122" name="Zr91" />
@ -36,7 +36,7 @@
<nuclide ao="0.1738" name="Zr94" />
<nuclide ao="0.028" name="Zr96" />
</material>
<material id="33" name="water">
<material id="21" name="water">
<density units="atom/b-cm" value="0.07416" />
<nuclide ao="2.0" name="H1" />
<nuclide ao="1.0" name="O16" />

View file

@ -1,34 +1,34 @@
<?xml version='1.0' encoding='utf-8'?>
<geometry>
<cell id="46" material="34" name="fuel" region="144 -145 146 -147 148 -149" universe="16" />
<cell id="47" material="35" name="clad" region="(-144 | 145 | -146 | 147 | -148 | 149) (150 -151 152 -153 154 -155)" universe="16" />
<cell id="48" material="36" name="water" region="(-150 | 151 | -152 | 153 | -154 | 155) (156 -157 158 -159 160 -161)" universe="16" />
<surface coeffs="-5.0" id="144" name="minimum x" type="x-plane" />
<surface coeffs="5.0" id="145" name="maximum x" type="x-plane" />
<surface coeffs="-5.0" id="146" name="minimum y" type="y-plane" />
<surface coeffs="5.0" id="147" name="maximum y" type="y-plane" />
<surface coeffs="-5.0" id="148" name="minimum z" type="z-plane" />
<surface coeffs="5.0" id="149" name="maximum z" type="z-plane" />
<surface coeffs="-6.0" id="150" name="minimum x" type="x-plane" />
<surface coeffs="6.0" id="151" name="maximum x" type="x-plane" />
<surface coeffs="-6.0" id="152" name="minimum y" type="y-plane" />
<surface coeffs="6.0" id="153" name="maximum y" type="y-plane" />
<surface coeffs="-6.0" id="154" name="minimum z" type="z-plane" />
<surface coeffs="6.0" id="155" name="maximum z" type="z-plane" />
<surface boundary="vacuum" coeffs="-10" id="156" name="minimum x" type="x-plane" />
<surface boundary="vacuum" coeffs="10" id="157" name="maximum x" type="x-plane" />
<surface boundary="vacuum" coeffs="-10" id="158" name="minimum y" type="y-plane" />
<surface boundary="vacuum" coeffs="10" id="159" name="maximum y" type="y-plane" />
<surface boundary="vacuum" coeffs="-10" id="160" name="minimum z" type="z-plane" />
<surface boundary="vacuum" coeffs="10" id="161" name="maximum z" type="z-plane" />
<cell id="22" material="22" name="fuel" region="127 -128 129 -130 131 -132" universe="8" />
<cell id="23" material="23" name="clad" region="(-127 | 128 | -129 | 130 | -131 | 132) (133 -134 135 -136 137 -138)" universe="8" />
<cell id="24" material="24" name="water" region="(-133 | 134 | -135 | 136 | -137 | 138) (139 -140 141 -142 143 -144)" universe="8" />
<surface coeffs="-5.0" id="127" name="minimum x" type="x-plane" />
<surface coeffs="5.0" id="128" name="maximum x" type="x-plane" />
<surface coeffs="-5.0" id="129" name="minimum y" type="y-plane" />
<surface coeffs="5.0" id="130" name="maximum y" type="y-plane" />
<surface coeffs="-5.0" id="131" name="minimum z" type="z-plane" />
<surface coeffs="5.0" id="132" name="maximum z" type="z-plane" />
<surface coeffs="-6.0" id="133" name="minimum x" type="x-plane" />
<surface coeffs="6.0" id="134" name="maximum x" type="x-plane" />
<surface coeffs="-6.0" id="135" name="minimum y" type="y-plane" />
<surface coeffs="6.0" id="136" name="maximum y" type="y-plane" />
<surface coeffs="-6.0" id="137" name="minimum z" type="z-plane" />
<surface coeffs="6.0" id="138" name="maximum z" type="z-plane" />
<surface boundary="vacuum" coeffs="-10" id="139" name="minimum x" type="x-plane" />
<surface boundary="vacuum" coeffs="10" id="140" name="maximum x" type="x-plane" />
<surface boundary="vacuum" coeffs="-10" id="141" name="minimum y" type="y-plane" />
<surface boundary="vacuum" coeffs="10" id="142" name="maximum y" type="y-plane" />
<surface boundary="vacuum" coeffs="-10" id="143" name="minimum z" type="z-plane" />
<surface boundary="vacuum" coeffs="10" id="144" name="maximum z" type="z-plane" />
</geometry>
<?xml version='1.0' encoding='utf-8'?>
<materials>
<material depletable="true" id="34" name="fuel">
<material depletable="true" id="22" name="fuel">
<density units="g/cc" value="4.5" />
<nuclide ao="1.0" name="U235" />
</material>
<material id="35" name="zircaloy">
<material id="23" name="zircaloy">
<density units="g/cc" value="5.77" />
<nuclide ao="0.5145" name="Zr90" />
<nuclide ao="0.1122" name="Zr91" />
@ -36,7 +36,7 @@
<nuclide ao="0.1738" name="Zr94" />
<nuclide ao="0.028" name="Zr96" />
</material>
<material id="36" name="water">
<material id="24" name="water">
<density units="atom/b-cm" value="0.07416" />
<nuclide ao="2.0" name="H1" />
<nuclide ao="1.0" name="O16" />

View file

@ -20,174 +20,13 @@ class UnstructuredMeshTest(PyAPITestHarness):
def __init__(self,
statepoint_name,
model,
inputs_true,
estimator='collision',
external_geom=False,
holes=None):
super().__init__(statepoint_name, inputs_true=inputs_true)
super().__init__(statepoint_name, model=model, inputs_true=inputs_true)
self.estimator = estimator # tally estimator type
self.external_geom = external_geom # geometry size matches mesh
self.holes = holes # holes in the test mesh
if self.holes:
self.mesh_filename = "test_mesh_tets_w_holes.h5m"
else:
self.mesh_filename = "test_mesh_tets.h5m" # mesh file to use
def _build_inputs(self):
### Materials ###
materials = openmc.Materials()
fuel_mat = openmc.Material(name="fuel")
fuel_mat.add_nuclide("U235", 1.0)
fuel_mat.set_density('g/cc', 4.5)
materials.append(fuel_mat)
zirc_mat = openmc.Material(name="zircaloy")
zirc_mat.add_element("Zr", 1.0)
zirc_mat.set_density("g/cc", 5.77)
materials.append(zirc_mat)
water_mat = openmc.Material(name="water")
water_mat.add_nuclide("H1", 2.0)
water_mat.add_nuclide("O16", 1.0)
water_mat.set_density("atom/b-cm", 0.07416)
materials.append(water_mat)
materials.export_to_xml()
### Geometry ###
fuel_min_x = openmc.XPlane(-5.0, name="minimum x")
fuel_max_x = openmc.XPlane(5.0, name="maximum x")
fuel_min_y = openmc.YPlane(-5.0, name="minimum y")
fuel_max_y = openmc.YPlane(5.0, name="maximum y")
fuel_min_z = openmc.ZPlane(-5.0, name="minimum z")
fuel_max_z = openmc.ZPlane(5.0, name="maximum z")
fuel_cell = openmc.Cell(name="fuel")
fuel_cell.region = +fuel_min_x & -fuel_max_x & \
+fuel_min_y & -fuel_max_y & \
+fuel_min_z & -fuel_max_z
fuel_cell.fill = fuel_mat
clad_min_x = openmc.XPlane(-6.0, name="minimum x")
clad_max_x = openmc.XPlane(6.0, name="maximum x")
clad_min_y = openmc.YPlane(-6.0, name="minimum y")
clad_max_y = openmc.YPlane(6.0, name="maximum y")
clad_min_z = openmc.ZPlane(-6.0, name="minimum z")
clad_max_z = openmc.ZPlane(6.0, name="maximum z")
clad_cell = openmc.Cell(name="clad")
clad_cell.region = (-fuel_min_x | +fuel_max_x |
-fuel_min_y | +fuel_max_y |
-fuel_min_z | +fuel_max_z) & \
(+clad_min_x & -clad_max_x &
+clad_min_y & -clad_max_y &
+clad_min_z & -clad_max_z)
clad_cell.fill = zirc_mat
if self.external_geom:
bounds = (15, 15, 15)
else:
bounds = (10, 10, 10)
water_min_x = openmc.XPlane(x0=-bounds[0],
name="minimum x",
boundary_type='vacuum')
water_max_x = openmc.XPlane(x0=bounds[0],
name="maximum x",
boundary_type='vacuum')
water_min_y = openmc.YPlane(y0=-bounds[1],
name="minimum y",
boundary_type='vacuum')
water_max_y = openmc.YPlane(y0=bounds[1],
name="maximum y",
boundary_type='vacuum')
water_min_z = openmc.ZPlane(z0=-bounds[2],
name="minimum z",
boundary_type='vacuum')
water_max_z = openmc.ZPlane(z0=bounds[2],
name="maximum z",
boundary_type='vacuum')
water_cell = openmc.Cell(name="water")
water_cell.region = (-clad_min_x | +clad_max_x |
-clad_min_y | +clad_max_y |
-clad_min_z | +clad_max_z) & \
(+water_min_x & -water_max_x &
+water_min_y & -water_max_y &
+water_min_z & -water_max_z)
water_cell.fill = water_mat
# create a containing universe
geom = openmc.Geometry([fuel_cell, clad_cell, water_cell])
geom.export_to_xml()
### Tallies ###
# create meshes
regular_mesh = openmc.RegularMesh()
regular_mesh.dimension = (10, 10, 10)
regular_mesh.lower_left = (-10.0, -10.0, -10.0)
regular_mesh.upper_right = (10.0, 10.0, 10.0)
regular_mesh_filter = openmc.MeshFilter(mesh=regular_mesh)
uscd_mesh = openmc.UnstructuredMesh(self.mesh_filename)
uscd_mesh.mesh_lib = 'moab'
uscd_filter = openmc.MeshFilter(mesh=uscd_mesh)
# create tallies
tallies = openmc.Tallies()
regular_mesh_tally = openmc.Tally(name="regular mesh tally")
regular_mesh_tally.filters = [regular_mesh_filter]
regular_mesh_tally.scores = ['flux']
regular_mesh_tally.estimator = self.estimator
tallies.append(regular_mesh_tally)
uscd_tally = openmc.Tally(name="unstructured mesh tally")
uscd_tally.filters = [uscd_filter]
uscd_tally.scores = ['flux']
uscd_tally.estimator = self.estimator
tallies.append(uscd_tally)
tallies.export_to_xml()
### Settings ###
settings = openmc.Settings()
settings.run_mode = 'fixed source'
settings.particles = 100
settings.batches = 10
# source setup
r = openmc.stats.Uniform(a=0.0, b=0.0)
theta = openmc.stats.Discrete(x=[0.0], p=[1.0])
phi = openmc.stats.Discrete(x=[0.0], p=[1.0])
origin = (0.0, 0.0, 0.0)
space = openmc.stats.SphericalIndependent(r=r,
theta=theta,
phi=phi,
origin=origin)
angle = openmc.stats.Monodirectional((-1.0, 0.0, 0.0))
energy = openmc.stats.Discrete(x=[15.e+06], p=[1.0])
source = openmc.Source(space=space, energy=energy, angle=angle)
settings.source = source
settings.export_to_xml()
def _compare_results(self):
with openmc.StatePoint(self._sp_name) as sp:
@ -203,11 +42,12 @@ class UnstructuredMeshTest(PyAPITestHarness):
reg_mesh_data = np.delete(reg_mesh_data, self.holes)
reg_mesh_std_dev = np.delete(reg_mesh_std_dev, self.holes)
else:
umesh_tally = tally
unstructured_data, unstructured_std_dev = self.get_mesh_tally_data(tally, True)
# we expect these results to be the same to within at least ten
# decimal places
decimals = 10 if self.estimator == 'collision' else 8
decimals = 10 if umesh_tally.estimator == 'collision' else 8
np.testing.assert_array_almost_equal(unstructured_data,
reg_mesh_data,
decimals)
@ -245,5 +85,162 @@ for i, (estimator, ext_geom, holes) in enumerate(product(*param_values)):
@pytest.mark.parametrize("opts", test_cases)
def test_unstructured_mesh(opts):
harness = UnstructuredMeshTest('statepoint.10.h5', **opts)
### Materials ###
materials = openmc.Materials()
fuel_mat = openmc.Material(name="fuel")
fuel_mat.add_nuclide("U235", 1.0)
fuel_mat.set_density('g/cc', 4.5)
materials.append(fuel_mat)
zirc_mat = openmc.Material(name="zircaloy")
zirc_mat.add_element("Zr", 1.0)
zirc_mat.set_density("g/cc", 5.77)
materials.append(zirc_mat)
water_mat = openmc.Material(name="water")
water_mat.add_nuclide("H1", 2.0)
water_mat.add_nuclide("O16", 1.0)
water_mat.set_density("atom/b-cm", 0.07416)
materials.append(water_mat)
materials.export_to_xml()
### Geometry ###
fuel_min_x = openmc.XPlane(-5.0, name="minimum x")
fuel_max_x = openmc.XPlane(5.0, name="maximum x")
fuel_min_y = openmc.YPlane(-5.0, name="minimum y")
fuel_max_y = openmc.YPlane(5.0, name="maximum y")
fuel_min_z = openmc.ZPlane(-5.0, name="minimum z")
fuel_max_z = openmc.ZPlane(5.0, name="maximum z")
fuel_cell = openmc.Cell(name="fuel")
fuel_cell.region = +fuel_min_x & -fuel_max_x & \
+fuel_min_y & -fuel_max_y & \
+fuel_min_z & -fuel_max_z
fuel_cell.fill = fuel_mat
clad_min_x = openmc.XPlane(-6.0, name="minimum x")
clad_max_x = openmc.XPlane(6.0, name="maximum x")
clad_min_y = openmc.YPlane(-6.0, name="minimum y")
clad_max_y = openmc.YPlane(6.0, name="maximum y")
clad_min_z = openmc.ZPlane(-6.0, name="minimum z")
clad_max_z = openmc.ZPlane(6.0, name="maximum z")
clad_cell = openmc.Cell(name="clad")
clad_cell.region = (-fuel_min_x | +fuel_max_x |
-fuel_min_y | +fuel_max_y |
-fuel_min_z | +fuel_max_z) & \
(+clad_min_x & -clad_max_x &
+clad_min_y & -clad_max_y &
+clad_min_z & -clad_max_z)
clad_cell.fill = zirc_mat
if opts['external_geom']:
bounds = (15, 15, 15)
else:
bounds = (10, 10, 10)
water_min_x = openmc.XPlane(x0=-bounds[0],
name="minimum x",
boundary_type='vacuum')
water_max_x = openmc.XPlane(x0=bounds[0],
name="maximum x",
boundary_type='vacuum')
water_min_y = openmc.YPlane(y0=-bounds[1],
name="minimum y",
boundary_type='vacuum')
water_max_y = openmc.YPlane(y0=bounds[1],
name="maximum y",
boundary_type='vacuum')
water_min_z = openmc.ZPlane(z0=-bounds[2],
name="minimum z",
boundary_type='vacuum')
water_max_z = openmc.ZPlane(z0=bounds[2],
name="maximum z",
boundary_type='vacuum')
water_cell = openmc.Cell(name="water")
water_cell.region = (-clad_min_x | +clad_max_x |
-clad_min_y | +clad_max_y |
-clad_min_z | +clad_max_z) & \
(+water_min_x & -water_max_x &
+water_min_y & -water_max_y &
+water_min_z & -water_max_z)
water_cell.fill = water_mat
# create a containing universe
geometry = openmc.Geometry([fuel_cell, clad_cell, water_cell])
### Tallies ###
# create meshes
regular_mesh = openmc.RegularMesh()
regular_mesh.dimension = (10, 10, 10)
regular_mesh.lower_left = (-10.0, -10.0, -10.0)
regular_mesh.upper_right = (10.0, 10.0, 10.0)
regular_mesh_filter = openmc.MeshFilter(mesh=regular_mesh)
if opts['holes']:
mesh_filename = "test_mesh_tets_w_holes.h5m"
else:
mesh_filename = "test_mesh_tets.h5m"
uscd_mesh = openmc.UnstructuredMesh(mesh_filename)
uscd_mesh.mesh_lib = 'moab'
uscd_filter = openmc.MeshFilter(mesh=uscd_mesh)
# create tallies
tallies = openmc.Tallies()
regular_mesh_tally = openmc.Tally(name="regular mesh tally")
regular_mesh_tally.filters = [regular_mesh_filter]
regular_mesh_tally.scores = ['flux']
regular_mesh_tally.estimator = opts['estimator']
tallies.append(regular_mesh_tally)
uscd_tally = openmc.Tally(name="unstructured mesh tally")
uscd_tally.filters = [uscd_filter]
uscd_tally.scores = ['flux']
uscd_tally.estimator = opts['estimator']
tallies.append(uscd_tally)
### Settings ###
settings = openmc.Settings()
settings.run_mode = 'fixed source'
settings.particles = 100
settings.batches = 10
# source setup
r = openmc.stats.Uniform(a=0.0, b=0.0)
theta = openmc.stats.Discrete(x=[0.0], p=[1.0])
phi = openmc.stats.Discrete(x=[0.0], p=[1.0])
origin = (0.0, 0.0, 0.0)
space = openmc.stats.SphericalIndependent(r=r,
theta=theta,
phi=phi,
origin=origin)
angle = openmc.stats.Monodirectional((-1.0, 0.0, 0.0))
energy = openmc.stats.Discrete(x=[15.e+06], p=[1.0])
source = openmc.Source(space=space, energy=energy, angle=angle)
settings.source = source
model = openmc.model.Model(geometry=geometry,
materials=materials,
tallies=tallies,
settings=settings)
harness = UnstructuredMeshTest('statepoint.10.h5',
model,
opts['inputs_true'],
holes=opts['holes'])
harness.main()