Change material during simulation

Can I change the filled material of cells in memory via CAPI during simulation? Just like in this case : openmc.lib.cells[i].set_temperature(temp)

Yes, you can either change the material:

openmc.lib.cells[i].fill = openmc.lib.materials[j]

or you can change the composition of the current material, for example:

mat = openmc.lib.cells[i].fill
mat.set_densities(['U235', 'U238', ...], [0.02, 0.15, ...])