ASME B31.4 & B31.8 Pipeline Codes — The Complete Engineer’s Guide

ASME B31.4 & B31.8 Pipeline Codes — Complete Engineer’s Guide | WeldFabWorld

ASME B31.4 & B31.8 Pipeline Codes — The Complete Engineer’s Guide

ASME B31.4 and B31.8 are the two pipeline design codes that govern the safe transportation of liquid hydrocarbons and gas across the world’s transmission networks. Whether you are sizing a crude oil trunkline, qualifying a girth weld procedure on a gas export line, or reviewing a pressure test protocol, the applicable code is either B31.4 — for liquid and slurry service — or B31.8 — for gas transmission and distribution. Understanding which code applies, what the design equations demand, and how the welding and inspection requirements differ from process piping codes such as ASME B31.3 is essential knowledge for every pipeline engineer and inspector.

This guide covers both codes in depth: their scope and applicability boundaries, the hoop stress and wall thickness design formulas, B31.8 class location requirements, permitted materials (API 5L line pipe grades), welding qualification under API 1104, non-destructive examination requirements, hydrostatic and pneumatic testing criteria, and a worked design example comparing the two codes side by side. A built-in wall thickness calculator lets you verify your own pipeline designs against B31.4 and B31.8 directly below.

Pipeline Wall Thickness Calculator — B31.4 / B31.8

Calculate minimum wall thickness and allowable operating pressure for liquid and gas pipelines per ASME B31.4 and B31.8.

Note: This calculator applies the Barlow-derived design formulas from ASME B31.4 Clause 403.2.1 and ASME B31.8 Section 841.11. Results are indicative; always verify against the applicable edition of the code. Mill tolerance is absorbed within the design factor for both codes.

The ASME B31 Code Family — Where B31.4 and B31.8 Fit

ASME B31 is the umbrella standard for pressure piping, divided into sections based on service type. The most relevant sections for oil and gas engineers are B31.1 (power plant piping), B31.3 (process piping in refineries and chemical plants), B31.4 (liquid transportation pipelines), and B31.8 (gas transmission and distribution). Understanding the jurisdictional boundary between these codes prevents costly errors — applying the wrong code to a piping system can lead to under- or over-designed walls and incorrect examination requirements.

B31 Code Jurisdiction Summary B31.1 — Steam and feedwater piping in power plants.
B31.3 — Piping within the fence of a refinery, chemical plant, terminal, or compressor station.
B31.4 — Cross-country and gathering pipelines transporting liquids and slurries.
B31.8 — Cross-country and distribution pipelines transporting gas (predominantly gaseous phase).
The fence-line or tie-in point of a facility is typically the handover boundary between B31.3 and B31.4 / B31.8.

The critical distinction from ASME B31.1 and B31.3 is that B31.4 and B31.8 are designed for long-distance cross-country operation, where cost optimisation over hundreds of kilometres dominates. Both codes use a percentage of the Specified Minimum Yield Strength (SMYS) as the design basis, rather than the fraction-of-UTS allowable stress approach used in B31.3. This yields more optimistic allowable stresses for the high-strength API 5L line pipe grades that are standard in pipeline construction.

PRODUCTION Wellhead / GOSP API 6A / 17D TRANSMISSION PIPELINE B31.4 — Liquids B31.8 — Gas ── Pipeline ── Facility Fence FACILITY PIPING B31.3 Process B31.1 Power POWER PLANT ASME B31.1 Fig. 1 — ASME B31 code jurisdiction from production through transmission pipeline to facility and power plant piping
Fig. 1 — Jurisdictional boundaries of ASME B31 pipeline and piping codes from production wellhead through cross-country pipeline to process facility and power plant.

ASME B31.4 — Liquid Pipeline Transportation Systems

Scope and Applicability

ASME B31.4 covers pipeline transportation systems for liquids and slurries. Its scope includes crude oil pipelines, refined petroleum product lines, liquefied petroleum gas (LPG) pipelines, anhydrous ammonia lines, carbon dioxide pipelines, and aqueous mineral slurry transportation. The code applies to all pipe, flanges, bolting, gaskets, valves, pressure relief devices, fittings, and other piping components and fabrications used in liquid service. It governs facilities from the pumping station outlet through to the receiving terminal, including all appurtenant above-ground and buried piping within those stations.

B31.4 does not apply to piping within a refinery, chemical plant, or LNG liquefaction facility — that is B31.3 territory. It also does not govern process piping within pumping or compressor stations themselves; the B31.4 / B31.3 boundary is typically the first isolation valve at the station fence.

B31.4 Scope in Brief Liquid pipelines between facilities — crude oil, refined products, LPG, ammonia, CO2, and mineral slurries. Includes gathering, trunkline, and distribution pipelines. Excludes piping within the fence of a processing plant (B31.3) and gas service lines (B31.8).

B31.4 Wall Thickness Design Formula

The required pressure design wall thickness under B31.4 is derived from the modified Barlow equation specified in Clause 403.2.1. The allowable hoop stress is taken as a fraction of the Specified Minimum Yield Strength (SMYS) of the pipe material, scaled by the design factor and weld joint factor.

ASME B31.4 Cl. 403.2.1 — Pressure Design Thickness t = (P × D) / (2 × S) where S = F × E × SMYS Definitions: t = pressure design wall thickness (mm) P = design gauge pressure (MPa) D = outside diameter of pipe (mm) S = allowable hoop stress (MPa) F = design factor (0.72 for main lines) E = weld joint factor (1.00 for seamless / API 5L ERW or SAW) SMYS = Specified Minimum Yield Strength of pipe material (MPa) Nominal Wall Thickness (add corrosion allowance): t_n = t + A A = sum of allowances: corrosion, erosion, threading, grooving (mm) Note: B31.4 does NOT add mill tolerance — the design factor absorbs it.
B31.4 vs B31.3: Key Wall Thickness Difference In ASME B31.3, you must divide the calculated minimum wall thickness by (1 − mill tolerance / 100) to compensate for the permissible undertolerance. In B31.4, this step is omitted because the 0.72 design factor already provides sufficient margin to absorb the standard API 5L mill tolerance of minus 0.5 mm or minus 0.4%, whichever is less for PSL 2 pipe.

B31.4 Design Factor

The design factor (F) in B31.4 is generally fixed at 0.72 for standard main-line segments. This means the allowable hoop stress is 72% of SMYS, providing an effective safety margin above yield. The factor is reduced in specific situations:

Location or ConditionDesign Factor FRationale
Standard main-line (onshore)0.72Normal service, rural or open terrain
Compressor / pump station piping0.60Higher consequence, manned facility
Highway, road, or rail crossing (cased)0.60Higher consequence crossing
Navigable waterway (major river) crossing0.60Environmental and public safety risk
Pressure vessel connections, pump nozzles0.50High integrity requirement

Worked Example — B31.4 Wall Thickness

Given: Pipeline: Crude oil export line, 16" NPS (D = 406.4 mm OD) Design pressure P = 8.0 MPa-g (80 bar-g) Material: API 5L X65, SMYS = 448 MPa Weld joint factor E = 1.00 (API 5L ERW / SAW) Design factor F = 0.72 (standard main line) Corrosion allowance A = 1.5 mm Step 1 — Allowable Hoop Stress: S = F × E × SMYS = 0.72 × 1.00 × 448 = 322.6 MPa Step 2 — Pressure Design Thickness: t = (P × D) / (2 × S) = (8.0 × 406.4) / (2 × 322.6) t = 3251.2 / 645.1 = 5.04 mm Step 3 — Nominal Wall Thickness: t_n = t + A = 5.04 + 1.5 = 6.54 mm Step 4 — Select Schedule from ASME B36.10M: NPS 16 — nearest wall equal to or greater than 6.54 mm Selected: 16″ × Sch 20 = 7.92 mm wall (MAOP check = OK) MAOP Verification: MAOP = (2 × S × t_n) / D = (2 × 322.6 × 7.92) / 406.4 = 12.57 MPa MAOP = 12.57 MPa > Design Pressure 8.0 MPa — ACCEPTABLE

