Free Software for Sprinkler Hydraulic Calculations by Alan Ashfield

2D CAD part of AACALC7

This method permits you to mark up your CAD layout drawing so that the full hydraulic calculations can be done without entering any further information. However, beginners may find it too confusing so should use the "Hydraulics" part instead.

Produce the 2D drawing :-

AACALC7 will then :-

The operator can then :-



If you wish to try out this new method of integrating your CAD drawing with the hydraulic calculations, then please look at the "Tree Wizard" and "Grid Wizard" examples under "Select a demo job" within AACALC7. I would then suggest you try a little job in your CAD program - say 2 ranges of 2 heads - to draw out the lines, circles and text (as described next), save it to a text-only DXF file (AutoCad 11 or 12 are quite adequate) and see what my program does with it. If you get some error messages or it doesn't fit right, then you can go back to the drawing, correct the appropriate part and try again. If you just type in hundreds or pipes / heads the first time you investigate this option, then don't be too surprised if it doesn't work. Don't forget that you can always enter pipe / head data into AACALC7 by noding up and typing out the details (as for most of the other current FHC programs) if this method just does not suit your projects or method of working.

Even when you become familiar with this facility, then it makes sense to enter a group of pipes / heads at a time and then get that section working within AACALC7 before continuing with the next set of pipes / heads until you finish. In this way, if you get some errors, then at least you will know that they must be in the last section so added.

Instructions on how to 'mark-up' your CAD drawing

These notes describe the process of creating and amending your 2D sprinkler layout CAD drawing for use with 'AACALC7' by Alan Ashfield to do the full hydraulic calculations. Basically, you draw the lines, circles and text on one or two layers representing the sprinkler pipework and AACALC7 joins everything together to construct a 3D layout that can be viewed and calculated without noding up / repeating as in previous computer programs. I will assume you are already familiar with your chosen CAD program and the process of adding, amending, moving, deleting, copying etc. the line, circle and text 'entities' to form your sprinkler layout drawing, either drawn from scratch or utilising an existing layout from the Architect, Structural or Building Services Engineer.

Layers :-

AACALC7 only looks for entities on layers '1' and '2' unless otherwise specified, so you can call them 'SPIPES' and 'STEXT' or whatever else you choose. All lines, circles and text on any other layers are completely ignored, even if they also represent sprinkler pipes or heads. You can draw the pipes and heads on layer '1' and the text on layer '2' or the other way round or everything on '1' and nothing on '2' or the opposite, it makes no difference.

