FAIL-SAFE TRANSFER LINE FOR
                   HAZARDOUS FLUIDS
           A.  J. Houghton and J.  A.  Simmons
              Science Applications,  Inc.
                1710 Goodridge Drive
               McLean, Virginia  22102
              Contract No. 68-03-2039
                  John E. Brugger
        Oil & Hazardous Materials Spill Branch
Municipal Environmental Research Laboratory - Cincinnati
                Edison, New Jersey  08837
      Municipal Environmental Research Laboratory
          Office of Research and Development
         U.S. Environmental Protection Agency
                Cincinnati, Ohio  45268

-------
Page Intentionally Blank

-------
                                  DISCLAIMER


     This report has been reviewed by the Municipal Environmental Research
Laboratory - Cincinnati, U.S. Environmental Protection Agency, and approved
for publication.  Approval does not signify that the contents necessarily re-
flect the views and policies of the U..S. Environmental Protection Agency, nor
does mention of trade names or commercial products constitute endorsement or
recommendation for use.
                                      n

-------
                                  FOREWORD

     The U.S.  Environmental  Protection Agency was  created  because  of
increasing public and government concern  about the dangers  of pollution
to the health  and welfare of the American people.   Noxious  air,  foul water,
and spoiled land are tragic testimonies to the deterioration  of  our natural
environment.   The complexity of that environment and the interplay of  its
components require a concentrated and Integrated attack on  the problem.

     Research  and development is that necessary first step  in problem  solu-
tion; it involves defining the problem, measuring  its impact, and  searching
for solutions.  The Municipal Environmental  Research Laboratory  develops
new and improved technology and systems to prevent, treat,  and manage  waste-
water and solid and hazardous waste pollutant discharges from municipal and
community sources, to preserve and treat public drinking water supplies, and
to minimize the adverse economic, social, health,  and aesthetic  effects of
pollution.  This publication is one of the products of that research and
provides a most vital communications link between  the researcher and the user
community.

     This report describes the design, development, and use-demonstration of
a fail-safe transfer line for the transfer of hazardous fluids between
storage facilities and railroad cars or tank trucks.   Installation of  the
system and its trial use were performed by the management  and operating per-
sonnel of the  Goodyear Synthetic Rubber Plant, Houston, Texas.   This report
may be of interest to manufacturers, shippers and  users of liquid  chemicals
which are either hazardous materials or potential  pollutants.  Additional
information may be obtained by contacting the Oil  and Hazardous  Materials
Branch, MERL-Ci, U.S. Environmental Protection Agency, Edison, NJ   08837.

                                       Francis T.  Mayo, Director
                                       Municipal Environmental Research
                                       Laboratory
                                       Cincinnati, OH 45268
                                     111

-------
                                   ABSTRACT


     The design principles, development, laboratory testing and fabrication
of a fail-safe transfer line for hazardous liquids are described.   The system
is a 2-inch ID flexible line for offloading tank cars or trucks.  It detects
leaks by monitoring flow inventory with turbine-type flow meters at the inlet
and outlet ends.   Reliable shutdown of the line at leak rates as low as 1% of
flow is achieved.   The line is also automatically shut down if electrical  pow-
er or valve actuator pressure is lost or if any sensor or control  cable is
severed.  The system implemented was designed for use in a Class I, Division I,
Group C or D environment.   Use-demonstration tests at a chemical plant were
satisfactory except for occasional fouling of the flow meters with material
which solidified in the transfer hose between operations.  It is recommended
for use only for material  which remains in a liquid state under all normal
conditions.
                                     iv

-------
                             CONTENTS

