ISO 3171 Petroleum liquids - Automatic pipeline sampling
15 Proving the sampling system
15.1 Introduction
A field test to prove the sampling system should be carried out after a new automatic sampler has been installed. The following procedure is intended to test the total sample system by injecting a volume of water for a period of time and confirming that the sample taken represents the total volume of water injected plus the baseline water. This procedure is a volume balance test.

15.2 Water injection facilities
These should be arranged as follows.
a) Connection valves, strainer, pressure gauges, piping, pump and a flowmeter are required to inject known amounts of water into the Pipeline ahead of the sampler during the test transfer.
b) Locate the water injection point as far upstream as practicable of the piping elements that are expected to produce the required mixing.
c) Water injection flow rates should be between 1.0 % and 5.0 % of the crude oil flow rate during the test.

NOTE - If for operational reasons the water injection flow rates have to be less than 1 %, then the measurement of injected water quantity and the accuracy of the laboratory analytical procedure become critical in the assessment of sampling system acceptability.

d) Water should be injected for at least 1 h or for sufficient time to accumulate a sample volume that tan be properly mixed.
e) Water should be injected into the bottom or the side of the pipe at a velocity which does not produce any significant additional mixing. This may be accomplished by introducing the injected stream through an elbow or bend so that its velocity is parallel to that of the main flow and in the same direction.
f) The volume of injected water should be measured with an accuracy better than +/- 2 %.

15.3 Testing procedure
NOTE - It is usually required to test the sampling system under worst-case conditions, but these should be realistic with regard to the importance (i.e. total value) of the material being transferred. In some circumstances, the warst case will not be easy to define; in this instance, more than one test will be required in order to demonstrate performance over the full range of working conditions.

The following procedure is recommended.
a) Select a test period when pipeline conditions can be held steady.
b) Select, from the range of oils normally sampled, an oil with the lowest viscosity and the lowest density at the operating conditions.
c) Adjust the oil flow rate to give the minimum velocity to be used in the pipeline. The volume of oil during the test period should be measured with an accuracy better than +/- 2 %.
d) Collect three separate samples, i.e. "before", "test" and "after". In order to make efficient homogenization possible, use test receivers of small capacity and increase the sampling frequency to give an adequate volume. Operate the sampler for at least 1 h to collect the "before" sample, change the receiver and then inject water as described in 15.2 for at least 1 h. When all the injected water has passed the sampler, change the receiver again and collect the "after" sample for a further hour. Determine the water content of the samples collected "before" and "after" (see figure 6). The differentes between the water content of the "before" and "after" samples should not exceed 0.1 %.
e) Operate the Sampler to collect the test sample during the total time period that the injected water is passing. Allow for the time lag between water injection and arrival at the sampling location (see figure 6). At low flow rates, the injected water may move at a lower flow rate than the crude oil, therefore continue sampling into the test receiver for some time after the end of the expected passing of the injected water. After sampling is completed, the normal procedures should be used for sample handling, mixing and analysis for water.
f) As the performance of some sampling equipment can be affected by the sampling frequency, the effect should be verified foreach sampler design and installation as follows:
1) for fixed-grab-volume samplers, measure the size of the sample delivered by 100 grabs at both the minimum and the-imaximum sampling frequency;
2) for variable-grab-volume samplers, measure the ratio of the sample volume to the batch volume at both the minimum and the maximum flow rate.

For both 1) and 2), the values so obtained at minimum and maximum conditions should be within +/- 5 % of the calculated values.

15.4 Calculations
The deviation between the average water content in the test sample minus the baseline water content, and the average water injected should be calculated from the following equations:
Wdev = (Wtest - Wbase) - Winj
and
Winj = V1/V2 x 100
where
V1 is the total volume, in cubic metres, of the injected water;
V2 is the total volume, in cubic metres, of the oil and water that passes the sampling location during the period when the sampler is in operation collecting the "test" sample;
Wdev is the deviation of the percentage water in the "test" sample from the average injected water with an allowance for baseline water;
Wtest is the percentage of water in the test sample [see 15.3e)];
Wbase is the average percentage of water in the baseline samples "before" (Wbef) and "after" (Wae) the "test" [see 15.3 d)], but adjusted to the "test" conditions by the equation
Wbase = (Wbef + Waft)/2 x (V2 - V1)/V2
Winj is the percentage of water injected into the oil.

Calculate the ratio
Wdev/(Winj + Wbase)
and obtain the rating of the sampling system under the test condition from table 4.

15.5 Assessment of results
Sampling systems which perform in accordance with rating A of table 4 meet the highest requirements of this International Standard. If the performance is to the lower ratings B, C and D consideration should be given to whether improvements can be made to design and operating criteria to raise the rating to a higher level. If this is not possible or not justified on economic grounds, the sampling system may be satisfactory depending on the circumstances and/or the application.

15.6 Corrective action
If the sampling system needs to be uprated, the first corrective action should always be a thorough examination of the test procedure and reverification of sampling, sample mixing, sample handling and laboratory procedure.

If these appear to be satisfactory, further steps should be taken to recheck the profile and the performance factor, as well as the flowmeter and all the components of the sampling system.