Hi Everyone,
While using command of “scatter” what I obtain is only scattering reaction rate in one energy group. But I need to find the multi-group scattering reaction rates which is in the form of matrix. Can we get scattering from 1st to 2nd & 2nd to 1st energy group and so on for more energy groups?
Regards
Hi Mirza,
Are you using the Python API to generate your s attending reaction rate? If not, I suggest taking a look at the API, and in particular, the “openmc.mgxs” module. It is specifically designed to automate input file generation and data processing for multi-group cross section generation with OpenMC, including scattering matrices.
You might begin by taking a look at the Jupyter Notebook tutorials for “openmc.mgxs” on our website, which show how to compute scattering matrices among other things. It only requires a few lines of Python code.
Best,
Will
Hi Will,
Firstly I was using Pyhton file to generate the input .xml files for Openmc. But there are some errors :
i). The input file tallies.xml is not generated by Python file
ii). The Python file do not execute OpenMC by itself following commands for Simulation
Then I tried without Python API.
The Pyhton file is attached here if you can figure out the error, to help me out.
Regards,
Mirza
build-xml.py (7.24 KB)
Mirza,
The Python API in OpenMC has changed substantially from the last release to the current development state. What version of OpenMC are you currently using?
Thanks,
Paul
Mirza,
It appears that your Python script is not properly constructed to generate scattering matrices (irregardless of your version of OpenMC). I recommend that you look over our Jupyter Notebook examples - in particular, take a look at the MGXS Part I: Introduction notebook. The notebooks clearly demonstrate how to generate multi-group constants including scattering matrices with small code snippets interspersed with commentary. If anything is unclear, let us know.
Note that if you should be careful if you choose to leave out any of the code snippets in the examples. This appears to be the case in your script - for example, the MGXS classes are not constructed prior to loading data from the statepoint (which should throw a Python error, not an OpenMC error). Hopefully things will be more clear after you review the online documentation.
Best,
Will
Hi Paul,
The version of OpenMC that I’m using is OpenMC 0.7.0. But it have the mgxs capability.
Regards,
Mirza
Hi Will,
You are right that the script of Python file have many errors. Since I’ve not worked with Python previously so therefore its difficult. But I’m working on it & hope to sort it out.
Regards,
Mirza