Skip to content
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

Add information for closed fuel cycles #152

Merged
merged 104 commits into from
Nov 1, 2023
Merged
Show file tree
Hide file tree
Changes from 91 commits
Commits
Show all changes
104 commits
Select commit Hold shift + click to select a range
e48ecff
copy scenario 7 and 13 input files
abachma2 Aug 23, 2022
ac0d89f
add separatations, fuel fab, and new commodities:
abachma2 Aug 23, 2022
34d7fd3
modify reactors to take MOX fuel
abachma2 Aug 23, 2022
8a96336
change advanced reactor DI file name
abachma2 Aug 23, 2022
98ea6c6
replace FuelFab with Mixer
abachma2 Sep 16, 2022
eebb014
input in working state, need to adjust storage and recipes
abachma2 Sep 16, 2022
ef781fd
add recycle recipies, update MMR fuel names
abachma2 Sep 16, 2022
566237e
update storage facilities and mmr commodity names
abachma2 Sep 16, 2022
27e2ad4
Merge branch 'recycle' of github.com:abachma2/transition-scenarios in…
abachma2 Sep 16, 2022
4871a57
add more enrichment and UOX cooling
abachma2 Dec 19, 2022
3cfcce0
define separate streams for all AR fuel
abachma2 Dec 22, 2022
ae9c195
Merge branch 'master' into recycle
abachma2 Feb 24, 2023
8b63874
update scenario 14 to working order
abachma2 Feb 24, 2023
df8a085
adjsut commodity names to ensure reactors are fueled
abachma2 Feb 24, 2023
92b7333
set up notebook for analysis
abachma2 Feb 24, 2023
1b8bd9d
remove MMR mox, make sure all facilities are deployed
abachma2 Mar 27, 2023
11ceb03
update trying to get things working
abachma2 Mar 28, 2023
59cf477
adjust mox flows
abachma2 Mar 28, 2023
d3a0649
Merge branch 'master' into recycle
abachma2 Mar 28, 2023
6c101b3
adjust material prefs, add SepFacility to DI definition
abachma2 Mar 29, 2023
b648e33
small changes to test openmcyclus
abachma2 May 2, 2023
e756cad
add materials file for xe100
abachma2 Jul 27, 2023
dcad34e
add chain files for openmcyclus
abachma2 Jul 27, 2023
80933ef
add OpenMCyclus reactor files
abachma2 Jul 27, 2023
bc964b7
add recipes for spent and fresh MOX
abachma2 Jul 27, 2023
794ad41
modify input file
abachma2 Jul 27, 2023
cef3e8a
correct mixers
abachma2 Jul 27, 2023
b9e274e
update OpenMC materials, prototypes, remove uneeded file
abachma2 Jul 31, 2023
7cb2937
remove recipes that aren't needed
abachma2 Jul 31, 2023
fef89e3
update MOX composition
abachma2 Jul 31, 2023
4a27f5f
small edits to clean things up, prevent warnings, and run smoother
abachma2 Jul 31, 2023
978b95d
update procedure
abachma2 Aug 1, 2023
0f38693
create xe100 xs data, add notebook for getting cross sections
abachma2 Aug 2, 2023
d4a2145
add other limited recycling scenarios
abachma2 Aug 2, 2023
da694ea
change chain files to casl instead of full endf
abachma2 Aug 8, 2023
e9b769a
change to casl chain file, add sfr file
abachma2 Aug 8, 2023
c4f775a
reduce facility numbers, add faiclities for s16
abachma2 Aug 8, 2023
da03bd5
add sections for 1 percent growth
abachma2 Aug 8, 2023
0d1268f
update mixing ratio for xe100 fuel -- only Pu
abachma2 Aug 9, 2023
0335ffc
update using pu equivalence for MOX
abachma2 Aug 9, 2023
d91c563
add in loop for energy growth model
abachma2 Aug 9, 2023
296719a
update Xe100Mixer with material streams
abachma2 Aug 9, 2023
b5c4533
update mixing ratios to match Pu/U content of MOX
abachma2 Aug 11, 2023
88ad140
add pu equivalence calculations
abachma2 Aug 11, 2023
82210ff
add some results from s15
abachma2 Aug 18, 2023
362fdce
modify functions to easily get metrics for recycling
abachma2 Aug 24, 2023
122e3e8
change Sink_HLW deployment
abachma2 Aug 24, 2023
a7c0c74
add SFR example from OpenMC notebooks, need to update details
abachma2 Sep 1, 2023
d993063
slit sinks into 2 for before and after reprocessing starts
abachma2 Sep 1, 2023
c029daf
fill in details for PRISM, issue with core lattice
abachma2 Sep 5, 2023
1c754e8
got the geometry working for fresh core
abachma2 Sep 5, 2023
c3780ed
finish PRISM model, start equivalence calulation
abachma2 Sep 7, 2023
5677977
update the reprocedd fuel recipe to match with openmc model
abachma2 Sep 7, 2023
e1b53eb
change assemblies to smallest possible numbers
abachma2 Sep 7, 2023
17b354b
add in number of assemblies, correct cycle length
abachma2 Sep 7, 2023
3d99e30
reduce number of fuel cycle facilities
abachma2 Sep 7, 2023
206c929
making sure latest updates are captured
abachma2 Sep 7, 2023
e2dfce1
reduce down to 6 materials
abachma2 Sep 7, 2023
9f33fd9
add scenario 19, modify sinks for LWR spent fuel
abachma2 Sep 11, 2023
fd1feab
add block to create DIs for deploying SFR
abachma2 Sep 11, 2023
4479fb9
update SFR power to have 90% capacity factor
abachma2 Sep 11, 2023
7d320f2
add in batch mass
abachma2 Sep 12, 2023
75f3891
add recipe for HALEU
abachma2 Sep 12, 2023
2aff803
update pu equivalence calculations, add keff comparison
abachma2 Sep 13, 2023
c230f34
update compositions based on corrected equivalence calculations
abachma2 Sep 13, 2023
2f24885
return to get_pris_power function
abachma2 Sep 15, 2023
6dbefd2
add table to define each scenario number
abachma2 Sep 19, 2023
d361aec
rerun inputs, update results procedure, add sections
abachma2 Sep 19, 2023
eecee5b
reconcile once through and recycle input files
abachma2 Sep 19, 2023
80b3939
modify based on deprecated/updateed methods
abachma2 Sep 19, 2023
2eebec2
add missing recipes tag
abachma2 Sep 20, 2023
135df87
create materials file for SFR
abachma2 Sep 20, 2023
5faf389
add add_sender_prototype function
abachma2 Sep 20, 2023
908be90
update input files, add missing facilities
abachma2 Sep 20, 2023
1585a3d
set up analysis for no growth scenarios
abachma2 Sep 20, 2023
db37b0c
finish re-running for chapter 4
abachma2 Sep 20, 2023
895abf0
correct MMREnrichment commodity name, decrease Enerichments deployed
abachma2 Sep 20, 2023
7471eaa
edits to pu equivalence calcs
abachma2 Sep 20, 2023
443dec7
reduce number of enrichment facilities
abachma2 Sep 20, 2023
39f4dac
add file from serpent for HTGR cross sections
abachma2 Sep 20, 2023
9943e4d
all no growth databases in, change plotting orders
abachma2 Sep 27, 2023
75860ce
update nogrowth analysis
abachma2 Oct 2, 2023
c6accae
finish and update resutls for 1% cases
abachma2 Oct 2, 2023
34661cf
update s17 results from rerun
abachma2 Oct 9, 2023
b19b445
rename once-through scenarios to have scenario number
abachma2 Oct 9, 2023
92533d6
update to reflect input file name changes
abachma2 Oct 9, 2023
b58da04
remove file
abachma2 Oct 9, 2023
2845cff
remove file, not needed
abachma2 Oct 9, 2023
eb4ab00
checkout from master, remove changes
abachma2 Oct 9, 2023
5be31bf
Merge branch 'master' into recycle
abachma2 Oct 9, 2023
eeb1473
pep8 fixes
abachma2 Oct 9, 2023
3cad083
change absolute path to relative to input/haleu, add note in README
abachma2 Oct 9, 2023
d9018ae
update docstrings of _to_prototype functions
abachma2 Oct 9, 2023
e355a38
make font sizes bigger on figures
abachma2 Oct 9, 2023
aa60311
make font sizes bigger on figures
abachma2 Oct 9, 2023
65e598c
include ylabel when saving energy images
abachma2 Oct 9, 2023
366ef68
update SNF calc for s18, increase image text size
abachma2 Oct 9, 2023
f3653ed
update analysis notebooks
abachma2 Oct 11, 2023
8aa9809
change input file name convention, update related files
abachma2 Oct 11, 2023
f5ff264
increase figure label sizes
abachma2 Oct 17, 2023
2f36e4b
clean up large figures, remove extra ticks and labels
abachma2 Oct 17, 2023
720ca2a
change some plots from monthly to annual
abachma2 Oct 19, 2023
c6cb8e4
add figures for limtied recycle actinide mass
abachma2 Oct 24, 2023
c26be23
update README, include newer directories
abachma2 Oct 25, 2023
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
28 changes: 26 additions & 2 deletions input/haleu/README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,8 @@ Inputs:
This directory holds all of the input files for this project.

