Sign up for free to join this conversation on GitHub.
Below I've attached a photo of a portion of the output file, as well as the program itself. Hardy cross method of solution for the pipeline network problem. I've looked over the code extensively, and can't seem to figure out where I've made an error. This doesn't make sense, since one can observe in the output file that at the final iterations the maximum difference should be much smaller than what is displayed. M.Wahba, An improved computational algorithm for teaching hydraulics of branching pipes in engineering curricula, Comput Appl Eng Educ, Volume 23 2015, pp.537-541. Please make it universal so that it can work with any. G.Lopes, Implementation of the Hardy-Cross method for the solution of piping networks, Comput Appl Eng Educ, Volume 12 2004, pp.117-125. The maximum difference from one iteration to the next should approach zero, just as the correction factors are, yet instead the maximum difference appears to converge to approximately 2.29. Question: Please provide Hardy Cross Method for pipe network analysys in Matlab code. In the output file I've created, the correction factors for each loop correctly converge to zero after a certain amount of iterations, and the flow distributions appear to be very close to the true values however, the absolute maximum difference in flow rate from one iteration to the next appears to be incorrect. I have a written script designed to calculate flow distribution in a 3-loop pipe network using the Hardy-cross method.