PECalcStudio Pecalcstudio.com

PECalcStudio · Articles

Article

ASME B31.3 vs B31.4 vs B31.8: which piping code governs your line?

Three codes, one family, different services. The code follows the fluid and the facility — not the pipe material, not the diameter, and not the engineer's preference.

One family, different services

The ASME B31 codes are a family of piping codes sharing a common ancestry and much common language, written for different services. The code that governs a line is decided by what the line carries and where it runs — the service, the fluid, and the facility type — and that decision is usually made long before any calculation starts, by the project specification or the regulatory regime. An engineer does not generally “choose” a B31 code the way they choose a calculation method; they determine which one applies and then work within it.

Two other members of the family cause most of the confusion. B31.1 covers power piping — boiler and power-plant piping — and is the code for steam and power service inside power stations. B31.9 covers building services piping. If your line is neither power-plant nor building-services piping, the decision is usually among B31.3, B31.4, and B31.8.

B31.3 — process piping

B31.3 governs process piping: refineries, chemical and petrochemical plants, pharmaceutical and food-processing facilities, and similar industrial installations. It is the broadest and most detailed of the three, with extensive rules for materials, design (including flexibility analysis), fabrication, examination, and testing, and it is written for the wide range of fluids — flammable, toxic, corrosive, cryogenic — found in process plants. If the line is inside a process facility and carries a process fluid, B31.3 is usually the answer. Its flexibility-analysis requirements are the most demanding of the three, and its testing rules (including the 1.5-times hydrostatic and 1.1-times pneumatic test-pressure factors commonly cited) reflect the hazards of process service.

B31.4 — liquid pipelines

B31.4 governs pipeline transportation systems for liquids: crude oil, liquid petroleum products, liquid hydrocarbons, liquefied petroleum gas, anhydrous ammonia, alcohols, and carbon dioxide in liquid form, moving between facilities over distance. The emphasis is on long cross-country and gathering lines rather than in-plant piping, with rules shaped by that service — location and construction considerations for buried lines, a 0.72 design factor that appears throughout its stress rules, and testing and operation requirements written for pipeline systems. A liquid line inside a refinery battery limit is generally B31.3; the same liquid in a transmission pipeline leaving the plant is generally B31.4. The boundary is a project decision, documented in the design basis.

B31.8 — gas pipelines

B31.8 governs gas transmission and distribution piping: natural gas and other fuel gases moving through transmission lines, distribution mains, and gathering systems. Its most distinctive feature is the location-class system — design factors of 0.72, 0.60, 0.50, and 0.40 tied to how populated the area is — which directly sets the allowable stress and therefore the wall thickness for a given pressure. A gas line through a rural area and the same line through a town are designed to different factors under the same code, which is a concept neither B31.3 nor B31.4 uses in the same way.

How to decide

  • What is the fluid? Process chemicals, steam, and plant utilities point to B31.3 (or B31.1 for power). Liquid hydrocarbons in transport point to B31.4. Fuel gas in transport or distribution points to B31.8.
  • Where does the line run? Inside a process facility, B31.3 usually governs up to the battery limit. Between facilities, over distance, or in public rights-of-way, B31.4 or B31.8 usually takes over.
  • What does the design basis say? The project specification or the operator's standard states the governing code. If it does not, that is a question to settle with the responsible engineer before calculating — not a detail to resolve by picking the code with the friendlier numbers.
  • What does the regulator require? Pipeline safety regulations in many jurisdictions incorporate specific B31 codes by reference for transportation pipelines. Regulatory applicability can override a project preference.

When the answer is genuinely ambiguous — a line at a facility boundary, a mixed service, a plant-to-pipeline transition — document the decision and its basis in the calculation package. The worst outcome is not picking the “harder” code; it is calculating under one code while the line is inspected, tested, and operated under another.

The calculators on this site are code-method tools, not code determinations. The external-pressure guide and the virtual-anchor-length guide both touch code selection for their specific checks; the governing code for the line itself is a project decision that comes first.

These articles are general engineering information, not engineering advice for a specific project. Verify all results against the applicable codes and standards for your project. PECalcStudio's tools are calculation aids, not engineering services — see the Privacy & Terms page.