-
Couldn't load subscription status.
- Fork 16
Prepare Simulation and App classes for OpenMC support, rework input file structure
#98
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
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.rstenvironment.ymlexamples/msbr/msbr.serpentexamples/tap/tap.serpentexamples/tap/tap_plot.serpentrequirements.txtsaltproc/reactor.pyAssignment 2:
saltproc/input_schema.jsonsaltproc/version.pysaltproc/app.pysaltproc/tests/test.jsonsaltproc/tests/test_app.pysaltproc/tests/integration_tests/const_repr/test_const_reproc_run.pysaltproc/tests/integration_tests/const_repr/tap_main_test.jsonsaltproc/examples/tap/tap_main.jsonsaltproc/examples/msbr/msbr_main.jsonAssignment 3:
saltproc/depcode.pysaltproc/tests/test_depcode.pysaltproc/tests/test_materialflow.pysaltproc/tests/test_process.pysaltproc/tests/test_separator.pysaltproc/tests/test_sparger.pyAssignment 4:
saltproc/simulation.pysaltproc/tests/test_simulation.pysaltproc/tests/integration_tests/no_repro/test_no_reproc_run.pyThis 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_triggertest_store_after_reprtest_store_mat_datatest_store_run_init_infotest_store_run_step_infoThis 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_geometrySimulation.runsim_no_reproc->test/integration_tests/test_no_reproc_run.py::runsim_no_reprocSimulation.store_run_step_infoSimulation.store_run_init_infoDepcode.switch_to_next_geometryDepcode.read_depcode_infoDepcode.read_repcode_step_paramDepcodeSerpent.sss_meta_zzz->DepcodeSerpent.convert_nuclide_name_serpent_to_zamDepcodeSerpent.get_tra_or_dec->DepcodeSerpent.create_nuclide_name_map_zam_to_serpentDepcodeSerpent.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_inpdictionaryApp.depcode_inp['codename']App.exec_pathApp.template_fileApp.neutron_pop->App.depcode_inp['npop']App.active_cyclesApp.inactive_cyclesApp.geo_file->App.depcode_inp['geo_file_paths']App.simulation_inpdictionary:App.simulation['sim_name']App.db_file->App.simulation['db_name']App.restart_flagApp.adjust_geoApp.reactor_inpdictionaryApp.reactor_inp['volume']App.reactor_inp['mass_flowrate']App.power_levelsApp.depl_hist->App.reactor_inp['dep_step_length_cumulative']This PR also renames the following global variables in
app.py:-
depsteps->num_depstepsThis PR changes, adds, and removes (where needed) the following attributes of the
Depcodeclass:template_path->template_inputfile_pathinput_path->iter_inputfilegeo_file->geo_filesSimulationclass:h5_file->db_pathrestart_flagadjust_geoiter_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_compDepcode.write_depcode_inputDepcode.write_mat_fileDepcodeSerpent.read_plaintext_fileDepcodeSerpent.create_nuclide_map_serpent_to_zamThis PR also fixes a previously unknown bug that wrote material data to the incorrect field in the
.h5database. This bug was caused by a typo I made inapp.pyin 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
Simulationfor 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.