You are on page 1of 15

Piping Systems FluidFlow Quality Assurance

<2008> <Flite Software NI Ltd>

Piping Systems FluidFlow Quality Assurance

Table of Contents
Part I Introduction

Part II The life cyle of Piping Systems


FluidFlow

1 Software Requirements
...................................................................................................................................
and Specification
4
2 Overall Design
...................................................................................................................................
and Architecture
5
3 Model Development
................................................................................................................................... 5
4 Algorithm ...................................................................................................................................
Development
6
5 Coding

................................................................................................................................... 7

6 Integration................................................................................................................................... 7
7 Integration...................................................................................................................................
Testing
7
8 Data

................................................................................................................................... 8

9 Installation
................................................................................................................................... 8
10 User Operation
................................................................................................................................... 8
11 Maintenance
................................................................................................................................... 9

Part III Calculation Methods and


Standards Used

1 Standards...................................................................................................................................
Used
9
2 Liquid Pressure
...................................................................................................................................
Loss Calculations
10
3 Gas Pressure
...................................................................................................................................
Loss Calculations
11
4 Non Newtonian
...................................................................................................................................
Fluid Pressure Loss Calculations
11
5 Settling Slurry
...................................................................................................................................
Pressure Loss Calculations
12
6 Two Phase
...................................................................................................................................
Pressure Loss Calculations
12
7 Physical ...................................................................................................................................
Property Estimation Methods
13

<2008> <Flite Software NI Ltd>

Introduction

Introduction
This document is an attempt to explain the procedures, processes and efforts made
by Flite Software NI Ltd, the developers of "Piping Systems FluidFlow", to minimise
the occurrence and impact of errors in the end user operation and functionality of our
software.
To be effective, a Software Quality Assurance policy needs to be an integral part of
the entire life cycle of our software application. In addition, our Quality Assurance
policy is continually evolving as we find more effective ways of developing and
validating our software. This document provides an overview of where we are today
and how the "Quality Assurance focus" is integrated into our business and life cycle
processes.
The life cycle of our product "Piping Systems FluidFlow" has many steps. Each step
has its own distinct validation requirements.
In this context validation is defined as establishing, by objective evidence, that all
software requirements have been implemented correctly and fully.
In addition to validating each process step the integrated product needs also to be
validated.
The remainder of this document is therefore split into 2 logical chapters:
1. A description of the individual steps in our product life cycle.
2. An overview of the main standards and methods used in our calculation
procedures.

The life cyle of Piping Systems FluidFlow


The life cycle steps that occur in the development and post-development of our
product are itemised below. The validation involved in each step is then described in
a separate sub section.

Development Steps:
Software Requirements and Specification
Overall Design and Architecture
Model Development
Algorithm Development
Coding
Integration

Post Development Steps:

<2008> <Flite Software NI Ltd>

Piping Systems FluidFlow Quality Assurance


Integration Testing
Data
Installation
User Operation
Maintenance

2.1

Software Requirements and Specification


The main purpose of this software is to enable engineers to make designs of flow
systems that are:

Practical
Safe
Efficient
Reliable

To achieve the above end user design goals, the software must be easy to use,
comprehensive, robust, and of validated high quality using the latest, appropriate,
calculation techniques and prediction methods.
Our product does not stop there, it is also important that the engineer can
communicate their designs for peer review and directly to customers.
This document does not discuss further, design and specification of the user interface,
or other functional input/output specifications but focuses on the main engineering
specifications.
The product is designed to calculate phase state, pressures, pressure losses,
temperatures and flows for any fluid(s) flowing in a piping system. The system must
be at steady state conditions.
Phase states handled by the software can be liquid, gas, non-Newtonian, solid-liquid
two phase slurries or liquid-gas two phase. There are many calculation methods,
available in the literature that can be used for the prediction of energy losses in
flowing systems and for the prediction of physical and transport properties that are
needed to support these calculations.
Unfortunately there are no agreed universal standards for the method to be used in
each specific case. Where internationally recognised design and calculation standards
or methods exist FluidFlow uses the appropriate standard. Standards and calculation
methods used are detailed in Standards chapter.
Where standards do not exist regarding a calculation method or physical property
prediction FluidFlow always offers alternative methods to the end user.
It is the responsibility of the engineer/end user to exercise due care and diligence by
selecting an appropriate method and to interpret the results with knowledge of the
simulation limitations.

