Well, this is the moment of truth. It’s time to calculate the pressure loss from a leak to see if this crazy idea for deterring woodpeckers will actually work. The idea is that the woodpecker deterrent will connect to my outdoor hose spigots, which hopefully will provide ample water pressure to protect the house. There are ample electrical outlets outside as well to power any smart devices that will be outside.

This blog post will read more like a page of notes instead of a formal “article”, but it’ll at least give you a window into my train of thought. To make these calculations much easier, everything will be converted to metric units.

My water comes from a well, so I know the exact water pressure coming out of the well. However, these calculations do not take into account any pressure losses going from the well to the house. I assume that they are minimal, and can be ignored.

General Notes and Conversions

  • Well is at 50 PSI = 344.738 kPa
  • Flow rate is 40-60 liters per minute
  • Friction loss at 10 gallons per minute:
    • 1/2 inch pipe: 35.5 PSI per 100 ft
    • 3/4 inch pipe: 8.7 PSI per 100 ft
    • 1 inch pipe: 2.6 PSI per 100 ft
  • Friction loss at 15 gallons per minute:
    • 1/2 inch pipe: Unknown – a lot
    • 3/4 inch pipe: 18.4 PSI per 100 ft
    • 1 inch pipe: 5.5 PSI per 100 ft
  • Pressure loss from elevation
    • 10 feet of rise: -4.33 PSI
    • 10 feet of fall: +4.33 PSI
    • This equates to 9,794.2 Pa per meter

Calculating Pressure Loss Due to a Leak

Since the spray mechanism will just be holes drilled in the side of the pipe, we can calculate the pressure loss due to these “leaks” to ensure the system has enough water pressure to protect the house. Because I had to run these calculations a bunch of times, I wrote a Python script that can run these calculations for different scenarios very quickly.

One fascinating thing about these calculations is that water flowing through a pipe behaves just like an electrical circuit. When there is a hole in the pipe, the leakage reduces the total resistance to the flow, thus causing an increase in flow rate. Increased flow rate means that a larger proportion of ∆p occurs upstream of the leak, thus resulting in less pressure drop across reduced resistance downstream of the leak.

  1. From the pipe diameter, calculate the pipe’s cross-sectional area (Apipe).
  2. Then calculate the area of the hole (Ahole).
  3. Calculate the fluid velocity (vpipe) through the pipe.
    Equation for fluid velocity
    where Qpipe is the flow rate (listed above as 40-60 liters per minute). Note that this will need to be converted to cubic meters per second (cms)
  4. The volume flow out the leak hole is then simple:
  5. Then we can calculate the pressure drop from the leak rate equation, which is derived from Bernoulli’s equations.
    Equation for pressure loss due to the leak
    Note: C is a flow coefficient and for water, C = 0.61.
  6. We can use this pressure drop, along with the initial pressure coming out of the spigot, to calculate the maximum number of holes we can add in the sprayer system before running out of pressure. In Python, these steps look like this:
    Python script to calculate pressure loss from a leak

Accounting for Elbow Fittings and Tees

We can account for pressure losses going around corners (i.e. though fittings) by assigning an equivalent length of pipe for each fitting and calculating the pressure loss due to friction over that length. The equivalent length is a factor calculated from the number of pipe diameters required to get the equivalent length. We are working with several different fittings:

FittingEquiv. Length – Num Pipe Diams
90° Elbow Curved, Standard Radius30
45° Elbow Curved, Standard Radius16
Tee – Through Branch as Elbow60
Hose Coupling5

For example, in 3/4-inch pipe, the equivalent length of a 90° elbow would be:

l = 0.75 inches * 30 = 22.5 inches

Then you would simply multiple the pressure loss due to friction by that equivalent length to obtain the pressure loss due to the elbow fitting.

Note: The 22.5 inches would also need to be converted to meters for our calculations.

Putting It All Together

To calculate the (approximate) maximum number of holes the system can support, we calculate the pressure at the end of the pipe system assuming that there are no holes or leaks and divide that number by the pressure loss per hole. The Python code to calculate this for all scenarios is:

leak_diameter_meters = LEAK_HOLE_DIAMETER * INCH2METER
pipe_diameter_meters = PIPE_DIAMETER * INCH2METER
pipe_flow_rate = SPIGOT_FLOW_RATE * LITRES_PER_MIN_TO_CMS
friction_loss_metric = FRICTION_LOSS * FRICTION_LOSS_CONVERSION_FACTOR
hole_pressure_loss = pressure_loss_from_hole(pipe_diameter_meters, leak_diameter_meters, pipe_flow_rate)

