AlanFord / ZapMeNot

Python library for simple point-kernel photon shielding analyses
GNU General Public License v3.0
10 stars 3 forks source link

overflow in buildup factor calculations #7

Closed AlanFord closed 2 years ago

AlanFord commented 2 years ago

Very large mfp values will result in an overflow at line 210 of the material.py file, the routine _GP, the line is return 1 + (b-1)*((K**mfp) - 1)/(K - 1) Need to test for large values of mfp and return something reasonable.

AlanFord commented 2 years ago

Resolved by limiting GP buildup factors to mfp's between 0 and 40. Exceeding a mfp of 40 can result in a non-physical buildup factor as the curve fits are only valid up to 40 mfp.