mctools / ncrystal

NCrystal : a library for thermal neutron transport in crystals and other materials
https://mctools.github.io/ncrystal/
Other
41 stars 18 forks source link

Support site occupancy factors in the C++ layer #68

Open tkittel opened 3 years ago

tkittel commented 3 years ago

This should be relatively easy, we just need some "void" or "empty" pseudo-atoms. E.g. 98% site occupancy factors in Aluminium could be added as:

@ATOMDB
  Al is 0.98 Al 0.02 void

On the coding side, we would need some sort of "void" AtomData object which has 0barn cross sections and 0u mass. Perhaps implemented internally with special Z/A fields. We must check carefully what all methods should return, so we don't for instance divide by zero for this mass-less object, etc.

tkittel commented 1 year ago

Related to ultimate resolution of #94

tkittel commented 3 months ago

So the NCMATComposer in the python API can support site occupancy < 1.0. However, this is done by hacking the composition, so such materials can not be used in Geant4 or OpenMC. We need to fix this by having site occupancy factors supported in the C++ library as well.