-
Notifications
You must be signed in to change notification settings - Fork 12
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #144 from abachma2/sensitivity-analysis
Update OAT sensitivity analysis
- Loading branch information
Showing
25 changed files
with
2,181 additions
and
702 deletions.
There are no files selected for viewing
1,900 changes: 1,205 additions & 695 deletions
1,900
input/haleu/sensitivity-analysis/oat/OAT_Analysis.ipynb
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
18 changes: 18 additions & 0 deletions
18
input/haleu/sensitivity-analysis/oat/mmr_burnup/cyclus-files/mmr_41.xml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
<facility> | ||
<name>MMR</name> | ||
<lifetime>120</lifetime> | ||
<config> | ||
<Reactor> | ||
<fuel_incommods> <val>fresh_uox</val> </fuel_incommods> | ||
<fuel_inrecipes> <val>fresh_MMR_haleu</val> </fuel_inrecipes> | ||
<fuel_outcommods> <val>spent_MMR_haleu</val> </fuel_outcommods> | ||
<fuel_outrecipes> <val>spent_MMR_haleu</val> </fuel_outrecipes> | ||
<cycle_time>120</cycle_time> | ||
<refuel_time>0</refuel_time> | ||
<assem_size>1510.786</assem_size> | ||
<n_assem_core>1</n_assem_core> | ||
<n_assem_batch>1</n_assem_batch> | ||
<power_cap>5</power_cap> | ||
</Reactor> | ||
</config> | ||
</facility> |
18 changes: 18 additions & 0 deletions
18
input/haleu/sensitivity-analysis/oat/mmr_burnup/cyclus-files/mmr_62.xml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
<facility> | ||
<name>MMR</name> | ||
<lifetime>180</lifetime> | ||
<config> | ||
<Reactor> | ||
<fuel_incommods> <val>fresh_uox</val> </fuel_incommods> | ||
<fuel_inrecipes> <val>fresh_MMR_haleu</val> </fuel_inrecipes> | ||
<fuel_outcommods> <val>spent_MMR_haleu</val> </fuel_outcommods> | ||
<fuel_outrecipes> <val>spent_MMR_haleu</val> </fuel_outrecipes> | ||
<cycle_time>180</cycle_time> | ||
<refuel_time>0</refuel_time> | ||
<assem_size>1510.786</assem_size> | ||
<n_assem_core>1</n_assem_core> | ||
<n_assem_batch>1</n_assem_batch> | ||
<power_cap>5</power_cap> | ||
</Reactor> | ||
</config> | ||
</facility> |
18 changes: 18 additions & 0 deletions
18
input/haleu/sensitivity-analysis/oat/mmr_burnup/cyclus-files/mmr_74.xml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
<facility> | ||
<name>MMR</name> | ||
<lifetime>218</lifetime> | ||
<config> | ||
<Reactor> | ||
<fuel_incommods> <val>fresh_uox</val> </fuel_incommods> | ||
<fuel_inrecipes> <val>fresh_MMR_haleu</val> </fuel_inrecipes> | ||
<fuel_outcommods> <val>spent_MMR_haleu</val> </fuel_outcommods> | ||
<fuel_outrecipes> <val>spent_MMR_haleu</val> </fuel_outrecipes> | ||
<cycle_time>218</cycle_time> | ||
<refuel_time>0</refuel_time> | ||
<assem_size>1510.786</assem_size> | ||
<n_assem_core>1</n_assem_core> | ||
<n_assem_batch>1</n_assem_batch> | ||
<power_cap>5</power_cap> | ||
</Reactor> | ||
</config> | ||
</facility> |
18 changes: 18 additions & 0 deletions
18
input/haleu/sensitivity-analysis/oat/mmr_burnup/cyclus-files/mmr_78.xml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
<facility> | ||
<name>MMR</name> | ||
<lifetime>231</lifetime> | ||
<config> | ||
<Reactor> | ||
<fuel_incommods> <val>fresh_uox</val> </fuel_incommods> | ||
<fuel_inrecipes> <val>fresh_MMR_haleu</val> </fuel_inrecipes> | ||
<fuel_outcommods> <val>spent_MMR_haleu</val> </fuel_outcommods> | ||
<fuel_outrecipes> <val>spent_MMR_haleu</val> </fuel_outrecipes> | ||
<cycle_time>231</cycle_time> | ||
<refuel_time>0</refuel_time> | ||
<assem_size>1510.786</assem_size> | ||
<n_assem_core>1</n_assem_core> | ||
<n_assem_batch>1</n_assem_batch> | ||
<power_cap>5</power_cap> | ||
</Reactor> | ||
</config> | ||
</facility> |
18 changes: 18 additions & 0 deletions
18
input/haleu/sensitivity-analysis/oat/mmr_burnup/cyclus-files/mmr_82.xml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
<facility> | ||
<name>MMR</name> | ||
<lifetime>240</lifetime> | ||
<config> | ||
<Reactor> | ||
<fuel_incommods> <val>fresh_uox</val> </fuel_incommods> | ||
<fuel_inrecipes> <val>fresh_MMR_haleu</val> </fuel_inrecipes> | ||
<fuel_outcommods> <val>spent_MMR_haleu</val> </fuel_outcommods> | ||
<fuel_outrecipes> <val>spent_MMR_haleu</val> </fuel_outrecipes> | ||
<cycle_time>240</cycle_time> | ||
<refuel_time>0</refuel_time> | ||
<assem_size>1510.786</assem_size> | ||
<n_assem_core>1</n_assem_core> | ||
<n_assem_batch>1</n_assem_batch> | ||
<power_cap>5</power_cap> | ||
</Reactor> | ||
</config> | ||
</facility> |
18 changes: 18 additions & 0 deletions
18
input/haleu/sensitivity-analysis/oat/mmr_burnup/cyclus-files/mmr_86.xml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
<facility> | ||
<name>MMR</name> | ||
<lifetime>255</lifetime> | ||
<config> | ||
<Reactor> | ||
<fuel_incommods> <val>fresh_uox</val> </fuel_incommods> | ||
<fuel_inrecipes> <val>fresh_MMR_haleu</val> </fuel_inrecipes> | ||
<fuel_outcommods> <val>spent_MMR_haleu</val> </fuel_outcommods> | ||
<fuel_outrecipes> <val>spent_MMR_haleu</val> </fuel_outrecipes> | ||
<cycle_time>255</cycle_time> | ||
<refuel_time>0</refuel_time> | ||
<assem_size>1510.786</assem_size> | ||
<n_assem_core>1</n_assem_core> | ||
<n_assem_batch>1</n_assem_batch> | ||
<power_cap>5</power_cap> | ||
</Reactor> | ||
</config> | ||
</facility> |
18 changes: 18 additions & 0 deletions
18
input/haleu/sensitivity-analysis/oat/mmr_burnup/cyclus-files/mmr_90.xml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
<facility> | ||
<name>MMR</name> | ||
<lifetime>267</lifetime> | ||
<config> | ||
<Reactor> | ||
<fuel_incommods> <val>fresh_uox</val> </fuel_incommods> | ||
<fuel_inrecipes> <val>fresh_MMR_haleu</val> </fuel_inrecipes> | ||
<fuel_outcommods> <val>spent_MMR_haleu</val> </fuel_outcommods> | ||
<fuel_outrecipes> <val>spent_MMR_haleu</val> </fuel_outrecipes> | ||
<cycle_time>267</cycle_time> | ||
<refuel_time>0</refuel_time> | ||
<assem_size>1510.786</assem_size> | ||
<n_assem_core>1</n_assem_core> | ||
<n_assem_batch>1</n_assem_batch> | ||
<power_cap>5</power_cap> | ||
</Reactor> | ||
</config> | ||
</facility> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
# One-at-a-time analysis for changing transition start time | ||
# Multidimensional parameter study | ||
|
||
environment, | ||
tabular_data | ||
tabular_data_file = 'mmr_burnup.dat' | ||
output_file 'mmr_burnup.out' | ||
write_restart 'mmr_burnup.rst' | ||
|
||
method, | ||
list_parameter_study | ||
list_of_points = 41 | ||
62 | ||
74 | ||
78 | ||
82 | ||
86 | ||
90 | ||
|
||
|
||
variables, | ||
continuous_design = 1 | ||
descriptors 'mmr_burnup' | ||
|
||
interface, | ||
fork | ||
asynchronous | ||
evaluation_concurrency = 8 | ||
analysis_drivers = 'python mmr_burnup_driver.py' | ||
|
||
|
||
responses, | ||
descriptors = 'enr_u' 'haleu' 'swu' 'haleu_swu' 'waste' 'feed' | ||
response_functions = 6 | ||
scalar_responses = 6 | ||
no_gradients | ||
no_hessians |
57 changes: 57 additions & 0 deletions
57
input/haleu/sensitivity-analysis/oat/mmr_burnup/mmr_burnup_driver.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,57 @@ | ||
import sys, os | ||
|
||
import numpy as np | ||
import dakota.interfacing as di | ||
|
||
sys.path.append('../../../../../scripts') | ||
|
||
import create_AR_DeployInst as cdi | ||
import output_metrics as oup | ||
import dakota_input as inp | ||
# ---------------------------- | ||
# Parse Dakota parameters file | ||
# ---------------------------- | ||
|
||
params, results = di.read_parameters_file() | ||
|
||
# ------------------------------- | ||
# Convert and send to Cyclus | ||
# ------------------------------- | ||
|
||
# Edit Cyclus input file | ||
cyclus_template = 'mmr_burnup_input.xml.in' | ||
scenario_name = 'mmr_burnup_' + str(int(params['mmr_burnup'])) | ||
variable_dict = {'handle': scenario_name, | ||
'mmr_burnup': str(int(params['mmr_burnup']))} | ||
output_xml = './cyclus-files/' + scenario_name + '.xml' | ||
output_sqlite = './cyclus-files/' + scenario_name + '.sqlite' | ||
|
||
inp.render_input(cyclus_template, variable_dict, output_xml) | ||
|
||
# Create DeployInst for advanced reactors | ||
duration = 1500 | ||
mmr_lifetimes = {41:120, 62:180, 74:218, 78:231, 82:240, 86:255, 90:267} | ||
reactor_prototypes = {'Xe-100': (76, 720), | ||
'MMR': (5,mmr_lifetimes[int(params['mmr_burnup'])]), | ||
'VOYGR': (73, 720)} | ||
demand_equation = np.zeros(duration) | ||
demand_equation[721:] = 87198.156 | ||
lwr_DI = cdi.convert_xml_to_dict( | ||
"../../../inputs/united_states/buildtimes/UNITED_STATES_OF_AMERICA/deployinst.xml") | ||
|
||
deploy_schedule = cdi.write_AR_deployinst(lwr_DI, | ||
"../../../inputs/united_states/reactors/", | ||
duration, | ||
reactor_prototypes, | ||
demand_equation) | ||
cdi.write_deployinst(deploy_schedule, | ||
"./cyclus-files/mmr_burnup_" + | ||
str(int(params['mmr_burnup'])) + "_deployinst.xml") | ||
|
||
# Run Cyclus with edited input file | ||
oup.run_cyclus(output_sqlite, output_xml) | ||
|
||
# ---------------------------- | ||
# Return the results to Dakota | ||
# ---------------------------- | ||
results = oup.get_all_results(results, output_sqlite) |
Oops, something went wrong.