mirror of
https://github.com/openmc-dev/openmc.git
synced 2026-07-28 06:05:58 -04:00
updated statepoint utility and cmfd results to handle printing more detalied cmfd results
This commit is contained in:
parent
d020954a5d
commit
576b45ef23
5 changed files with 392 additions and 100 deletions
|
|
@ -199,8 +199,10 @@ class StatePoint(object):
|
|||
self.cmfd_indices = self._get_int(4, path='cmfd/indicies')
|
||||
self.k_cmfd = self._get_double(self.current_batch,
|
||||
path='cmfd/k_cmfd')
|
||||
self.cmfd_src = self._get_double(np.product(self.cmfd_indices),
|
||||
self.cmfd_src = self._get_double_array(np.product(self.cmfd_indices),
|
||||
path='cmfd/cmfd_src')
|
||||
self.cmfd_src = np.reshape(self.cmfd_src,
|
||||
tuple(self.cmfd_indices), order='F')
|
||||
self.cmfd_entropy = self._get_double(self.current_batch,
|
||||
path='cmfd/cmfd_entropy')
|
||||
self.cmfd_balance = self._get_double(self.current_batch,
|
||||
|
|
@ -598,7 +600,7 @@ class StatePoint(object):
|
|||
else:
|
||||
return [float(v) for v in self._get_data(n, 'd', 8)]
|
||||
|
||||
def _get_double(self, n=1, path=None):
|
||||
def _get_double_array(self, n=1, path=None):
|
||||
if self._hdf5:
|
||||
return self._f[path].value
|
||||
else:
|
||||
|
|
|
|||
|
|
@ -53,6 +53,30 @@ outstr += 'tally 4:\n'
|
|||
for item in results4:
|
||||
outstr += "{0:12.6E}\n".format(item)
|
||||
|
||||
# write out cmfd answers
|
||||
outstr += 'cmfd indices\n'
|
||||
for item in sp.cmfd_indices:
|
||||
outstr += "{0:12.6E}\n".format(item)
|
||||
outstr += 'k cmfd\n'
|
||||
for item in sp.k_cmfd:
|
||||
outstr += "{0:12.6E}\n".format(item)
|
||||
outstr += 'cmfd entropy\n'
|
||||
for item in sp.cmfd_entropy:
|
||||
outstr += "{0:12.6E}\n".format(item)
|
||||
outstr += 'cmfd balance\n'
|
||||
for item in sp.cmfd_balance:
|
||||
outstr += "{0:12.6E}\n".format(item)
|
||||
outstr += 'cmfd dominance ratio\n'
|
||||
for item in sp.cmfd_dominance:
|
||||
outstr += "{0:12.6E}\n".format(item)
|
||||
outstr += 'cmfd openmc source comparison\n'
|
||||
for item in sp.cmfd_srccmp:
|
||||
outstr += "{0:12.6E}\n".format(item)
|
||||
outstr += 'cmfd source\n'
|
||||
cmfdsrc = np.reshape(sp.cmfd_src, np.product(sp.cmfd_indices), order='F')
|
||||
for item in cmfdsrc:
|
||||
outstr += "{0:12.6E}\n".format(item)
|
||||
|
||||
# write results to file
|
||||
with open('results_test.dat','w') as fh:
|
||||
fh.write(outstr)
|
||||
|
|
|
|||
|
|
@ -1,14 +1,14 @@
|
|||
k-combined:
|
||||
1.167124E+00 1.217343E-02
|
||||
1.167124E+00 1.217344E-02
|
||||
tally 1:
|
||||
1.126891E+01
|
||||
1.275755E+01
|
||||
2.086556E+01
|
||||
4.369501E+01
|
||||
1.275756E+01
|
||||
2.086557E+01
|
||||
4.369504E+01
|
||||
2.853629E+01
|
||||
8.169559E+01
|
||||
3.404506E+01
|
||||
1.165019E+02
|
||||
8.169563E+01
|
||||
3.404507E+01
|
||||
1.165020E+02
|
||||
3.723908E+01
|
||||
1.389881E+02
|
||||
3.760048E+01
|
||||
|
|
@ -16,86 +16,86 @@ tally 1:
|
|||
3.455469E+01
|
||||
1.197186E+02
|
||||
2.837503E+01
|
||||
8.086291E+01
|
||||
2.151789E+01
|
||||
4.648315E+01
|
||||
8.086287E+01
|
||||
2.151788E+01
|
||||
4.648312E+01
|
||||
1.194541E+01
|
||||
1.432331E+01
|
||||
1.432330E+01
|
||||
tally 2:
|
||||
2.292173E+01
|
||||
2.650792E+01
|
||||
1.598183E+01
|
||||
1.288692E+01
|
||||
2.194143E+00
|
||||
2.510557E-01
|
||||
4.217816E+01
|
||||
8.938583E+01
|
||||
2.292174E+01
|
||||
2.650794E+01
|
||||
1.598184E+01
|
||||
1.288693E+01
|
||||
2.194144E+00
|
||||
2.510560E-01
|
||||
4.217817E+01
|
||||
8.938588E+01
|
||||
2.974466E+01
|
||||
4.447038E+01
|
||||
3.939269E+00
|
||||
7.882413E-01
|
||||
5.742289E+01
|
||||
4.447040E+01
|
||||
3.939271E+00
|
||||
7.882419E-01
|
||||
5.742290E+01
|
||||
1.654599E+02
|
||||
4.067581E+01
|
||||
8.308454E+01
|
||||
5.566955E+00
|
||||
1.570072E+00
|
||||
6.810586E+01
|
||||
4.067582E+01
|
||||
8.308457E+01
|
||||
5.566956E+00
|
||||
1.570073E+00
|
||||
6.810587E+01
|
||||
2.331019E+02
|
||||
4.831543E+01
|
||||
4.831544E+01
|
||||
1.174673E+02
|
||||
6.244999E+00
|
||||
1.967938E+00
|
||||
6.245000E+00
|
||||
1.967939E+00
|
||||
7.258131E+01
|
||||
2.646756E+02
|
||||
5.185146E+01
|
||||
1.351425E+02
|
||||
6.622488E+00
|
||||
1.351426E+02
|
||||
6.622489E+00
|
||||
2.231695E+00
|
||||
7.246115E+01
|
||||
2.641295E+02
|
||||
5.159542E+01
|
||||
5.159541E+01
|
||||
1.339441E+02
|
||||
6.702239E+00
|
||||
2.277825E+00
|
||||
6.716397E+01
|
||||
6.716396E+01
|
||||
2.266815E+02
|
||||
4.765063E+01
|
||||
1.141627E+02
|
||||
6.384098E+00
|
||||
4.765062E+01
|
||||
1.141626E+02
|
||||
6.384097E+00
|
||||
2.063760E+00
|
||||
5.549542E+01
|
||||
1.545361E+02
|
||||
5.549541E+01
|
||||
1.545360E+02
|
||||
3.940819E+01
|
||||
7.794880E+01
|
||||
5.183375E+00
|
||||
1.369483E+00
|
||||
4.155685E+01
|
||||
8.679439E+01
|
||||
2.926744E+01
|
||||
4.307145E+01
|
||||
3.938852E+00
|
||||
7.877949E-01
|
||||
2.335180E+01
|
||||
2.758241E+01
|
||||
1.622683E+01
|
||||
1.331996E+01
|
||||
2.248921E+00
|
||||
2.594934E-01
|
||||
7.794877E+01
|
||||
5.183373E+00
|
||||
1.369482E+00
|
||||
4.155684E+01
|
||||
8.679434E+01
|
||||
2.926743E+01
|
||||
4.307143E+01
|
||||
3.938851E+00
|
||||
7.877944E-01
|
||||
2.335179E+01
|
||||
2.758239E+01
|
||||
1.622682E+01
|
||||
1.331995E+01
|
||||
2.248920E+00
|
||||
2.594933E-01
|
||||
tally 3:
|
||||
1.537807E+01
|
||||
1.193746E+01
|
||||
1.044189E+00
|
||||
5.627797E-02
|
||||
2.861614E+01
|
||||
4.118322E+01
|
||||
4.118324E+01
|
||||
1.846208E+00
|
||||
1.729007E-01
|
||||
3.921462E+01
|
||||
7.723576E+01
|
||||
3.921463E+01
|
||||
7.723579E+01
|
||||
2.427723E+00
|
||||
2.983153E-01
|
||||
4.653207E+01
|
||||
4.653208E+01
|
||||
1.089818E+02
|
||||
3.128394E+00
|
||||
4.945409E-01
|
||||
|
|
@ -111,15 +111,15 @@ tally 3:
|
|||
1.061019E+02
|
||||
2.936424E+00
|
||||
4.356307E-01
|
||||
3.783939E+01
|
||||
7.188489E+01
|
||||
3.783938E+01
|
||||
7.188486E+01
|
||||
2.485680E+00
|
||||
3.117618E-01
|
||||
2.819358E+01
|
||||
3.997588E+01
|
||||
3.997585E+01
|
||||
1.875908E+00
|
||||
1.772000E-01
|
||||
1.562421E+01
|
||||
1.562420E+01
|
||||
1.236020E+01
|
||||
1.013140E+00
|
||||
5.260420E-02
|
||||
|
|
@ -160,8 +160,8 @@ tally 4:
|
|||
0.000000E+00
|
||||
0.000000E+00
|
||||
0.000000E+00
|
||||
3.126365E+00
|
||||
4.930682E-01
|
||||
3.126366E+00
|
||||
4.930686E-01
|
||||
0.000000E+00
|
||||
0.000000E+00
|
||||
0.000000E+00
|
||||
|
|
@ -208,10 +208,10 @@ tally 4:
|
|||
0.000000E+00
|
||||
0.000000E+00
|
||||
0.000000E+00
|
||||
5.456410E+00
|
||||
1.499416E+00
|
||||
2.727755E+00
|
||||
3.788867E-01
|
||||
5.456412E+00
|
||||
1.499417E+00
|
||||
2.727756E+00
|
||||
3.788869E-01
|
||||
0.000000E+00
|
||||
0.000000E+00
|
||||
0.000000E+00
|
||||
|
|
@ -256,10 +256,10 @@ tally 4:
|
|||
0.000000E+00
|
||||
0.000000E+00
|
||||
0.000000E+00
|
||||
7.453480E+00
|
||||
2.790159E+00
|
||||
5.240103E+00
|
||||
1.386895E+00
|
||||
7.453481E+00
|
||||
2.790160E+00
|
||||
5.240104E+00
|
||||
1.386896E+00
|
||||
0.000000E+00
|
||||
0.000000E+00
|
||||
0.000000E+00
|
||||
|
|
@ -304,10 +304,10 @@ tally 4:
|
|||
0.000000E+00
|
||||
0.000000E+00
|
||||
0.000000E+00
|
||||
8.741563E+00
|
||||
3.830225E+00
|
||||
7.137968E+00
|
||||
2.555042E+00
|
||||
8.741565E+00
|
||||
3.830226E+00
|
||||
7.137969E+00
|
||||
2.555043E+00
|
||||
0.000000E+00
|
||||
0.000000E+00
|
||||
0.000000E+00
|
||||
|
|
@ -354,8 +354,8 @@ tally 4:
|
|||
0.000000E+00
|
||||
9.221731E+00
|
||||
4.266573E+00
|
||||
8.474116E+00
|
||||
3.604647E+00
|
||||
8.474118E+00
|
||||
3.604648E+00
|
||||
0.000000E+00
|
||||
0.000000E+00
|
||||
0.000000E+00
|
||||
|
|
@ -401,9 +401,9 @@ tally 4:
|
|||
0.000000E+00
|
||||
0.000000E+00
|
||||
9.054937E+00
|
||||
4.124537E+00
|
||||
9.066119E+00
|
||||
4.133833E+00
|
||||
4.124536E+00
|
||||
9.066120E+00
|
||||
4.133834E+00
|
||||
0.000000E+00
|
||||
0.000000E+00
|
||||
0.000000E+00
|
||||
|
|
@ -448,8 +448,8 @@ tally 4:
|
|||
0.000000E+00
|
||||
0.000000E+00
|
||||
0.000000E+00
|
||||
8.362253E+00
|
||||
3.517245E+00
|
||||
8.362251E+00
|
||||
3.517244E+00
|
||||
9.086548E+00
|
||||
4.156118E+00
|
||||
0.000000E+00
|
||||
|
|
@ -496,10 +496,10 @@ tally 4:
|
|||
0.000000E+00
|
||||
0.000000E+00
|
||||
0.000000E+00
|
||||
6.871573E+00
|
||||
2.369190E+00
|
||||
8.399584E+00
|
||||
3.549784E+00
|
||||
6.871571E+00
|
||||
2.369189E+00
|
||||
8.399583E+00
|
||||
3.549783E+00
|
||||
0.000000E+00
|
||||
0.000000E+00
|
||||
0.000000E+00
|
||||
|
|
@ -544,10 +544,10 @@ tally 4:
|
|||
0.000000E+00
|
||||
0.000000E+00
|
||||
0.000000E+00
|
||||
4.998103E+00
|
||||
1.258194E+00
|
||||
7.145296E+00
|
||||
2.568115E+00
|
||||
4.998101E+00
|
||||
1.258193E+00
|
||||
7.145294E+00
|
||||
2.568114E+00
|
||||
0.000000E+00
|
||||
0.000000E+00
|
||||
0.000000E+00
|
||||
|
|
@ -592,10 +592,10 @@ tally 4:
|
|||
0.000000E+00
|
||||
0.000000E+00
|
||||
0.000000E+00
|
||||
2.716076E+00
|
||||
3.753568E-01
|
||||
5.427593E+00
|
||||
1.484154E+00
|
||||
2.716075E+00
|
||||
3.753566E-01
|
||||
5.427591E+00
|
||||
1.484153E+00
|
||||
0.000000E+00
|
||||
0.000000E+00
|
||||
0.000000E+00
|
||||
|
|
@ -642,8 +642,8 @@ tally 4:
|
|||
0.000000E+00
|
||||
0.000000E+00
|
||||
0.000000E+00
|
||||
3.056645E+00
|
||||
4.702349E-01
|
||||
3.056644E+00
|
||||
4.702345E-01
|
||||
0.000000E+00
|
||||
0.000000E+00
|
||||
0.000000E+00
|
||||
|
|
@ -652,3 +652,124 @@ tally 4:
|
|||
0.000000E+00
|
||||
0.000000E+00
|
||||
0.000000E+00
|
||||
cmfd indices
|
||||
1.000000E+01
|
||||
1.000000E+00
|
||||
1.000000E+00
|
||||
1.000000E+00
|
||||
k cmfd
|
||||
0.000000E+00
|
||||
0.000000E+00
|
||||
0.000000E+00
|
||||
0.000000E+00
|
||||
1.158665E+00
|
||||
1.173348E+00
|
||||
1.180514E+00
|
||||
1.168646E+00
|
||||
1.152485E+00
|
||||
1.154989E+00
|
||||
1.152285E+00
|
||||
1.152275E+00
|
||||
1.149476E+00
|
||||
1.154912E+00
|
||||
1.164393E+00
|
||||
1.170145E+00
|
||||
1.169161E+00
|
||||
1.167966E+00
|
||||
1.170153E+00
|
||||
1.170989E+00
|
||||
cmfd entropy
|
||||
0.000000E+00
|
||||
0.000000E+00
|
||||
0.000000E+00
|
||||
0.000000E+00
|
||||
3.229801E+00
|
||||
3.226763E+00
|
||||
3.225011E+00
|
||||
3.230316E+00
|
||||
3.232043E+00
|
||||
3.228854E+00
|
||||
3.227439E+00
|
||||
3.228206E+00
|
||||
3.226749E+00
|
||||
3.222635E+00
|
||||
3.218882E+00
|
||||
3.219196E+00
|
||||
3.218057E+00
|
||||
3.220324E+00
|
||||
3.219099E+00
|
||||
3.219847E+00
|
||||
cmfd balance
|
||||
0.000000E+00
|
||||
0.000000E+00
|
||||
0.000000E+00
|
||||
0.000000E+00
|
||||
6.244292E-03
|
||||
5.210436E-03
|
||||
4.212224E-03
|
||||
3.321578E-03
|
||||
3.067254E-03
|
||||
3.076634E-03
|
||||
2.601637E-03
|
||||
2.666441E-03
|
||||
2.490817E-03
|
||||
2.571411E-03
|
||||
3.013819E-03
|
||||
2.802836E-03
|
||||
2.725356E-03
|
||||
2.475281E-03
|
||||
2.279123E-03
|
||||
2.110816E-03
|
||||
cmfd dominance ratio
|
||||
0.000000E+00
|
||||
0.000000E+00
|
||||
0.000000E+00
|
||||
0.000000E+00
|
||||
5.509393E-01
|
||||
5.472954E-01
|
||||
5.461377E-01
|
||||
5.518823E-01
|
||||
5.540420E-01
|
||||
5.513822E-01
|
||||
5.505071E-01
|
||||
5.498933E-01
|
||||
5.486126E-01
|
||||
5.450413E-01
|
||||
5.437663E-01
|
||||
5.421995E-01
|
||||
5.417191E-01
|
||||
5.437232E-01
|
||||
5.429525E-01
|
||||
5.428436E-01
|
||||
cmfd openmc source comparison
|
||||
0.000000E+00
|
||||
0.000000E+00
|
||||
0.000000E+00
|
||||
0.000000E+00
|
||||
1.136193E-02
|
||||
1.059214E-02
|
||||
9.675100E-03
|
||||
7.296572E-03
|
||||
5.812484E-03
|
||||
6.138879E-03
|
||||
6.070297E-03
|
||||
5.791570E-03
|
||||
6.020032E-03
|
||||
7.287183E-03
|
||||
7.068423E-03
|
||||
6.380521E-03
|
||||
5.828010E-03
|
||||
4.741191E-03
|
||||
4.848114E-03
|
||||
4.686772E-03
|
||||
cmfd source
|
||||
4.367444E-02
|
||||
7.866919E-02
|
||||
1.050799E-01
|
||||
1.366581E-01
|
||||
1.421824E-01
|
||||
1.393453E-01
|
||||
1.269612E-01
|
||||
1.060419E-01
|
||||
7.920472E-02
|
||||
4.218277E-02
|
||||
|
|
|
|||
|
|
@ -53,6 +53,30 @@ outstr += 'tally 4:\n'
|
|||
for item in results4:
|
||||
outstr += "{0:12.6E}\n".format(item)
|
||||
|
||||
# write out cmfd answers
|
||||
outstr += 'cmfd indices\n'
|
||||
for item in sp.cmfd_indices:
|
||||
outstr += "{0:12.6E}\n".format(item)
|
||||
outstr += 'k cmfd\n'
|
||||
for item in sp.k_cmfd:
|
||||
outstr += "{0:12.6E}\n".format(item)
|
||||
outstr += 'cmfd entropy\n'
|
||||
for item in sp.cmfd_entropy:
|
||||
outstr += "{0:12.6E}\n".format(item)
|
||||
outstr += 'cmfd balance\n'
|
||||
for item in sp.cmfd_balance:
|
||||
outstr += "{0:12.6E}\n".format(item)
|
||||
outstr += 'cmfd dominance ratio\n'
|
||||
for item in sp.cmfd_dominance:
|
||||
outstr += "{0:12.6E}\n".format(item)
|
||||
outstr += 'cmfd openmc source comparison\n'
|
||||
for item in sp.cmfd_srccmp:
|
||||
outstr += "{0:12.6E}\n".format(item)
|
||||
outstr += 'cmfd source\n'
|
||||
cmfdsrc = np.reshape(sp.cmfd_src, np.product(sp.cmfd_indices), order='F')
|
||||
for item in cmfdsrc:
|
||||
outstr += "{0:12.6E}\n".format(item)
|
||||
|
||||
# write results to file
|
||||
with open('results_test.dat','w') as fh:
|
||||
fh.write(outstr)
|
||||
|
|
|
|||
|
|
@ -652,3 +652,124 @@ tally 4:
|
|||
0.000000E+00
|
||||
0.000000E+00
|
||||
0.000000E+00
|
||||
cmfd indices
|
||||
1.000000E+01
|
||||
1.000000E+00
|
||||
1.000000E+00
|
||||
1.000000E+00
|
||||
k cmfd
|
||||
0.000000E+00
|
||||
0.000000E+00
|
||||
0.000000E+00
|
||||
0.000000E+00
|
||||
1.158665E+00
|
||||
1.177323E+00
|
||||
1.179341E+00
|
||||
1.169660E+00
|
||||
1.179827E+00
|
||||
1.180220E+00
|
||||
1.177699E+00
|
||||
1.179321E+00
|
||||
1.180728E+00
|
||||
1.180996E+00
|
||||
1.186680E+00
|
||||
1.181455E+00
|
||||
1.178393E+00
|
||||
1.176470E+00
|
||||
1.172593E+00
|
||||
1.167042E+00
|
||||
cmfd entropy
|
||||
0.000000E+00
|
||||
0.000000E+00
|
||||
0.000000E+00
|
||||
0.000000E+00
|
||||
3.229801E+00
|
||||
3.227279E+00
|
||||
3.224715E+00
|
||||
3.226705E+00
|
||||
3.226404E+00
|
||||
3.227329E+00
|
||||
3.227407E+00
|
||||
3.228601E+00
|
||||
3.230423E+00
|
||||
3.228093E+00
|
||||
3.226358E+00
|
||||
3.226226E+00
|
||||
3.227324E+00
|
||||
3.228594E+00
|
||||
3.229513E+00
|
||||
3.229820E+00
|
||||
cmfd balance
|
||||
0.000000E+00
|
||||
0.000000E+00
|
||||
0.000000E+00
|
||||
0.000000E+00
|
||||
6.244292E-03
|
||||
5.300885E-03
|
||||
5.198276E-03
|
||||
3.759109E-03
|
||||
3.994559E-03
|
||||
3.064086E-03
|
||||
2.749389E-03
|
||||
2.388483E-03
|
||||
2.304428E-03
|
||||
2.188627E-03
|
||||
2.269076E-03
|
||||
2.016776E-03
|
||||
1.622043E-03
|
||||
1.470984E-03
|
||||
1.367144E-03
|
||||
1.402525E-03
|
||||
cmfd dominance ratio
|
||||
0.000000E+00
|
||||
0.000000E+00
|
||||
0.000000E+00
|
||||
0.000000E+00
|
||||
5.509393E-01
|
||||
5.473805E-01
|
||||
5.434034E-01
|
||||
5.469278E-01
|
||||
5.460554E-01
|
||||
5.474063E-01
|
||||
5.486271E-01
|
||||
5.485095E-01
|
||||
5.490619E-01
|
||||
5.473524E-01
|
||||
5.466605E-01
|
||||
5.471154E-01
|
||||
5.480465E-01
|
||||
5.485550E-01
|
||||
5.500141E-01
|
||||
5.502154E-01
|
||||
cmfd openmc source comparison
|
||||
0.000000E+00
|
||||
0.000000E+00
|
||||
0.000000E+00
|
||||
0.000000E+00
|
||||
1.136193E-02
|
||||
1.007349E-02
|
||||
8.776995E-03
|
||||
6.729971E-03
|
||||
6.921055E-03
|
||||
5.867589E-03
|
||||
4.366276E-03
|
||||
4.051899E-03
|
||||
3.406846E-03
|
||||
4.043983E-03
|
||||
4.864903E-03
|
||||
3.711687E-03
|
||||
3.124413E-03
|
||||
2.675579E-03
|
||||
2.523549E-03
|
||||
2.724884E-03
|
||||
cmfd source
|
||||
4.534769E-02
|
||||
8.593793E-02
|
||||
1.059054E-01
|
||||
1.317554E-01
|
||||
1.358070E-01
|
||||
1.352224E-01
|
||||
1.290227E-01
|
||||
1.093443E-01
|
||||
7.943056E-02
|
||||
4.222668E-02
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue