Pipe Stress Calculator — Thermal Expansion, Wall Thickness & Flexibility (ASME B31.3)
Governing standard: ASME B31.3· ASME B31.3-2022 Process Piping — §304 wall thickness, §319 thermal expansion, §302.3.5(d) displacement-stress allowable, Appendix D SIF/flexibility factors
Page last updated
The MechanixCalc pipe stress calculator sizes and checks process piping to ASME B31.3 — the governing code for chemical-plant, refinery and general process piping. Enter the pipe geometry (OD, schedule, material), operating temperature, design pressure and end conditions, and the tool returns the free thermal expansion, the restrained thermal stress and axial thrust force, the minimum wall thickness from the B31.3 pressure equation, expansion loop dimensions, and the B31.3 displacement-stress-range check, all in one pass. It does not evaluate the §319.4.1(c) formal-analysis screening criterion, which needs the routed geometry and the resultant displacement strain.
It is built for mechanical and piping engineers who need a quick, standards-cited first check on a new pipe run — thermal growth in a steam, hot-oil or cryogenic line; wall thickness selection for a high-pressure service; or loop sizing to absorb expansion before handing the system to a full Caesar II flexibility model. The headline safety factor is a screening check against the material's yield strength, not a B31.3 acceptance criterion: B31.3 treats thermal expansion stress as secondary and self-limiting and allows it above yield, so the code check is the separate expansion-stress-range panel. The fatigue and support-span panels are engineering estimates and are disclaimed accordingly; the thermal, wall-thickness and B31.3 expansion-stress panels are derived directly from the code equations.
What this calculator does
- ASME B31.3 thermal expansion stress and axial thrust force for fully restrained or free-end pipe runs
- Minimum wall thickness from B31.3 Eq. (3a) with corrosion allowance, mill tolerance and weld-joint quality factor
- Expansion loop height and width sizing (Kellogg guided-cantilever method, closed-form, with correct E-dependence)
- ASME B31.3 §302.3.5(d) displacement-stress-range check S_E ≤ f·[1.25(S_c+S_h) − S_L], and Appendix D SIF/flexibility factors for bends
- Support span optimisation to the ASME B31.1 §121.5 / MSS SP-69 basis (2.5 mm sag plus a bending-stress limit) for insulated, fluid-filled pipe
- Pressure-cycling fatigue life estimate for welded pipe (S-N method, flagged as engineering estimate)
- Branded PDF engineering report with method references and full input/output table
Method & formulas
Thermal expansion and restrained-pipe stress (ASME B31.3 §319)
When a pipe run is fully restrained at both ends it cannot expand freely, so the thermal growth that would otherwise occur is converted into a compressive — or, on a cool-down, tensile — axial stress. The magnitude is the product of the elastic modulus, the thermal expansion coefficient and the temperature change. For typical carbon steel at 80 °C above ambient this stress is about 198 MPa, close to the yield strength of mild steel: acceptable for a single excursion under the code's treatment of self-limiting secondary stress, but potentially damaging in fatigue over many cycles. The sign does not change the exposure — a line running 80 °C BELOW its installation temperature carries the same magnitude in tension. When one or both ends are free the pipe expands without stress and the calculated free growth ΔL determines the space or expansion accommodation required.
ΔL = α · L · ΔTwhere ΔL = free elongation (mm); α = coefficient of thermal expansion (/°C); L = pipe length (mm); ΔT = T_operating − T_install (°C)
σ_th = E · α · ΔTwhere σ_th = thermal stress (MPa); E = elastic modulus (MPa); α = thermal expansion coefficient (/°C); ΔT = temperature rise (°C). Axial thrust F_th = σ_th · A_cross (N), where A_cross is the pipe annular area (mm²).
Pressure wall thickness (ASME B31.3 §304, Eq. 3a)
The B31.3 pressure-design equation derives the minimum wall thickness from the internal pressure, the pipe outside diameter, the material allowable stress at design temperature (Table A-1), the weld-joint quality factor and a temperature-dependent Y coefficient. The calculator adds the corrosion/erosion allowance and then divides by the mill-tolerance factor to give the minimum purchased wall, then rounds up to the next wall in a generic metric thickness series — not a pipe-schedule table, so confirm the schedule wall for your size. The allowable pressure at that wall is reported, along with the §345.4.2(a) hydrostatic-test FLOOR of 1.5 × design pressure — note that §345.4.2(b) requires this to be multiplied by the ratio of the allowable stress at test temperature to that at design temperature (capped at 6.5) whenever the design temperature is the higher of the two, which raises the required test pressure.
t_min = P · D / (2 · (S · E_w + P · Y)) + c_awhere t_min = minimum calculated wall (mm); P = design pressure (MPa); D = outside diameter (mm); S = allowable stress at design temperature (MPa, from B31.3 Table A-1); E_w = weld-joint quality factor (1.0 seamless, 0.85 ERW); Y = Y coefficient (0.4 ferritic ≤480 °C); c_a = corrosion allowance (mm). Required wall t_req = t_min / (1 − mill_tol/100).
Expansion loop sizing and flexibility (Kellogg / B31.3 §319 & Appendix D)
When the restrained thermal stress exceeds the allowable expansion-stress range, an expansion loop or bend is added so the pipe can flex. The loop leg length is derived from the guided-cantilever beam model: a leg that must absorb the full thermal displacement develops an end bending moment M = 6·E·I·Δ/L², and setting the resulting fibre stress equal to the allowable gives the minimum leg length in closed form. The B31.3 Appendix D SIF and flexibility-factor formulas for bends (h = T·R/r_mean²; k = 1.65/h; i = 0.9/h^(2/3)) are used for the flexibility analysis panel. Note that the flexibility/SIF panel and the fatigue panel are engineering estimates and carry the in-product EstimateBadge.
L_leg = √(3 · E · OD · Δ / σ_allow)where L_leg = minimum loop leg length (mm); E = elastic modulus (MPa); OD = pipe outside diameter (mm); Δ = thermal displacement to absorb (mm); σ_allow = allowable bending stress (MPa). Loop width W = L_leg/2; total loop pipe length ≈ 2·L_leg + W + 2·R_bend.
Worked example
Estimate the restrained thermal stress and axial thrust in a DN100 (OD 114.3 mm, wall 6.02 mm, Schedule 40) carbon-steel steam-condensate return line heated from 15 °C at installation to 95 °C at operating temperature, with both ends anchored.
Given
- Pipe OD114.3 mm (DN100 Sch 40)
- Wall thickness t6.02 mm
- Installation temperature T_inst15 °C
- Operating temperature T_op95 °C
- MaterialCarbon steel (E = 206 000 MPa, α = 12×10⁻⁶ /°C, Sy = 250 MPa)
- End conditionBoth anchored (fully restrained)
Result
- Free expansion ΔL (20 m run)19.2 mm
- Restrained thermal stress σ_th197.8 MPa
- Axial thrust force F_th≈ 405 kN
- Safety factor vs yield (Sy = 250 MPa)1.26
- Compute the temperature rise: ΔT = T_op − T_inst = 95 − 15 = 80 °C.
- Free thermal expansion (if unrestrained): ΔL = α · L · ΔT. For a 20 m run: ΔL = 12×10⁻⁶ × 20 000 mm × 80 = 19.2 mm.
- Restrained thermal stress: σ_th = E · α · ΔT = 206 000 × 12×10⁻⁶ × 80 = 197.8 MPa (compressive on heat-up).
- Pipe annular cross-section: ID = OD − 2t = 114.3 − 2×6.02 = 102.26 mm. A = π/4 × (114.3² − 102.26²) = π/4 × (13064.49 − 10457.12) = π/4 × 2607.37 ≈ 2047.8 mm².
- Axial thrust force: F_th = σ_th × A = 197.8 × 2047.8 ≈ 405 000 N ≈ 405 kN on each anchor.
- Safety factor against yield from the thermal stress alone: SF = Sy / |σ_th| = 250 / 197.8 = 1.26.
This is an illustrative single-segment estimate, and every figure above is what the shipped engine returns for those inputs. At SF = 1.26 the pipe is close to yielding on the first heat-up. That is not automatically a code failure — ASME B31.3 §302.3.5(d) treats expansion stress as secondary and self-limiting and allows S_E up to S_A = f·[1.25·(S_c+S_h) − S_L], which is usually well above yield — but it does mean the run has almost no flexibility, so run the B31.3 expansion-stress check and consider a loop or bellows if thermal cycling is frequent. Note also that the stress is TENSILE if the line runs colder than it was installed, and the calculator screens on the magnitude either way.
Frequently asked questions
Which standard does this pipe stress calculator use?
The primary calculations follow ASME B31.3-2022 Process Piping: §319 for thermal expansion and restrained-pipe stress, §304 (Eq. 3a) for pressure wall thickness, §319.4.4 with the §302.3.5(d) allowable for the displacement-stress-range check, and Appendix D for bend SIF and flexibility factors. Support spacing follows ASME B31.1 §121.5 / MSS SP-69, because B31.3 publishes no spacing table. The support-span, fatigue and flexibility-SIF panels are engineering estimates disclaimed in-product; the thermal, wall-thickness and expansion-stress panels are standard-code equations.
What is the difference between free expansion and restrained stress?
Free expansion (ΔL = α·L·ΔT) is the dimensional change that occurs when a pipe heats up with at least one free end — no stress is generated, but the movement must be accommodated. Restrained stress (σ_th = E·α·ΔT) develops when both ends are anchored and the pipe cannot move; for carbon steel at an 80 °C rise this is about 198 MPa, approaching the yield stress of mild steel. It is compressive on a heat-up and tensile on a cool-down — a chilled or cryogenic anchored line is exposed just as much as a hot one, and the calculator screens on the magnitude in both directions. The calculator reports both, along with the resulting axial thrust force on the anchors.
When do I need a full Caesar II flexibility analysis rather than this calculator?
ASME B31.3 §319.4.1 requires a formal flexibility analysis unless the system is a duplicate of one already proven, can be judged adequate by comparison with a previously analysed system, or satisfies the empirical screening criterion in §319.4.1(c): D·y/(L−U)² ≤ 208 000, where D is the outside diameter in mm, y the resultant of the total displacement strains in mm, and L and U are the developed pipe length and the straight-line anchor distance in metres. That criterion applies only to a system of uniform size with no more than two anchors, no intermediate restraints and no significant cyclic service. This calculator does NOT evaluate it — it has no input for the displacement strain y or the routed geometry, so work it out from your isometric. For multi-branch, high-nozzle-load, rotating-equipment, lethal-service or seismic systems, a Caesar II model with a licensed PE review is required regardless of the screening number.
Are the expansion loop and fatigue results code-validated?
The expansion-loop leg length uses the Kellogg guided-cantilever closed form, which is consistent with ASME B31.3 §319 flexibility intent and is conservative (full displacement on one leg). The flexibility/SIF panel (Appendix D formulas) has been verified to the code for the elbow case; the tee SIF is an approximate 1.3× multiplier and is flagged as an engineering estimate, as is the 0.72×Sy line the bending stress is screened against — that is a B31.4/B31.8 pipeline design factor, not a B31.3 limit. The support-span panel follows the ASME B31.1 §121.5 / MSS SP-69 basis and is likewise flagged. The fatigue panel (S-N with a weld stress-concentration factor) is an engineering estimate — it is not a code fatigue curve; use ASME Section VIII Div. 2 Part 5 for that. Each of these carries an EstimateBadge in the product.
Is the pipe stress calculator free?
You can run it during a free 30-minute preview with no sign-up required, and a free 14-day account trial gives full access to every calculator with no credit card needed. The branded PDF engineering report and saved calculations are included in the free 14-day trial and in every paid plan.
Related calculators
- Pipe Flow (Darcy-Weisbach / Moody)Pressure-drop and flow-rate sizing for the same pipe geometry and fluid.
- Pipe & Flange ReferenceLook up OD, schedule wall thicknesses and DN/NPS equivalences for any pipe size.
- Hydraulic CylindersPressure-vessel design for hydraulic actuators — same thin-wall hoop-stress basis.
- Hydraulic AccumulatorPressure-vessel sizing and pre-charge calculations for hydraulic systems.
- Heat ExchangerThermal duty and pressure-drop design for the process side of heat exchangers in the same piping system.
Run the Pipe Stress on your own numbers
Free 30-minute preview — no sign-up. A free 14-day account trial unlocks every tool and the branded PDF report, no credit card required.
Start freeUsing MechanixCalc at work? See plans & pricing — one subscription unlocks all 50 calculators, PDF reports and saved projects.