Is it possible to use stochastic volume calculations to determined the material compostion of a model in a lattice/mesh cell?

Hello,

I’m currently trying to use stochastic volume calculations in conjunction with an overlaid mesh to find out the material composition each cell in the mesh (made using Mesh.build_cells) in my model. At the moment, I have been able to get the code to give me the volume of the cells but not the materials in each cell. I assume this is because the cells in the overlaid mesh don’t have materials assigned to them, is there anyway to get these cells to inherit the materials of the model underneath? if not, is there a way of using stochastic volume calculations to get the material composition of the model in terms of an areas position in the model?

I’m quite new to OpenMC so any help is appreciated as I am still learning.

Thanks for any help,
Matt

Hi Matt,

I’m not sure I entirely understand what you’re asking. You might want to describe a little more what your particular model looks like and why you are using Mesh.build_cells. I will say that it is not currently possible to use the stochastic volume calculation feature on a mesh specifically (see this open issue). However, if you have a lattice with universes, it would be possible to find the volume / average number densities within each universe.

Best regards,
Paul

Hi Paul,

Sorry, I just realised how badly I put what I was asking. I’m trying to map the material composition of points around the model using stochastic volume calculations so that data can be used in future calculations. I realise now that the way I was approaching it with the Mesh.build_cells will not work, so I have changed my approach to iterate through points each time running the volume calculations at each of those points. These are then output to the .h5 files. While doing this I have encountered a new problem in that when trying to read the results back in I get an error (shown in the attached screenshot). For context here, the domains I am using are the materials used in the model, due to this it is unlikely for all the materials to be present at every point/area I sample. This means that the .h5 is missing nuclide data for those domains and cannot be opened by openMC.VolumeCalculations.load_results, instead it throws the error in the screenshot. Is there anyway to get the output files to open with the missing data?

I hope this helps clarifies what I was asking.

Best Regards,
Matt