pressure_loss_from_turning_spigot_up = friction_loss_metric * (ELBOW_45DEG + 0.1 + ELBOW_90DEG)
spigot_pressure_pa = SPIGOT_PRESSURE * PSI2PASCAL
print("Starting Pressure: {:,} kPa".format(round(spigot_pressure_pa/1000, 1)))

KEY_ELEV = "elevation"
KEY_DIST = "distance"
KEY_FITT = "fittings"

scenarios = {
	"master bedroom only": {
		KEY_ELEV: [2.1],
		KEY_DIST: [2.1, 6.75],
		KEY_FITT: [ELBOW_90DEG],
	},
	"master bedroom plus north side": {
		KEY_ELEV: [5],
		KEY_DIST: [2.1, 6.75, 6.42, 6.42],
		KEY_FITT: [TEE, ELBOW_90DEG * 2],
	},
	"master bedroom plus patio": {
		KEY_ELEV: [2.1],
		KEY_DIST: [2.1, 9.1, 3.03, 9.1, 3.03],
		KEY_FITT: [TEE, ELBOW_90DEG * 7],
	},
	"master bedroom plus north side and patio": {
		KEY_ELEV: [5],
		KEY_DIST: [2.1, 9.1, 3.03, 9.1, 3.03, 6.42, 6.42],
		KEY_FITT: [TEE, ELBOW_90DEG * 9],
	},
	"office guest room and south side": {
		KEY_ELEV: [5],
		KEY_DIST: [3.35, 0.8, 0.45, 2.58, 2.58, 6.42, 6.42],
		KEY_FITT: [TEE, ELBOW_90DEG * 5],
	},
	"office guest room only": {
		KEY_ELEV: [4.15],
		KEY_DIST: [3.35, 0.8, 0.45, 2.58, 2.58],
		KEY_FITT: [ELBOW_90DEG * 4],
	},
	"north side on garage spigot": {
		KEY_ELEV: [5],
		KEY_DIST: [3.5, 6.42, 6.42],
		KEY_FITT: [ELBOW_90DEG * 2],
	},
}

for scenario in scenarios.keys():
	elevation = scenarios[scenario][KEY_ELEV]
	distance = scenarios[scenario][KEY_DIST]
	fittings = scenarios[scenario][KEY_FITT]

	# Calculate pressure at the end of the pipe, assuming no holes/leaks
	end_pressure = spigot_pressure_pa - pressure_loss_from_turning_spigot_up - (PRESSURE_LOSS_FROM_ELEVATION * sum(elevation)) - (friction_loss_metric * sum(distance)) - (friction_loss_metric * sum(fittings))
	
	print("The pressure at the end of the {} system is {:,} kPa".format(scenario, round(end_pressure/1000, 1)))
	
	print("\tThe pressure loss in the system (sans holes) is {:,} kPa".format(round((spigot_pressure_pa - end_pressure)/1000, 1)))

	# Divide the pressure at the end of the pipe by the pressure loss from
	# one hole to determine the total number of holes the system can support
	num_holes = math.floor(end_pressure / hole_pressure_loss)
	
	print("\tThis supports up to {:,} holes ({:,} holes/meter), each with a pressure drop of {} Pa".format(num_holes, math.floor(num_holes/sum(distance)), hole_pressure_loss))

print("\n")

Script Results

Calculating pressure loss using 3/4 inch pipe and 1/16 inch “sprayer” holes, we get the following results. These calculations account for:

  • Elevation changes in the system/pressure loss due to gravity
    • Remember that for vertical hlow, we need to account for both pressure loss due to gravity and pressure loss due to friction
  • The pipes going around corners (elbow and tee fittings)
  • Pressure loss due to friction inside the pipe
  • Fittings needed to do a 180° turn out of the spigot to get the water up to the eaves
  • The script does not account for the negligible pressure loss due to straight fittings where two straight pieces are joined and do not go around any corners.
Matt:Desktop mattgove$ python3 pressure.py
Hole Diameter: 0.0625 inches
Pipe Diameter: 0.75 inches
Spigot Pressure: 50 PSI
Spigot Flow Rate: 60 Liters per Minute
Friction Loss: 18.4 PSI per 100 feet
--------------------------------
Starting Pressure: 344.7 kPa
The pressure at the end of the master bedroom only system is 281.2 kPa
	The pressure loss in the system (sans holes) is 63.5 kPa
	This supports up to 16,541 holes (1,869 holes/meter), each with a pressure drop of 17 Pa
The pressure at the end of the master bedroom plus north side system is 192.6 kPa
	The pressure loss in the system (sans holes) is 152.1 kPa
	This supports up to 11,332 holes (522 holes/meter), each with a pressure drop of 17 Pa
The pressure at the end of the master bedroom plus patio system is 189.9 kPa
	The pressure loss in the system (sans holes) is 154.8 kPa
	This supports up to 11,173 holes (423 holes/meter), each with a pressure drop of 17 Pa
The pressure at the end of the master bedroom plus north side and patio system is 103.8 kPa
	The pressure loss in the system (sans holes) is 241.0 kPa
	This supports up to 6,102 holes (155 holes/meter), each with a pressure drop of 17 Pa
The pressure at the end of the office guest room and south side system is 181.8 kPa
	The pressure loss in the system (sans holes) is 162.9 kPa
	This supports up to 10,694 holes (473 holes/meter), each with a pressure drop of 17 Pa
The pressure at the end of the office guest room only system is 250.3 kPa
	The pressure loss in the system (sans holes) is 94.5 kPa
	This supports up to 14,721 holes (1,508 holes/meter), each with a pressure drop of 17 Pa
The pressure at the end of the north side on garage spigot system is 219.5 kPa
	The pressure loss in the system (sans holes) is 125.3 kPa
This supports up to 12,910 holes (790 holes/meter), each with a pressure drop of 17 Pa

If we run this again for a “worst-case” scenario, let’s say 40 PSI and 30 liters per minute, the numbers are actually better. The reason is that the slower flow rate reduces the pressure loss due to friction (labelled as “Friction Loss” in the script output). Note how the pressure drop in the lower pressure/flow system below is only 5 Pa per hole, while in the high pressure/flow system above, pressure loss is 17 Pa per hole.

Matt:Desktop mattgove$ python3 pressure.py
Hole Diameter: 0.0625 inches
Pipe Diameter: 0.75 inches
Spigot Pressure: 40 PSI
Spigot Flow Rate: 30 Liters per Minute
Friction Loss: 8.7 PSI per 100 feet
--------------------------------
Starting Pressure: 275.8 kPa
The pressure at the end of the master bedroom only system is 234.9 kPa
	The pressure loss in the system (sans holes) is 40.9 kPa
	This supports up to 46,980 holes (5,308 holes/meter), each with a pressure drop of 5 Pa
The pressure at the end of the master bedroom plus north side system is 178.1 kPa
	The pressure loss in the system (sans holes) is 97.7 kPa
	This supports up to 35,611 holes (1,641 holes/meter), each with a pressure drop of 5 Pa
The pressure at the end of the master bedroom plus patio system is 191.8 kPa
	The pressure loss in the system (sans holes) is 84.0 kPa
	This supports up to 38,351 holes (1,454 holes/meter), each with a pressure drop of 5 Pa
The pressure at the end of the master bedroom plus north side and patio system is 136.0 kPa
	The pressure loss in the system (sans holes) is 139.8 kPa
	This supports up to 27,205 holes (694 holes/meter), each with a pressure drop of 5 Pa
The pressure at the end of the office guest room and south side system is 172.9 kPa
	The pressure loss in the system (sans holes) is 102.9 kPa
	This supports up to 34,586 holes (1,530 holes/meter), each with a pressure drop of 5 Pa
The pressure at the end of the office guest room only system is 209.7 kPa
	The pressure loss in the system (sans holes) is 66.1 kPa
	This supports up to 41,939 holes (4,297 holes/meter), each with a pressure drop of 5 Pa
The pressure at the end of the north side on garage spigot system is 190.7 kPa
	The pressure loss in the system (sans holes) is 85.0 kPa
	This supports up to 38,149 holes (2,334 holes/meter), each with a pressure drop of 5 Pa

Another Fun Fact

Thanks to Bernoulli’s Principle, as long as the “sprayer” holes are much smaller than the pipe diameter, each system will support the same maximum number of holes regardless of the hole diameter because the same volume of water exits each hole. Water will exit smaller holes with a higher velocity than bigger holes. Because of this, we want to make the smallest holes possible in the pipes.

Next Steps

Thankfully, these calculations of pressure loss confirm that there is enough pressure in the system to protect the entire house. In the next installment of this project, we will look at the parts needed to set up the system and we will actually start building a prototype.

Comments are closed.