DPA calculation

Hi @aktyagiprl,

I understand that you want to define your own source from an histogram where you have different values of flux for each bin of energy. In OpenMC you can do so very easily but you first need to normalise the dataset by dividing each flux by the total flux and the energy bin width.

Then you can define your source as

my_source.energy = openmc.stats.Tabular(energy_bins, normalised_flux, interpolation='histogram')

@paulromano explains it very well here.