Generation of heat and stress during the cure of polymers used in fiber composites