# Allowable and Percent Deviation

**Understanding Allowable and Percent Deviation**

**Understanding Allowable and Percent Deviation**

In the development of PIPE-FLO Professional, several calculations and warnings were added as new features. A couple of them, **Allowable Deviation **and** ****Percent Deviation** were added to help you evaluate the accuracy of the calculated results and make adjustments to the default **Calculation Settings **if necessary to increase accuracy or help the model to converge to a solution.

**Background**

The hydraulic performance of devices found in piping systems can be characterized using equations or curve data that defines the amount of pressure drop (or gain) across the device as a function of flow rate. For example, the dP across a centrifugal pump at a given flow rate is determined from the pump curve, a control valve's dP at a given flow rate can be calculated using the flow coefficient relationship, and the pressure drop due to head loss for pipes, valves, and fittings is calculated using the Darcy-Weisbach or Hazen-Williams equations based on the flow rate. Equations of dP vs. flow rate for orifice, nozzle, and venturi flow meters can be found in ASME standards.

PIPE-FLO iteratively solves a piping system network by adjusting mass flow rates throughout the system until the Conservation of Mass at each node and the Conservation of Energy around each loop are satisfied to within the convergence criteria established in the Calculations Settings. For each iterative "guess" for the flow rate, the differential pressure (dP) across each device can be calculated using the hydraulic performance equation or curve data. For some devices and operating modes, the dP is determined *not *from its hydraulic performance, but by what is needed to satisfy the Conservation of Energy.

Once PIPE-FLO converges to a mass flow rate solution, the dP for each device is also solved. The total pressure at every device’s inlet and outlet can then be calculated starting from a known pressure (e.g., user-entered total pressure values at a Pressure Boundary or Tank) and marching through the system, calculating total pressures at each connected node or device using the Bernoulli equation to satisfy the Conservation of Energy. Depending on how the model is configured, the calculated dP across the device may or may not be used to calculate either the inlet or outlet pressures. Since the convergence criteria is based on the entire network there may be some local deviation between the reported dP result for each device and the difference between the inlet and outlet pressure of the device.

Consider the simple system shown below with known total pressures at the system boundaries and two pipes connected to a device in the middle. The flow rate is not known, so PIPE-FLO's iterative network solution calculates the flow rate and the dP for each device (dP1, dP2, and dP3) based on that flow rate. The Bernoulli equation applied from Pressure Boundary (P1) to the device in the center establishes the inlet total pressure (P2), and the Bernoulli equation applied from Pressure Boundary (P4) to the device determines the total pressure at the device's outlet (P3). Notice that dP2 is not used to determine the inlet or outlet pressure at the device, so there may be some deviation between the dP calculated with the difference between P2 and P3, and the dP calculated using the flow rate and the device's dP relationship.

**Percent Deviation Calculation**

In PIPE-FLO Professional 12 and Flow of Fluids 12, **Percent Deviation **is only calculated for Pipes. In PIPE-FLO Professional, Percent Deviation is calculated for more devices such as Centrifugal Pumps (in Fixed Speed mode), Pressure Gain Devices, dP Devices, Control Valves (in manual position only), Balancing Orifices, and Orifice, Nozzle, and Venturi flow meters.

The Percent Deviation for a device is calculated by the following equation (also found in the Help File):

Percent\;Deviation = 100 \;x\; \left | \left (1.0 - \frac{dP}{\left ( P_{in} - P_{out} \right )} \right ) \right | |

where: dP is determined from the device's dP relationship or to satisfy the Conservation of Energy

Pin and Pout are determined from the network solution

Evaluating the equation, the more accurate the network solution, the closer dP will be to (Pin - Pout), so the ratio of dP/(Pin - Pout) will approach unity, and Percent Deviation will approach zero.

One other thing to note when evaluating the equation is that as (Pin - Pout) approaches zero, a small deviation (in magnitude) may result in a large percent deviation. In this case, the user evaluating the results may conclude that the high value of Percent Deviation is inconsequential.

