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.

SourceForge Logo


Currently, the level of function is pretty basic:

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.

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.

  1. Download a tarball from the SourceForge Project Site
  2. tar -zxvf sprinkle.tar.gz
  3. 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.
  4. cd src; make
  5. 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.


Created by Linas Vepstas <linas@linas.org> May 2002 (to validate the system in his house).