Crude Oil Sampling: Manual and Automatic Methods (ASTM D4057, D4177) and Why Tank Stratification Matters

Left: manual sampling of a crude oil storage tank, with upper, middle and lower spot samples, an all-levels or running sample taken through the full depth, and a bottom sample of water and sediment on the tank floor. Right: automatic pipeline sampling, with a mixing element, a probe in the centre of the line, an extractor paced by the flow meter and a sealed receiver, followed by mixing and handling before analysis.
Manual tank sampling (ASTM D4057 / API MPMS Chapter 8.1) and automatic pipeline sampling (ASTM D4177 / API MPMS Chapter 8.2). Simplified, not to scale. Original diagram by Rombo AI.

TL;DR

  • Crude oil sampling sets the limit on every result. Volumes, price and compliance are calculated from a few litres taken from a tank, a pipeline or a ship. No laboratory method can correct a sample that does not represent the oil.
  • Manual and automatic sampling answer different questions. Manual samples (ASTM D4057 / API MPMS Chapter 8.1) describe points or columns in a tank. A flow-proportional automatic sample (ASTM D4177 / API MPMS Chapter 8.2) describes the whole parcel that passed through a line.
  • Water is the hardest property to sample. It is denser than crude, settles in tanks and runs along the bottom of pipes at low flow, so mixing, probe position and sample handling (ASTM D5854 / API MPMS Chapter 8.3) decide whether it reaches the laboratory.
  • A stratified tank is several samples. Upper, middle and lower samples analysed separately show the layers that a composite averages away. Faster analysis, including benchtop NMR with machine learning, makes it practical to test more samples; it does not make a poor sample representative.

Crude oil is bought, sold, blended and fed to the crude distillation unit (CDU) on the strength of laboratory numbers. Each of those numbers starts with a sample of a few hundred millilitres to a few litres, taken from a tank of tens of thousands of cubic metres or a pipeline moving thousands of cubic metres an hour. This guide covers the two families of crude oil sampling, manual and automatic, the standards that define them, the handling steps between the sample point and the analyzer, and why tank stratification changes what a “correct” sample means. For the tests that follow the sample, see our guide to crude oil analysis in the refinery.

Why sampling sets the limit on every crude result

ASTM D4057 lists the reasons samples are taken: to calculate standard volumes, to establish the value of the product and for safety and regulatory reporting. Each one depends on the sample.

  • Volume. Sediment and water are deducted from the gross standard volume to obtain the net volume that is paid for. An error in water content becomes an error in the quantity invoiced.
  • Value. API gravity, sulfur and acid number position a crude against its benchmark and against the refinery’s planning model.
  • Operation. Salt, water, sediment and compatibility decide how the desalter, the preheat train and the CDU will behave.

Sampling error cannot be eliminated, only reduced. Authors from Iran’s Khark crude terminal, writing in Oil & Gas Journal, list the conditions: the sampling location, the hardware, mixing of the stream, flow-proportional collection, and the handling and analysis of the sample. A precise laboratory method applied to the wrong oil gives a precise wrong answer, and the precision statement of the method says nothing about it.

The crude oil sampling standards in one table

The petroleum sampling standards are published jointly by ASTM International and the American Petroleum Institute (API) as Chapter 8 of the Manual of Petroleum Measurement Standards (MPMS). According to ASTM D5854, the primary purpose of this suite is correct sampling and handling for custody transfer; for tests outside that scope, the test method itself may set further requirements on container, transport and storage time.

Standard What it covers When you need it
ASTM D4057 / API MPMS 8.1 Manual sampling from tanks, ships, pipelines, drums and process vessels into the primary container, including free water and heavy components Tank gauging and quality checks, receipts without an automatic sampler, level samples for stratification
ASTM D4177 / API MPMS 8.2 Automatic sampling from a flowing stream: location, stream mixing, proportionality, grab volume, containers, proving and monitoring Custody transfer by pipeline, marine loading and discharge
ASTM D5854 / API MPMS 8.3 Mixing, conditioning and handling from the primary container to the analyzer or intermediate containers Every sample that is split, transferred or analysed for water
ASTM D5842 / API MPMS 8.4 Sampling and handling of fuels for volatility measurement Light products where vapour pressure must be preserved
ASTM D8009 / API MPMS 8.5 Manual piston cylinder sampling of volatile crude oils, condensates and liquid products Unstabilized or high vapour pressure crude
ISO 3170 and ISO 3171 International standards for manual sampling and automatic pipeline sampling of petroleum liquids Contracts and terminals that specify ISO

Neither D4057 nor D4177 covers electrical insulating oils, which have their own sampling standards; our transformer oil testing guide covers that side of the energy laboratory.

Manual sampling: ASTM D4057 and API MPMS Chapter 8.1

Manual sampling lowers a container into a tank or ship’s compartment, or draws oil from a tap or a line, and transfers it into the primary sample container. The method is simple and the equipment is portable, which is why it is still the default for tank checks and for most refinery tank farms.

