mirror of
https://github.com/openmc-dev/openmc.git
synced 2026-07-28 22:26:08 -04:00
Add (n,gamma) rate to photon tests (should be zero)
This commit is contained in:
parent
557385c2bf
commit
7594e7570c
6 changed files with 68 additions and 28 deletions
|
|
@ -50,19 +50,19 @@
|
|||
<tally id="2">
|
||||
<filters>2</filters>
|
||||
<nuclides>Al27 total</nuclides>
|
||||
<scores>total</scores>
|
||||
<scores>total (n,gamma)</scores>
|
||||
<estimator>tracklength</estimator>
|
||||
</tally>
|
||||
<tally id="3">
|
||||
<filters>2</filters>
|
||||
<nuclides>Al27 total</nuclides>
|
||||
<scores>total heating</scores>
|
||||
<scores>total heating (n,gamma)</scores>
|
||||
<estimator>collision</estimator>
|
||||
</tally>
|
||||
<tally id="4">
|
||||
<filters>2</filters>
|
||||
<nuclides>Al27 total</nuclides>
|
||||
<scores>total heating</scores>
|
||||
<scores>total heating (n,gamma)</scores>
|
||||
<estimator>analog</estimator>
|
||||
</tally>
|
||||
</tallies>
|
||||
|
|
|
|||
|
|
@ -10,10 +10,16 @@ tally 1:
|
|||
tally 2:
|
||||
1.249805E+00
|
||||
1.562013E+00
|
||||
4.284760E-04
|
||||
1.835917E-07
|
||||
1.249805E+00
|
||||
1.562013E+00
|
||||
4.284760E-04
|
||||
1.835917E-07
|
||||
8.281718E-01
|
||||
6.858685E-01
|
||||
0.000000E+00
|
||||
0.000000E+00
|
||||
8.281718E-01
|
||||
6.858685E-01
|
||||
0.000000E+00
|
||||
|
|
@ -24,52 +30,84 @@ tally 2:
|
|||
0.000000E+00
|
||||
0.000000E+00
|
||||
0.000000E+00
|
||||
0.000000E+00
|
||||
0.000000E+00
|
||||
0.000000E+00
|
||||
0.000000E+00
|
||||
0.000000E+00
|
||||
0.000000E+00
|
||||
0.000000E+00
|
||||
0.000000E+00
|
||||
0.000000E+00
|
||||
0.000000E+00
|
||||
tally 3:
|
||||
1.248100E+00
|
||||
1.557754E+00
|
||||
2.024868E+06
|
||||
4.100089E+12
|
||||
4.283447E-04
|
||||
1.834792E-07
|
||||
1.248100E+00
|
||||
1.557754E+00
|
||||
2.024868E+06
|
||||
4.100089E+12
|
||||
8.242000E-01
|
||||
6.793056E-01
|
||||
5.827819E+03
|
||||
3.396348E+07
|
||||
4.283447E-04
|
||||
1.834792E-07
|
||||
8.242000E-01
|
||||
6.793056E-01
|
||||
5.827819E+03
|
||||
3.396348E+07
|
||||
0.000000E+00
|
||||
0.000000E+00
|
||||
8.242000E-01
|
||||
6.793056E-01
|
||||
5.827819E+03
|
||||
3.396348E+07
|
||||
0.000000E+00
|
||||
0.000000E+00
|
||||
1.834863E+05
|
||||
3.366722E+10
|
||||
0.000000E+00
|
||||
0.000000E+00
|
||||
1.834863E+05
|
||||
3.366722E+10
|
||||
0.000000E+00
|
||||
0.000000E+00
|
||||
5.938849E+03
|
||||
3.526993E+07
|
||||
0.000000E+00
|
||||
0.000000E+00
|
||||
1.834863E+05
|
||||
3.366722E+10
|
||||
0.000000E+00
|
||||
0.000000E+00
|
||||
0.000000E+00
|
||||
0.000000E+00
|
||||
5.938849E+03
|
||||
3.526993E+07
|
||||
0.000000E+00
|
||||
0.000000E+00
|
||||
0.000000E+00
|
||||
0.000000E+00
|
||||
5.938849E+03
|
||||
3.526993E+07
|
||||
0.000000E+00
|
||||
0.000000E+00
|
||||
tally 4:
|
||||
1.248100E+00
|
||||
1.557754E+00
|
||||
2.024868E+06
|
||||
4.100089E+12
|
||||
0.000000E+00
|
||||
0.000000E+00
|
||||
1.248100E+00
|
||||
1.557754E+00
|
||||
2.024868E+06
|
||||
4.100089E+12
|
||||
0.000000E+00
|
||||
0.000000E+00
|
||||
2.308000E-01
|
||||
5.326864E-02
|
||||
5.822937E+03
|
||||
3.390660E+07
|
||||
0.000000E+00
|
||||
0.000000E+00
|
||||
8.242000E-01
|
||||
6.793056E-01
|
||||
5.827819E+03
|
||||
|
|
@ -80,6 +118,10 @@ tally 4:
|
|||
0.000000E+00
|
||||
0.000000E+00
|
||||
0.000000E+00
|
||||
0.000000E+00
|
||||
0.000000E+00
|
||||
0.000000E+00
|
||||
0.000000E+00
|
||||
1.834863E+05
|
||||
3.366722E+10
|
||||
0.000000E+00
|
||||
|
|
@ -88,5 +130,11 @@ tally 4:
|
|||
0.000000E+00
|
||||
0.000000E+00
|
||||
0.000000E+00
|
||||
0.000000E+00
|
||||
0.000000E+00
|
||||
0.000000E+00
|
||||
0.000000E+00
|
||||
5.938849E+03
|
||||
3.526993E+07
|
||||
0.000000E+00
|
||||
0.000000E+00
|
||||
|
|
|
|||
|
|
@ -48,17 +48,17 @@ def model():
|
|||
current_tally.scores = ['current']
|
||||
tally_tracklength = openmc.Tally()
|
||||
tally_tracklength.filters = [particle_filter]
|
||||
tally_tracklength.scores = ['total'] # heating doesn't work with tracklength
|
||||
tally_tracklength.scores = ['total', '(n,gamma)'] # heating doesn't work with tracklength
|
||||
tally_tracklength.nuclides = ['Al27', 'total']
|
||||
tally_tracklength.estimator = 'tracklength'
|
||||
tally_collision = openmc.Tally()
|
||||
tally_collision.filters = [particle_filter]
|
||||
tally_collision.scores = ['total', 'heating']
|
||||
tally_collision.scores = ['total', 'heating', '(n,gamma)']
|
||||
tally_collision.nuclides = ['Al27', 'total']
|
||||
tally_collision.estimator = 'collision'
|
||||
tally_analog = openmc.Tally()
|
||||
tally_analog.filters = [particle_filter]
|
||||
tally_analog.scores = ['total', 'heating']
|
||||
tally_analog.scores = ['total', 'heating', '(n,gamma)']
|
||||
tally_analog.nuclides = ['Al27', 'total']
|
||||
tally_analog.estimator = 'analog'
|
||||
model.tallies.extend([current_tally, tally_tracklength,
|
||||
|
|
|
|||
|
|
@ -40,6 +40,6 @@
|
|||
</filter>
|
||||
<tally id="1">
|
||||
<filters>1</filters>
|
||||
<scores>flux</scores>
|
||||
<scores>flux (n,gamma)</scores>
|
||||
</tally>
|
||||
</tallies>
|
||||
|
|
|
|||
|
|
@ -1,3 +1,5 @@
|
|||
tally 1:
|
||||
sum = 2.275713E+02
|
||||
sum_sq = 5.178870E+04
|
||||
2.275713E+02
|
||||
5.178870E+04
|
||||
0.000000E+00
|
||||
0.000000E+00
|
||||
|
|
|
|||
|
|
@ -41,20 +41,10 @@ class SourceTestHarness(PyAPITestHarness):
|
|||
particle_filter = openmc.ParticleFilter('photon')
|
||||
tally = openmc.Tally()
|
||||
tally.filters = [particle_filter]
|
||||
tally.scores = ['flux']
|
||||
tally.scores = ['flux', '(n,gamma)']
|
||||
tallies = openmc.Tallies([tally])
|
||||
tallies.export_to_xml()
|
||||
|
||||
def _get_results(self):
|
||||
with openmc.StatePoint(self._sp_name) as sp:
|
||||
outstr = ''
|
||||
t = sp.get_tally()
|
||||
outstr += 'tally {}:\n'.format(t.id)
|
||||
outstr += 'sum = {:12.6E}\n'.format(t.sum[0, 0, 0])
|
||||
outstr += 'sum_sq = {:12.6E}\n'.format(t.sum_sq[0, 0, 0])
|
||||
|
||||
return outstr
|
||||
|
||||
|
||||
def test_photon_source():
|
||||
harness = SourceTestHarness('statepoint.1.h5')
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue