-
Notifications
You must be signed in to change notification settings - Fork 16
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
Prepare Simulation
and App
classes for OpenMC support, rework input file structure
#98
Conversation
Based on your description, shouldn't it be |
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.
Assignment 2
files look good!
I made a mistake when I wrote that description. The function does indeed map nuclide names of 'zzaaam' format into Serpent 2 format:
|
@yardasol Once, you rename the function, assignment 3 looks good to me for merging |
Will merge once I verify integration tests still work with the new changes. |
I think my biggest question/comment was about indexing in the testing functions, so if those comments are resolved/not applicable, or you think it would be better to fix in a different PR, I think everything looks good to go. |
@ZoeRichter can you check over the most recent commits and then merge? |
I think I only have the comment I just left - once that gets cleared up we should be good! |
…e-simulation Prepare `Simulation` and `App` classes for OpenMC support, rework input file structure d82e4f4
Summary of changes
This PR has ballooned to be non-atomic. It was quicker when making the changes to do it all at once, but in the future I should
really try to keep the number of changes in a single PR down.
Because this PR is so big, we can divvy up the work into assignments.
Assignment 1:
doc/installation.rst
environment.yml
examples/msbr/msbr.serpent
examples/tap/tap.serpent
examples/tap/tap_plot.serpent
requirements.txt
saltproc/reactor.py
Assignment 2:
saltproc/input_schema.json
saltproc/version.py
saltproc/app.py
saltproc/tests/test.json
saltproc/tests/test_app.py
saltproc/tests/integration_tests/const_repr/test_const_reproc_run.py
saltproc/tests/integration_tests/const_repr/tap_main_test.json
saltproc/examples/tap/tap_main.json
saltproc/examples/msbr/msbr_main.json
Assignment 3:
saltproc/depcode.py
saltproc/tests/test_depcode.py
saltproc/tests/test_materialflow.py
saltproc/tests/test_process.py
saltproc/tests/test_separator.py
saltproc/tests/test_sparger.py
Assignment 4:
saltproc/simulation.py
saltproc/tests/test_simulation.py
saltproc/tests/integration_tests/no_repro/test_no_reproc_run.py
This PR addresses the issues and snags listed in #96 and #97.
This PR also resolves #77 and #42.
Resolves the rest of #44
The changes this PR makes do not preserve the current API. A comprehensive list of changes is below.
This PR adds the following tests for previously untested functions in
simulation.py
:test_check_switch_geo_trigger
test_store_after_repr
test_store_mat_data
test_store_run_init_info
test_store_run_step_info
This PR completely restructures the input file structure using a verifiable JSON schema. I have updated all examples, unit tests, and integration tests accordingly
API change
This PR adds, edits, and changes the location of, the following class methods:
App.check_restart()
->Simulation.check_restart()
Simulation.switch_to_next_geometry
->DepcodeSerpent.switch_to_next_geometry
Simulation.runsim_no_reproc
->test/integration_tests/test_no_reproc_run.py::runsim_no_reproc
Simulation.store_run_step_info
Simulation.store_run_init_info
Depcode.switch_to_next_geometry
Depcode.read_depcode_info
Depcode.read_repcode_step_param
DepcodeSerpent.sss_meta_zzz
->DepcodeSerpent.convert_nuclide_name_serpent_to_zam
DepcodeSerpent.get_tra_or_dec
->DepcodeSerpent.create_nuclide_name_map_zam_to_serpent
DepcodeSerpent.read_depcode_template ->
DepcodeSerpent.read_plaintext_file`API change
This PR moves (renames/adds where applicable) the following global variables from the saltproc input file into the:
App.depcode_inp
dictionaryApp.depcode_inp['codename']
App.exec_path
App.template_file
App.neutron_pop
->App.depcode_inp['npop']
App.active_cycles
App.inactive_cycles
App.geo_file
->App.depcode_inp['geo_file_paths']
App.simulation_inp
dictionary:App.simulation['sim_name']
App.db_file
->App.simulation['db_name']
App.restart_flag
App.adjust_geo
App.reactor_inp
dictionaryApp.reactor_inp['volume']
App.reactor_inp['mass_flowrate']
App.power_levels
App.depl_hist
->App.reactor_inp['dep_step_length_cumulative']
This PR also renames the following global variables in
app.py
:-
depsteps
->num_depsteps
This PR changes, adds, and removes (where needed) the following attributes of the
Depcode
class:template_path
->template_inputfile_path
input_path
->iter_inputfile
geo_file
->geo_files
Simulation
class:h5_file
->db_path
restart_flag
adjust_geo
iter_matfile
-> (removed)API change
This PR changes the signatures of the following functions to better make use of object data encapsulation (breaks backwards compatibility:
Depcode.read_dep_comp
Depcode.write_depcode_input
Depcode.write_mat_file
DepcodeSerpent.read_plaintext_file
DepcodeSerpent.create_nuclide_map_serpent_to_zam
This PR also fixes a previously unknown bug that wrote material data to the incorrect field in the
.h5
database. This bug was caused by a typo I made inapp.py
in the second call tostore_mat_data
.This PR also renames
test_no_reproc_run.py::test_integration_3step_saltproc_no_reproc_heavy()
totest_no_reproc_run.py::test_integration_2step_saltproc_no_reproc_heavy()
because this integration test actually is checking the composition bases on two depletion steps rather than three.Types of changes
Required for Merging
Associated Issues and PRs
Simulation
for OpenMC support #96simulation.py
#97Depletion code name
#77Associated Developers
Checklist for Reviewers
Reviewers should use this link to get to the
Review Checklist before they begin their review.