SPRINKLE Hydraulic Flow Calculator
Hydraulic Flow Calculator for Fire Sprinkler Systems.
The NFPA (National Fire Protection Association) requires hydraulic
calculations to be performed for most sprinkler systems, including
NFPA 13R residential fire sprinkler systems.
This website is for the 'sprinkle' project, an open, public
effort to create a free hydraulic calculator that would be usable
for designing such systems.
Currently, the code 'mostly' works, and is usable only by programmers
and technically experienced computer users.
The code is written in C, and uses a text-file interface.
A graphical interface (e.g. gnome) is envisioned. The
equation solver functions; there are few other features.
This is Free Software,
distributed under the FSF GNU GPL license.
Features
Currently, the level of function is pretty basic:
- A hydraulic calculator that can deal with systems that
have loops in them, as well as trees. Residential
NFPA 13D/13R systems are likely to have loops in them,
so this is an important feature. It also makes the
solver algorithm considerably more complex than it
might be otherwise.
- The calculator (equation solver) currently seems to
function correctly, in that it seems to find plausible
solutions. It has *not* been well-tested or independently
verified. It could be producing pure garbage, for all
I know. I haven't verified any solutions by hand, with
a calculator or anything like that.
- A simple ASCII file format for entering the sprinkler
network topology.
- A first cut at handling pipe schedules. Currently,
only Victaulic CPVC has been entered.
- Uses Hazen-Williams, although it should be easy to
add other pipe-flow pressure-loss formulas.
The Solver
The solver took a lot of work to get right. Turns out that solving
the (non-linear) flow equations on a pipe network is much harder than
one might naively think. Every naive/simple-minded algorithm I could
think of would converge only on trivial networks and fail on anything
more complex. I tried dozens (literally) without success. Thus, the
final solver has a *lot* of research and technology going into it.
The solver uses a variety of algorithms to find a solution; read
the notes in solver.c to understand how it works.
What's Missing
Lots, I suppose.
- Automatically find most demanding sprinkler.
- A graphical interface.
- Write up documentation
- A way of entering pipe schedules more easily
- Schedules for tees, elbows, couplings, checkvalves, etc.
- Pipe schedules for steel, copper, other pipe types.
- Add support for metric systems
- Add support for Fair, Whipple & Hsaio
- Add support for Darcy-Weisbach
How to Use
This system is currently usable only if you have programming
skills and some time to tinker. The system compiles
& runs easily on GNU/Linux and probably works on MS Windows.
- Download a tarball from the
SourceForge Project Site
- tar -zxvf sprinkle.tar.gz
- Make sure that you have glib-1.2 installed.
glib is a collection of C utility functions
for handling linked lists, hash tables, and the like.
- cd src; make
- cat example.fire; ./hydro example.fire
The binary is called hydro. There are six example
files, example.fire, example2.fire, etc. The first one
shows a system with a loop, and explains the file format
a bit. The second shows a simple tree, the third a big
tree.
History
Created by Linas Vepstas <linas@linas.org> May 2002
(to validate the system in his house).