-
Notifications
You must be signed in to change notification settings - Fork 4
Infinite Lattice Model (No large file history) #40
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Changes from 15 commits
3ce314d
9be547e
c42a684
4c53ca9
2776314
c0ec5b7
3c5765b
dc8e35b
3e1700c
ed93217
11f85c7
9d4f07d
b8c11c3
417c89b
d889315
8d00fbc
119a258
fd2dcff
f5dbf53
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,24 @@ | ||
| import openmc | ||
| import openmc.deplete | ||
| import numpy as np | ||
|
|
||
| ucot = openmc.Material(name='UCO_TRACKED', material_id=14) | ||
| ucot.set_density('g/cm3', 10.4) | ||
| ucot.add_nuclide("U235", 0.1386, percent_type='wo') | ||
| ucot.add_nuclide("U238",0.7559, percent_type='wo') | ||
| ucot.add_element("O", 0.06025, percent_type='wo') | ||
| ucot.add_element('C', 0.04523, percent_type='wo') | ||
| ucot.add_s_alpha_beta('c_Graphite') | ||
| ucot.depletable = True | ||
| ucot.temperature = 1159.15 #K | ||
|
|
||
| materials = openmc.Materials.from_xml('../materials.xml') | ||
| materials.append(ucot) | ||
| geometry = openmc.Geometry.from_xml("../geometry.xml", materials) | ||
| settings = openmc.Settings.from_xml('../settings.xml') | ||
| tallies = openmc.Tallies.from_xml('../tallies.xml') | ||
|
|
||
| model = openmc.model.Model(geometry, materials, settings, tallies) | ||
| model.export_to_model_xml() | ||
|
|
||
| openmc.run() |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,34 @@ | ||
| import openmc | ||
| import openmc.deplete | ||
| import numpy as np | ||
|
|
||
| dep_file = '../i4-dep-res.h5' | ||
| mat_file = '../i4-mats.xml' | ||
| res = openmc.deplete.Results(dep_file) | ||
| dep_t = res.get_times() | ||
| step_comps = [res.export_to_materials(i, | ||
| path=mat_file)[0].get_nuclide_densities() | ||
| for i in range(len(dep_t))] | ||
|
|
||
| comp1249days = {} | ||
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Is the name of this variable the only thing that's different between these various
Collaborator
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. No, the depletion step the compositions are based on are different each time, which is why I redefine that single material each time. Materials that all the bcc models share are made by the gen_inputs script one level up, then pulled in here. That way, the full list of materials can be used by the openmc model when the geometry information is read in. |
||
| for k, v in step_comps[40].items(): | ||
| comp1249days[k] = {} | ||
| comp1249days[k] = v[1] | ||
|
|
||
| ucot = openmc.Material(name='UCO_TRACKED', material_id=14) | ||
| ucot.set_density('g/cm3', 10.4) | ||
| ucot.add_components(comp1249days, percent_type = 'ao') | ||
| ucot.add_s_alpha_beta('c_Graphite') | ||
| ucot.depletable = True | ||
| ucot.temperature = 1159.15 #K | ||
|
|
||
| materials = openmc.Materials.from_xml('../materials.xml') | ||
| materials.append(ucot) | ||
| geometry = openmc.Geometry.from_xml("../geometry.xml", materials) | ||
| settings = openmc.Settings.from_xml('../settings.xml') | ||
| tallies = openmc.Tallies.from_xml('../tallies.xml') | ||
|
|
||
| model = openmc.model.Model(geometry, materials, settings, tallies) | ||
| model.export_to_model_xml() | ||
|
|
||
| openmc.run() | ||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,34 @@ | ||
| import openmc | ||
| import openmc.deplete | ||
| import numpy as np | ||
|
|
||
| dep_file = '../i4-dep-res.h5' | ||
| mat_file = '../i4-mats.xml' | ||
| res = openmc.deplete.Results(dep_file) | ||
| dep_t = res.get_times() | ||
| step_comps = [res.export_to_materials(i, | ||
| path=mat_file)[0].get_nuclide_densities() | ||
| for i in range(len(dep_t))] | ||
|
|
||
| comp1549days = {} | ||
| for k, v in step_comps[-1].items(): | ||
| comp1549days[k] = {} | ||
| comp1549days[k] = v[1] | ||
|
|
||
| ucot = openmc.Material(name='UCO_TRACKED', material_id=14) | ||
| ucot.set_density('g/cm3', 10.4) | ||
| ucot.add_components(comp1549days, percent_type = 'ao') | ||
| ucot.add_s_alpha_beta('c_Graphite') | ||
| ucot.depletable = True | ||
| ucot.temperature = 1159.15 #K | ||
|
|
||
| materials = openmc.Materials.from_xml('../materials.xml') | ||
| materials.append(ucot) | ||
| geometry = openmc.Geometry.from_xml("../geometry.xml", materials) | ||
| settings = openmc.Settings.from_xml('../settings.xml') | ||
| tallies = openmc.Tallies.from_xml('../tallies.xml') | ||
|
|
||
| model = openmc.model.Model(geometry, materials, settings, tallies) | ||
| model.export_to_model_xml() | ||
|
|
||
| openmc.run() |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,34 @@ | ||
| import openmc | ||
| import openmc.deplete | ||
| import numpy as np | ||
|
|
||
| dep_file = '../i4-dep-res.h5' | ||
| mat_file = '../i4-mats.xml' | ||
| res = openmc.deplete.Results(dep_file) | ||
| dep_t = res.get_times() | ||
| step_comps = [res.export_to_materials(i, | ||
| path=mat_file)[0].get_nuclide_densities() | ||
| for i in range(len(dep_t))] | ||
|
|
||
| comp249days = {} | ||
| for k, v in step_comps[18].items(): | ||
| comp249days[k] = {} | ||
| comp249days[k] = v[1] | ||
|
|
||
| ucot = openmc.Material(name='UCO_TRACKED', material_id=14) | ||
| ucot.set_density('g/cm3', 10.4) | ||
| ucot.add_components(comp249days, percent_type = 'ao') | ||
| ucot.add_s_alpha_beta('c_Graphite') | ||
| ucot.depletable = True | ||
| ucot.temperature = 1159.15 #K | ||
|
|
||
| materials = openmc.Materials.from_xml('../materials.xml') | ||
| materials.append(ucot) | ||
| geometry = openmc.Geometry.from_xml("../geometry.xml", materials) | ||
| settings = openmc.Settings.from_xml('../settings.xml') | ||
| tallies = openmc.Tallies.from_xml('../tallies.xml') | ||
|
|
||
| model = openmc.model.Model(geometry, materials, settings, tallies) | ||
| model.export_to_model_xml() | ||
|
|
||
| openmc.run() |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,36 @@ | ||
| import openmc | ||
| import openmc.deplete | ||
| import numpy as np | ||
|
|
||
| dep_file = '../i4-dep-res.h5' | ||
| mat_file = '../i4-mats.xml' | ||
| res = openmc.deplete.Results(dep_file) | ||
| dep_t = res.get_times() | ||
| step_comps = [res.export_to_materials(i, | ||
| path=mat_file)[0].get_nuclide_densities() | ||
| for i in range(len(dep_t))] | ||
|
|
||
| comp499days = {} | ||
| for k, v in step_comps[25].items(): | ||
| comp499days[k] = {} | ||
| comp499days[k] = v[1] | ||
|
|
||
| ucot = openmc.Material(name='UCO_TRACKED', material_id=14) | ||
| ucot.set_density('g/cm3', 10.4) | ||
| ucot.add_components(comp499days, percent_type = 'ao') | ||
| ucot.add_s_alpha_beta('c_Graphite') | ||
| ucot.depletable = True | ||
| ucot.temperature = 1159.15 #K | ||
|
|
||
| materials = openmc.Materials.from_xml('../materials.xml') | ||
| materials.append(ucot) | ||
| geometry = openmc.Geometry.from_xml("../geometry.xml", materials) | ||
| settings = openmc.Settings.from_xml('../settings.xml') | ||
| tallies = openmc.Tallies.from_xml('../tallies.xml') | ||
|
|
||
| model = openmc.model.Model(geometry, materials, settings, tallies) | ||
| model.export_to_model_xml() | ||
|
|
||
| openmc.run() | ||
|
|
||
|
|
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,34 @@ | ||
| import openmc | ||
| import openmc.deplete | ||
| import numpy as np | ||
|
|
||
| dep_file = '../i4-dep-res.h5' | ||
| mat_file = '../i4-mats.xml' | ||
| res = openmc.deplete.Results(dep_file) | ||
| dep_t = res.get_times() | ||
| step_comps = [res.export_to_materials(i, | ||
| path=mat_file)[0].get_nuclide_densities() | ||
| for i in range(len(dep_t))] | ||
|
|
||
| comp749days = {} | ||
| for k, v in step_comps[30].items(): | ||
| comp749days[k] = {} | ||
| comp749days[k] = v[1] | ||
|
|
||
| ucot = openmc.Material(name='UCO_TRACKED', material_id=14) | ||
| ucot.set_density('g/cm3', 10.4) | ||
| ucot.add_components(comp749days, percent_type = 'ao') | ||
| ucot.add_s_alpha_beta('c_Graphite') | ||
| ucot.depletable = True | ||
| ucot.temperature = 1159.15 #K | ||
|
|
||
| materials = openmc.Materials.from_xml('../materials.xml') | ||
| materials.append(ucot) | ||
| geometry = openmc.Geometry.from_xml("../geometry.xml", materials) | ||
| settings = openmc.Settings.from_xml('../settings.xml') | ||
| tallies = openmc.Tallies.from_xml('../tallies.xml') | ||
|
|
||
| model = openmc.model.Model(geometry, materials, settings, tallies) | ||
| model.export_to_model_xml() | ||
|
|
||
| openmc.run() |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,34 @@ | ||
| import openmc | ||
| import openmc.deplete | ||
| import numpy as np | ||
|
|
||
| dep_file = '../i4-dep-res.h5' | ||
| mat_file = '../i4-mats.xml' | ||
| res = openmc.deplete.Results(dep_file) | ||
| dep_t = res.get_times() | ||
| step_comps = [res.export_to_materials(i, | ||
| path=mat_file)[0].get_nuclide_densities() | ||
| for i in range(len(dep_t))] | ||
|
|
||
| comp999days = {} | ||
| for k, v in step_comps[35].items(): | ||
| comp999days[k] = {} | ||
| comp999days[k] = v[1] | ||
|
|
||
| ucot = openmc.Material(name='UCO_TRACKED', material_id=14) | ||
| ucot.set_density('g/cm3', 10.4) | ||
| ucot.add_components(comp999days, percent_type = 'ao') | ||
| ucot.add_s_alpha_beta('c_Graphite') | ||
| ucot.depletable = True | ||
| ucot.temperature = 1159.15 #K | ||
|
|
||
| materials = openmc.Materials.from_xml('../materials.xml') | ||
| materials.append(ucot) | ||
| geometry = openmc.Geometry.from_xml("../geometry.xml", materials) | ||
| settings = openmc.Settings.from_xml('../settings.xml') | ||
| tallies = openmc.Tallies.from_xml('../tallies.xml') | ||
|
|
||
| model = openmc.model.Model(geometry, materials, settings, tallies) | ||
| model.export_to_model_xml() | ||
|
|
||
| openmc.run() |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is this indentation right?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes - the second line is still part of the 'export_to_materials' term