The calculated Percent Deviation for each device can be seen in it’s Property Grid at the bottom of the calculated results section, as shown below for a Curve dP Device.

**Percent Deviation for Devices and Operating Modes**

Percent Deviation is not calculated for some devices and some operating modes because either:

- the
*Flow Rate vs. dP*relationship that defines the device's hydraulic performance cannot be defined for the device (e.g. Sizing Pump and Sizing Valve) - the
*Flow Rate vs. dP*relationship is not used to determine the dP across the device (Centrifugal Pump in VFD mode, Control Valve in FCV, BPV, or PRV mode)

In these cases, the inlet and outlet pressures are calculated using the dP across the device from the iterative network solution, so by definition the Percent Deviation is equal to zero.

**Allowable Deviation**

The **Allowable Deviation **is a new field added to the PIPE-FLO **Calculation Settings**. This user-entered value is compared to each device's calculated Percent Deviation to generate a new warning message (ID 170) if the device's Percent Deviation is greater than the Allowable Deviation.

The default value for Allowable Deviation is 1%, but can be adjusted as desired in the Calculation Settings of the FLO-Sheet’s Property Gird, as shown below:

**Causes of High Percent Deviation**

Because of the default values established in the Calculation Settings, in most scenarios the Percent Deviation for all devices will be well below the default Allowable Deviation of 1%. High percent deviation values may occur *even if the model converges *to a solution. This may occur in the following scenarios:

• The dP value is very close or equal to zero (see explanation above)

• The model contains pipes with a large difference between the lowest and highest calculated flow rates

• The model contains multiple unconnected systems with large differences in the calculated flow rates

**Solution for High Percent Deviation**

High Percent Deviation values may be reduced by decreasing the **%Tolerance** in the Calculation Settings (ex: from the default of 0.01% to 0.001%, 0.0001%, etc.) or increasing the Linear Switch Point in the Calculation Settings.

**Example System**

Consider the following model below of two unconnected systems with a %Tolerance of **10%**. It took **6** iterations to achieve the convergence criteria, but it resulted in a high Percent Deviation of **1.3%** at the Orifice Meter and throws the ID 170 message for Device Deviation > Allowable Deviation. The calculated flow rate is **670,264 lb/hr**. Orifice dP = 22.39 psi, but (Pin - Pout) = 55.84 - 33.74 = 22.1 psi, which is not equal to the displayed dP. Note the % Deviation for all the pipes and the Curve dP Device is on the order of 10E-09 and 10E-15.

As shown below, adjusting the %Tolerance to **1%** caused the network solution to iterate one more time (**7** iterations), resulting in the Percent Deviation at the Orifice Meter to drop to **8.756E-03%**, below the trigger for ID 170. Also note the calculated flow rate at **668,870 lb/hr**, a change of **1,394 lb/hr**, which can be taken as being a more accurate value of flow rate. The values of the inlet and outlet pressures of the orifice are also changed and can be shown to be more accurate as well.

The model below shows the results of adjusting the %Tolerance to **0.01%** (the default value). The network solution converged in **8** iterations, the orifice meter has an even lower Percent Deviation at **4.961E-05%**, and the calculated flow rate of **668,860 lb/hr** is only 10 lb/hr less than the 7 iteration solution. The change in the orifice inlet and outlet pressures is not reflected in the rounded display value on the FLO-Sheet.

**Conclusion**

The goal of Engineered Software in the development of PIPE-FLO Professional was to not only provide you with the most reliable calculated results possible based on sound industry standards, but to also provide you with tools to evaluate those results and make adjustments when needed. The new Percent Deviation calculations, combined with the user-entered Allowable Deviation and new warning message ID 170, allow you to adjust the Calculation Settings in PIPE-FLO Professional to achieve the desired level of accuracy you need for your calculated results.

The default values in the Calculation Settings were established so that you won't have to make adjustments for the vast majority of your models, but the addition of the new calculations, fields, and warnings provides you with the tools needed to do so if necessary.