Add python script to merge input files and comment out SM for standard MCNP
This commit is contained in:
@@ -43,7 +43,7 @@ c 700 s 117.0 -155.00 13.5 3.0
|
||||
c Estia geometry
|
||||
read file=geometry/estia_surfaces.i echo
|
||||
|
||||
read file=geometry/sm_reflectivity.i echo
|
||||
c read file=geometry/sm_reflectivity.i echo $ Adds SM reflection, requires patch
|
||||
read file=geometry/materials.i echo
|
||||
read file=geometry/materials_monolith.i echo
|
||||
c
|
||||
@@ -144,7 +144,7 @@ c read file=tallies/bunker_mesh_np.i echo
|
||||
c read file=tallies/bunker_mesh_act.i echo
|
||||
c read file=tallies/full_mesh.i echo
|
||||
c read file=tallies/full_mesh_p.i echo
|
||||
read file=tallies/full_mesh_np.i echo
|
||||
c read file=tallies/full_mesh_np.i echo
|
||||
c read file=tallies/boundary_meshes.i echo
|
||||
c read file=tallies/boundary_wall_meshes.i echo
|
||||
c read file=tallies/selene_source_mesh_p.i echo
|
||||
@@ -174,7 +174,7 @@ c
|
||||
c ===============================
|
||||
c Global Variance Reduction Cards
|
||||
c ===============================
|
||||
c Exponential transform in collimators
|
||||
c Exponential transform in collimators, only works with weight windows
|
||||
ext:n 0 276r $ in monolith
|
||||
0 0 0 309r $ ess outside
|
||||
0 132r 0.25v3 13r $CPC1+2
|
||||
|
||||
16
merge_model.py
Normal file
16
merge_model.py
Normal file
@@ -0,0 +1,16 @@
|
||||
#!/usr/bin/env python
|
||||
"""
|
||||
Generate a single input file from Estia model.
|
||||
"""
|
||||
|
||||
maintxt=open('e2-estia.i', 'r').readlines()
|
||||
|
||||
outp=open('estia_merged.i', 'w')
|
||||
for line in maintxt:
|
||||
if not line.startswith('read'):
|
||||
outp.write(line)
|
||||
else:
|
||||
fname=line.split('=', 1)[1].split()[0]
|
||||
outp.write(open(fname, 'r').read().strip()+'\n')
|
||||
|
||||
outp.close()
|
||||
Reference in New Issue
Block a user