Foreword 	iii
Abstract	1v
Figures	vi

     1.  Introduction	1
     2.  Summary	3
     3.  Conclusions and Recommendations	5
     4.  Design, Development & Use-Demonstration	7
              Analysis and Design (	7
              Assembly and Development	9
              Operating Performances	16
     5.  Use-Demonstration Tests 	  19
References	21
Appendix A	.  .  22

-------
                                 FIGURES
Number                                                                 . Rage
   1    Basic concept of fail-safe transfer line 	 8
   2    Inlet assembly	10
   3    Distribution of flow imbalance indications,
        0 and 1.5% leak rates	12
   4    Probability that flow will continue for n frames
        after introduction of leak	14
   5    Fail-safe transfer line control  module block  diagram	15
   6    Approximate distribution of leak and no leak  indications
        with a frame size of 1024	18
 A-l    Simplified logic diagram, meter board	23
 A-2    Simplified logic diagram, control  circuit board	25
 A-3    Pilot valve current sensor	28
                                    'VI

-------
                                  SECTION 1

                                 INTRODUCTION
OBJECTIVE
     The objective of the project described in this report was to develop a
fail-safe transfer line for hazardous liquids.  The principal requirement was
the reliable, automatic shut down of a transfer line in response to a leak
well below the magnitude that could be controlled by an excess flow valve
(rising ball type).  Additional requirements included shut down of both ends
of a leaking or severed line to prevent back-siphoning, shut down of the line
if any of the conditions necessary for its reliable operation (e.g., electri-
cal power, air pressure) were not satisfied, a means to verify operability at
time of use, and the ability to handle any type of hazardous liquid.  The en-
tire system was to be constructed of off-the-shelf components of standard in-
dustrial quality.

     The application addressed was the loading and unloading of railroad
tank cars and tank trucks.

SCOPE

     The project encompassed four areas of effort:

          a.  Systems Design  This task involved the analysis of alternative
methods for sensing leaks and the design of all components for the transfer
line.  The governing criteria were reliability, cost, and compatibility with
the hazardous materials to be handled in the "Use-Demonstration Tests".

          b.  Assembly and Development Tests  This task included the acquisi-
tion of all components, construction of the line, and testing of the line in
a controlled environment using water as the liquid.  During the development
phase, the design was optimized to achieve the best practical capability for
detection of small leaks.

          c.  Use-Demonstration Tests  In this task, the line was used in an
industrial environment, at the Goodyear synthetic rubber plant in Houston,
Texas, to offload railroad tank cars of "TAMOL-L", an aqueous solution of the
sodium salt of a napthalene-sulfonic acid.

          d.  Analysis and Reports  The scope of the task is reflected in this
report.

-------
NEED

     Application of this transfer line or its principle to all  loading and
offloadings of hazardous and polluting liquids could result in  a significant
reduction in the number of spills.  According to a recent study of reported
spills of hazardous materials in the United States during the period of Jan-
uary 1, 1971 to June 30, 1973, the failure of a hose or transfer line resulted
in 92 spills or 7% of the total  of all spills reported (1).  Similarly, an
analysis of spills of bulk liquids at United States marine terminals during
1974 and the first 8 months of 1975, revealed that 7.5% of all  spills (108
out of 1441) during cargo transfer operations resulted from the failure of
the hose or pipeline (2).  These data, when combined with the frequency of
loading and offloading operations, indicate that one spill results from a hose
or pipe failure in every 1,000 transfers.  For all causes of spills at marine
terminals during loading and offloading bulk liquid cargos, the spillage rate
is approximately 12 per 1,000 operations (3).

-------
                                  SECTION 2

                                   SUMMARY
     The requirements for the transfer system included the reliable detection
of small leaks, well below the levels controllable by rising-ball-type check
valves, and automatic shut-down of the transfer line on detection of leak.   An
inventory balance approach to leak detections was used by comparing flow-rate
into and out of the line.  Analysis and experimentation eliminated thermistors
and thermal probes as suitable flow sensors, and the system was implemented
using turbine type flow meters.

     A digital circuit monitors the indications from the two flow meters.
Two parameters, selectable by the system user but not accessible to the oper-
ator, permit adjustment of the system to balance probability of small leak
detections vs. false alarm rate.  The first parameter is a possible leak
threshold and the second a shutdown decision point.  Whenever the flow imbal-
ance exceeds the present threshold valve, a leak condition is logged.  When-
ever the number of successive leak indications (with no more than one inter-
vening "normal" indication) exceeds the shutdown decision point, the circuit
causes closure of air actuated valves at both ends of the line.

     Leaks as small as 1% of flow are reliably detected.  Smaller leaks are
also reliably detectable, but at risk of false alarms.

     The relatively elaborate treatment of flow imbalance measurement was
necessary to permit detection of small leaks in the presence of naturally
occurring flow variations (hose elasticity, gas bubbles, etc.).

     The system fabricated was a 50-ft, 2-in ID hose with stainless steel
inlet and outlet assemblies.  Air actuated valves were selected for their
light weight and reliability.  Air reservoirs were incorporated at each end
to ensure shutdown should line pressure be lost.

     The system was tested at the Goodyear synthetic rubber plant at Houston,
Texas.  It was used to offload railroad tank cars containing TAMOL-L, an
aqueous solution of the sodium salts of napthalene-sulfonic acid.  The tests
were mainly successful.  However, between transfer operations, the fluid
would coagulate in a semi-solid mass upon prolonged exposure to the atmos-
phere, and the inside of the line would become coated with this material.
Upon the next use of the hose, the solidified material would gradually slough-
off and would frequently foul the flow meter at the outlet end for periods
long enough to initiate shutdown.  Twenty minutes of flow were required to

-------
clear the line of this condition on one occasion.   On another occasion,  a
flow meter became clogged with a solid mass of material  and had to be dis-
assembled and cleaned.

     However, the system functioned as designed when the line was  "clear",
and in its connections and use did not impose any  significant problems upon
the normal operations at the Goodyear plant.

-------
                                  SECTION 3

                       CONCLUSIONS AND RECOMMENDATIONS


     The detection of small leaks, on the order of 1% of flow rate, in a li-
quid transfer line between storage facilities and tank cars or tank trucks is
feasible using a flow balance comparison system constructed of commonly avail-
able components.  Rapid, automatic closure of both ends of the line upon de-
tection of a leak is simple to accomplish.

     Naturally occurring variations in volumetric flow, presumably caused by
admingled compressible gases, flow cavitation and the elasticity of the trans-
fer line, preclude the reliable detection of small leaks, within the toler-
ance of the flow sensors, on a single event basis.

     A fail-safe system for the automatic shut-down of a transfer line in
response to a small leak is relatively cumbersome when built with standard
discrete components.  A significant portion of the size and weight results
from the need for pipe-unions, nipples, couplers, junction boxes and other
items needed to integrate the components. Re-engineering  is  recommended.

     A fail-safe transfer system which embodies the features of the system
described in this report, is applicable to nearly any transfer line or con-
duit handling non-compressible fluids with a viscosity and flow rate within
the operating range of available turbine flow meters.  The size of the line
and the materials used may be varied to suit different flow rates and fluids.
Hazardous materials in Class 1, Division 1, groups A and B (4) impose a re-
quirement for different types of valve actuators since electrically-operated
pilot valves for these categories of materials are not commercially available.

     Reliable detection of leaks by flow comparison is not feasible with
thermal probe flow sensors in fluids which contain even microscopic undissolv-
ed solids.  These tend to foul the sensors.

     Fluids, which leave a solid or semi-solid residue upon evaporation of the
vehicle or volatile liquid, require that the transfer line be flushed after
each use.  Storage of the line with the ends sealed also might be satisfactory.

     The size, weight, and cost of a system comparable to the one described
in this report, can be significantly reduced by the development of inlet and
outlet modules which have integral valves, activators, pilot valves, flow
meters, junction boxes, etc., and the development and certification of an
intrinsically safe control module.  The foregoing developments are not econo-
mically practical for systems manufactured in small quantities.

-------
     It is recommended that a fail-safe transfer system,  functionally similar
to that described in this report, be considered for use in the transfer of
particularly hazardous materials between storage facilities and tank cars and
tank trucks.

-------
                                  SECTION 4

                   DESIGN, DEVELOPMENT & USE-DEMONSTRATION


ANALYSIS AND DESIGN

     The analysis and design task involved two principal activities.  The
first was the selection of the components, materials and techniques to be
used in the system, and the second was the detailed design for the assembly
of these components under Task 2.  Experience gained during the assembly and
development phase led to a number of design changes and refinements which did
not alter the basic concept.  Those changes and refinements are described in
subsequent paragraphs.

     The basic concept is illustrated in Figure 1.  A flexible transfer line
is equipped with essentially identical inlet and outlet assemblies.  Each
assembly contains a fast acting, remotely operated valve and a device to mea-
sure fluid flow.  A control module compares the flow measurements at each end.
Upon detection of a flow imbalance, the control module automatically causes
the valves at each end to close.  In addition to flow comparison, the system
incorporates other fail-safe features:

     1.  Automatic valve closure if any of the conditions necessary for safe
operation are not satisfied (e.g., valve operating air pressure or electrical
power),

     2.  A means for verification of proper operation at any time during a
transfer operation.

Selection of Components, Materials and Techniques

     The criteria for selection were reliability, compatibility with the ma-
terial to be handled, off-the-shelf availability, cost, and for the portable
parts of the system, weight.  As originally planned, the material to be hand-
led during the use-demonstration phase was an-i'Mne.  This, in turn, required
that the electrical portions meet the National Electrical Code explosion-proof
standards for Class 1, Division 1, Group D materials.

     The selection of valves and actuators quickly converged upon pneumatical-
ly operated stainless steel valves.  Gate and globe valves require motor dri-
ven actuators, resulting in a relatively slow acting actuator-valve combina-
tion that is heavier, and more expensive than the ball valve-pneumatic actua-
tor combination.  Solenoid actuators were available for the ball valves but
were too heavy (over 60 Ibs) for portable use.  Brass is incompatible with

-------
                                             AIR SUPPLY
oo
          J_         .


            EDUCTION VALVE
                 SUPPLY VESSEL
                                          FLOW COMPITOR AND
                                             VALVE LOGIC
                                                                VENT
RECEIVING VESSEL
           FS  Flow Sensor
           SV  Solenoid Valve
           AO  Air Operated Valve
           NOTE:  All valves are shown in the de-energized position.
                        Figure 1.  Basic concept of fail-safe transfer line.

-------
antline and rel tabfl tty considerations weighed against the use of aluminum.
The pilot valve required for remote operation of the pneumatic actuator weigh-
ed less than one pound and was available in a compatible explosion-proof con-
figuration.

     Stainless steel was selected for the pipe fittings because of its super-
ior reliability.  Further, since no margin for corrosion was needed, lighter
weight pipe could be used.

     The dominant criterion for the hose was reliability.  A "rubber" impreg-
nated steel-reinforced steam hose was selected.   This was essentially identical
to the hoses used at the use-demonstration site for offloading aniline.

     The flow measurement sensors were, in order of increasing cost, thermis-
tors, thermal probes, turbine flow meters and venturi tubes with differential
pressure gauges.  Analysis indicated that any available thermistor with an
envelope compatible with aniline would have too slow a time constant to meet
the leak detection objective.  Thermal probes appeared to meet all criteria
and were initially selected for the development phase.  They subsequently
proved unsuitable for reasons discussed below, and turbine flow meters were
selected for their replacement.

     The thermal probe has a small (1 cm OD x 2 cm) platinum sensor that faces
the flow.  The electrical resistance of the platinum varies with its tempera-
ture.  The sensor Is heated to a temperature on the order of 50 ° to 8iP C by
an electrical current.  The flow cools the sensor and the flow rate can be
determined by measurement of the voltage required to maintain a constant cur-
rent through the sensing element, or by measuring the current required to
maintain a constant voltage drop.  Circuits were designed for both the con-
stant voltage and constant currents modes, and to convert the differences into
digital signals which would be used to activate the shutdown mechanism.

     The control module was designed with integrated circuits throughout for
reliability and small size.  Transistor-Transistor Logic (TTL) was selected
because of its reliability.

Assembly and Development--

     The major hardware items were assembled and set up in a laboratory shop.
A 200-gallon tank and a 2-horsepower pump were used to provide a flow through
the system.  A reducing tee with a needle valve and ball valve in series was
inserted between the flow meters to permit the introduction of controlled
leak rates.  The electronics were "breadboarded" for easy access to test
points, and special circuits for diagnostics and data acquisition were fabri-
cated.  Figure 2 shows the inlet assembly.  The outlet assembly is identical
except that the strainer is omitted.

     The initial development tests showed the thermal probes to be unsuitable
for the environment.  In a perfectly clear fluid, they are very accurate.
However, in a "dirty" fluid, small particles of solid matter adhered to the
quartz coating on the sensing element and alter the heat transfer character-
istics.  Even particles too small to be seen with the naked eye caused 10 to

-------
                                   PNEUMATIC VALVE
                                   ACTUATOR
                                   JAMESBURY ST-50E
EXPLOSION PROOF
PILOT VALVE
ASCO 8345-11
            500 cc STAINLESS
            STEEL AIR RESERVOIR

    STAINLESS STEEL CHECK VALVE
1/4" DIA STS AIR
LINE
                     PORTABLE CABLE
                     TO CONTROL MODULE
           STRAINER
           (OMIT ON OUTLET
            ASSEMBLY)
      EXPLOSION PROOF
      JUNCTION BOX
      CROUSE-HINDS
      GUAC-16
                                                     FLOW
                                     2" DIA BALL VALVE
                                     JAMESBURY A3600 TT
                                     MODEL B
POTTING HEAD
CROUSE-HINDS
CGSP-194

       PORTABLE
       CABLE TO
       CONTROL
       MODULE
                                                                                   COX FLOW METER
                                         Figure 2.  Inlet assembly.

-------
20% changes in the indicated flow rates.

     The thermal probe approach was discarded and the system was redesigned
to use turbine flow meters.  A turbine flow meter consists of a turbine wheel
mounted axial ly in a short length of non-magnetic pipe.  Two of the turbine
blades have magnets inserted into their outer ends, and a coil on the outside
of the pipe produces a low level AC signal when the turbine is rotated.  The
frequency of the signal is proportional to the flow rate over the operating
range of the device.  The accuracy of a typical good quality turbine flow
meter is specified as ±% of flow over its operating range.  However, it was
found that the relative differences between a pair of flow meters was less
than 1%, which was maintained at flow rates much lower than those specified
for absolute accuracy.  Each flow meter has an arrow to indicate the flow di-
rection for which it was calibrated.  It was found that flow indication in
the opposite direction was indistinguishable from the "proper" direction.

     Flow meters are individually calibrated and it is unlikely that two will
have identical K factors (the K factor is the number of alternating current
cycles that will be output for each gallon of fluid passing through the met-
er.)  Further, it is necessary to provide compensation for unequal wear with
prolonged usage.  A rate multiplier circuit was made to use with the "fastest"
(highest K factor) meter.  The output of the rate multiplier circuit (f out)
is

                                    = f(in) xm
where m is any desired integer between 0 and 4095.  Thus, the meter indication
could be synchronized to within 2.4 parts in 10,000.

     A detailed understanding of the logic circuits (Appendix A) is not nec-
essary for comprehension of the scope of the test and data acquisition effort.
This effort involved the measurement of system outputs under various leak
conditions so that operating strategies could be developed.

     The basic logic circuit was an up-down counter.  The pulses from the in-
let flow meter (normalized by a rate-multiplier circuit that caused it to out-
put the same number of pulses per gallon as the outlet flow meter) caused the
counter to count up — those from the outlet flow meter caused it to count down.
After a pre-set number of total pulses (a "frame") were received, the balance
shown by the up-down counter was read, after which it was reset for the start
of the next frame.  The distribution of the magnitude of the balance was re-
corded for leak rates from 0 to 4% of flow.  Experimentation showed that a
"frame" of about 1,000 total pulses provided an adequate sample period to
average out most naturally occurring variations in flow.  The simplest imple-
mentation with digital logic resulted in a frame of 1,024 pulses correspond-
ing to the passage of about 7.1 liters (1.88 gallons) through the system for
the flow meters used.

     Figure 3 shows the distribution of indicated flow imbalances for leak
rates of zero and 1.5% of flow rate.  A comparator circuit, which accepts two
binary numbers, A and B, and outputs signals indicating whether A was greater

                                      11

-------
                                    DASHED LINE IS AVERAGE
                                    FOR ALL OBSERVATIONS.
                                    SHADED AREA SHOWS RANGE
                                    FOR SUCCESSIVE 100-SAMPLE
                                    TRIALS.
        PROBABILITY THAT METER OUTPUTS WILL DIFFER BY n COUNTS  IN ONE
                        FRAME UNDER NO LEAK CONDITIONS
U . 3
0.4
0.3
0.2
0.1
1 i
>-
i—
_i
CQ
eC
CQ
- O
cc.
D_
^jjCr
024
i ' 1
/^
/ \
s \
/^ \
o \
'' °ss
x s
x -
N
l l 1
6 8 10 12
n
            SAME AS ABOVE, BUT WITH A 1.5% OF FLOW LEAK INTRODUCED
Figure 3.   Distribution of flow imbalance indications,  0 and 1.5% leak  rates,
                                     12

-------
than, equal to, or less than B was built.  B was a switch selectable number
and A was the balance indicated by the up-down counter.   At the end of each
frame, the comparator output was read.  If, for example, B was set at 4, and
A had a value of six, the flow imbalance exceeded the switch selected thres-
hold, indicating a leak (more properly, the possibility of a leak).  Under no
leak conditions, the up-down counter balance rarely exceeded 4, but occasion-
ally would read higher.  The anomalies were attributed to air bubbles, hose
pulsations and solid particles.

     The system was then operated with various leak rates and values of B.  The
ratio of leak to normal indications, the number of successive leak indications
occurring between two normal indications, and the number of successive normal
indications occurring between two leak indications were recorded and their
distributions determined.

     These data formed the design basis for the balance of the circuits.

     Analysis of the data showed that the reliable detection of small leaks
(less than 2% of flow) could not be done on a single frame indication without
a high false alarm rate.  By increasing the number of frames used to conclude
that a leak existed, the false alarm rate could be suppressed.  The penalty
imposed was an increased time duration for the leak to exist before shutdown.

     An additional counter circuit was added.  It was incremented each time
the comparator output indicated a leak (A>B), and was cleared to zero each
time that two successive normal (A=B or A
-------
     1.0
     0.3
     0.1
CO
«c
cr>
o
o:
Q-
    0.03
    0.01
                         FLOW RATE 6.3 Ł/sec (100 GPM)
                         LEAK RATE 57 yŁ/sec (0.9 GPM)
DASHED PORTIONS ARE
CALCULATED
                                   DECISION  POINT = 4
                                     B  = 4
       n
 10
15
20
o
Lf>
CM
O
O
LO
O
un
r~~
o
o
o
o
uo
CM
                   FLUID LOSS BEFORE SHUTDOWN
   Figure  4.   Probability  that  flow will  continue for n frames
              after introduction of leak.
                               14

-------
                                                              GROSS LEAK OVER-RICE
117VAC
en
                                                                        TO BOni PILOT VALVES -
                             Figure 5.   Fail-safe transfer line  control  module  block  diagram.

-------
pilot valve would cause closure of its valve, but the system would not shut
down because both meters would sense the same (zero) flow.  The pilot valve
current sensor monitors the current to the pilot valves.  If either pilot
valve circuit shows open, the sensor outputs a signal that will cause a shut-
down, thereby alerting the operator to stop the pump.  An alternative use for
the signal would be direct connection to the pump motor relay.

OPERATING PERFORMANCES

     There are three selectable operating parameters for the system:

Frame Size

     The size of a frame is the number of total pulses received from both
meters before making a comparison.  The frame size can be arbitrary, but to
reduce component count and permit selection with a single tap, it was designed
to be 256, 512, 1024, or 2048.

Leak Threshold

     The leak threshold is the difference between the number of pulses re-
ceived from each flow meter in one frame.  Selectable is an even number be-
tween 0 and 14.  (Because the frame size is an even number  and is the aggre-
gate of the pulses received from both meters, the difference cannot be an odd
number.)

Decision Point

     The decision point is the number of successive times the leak threshold
must be exceeded, with no more than one normal indication between any two leak
indications, to cause a shutdown.

     Even with no leak present, there will be differences between the meter
indications.  They are not synchronized; hence, a 2-bit difference is likely
(note that a 1-bit difference is not possible because of the even number frame
size).  The meters do not observe the same fluid at the same time.  A gas bub-
ble passing through the inlet meter will not pass through the outlet meter for
several seconds.  Further, the transfer line is not rigid, and pulsations may
create a small flow differential.  The selectable parameters interact as fol-
1 ows:

Leak threshold and frame size —

     The smaller the frame size, the greater the masking effect of system
errors.  If the frame size is 1024 pulses, a 2-count error is the equivalent
of an 0.2% leak indication.  If the frame size were set at 512, the same error
would indicate the equivalent of an 0.4% leak.  Thus, a larger frame size min-
imizes the masking effect of inherent errors.  To reliably detect small leaks,
a small value for leak threshold is desirable.  Analysis of data acquired dur-
ing the development phase indicated that a frame size of 1024 was a good com-
promise.  A frame size of 2048 would further minimize the effect of inherent
errors, but would reduce the system response time.

                                      16

-------
Leak Threshold and Decision Point --

     A small value for leak threshold will increase the probability of detect-
ing a small  leak, but will result in frequent leak indications when no leak
is present.   This can be compensated by requiring a larger number of leak in-
dications before effecting shutdown.  These two parameters can be used to
trade off system sensitivity and false alarm rate.

     The probability of detecting a leak of given size for a specified leak
threshold selection, and the probability of a false alarm can be approximated
from the binominal distribution using the single event probabilities shown in
Figure 6 (these data are for a frame size of 1024).  Observed performance dur-
ing testing showed a false alarm rate several times higher than calculated.
It is possible that the phenomena which cause false indications persist for
several seconds, and in that case they would have greater effect when the line
was in continuous operation (as was the case for the false alarm trials), but
would not be observed when the up-down counter was stopped at the end of each
frame to permit recording of the differences.
                                      17

-------
                                     PROBABILITY OF NORMAL  INDICATION
00
   14 -
           0.5

      Figure 6.
                                                      90
99
                     PROBABILITY OF LEAK INDICATION
Approximate distribution of leak and no leak indications with a  frame size  of 1024.

-------
                                  SECTION 6

                           USE-DEMONSTRATION TESTS


     After the system was substantially completed, it was necessary to change
the planned application.  The fluid actually used in the tests was TAMOL-L
concentrate, an aqueous solution of the sodium salt of napthalene-sulfonic
acid.  The testing site was the Goodyear synthetic rubber plant, Houston,
Texas.  The system was installed by Goodyear personnel at the TAMOL-L concen-
trate storage tank site.  Offloading stations for both tank cars and tank
trucks were in the immediate vicinity of the tank.  However, an expansion of
the plant was in progress and access to the truck offloading stations was
blocked.  Consequently, only tank cars were offloaded.  A total of seven tank
cars, with an average load of 8,000 gallons each, were offloaded in six opera-
tions.  No actual leaks were encountered.  During the third unloading opera-
tion, a small leak was induced by loosening a pipe coupling at the point where
the hose was attached to the outlet (storage tank) exit.  The line shut down
automatically within eight seconds.  It is estimated that about one pint of
fluid was lost before shutdown.

     Significant difficulties were encountered in the use-demonstration tests,
all attributable to the nature of the material handled.  TAMOL-L contains over
50% dissolved solids.  On prolonged exposure to the atmosphere the vehicle
(water) evaporates, leaving a residue that varies from solid to semi-solid.
If the transfer line was not completely purged after each use, the residual
material would dry out leaving a coating of solids on the internal surfaces.
Upon reuse of the line, the fresh fluid would cause pieces of the solid mat-
erial to slough off, fouling the outlet flow meter.

     A period of from two to fifteen minutes of flow, depending on the tem-
perature of the fresh fluid and the degree of solidification of that which
coated the internal surfaces, was usually required to establish trouble free
operation.

     At the outset of one offloading operation, the system would not function.
The flow meters were opened for inspection and it was found that the outlet
flow meter was fouled with an amber, transparent crystal-like material.  Nei-
ther TAMOL-L nor water would dissolve the material, indicating that it was not
the residue from a previous TAMOL-L offloading.  It was finally removed with
steam.  The flow meter was disassembled, cleaned, reassembled and its calibra-
tion was checked using the internal circuits provided for this purpose (des-
cribed in Appendix A).  The calibration had changed slightly but about ten
minutes after the flow had been resumed it was back to its original setting.
It is surmised that the transfer hose had been used for another material, and

                                      19

-------
that residue of that material, on combining with the TAMOL-L, formed a solid.

     On one occasion, the tank car sump was badly fouled with what appeared
to be flakes of corroded metal.  Immediately upon opening the tank car valve,
the filter on the inlet assembly clogged.  It was necessary to stop the un-
loading operation to clean the filter and to clear the sump by draining some
of the fluid into buckets.

     It was anticipated that the relatively bulky inlet assembly would be
difficult to handle when connecting the system to a tank car.  A skid-mounted
frame which permitted positioning the assembly to any particular height and
angle was fabricated to facilitate handling.  The pipe fitters at the Good-
year plant quickly devised a "universal joint", using two elbows, which made
connection simple and rapid.  The frame was discarded after the first use.
The workmen considered that connection of the system to the tank car involved
little more effort than the connection of a standard hose.

     In general, the use-test period was successful in that it demonstrated
that the system did not impose any significant increase in labor or inconven-
ience for its use.  However, the nature of the material handled created pro-
blems which would require an additional step --flushing the system with wa-
ter— after each operation.
                                      20

-------
                                  REFERENCES


1.    Buckley, J.  L.  and S.  A.  Wiener.   Hazardous Materials Spills:   A Docu-
     mentation and Analysis of Historical  Data.   EPA-600/2-78-066.   Factory
     Mutual  Research Corporation Contract  68-03-0317 with the U.S.  Environ-
     mental  Protection Agency, 1978.

2.    Unpublished analysis of data from the Pollution Incident Reporting
     System (PIRS) obtained through the courtesy of D.  Boyd, USC6,  1976.

3.    Mastandrea, J.  R., J.  A.  Simmons, K.  J. Gilbert, and P. B.  Kimball.
     Deepwater Port Inspection Methods and Procedures.   SAI CG-D-31-78.
     Contract DOT-CG-60670-A with U.  S. Coast Guard, 1978.

4.    National Electrical Code, 1971.   NFPA 70-1971; ANSI CI-1971,  National
     Fire Protection Association.
                                      21

-------
                                  APPENDIX A

                             CIRCUIT DESCRIPTIONS


     The input to the control circuits are the pulses from the flow meters.
Once flow is established, operation is fully automatic in response to the
settings of internal adjustments.

     The operator has access to only these controls:

     1.   An on-off switch for the 110-V AC power.  With this switch in the
off position, the valves at each end of the transfer line are closed and can-
not be opened by operator action.

     2.   A start-reset push-button switch.  When this switch is pressed, the
valves are opened and the monitoring circuits are disabled.  The operator must
hold this switch in until flow is established -- about 5 to 10 seconds.

     3.   A test push-button switch.  Depressing this switch simulates a leak.
It is used to test the response of the system.

     The circuit descriptions which follow cover the three circuit boards:
the meter board, the control board, and the pilot valve sensor board.

METER CIRCUIT BOARD

     Referring to Figure A-l, the meter inputs are buffered by Schmitt-trigger
gates, with the meter having the highest K factor (number of pulses per gal-
lon) designated Ml, and the other M2.  Ml is routed to a 12-bit rate multi-
plier.  The output of the rate multiplier is m/4096 times the input rate.
Ten switches permit setting m at any value from 3072 to 4095 in unit incre-
ments.  They are set to reduce the number of pulses from meter one to be
equal to that from meter two for the same flow.

     The test switch inverts the most significant bit of m, thereby permitting
a test of the system shutdown response.

     An oscillator and flip-flop produce a two-phase clock signal at a rate
of about 200 kHz.  Incoming pulses from Ml and M2 are stored in flip-flops
(used as one-bit storage registers), which are alternately "read".  If a
pulse from Ml sets the flip-flop, it will be read during the phase 1 cycle
                                      22

-------
        TEST
ro
GO
                           Figure  A-l.   Simplified logic diagram-meter board.

-------
                                     *
of the clock, causing the Ml one-shot  to output a pulse.  This pulse clears
the flip-flop and causes the up-down counter to be incremented.  Pulses from
M2 are read on the phase 2 cycle of the clock and cause the up-down counter
to be decremented.

     The minimum interval between input pulses is about 400 times the interval
between reading the flip-flops, hence no pulses will be lost.

     The pulse count from both meters is routed to a 12-bit frame counter
which can be wired to output a pulse after 256, 512, 1024, or 2048 counts.
1024 was found to be the most suitable.  When the frame count equals the pre-
set value, the end-of-frame signal from the frame counter sets the frame flip-
flop which disables the meter input counting gates (4-inch NOR gates), and
triggers one-shot A.  The falling edge of the pulse from one-shot A triggers
one-shot B which sends a read command to the control board.  The time constant
of one-shot A is set to compensate for the settling time of comparators on the
control board.  The falling edge of one-shot B triggers one-shot C; resets the
frame counter to zero, loads the up-down counter to its design preset value,
and clears the frame flip-flop, thereby starting a new frame.  The entire se-
quence from end-of-frame to start of a new frame takes less than 5 ysec.  Any
meter pulses received during this sequence are stored in the respective meter
input flip-flops.

     The eight bit up-down counter starts each frame with a count of
11,100,000 (224), and the six least significant bits are routed to the control
board.

     Criteria for determining that a leak exists are set by switches and a
patchable decision point on the control board.  However, those criteria are
optimized for the presence of small leaks and may require from 2 to 9 frame
intervals to effect a shutdown.  To cause immediate shutdown in the event of
a large leak (>6.5%) the carry and seventh bit outputs of the up-down counter
are gated to create a "gross leak over-ride" signal.  The carry output will
go "low" whenever the "up" count is 31 greater than the "down" count, and the
seventh bit will go "low" whenever the "down" count is 32 greater than the
"up" count.
     A run-test switch is provided for system calibration.  In the test posi-
tion, it permits initiation of a frame by toggling a "single frame" switch
(not shown), but holds the up-down counter output at the end of each frame.

CONTROL CIRCUIT BOARD

     The control circuit board is shown in Figure A-2.  The outputs of the
six lowest order bits from the up-down counter are routed to the A inputs of
*
  A one-shot, or monostable multivibrator, outputs a pulse of predetermined
width in response to an input pulse.  If the meter polling circuit did not
use a one-shot (i.e., used the output of the NOR gate as the output signal),
the pulse would be so short that the response of the up-down counter would not
be guaranteed.

                                      24

-------
ro
in
                                                                                                           START/RESET
                                                                                                           GROSS LEAK
                                                                                                          •OVER-RIDE
                                             PRESSURE TRANSDUCER VOLTAGE
                      Figure A-2.   Simplified  logic  diagram,  control  circuit  board.

-------
a pair of eight-bit comparators (each made up of two cascaded four-bit compar-
ators).  The two highest order A inputs of each comparator are strapped to a
logical 1.

     The four lowest order bits of the B inputs are selected by threshold
switches, with those to the high limit comparator being direct, and those
to the low limit comparator being inverted.  Setting the four switches sets
the upper and lower limits for fault tolerance.  Each comparator has two out-
puts:  AB (the A=B outputs are not used).

     The comparator arrangement permits detection of an out-of-tolerance indi-
cation regardless of whether the up-down counter balance is higher or lower
than its initial (preset value).  Consider a case in which the threshold has
been set at 4, and the up-down counter indicates an output 6 greater than  the
preset value (a leak indication):

     B input to high limit comparator            11,100,100 (228)
     A input to both comparators                 11,100,110 (230)
     B input to low limit comparator             11,011,011 (219)

Both of the counters agree (A>B) indicating a leak.  Now consider  the same
case with the up-down indicator six less than its preset value:

     B input to high limit comparator            11,100,100 (228)
     A input to both comparators                 11,011,010 (219)
     B input to low limit comparator             11,011,011 (219)

Again, both counters agree (A,
Its output is a logical cfr if all inputs are logical  1.
Its    ,

                                      26

-------
signal  to a control  flip-flop.  A pressure transducer in the valve actuator
air supply outputs a voltage proportional to pressure.   This voltage is ap-
plied to a window detector whose output goes low whenever the pressure is too
high or too low.

     Either a shut-down signal or an out-of-tolerance-pressure signal  will
cause the control flip-flop to toggle.  Its outputs will turn the pilot valve
to "off", causing the valves to close, and will  enable the horn timer which
causes  the horn to pulsate (3 seconds on, 5 seconds off).

     A  gross leak over-ride, derived from the up-down counter, will also cause
the control flip-flop to shut down the system and actuate the horn.

     A  start-reset switch, accessible to the operator,  clears the control
flip-flop and restores the system to operation.   The switch must be held down
until flow is established through both flow meters.

     A  system run-test switch (shown in Figure A-l), when set in the test
position, actuates the power to four test indicator lamps and causes the
logic to stop at the end of a frame.  The lamps  indicate the count of the up-
down counter (the four least significant bits).   This feature permits  fine
calibration of the rate multiplier setting.

CURRENT-SENSOR CIRCUIT BOARD

     A  simplified diagram of the current-sensor circuit is shown in Figure A-3,
A series resistor is placed in the 110-V 60 Hz line to each pilot valve, and
an optical isolator is placed across each resistor.  When current is flowing
to the  pilot valve,  the optical isolator triggers a retriggerable one-shot
60 times a second.  The one-shot is timed for 50 to 60 msec and its output
will remain high as  long as there is current flowing to the pilot valve.
Should  the current be interrupted for more than four cycles (e.g., severed
cable), the one-shot output will go low.
                                      27

-------
                                   +5 v
ro
co
                no
                 AC

              TO PILOT
               VALVE
                                           t
                                            O.S. Q

                                            60 ms
         From  Identical Circuit
         cm _Second_ Pil_ot_\/alve_

Gross Leak Over-ride From
Meter Board
                                                                             >n
                                         Over-ride to Control  Board
                           Figure A-3.  Pilot valve current  sensor.

-------
                                    TECHNICAL REPORT DATA
                             (Please read Instructions on the reverse before completing)
1. REPORT NO.
                                                             3. RECIPIENT'S ACCESSIOr+NO.
4. TITLE AND SUBTITLE
              5. REPORT DATE
                                                             6. PERFORMING ORGANIZATION CODE
        FAIL-SAFE TRANSFER LINE  FOR  HAZARDOUS FLUIDS
7. AUTHOR(S)
     Alexander J..  Houghton and John  A.  Simmons
                                                             8. PERFORMING ORGANIZATION REPORT NO.
9. PERFORMING ORGANIZATION NAME AND AOORESS
     Science  Applications,  Inc.
     1710  Goodridge Drive
     McLean,  Virginia  22102
                                                             10. PROGRAM ELEMENT NO.
                    1BB610
              11. CONTRACT/GRANT NO.
                    68-03-2039
12. SPONSORING AGENCY NAME AND AOORESS
     Oil & Hazardous Materials Spill  Branch
     Municipal  Environmental Research Laboratory-Ci
     Edison,  New Jersey  08837
                                                              13. TYPE OFpREPOflT AND PERIOD COVERED
                                                                      Final
              14. SPONSORING AGENCY CODE

                 EPA/600/12
13. SUPPLEMENTARY NOTES

     Project  Officer:  Dr. John E.  Brugger
16. ABSTRACT
          The  design principles, development, laboratory testing,  and fabrication of a
     fail-safe transfer line for hazardous liquids are described.   The system provides
     a 2-inch  ID  flexible line for offloading tank cars or trucks.   It detects leaks
     by monitoring flow inventory with  corrosion-resistant, turbine-type flow meters at
     the inlet and outlet ends.  Reliable shutdown of the line  at  leak rates as low as 1%
     of flow is achieved.  The line  is  also automatically shut  down when electrical power
     or valve  actuator pressure is lost or when any sensor or control  cable is severed.
     The system meets National Electrical  Code explosion-proof  standards for Class I,
     Division  I,  Group C or D environments.   Use-demonstration  tests at a chemical plant
     were satisfactory except for occasional  fouling of the flow meters with material
     that solidified in the transfer hose between operations.   It  is recommended for use
     only with material that remains  in a liquid state under all normal conditions.
17.
                                 KEY WORDS AND DOCUMENT ANALYSIS
                  DESCRIPTORS
b.lDENTIFiERS/OPEN ENDED TERMS  C. COSAT1 Field/Group
     Hazardous Materials
     Leaks
     Transfer Functions
     Flow Meters
     Transfer Line
                                      13B
13. DISTRIBUTION STATEMENT
                                                19. SECURITY CLASS (ThisReport)
                            21. NO. OF PAGES
                                                20. SECURITY CLASS (This page)
                            22. PRICE
EPA Form 2220-1 (9-73)
                                            29

-------