An important part of domestic water design is calculating flow and pressure losses, a common complaint I have from fellow Aussies though is that Revit’s pressure loss report is it’s not in a familiar format and is not something that they’re comfortable including within their design folders. Not to mention, with the AS3500 pipe sizing work(around)flow that I posted last week, the flow rates still don’t quite match up due to the IPC vs AS3500 conversion factor.

So with a powerful tool like Revit at your disposal, why not utilise it to generate data outputs that are in that familiar format and that you are happy to drop into your design notes?

There is always old faithful – the Excel spreadsheet that performs all your calculations..

..because it’s the way you’ve always done it, so why change right? Not a bad solution if you want to spend the rest of your career manually measuring pipework on drawings to verify your design; ultimately though this is how we came to the true “She’ll be right” Australian method of pipework sizing. After all, doing it properly takes far too long, so just go with your gut and prove your design with actual calculations later, but only if someone questions it down the track.

Did you know you can recreate basic Excel calculations within Revit schedules using calculated values? Of course you did! OK so maybe you didn’t. The problem I have with this method though is due to needing to neutralise Revit units your formulas will start looking a little.. weird.

Take the following example, comparing a simple Excel formula to it’s Revit equivelent

This

=D32*0.001/(0.7854*E32^2*0.001)*1000

Becomes this

=((AS3500_PSD / 1 L/s) * 0.001) / ((0.7854 * Diameter ^ 2 * 0.001) / 1 m²) / 1000

Which how you’d explain that to another engineer I’m not quite sure. They’d probably look at you like you’re a bit odd. So what’s the solution then? Well, maybe you’ve heard of this thing called Dynamo? It’s frequently touted as the best method to model a facade made from old chairs, but did you know that Dynamo can be used for actually useful things too?

In Dynamo, our formula is quite clean and simple, in fact if you squint a little, it looks just like our original Excel formula.

Armed with that knowledge and a bit of time, that trusty old Excel sheet you’ve been using your whole life can be converted into Dynamo. Once you’ve got the calculations working off your Revit model in Dynamo you can generate all the data within your schedules for every single piece of pipe in your model within seconds. So do you still want to spend the rest of your life measuring pipework? I thought not..

And here are the fruits of my labor. My graph was developed in 0.9, but I can confirm it will work in 1.0 and the 1.0.1 pre-release.

Stepping through from left to right, this is how it all works:

Starting off simple, I’m selecting all the pipework within the model.

From there, we’re feeding the *All Elements of Category* node into the *Element.GetParameterValueByName* node. Filter out the pipework elements based on their system classification using a combination of *String.Contains *and *List.FilterByBoolMask*. This gives a set of true and false results for all of the selected elements, which in this case is our pipework. We take the “in” output of the *List.FilterByBoolMask *which gives only the elements marked as true.

In this instance I have used *String.Contains *and checking for the string *water.* What this means is that it will select anything with water in the name, which would include cold water, hot water, rainwater and so on. You can adjust this to filter out your pipework as you need for as many different systems as needed.

From this point onward is where all the good stuff happens. We push our pipework out to three separate groups of nodes. A Barrie Smith lookup, velocity calculations and head loss calculations. The Barrie Smith lookup was the most difficult part as it required custom python code to perform the lookup.

In this group, our results from the previous step feed into the *Element.GetParameterValueByName* node. We’re picking up the calculated fixture units from our pipework and multiplying it back out by our 3.5x multiplier from my previous post to give us our actual AS3500 compliant fixture units. The code block in the upper left generates a list which is Table 48 from Barrie Smith transcribed to Dynamo. The fixture units and Table 48 are then fed into the custom python node

The output of the python node then feeds into a math divide node and we divide our flow rate figures by 28.317 and pushes the result to a flow based parameter that I’ve named *AS3500_PSD*. The reason for division is that Revit stores all units of measurement in imperial rather than metric. When inputting data through Dynamo, Revit doesn’t know that you’re inputting metric figures. What this means is that when you review your data in Revit, you have input 0.23 gallons per minute, not 0.23 litres per second.

Heading back to our second (green) step, the *List.FilterByBoolMask* node feeds into another *Element.GetParameterValueByName* node. This time we’re picking up the diameter of our pipework and we’re finding the diameter in imperial and converting it to metric using a formula within a code block.

The metric diameter from the code block and the probable simultaneous flow rates from the third (blue) step combine first to calculate our velocity. The calculated result is converted back to imperial and populates to a velocity based parameter named *AS3500_Velocity*

Our last fork from the second (green) step is to calculate our head loss for our section of pipework. The brighter pink section first takes our length. Now for whatever reason this is taken in millimeters, so no conversion from imperial required. In the purple section we’re feeding the code block with our pipe size and probably simultaneous flow from previous steps to calculate headloss per 100m, then another code block to calculate headloss for the section of pipe. Finally we push our headloss calculations into their respective parameters *AS3500_Headloss* and *AS3500_HeadlossSection*.

When you’re finished, you end up with a schedule you can drop on your drawing or export to Excel for design verification, and it’s all calculated as you model and far more accurate than you would have ever provided before.

The example that I’ve used here is highlighting flows where the velocity falls outside the acceptable range of AS3500, so you have a simple visual prompt that you need to check your design. I have found though that most of the time, the design is correct and the sections of pipe highlighted are either 15dia supplying a single fixture with a velocity greater than 3.0m/s or 20dia with two fixtures connected with a velocity of less than 1.0m/s.

Give it a go yourself, once the Dynamo portion is humming along your return of investment is incredibly quick.