Determining cook-off time for a weapon is disclosed. A method determines a
first barrel temperature next to a first energetic, such as a propellant
charge, of ammunition within a gun barrel, and determines a second barrel
temperature next to a second energetic, such as an explosive charge, of
the ammunition. If the ammunition did not properly fire, the method
determines a first cook-off time of the first energetic based on the
first temperature next to the first energetic and the first energetic's
type, and a second cook-off time of the second energetic based on the
second temperature next to the second energetic and the second
energetic's type. The first and second times may be determined by using
one or more finite-difference heat transfer models. If either or both of
the first and second times are less than a threshold, a warning-related
action is performed to users of the weapon.