ASME B31.8 — Gas Transmission and Distribution Systems

Scope and Applicability

ASME B31.8 covers the design, fabrication, installation, inspection, and testing of pipeline facilities used in the transmission and distribution of natural gas and other predominantly gaseous hydrocarbons. The scope includes gas transmission and gathering pipelines, gas compressor stations, metering and regulation stations, gas mains, and service lines extending from the pipeline to the customer meter outlet. It also covers offshore gathering and transmission pipelines connecting offshore production platforms to onshore terminals.

B31.8 Scope in Brief Gas pipelines and distribution networks. Covers onshore and offshore transmission, gathering, compressor stations, metering stations, and distribution mains to the customer meter. Does not cover piping within oil refineries or process plants (B31.3), liquids pipelines (B31.4), or LNG plant internal piping (NFPA 59A).

B31.8 Wall Thickness Design Formula

The wall thickness design formula in B31.8 Section 841.11 uses the same Barlow-derived equation as B31.4, but introduces two additional factors: the temperature derating factor T and the class-location-dependent design factor F.

ASME B31.8 Section 841.11 — Design Pressure Formula P = (2 × S × t × F × E × T) / D Rearranged for minimum wall thickness: t = (P × D) / (2 × S × F × E × T) Definitions: P = design gauge pressure (MPa) S = SMYS of pipe material (MPa) t = design wall thickness (mm) D = outside diameter (mm) F = design factor (see Class Location table below) E = longitudinal joint factor (1.00 for seamless / API 5L) T = temperature derating factor (1.0 below 121°C / 250°F)

Class Location — B31.8’s Population-Based Safety Factor

The most distinctive feature of B31.8 is the class location system, which mandates progressively thicker walls as pipelines pass through more densely populated areas. Class location is determined by counting the number of buildings intended for human occupancy within a 1-mile (1.6 km) sliding window centred on the pipeline route, extending 220 yards (200 m) either side of the centreline.

Class Location Building Count
(per 1-mile window)
Typical Environment Design Factor F Max Hoop Stress
(% SMYS)
Class 1 — Div. 1 ≤ 10 Desert, farmland, wasteland 0.72 72%
Class 1 — Div. 2 ≤ 10 Rural — tested to 1.25× MAOP 0.80 80% (post-test only)
Class 2 10 – 46 Fringe of towns, industrial areas 0.60 60%
Class 3 ≥ 46 Suburban residential, schools, hospitals 0.50 50%
Class 4 Multi-storey buildings prevail Urban, dense city areas 0.40 40%
Class Change Obligations If urban or suburban development near an existing pipeline segment causes a class location upgrade — for example, from Class 1 to Class 2 — the operator must conduct a pressure test of that segment at the new class test pressure, reduce the MAOP to the value the existing wall thickness can sustain at the new design factor, or replace the pipe with heavier wall material. This can be a significant cost for aging infrastructure.

Worked Example — B31.8 Wall Thickness (Class 3)

