Skip to content

Commit

Permalink
Merge pull request #98 from yardasol/generalize-simulation
Browse files Browse the repository at this point in the history
Prepare `Simulation` and `App` classes for OpenMC support, rework input file structure
  • Loading branch information
ZoeRichter authored Feb 7, 2022
2 parents da092a7 + 98e90c6 commit d82e4f4
Show file tree
Hide file tree
Showing 25 changed files with 1,294 additions and 595 deletions.
2 changes: 2 additions & 0 deletions doc/installation.rst
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ SaltProc has the following dependencies:
#. `PyTables`_
#. `NetworkX`_
#. `PyDotPlus`_
#. `jsonschema`_

.. _Serpent: http://montecarlo.vtt.fi
.. _PyNE: http://pyne.io
Expand All @@ -24,6 +25,7 @@ SaltProc has the following dependencies:
.. _matplotlib: http://matplotlib.org
.. _ViTables: http://vitables.org
.. _GitHub: http://github.com/arfc/saltproc
.. _jsonschema: https://github.com/Julian/jsonschema
.. _conda package manager: https://docs.conda.io/en/latest/
.. _mamba: https://github.com/mamba-org/mamba

Expand Down
1 change: 1 addition & 0 deletions environment.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,5 +9,6 @@ dependencies:
- networkx
- pydotplus
- pytest
- jsonschema
- pip:
- argparse==1.4.0
6 changes: 3 additions & 3 deletions examples/msbr/msbr.serpent
Original file line number Diff line number Diff line change
Expand Up @@ -51,9 +51,9 @@ therm gr 900 gre7.18t gre7.20t % 900K C-nat
set title "MSBR Saltproc long-term, 91% removal, BOL, fresh fuel, ENDF"


set acelib "/home/andrei2/serpent/xsdata/endfb7/sss_endfb7.xsdata"
set declib "/home/andrei2/serpent/xsdata/endfb7/sss_endfb7.dec"
set nfylib "/home/andrei2/serpent/xsdata/endfb7/sss_endfb7.nfy"
set acelib "sss_endfb7.xsdata"
set declib "sss_endfb7.dec"
set nfylib "sss_endfb7.nfy"

%set acelib "sss_jeff312.xsdata"
%set declib "sss_jeff33.dec"
Expand Down
43 changes: 27 additions & 16 deletions examples/msbr/msbr_main.json
Original file line number Diff line number Diff line change
@@ -1,18 +1,29 @@
{
"Path to Serpent executable": "sss2",
"File containing processing system objects": "msbr_objects.json",
"Graph file containing processing system structure": "msbr.dot",
"User's Serpent input file with reactor model": "msbr.serpent",
"Path output data storing folder": "../../saltproc/data/",
"Output HDF5 database file name": "msbr_kl_100_saltproc.h5",
"Number of neutrons per generation": 50,
"Number of active generations": 20,
"Number of inactive generations": 20,
"Restart simulation from the step when it stopped?": false,
"Geometry file/files to use in Serpent runs": "geometry/msbr_full.ini",
"Switch to another geometry when keff drops below 1?": false,
"Salt mass flow rate throughout reactor core (g/s)": 9920000,
"Number of steps for constant power and depletion interval case": 12,
"Depletion step interval or Cumulative time (end of step) (d)": 3,
"Reactor power or power step list during depletion step (W)": 2250000000
"proc_input_file": "msbr_objects.json",
"dot_input_file": "msbr.dot",
"output_path": "./data",
"num_depsteps": 12,
"depcode": {
"codename": "serpent",
"exec_path": "sss2",
"template_inputfile_path": "./msbr.serpent",
"iter_inputfile": "saltproc_serpent",
"iter_matfile": "saltproc_mat",
"npop": 50,
"active_cycles": 20,
"inactive_cycles": 20,
"geo_file_paths": ["./geometry/msbr_full.ini"]
},
"simulation": {
"sim_name": "msbr_example_simulation",
"db_name": "msbr_kl_100_saltproc.h5",
"restart_flag": false,
"adjust_geo": false
},
"reactor": {
"volume": 1.0,
"mass_flowrate": 9920000,
"power_levels": [ 2250000000 ],
"dep_step_length_cumulative": [ 3 ]
}
}
6 changes: 3 additions & 3 deletions examples/tap/tap.serpent
Original file line number Diff line number Diff line change
Expand Up @@ -19,9 +19,9 @@ include "mats/non_burnable_mats.ini"
set title "TAP MSR test 5-d step"