D4057 defines a set of sample types, each describing a different part of the tank:

  • Spot samples at defined levels: the upper sample in the middle of the upper third of the liquid, the middle sample at half depth and the lower sample in the middle of the lower third.
  • All-levels and running samples, collected while an open container travels through the liquid at a uniform rate, so that it fills along the way.
  • Composite samples, prepared by combining spot samples in defined proportions.
  • Bottom and free water samples, taken at the floor of the tank to find settled water and heavy components.

The practice is explicit about the limits. A spot sample comes from one point in the tank, compartment or pipeline. A running or all-levels sample represents only the column of oil it passed through, not the whole tank. Both are correct samples; they answer narrow questions.

Manual sampling has practical weak points too. The Khark authors note that the operator must get the level right, fill containers uniformly and handle them carefully, and that time passes between the tank roof and the laboratory. Free water at the bottom has to be measured separately, because a sample taken above it will not see it.

Automatic sampling: ASTM D4177 and API MPMS Chapter 8.2

An automatic sampler takes many small grabs from a flowing stream into a sealed receiver, in proportion to flow. At the end of the transfer, the receiver holds one sample that stands for the whole parcel. ASTM D4177 covers the full system: sampling location, mixing of the stream, proportionality, grab volume, containers, control, security, proving and performance monitoring.

A typical system has five parts:

  1. Stream conditioning. Piping elements, a static mixer or a jet mixer that disperse water and heavy components across the pipe section.
  2. Probe. An inlet facing the flow near the centre of the line, at a point where the stream is mixed.
  3. Extractor. A device that takes a fixed grab (1 to 1.5 mL in the Khark design) each time the flow meter counts a set volume.
  4. Controller. Paces the grabs from the meter signal so that each grab stands for the same volume of oil.
  5. Receiver. A sealed container (10 to 15 L of sample per loading at Khark) that holds the composite until it is mixed and split in the laboratory.

Water is what makes this hard. Because water is denser than crude, it tends to flow along the bottom of the pipe at low velocity. The Khark study measured the ratio of water concentration at the top and bottom of the line (C1/C2), which the authors, following API and ISO limits, required to stay between 0.9 and 1.1. At fluid velocities above 2 m/s at the sampling point, their in-line sampler performed acceptably about 90% of the time; at the start and end of each loading and at low rates, mixing was not enough. Their conclusion was to add a static or dynamic mixer upstream, and to prove the system with a water injection test, in which a known volume of water is added to a measured volume of crude and compared with what the sampler finds.

D4177 also includes an annex on the margin of error as a function of the number of grabs: too few grabs over a parcel, and the receiver cannot represent short-lived changes in the stream. An automatic sampler is therefore a measurement system that needs acceptance testing and monitoring, not a fitting that is installed and forgotten.

From receiver to analyzer: mixing and handling (ASTM D5854)

A correct sample can still be lost in the laboratory. ASTM D5854 covers how to mix and condition the primary container before transferring a portion to the analyzer or to intermediate containers, with an appendix on acceptance testing for water in crude oil and a summary of recommended mixing procedures. Three habits matter most:

  • Mix before every split. Water and sediment settle in the receiver within minutes. A subsample poured from an unmixed container under-reports both.
  • Keep volatile samples closed. Light ends escape from open containers. Vapour pressure by ASTM D6377 needs a sample collected and handled to preserve them, and volatile or unstabilized crudes need piston cylinders (D8009).
  • Choose the water method for the decision. The scope of ASTM D4007, the centrifuge method for water and sediment, states that it almost always finds less water than is actually present; when a highly accurate value is needed, water by distillation (ASTM D4006) or by coulometric Karl Fischer (ASTM D4928) applies.

Sample identity belongs with the result: where, when, which sample type, which container, and how it was mixed. Without it, two results that disagree cannot be explained.

Which sample answers which question

The most useful question before taking a sample is not “how do I sample this tank?” but “what decision will this number support?”. The table below maps the common sample types to what they represent.

Sample type How it is taken What it represents Best for Main limit
Upper, middle, lower spot Container opened at a set level in the tank One point at that level Finding layers and gradients; analysed separately Misses anything between the levels
All-levels or running Container moved through the full depth The column it passed through A quick tank average for well-mixed tanks Fill rate must be uniform; one column only
Tank composite Spot samples combined in set proportions A volume-weighted estimate of the tank Tank average for custody or inventory Averages the layers away
Bottom and free water Taken at the tank floor Settled water, sediment, sludge Free water and heel checks Says nothing about the oil above
Automatic, flow-proportional Grabs paced by the meter into a sealed receiver The whole parcel that passed the probe Custody transfer by pipeline or ship Depends on mixing, proving and handling
Line spot (tap or fast loop) Single draw from a flowing line The stream at that moment Process checks at the blend header or CDU feed One moment; needs a mixed, flowing stream

Two rules follow. A sample for custody transfer should represent the average of the parcel, which is why automatic flow-proportional sampling is preferred for pipeline and marine transfers. A sample for operations should represent what the unit will see next, which may be one layer of a tank, not its average.