Given: Gas transmission line, 20" NPS (D = 508.0 mm OD) Design pressure P = 7.0 MPa-g (70 bar-g) Material: API 5L X65, SMYS = 448 MPa Joint factor E = 1.00 (seamless or API 5L ERW/SAW) Temperature factor T = 1.00 (below 121°C) Class Location: Class 3 (suburban) — F = 0.50 Corrosion allowance A = 1.0 mm Step 1 — Pressure Design Thickness: t = (P × D) / (2 × SMYS × F × E × T) t = (7.0 × 508.0) / (2 × 448 × 0.50 × 1.00 × 1.00) t = 3556.0 / 448.0 = 7.94 mm Step 2 — Add Corrosion Allowance: t_n = 7.94 + 1.0 = 8.94 mm Step 3 — Select Wall from ASME B36.10M: NPS 20 Sch 20 = 9.53 mm wall > 8.94 mm required Selected: 20″ × Sch 20 = 9.53 mm — ACCEPTABLE Compare: Same pipe in Class 1 (F = 0.72): t = (7.0 × 508.0) / (2 × 448 × 0.72) = 3556.0 / 645.1 = 5.51 mm Class 1 wall = 5.51 + 1.0 = 6.51 mm → Select Sch 10 (6.35 mm) or Sch 20 Class 3 requires ~44% more wall thickness than Class 1 for the same pipe and pressure.
Wall Thickness Comparison — 20″ API 5L X65 at 70 bar ASME B31.4 vs B31.8 Class Locations (corrosion allowance = 1.0 mm not included) 0 2 4 6 8 10 mm 5.51 mm B31.4 F=0.72 5.51 mm B31.8 C1 F=0.72 6.61 mm B31.8 C2 F=0.60 7.94 mm B31.8 C3 F=0.50 9.92 mm B31.8 C4 F=0.40
Fig. 2 — Required wall thickness (excluding corrosion allowance) for a 20″ NPS API 5L X65 pipeline at 70 bar design pressure under ASME B31.4 (F = 0.72) and B31.8 Class 1 through Class 4. Class 4 urban routing demands nearly twice the wall of a rural Class 1 segment.

Materials — API 5L Line Pipe Grades

Both codes primarily reference API 5L Specification for Line Pipe as the governing material standard. API 5L defines two Product Specification Levels: PSL 1 (basic) and PSL 2 (enhanced chemical composition limits, impact testing, and dimensional controls). Offshore and high-consequence applications almost exclusively use PSL 2 pipe. The grade designation is based on SMYS in thousands of psi — X65 has SMYS of 65,000 psi (448 MPa).

API 5L Grade SMYS (MPa) SMYS (psi) SMTS (MPa) Typical Application
Gr. B24135,000414Low-pressure gathering, distribution
X4228942,000414Older trunk lines, repairs
X5235852,000455Mid-pressure liquid lines
X6041360,000517General transmission
X6544865,000530Most common transmission grade
X7048370,000565High-pressure trunklines
X8055280,000620Ultra-high pressure, large diameter

Higher strength grades reduce wall thickness for a given diameter and pressure, cutting steel tonnage and weight. However, X70 and X80 require tighter heat input control during welding to avoid HAZ softening — see the discussion of microstructural control in high-strength steels. Carbon equivalent (CE) compliance must be verified; use the carbon equivalent calculator to confirm preheat adequacy.

Sour Service Considerations For pipelines handling wet sour gas (H2S > 0.0003 MPa partial pressure) or liquid hydrocarbons with dissolved H2S, additional material requirements apply per NACE MR0175 / ISO 15156. Hardness limits (maximum 22 HRC or 250 HV) apply to weld metal, HAZ, and base metal. API 5L PSL 2 sour service pipe (suffix S) has controlled chemistry to limit susceptibility to hydrogen-induced cracking (HIC) and sulphide stress cracking (SSC). For further detail, refer to the sour service welding guide.

Welding Requirements — API 1104

Unlike process piping (B31.3 / B31.1), which references ASME Section IX for welding qualification, both B31.4 and B31.8 reference API 1104 — Welding of Pipelines and Related Facilities as the governing welding standard for field girth welds. API 1104 governs welding procedure specification (WPS) development and qualification, welder performance qualification, in-process inspection, radiographic testing procedures and acceptance criteria, and weld repair requirements.

API 1104 Welding Procedure Qualification

A welding procedure specification (WPS) under API 1104 must be qualified by a procedure qualification record (PQR) demonstrating satisfactory mechanical test results. Qualification tests include:

  • Nick-break test — evaluates weld root and fill for internal soundness
  • Tensile test — confirms weld tensile strength at least equals pipe SMYS
  • Guided bend test — evaluates ductility and fusion of root and face
  • Charpy V-notch impact test (when required by pipe specification or purchaser)

Essential variables in API 1104 WPS qualification include pipe grade and wall thickness range, joint design (bevel angle, root gap, root face), welding process, electrode/wire classification, shielding gas type and flow, direction of welding (downhill or uphill), and preheat range.