%therm zrh_h 900 hzr05.32t hzr06.32t % 900K H-Zr
%set acelib "/home/andrei2/serpent/xsdata/endfb7/sss_endfb7.xsdata"
%set declib "/home/andrei2/serpent/xsdata/endfb7/sss_endfb7.dec"
%set nfylib "/home/andrei2/serpent/xsdata/endfb7/sss_endfb7.nfy"
%set acelib "sss_endfb7.xsdata"
%set declib "sss_endfb7.dec"
%set nfylib "sss_endfb7.nfy"

set acelib "sss_jeff312.xsdata"
set declib "sss_jeff33.dec"
Expand Down
75 changes: 43 additions & 32 deletions examples/tap/tap_main.json
Original file line number Diff line number Diff line change
@@ -1,34 +1,45 @@
{
"Path to Serpent executable": "sss2",
"File containing processing system objects": "tap_objects.json",
"Graph file containing processing system structure": "tap.dot",
"User's Serpent input file with reactor model": "tap.serpent",
"Path output data storing folder": "../../saltproc/data/",
"Output HDF5 database file name": "db_saltproc.h5",
"Number of neutrons per generation": 50,
"Number of active generations": 20,
"Number of inactive generations": 20,
"Restart simulation from the step when it stopped?": false,
"Geometry file/files to use in Serpent runs": [
"geometry/347_base.ini",
"geometry/406.ini",
"geometry/427.ini",
"geometry/505.ini",
"geometry/576.ini",
"geometry/633.ini",
"geometry/681.ini",
"geometry/840.ini",
"geometry/880.ini",
"geometry/900.ini",
"geometry/988.ini",
"geometry/1126.ini",
"geometry/1338.ini",
"geometry/1498.ini",
"geometry/1668_all.ini"
],
"Switch to another geometry when keff drops below 1?": true,
"Salt mass flow rate throughout reactor core (g/s)": 9920000,
"Number of steps for constant power and depletion interval case": 3,
"Depletion step interval or Cumulative time (end of step) (d)": 2,
"Reactor power or power step list during depletion step (W)": 1250000000
"proc_input_file": "tap_objects.json",
"dot_input_file": "tap.dot",
"output_path": "./data",
"num_depsteps": 3,
"depcode": {
"codename": "serpent",
"exec_path": "sss2",
"template_inputfile_path": "./tap.serpent",
"iter_inputfile": "saltproc_serpent",
"iter_matfile": "saltproc_mat",
"npop": 50,
"active_cycles": 20,
"inactive_cycles": 20,
"geo_file_paths": [
"./geometry/347_base.ini",
"./geometry/406.ini",
"./geometry/427.ini",
"./geometry/505.ini",
"./geometry/576.ini",
"./geometry/633.ini",
"./geometry/681.ini",
"./geometry/840.ini",
"./geometry/880.ini",
"./geometry/900.ini",
"./geometry/988.ini",
"./geometry/1126.ini",
"./geometry/1338.ini",
"./geometry/1498.ini",
"./geometry/1668_all.ini"
]
},
"simulation": {
"sim_name": "test_simulation",
"db_name": "db_saltproc.h5",
"restart_flag": false,
"adjust_geo": true
},
"reactor": {
"volume": 1.0,
"mass_flowrate": 9920000,
"power_levels": [ 1250000000 ],
"dep_step_length_cumulative": [ 2 ]
}
}
6 changes: 3 additions & 3 deletions examples/tap/tap_plot.serpent
Original file line number Diff line number Diff line change
Expand Up @@ -19,9 +19,9 @@ include "geometry/347_base.ini"
set title "TAP MSR test 5-d step"

%therm zrh_h 900 hzr05.32t hzr06.32t % 900K H-Zr
%set acelib "/home/andrei2/serpent/xsdata/endfb7/sss_endfb7.xsdata"
%set declib "/home/andrei2/serpent/xsdata/endfb7/sss_endfb7.dec"
%set nfylib "/home/andrei2/serpent/xsdata/endfb7/sss_endfb7.nfy"
%set acelib "sss_endfb7.xsdata"
%set declib "sss_endfb7.dec"
%set nfylib "sss_endfb7.nfy"

set acelib "sss_jeff312.xsdata"
set declib "sss_jeff33.dec"
Expand Down
1 change: 1 addition & 0 deletions requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ pyne
numpy
scipy
json
jsonschema
pytables
networkx
pydotplus
Loading

0 comments on commit d82e4f4

Please sign in to comment.