lots of changes to logic of stress calcs and pipe model