mirror of
https://github.com/openmc-dev/openmc.git
synced 2026-07-26 21:25:36 -04:00
Added track output test.
Also fixed a typo in track.py
This commit is contained in:
parent
beb39a44bb
commit
bfc172f264
6 changed files with 520 additions and 1 deletions
|
|
@ -42,7 +42,7 @@ def main():
|
|||
# Check input file extensions.
|
||||
for fname in args.input:
|
||||
if not (fname.endswith('.h5') or fname.endswith('.binary')):
|
||||
raise ValueError("Input file names must either end iwth '.h5' or"
|
||||
raise ValueError("Input file names must either end with '.h5' or"
|
||||
"'.binary'.")
|
||||
|
||||
# Make sure that the output filename ends with '.pvtp'.
|
||||
|
|
|
|||
305
tests/test_track_output/geometry.xml
Normal file
305
tests/test_track_output/geometry.xml
Normal file
|
|
@ -0,0 +1,305 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<geometry>
|
||||
|
||||
<!-- Based on ISCBEP model for leu-comp-therm-008 benchmarks (see LA-UR-10-06230) -->
|
||||
|
||||
<!-- pin-cell surfaces -->
|
||||
|
||||
<surface id="1" type="z-cylinder" coeffs="0.0 0.0 0.514858"/> <!-- fuel OR -->
|
||||
<surface id="2" type="z-cylinder" coeffs="0.0 0.0 0.602996"/> <!-- fuel clad OR -->
|
||||
|
||||
<surface id="3" type="z-cylinder" coeffs="0.0 0.0 0.585000"/> <!-- pyrex OR -->
|
||||
|
||||
<surface id="99" type="sphere" coeffs="0.0 0.0 0.0 400.0"/> <!-- dummy outer boundary -->
|
||||
|
||||
<!-- pin-cell construction -->
|
||||
|
||||
<!-- Water pin-cell -->
|
||||
<cell id="11" universe="1" material="1" surfaces="-99"/>
|
||||
<cell id="12" universe="1" material="1" surfaces=" 99"/>
|
||||
|
||||
<!-- Fuel Rod -->
|
||||
<cell id="21" universe="2" material="2" surfaces=" -1"/> <!-- fuel -->
|
||||
<cell id="22" universe="2" material="3" surfaces="1 -2"/> <!-- clad -->
|
||||
<cell id="23" universe="2" material="1" surfaces=" 2"/> <!-- water -->
|
||||
|
||||
<!-- Pyrex Rod -->
|
||||
<cell id="31" universe="3" material="4" surfaces=" -3"/> <!-- pyrex -->
|
||||
<cell id="32" universe="3" material="1" surfaces=" 3"/> <!-- water -->
|
||||
|
||||
<!-- Assembly construction -->
|
||||
|
||||
<!-- Dummy Water Assembly Universe -->
|
||||
<cell id="99" universe="999" fill="1" surfaces="-99"/>
|
||||
|
||||
<!-- Central Fuel Assemblies -->
|
||||
|
||||
<!-- Central Fuel Assembly -->
|
||||
<lattice id="11" type="rectangular" dimension="15 15">
|
||||
<lower_left> -12.2682 -12.2682 </lower_left>
|
||||
<width> 1.63576 1.63576 </width>
|
||||
<universes>
|
||||
2 2 2 2 2 2 2 2 2 2 2 2 2 2 2
|
||||
2 2 2 2 2 2 2 2 2 2 2 2 2 2 2
|
||||
2 2 2 2 2 1 2 2 2 1 2 2 2 2 2
|
||||
2 2 2 3 2 2 2 2 2 2 2 3 2 2 2
|
||||
2 2 2 2 2 2 2 2 2 2 2 2 2 2 2
|
||||
2 2 1 2 2 1 2 2 2 1 2 2 1 2 2
|
||||
2 2 2 2 2 2 2 2 2 2 2 2 2 2 2
|
||||
2 2 2 2 2 2 2 1 2 2 2 2 2 2 2
|
||||
2 2 2 2 2 2 2 2 2 2 2 2 2 2 2
|
||||
2 2 1 2 2 1 2 2 2 1 2 2 1 2 2
|
||||
2 2 2 2 2 2 2 2 2 2 2 2 2 2 2
|
||||
2 2 2 3 2 2 2 2 2 2 2 3 2 2 2
|
||||
2 2 2 2 2 1 2 2 2 1 2 2 2 2 2
|
||||
2 2 2 2 2 2 2 2 2 2 2 2 2 2 2
|
||||
2 2 2 2 2 2 2 2 2 2 2 2 2 2 2
|
||||
</universes>
|
||||
</lattice>
|
||||
<cell id="111" universe="111" fill="11" surfaces=""/>
|
||||
|
||||
<!-- North Fuel Assembly -->
|
||||
<lattice id="22" type="rectangular" dimension="15 15">
|
||||
<lower_left> -12.2682 -12.2682 </lower_left>
|
||||
<width> 1.63576 1.63576 </width>
|
||||
<universes>
|
||||
2 2 2 2 2 2 2 2 2 2 2 2 2 2 2
|
||||
2 2 2 2 2 2 2 2 2 2 2 2 2 2 2
|
||||
2 2 2 2 2 1 2 2 2 1 2 2 2 2 2
|
||||
2 2 2 1 2 2 2 2 2 2 2 1 2 2 2
|
||||
2 2 2 2 2 2 2 2 2 2 2 2 2 2 2
|
||||
2 2 1 2 2 1 2 2 2 1 2 2 1 2 2
|
||||
2 2 2 2 2 2 2 2 2 2 2 2 2 2 2
|
||||
2 2 2 2 2 2 2 1 2 2 2 2 2 2 2
|
||||
2 2 2 2 2 2 2 2 2 2 2 2 2 2 2
|
||||
2 2 1 2 2 1 2 2 2 1 2 2 1 2 2
|
||||
2 2 2 2 2 2 2 2 2 2 2 2 2 2 2
|
||||
2 2 2 3 2 2 2 2 2 2 2 3 2 2 2
|
||||
2 2 2 2 2 1 2 2 2 1 2 2 2 2 2
|
||||
2 2 2 2 2 2 2 2 2 2 2 2 2 2 2
|
||||
2 2 2 2 2 2 2 2 2 2 2 2 2 2 2
|
||||
</universes>
|
||||
</lattice>
|
||||
<cell id="222" universe="222" fill="22" surfaces=""/> <!-- north -->
|
||||
<cell id="444" universe="444" fill="222" surfaces="" rotation="0 0 90"/> <!-- west -->
|
||||
<cell id="555" universe="555" fill="222" surfaces="" rotation="0 0 180"/> <!-- south -->
|
||||
<cell id="666" universe="666" fill="222" surfaces="" rotation="0 0 270"/> <!-- east -->
|
||||
|
||||
<!-- Northeast Fuel Assembly -->
|
||||
<lattice id="33" type="rectangular" dimension="15 15">
|
||||
<lower_left> -12.2682 -12.2682 </lower_left>
|
||||
<width> 1.63576 1.63576 </width>
|
||||
<universes>
|
||||
2 2 2 2 2 2 2 2 2 2 2 2 2 2 2
|
||||
2 2 2 2 2 2 2 2 2 2 2 2 2 2 2
|
||||
2 2 2 2 2 1 2 2 2 1 2 2 2 2 2
|
||||
2 2 2 1 2 2 2 2 2 2 2 1 2 2 2
|
||||
2 2 2 2 2 2 2 2 2 2 2 2 2 2 2
|
||||
2 2 1 2 2 1 2 2 2 1 2 2 1 2 2
|
||||
2 2 2 2 2 2 2 2 2 2 2 2 2 2 2
|
||||
2 2 2 2 2 2 2 1 2 2 2 2 2 2 2
|
||||
2 2 2 2 2 2 2 2 2 2 2 2 2 2 2
|
||||
2 2 1 2 2 1 2 2 2 1 2 2 1 2 2
|
||||
2 2 2 2 2 2 2 2 2 2 2 2 2 2 2
|
||||
2 2 2 3 2 2 2 2 2 2 2 1 2 2 2
|
||||
2 2 2 2 2 1 2 2 2 1 2 2 2 2 2
|
||||
2 2 2 2 2 2 2 2 2 2 2 2 2 2 2
|
||||
2 2 2 2 2 2 2 2 2 2 2 2 2 2 2
|
||||
</universes>
|
||||
</lattice>
|
||||
<cell id="333" universe="333" fill="33" surfaces=""/> <!-- northeast -->
|
||||
<cell id="777" universe="777" fill="333" surfaces="" rotation="0 0 90"/> <!-- northwest -->
|
||||
<cell id="888" universe="888" fill="333" surfaces="" rotation="0 0 180"/> <!-- southwest -->
|
||||
<cell id="998" universe="998" fill="333" surfaces="" rotation="0 0 270"/> <!-- southeast -->
|
||||
|
||||
<!-- Surrounding Driver Assemblies -->
|
||||
|
||||
<!-- Full Driver Assembly -->
|
||||
<lattice id="24" type="rectangular" dimension="15 15">
|
||||
<lower_left> -12.2682 -12.2682 </lower_left>
|
||||
<width> 1.63576 1.63576 </width>
|
||||
<universes>
|
||||
2 2 2 2 2 2 2 2 2 2 2 2 2 2 2
|
||||
2 2 2 2 2 2 2 2 2 2 2 2 2 2 2
|
||||
2 2 2 2 2 2 2 2 2 2 2 2 2 2 2
|
||||
2 2 2 2 2 2 2 2 2 2 2 2 2 2 2
|
||||
2 2 2 2 2 2 2 2 2 2 2 2 2 2 2
|
||||
2 2 2 2 2 2 2 2 2 2 2 2 2 2 2
|
||||
2 2 2 2 2 2 2 2 2 2 2 2 2 2 2
|
||||
2 2 2 2 2 2 2 2 2 2 2 2 2 2 2
|
||||
2 2 2 2 2 2 2 2 2 2 2 2 2 2 2
|
||||
2 2 2 2 2 2 2 2 2 2 2 2 2 2 2
|
||||
2 2 2 2 2 2 2 2 2 2 2 2 2 2 2
|
||||
2 2 2 2 2 2 2 2 2 2 2 2 2 2 2
|
||||
2 2 2 2 2 2 2 2 2 2 2 2 2 2 2
|
||||
2 2 2 2 2 2 2 2 2 2 2 2 2 2 2
|
||||
2 2 2 2 2 2 2 2 2 2 2 2 2 2 2
|
||||
</universes>
|
||||
</lattice>
|
||||
<cell id="240" universe="240" fill="24" surfaces="-99"/>
|
||||
|
||||
<!-- North Edge -->
|
||||
<lattice id="14" type="rectangular" dimension="15 15">
|
||||
<lower_left> -12.2682 -12.2682 </lower_left>
|
||||
<width> 1.63576 1.63576 </width>
|
||||
<universes>
|
||||
1 1 1 1 1 1 1 1 1 1 1 1 1 1 1
|
||||
1 1 1 1 1 1 1 1 1 1 1 1 1 1 1
|
||||
1 1 1 1 1 1 1 1 1 1 1 1 1 1 1
|
||||
1 1 1 1 1 1 1 1 1 1 1 1 1 1 1
|
||||
1 1 1 1 1 1 1 1 1 1 1 1 1 1 1
|
||||
1 1 1 1 1 1 1 1 1 1 1 1 1 1 1
|
||||
1 1 1 1 1 1 1 1 1 1 1 1 1 1 1
|
||||
1 1 1 1 1 1 1 1 1 1 1 1 1 1 1
|
||||
1 1 1 1 1 1 1 1 1 1 1 1 1 1 1
|
||||
1 1 1 1 1 1 1 1 1 1 1 1 1 1 1
|
||||
1 1 1 1 1 1 1 1 1 1 1 1 1 1 1
|
||||
1 1 1 1 1 1 1 1 1 1 1 1 1 1 1
|
||||
2 2 2 2 2 2 2 2 2 2 2 2 2 2 2
|
||||
2 2 2 2 2 2 2 2 2 2 2 2 2 2 2
|
||||
2 2 2 2 2 2 2 2 2 2 2 2 2 2 2
|
||||
</universes>
|
||||
</lattice>
|
||||
<cell id="140" universe="140" fill="14" surfaces=""/> <!-- north -->
|
||||
<cell id="410" universe="410" fill="140" surfaces="" rotation="0 0 90"/> <!-- east -->
|
||||
<cell id="740" universe="740" fill="140" surfaces="" rotation="0 0 180"/> <!-- south -->
|
||||
<cell id="470" universe="470" fill="140" surfaces="" rotation="0 0 270"/> <!-- west -->
|
||||
|
||||
<!-- Northeast Edge Corner -->
|
||||
<lattice id="15" type="rectangular" dimension="15 15">
|
||||
<lower_left> -12.2682 -12.2682 </lower_left>
|
||||
<width> 1.63576 1.63576 </width>
|
||||
<universes>
|
||||
1 1 1 1 1 1 1 1 1 1 1 1 1 1 1
|
||||
1 1 1 1 1 1 1 1 1 1 1 1 1 1 1
|
||||
1 1 1 1 1 1 1 1 1 1 1 1 1 1 1
|
||||
1 1 1 1 1 1 1 1 1 1 1 1 1 1 1
|
||||
1 1 1 1 1 1 1 1 1 1 1 1 1 1 1
|
||||
1 1 1 1 1 1 1 1 1 1 1 1 1 1 1
|
||||
1 1 1 1 1 1 1 1 1 1 1 1 1 1 1
|
||||
1 1 1 1 1 1 1 1 1 1 1 1 1 1 1
|
||||
1 1 1 1 1 1 1 1 1 1 1 1 1 1 1
|
||||
1 1 1 1 1 1 1 1 1 1 1 1 1 1 1
|
||||
1 1 1 1 1 1 1 1 1 1 1 1 1 1 1
|
||||
1 1 1 1 1 1 1 1 1 1 1 1 1 1 1
|
||||
2 2 2 1 1 1 1 1 1 1 1 1 1 1 1
|
||||
2 2 2 1 1 1 1 1 1 1 1 1 1 1 1
|
||||
2 2 2 1 1 1 1 1 1 1 1 1 1 1 1
|
||||
</universes>
|
||||
</lattice>
|
||||
<cell id="150" universe="150" fill="15" surfaces=""/> <!-- northeast -->
|
||||
<cell id="130" universe="130" fill="150" surfaces="" rotation="0 0 90"/> <!-- northwest -->
|
||||
<cell id="510" universe="510" fill="150" surfaces="" rotation="0 0 180"/> <!-- southwest -->
|
||||
<cell id="570" universe="570" fill="150" surfaces="" rotation="0 0 270"/> <!-- southeast -->
|
||||
|
||||
<!-- Northeast Top Steps -->
|
||||
<lattice id="25" type="rectangular" dimension="15 15">
|
||||
<lower_left> -12.2682 -12.2682 </lower_left>
|
||||
<width> 1.63576 1.63576 </width>
|
||||
<universes>
|
||||
2 2 2 1 1 1 1 1 1 1 1 1 1 1 1
|
||||
2 2 2 1 1 1 1 1 1 1 1 1 1 1 1
|
||||
2 2 2 2 2 2 2 2 2 2 2 2 2 1 1
|
||||
2 2 2 2 2 2 2 2 2 2 2 2 2 1 1
|
||||
2 2 2 2 2 2 2 2 2 2 2 2 2 1 1
|
||||
2 2 2 2 2 2 2 2 2 2 2 2 2 1 1
|
||||
2 2 2 2 2 2 2 2 2 2 2 2 2 1 1
|
||||
2 2 2 2 2 2 2 2 2 2 2 2 2 2 2
|
||||
2 2 2 2 2 2 2 2 2 2 2 2 2 2 2
|
||||
2 2 2 2 2 2 2 2 2 2 2 2 2 2 2
|
||||
2 2 2 2 2 2 2 2 2 2 2 2 2 2 2
|
||||
2 2 2 2 2 2 2 2 2 2 2 2 2 2 2
|
||||
2 2 2 2 2 2 2 2 2 2 2 2 2 2 2
|
||||
2 2 2 2 2 2 2 2 2 2 2 2 2 2 2
|
||||
2 2 2 2 2 2 2 2 2 2 2 2 2 2 2
|
||||
</universes>
|
||||
</lattice>
|
||||
<cell id="250" universe="250" fill="25" surfaces=""/> <!-- northeast -->
|
||||
<cell id="320" universe="320" fill="250" surfaces="" rotation="0 0 90"/> <!-- northwest -->
|
||||
<cell id="630" universe="630" fill="250" surfaces="" rotation="0 0 180"/> <!-- southwest -->
|
||||
<cell id="560" universe="560" fill="250" surfaces="" rotation="0 0 270"/> <!-- southeast -->
|
||||
|
||||
|
||||
<!-- Northeast Middle Corner -->
|
||||
<lattice id="26" type="rectangular" dimension="15 15">
|
||||
<lower_left> -12.2682 -12.2682 </lower_left>
|
||||
<width> 1.63576 1.63576 </width>
|
||||
<universes>
|
||||
1 1 1 1 1 1 1 1 1 1 1 1 1 1 1
|
||||
1 1 1 1 1 1 1 1 1 1 1 1 1 1 1
|
||||
1 1 1 1 1 1 1 1 1 1 1 1 1 1 1
|
||||
1 1 1 1 1 1 1 1 1 1 1 1 1 1 1
|
||||
1 1 1 1 1 1 1 1 1 1 1 1 1 1 1
|
||||
1 1 1 1 1 1 1 1 1 1 1 1 1 1 1
|
||||
1 1 1 1 1 1 1 1 1 1 1 1 1 1 1
|
||||
2 2 2 2 2 2 2 2 1 1 1 1 1 1 1
|
||||
2 2 2 2 2 2 2 2 1 1 1 1 1 1 1
|
||||
2 2 2 2 2 2 2 2 1 1 1 1 1 1 1
|
||||
2 2 2 2 2 2 2 2 1 1 1 1 1 1 1
|
||||
2 2 2 2 2 2 2 2 1 1 1 1 1 1 1
|
||||
2 2 2 2 2 2 2 2 1 1 1 1 1 1 1
|
||||
2 2 2 2 2 2 2 2 1 1 1 1 1 1 1
|
||||
2 2 2 2 2 2 2 2 1 1 1 1 1 1 1
|
||||
</universes>
|
||||
</lattice>
|
||||
<cell id="260" universe="260" fill="26" surfaces=""/> <!-- northeast -->
|
||||
<cell id="220" universe="220" fill="260" surfaces="" rotation="0 0 90"/> <!-- southeast -->
|
||||
<cell id="620" universe="620" fill="260" surfaces="" rotation="0 0 180"/> <!-- southwest -->
|
||||
<cell id="660" universe="660" fill="260" surfaces="" rotation="0 0 270"/> <!-- northwest -->
|
||||
|
||||
<!-- Northeast Bottom Steps -->
|
||||
<lattice id="36" type="rectangular" dimension="15 15">
|
||||
<lower_left> -12.2682 -12.2682 </lower_left>
|
||||
<width> 1.63576 1.63576 </width>
|
||||
<universes>
|
||||
2 2 2 2 2 2 2 2 1 1 1 1 1 1 1
|
||||
2 2 2 2 2 2 2 2 1 1 1 1 1 1 1
|
||||
2 2 2 2 2 2 2 2 2 2 2 2 2 1 1
|
||||
2 2 2 2 2 2 2 2 2 2 2 2 2 1 1
|
||||
2 2 2 2 2 2 2 2 2 2 2 2 2 1 1
|
||||
2 2 2 2 2 2 2 2 2 2 2 2 2 1 1
|
||||
2 2 2 2 2 2 2 2 2 2 2 2 2 1 1
|
||||
2 2 2 2 2 2 2 2 2 2 2 2 2 1 1
|
||||
2 2 2 2 2 2 2 2 2 2 2 2 2 1 1
|
||||
2 2 2 2 2 2 2 2 2 2 2 2 2 1 1
|
||||
2 2 2 2 2 2 2 2 2 2 2 2 2 1 1
|
||||
2 2 2 2 2 2 2 2 2 2 2 2 2 1 1
|
||||
2 2 2 2 2 2 2 2 2 2 2 2 2 2 2
|
||||
2 2 2 2 2 2 2 2 2 2 2 2 2 2 2
|
||||
2 2 2 2 2 2 2 2 2 2 2 2 2 2 2
|
||||
</universes>
|
||||
</lattice>
|
||||
<cell id="360" universe="360" fill="36" surfaces=""/> <!-- northeast -->
|
||||
<cell id="230" universe="230" fill="360" surfaces="" rotation="0 0 90"/> <!-- southeast -->
|
||||
<cell id="520" universe="520" fill="360" surfaces="" rotation="0 0 180"/> <!-- southwest -->
|
||||
<cell id="650" universe="650" fill="360" surfaces="" rotation="0 0 270"/> <!-- northwest -->
|
||||
|
||||
|
||||
<!-- Core construction -->
|
||||
|
||||
<!-- Core Surfaces -->
|
||||
<surface id="10" type="z-plane" coeffs=" -81.662" boundary="vacuum"/>
|
||||
<surface id="20" type="z-plane" coeffs=" 81.662" boundary="vacuum"/>
|
||||
<surface id="30" type="z-cylinder" coeffs="0.0 0.0 76.200" />
|
||||
<surface id="40" type="z-cylinder" coeffs="0.0 0.0 77.470" boundary="vacuum"/>
|
||||
|
||||
<!-- Core lattice -->
|
||||
<lattice id="99" type="rectangular" dimension="7 7">
|
||||
<lower_left> -85.8774 -85.8774 </lower_left>
|
||||
<width> 24.5364 24.5364 </width>
|
||||
<universes>
|
||||
999 999 130 140 150 999 999
|
||||
999 220 230 240 250 260 999
|
||||
130 320 777 222 333 360 150
|
||||
410 240 444 111 666 240 470
|
||||
510 520 888 555 998 560 570
|
||||
999 620 630 240 650 660 999
|
||||
999 999 510 740 570 999 999
|
||||
</universes>
|
||||
</lattice>
|
||||
|
||||
<!-- Core Bounding Cell -->
|
||||
<cell id="1111" universe="0" fill="99" surfaces="10 -20 -30"/>
|
||||
<cell id="1112" universe="0" material="3" surfaces="10 -20 30 -40"/>
|
||||
|
||||
</geometry>
|
||||
95
tests/test_track_output/materials.xml
Normal file
95
tests/test_track_output/materials.xml
Normal file
|
|
@ -0,0 +1,95 @@
|
|||
<?xml version="1.0"?>
|
||||
<materials>
|
||||
|
||||
<!-- material 1: Water with 1511 PPM -->
|
||||
<material id="1">
|
||||
<density value="0.99823" units="g/cc" />
|
||||
<nuclide name="H-1" xs="70c" ao="6.6737E-002" />
|
||||
<nuclide name="O-16" xs="70c" ao="3.3369E-002" />
|
||||
<nuclide name="B-10" xs="70c" ao="1.6769E-005" />
|
||||
<nuclide name="B-11" xs="70c" ao="6.7497E-005" />
|
||||
<sab name="lwtr" xs="70t" />
|
||||
</material>
|
||||
|
||||
<!-- material 2: Fuel (2.459 w/o with B-10 for impurities) -->
|
||||
<material id="2">
|
||||
<density value="10.24" units="g/cc" />
|
||||
<nuclide name="U-235" xs="70c" ao="5.6868E-004" />
|
||||
<!-- <nuclide name="U-234" xs="70c" ao="4.5689E-006" /> -->
|
||||
<nuclide name="U-238" xs="70c" ao="2.2268E-002" />
|
||||
<nuclide name="O-16" xs="70c" ao="4.5683E-002" />
|
||||
<nuclide name="B-10" xs="70c" ao="2.6055E-007" />
|
||||
</material>
|
||||
|
||||
<!-- Zircaloy-4 -->
|
||||
<material id="3">
|
||||
<density value=" 6.55" units="g/cc" />
|
||||
<nuclide name="O-16" xs="70c" ao="3.0743e-04" />
|
||||
<!-- <nuclide name="O-17" xs="71c" ao="7.4887e-07" />-->
|
||||
<!-- <nuclide name="Cr-50" xs="71c" ao="3.2962e-06" />-->
|
||||
<!-- <nuclide name="Cr-52" xs="71c" ao="6.3564e-05" />-->
|
||||
<!-- <nuclide name="Cr-53" xs="71c" ao="7.2076e-06" />-->
|
||||
<!-- <nuclide name="Cr-54" xs="71c" ao="1.7941e-06" />-->
|
||||
<!-- <nuclide name="Fe-54" xs="71c" ao="8.6699e-06" />-->
|
||||
<!-- <nuclide name="Fe-56" xs="71c" ao="1.3610e-04" />-->
|
||||
<!-- <nuclide name="Fe-57" xs="71c" ao="3.1431e-06" />-->
|
||||
<!-- <nuclide name="Fe-58" xs="71c" ao="4.1829e-07" />-->
|
||||
<nuclide name="Zr-90" xs="70c" ao="2.1827e-02" />
|
||||
<nuclide name="Zr-91" xs="70c" ao="4.7600e-03" />
|
||||
<nuclide name="Zr-92" xs="70c" ao="7.2758e-03" />
|
||||
<nuclide name="Zr-94" xs="70c" ao="7.3734e-03" />
|
||||
<nuclide name="Zr-96" xs="70c" ao="1.1879e-03" />
|
||||
<!-- <nuclide name="Sn-112" xs="71c" ao="4.6735e-06" />-->
|
||||
<!-- <nuclide name="Sn-114" xs="71c" ao="3.1799e-06" />-->
|
||||
<!-- <nuclide name="Sn-115" xs="71c" ao="1.6381e-06" />-->
|
||||
<!-- <nuclide name="Sn-116" xs="71c" ao="7.0055e-05" />-->
|
||||
<!-- <nuclide name="Sn-117" xs="71c" ao="3.7003e-05" />-->
|
||||
<!-- <nuclide name="Sn-118" xs="71c" ao="1.1669e-04" />-->
|
||||
<!-- <nuclide name="Sn-119" xs="71c" ao="4.1387e-05" />-->
|
||||
<!-- <nuclide name="Sn-120" xs="71c" ao="1.5697e-04" />-->
|
||||
<!-- <nuclide name="Sn-122" xs="71c" ao="2.2308e-05" />-->
|
||||
<!-- <nuclide name="Sn-124" xs="71c" ao="2.7897e-05" />-->
|
||||
</material>
|
||||
|
||||
<!-- material 3: Fuel Aluminum 6061 cladding -->
|
||||
<!-- <material id="3">-->
|
||||
<!-- <density value="2.5052" units="g/cc" />-->
|
||||
<!-- <nuclide name="Al-27" xs="70c" ao="5.3985e-02" />-->
|
||||
<!-- <nuclide name="Mn-55" xs="70c" ao="4.1191e-05" />-->
|
||||
<!-- <nuclide name="Mg-24" xs="70c" ao="4.9031e-04" />-->
|
||||
<!-- <nuclide name="Mg-25" xs="70c" ao="6.2072e-05" />-->
|
||||
<!-- <nuclide name="Mg-26" xs="70c" ao="6.8341e-05" />-->
|
||||
<!-- <nuclide name="Si-28" xs="70c" ao="2.9726e-04" />-->
|
||||
<!-- <nuclide name="Si-29" xs="70c" ao="1.5094e-05" />-->
|
||||
<!-- <nuclide name="Si-30" xs="70c" ao="9.9499e-06" />-->
|
||||
<!-- <nuclide name="Cr-50" xs="70c" ao="2.5214e-06" />-->
|
||||
<!-- <nuclide name="Cr-52" xs="70c" ao="4.8622e-05" />-->
|
||||
<!-- <nuclide name="Cr-53" xs="70c" ao="5.5133e-06" />-->
|
||||
<!-- <nuclide name="Cr-54" xs="70c" ao="1.3724e-06" />-->
|
||||
<!-- <nuclide name="Fe-54" xs="70c" ao="1.1053e-05" />-->
|
||||
<!-- <nuclide name="Fe-56" xs="70c" ao="1.7351e-04" />-->
|
||||
<!-- <nuclide name="Fe-57" xs="70c" ao="4.0070e-06" />-->
|
||||
<!-- <nuclide name="Fe-58" xs="70c" ao="5.3326e-07" />-->
|
||||
<!-- <nuclide name="Ti-46" xs="70c" ao="3.8992e-06" />-->
|
||||
<!-- <nuclide name="Ti-47" xs="70c" ao="3.5164e-06" />-->
|
||||
<!-- <nuclide name="Ti-48" xs="70c" ao="3.4842e-05" />-->
|
||||
<!-- <nuclide name="Ti-49" xs="70c" ao="2.5569e-06" />-->
|
||||
<!-- <nuclide name="Ti-50" xs="70c" ao="2.4482e-06" />-->
|
||||
<!-- <nuclide name="Cu-63" xs="70c" ao="4.1054e-05" />-->
|
||||
<!-- <nuclide name="Cu-65" xs="70c" ao="1.8299e-05" />-->
|
||||
<!-- </material>-->
|
||||
|
||||
<!-- material 4: Control Rod Material -->
|
||||
<material id="4">
|
||||
<density value="2.2442" units="g/cc" />
|
||||
<nuclide name="B-10" xs="70c" ao="9.7491e-4" />
|
||||
<nuclide name="B-11" xs="70c" ao="3.9241e-3" />
|
||||
<nuclide name="O-16" xs="70c" ao="4.4829e-2" />
|
||||
<!-- <nuclide name="Na-23" xs="70c" ao="1.7444e-3" />-->
|
||||
<!-- <nuclide name="Al-27" xs="70c" ao="1.0018e-3" />-->
|
||||
<!-- <nuclide name="Si-28" xs="70c" ao="1.6884e-02" />-->
|
||||
<!-- <nuclide name="Si-29" xs="70c" ao="8.5730e-04" />-->
|
||||
<!-- <nuclide name="Si-30" xs="70c" ao="5.6513e-04" />-->
|
||||
</material>
|
||||
|
||||
</materials>
|
||||
30
tests/test_track_output/settings.xml
Normal file
30
tests/test_track_output/settings.xml
Normal file
|
|
@ -0,0 +1,30 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<settings>
|
||||
|
||||
<!-- <cross_sections> -->
|
||||
<!-- cross_sections.xml-->
|
||||
<!-- </cross_sections>-->
|
||||
|
||||
<!-- Parameters for criticality calculation -->
|
||||
<eigenvalue>
|
||||
<batches>8</batches>
|
||||
<inactive>1</inactive>
|
||||
<particles>1000</particles>
|
||||
</eigenvalue>
|
||||
|
||||
<!-- How verbose output should be -->
|
||||
<verbosity value="7" />
|
||||
|
||||
<!-- Starting source -->
|
||||
<source>
|
||||
<space type="box">
|
||||
<parameters>-1 -1 -1 1 1 1</parameters>
|
||||
</space>
|
||||
</source>
|
||||
|
||||
<track>
|
||||
1 1 1
|
||||
1 1 2
|
||||
</track>
|
||||
|
||||
</settings>
|
||||
80
tests/test_track_output/test_track_output.py
Normal file
80
tests/test_track_output/test_track_output.py
Normal file
|
|
@ -0,0 +1,80 @@
|
|||
#!/usr/bin/env python
|
||||
|
||||
import os
|
||||
from subprocess import Popen, STDOUT, PIPE, call
|
||||
import filecmp
|
||||
from nose_mpi import NoseMPI
|
||||
import glob
|
||||
|
||||
pwd = os.path.dirname(__file__)
|
||||
|
||||
def setup():
|
||||
os.putenv('PWD', pwd)
|
||||
os.chdir(pwd)
|
||||
|
||||
def test_run():
|
||||
openmc_path = pwd + '/../../src/openmc'
|
||||
if int(NoseMPI.mpi_np) > 0:
|
||||
proc = Popen([NoseMPI.mpi_exec, '-np', NoseMPI.mpi_np, openmc_path],
|
||||
stderr=STDOUT, stdout=PIPE)
|
||||
else:
|
||||
proc = Popen([openmc_path], stderr=STDOUT, stdout=PIPE)
|
||||
returncode = proc.wait()
|
||||
print(proc.communicate()[0])
|
||||
assert returncode == 0
|
||||
|
||||
def test_created_outputs():
|
||||
outputs = [glob.glob(''.join((pwd, '/track_1_1_1.*')))]
|
||||
outputs.append(glob.glob(''.join((pwd, '/track_1_1_2.*'))))
|
||||
for files in outputs:
|
||||
assert len(files) == 1
|
||||
assert files[0].endswith('binary') or files[0].endswith('h5')
|
||||
|
||||
##def test_outputs():
|
||||
## outputs = [glob.glob(''.join((pwd, '/track_1_1_1.*')))[0]]
|
||||
## outputs.append(glob.glob(''.join((pwd, '/track_1_1_2.*')))[0])
|
||||
## if outputs[0].endswith('binary'):
|
||||
## metrics = [''.join((pwd, '/track_1_1_1_true.binary')),
|
||||
## ''.join((pwd, '/track_1_1_2_true.binary'))]
|
||||
## else:
|
||||
## metrics = [''.join((pwd, '/track_1_1_1_true.h5')),
|
||||
## ''.join((pwd, '/track_1_1_2_true.h5'))]
|
||||
## for i in range(2):
|
||||
## output = outputs[i]
|
||||
## metric = metrics[i]
|
||||
## compare = filecmp.cmp(output, metric)
|
||||
## if not compare:
|
||||
## if outputs[0].endswith('binary'):
|
||||
## extension = 'binary'
|
||||
## else:
|
||||
## extension = 'h5'
|
||||
## os.rename(output, ''.join((pwd, '/track_1_1_{}_error.{}'.format(
|
||||
## i+1, extension))))
|
||||
## assert compare
|
||||
|
||||
def test_outputs():
|
||||
call(['../../src/utils/track.py', '-o', 'poly'] +
|
||||
glob.glob(''.join((pwd, '/track*'))))
|
||||
poly = ''.join((pwd, '/poly.pvtp'))
|
||||
assert os.path.isfile(poly)
|
||||
metric = ''.join((pwd, '/true_poly.pvtp'))
|
||||
compare = filecmp.cmp(poly, metric)
|
||||
if not compare:
|
||||
os.rename('poly.pvtp', 'poly_error.pvtp')
|
||||
assert compare
|
||||
|
||||
##def test_results():
|
||||
## statepoint = glob.glob(pwd + '/statepoint.10.*')
|
||||
## call(['python', 'results.py', statepoint[0]])
|
||||
## compare = filecmp.cmp('results_test.dat', 'results_true.dat')
|
||||
## if not compare:
|
||||
## os.rename('results_test.dat', 'results_error.dat')
|
||||
## assert compare
|
||||
|
||||
def teardown():
|
||||
temp_files = glob.glob(''.join((pwd, '/statepoint*')))
|
||||
temp_files = temp_files + glob.glob(''.join((pwd, '/track*')))
|
||||
temp_files = temp_files + glob.glob(''.join((pwd, '/poly*')))
|
||||
for f in temp_files:
|
||||
if os.path.exists(f):
|
||||
os.remove(f)
|
||||
9
tests/test_track_output/true_poly.pvtp
Normal file
9
tests/test_track_output/true_poly.pvtp
Normal file
|
|
@ -0,0 +1,9 @@
|
|||
<?xml version="1.0"?>
|
||||
<VTKFile type="PPolyData" version="0.1" byte_order="LittleEndian" compressor="vtkZLibDataCompressor">
|
||||
<PPolyData GhostLevel="0">
|
||||
<PPoints>
|
||||
<PDataArray type="Float32" Name="Points" NumberOfComponents="3"/>
|
||||
</PPoints>
|
||||
<Piece Source="poly_0.vtp"/>
|
||||
</PPolyData>
|
||||
</VTKFile>
|
||||
Loading…
Add table
Add a link
Reference in a new issue