The input files in the repository are the ``.xml`` input files for
|Cyclus|. The input files are titled by the type of advanced
reactors to be deployed and the demand growth of the scenario.
|Cyclus|. The input files are titled by scenario number, with
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It's a good idea to come up with a naming convention, but I recommend making the names more informative than "scenarioX.xml". I will have to reference the table below in order to figure out which table is which. ALSO, what if you change the files and the results change? You'll have to update everything somehow which challenges reproducibility and code maintenance.

Just as a quick suggestion, what about something like:

FC{OT or C}_AR0{0,1,2,3}_GPCT{0, 1, NA}_SC{#}_V{00X}.xml

(fuel cycle) (advanced reactors) (growth percent) (scenario number) (version)

For scenario 2 this would look like

FCC_AR01_GPCT00_SC02_V001.xml

It might be a bit more cumbersome, but once users become familiar with this naming convention, it will help them (and also possibly you) figure out what each input file is supposed to run. The table in this file is good and useful, but you need a stronger naming convention for your files. Also include a description of your naming convention -- and stick to it!

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This feels less intuitive to me, and your example for how it works is wrong, as Scenario 2 is a once-through fuel cycle. I feel like your convention would still require referencing back to a table of which advanced reactor number corresponds with which advanced reactor. I'm also not sure why you would include a version number in the file name if it's all version controlled.

I had previously used a convention of reactor1_..._reactor_N_growth.xml, which worked well for just the once-through scenarios. Adding in the closed fuel cycles, I felt that the file names would get too cumbersome and inconsistent (especially given that Scenarios 14 and 15 only differ by the material being reprocessed) and I felt like using the scenario numbers would be the easiest and cleanest. I understand that this may require users to reference the table in the README, but that's why I made sure to include the table as the input file names aren't descriptive without it.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Apologies for the error in my example. The purpose of having a version number is in case you had multiple updated files. I don't think there's a "release" associated with this repository. It can be hard to reference a specific file version without a release tag.

Sure, it's cumbersome, but could be useful if there were many more input files than currently exist. You don't have to use it. However, I don't think users should be required to reference a readme in order to understand approximately what the file contains.

the scenarios defined in the table below.
Each of the input files read in other ``.xml`` files from the
``inputs/united_states/`` directory for the
light water reactors (LWR) currently deployed in the US, the recipes
Expand All @@ -22,6 +22,30 @@ are generated by running
``input/united_states_2020.xml`` was then altered to create the other
scenarios in the directory by adding in necessary input parameters.

=============== ============= ==================== ============== =====================
Scenario # Fuel cycle Advanced reactors Energy demand Notes
=============== ============= ==================== ============== =====================
1 once-through None N/A
2 once-through MMR No growth
3 once-through Xe-100 No growth
4 once-through Xe-100, MMR No growth
5 once-through MMR, VOYGR No growth
6 once-through Xe-100, VOYGR No growth
7 once-through Xe-100, MMR, VOYGR No growth
8 once-through MMR 1%
9 once-through Xe-100 1%
10 once-through Xe-100, MMR 1%
11 once-through MMR, VOYGR 1%
12 once-through Xe-100, VOYGR 1%
13 once-through Xe-100, MMR, VOYGR 1%
14 closed Xe-100, MMR, VOYGR No growth
15 closed Xe-100, MMR, VOYGR No growth TRISO not reprocessed
16 closed SFR No growth
17 closed Xe-100, MMR, VOYGR 1%
18 closed Xe-100, MMR, VOYGR 1% TRISO not reprocessed
19 closed SFR 1%
=============== ============= ==================== ============== =====================

Definitions for each advanced reactor and their corresponding recipes
are in ``inputs/united_states/reactors/`` and ``inputs/united_states/recipes``,
respectively. Each of the necessary files are read into the ``.xml`` files
Expand Down
1,502 changes: 670 additions & 832 deletions input/haleu/analysis/once_through_analysis.ipynb
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

As a comment, final analyses should be in their own folder. It should not be a subfolder of "input." Finding and referencing these notebooks is not intuitive.

My imagined internal dialogue of a future reviewer:

"Ah where are her results?"

"The... input folder? Seems a bit recursive, no?"

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This repository contains files related to modeling a variety of transition scenarios. The top-mostinput directory is for the files for modeling all of the transitions. I did not set up the general structure of this repo. I understand that this can be confusing, which is why there is a README in the top-level directory and in the input/haleu directory.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ok I just looked through the README in the input/haleu directory. Sa,. the transition-scenarios repo contains transitions beyond just amanda's work and contains the work from other students as well.

I like the README in the haleu directory and I think it helps describe what is in the haleu directory. Alongside haleu, there are other transition scenarios in the input folder. Sam, does this help clarify amanda's structure? Do you maybe have a different suggestion that could help clarify this structure?

Amanda, I see that you clearly describe the input files and the analysis files. The analysis notebooks are contained in the input/haleu/analysis folder, and then inputs for your transition are in input/haleu/inputs folder. Is that right? So where are the output files going to be generated if somebody runs these, and where do the analysis notebooks expect the outputs to be? It it would be helpful to mention that in the readme.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This issue could resolve itself if the top-level inputs folder was renamed to scenarios.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I added the people from this conversation to the PR, but, for posterity's sake, refer to #153 (which tries to rectify these comments).

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I place the output databases in inputs/haleu/outputs. That directory isn't in this repo because those files get generated by running the inputs. The run_multiple_inputs and the analysis notebooks also assume this, hit it can easily be updated as desired. I can add this information into the readme for the haleu directory though.

Large diffs are not rendered by default.

2,319 changes: 2,319 additions & 0 deletions input/haleu/analysis/recycle_analysis.ipynb

Large diffs are not rendered by default.

50 changes: 44 additions & 6 deletions input/haleu/inputs/create_DI.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
},
{
"cell_type": "code",
"execution_count": 7,
"execution_count": 1,
"metadata": {},
"outputs": [],
"source": [
Expand All @@ -18,19 +18,23 @@
"import sys\n",
"import matplotlib.pyplot as plt\n",
"import math\n",
"import pandas as pd\n",
"import os\n",
"\n",
"sys.path.insert(0, \"../../../scripts\")\n",
"import create_AR_DeployInst as cdi"
"import create_AR_DeployInst as cdi\n",
"import predicting_the_past_import as import_data"
]
},
{
"cell_type": "code",
"execution_count": 27,
"execution_count": 2,
"metadata": {
"scrolled": true
},
"outputs": [],
"source": [
"# DeployInsts for combinations of the advanced reactors -- Xe-100, MMR, VOYGR\n",
"duration = 1500\n",
"reactor_prototypes = {'Xe-100':(76, 720), 'MMR':(5,240), 'VOYGR':(73, 720)}\n",
"scenarios = [['Xe-100'], ['MMR'], ['Xe-100','MMR'], ['MMR','VOYGR'], ['Xe-100','VOYGR'], ['Xe-100','MMR','VOYGR']]\n",
Expand All @@ -47,7 +51,41 @@
" reactor_dict = {k: reactor_prototypes[k] for k in (reactors)}\n",
" \n",
" deployinst = cdi.convert_xml_to_dict(\"united_states/buildtimes/UNITED_STATES_OF_AMERICA/deployinst.xml\")\n",
" lwr_powers = cdi.get_pris_powers('UNITED STATES OF AMERICA',\"../../../database/\", 2020)\n",
" lwr_powers = cdi.get_pris_powers(\"UNITED STATES OF AMERICA\",\"../../../database/\", 2020) \n",
" \n",
" deployed_lwr_dict = cdi.get_deployinst_dict(deployinst, lwr_powers, \"united_states/reactors/\")\n",
" time, deployed_power = cdi.get_deployed_power(lwr_powers, deployed_lwr_dict, duration)\n",
" power_gap = cdi.determine_power_gap(deployed_power*0.9266, demand_equation)\n",
" \n",
" deploy_schedule = cdi.determine_deployment_schedule(power_gap, reactor_dict)\n",
" cdi.write_deployinst(deploy_schedule, \"./united_states/buildtimes/\" + scenario + \"_deployinst.xml\")"
]
},
{
"cell_type": "code",
"execution_count": 56,
"metadata": {},
"outputs": [],
"source": [
"# DeployInsts for deploying only the SFR prototype\n",
"duration = 1500\n",
"reactor_prototypes = {'SFR':(280, 720), }\n",
"scenarios = [['SFR']]\n",
"for growth in ['nogrowth', '1percent']:\n",
" for index, reactors in enumerate(scenarios):\n",
" demand_equation = np.zeros(duration)\n",
" if growth == 'nogrowth':\n",
" demand_equation[721:] = 87198.156\n",
" else:\n",
" for ii in np.linspace(721, 1499, 779):\n",
" demand_equation[int(ii)] = 87198.156*np.exp(0.00083*(int(ii)-721))\n",
" scenario = '_'.join(scenarios[index]).replace('-','')\n",
" scenario = scenario.lower() + \"_\" + growth \n",
" reactor_dict = {k: reactor_prototypes[k] for k in (reactors)}\n",
" \n",
" deployinst = cdi.convert_xml_to_dict(\"united_states/buildtimes/UNITED_STATES_OF_AMERICA/deployinst.xml\")\n",
" lwr_powers = cdi.get_pris_powers(\"UNITED STATES OF AMERICA\",\"../../../database/\", 2020) \n",
"\n",
" deployed_lwr_dict = cdi.get_deployinst_dict(deployinst, lwr_powers, \"united_states/reactors/\")\n",
" time, deployed_power = cdi.get_deployed_power(lwr_powers, deployed_lwr_dict, duration)\n",
" power_gap = cdi.determine_power_gap(deployed_power*0.9266, demand_equation)\n",
Expand All @@ -66,7 +104,7 @@
],
"metadata": {
"kernelspec": {
"display_name": "Python 3",
"display_name": "Python 3 (ipykernel)",
"language": "python",
"name": "python3"
},
Expand All @@ -80,7 +118,7 @@
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython3",
"version": "3.8.5"
"version": "3.10.12"
}
},
"nbformat": 4,
Expand Down
Loading