Dear mecej4 + anyone else interested in water supply:
I have no doubt you will recall the excellent Fortran help you gave me on the water supply analysis program, Magni in about 2016, is it that long ago.
At the time I used a simple sample that had no loops, so for reasons of to much other work, Magni sat unused. However I have to teach a new class with a variety of students from engineering and construction about facilities, so I decided it was time to use Magni to teach them about water supply systems. Learning about how to construct text input files and look at DXF files as output never hurt a soul. Making the rather significant assumptions that engineers have some form of soul, although I have heard this disputed before from people who attempt to interact with engineers. They tend to take things that are not broken apart and try and fix them.
So I have about 70 students so we can make some nice sample models and try out the program. But as I started to look at the water supply manuals to show my students how the basic rules work and the rules are quite simple.
Well the Australians have developed a national standard, but it is $640 to purchase. Scotch that idea.
I found several US codes, then I noticed that a lot them require a minimum main size of 200 mm or 8 inches in archaic speech.
The standard minimum size up until some time between 1994 and now used to be 100 mm.
My friend who is a fire engineer from Austin mentioned to my class that 200 mm was reasonable to get a fire flow. I made some comment that perhaps it was a tad big and expensive for the whole country. A small dispute arose.
So now the students have a real problem to solve, who is correct.
I will keep you informed.
John, when you write "US codes", readers in this forum may take that as a reference to "computer programs written in the US", rather than municipal water distribution networks.
One of Hardy Cross's papers is available online ( 1936 ). There are some simple network examples in that paper, and it would be a good exercise for students to work through one of them, keeping a printed copy of the paper in their laps, and manipulating a slide rule in their hands to follow the calculations.
Codes of Practice are published by many people for all sorts of engineering and non-engineering purposes. I find it interesting that the most used (does that translate into best) are the older Fortran manuals that are printed and bound. Of course these days we have everything on web sites, that make it easy to find - I dare you to actually find the INTEL PS samples - it is a challenging little search.
An example of the problem is the Supreme Court of the US in about 1860 said that the states were responsible for registration of all professionals. So now we have the creation of interesting economic units that are in reality interesting groups, but each writes there own codes, although there is some standardization, so we end up with a lot of repetitive work, that in the end is an economic drain. The assumption is that multiple Fortran's foster competition and development. I am not entirely sure that this fully correct.
A simple example is a fire tender - it can put out 69 litres per second, which according to the standards writers needs a 200 mm main in your front yard, a 200 mm main is really expensive and you pay for it in your house cost, instead we put in some very small 25 mm mains in your house for sprinklers and we do not need the tender as much, there is about 1 l/s to put out the start of the fire and you do not die of smoke inhalation. The home builder does not want to pay for the sprinklers so we build a less efficient more deadly system because of these many overlapping standards.
Fortran rules, but not always.
I have asked a student to have a look at the hardy Cross examples.
I put in the hardy Problem on Page 13 of the paper. I enclose the complete FORTRAN and the SLN files for VS 2017. I am playing with the LINK Grammar program it will only run on VS 2017 that I have as the C++ compiler is not up to the latest VS 2019 - and I could not find the versions I needed.
VS 2017 Community is still better than anyone IDE compiler I used before it.
The output from the run is shown below - HC did 4 iterations which leaves a large residual error - 11 iterations is less than 5 mm. We cannot measure to that accuracy. The next photo shows the dxf output for the pipes and so the model looks ok.
The only problem is HC used r as a composite value, we ahve to actually plug in some real values, but it is not hard.