Add new function calculate_flows to simplfy bond calculations