Downhill vs Uphill Welding — Pipeline-Specific Issue Pipeline girth welds are frequently welded downhill (6G downhill, stovepipe technique) using cellulosic E6010 electrodes for speed. Downhill welding with low-hydrogen electrodes is explicitly addressed in API 1104. Uphill (conventional SMAW with E7018) is also used, particularly on high-strength grades or sour service pipe where low-hydrogen deposits are mandatory. The SMAW welding guide covers electrode selection for both techniques.

API 1104 NDT and Acceptance Criteria

API 1104 Section 9 specifies radiographic examination acceptance criteria. For production welds, radiographic testing is mandatory for the percentage of welds specified in the applicable code (B31.4 or B31.8) and the project specification. Acceptance criteria cover burn-through, incomplete fusion, incomplete penetration, internal concavity, slag inclusions, and porosity. For PAUT and TOFD used as alternatives to radiography, API 1104 Appendix A provides acceptance criteria — see the pipe wall thickness guide for context on how defect location relative to wall thickness influences fitness for service.

Examination and Testing Requirements

Non-Destructive Examination

Both B31.4 and B31.8 require radiographic examination or an acceptable alternative (PAUT, TOFD) for girth welds. The minimum radiography percentage depends on the code, class location (B31.8), and project specification. B31.8 Class 3 and 4 areas typically require 100% RT or UT of all girth welds. Lower class locations may permit spot radiography at a minimum of 10% of welds, though most operators specify higher percentages on high-pressure lines.

Hydrostatic Test Requirements

Code Test Medium Minimum Test Pressure Hold Duration
B31.4 Water (preferred); hydrocarbons permitted 1.25 × MOP (for all new pipelines) Minimum 4 hours (pipelines); 1 hour (facility piping)
B31.8 Class 1 Div 1 Water or gas 1.10 × MAOP (gas test); 1.25 × MAOP (water test) Minimum 8 hours
B31.8 Class 1 Div 2 Water preferred 1.25 × MAOP Minimum 8 hours
B31.8 Class 2, 3, 4 Water preferred 1.25 × MAOP Minimum 8 hours
Surge Pressure Limit — B31.4 ASME B31.4 limits surge (transient) pressure to a maximum of 110% of the Maximum Operating Pressure (MOP). Liquid pipelines are susceptible to water-hammer events caused by sudden valve closure. Pipeline designers must assess surge conditions and provide adequate pressure relief or surge mitigation (e.g., slow-closing valves, surge relief tanks) to prevent exceedance of the 110% surge limit.

Key Code Comparison — B31.4 vs B31.8 vs B31.3

Feature ASME B31.4 (Liquid) ASME B31.8 (Gas) ASME B31.3 (Process)
Fluid service Liquids, slurries Gas (predominantly) All process fluids
Design basis % SMYS (F = 0.72) % SMYS (F = 0.40–0.72) Fraction of UTS or yield
Safety factor / design factor Fixed 0.72 Class-dependent 0.40–0.72 S = min(UTS/3, 2/3 yield)
Mill tolerance treatment Absorbed in F Absorbed in F Explicit divide-by-(1-MT)
Welding qualification API 1104 API 1104 ASME Section IX
Typical pipe material API 5L line pipe API 5L line pipe ASTM A106, A53, A335
Hydrostatic test 1.25 × MOP, 4 hr 1.10–1.25 × MAOP, 8 hr 1.5 × design P (min 10 min)
Surge limit 110% of MOP Not applicable (gas) 133% of design P (B31.3 App. F)
Population-based design factor No Yes (Class Location) No

For engineers moving between process piping and pipeline work, the most significant difference is the welding qualification standard: ASME Section IX qualifications do not automatically satisfy API 1104 requirements. A welder or welding procedure qualified under Section IX for B31.3 piping work must be separately qualified under API 1104 to work on B31.4 or B31.8 pipeline girth welds. Review the P-Number and F-Number guide to understand how material groupings differ between the two qualification systems.

DOT Regulatory Integration — 49 CFR Parts 192 and 195

