mirror of
https://github.com/openmc-dev/openmc.git
synced 2026-07-28 06:05:58 -04:00
cleaned up test and generated results
This commit is contained in:
parent
5ac313260c
commit
87a1139f62
6 changed files with 32 additions and 213 deletions
|
|
@ -1,11 +0,0 @@
|
|||
<?xml version='1.0' encoding='utf-8'?>
|
||||
<geometry>
|
||||
<cell id="10000" material="10000" name="fuel" region="-1" universe="10000" />
|
||||
<cell id="10001" material="10001" name="water" region="1 -10001 10002 -10003" universe="10000" />
|
||||
<cell fill="10000" id="10002" name="root cell" region="10000 -10001 10002 -10003" universe="0" />
|
||||
<surface coeffs="0 0 0.4" id="1" name="Fuel OR" type="z-cylinder" />
|
||||
<surface boundary="reflective" coeffs="-0.62992" id="10000" name="left" type="x-plane" />
|
||||
<surface boundary="reflective" coeffs="0.62992" id="10001" name="right" type="x-plane" />
|
||||
<surface boundary="reflective" coeffs="-0.62992" id="10002" name="bottom" type="y-plane" />
|
||||
<surface boundary="reflective" coeffs="0.62992" id="10003" name="top" type="y-plane" />
|
||||
</geometry>
|
||||
|
|
@ -1,21 +0,0 @@
|
|||
<?xml version='1.0' encoding='utf-8'?>
|
||||
<materials>
|
||||
<material id="10000" name="UO2 fuel at 2.4% wt enrichment">
|
||||
<density units="g/cm3" value="10.29769" />
|
||||
<nuclide ao="0.00019522896365555328" name="U234" scattering="iso-in-lab" />
|
||||
<nuclide ao="0.024299485497345803" name="U235" scattering="iso-in-lab" />
|
||||
<nuclide ao="0.9755052855389987" name="U238" scattering="iso-in-lab" />
|
||||
<nuclide ao="1.999242" name="O16" scattering="iso-in-lab" />
|
||||
<nuclide ao="0.000758" name="O17" scattering="iso-in-lab" />
|
||||
</material>
|
||||
<material id="10001" name="Borated water">
|
||||
<density units="g/cm3" value="0.740582" />
|
||||
<nuclide ao="7.928e-06" name="B10" scattering="iso-in-lab" />
|
||||
<nuclide ao="3.2072e-05" name="B11" scattering="iso-in-lab" />
|
||||
<nuclide ao="0.04999221300000001" name="H1" scattering="iso-in-lab" />
|
||||
<nuclide ao="7.787e-06" name="H2" scattering="iso-in-lab" />
|
||||
<nuclide ao="0.023990904" name="O16" scattering="iso-in-lab" />
|
||||
<nuclide ao="9.096e-06" name="O17" scattering="iso-in-lab" />
|
||||
<sab name="c_H_in_H2O" />
|
||||
</material>
|
||||
</materials>
|
||||
|
|
@ -1,87 +1,3 @@
|
|||
k-combined:
|
||||
1.177844E+00 1.713522E-02
|
||||
tally 1:
|
||||
9.400000E-01
|
||||
1.778300E-01
|
||||
2.561000E+00
|
||||
1.315759E+00
|
||||
8.618000E+00
|
||||
1.487929E+01
|
||||
2.559600E+01
|
||||
1.311144E+02
|
||||
4.700000E-02
|
||||
4.870000E-04
|
||||
1.010000E-01
|
||||
2.207000E-03
|
||||
3.780000E-01
|
||||
2.889000E-02
|
||||
1.089000E+00
|
||||
2.432570E-01
|
||||
tally 2:
|
||||
9.400000E-01
|
||||
1.778300E-01
|
||||
2.561000E+00
|
||||
1.315759E+00
|
||||
8.618000E+00
|
||||
1.487929E+01
|
||||
2.559600E+01
|
||||
1.311144E+02
|
||||
4.700000E-02
|
||||
4.870000E-04
|
||||
1.010000E-01
|
||||
2.207000E-03
|
||||
3.780000E-01
|
||||
2.889000E-02
|
||||
1.089000E+00
|
||||
2.432570E-01
|
||||
tally 3:
|
||||
9.070000E-01
|
||||
1.648450E-01
|
||||
2.495000E+00
|
||||
1.247251E+00
|
||||
8.515000E+00
|
||||
1.452994E+01
|
||||
2.539500E+01
|
||||
1.290580E+02
|
||||
3.800000E-02
|
||||
3.220000E-04
|
||||
8.400000E-02
|
||||
1.480000E-03
|
||||
3.540000E-01
|
||||
2.528400E-02
|
||||
9.770000E-01
|
||||
1.957910E-01
|
||||
tally 4:
|
||||
9.070000E-01
|
||||
1.648450E-01
|
||||
2.495000E+00
|
||||
1.247251E+00
|
||||
8.515000E+00
|
||||
1.452994E+01
|
||||
2.539500E+01
|
||||
1.290580E+02
|
||||
3.800000E-02
|
||||
3.220000E-04
|
||||
8.400000E-02
|
||||
1.480000E-03
|
||||
3.540000E-01
|
||||
2.528400E-02
|
||||
9.770000E-01
|
||||
1.957910E-01
|
||||
tally 5:
|
||||
1.847000E+00
|
||||
6.843910E-01
|
||||
5.056000E+00
|
||||
5.124718E+00
|
||||
1.713300E+01
|
||||
5.881492E+01
|
||||
5.099100E+01
|
||||
5.203348E+02
|
||||
8.500000E-02
|
||||
1.595000E-03
|
||||
1.850000E-01
|
||||
7.259000E-03
|
||||
7.320000E-01
|
||||
1.080440E-01
|
||||
2.066000E+00
|
||||
8.753660E-01
|
||||
tally 0:
|
||||
sum = 8.800000E-02
|
||||
sum_sq = 1.582000E-03
|
||||
|
|
|
|||
|
|
@ -1,12 +0,0 @@
|
|||
<?xml version='1.0' encoding='utf-8'?>
|
||||
<settings>
|
||||
<run_mode>eigenvalue</run_mode>
|
||||
<particles>1000</particles>
|
||||
<batches>10</batches>
|
||||
<inactive>5</inactive>
|
||||
<source strength="1.0">
|
||||
<space type="fission">
|
||||
<parameters>-0.62992 -0.62992 -1 0.62992 0.62992 1</parameters>
|
||||
</space>
|
||||
</source>
|
||||
</settings>
|
||||
|
|
@ -1,52 +0,0 @@
|
|||
<?xml version='1.0' encoding='utf-8'?>
|
||||
<tallies>
|
||||
<filter id="10003" type="cellfrom">
|
||||
<bins>10000</bins>
|
||||
</filter>
|
||||
<filter id="10004" type="cell">
|
||||
<bins>10001</bins>
|
||||
</filter>
|
||||
<filter id="10000" type="energy">
|
||||
<bins>0.0 4000000.0 20000000.0</bins>
|
||||
</filter>
|
||||
<filter id="10001" type="polar">
|
||||
<bins>0.0 0.785398163397 3.14159265359</bins>
|
||||
</filter>
|
||||
<filter id="10002" type="azimuthal">
|
||||
<bins>0.0 0.785398163397 3.14159265359</bins>
|
||||
</filter>
|
||||
<filter id="10005" type="surface">
|
||||
<bins>1</bins>
|
||||
</filter>
|
||||
<filter id="10006" type="cellfrom">
|
||||
<bins>10001</bins>
|
||||
</filter>
|
||||
<filter id="10007" type="cell">
|
||||
<bins>10000</bins>
|
||||
</filter>
|
||||
<tally id="0" name="10000-10001">
|
||||
<filters>10003 10004 10000 10001 10002</filters>
|
||||
<scores>total-current</scores>
|
||||
<estimator>analog</estimator>
|
||||
</tally>
|
||||
<tally id="1" name="10000-surface1">
|
||||
<filters>10003 10005 10000 10001 10002</filters>
|
||||
<scores>total-current</scores>
|
||||
<estimator>analog</estimator>
|
||||
</tally>
|
||||
<tally id="2" name="10001-10000">
|
||||
<filters>10006 10007 10000 10001 10002</filters>
|
||||
<scores>total-current</scores>
|
||||
<estimator>analog</estimator>
|
||||
</tally>
|
||||
<tally id="3" name="10001-surface1">
|
||||
<filters>10006 10005 10000 10001 10002</filters>
|
||||
<scores>total-current</scores>
|
||||
<estimator>analog</estimator>
|
||||
</tally>
|
||||
<tally id="4" name="surface1">
|
||||
<filters>10005 10000 10001 10002</filters>
|
||||
<scores>total-current</scores>
|
||||
<estimator>analog</estimator>
|
||||
</tally>
|
||||
</tallies>
|
||||
|
|
@ -4,6 +4,7 @@ import os
|
|||
import sys
|
||||
sys.path.insert(0, os.pardir)
|
||||
from testing_harness import PyAPITestHarness
|
||||
import numpy as np
|
||||
import openmc
|
||||
|
||||
|
||||
|
|
@ -30,7 +31,7 @@ class CreateSurfaceTallyTestHarness(PyAPITestHarness):
|
|||
# Instantiate ZCylinder surfaces
|
||||
fuel_or = openmc.ZCylinder(surface_id=1, x0=0, y0=0, R=0.4, name='Fuel OR')
|
||||
left = openmc.XPlane(surface_id=2, x0=-0.62992, name='left')
|
||||
right = openmc.XPlane(x0=0.62992, name='right')
|
||||
right = openmc.XPlane(surface_id=3, x0=0.62992, name='right')
|
||||
bottom = openmc.YPlane(y0=-0.62992, name='bottom')
|
||||
top = openmc.YPlane(y0=0.62992, name='top')
|
||||
|
||||
|
|
@ -83,6 +84,7 @@ class CreateSurfaceTallyTestHarness(PyAPITestHarness):
|
|||
|
||||
# Cell to cell tallies
|
||||
# These filters are same for all tallies
|
||||
two_groups = np.array([0., 4, 20.]) * 1e6
|
||||
energy_filter = openmc.EnergyFilter(two_groups)
|
||||
polar_filter = openmc.PolarFilter([0, np.pi / 4, np.pi])
|
||||
azimuthal_filter = openmc.AzimuthalFilter([0, np.pi / 4, np.pi])
|
||||
|
|
@ -100,46 +102,43 @@ class CreateSurfaceTallyTestHarness(PyAPITestHarness):
|
|||
cell_from_filter = openmc.CellFromFilter(cell1)
|
||||
cell_to_filter = openmc.CellFilter(cell2)
|
||||
|
||||
cell_to_cell_tallies.append(openmc.Tally(tally_id=2*tally_index, name=str(cell1)+'-'+str(cell2)))
|
||||
cell_to_cell_tallies[2*tally_index].filters = [cell_from_filter, cell_to_filter, energy_filter, polar_filter, azimuthal_filter]
|
||||
cell_to_cell_tallies[2*tally_index].scores = ['current']
|
||||
cell_to_cell_tallies[2*tally_index].estimator = 'analog'
|
||||
|
||||
tallies_file.append(cell_to_cell_tallies[2*tally_index])
|
||||
cell_to_cell_tallies.append(openmc.Tally(tally_id=tally_index, name=str(cell1)+'-'+str(cell2)))
|
||||
cell_to_cell_tallies[tally_index].filters = [cell_from_filter, cell_to_filter, energy_filter, polar_filter, azimuthal_filter]
|
||||
cell_to_cell_tallies[tally_index].scores = ['current']
|
||||
tallies_file.append(cell_to_cell_tallies[tally_index])
|
||||
tally_index += 1
|
||||
|
||||
# Cell from + surface filters for partial current
|
||||
surface_filter = openmc.SurfaceFilter([1])
|
||||
cell_to_cell_tallies.append(openmc.Tally(tally_id=2*tally_index+1, name=str(cell1)+'-surface1'))
|
||||
cell_to_cell_tallies[2*tally_index+1].filters = [cell_from_filter, surface_filter, energy_filter, polar_filter, azimuthal_filter]
|
||||
cell_to_cell_tallies[2*tally_index+1].scores = ['current']
|
||||
cell_to_cell_tallies[2*tally_index+1].estimator = 'analog'
|
||||
tallies_file.append(cell_to_cell_tallies[2*tally_index+1])
|
||||
|
||||
cell_to_cell_tallies.append(openmc.Tally(tally_id=tally_index, name=str(cell1)+'-surface1'))
|
||||
cell_to_cell_tallies[tally_index].filters = [cell_from_filter, surface_filter, energy_filter, polar_filter, azimuthal_filter]
|
||||
cell_to_cell_tallies[tally_index].scores = ['current']
|
||||
tallies_file.append(cell_to_cell_tallies[tally_index])
|
||||
tally_index += 1
|
||||
|
||||
# Surface filter on inner surface, for net current
|
||||
surface_filter = openmc.SurfaceFilter([1])
|
||||
cell_to_cell_tallies.append(openmc.Tally(tally_id=2*tally_index, name='surface1'))
|
||||
cell_to_cell_tallies[2*tally_index].filters = [surface_filter, energy_filter, polar_filter, azimuthal_filter]
|
||||
cell_to_cell_tallies[2*tally_index].scores = ['current']
|
||||
cell_to_cell_tallies[2*tally_index].estimator = 'analog'
|
||||
tallies_file.append(cell_to_cell_tallies[2*tally_index])
|
||||
surf_tally1 = openmc.Tally(tally_id=tally_index, name='net_cylinder')
|
||||
surf_tally1.filters = [surface_filter, energy_filter, polar_filter, azimuthal_filter]
|
||||
surf_tally1.scores = ['current']
|
||||
tallies_file.append(surf_tally1)
|
||||
tally_index += 1
|
||||
|
||||
# Surface filter on left surface, vacuum BC, for net current = leakage
|
||||
surface_filter = openmc.SurfaceFilter([1])
|
||||
cell_to_cell_tallies.append(openmc.Tally(tally_id=2*tally_index, name='surface1'))
|
||||
cell_to_cell_tallies[2*tally_index].filters = [surface_filter, energy_filter, polar_filter, azimuthal_filter]
|
||||
cell_to_cell_tallies[2*tally_index].scores = ['current']
|
||||
cell_to_cell_tallies[2*tally_index].estimator = 'analog'
|
||||
tallies_file.append(cell_to_cell_tallies[2*tally_index])
|
||||
surface_filter = openmc.SurfaceFilter([2])
|
||||
surf_tally2 = openmc.Tally(tally_id=tally_index, name='leakage_left')
|
||||
surf_tally2.filters = [surface_filter, energy_filter, polar_filter, azimuthal_filter]
|
||||
surf_tally2.scores = ['current']
|
||||
tallies_file.append(surf_tally2)
|
||||
tally_index += 1
|
||||
|
||||
# Surface filter on right surface, reflective, for net current = 0
|
||||
surface_filter = openmc.SurfaceFilter([1])
|
||||
cell_to_cell_tallies.append(openmc.Tally(tally_id=2*tally_index, name='surface1'))
|
||||
cell_to_cell_tallies[2*tally_index].filters = [surface_filter, energy_filter, polar_filter, azimuthal_filter]
|
||||
cell_to_cell_tallies[2*tally_index].scores = ['current']
|
||||
cell_to_cell_tallies[2*tally_index].estimator = 'analog'
|
||||
tallies_file.append(cell_to_cell_tallies[2*tally_index])
|
||||
surface_filter = openmc.SurfaceFilter([3])
|
||||
surf_tally3 = openmc.Tally(tally_id=tally_index, name='net_right')
|
||||
surf_tally3.filters = [surface_filter, energy_filter, polar_filter, azimuthal_filter]
|
||||
surf_tally3.scores = ['current']
|
||||
tallies_file.append(surf_tally3)
|
||||
tally_index += 1
|
||||
|
||||
tallies_file.export_to_xml()
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue