Most people have heard or even said to themselves, “I will never use algebra in the real world.” However, most don’t realize they use algebra every day. For example, you plan to leave for a much-needed vacation on Saturday of this week. If a co-worker asks on Tuesday, “How many days until your vacation starts?” you will use basic algebra to figure this out.
If there are five days in a typical work week and you are asked on Tuesday, day two of that five-day work week, how many days are left? Three.
X = Y+Z
X = Days of the work week = 5
Y = Days worked that week = 2
Z = Days left in that work week
5 = 2+Z
Subtract 2 from both sides to find Z:
5 - 2 = 2+Z-2
Z = 3
Design engineers and professionals should use basic math and algebra for more than just calculating when vacation starts. From the code books to ASPE’s “Plumbing Engineering Design Handbooks” and ASHRAE’s “Design Handbooks,” we should be using some math fundamentals on a regular basis.
As engineers and designers, our goal is not simply to know the codes and the tables, but to understand how the codes arrived at those tables. What is the math behind the magic?
This, in my simple opinion, is what engineering is: seeing a challenge, then using sound engineering logic and math to find a solution. So, let’s use that same idea as we move through this article.
The building environment has presented specific challenges that must be addressed. Let’s see what happens when we apply some basic math applications to find solutions for domestic water heating and natural gas.
Domestic water heating
The selection of a specific water-heating method and water-heater type will vary. Options include fuel gases, electric resistance, heat pump, steam, water or solar systems, as well as tank-type, tankless or de-coupled tank and heat exchangers.
As designers, we have many options. Regardless of what we are being sold through media or manufacturers, we have a responsibility to review all options and find the best solution to the problem. This, of course, must be vetted through the owner, the building parameters and the budget.
Let’s review the two most common: fuel gases and electric resistance. We know that 1 BTU or 0.000293 kW equals the amount of energy required to raise the temperature of 1 pound of water at 60 F to 61 F.
Since we typically don’t design in pounds of water, we must convert pounds of water to gallons of water.
1 gallon of water = 8.34 pounds at 60 F
With basic math, we can convert the energy from pounds to gallons of water.
1 BTU = 1 pound of water at 1 F rise or 1 BTU = 0.12 gallons at 1 F rise
Now, we can use this to find the energy required to raise the temperature of water in gallons per hour (gph) or gallons per minute (gpm).
The formulas for this are:
Z (pounds/hour) = Y (gallon/hour) x 8.34 (pounds/gallon)
X (BTU/hour) = (Z (pounds/hour) * ▲T)/E (%)
X (BTUH) = (Y (gph)/E(%)) * (8.34 (pounds/gallon) * ▲T)
X (BTUH) = (W (gpm)/E (%)) * (8.34(pounds/gallon) * T(minutes/hour) x ▲T))
Where,
X = BTU (energy)
Y = gph
W = gpm
Z = weight of water (pounds)
E = water heater efficiency, %
T = 60 minutes/1 hour
▲T = temperature rise (inlet vs. outlet temperature)
X (energy) = |
W (gpm) |
E (water heater efficiency) |
Z (weight of water) |
T (hour) |
▲T (temperature rise) |
BTU |
gallons |
8.34 pounds |
60 minutes |
1 |
|
Hour |
minute |
% |
1 gallon |
1 hour |
delta T |
Examples:
We have a system needing 3.875 gpm of 140 F hot water. If we have an inlet water temperature of 40 F, this yields a ▲T of 100 F. We also want our water heater to have an efficiency of 97%. With this information, we can find the amount of energy required to do this, in BTUH.
X (BTUH) = (W (gpm)/E (%)) * (8.34 (pounds/gallon) * T (minutes/hour) * ▲T)
X = 199,902 BTUH = ((3.875 gpm)/97%) * ((8.34 pounds/gallon) * (60 minutes/hour) * (100 F))
If we need this in kW, we can use basic math again to convert.
1 BTU/hour = 0.000293 kW
199,902 BTUH * .000293 = 58.57 kW
If we are looking at a heating system with a storage component, we can use the previous formula to determine how much energy is required to heat the stored water and to calculate the recovery rate in gallons per hour.
X (BTUH) = (Y (gph)/E(%)) * (8.34 (pounds/gallon) *▲T)
X (energy) = |
Y (gph) |
E (water heater efficiency) |
Z (weight of water) |
▲T (temperature rise) |
BTU |
gallon |
|
8.34 pounds |
1 |
Hour |
hour |
% |
1 gallon |
delta T |
If our system includes a storage tank capacity of 119 gallons, the amount of energy required to increase the temperature of that stored water 100 F = 102,315 BTU.
X (BTU) = (Y (gallons)/E(%)) * (8.34 (pounds/gallon) *▲T)
102,315 BTU = (119 gallons/0.97) * 8.34 (pounds/gallon) * 100 F
This same formula can also be used to calculate the recovery rate per hour for a given BTUH input. From our previous example, with an input of 199,902 BTUH, we can expect our recovery rate to be 232.5 GPH.
Y (gph) = (X (BTUH) / (8.34 (pounds/gallon) *▲T)) * E(%)
232.5 (gph) = (199,902 (BTUH) / (8.34 (pounds/gallon) *100 F)) * 0.97
However, if natural gas is unavailable, these same formulas can assist from a kW standpoint. The U.S. Department of Energy requires manufacturers to publish the Uniform Energy Factor (UEF) for that specific heater. Some factors affecting this UEF, or overall “efficiency” rating, include recovery efficiency, standby heat losses, cycling losses and hot water production. This UEF will provide our efficiency number for our formula.
1 BTUH = 0.000293 kW
kW = (Y (gph)/E(%)) * (8.34 (pounds/gallon) *▲T) * 0.000293
For an electric resistance water heater with a 50-gallon storage tank and a UEF of 92%, we can calculate the energy required in kW to raise the water temperature of this 50-gallon tank from 40 F to 140 F.
kW = (50 (gallons)/0.92) * (8.34 (pounds/gallon) *100 F) * 0.000293 = 13.3 kW
If we are designing around the recovery rates needed per hour for a building-specific load, we can follow the same procedure. If our designed system has an hourly recovery rate of 24 gallons/hour with a 100 F rise, we get:
kW/hour = (24 (gph)/0.92) * (8.34 (pounds/gallon) * 100 F) * 0.000293 = 6.37 kW/hour
If the building design drives the application to be electric tankless, we can expect the UEF to be above 97%. With a demand load of 3 gpm, we are increasing the incoming water temperatures from 40 F to 140 F.
kW = (3.0 gpm)/97%) * ((8.34 pounds/gallon) * (60 minutes/hour) * (100 F)) * 0.000293 = 45.3 kW
We can also use the concept of formula manipulation as we consider natural gas pipe sizing.
Natural gas
As designers and engineers, we rely heavily on the tables within the International Fuel Gas Code, Uniform Plumbing Code or the ASPE “Plumbing Engineering & Design Handbook of Tables” for gas pipe sizing based on different system pressures and pressure losses. These tables generally rely on two formulas: the Spitzglass Formula for gas pressures less than 1.5 psi, and the Weymouth Formula for gas pressures greater than 1.5 psi.
We will focus on the low-pressure formula, but the same manipulation concepts can be applied to the high-pressure formula.

Within this formula, we need to consider which variables we can manipulate to help us design the piping system most effectively. From my point of view:
“L” = the pathway or “equivalent length of pipe” of the piping system to the gas-fired equipment
and
▲H = pressure drop across the system
With the understanding that each building design and gas piping pathway will be unique, let’s focus on the pressure drop.
Now, depending on where you live, the incoming pressure will vary greatly. However, please make sure you are always checking your units.
For this formula, notice that the pressure differential is calculated around the inches of water column (wc). So, if your incoming pressure is in pounds or ounces, you must convert.
1 psi = 16 ounces = 27.7 inches wc
For this example, I will use one of the methods noted in the 2021 International Fuel Gas Code, Ch. 4-402.4.1, the Longest Length Method. We will manipulate the pressure drop from our meter or gas regulator to the most remote fixture along our gas piping pathway.
In addition, there are multiple ways in which to handle formulas similar to the one above. For this example, we are going to break the formula out. We will calculate the numerator (upper half), calculate the denominator (lower half), and then bring them back together for the final division.
From the Spitzglass Formula, we have the following items:
D = ?
Q = 4,000 (cubic foot/hour (cfh))
▲H = 3.0 (in wc) [inlet pressure = 1 psi or 27.7 inches wc – delivery pressure = 24.7 inches wc]
Cy = 0.6094
L = 200 feet (equivalent length of gas piping system from gas meter or gas pressure regulator to the most remote fixture, longest length method)
19.17 (conversion factor)
Numerator:
Q = 4000 cfh
Numerator = Q0.381 = (4000)0.381 = 23.571 cfh
Denominator:
19.17 * (3.0/(0.6094 * 200))0.206 = 19.17 * (3.0/121.88) 0.206 = 19.17 * 0.466 = 8.933
Denominator = 23.571/8.933 = 2.64 inches
Now, we can back-check our tables.

We can see that for our 200-foot equivalent pipe length, a 2 1/2-inch pipe can handle an input rate (Q) of only 3,340 cfh. Our connected gas load was 4,000 cfh, so we will have to round the 2.64 inches calculated up to 3 inches; the chart supports this.
Once we understand how to manipulate system pressures to help with pipe sizing along the same length, we can begin to realize the potential cost savings because code simply states that the gas piping system must be able to deliver the required flow and pressures needed for the equipment to operate properly.
For this example, if we use the same parameters but increase the pressure drop from 3.0 inches wc to 12.0 inches wc, we see the following:
Numerator:
Q = 4000 cfh
Numerator = Q0.381 = (4000)0.381 = 23.571 cfh
Denominator:
19.17 * (12.0/(0.6094 * 200)0.206 = 19.17 * (12.0/121.88) 0.206 = 19.17 * 0.620 = 11.885
Denominator = 23.571/11.885 = 1.98 inches
By increasing the pressure drop across the system, we were able to go from a 3-inch pipe, normally welded, to a 2-inch pipe, normally threaded. This reduction in pipe size can lead to cost savings for the project.
These are only a few examples of the many different formulas that drive the sizing of piping systems and equipment selections. As design engineers and professionals, we should be grounded in basic math principles to anchor the foundation of our designs.
With knowledge of how the code books and associated tables determine the values, we should be able to manipulate and work through these formulas to provide well-designed, properly sized plumbing systems.
Michael Danielson, CPD, GPD, has been with RWB Consulting Engineers since 1996 and is an associate principal and department head for plumbing and fire protection. He has also served as education chairman for the DFW ASPE Chapter since 2006. Danielson brings a wealth of experience in designing plumbing systems for aviation, healthcare, municipal and institutional settings.