In the United States, B31.4 and B31.8 are legally mandated through Department of Transportation regulations. 49 CFR Part 195 (Hazardous Liquid Pipelines) incorporates B31.4 by reference as the design basis for liquid pipelines. 49 CFR Part 192 (Gas Transmission and Distribution) incorporates B31.8 in the same manner for gas pipelines. The DOT regulations do not duplicate code requirements — they invoke the B31 codes as the minimum standard and add operational requirements such as cathodic protection, leak detection, and integrity management programmes.

Outside the United States, many jurisdictions adopt or adapt B31.4 and B31.8 directly, or use equivalent national standards such as CSA Z662 (Canada), AS 2885 (Australia), or EN 14161 (Europe). The design principles are consistent, though specific safety factors and test requirements may vary.

ASME B31.8S — Integrity Management

ASME B31.8S is a supplement to B31.8 that provides guidance on the integrity management of natural gas transmission pipelines. It defines methodologies for identifying threats (corrosion, mechanical damage, stress corrosion cracking), assessing risk, and establishing inspection intervals using ILI (in-line inspection) tools, pressure testing, and direct assessment techniques. B31.8S works alongside B31G (fitness-for-service assessment of corrosion defects) and ASME B31Q (pipeline personnel qualification). Understanding B31.8S is increasingly important as regulatory focus shifts toward pipeline safety in High Consequence Areas (HCAs).

Recommended Reference Books

ASME B31.4 Pipeline Transportation Code

Official ASME B31.4 code covering liquid and slurry pipeline design, construction, and maintenance requirements.

View on Amazon

ASME B31.8 Gas Transmission Code

Official ASME B31.8 standard for gas transmission and distribution piping systems design and operation.

View on Amazon

API 1104 Welding of Pipelines

The definitive pipeline welding standard covering WPS qualification, welder certification, inspection, and acceptance criteria for girth welds.

View on Amazon

Pipeline Engineering & Design

Practical engineering reference covering pipeline hydraulics, wall thickness design, stress analysis, and cross-country pipeline construction practices.

View on Amazon

Disclosure: WeldFabWorld participates in the Amazon Associates programme (StoreID: neha0fe8-21). If you purchase through these links, we may earn a small commission at no extra cost to you. This helps support free technical content on this site.

Frequently Asked Questions

What is the difference between ASME B31.4 and B31.8?

ASME B31.4 governs liquid and slurry pipeline transportation systems — including crude oil, refined petroleum products, LPG, anhydrous ammonia, carbon dioxide, and aqueous mineral slurries. ASME B31.8 governs gas transmission and distribution piping systems transporting products that are predominantly in the gaseous phase, including natural gas, sour gas, and LNG vapour.

The key design difference is that B31.4 uses a fixed design factor (F = 0.72 for main lines), while B31.8 uses a variable design factor (0.72, 0.60, 0.50, or 0.40) tied to class location based on population density near the pipeline route. Both codes reference B31.3 as the boundary code for piping within processing facilities.

What is the hoop stress formula used in ASME B31.4 and B31.8?

Both codes derive required wall thickness from the Barlow equation modified by code-specific safety factors. In B31.4: t = (P × D) / (2 × S), where S = F × E × SMYS (F = 0.72, E = weld joint factor). In B31.8: t = (P × D) / (2 × SMYS × F × E × T), where F is the class location design factor, E is the longitudinal joint factor, and T is the temperature derating factor (1.0 below 121°C / 250°F).

Both formulas use the outside diameter D, making them conservative compared to mean-diameter methods. The calculator at the top of this page implements both formulas with step-by-step workings. For process piping, compare with the B31.3 / B31.1 wall thickness calculator.

What are ASME B31.8 class locations and how do they affect design?

Class locations categorise pipeline route sections by population density using a 1-mile (1.6 km) sliding window, counting buildings intended for human occupancy within 220 yards either side. Class 1 (≤ 10 buildings) permits F = 0.72; Class 2 (10–46 buildings) requires F = 0.60; Class 3 (≥ 46 buildings, schools, hospitals) requires F = 0.50; Class 4 (multi-storey buildings prevail) requires F = 0.40.

