I have already set the number of particles, but it still says the number of particles needs to be set

I don’t think there are issues with other parts since it was working fine before. However, after using the settings.volume_calculations feature, it keeps saying the number of particles is required. Now, all code in Jupyter Notebook fails to run, even though it works fine when I export it and run it with Python 3.8 in the terminal. Does anyone know why?

could you try changing the last line to model.run().

It looks like openmc is picking up a model.xml file that does not contain the same settings you have made.

Thank you very much for your reply! I found the cause of the problem. When I changed the last line to model.run(), it didn’t run properly; instead, it showed an error earlier on stating that there was no “fuel” in the cell. However, your point about “a model.xml file that does not contain the same settings you have made” inspired me. For some reason, I suspect the .xml file became corrupted or outdated. After deleting the .xml files and restarting OpenMC, it is now running perfectly. Thank you for your help, and have a great day.