Question about material volume vs cell volume

Hi all. First time running depletion/transmutation simulations. I’m following example 14 in the neutronics workshop here:

It says material volume needs to be specified. In the code the line is:
my_material.volume = 13502000 # a volume is needed so openmc can find the number of atoms in the cell/material

It then creates a cell (sphere r=100) and fills it with my_material:
sph1 = openmc.Sphere(r=100, boundary_type=‘vacuum’)
shield_cell = openmc.Cell(region=-sph1)
shield_cell.fill = my_material

However the volume of this cell is 4/3pir^3 which is ~ 4.2e6cm3

My question is: why are these volumes different. Surely if the cell is filled with the material then they should have the same volume?

1 Like

You are right the volume should be the same.

Thanks for finding this typo in the example script and letting me know, much appreciated.

Let me know if you are interested in fixing this mistake with a pull request, no worries if not as I can fix this example.

On a related topic soon we might be able to set the cell volume instead or as well as the material volume. See this pull request for progress in that direction

1 Like

I’ve now fixed this on the develop branch

awesome, many thanks.