<2008> <Flite Software NI Ltd>

The life cyle of Piping Systems FluidFlow

It is recommended that all results should be subject to a proper engineering review


and judgement by the end user.
Our validation procedures are designed to ensure each calculation method does not
fail under extreme conditions.

2.2

Overall Design and Architecture


One of the main goals of our software architecture is to encapsulate each of the many
hundreds of "building blocks" used by the application.
In this context encapsulation means the ability to group code together to provide a
service or functionality accessible through a well designed interface. Encapsulation
hides the internal workings of each building block and streamlines code testing.
By designing and validating in this way it allows us to define quality as a system
requirement. It provides a higher degree of reliability and provides opportunities for
code reuse.
Take for example the request for a thermo physical property, say density, which is
commonly used by all of the calculation methods. The density of a fluid is a function
of phase state, pressure and temperature. At the most abstract level (i.e., the actual
implementation of the encapsulated building blocks/objects is more detailed than
described here.) all we need do is to make a call to a building block passing to the
interface the phase state, pressure and temperature and the object passes back the
density, and maybe an status/error condition. Once the building block has been
written and validated it can be used without worry.
Of course, the detail is more complex and we must also consider data flows,
efficiency, what to do if an error is generated etc.
Designing in this way also makes the code more adaptable to changing technology
and business needs.
Encapsulation is critical to building large complex software that can be maintained
and extended. Many studies have shown that as new features and functionality are
added the risk of "breaking existing parts of the software" is minimised by having a
well designed encapsulated product.

2.3

Model Development
Our software uses many mathematical models to simulate physical phenomena.
These models rely on established laws of physics or on empirical relationships. Often
the models are only approximate in nature or have a limited validity range.
Validation of these models includes dynamic, static and formal techniques.
Dynamic techniques demonstrate the software's behaviour in response to selected
inputs and conditions. We use prototyping to verify the hardware response to

<2008> <Flite Software NI Ltd>

Piping Systems FluidFlow Quality Assurance


software events and commands. Dynamic and static testing demonstrates compliance
with the engineering and functional specifications. Each test case has a
predetermined, expected, explicit and measurable output result.
As an example, consider the pressure loss through a pipe bend. The total pressure
loss across a bend is a function of bend geometry, the empirical relationship used, the
volumetric flowrate of the fluid, the constructional material of the bend (roughness of
the inside wall), the fluid physical properties of density, viscosity and phase state.
Testing just one of these variables, say bend geometry, means comparing calculated
results with research papers, textbook examples and hand calculated values for bends
of different angles, R/D ratios, circular, annular and rectangular cross sections and
establishing that the pressure loss calculation returns expected results in each case.
Testing in this way also enables us to define limitations to accuracy which are then
used as warnings within the software. Without this detailed validation it is impossible
to specify the limits of accuracy, because they are often unavailable from literature
sources.
Sometimes textbook examples are incorrect and an element of engineering
judgement is necessary to be able to identify this.

2.4

Algorithm Development
An algorithm is a logical procedure for solving a models mathematical equations. It
takes input data and transforms it into output predicted by the model. We use logic
and data flow diagrams to illustrate and define the logical sequence of events.
Algorithms serve as a bridge between the model and the code, where the program
code follows the sequence of activities required by the algorithm. Over the last 20
years we have established well tested, efficient and tried algorithms for commonly
needed tasks.
Where possible these algorithms have been encapsulated. An example of a common
task when solving mathematical models is the need for a solution to an explicit
equation.
Explicit equations cannot be solved directly but require an iterative solution.
Specifically, we might consider the calculation of friction factor via the ColebrookWhite equation. By using an encapsulated, validated, generic algorithm such as
Newton-Raphson, Successive Approximation or Secant we eliminate the need to write
specific code for the solution of the Colebrook-White equation.
Algorithm analysis is carried out to ensure that the criteria of accuracy, timing,
stability and size requirements are met.
Consistency checks are made where appropriate. For example, consider the adiabatic
flow of a compressible fluid in a pipe. To be consistent we should be able to take any
of the Fanno flow property relationships and ensure that these conditions are
consistent from low flows right up to the speed of sound.

