Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 3 additions & 2 deletions xsgen/brightlite.py
Original file line number Diff line number Diff line change
Expand Up @@ -42,12 +42,12 @@ def write(self, libs, dirname):
for temp_nuc in matlib['material'][i].comp:
nuc_name = str(nucname.name(temp_nuc))
try:
trans_matrix[nuc_name].append(matlib['material'][i].comp[temp_nuc])
trans_matrix[nuc_name].append(matlib['material'][i].comp[temp_nuc]*1000)
except KeyError:
if matlib['material'][i].comp[temp_nuc] > self.rc.track_nuc_threshold:
zero_array = [0]*i
trans_matrix[nuc_name] = zero_array
trans_matrix[nuc_name].append(matlib['material'][i].comp[temp_nuc])
trans_matrix[nuc_name].append(matlib['material'][i].comp[temp_nuc]*1000)
i+=1
nucs = matlib["tracked_nucs"]
lines.extend(sorted([n + " " + " ".
Expand Down Expand Up @@ -82,5 +82,6 @@ def write(self, libs, dirname):
for n, f in self.rc.clad_material.comp.items()]
f.write("\n".join(cladrows))
f.write("\n")
#for tape9 in self.libs['tape9']:
shutil.copyfile("TAPE9.INP", os.path.join(dirname, "TAPE9.INP"))

16 changes: 15 additions & 1 deletion xsgen/openmc_origen.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@

from xsgen.utils import indir, NotSpecified
from xsgen.tape9 import brightlitetape9
from pyne.xs import models

# templates are from openmc/examples/lattice/simple

Expand Down Expand Up @@ -122,6 +123,13 @@
<scores>scatter</scores>
<nuclides>total</nuclides>
</tally>
<tally id="5">
<label>fission</label>
<filter type="energy" bins="{_omcds_egrid}" />
<filter type="material" bins="1" />
<nuclides>U-235</nuclides>
<scores>total nu-scatter fission</scores>
</tally>
</tallies>
"""

Expand Down Expand Up @@ -225,7 +233,7 @@ def generate_run(self, run):
libs : list of dicts
Libraries to write out - one for the full fuel and one for each tracked nuclide.
"""
self.libs = {'xs': [], 'phi_g': {
self.libs = {'xs': [], 'tape9': [], 'phi_g': {
'E_g': {'EAF': self.eafds.src_group_struct,
'OpenMC': self.omcds.src_group_struct},
'phi_g': []},
Expand Down Expand Up @@ -380,10 +388,16 @@ def run_all_the_origens(self, state, transmute_time, phi_tot, results):
"""
if self.rc.verbose:
print("making tape9 for {0} with phi={1}".format(state, phi_tot))
self.libs['fuel']['material'][-1].density = 10.7
self.libs['fuel']['material'][-1].atoms_per_molecule = 3.0
num_den = self.libs['fuel']['material'][-1].to_atom_frac()
for ds in self.xscache.data_sources:
ds.shield_weights(num_den, self.rc.temperature)
self.tape9 = origen22.make_tape9(self.rc.track_nucs, self.xscache, nlb=(219, 220, 221))
self.tape9 = origen22.merge_tape9((self.tape9,
origen22.loads_tape9(brightlitetape9)))
origen22.write_tape9(self.tape9)
self.libs['tape9'].append(self.tape9)
for mat_id in results.keys():
pwd = self.pwd(state, "origen{}".format(mat_id))
mat = self.libs[mat_id]["material"][-1]
Expand Down
9 changes: 5 additions & 4 deletions xsgen/pre.py
Original file line number Diff line number Diff line change
Expand Up @@ -315,13 +315,14 @@ def _ensure_mats(self, rc):
if 'cool_material' in rc:
rc.cool_material = ensure_mat(rc.cool_material)
else:
MW = (2 * 1.0) + (1 * 16.0) + (0.199 * 550 * 10.0**-6 * 10.0) + \
(0.801 * 550 * 10.0**-6 * 11.0)
#MW = (2 * 1.0) + (1 * 16.0) + (0.199 * 550 * 10.0**-6 * 10.0) + \
# (0.801 * 550 * 10.0**-6 * 11.0)
MW = 18
rc.cool_material = Material({
10010: (2 * 1.0) / MW,
80160: (1 * 16.0) / MW,
50100: (0.199 * 550 * 10.0**-6 * 10.0) / MW,
50110: (0.801 * 550 * 10.0**-6 * 11.0) / MW,
#50100: (0.199 * 550 * 10.0**-6 * 10.0) / MW,
#50110: (0.801 * 550 * 10.0**-6 * 11.0) / MW,
})

def _ensure_lattice(self, rc):
Expand Down