I note the openmc.Macroscopic class,but it only need a string argument.Can anyone display how to use it for creating complex material?
Thanks!
The Macroscopic
class is actually an older class that’s no longer necessary. You can just use a normal Python string for each component of a material. Please have a look at our example notebooks on OpenMC’s multigroup mode, which go through how to create materials for use in multigroup mode.
My experience for multi-group running mode is to use xml input file directly instead of jupyter or python api. those make things more difficult especially for new users.
The xml input examples are contained in the OpenMC github zip files.
I do understand that the Python API adds extra complexity, but it also gives you much more flexibility than writing XML files directly. Additionally, there are numerous features of the code (e.g., depletion) that are only available in Python, so I personally do not recommend users to manually write XML files.
Thank you for your suggestion.
Currently I have not used the depletion feature of the code, I will try more python features in future.
Li