<2008> <Flite Software NI Ltd>

The life cyle of Piping Systems FluidFlow

2.5

Coding
Coding is the language used to communicate the algorithm to the computer. A
compiler converts this code to an executable file. Our application produces one
executable file without the need for associated DLL's. This streamlines our
maintenance and updates procedure.
Where possible we purchase "best of breed" toolkits, this avoids wasting time "reinventing the wheel" and ensures an up to date look and feel to the software.
The compiler and integrated development environment we use provides excellent
debugging features which helps to validate new code and also speeds up the bug
finding and elimination process.
We operate a coding style using strict internal guidelines. This means that code
written by one programmer is always consistent in its layout, structure and well
commented. This allows for easier cross checking, helps cross-fertilise ideas and can
be quickly understood by all team members.

2.6

Integration
Our software is developed by a closely knit, experienced team of engineers and
computer scientists. This means that the many building blocks in our software are
often written by different team members. Integration is the meshing of the individual
contributions into one coherent system. The use of a consistent coding style,
documentation and our software architecture reduces potential problems in this area.
To facilitate easier development and integration all team members have access to
design documents, model descriptions, algorithm descriptions, engineering
specifications and requirements, functional specifications, control flow diagrams, data
flow diagrams, source code and database files.

2.7

Integration Testing
Once the application is integrated/assembled into a complete product, there is a need
for a formal Quality Assurance testing procedure.
Before each release we undertake a formal testing procedure. Currently this testing
procedure takes about 20 man days of effort. As well as testing all aspects of the user
interface we have over 300 validation calculations.
The validation calculations are issued with each release of the software and can be
found at the following locations:
[The
[The
[The
[The
[The

folder
folder
folder
folder
folder

where
where
where
where
where

FluidFlow
FluidFlow
FluidFlow
FluidFlow
FluidFlow

is
is
is
is
is

Installed]\QA
Installed]\QA
Installed]\QA
Installed]\QA
Installed]\QA

Incompressible Flow
Compressible Flow
Non Newtonian Flow
Two Phase Flow
Scripting

Each time a user reports a bug, we add a validation example to our QA testing files so
that the likelihood of a re-occurrence is drastically reduced.

<2008> <Flite Software NI Ltd>

Piping Systems FluidFlow Quality Assurance

Validation examples are designed to test each calculation method used for
consistency, accuracy, repeatability. The Quality Assurance examples are also a
useful source of explaining the capabilities of the software for a new user.

2.8

Data
The calculation methods used within the application often rely on some type of
supporting data.
Typically this data may be used to describe physical properties, transport properties,
to describe pressure loss against flow relationships or to support heat transfer and
energy balance methods.
The results delivered by Piping Systems FluidFlow are dependant upon the accuracy
and relevance of input data.
Data contained in the support databases that are delivered with the application is not
all sourced, entered and validated by Flite Software NI Ltd. This is because the
databases contain data entered by our end users. In this regard we act as a clearing
house to merge data from a wide variety of users.
End users are recommended to validate all input and database data used in their
calculations.

2.9

Installation
Flite Software has made a special effort to simplify the installation process. We have
thousands of installations worldwide on a variety of operating systems.
We have code embedded in the application that checks that an installation has been
successful.
The application code is compiled into one executable file and we do not make any
changes or additions to the windows registry. For users operating in locked down
environments we supply an installation 'footprint' as an alternative.
The software has also been fully tested for use within Terminal Services, Citrix, and
Novell environments.

2.10