I would suggest that you use layer '1' for the lines representing the pipes and the circles representing the heads in any suitable colour and thickness and use layer '2' for the text (that always begins with #) at whatever height, font and colour you currently adopt.

All other items - buildings, walls, doors, windows, schedules, title block, details, notes, grid lines and so on can be drawn on as many other layers as you or the original drawing producer have adopted - as these are NOT on layers '1' and/or '2' they will be completely ignored as they do not affect the sprinkler pipework that AACALC7 is concerned with.

Lines :-

You must have one line for every pipe in your sprinkler system on layer '1' and/or '2' in whatever colour and thickness you wish and they must be drawn in the direction of assumed flow. You cannot draw 1 line representing a main feeding lots of ranges - this must be broken into segments between the ranges. Likewise the pipes forming a range must be drawn separately between the circles representing the heads / nozzles even if they are pendent type.

Try to think of how you have noded pipes up in the past - wherever you have needed a node number to separate pipes is where we now need different lines to identify the individual pipes. In all cases, you must use a LINE entity on layers '1' and/or '2' in whatever colour / thickness / style you want in plan view, not 3DLINE, POLYLINE, XREFs or other constructs - do not try to draw elevations or details and expect AACALC7 to understand them. There are also certain requirements for LOOPED and GRIDDED systems as described later.

Perhaps an example will explain these two ideas.

Example of AAVIEW7

Note the difference between the circle entities representing heads and the rise circles and the pipes are drawn as line entities between them as required with the #text entity in the centre of the pipe or adjacent to the rise circle. In this case, all the pipes are drawn away from the bottom left hand corner so the ones on the left go N and the horizontal ways go E. If you drew the line under the #6 above from right to left (=west) then the remainder of the range would have nowhere to go and generate some warning messages. None of the #text items have = signs in them until you get to the "Key to symbols part."

Circles :-

I expect 2 sizes of circles on your drawing - HEAD circles representing the sprinkler heads / nozzles (say 200mm diameter) and RISE circles representing vertical or near vertical pipes - up or down (say 100mm diameter). AACALC7 allows a 10% tolerance so any circle between 180 and 220mm will be called a head and 90 - 110 will be taken as a rise. All circles that lie outside these numbers will be ignored so you can draw some heads as 198mm, others as 203, others at 204 and all will be taken as heads but it makes sense to create them all at the same diameter. In all cases, you must use a CIRCLE entity on layers '1' and/or '2' in whatever colour / thickness / style you want in plan view but you can change the diameters if you want.

The insertion point of the circle entity must be in the correct X and Y co-ordinates on the plan, even if the lines (pipes) do not exactly meet on the circumference or centre if upright or pendent heads. Again a 10% tolerance is applied so if a pipe starts or ends up 110mm away from the centre of the head circle, then it will be assumed as connecting to that head. The distance between the heads will be used in the calculation of its area of coverage, based on the other heads around it. The insertion point of a rise circle must be where that vertical or near vertical pipe starts and you can have several rise circles all with the same X and Y co-ordinates if they connect together (ie a riser connecting different floors) and you can, of course, have a rise circle and a head circle at the same place to represent a 'candle'.

If you miss out a head circle, draw it to the wrong diameter or layer, then there will not be a head on that pipe. If you miss out a rise circle, draw it to the wrong diameter or layer or miss out the matching #text (see later), then there will not be a riser pipe at that point. If no start and/or end points of lines (=pipes) are within the 10% allowance then that head or rise circle will be ignored. These will usually be easy to spot on the 3D pipework layout after conversion by AACALC7 and you will have to correct the 2D drawing to suit.

Text :-

You must have one TEXT entity adjacent to each rise circle and near the centre of every line (=pipe) on your drawing as well as in a "Key to Symbols" section describing those items. All these notes must begin with the # marker - any that do not or are not on layers '1' and/or '2' will be completely ignored but you can choose the colour / thickness / height / font / style and keep them all the same or different - it doesn't matter.

These text items can be #1, #2, #R1, #M12 etc. up to 5 characters long in upper or lower case (so #123456 will get truncated to #1234 and #abc is the same as #AbC and #ABC and #abC) and it is entirely up to you what numbering system you adopt. Only different pipe sizes, slopes and certain other items (as described next) are required so common pipe parameters can be grouped together to cut down on the number of different items required. You may have lots of items the same adjacent to rise circles / pipes or used just once for a specific rise circle / pipe - it does not matter if some are duplicated eg. #4 and #88 meaning the same.

So if one pipe section is 3m long going North and another is 2m long going South or East and they are both of the same size and slope, they can be the SAME reference. If they are the same length and size but at a different slope, you will need 2 #text items, one for each slope.

You can start at #1, then #2, then #3 and so on in some sort of pattern or order of drawing the pipes so you 'know' which ones have been used and which number follows on. Alternatively, you can call the mains pipes #M1, #M2, #M3 etc. and the range pipes #R1, #R2, #R3 etc. or your own initials #AA1, #AA2 or random #TT2, #fs65, #k12cc - it really does not make any difference but you cannot use spaces, commas or = signs (so #A C or # A,A or #5=$ will not be accepted), nor #PD, #DP or #RN as these are reserved for the project data, distribution pipes and range types as described next.

Key to # symbols :-

For each #text marker adjacent to a rise circle / centre of a line (= a pipe), you must have a matching explanation which is that same reference with an = sign and its description, usually all gathered together in one place on the drawing for convenience. For example, if there is #1 somewhere on the drawing, then you must have one line of text of #1=25 0 describing what the #1 marker is. It also doesn't matter if you end up with different #text items representing the same information. These lines can be of the following items :-

Project data :-

You can use lines #PD1= to #PD54= to identify the job as required - defaults are shown in [ ] brackets.

#PD1=Project ref/no
#PD2=Client ref/no
#PD3=Address/notes 1
#PD4=Address/notes 2
#PD5=Address/notes 3
#PD6=Building ref/no
#PD7=Hazard classification
#PD8=System/design ref (MR/MF)
#PD9=Installation ref/no
#PD10=Drawing(s) ref/no
#PD11=Drawing(s) dates/issues
#PD14=Comments 1
#PD15=Comments 2
#PD16=Comments 3
#PD17=Design area sq.m [0]
#PD18=Elbows welded above mm [65]
#PD19=Specific gravity [1.0]
#PD20=Node no for zero datu [0]
#PD21=Min pipe size in system mm [25]
#PD22=Max pipe size to heads mm [65]
#PD23=Max fluid velocity m/s [10.0]
#PD24=Max pipe pressure drop bars [3.0]
#PD25=Max source pressure bars [12.0]
#PD26=Max m/s for unsized pipes [6.0]

So, for example, if you want the job title to be given, enter

#PD1=My project title
in upper or lower case and if the design area is to be 260 sq.m, enter

Most other lines up to 54 are for special cases and can be omitted but some are listed below :-

For design authority of LPC Rules make #PD30=1, for EN12845 Rules before Jan09, make #PD30=3, for EN12845 after Jan09, make #PD30=4 and for the NFPA 13/15 Sprinkler Rules, have a line #PD30=5 (more will be added later).

#PD31= 1 for L2, 2 for M, 3 for MW etc. (I appreciate not very user friendly but you will soon get used to the few pipe types you have in your systems).

To specify the calculations are balanced to a specified water supply / pump curve you need 3 lines
#PD36=1 0.00 100 0 0 0 0 Pump
#PD37=(line of up to 11 flow rates in L/min separated by 1 space)
#PD38=(line of up to 11 pressures in bars separated by 1 space)

The 1 at the start of line 36 turns the pump on (or 0 = off), the next number is the height of water to be added in m (eg. 2.54), the 100 is the percentage multiplier, the next 4 numbers are to be zero and you can have whatever you want in place of the word 'pump' (eg. Bloggs pump type 234). Lines 37 and 38 might look like what you are already used to

#PD37=0 1000 1500 2000 2500 3000 3500 4000 0 0 0
#PD38=6.0 5.95 5.90 5.80 5.66 5.41 5.2 5.0 0 0 0

but ensure the maximum flow given is above that expected (ie. For 12.5mm/min over 260 sq.m the max flow is over 3500). You can have up to 3 more pumps on lines 39-41, 42-44 and 45-47.

There are default answers to #PD1 to #PD16 of '-' so you can leave out these lines if this is what you want. The default answers to #PD17 to #PD26 are given in [ ] brackets above - again these lines can be omitted is this number is what you want. Do not miss out the = sign nor have any spaces up to that = sign (eg. #PD12=None is acceptable but # P D 1 2 = None won't work). The order that these are given is not important but you can't have any down twice!

Distribution pipes :-

You may have up to 54 distribution pipes, that is pipes that are NOT shown on the drawing but supply the first pipe quoted and these are numbered #DP1= to #DP54=. The format of these lines is the same as in AACALC7, that is

Start node (eg. 100), a space then end node (eg. 110), a space then size in mm and its type (eg. 150HWS), a space then length in m a direction and slope as previously described (eg. 1.000U), a space and 0 or other fittings (eg. GV) another space and usually zero because we are specifying all the heads/nozzles later. For example

#DP1= 100 110 150HWS 1.000U 0 0
#DP2= 110 120 150HWS 3.456E 0 0

You MUST have #DP1 = to start with otherwise the program has not anywhere to start from.

Range Nozzle types :-

You may have up to 9 range nozzle types as previously described and these are numbered #RN1= to #RN9= but usually only 1 is needed for a roof only system or 2 for roof + in-rack systems. The format of these lines is the same as in AACALC7 that is

Pipe type (ignored here) (eg. MW), a space and orifice size in mm (eg. 20), a space and the "K" factor (eg. 115), a space and the minimum area in sq. m (eg. 7.000), a space and the maximum area (eg. 9.000), a space and the density in mm/min (eg. 10), a space and the minimum pressure in bars (eg. 0.5), a space and the maximum allowable pressure in bars (eg. 12), a space and U for up or P for pendent. For example

#RN1= MW 20 115 7.000 9.000 10 0.5 12 U
#RN2= MW 15 80 0 0 0 2 12 U

#Text items :-

This is where it gets complicated because there are so many options to be considered so I would suggest you use the TREE and GRID wizards to create a little scheme and then study those DXF files so produced to work out what is needed here. Alternatively, you can always draw out part of your main CAD drawing before you embark on marking up hundreds of pipes and "play" around with those few mains / ranges to get it right within AACALC7.

For ordinary NEAR HORIZONTAL pipes, the format of these lines is just 2 items, the size and slope (because most of your end or centre fed sprinkler pipes will be horizontal or up/down a gently sloping roof) so let me do those ones first. They will all use RN1 unless otherwise specified. You just quote the size (20 to 200mm), an optional pipe type (if different to #PD31) a space and a slope in degrees

eg. #1 = 25 6 (meaning 25mm at + 6 degrees)
eg. #1 = 25M >5.64 (means 25mm type 'M' at + 5.64 degrees)
eg. #1 = 25 <6 (means 25mm at - 6 degrees)
eg. #1 = 32 0 (meaning 32mm horizontal, 0 is optional so #1 = 32 is OK)
eg. #1 = 100MW ~2 (means 100mm MW then a space before the ~ at 2 mm/m slope)

These pipes will form the mains and ranges in your system between other mains and heads (larger size circles) and will be assumed to connect to the "bottom" on any rise circles unless you specify TOP at the end and remember that we can have several rise circles on top of one another (a vertical set of separate pipes) so

eg. #2 = 40 0 TOP (means 40mm horizontal connecting to a previous rise circle)
eg. #2 = 40 <6 TOP (means 40mm sloping at -6 from a rise circle pipe)
eg. #2 = 50 0 #4 (means 50mm horizontal connecting to rise circle #4)

If these pipes end at a capped end, enter CE or flushing connection, enter FC or DV for drain valve or VJ for victaulic joint

eg. #3 = 50 0 CE (note the spaces between the items but not within the items themselves)

For VERTICAL (up or down) rise pipes, the format is slightly different. You still need the size, optional type but we now need the vertical change or the fixed height - this will make the program calculate the length based on where it connects to and so cope with any pipes given as ~ slope. Also these would be used for "candles" connecting to sprinkler heads so the rise circle and head circle would be at the same X Y co-ordinates.

eg. #4 = 32 U 500 (means 32mm up 500mm)
eg. #4 = 25 U 1000 (means 25mm up 1000mm = 1m)
eg. #4 = 100 U 4000 CG@110 (means 100mm up 4m starting at the #DP with a end node of 110)
eg. #4 = 50 U ^6500 (means 50mm U from wherever to a fixed height of 6.5m above zero)

For NEAR VERTICAL (up or down) rise pipes, you need to give the direction, slope and size (as you do with the similar pipes in AACALC7).

eg. #5 = 32 S>84 600 (means 32mm going South [so next pipe would go N] at 84 degrees (to match up with 6 next) and 600mm vertical rise)
eg. #5 = 40 E>80 1200 (means 40mm East at 80 [ie 10 off horizontal] rising 1.2m)
eg. #5 = 50 S>84.0 ^6000 (means 50mm S at 84 but ends up at 6m from zero datum)

Don't forget that any pipes that connect into the top of these vertical or near vertical rise pipes need to have that reference or TOP quoted. Otherwise, by definition they connect into the bottom ie. a run of mains pipes under rise circles up to the ranges supporting the sprinkler heads so it is only the first range pipe that needs the TOP quoted (or both sides if centre fed) not the mains or all other range pipes.

Right, so how do we cope with in-rack pipes? If you try and draw them as they appear in plan then all the pipes and therefore their #text markers will be on top of one another and the wrong layout will result. So just lay the rack on its side ie. Draw it in elevation rather than as in plan. I suggest, you can draw any 'vertical' pipes between the different levels as short horizontal ones in plan view and then the range pipes themselves will be in different places. ie. Displaced in X or Y at each level.

For the "vertical" pipe (which you draw as say 200mm long horizontally) between the rack levels you would have

eg. #6 = 50 V 1200 (meaning forget the 200mm and make this 50mm pipe 1.2m)
eg. #6 = 50 V 2400 (as above but 2.4m vertical drop)

The rest of the pipes to the heads on this level would have their #text items as normal

eg. #77 = 32 0

but you may need to add RN2 to select that #RN2 set of head data eg. #77 = 32 0 RN2


All of the above assumes that each pipe is fed from the end of the previous pipe whatever its #text reference. This would be the case for any end or centre fed mains / ranges layout - there would not be any loops so formed. To cope with looped systems, I have introduced a LP marker. For the two pipes that, when drawn out from the previous pipes, eventually join together, then those two pipes both need to have LP in them

eg. #M4 = 100 0 (is a normal mains pipe)
eg. #M5 = 100 0 LP (is one pipe from say M4 to an elbow or tee)
eg. #M6 = 100 0 LP (is the OTHER pipe that buts into #M5 to connect its END node)

Remember the rule 'start node must have been given as a previous end node' so if you miss out the LP code(s) then the pipes will have different 'end' nodes and therefore not connected together - the LP code makes them have the same 'end' node.


Gridded pipe layouts are really two end fed layouts joined together in the middle - look at my 9th "demo" job - the range pipes on both sides of the roof are drawn from the front and back tracks out towards the apex at the centre. They therefore have the SAME #text references (the direction is found from the drawing because the ones from the front track are North going up the drawing and the ones from the back track are drawn South). The only difference is that the ranges that connect in the middle need a GU reference standing for grid union. If this is missed out, then those pipes will not connect to each other ie. Similar to the LP code for looped system for precisely the same reason - to make the end nodes the same.

eg. #8 = 32 >6.0 (for normal range pipes up the roof slope and then)
eg. #9 = 32 >6.0 GU (where they connect together at the apex [ie. A 12 degree join])

The other point is where does the back track start? The front track is obviously fed from the control valves at one end of another or from a vertical rise to a tee somewhere near the centre (so the mains pipes are drawn out from this point to the rise circles up to the ranges). So at the start of the back track drawn at one end or the other where the rest of the back track pipes feed from, please enter

eg. #9 = 80 0 BT (meaning 80mm horizontal but starting with BT code)

That's all for a simple gridded system. Obviously you may have much more involved systems than I have considered so far so it may be better to number the drawing up in the normal way rather than spend a lot of time drawing it out and finding it doesn't work!

Again, I suggest you start with the TREE and GRID wizards (demo jobs 8 and 9 in my program) to make up a simple little system and study the pipe directions, differences between rise and head circles, layers and how the #text items have been added and specified BEFORE you do a complete 1000 head job! You may have to remove the rises circle and the #M1 text marker as they are there to start off these wizards from the #DP1 distribution pipe.

Checking of CAD drawing :-

If you make any mistakes in your CAD drawing regarding the layers / sizes / markers etc. then you will get informative warning / error messages and the following screen will get shown (or you can "double click" on the drawing after reading it into AACALC7 :-

2D drawing

You can move the red square around the main drawing in a similar fashion than the "Zoom in" part already described (yes I know this is the opposite way round as the main drawing is the main part and the highlighted section is in the bottom left hand corner, but it seemed better this way). Any lines, circles or text entities in the expanded part are shown alongside as obviously you cannot read the text on the main plan. You can click on the other TABS along the top to see :-

List of entities List of other items

but there is no point in showing the others except the "Pipes" one and you can always select "Help" for more information.


1 Layer no/name for pipes/heads '1'
5 Colour no for pipes/heads
2 Layer no/name for #text '2'
7 Colour no for #text
0 Colour no for background
150 Text height in mm
200 Head circles diameter in mm
100 Rise circles diameter in mm
200 Distance from pipe centre to #text
70 Angle to show rises as circles
0 Spare
0 Spare

If you want to change these layers or dimensions, you need to do it BEFORE you create any drawings by going to "Data" on any (demo?) job in AACALC7 and clicking on "User data", changing the items and then finishing that job and exiting the program. You can also use "NotePad" or similar to amend your USERINFO.TXT file in the same folder as AACALC7. Otherwise you could create a drawing with everything on layer "1" but then somebody changes it to "32" so when you rerun the original drawing, nothing is there because it was on layer "1" and now we are looking on layer "32"!. The colours are only used by my wizards - you can draw the lines / circles / text in whatever colours, thickness, style, font type / height etc. you normally do in CAD.

Don't forget DXF files are standard text files and can be opened with "NotePad", "WordPad" or similar and you can use any "Find" / "Replace" options to change the data. However I suspect you are all so familiar with your chosen CAD program that you have found easier ways to change or add text to the drawing. Also note that AACALC7 is arranged such that you CANNOT AMEND any of the pipe data it generates FROM your CAD drawing - this is to prevent the drawing AND the pipe data getting out-of-step. Yes, you can change your drawing AFTER doing the hydraulic calculations but when you next run it through the program, all those amendments will get picked up. That is why there is a "Zero all" button in the "Select" part of my program - if you radically change the layout or sizes of the pipes, there is no point in considering the previous calculations - those heads / pipes may no longer even exist!

Quick Tutorial

Run AACALC7 and select the 8th "demo" job and on the "Tree Wizard", adjust the sliders to say 10 ranges of 5 heads with 1m rises :-

Tree wizard

Click on "Save" and then on "Close" to see the coloured up isometric view :-

Now untangled

Try the various views and practise zooming in / panning around / zooming out :-

Zoom in

Click on "Select" and draw a box around the remotest 12 or so heads :-

3 ranges of 4 heads

This will show a summary :-

First calculation

Click on "Results" to see the full presentation and can scroll to see the rest :-


Back on the summary, click on "MF" and then on "Add" and select the most favourable 12 or so heads to again see the summary :-

Second calc

Click on the little boxes at the start of the two lines and then on "Graph" but we have not given a pump curve yet :-

No curve yet

So we can use a "helper" part to try some typical details :-

Try these parameters

Back in your CAD program, try DXFIN (or equivalent) to read in the named DXF file and zoom in / around looking at the pipes, heads and #text items.

If this all sounds too complicated to be useful to your company, then just ignore this part of AACALC7 and choose the hydraulics part instead.