armi: Database cannot recall user materials

After you build and run a case, one can use the database to reload the reactor state. It appears that if you define a component with a custom material like material: customMaterialModule:myCustomMaterial, then the database loader cannot find the custom material when you try to load up the saved reactor.

I’ll post an example in a bit.

About this issue

  • Original URL
  • State: open
  • Created 5 years ago
  • Comments: 20 (20 by maintainers)

Most upvoted comments

I am happy to talk more about this offline. But I will add the following for more context to mull over.

You should not have to alter the material namespace when using a custom material in this way: image

The path to the material class is literally defined in the blueprints. The namespace for that material is implicit in the material’s definition. It is not necessary to alter the material namespace to run the case in the first place. I cannot see any logical reason why you should have to specify the namespace manually when using the DB produced by the run.

As I said above, the root of the problem here is that the DB only stores the material class name and DOES NOT include the name/path of the module that it is in. ARMI should not be stripping information out of a user’s blueprints when it stores those blueprints in the DB. When we do this, we take something that is precisely defined and we make it less well-defined.

As I’ve outlined above, this is prone to error. And as Drew has outlined above, manually setting the material namespace with setMaterialNamespaceOrder() is not possible for a variety of sensible situations.

IMO, the current situation could very easily lead to bugs.

For instance, we have a material in the framework called Air.

If I were to have a module in my run path called my_custom_materials, and in that I have a custom implementation of air, also called Air, I could point to it for my run: material: my_custom_materials:Air

All of this is completely legit. During the run, ARMI would correctly discover and use the custom version of Air, as expected.

But then during a reload from the DB, if one were to not explicitly set the custom module ahead of the “normal” material modules using setMaterialNamespaceOrder, their DB load would be the framework implementation of Air, which is WRONG!

This would be solved if the module path were stored in the DB, so that instead of looking for just Air during the reload, ARMI would look for my_custom_materials:Air.