User Operation
All users are actively encouraged to feedback their experiences with our software.
Users can provide feedback via our website www.fluidflowinfo.com or directly via the
application.
All code within the application is routed through exception handling constructs. This
means that if the software fails in any way, it writes to a log file providing the date,
time, reason and type of each failure together with resource and status information

<2008> <Flite Software NI Ltd>

The life cyle of Piping Systems FluidFlow

about the hardware where the failure occurred. This log file is called psff.elf and is
written to the same folder that holds the single application executable file psff.exe.

2.11

Maintenance
Software maintenance is the main mechanism for making improvements, corrections
and adaptations to the application.
Corrective maintenance resolves errors found during the operation of the software.
Each time a bug is reported to Flite Software NI Ltd, we verify that the bug exists and
then enter the details into our "tracking and resolution" system. We issue regular
maintenance releases.
The release numbering convention used by this product has the format [Major
Version].[Minor Version].[Build Number]. So for example if the current release is
3.11.5 the next release will be either 3.11.6 or 3.12.0. The deciding factor on the
number of the next release depends on the severity of any bugs found also on the
enhancements and improvements made.
Perfective maintenance is carried out to improve the application performance or to
add or improve other program attributes. Only enhancements or new features cause
the minor version number to change.
It is the users' responsibility to keep the software current via our website. We have a
Software Assurance Policy that enables continued access to the downloads area of our
website:
http://www.fluidflowinfo.com/Downloads/Downloads.asp

Calculation Methods and Standards Used


FluidFlow uses hundreds of engineering models and it is not the intention to list all
possible models here.
The models highlighted in this chapter represent the main models used by the
application together with the references where appropriate.

3.1

Standards Used
There are very few standards available for use when making fluid flow calculations.
Piping Systems FluidFlow makes use of the latest standards and guides where
possible.
For calculating pressure losses across control valves for liquid and gas flow the
software uses the following guide: ANSI/ISA-75,01.01-2002 - Flow Equations for
Sizing Control Valves.
For predicting all physical properties of water we use the IFC-97 formulations

<2008> <Flite Software NI Ltd>

10

Piping Systems FluidFlow Quality Assurance


developed by the International Association for the Properties of Water and Steam.
For calculation of liquid or gas flow pressure losses across orifice plates we use the
publication from the International Organisation for Standardisation - ISO
5167-1:2003 Part 1. Measurement of fluid flow by means of pressure differential
devices inserted in circular cross-section conduits running full.
For calculation of liquid or gas pressure losses through nozzles we use ISO
5167-1:2003 Part 3.

3.2

Liquid Pressure Loss Calculations