A lower design factor mandates a thicker pipe wall. If development near an existing pipeline causes a class upgrade, the operator must pressure-test the segment at the new class test pressure, reduce the MAOP, or replace the pipe. This is a significant lifecycle cost consideration for pipelines designed close to populated areas.

Does ASME B31.4 or B31.8 govern pipeline welding, or does API 1104 apply?

Both ASME B31.4 and B31.8 reference API 1104 (Welding of Pipelines and Related Facilities) as the governing welding standard for pipeline girth welds. API 1104 covers WPS qualification, welder performance qualification, radiographic and ultrasonic examination, and acceptance criteria for pipeline field joints. ASME Section IX qualifications are not automatically transferable to pipeline work.

Facility piping attached to the pipeline — within compressor stations, metering stations — may revert to ASME Section IX under B31.3 jurisdiction, depending on the tie-in point. For SMAW electrode selection on pipeline girth welds, cellulosic E6010 is standard for root passes in downhill welding, with E7018 fill and cap for uphill or when low-hydrogen deposits are required.

What materials are permitted under ASME B31.4 and B31.8?

The primary line pipe material for both codes is API 5L specification steel, from Gr. B (SMYS 241 MPa) through X42, X52, X60, X65, X70, and X80. Higher strength grades allow thinner walls for the same design pressure. PSL 2 pipe is preferred for high-consequence and offshore applications, offering tighter chemical composition controls, mandatory impact testing, and tighter dimensional tolerances.

Both codes also permit ASTM A53, A106, and A333 for specific applications. For sour service lines (H2S-containing fluids), use API 5L PSL 2 sour service pipe conforming to NACE MR0175 / ISO 15156 hardness and composition requirements. Review the sour service guide for detailed requirements.

What are the hydrostatic test pressure requirements for B31.4 and B31.8 pipelines?

Under ASME B31.4, the hydrostatic test pressure must be at least 1.25 times the MOP, held for a minimum of 4 hours for pipelines. Under ASME B31.8, Class 1 Division 1 permits a gas strength test at 1.10 × MAOP; all other class locations require 1.25 × MAOP as the minimum test pressure, held for 8 hours. Water is the preferred test medium for both codes.

B31.4 also limits surge pressures to 110% of MOP, which requires surge analysis and mitigation for liquid pipelines. B31.3 process piping uses a higher test factor of 1.5 × design pressure, reflecting its more conservative allowable stress basis and the greater variety of fluid services covered. See the comparison with B31.1 vs B31.3 testing requirements for further context.

Is PWHT required for pipeline welds under B31.4 or B31.8?

PWHT is not routinely required for most pipeline welds under B31.4 and B31.8. Pipeline construction typically involves API 5L carbon steel grades where PWHT is not mandatory, provided the welding procedure controls preheat and interpass temperature appropriately. For sour service or high-strength (X70, X80) grades, preheat is critical to limit HAZ hardness below 250 HV, which effectively reduces the need for PWHT in most cases.

For P91 and other alloy steels used in compressor station facility piping (governed by B31.3), full PWHT is mandatory — see the P91 welding guide. Thermal cycle effects on microstructure must always be considered when specifying heat treatment for higher-alloy pipeline components.

How does the B31.8 design factor differ for offshore versus onshore pipelines?

For onshore pipelines, B31.8 ties the design factor to class location (0.72 down to 0.40). For offshore gathering and transmission pipelines, B31.8 Chapter VIII applies, typically permitting F = 0.72. However, many offshore pipeline projects in international jurisdictions use DNV-ST-F101 (Submarine Pipeline Systems), which employs a limit-state design philosophy with separate checks for pressure containment, local buckling, and fatigue — a fundamentally different approach from the permissible-stress basis of B31.8.

Engineers working on offshore projects should confirm which code the project specification mandates before proceeding. DNV-ST-F101 may allow thinner walls in some loading scenarios but imposes additional reeling, installation, and on-bottom stability checks that B31.8 does not address. For corrosion assessment of existing offshore lines, B31G and API 579 are the relevant fitness-for-service tools.

Related Articles on WeldFabWorld