Why tank stratification matters for sampling

After a lighter crude is received on top of a heavier one, the tank can hold several oils for hours or days: light crude above, heavy crude below and a transition zone in between. Our article on crude oil tank stratification covers why this happens, how long mixing takes and the tools refineries use to detect it.

For sampling, stratification changes three things:

  • The composite becomes misleading for operations. A tank composite can correctly describe the average of a tank that the CDU will never see as an average, because the outlet draws the tank layer by layer.
  • Level samples become the measurement. Upper, middle and lower spot samples, analysed separately, are what make a density or sulfur gradient visible. Repeating them after mixing confirms whether the tank is uniform.
  • The bottom sample becomes a stability check. A lower sample denser or richer in asphaltenes than either crude received points to a heel, sludge or precipitated asphaltenes. If the crudes may be incompatible, our guide to crude oil compatibility and asphaltene stability compares the tests.

The cost of level sampling is laboratory work: three samples instead of one, for each property that matters. That is the main reason many sites analyse only the composite.

Worked example: one tank, two questions

The numbers below are illustrative, not measurements.

A refinery tank holds 80,000 m³ after receiving 50,000 m³ of light crude on top of a 30,000 m³ heel of heavy crude. Two people need a number from it.

The commercial question. The cargo was discharged through a pipeline with an automatic sampler, proven by water injection. Its receiver reports 0.30% sediment and water. If the receiver had been subsampled without mixing and reported 0.20%, the difference on the 50,000 m³ received would be 0.10% of the volume, or 50 m³ (about 315 barrels) of water paid for as oil. The fix is in D5854 mixing and in proving the sampler, not in a better water method.

The operational question. The planner needs to know what the CDU will receive over the next two days. A tank composite gives an average that matches the planning model. Upper, middle and lower samples, analysed separately, show densities of 848, 864 and 872 kg/m³ and sulfur rising with depth: the unit will first see the light crude and then the heavier one. The planner can mix the tank before drawing it, or plan the change in feed during the draw.

The automatic sampler answered the first question well and could not answer the second. The composite answered neither as well as the level samples did. In both cases the analytical method was the same; the sample decided the answer.

Where faster analysis fits

Faster analysis does not improve a sample. What it can change is how many samples a laboratory can afford to analyse. Level samples, before-and-after-mixing checks and every receipt instead of a selection all multiply laboratory work, and that workload is what pushes sites toward a single composite.

A benchtop NMR scan measures hydrogen content and the split between aromatic and aliphatic hydrogen directly, and properties such as API gravity, sulfur, acid number and distillation yields can be estimated from the same scan through a model, as our guide to benchtop NMR for petroleum labs explains. Water, sediment, salt and vapour pressure stay with their reference methods; the terms are defined in our crude oil analysis glossary. Any predicted value is reliable only within the range it was validated against the reference method, and our comparison of NIR and NMR for crude oil covers where each technique fits.

Rombo AI Platform is designed to estimate several crude properties from one benchtop NMR scan, with each property validated against your own ASTM methods and acceptance metrics agreed before the pilot. Applied to sampling, that means scanning each level sample and each receipt rather than only the composite, while the chemist decides which results go to the reference method. The crude oil monitoring use case shows the workflow. To check which properties are realistic for your crudes and your sampling points, start with a feasibility review. To receive new guides like this one, subscribe to the Rombo AI newsletter at the bottom of this page.

FAQ

What is the difference between ASTM D4057 and ASTM D4177?

ASTM D4057 (API MPMS Chapter 8.1) covers manual sampling: containers lowered into tanks or ships, taps and lines, including free water. ASTM D4177 (API MPMS Chapter 8.2) covers automatic sampling of a flowing stream in proportion to flow, including mixing, probe location, proving and monitoring. Both deliver the sample into the primary container; ASTM D5854 covers what happens after that.

Is a running sample the same as a tank composite?

No. A running or all-levels sample is collected while one container moves through the full depth, so it represents the column it passed through. A tank composite is prepared by combining upper, middle and lower spot samples in set proportions. In a stratified tank, neither shows the layers; only the spot samples analysed separately do.

Why is water in crude oil so hard to sample?

Water is denser than crude, so it settles in tanks and receivers and runs along the bottom of pipes at low flow. A representative water result needs a mixed stream at the probe, flow-proportional grabs, a mixed receiver before every split and a water method suited to the decision, such as distillation or Karl Fischer rather than the centrifuge when accuracy matters.

How often should an automatic sampler be proven?

ASTM D4177 includes acceptance tests and ongoing performance monitoring, and the interval is usually set by contract and site procedure. The Khark authors recommend including a water injection test in site acceptance testing; repeating it after changes to the line, the mixer or the flow range is a sensible rule.

Posted by: Martina [Marketing Specialist, Rombo AI]

BOOK A DEMO

Start with fit, then define the pilot

Share your analytical challenge with our team. We will assess technical fit, data or sample requirements, and the fastest path to a focused pilot.

Book a demo