For calculating liquid friction losses in a physical pipe of any material, we use the
Darcy Weisbach equation and the Haaland formula for calculating friction factor. (
Haaland, SE (1983). "Simple and Explicit Formulas for the Friction Factor in Turbulent
Flow". Trans. ASIVIE, J. of Fluids Engineering 103: 8990.)
It is possible to configure the software to use the Hazen-Williams method for
predicting friction loss, this may be useful for designing fire protection and irrigation
systems. It is not recommended that users use this method for substances other than
water. Overall fire sprinkler system design guidelines, are provided by the National
Fire Protection Association (NFPA) 13, (NFPA) 13D, and (NFPA) 13R.
Pressure losses through sprinklers can use the K method or the user can enter data
directly from a specific manufacturer.
For the calculation of pressure losses through bends, tee and cross junction the user
can select from one of 4 available relationships:
Using relationships and data found in the Handbook of Hydraulic Resistance - 3rd
Ed - I.E. Idelchik.
Using relationships and data found in Internal Flow Systems - 2nd Ed - D.S. Miller
Using relationships and data found in Flow of Fluids through Valves Fittings and
Pipe - Crane Technical Paper 410
Using relationships and data found in AIR1168/1 - Thermodynamics of
Incompressible and Compressible Fluid Flow
Performance data for centrifugal pumps, positive displacement pumps are usually
taken from manufacturers data. We have developed utility software that can read and
convert data directly from manufacturers catalogues.
Pressure Losses through valves can be calculated from generic relationships found in
the Miller and Idelchik references above. Additionally the software can use
relationships based on Cv or Kv values which the user can enter.
Pressure losses through check valves use the K method.

<2008> <Flite Software NI Ltd>

Calculation Methods and Standards Used

3.3

11

Gas Pressure Loss Calculations


For accurately calculating pressure losses in gas pipes there is no simple formula, as
is the case for liquids. This is because the specific fluid physical properties of density,
temperature and enthalpy do not remain constant over the pipe length.
The FluidFlow gas calculation routines are rigorous calculations which allow for the
increase in kinetic energy and changing physical properties that occur as gas
accelerates with pressure loss. The calculations allow for the changing non-ideal
behaviour of the gas as it flows by using an equation of state to describe the changes
in gas physical properties.
There are three equations of state (EOS) available within the software (Benedict
Webb Rubin with Hans Starling modifications; Lee Kesler and Peng Robinson), it is
possible to select the most appropriate EOS for each physical property. Using the EOS
the gas thermophysical properties such as enthalpy and density are calculated as the
gas accelerates. An analytical solution to the EOS, energy and momentum equations
is not possible and FluidFlow solves these equations numerically. FluidFlow make no
assumptions of gas ideality or adiabatic flowing conditions.
Our algorithm dynamically splits the pipe into segments based on an incremental
density change. For each segment, upstream conditions of flow, static pressure, static
density and static enthalpy are known and these are used to calculate downstream
static temperature and density. From these values it is possible to backsolve the EOS
to obtain downstream static pressure. The energy equation and momentum equations
can now be solved for each segment. The method is a development of a paper
originally published in The Chemical Engineer - Relief Line Sizing for Gases Part1 and
2. Dec 1979 - HA Duxbury.
For pressure loss calculations across other fluid equipment items refer to the liquids
section.

3.4

Non Newtonian Fluid Pressure Loss Calculations


Piping Systems FluidFlow provides the user with the option of selecting one of 4
possible calculation methods for determining pressure loss for Non-Newtonian fluids
flowing within a pipe system.
The available calculation methods are based on the relationships used to describe the
fluid rheology data. It is recommended that the user obtains fluid rheology data prior
to making a Non-Newtonian calculation. The available rheology models are:
Power Law with the friction factors calculated according to the relationships
provided by Ron Darby - Chemical Engineering Fluid Mechanics
Bingham Plastic with friction factors calculated according to the relationships
provided in Darby together with the solution of Buckingham Reiner equation
Hershel-Bulkley with friction factors calculated according to the method of Dodge
and Metzner
Casson with friction factors calculated according to the method of Wilson Thomas

<2008> <Flite Software NI Ltd>

12

Piping Systems FluidFlow Quality Assurance

For calculation of pressure losses across other fluid equipment items the K factor
method is used. K factors are adjusted at low Reynolds numbers as recommended by
Steffe - Non-Newtonian Flows in the Food Industry

3.5

Settling Slurry Pressure Loss Calculations


Piping Systems FluidFlow provides the user with the option of selecting one of 3
possible calculation methods for determining pressure loss for the flow of settling
slurries through a piping system. For settling slurries, i.e., a carrier fluid conveying
solid particles, the calculation is considerably more complicated than a liquid
calculation, due to the wide range of variables involved, viz particle size and size
distribution, solids density and shape, percent solids, mixture velocity etc.
The accepted approach is to determine the solids effect, the extra friction loss
caused by the solids content over that for an equivalent flow of the carrier fluid alone.
The carrier fluid may be clean water if the solids are relatively coarse with no fraction
below about 0.4mm but solids smaller than 0.4mm can be held in suspension and
create a homogeneous carrier fluid, the friction characteristics of which needs to be
determined.
A number of inter-related factors influence the excess pressure drop in a pipeline over
the pressure loss for water alone (or the carrier fluid if a fine particle fraction exists).
The two main factors are the solids characteristics and the velocity of flow of the
mixture but pipe inclination is also important.
The design method is highly empirical. Slurry Transport Using Centrifugal Pumps,
by KC Wilson, GR Addie, A Sellgren and R Clift provides the best reference with a
synthesis of the authors many papers together with Introduction to Practical Fluid
Flow by R.P. King providing some useful additions.
These two references, and a considerable amount of literature research, provided the
basis for the development of the FluidFlow3 Slurry simulator.
FluidFlow simulates heterogeneous settling slurries according to three correlations:
Durand-Condolios-Worster
Wilson-Addie-Sellgren-Clift
WASP

3.6

Two Phase Pressure Loss Calculations


When two-phase liquid gas flow occurs in pipes, many different flow patterns are
created, depending on fluid properties, the relative rates of each fluid and the pipe
inclination. There are large differences in flow behavior between horizontal, inclined
and vertical pipe flow. The pressure gradient (pressure loss per unit length) is flow
pattern dependant. For a rigorous estimation of two-phase pressure drop we also
need to split the pipe into segmental lengths, similar to the approach used in gas pipe
calculations.

<2008> <Flite Software NI Ltd>

Calculation Methods and Standards Used

13

Our pressure loss algorithm dynamically splits the pipe into segments based on an
incremental pressure change. The user can select from any one of 7 available models:
Whalley Criteria (uses Friedel, Chisholm or Lockhart Martinelli, selection of method
is made by FluidFlow according to the criteria of Whalley)
Drift Flux Model (2007 correlations)
Beggs and Brill (Extended Regions)
Friedel
Muller Steinhagen Heck
Chisolm Baroczy
Lockhart Martinelli

3.7

Physical Property Estimation Methods


Piping Systems FluidFlow can use any of the following thermophysical properties
during flow calculations. Density, Specific Heat, Thermal Conductivity, Viscosity, Heat
of Vaporisation, Enthalpy, Melting Point, Vapour Pressure and Surface Tension.
The physical properties are often complex functions of pressure, temperature and
phase state. Data needed to evaluate these properties at phase states, pressures and
temperatures in the physical world are stored in a physical property database that
contains over 900 fluids.
The user can select any one of the following estimation methods:
For Liquid Density Prediction:
A single fixed Value
Yamada Gunn method with a reference density
Spencer Danner method
Yamada Gunn method without a reference density
Interpolation from a table of values
Peng Robinson Equation of State
Benedict Webb Rubin Equation of State
Lee Kesler law of Corresponding States
For Liquid Specific Heat Capacity Prediction:
A single fixed Value
A polynomial approximation
Bondi estimation method
Lee Kesler
Interpolation from a table of values
For Liquid Specific Heat Capacity Prediction:
A single fixed Value
A polynomial approximation
Latini estimation method
Sato Riedel estimation method
A log power law approximation method
Interpolation from a table of values

<2008> <Flite Software NI Ltd>

14

Piping Systems FluidFlow Quality Assurance

For Liquid Viscosity Prediction:


A single fixed Value
A log polynomial approximation
A natural log series
Interpolation from a table of values
Andrade method
Przezdziecki estimation method
For Vapour Pressure Prediction:
A log polynomial approximation
Interpolation from a table of values
Wagner estimation
Antoine estimation
For Gas Density Prediction:
Peng Robinson Equation of State
Benedict Webb Rubin Equation of State
Lee Kesler law of Corresponding States
For Gas Specific Heat Capacity Prediction:
a polynomial based on ideal gas constants
Lee Kesler law of Corresponding States
For Gas Thermal Conductivity Prediction:
A polynomial approximation
Chung estimation method
Interpolation from a table of values
For Gas Viscosity Prediction:
A polynomial approximation
Chung estimation method
Interpolation from a table of values
Lucas corresponding states estimation
For Heat of Vaporisation Prediction:
A single fixed Value which is adjusted by the software as a function of temperature
An estimation method based on critical properties
For Liquid Surface Tension Prediction:
A linear approximation
An estimation method based on critical properties

<2008> <Flite Software NI Ltd>

You might also like