Pressure Vessel & Pipes Matlab GUI

vibrationdata_pressure is a Matlab GUI for pressure vessels, boilers and piping. It brings twenty calculations together in one window, from membrane and thick-wall stresses and ASME code thickness checks to steam, safety valves, pipe pressure drop, water hammer and pipe span frequencies. It follows the same layout as the vibrationdata_bolts, vibrationdata_fluids and vibrationdata_rocket apps.

Update, November 28, 2026 (ver 1.4): a new Fluid Dynamics button opens the vibrationdata_fluids GUI. The two apps are otherwise independent, and each has its own download. This version requires Matlab R2026b, or the free MATLAB Runtime R2026b for the stand-alone executable.

Update, November 22, 2026 (ver 1.3): switching units now converts preset values (material and fluid properties) without rounding.

Download:
vibrationdata_pressure_11_28_26.zip: Matlab source (about 9.2 MB). Unzip into one folder and run vibrationdata_pressure in Matlab.
vibrationdata_pressure_sa_11_28_26.zip: Stand-alone Windows executable (about 9.7 MB). This version does not need Matlab, but it needs the free MATLAB Runtime R2026b.

Worked examples: vibrationdata_pressure_worked_examples_revC.pptx (PowerPoint, 21 slides). Five examples run through the GUI and checked against hand calculations: the Lamé thick-wall cylinder, an ASME VIII UG-27 shell, B31.3 pipe wall thickness, pipe span frequency and a 2:1 ellipsoidal head.

The app requires Matlab R2026b or later. It uses base Matlab only, with no toolboxes. The source zip contains the app, the equation images and the equations PDF.

TWENTY CALCULATIONS

A Select Function list on the left side of the window opens the tab for each calculation.

Pressure vessels

  • Thin-Wall Vessel: hoop, longitudinal and von Mises membrane stresses of a cylinder or sphere, with an optional allowable stress and margin.
  • Thick-Wall Cylinder: the Lamé equations for internal and external pressure, with closed ends, open ends or plane strain, the radial growth, and a plot of the stresses through the wall.
  • ASME VIII Shell: required thickness or MAWP of a cylinder or sphere by UG-27, with corrosion allowance and the code limits.
  • ASME VIII Heads: 2:1 ellipsoidal, general ellipsoidal, torispherical, hemispherical, conical and flat heads (UG-32, Appendix 1-4, UG-34).
  • External Pressure: elastic buckling of long and short cylinders (Bresse, Windenburg and Trilling) and of spheres, compared with yield, with a plot against L/D.
  • Test Pressure & Energy: hydrostatic and pneumatic test pressures (UG-99, UG-100), the stored energy of the test fluid and its TNT equivalent (ASME PCC-2).
  • Shell Ring Frequencies: the ring (breathing) frequency and the ovaling mode frequencies of a cylindrical shell.
  • Thermal Stress: through-wall gradient, restrained plate and restrained bar.
  • Corrosion & Remaining Life: corrosion rate, remaining life and inspection interval by the API 510 / API 570 method.

Boilers

  • ASME I Tubes & Drums: thickness or MAWP of boiler tubes, piping, drums and headers by PG-27.
  • Saturated Steam: saturation temperature from pressure, or pressure from temperature, using the IAPWS-IF97 equations, with a plot of the saturation line.
  • Boiler Output & Efficiency: heat output, boiler horsepower, equivalent evaporation from and at 212 F, fuel input and fuel rate.
  • Boiler Blowdown: cycles of concentration, blowdown and feedwater rates, and the heat in the blowdown.
  • Steam Safety Valve: required area or relieving capacity by the Napier formula, with the Section I and Section VIII overpressure rules.

Piping

  • Pipe Wall Thickness: B31.3 and B31.1 pressure design thickness or MAWP, with allowances and mill tolerance. Entering an NPS fills in the outside diameter and checks Schedules 40, 80 and 160.
  • Pipeline MAOP: the Barlow design pressure of B31.8 (gas, by location class) and B31.4 (liquid), and the operating hoop stress as a percentage of SMYS.
  • Pipe Pressure Drop: Darcy-Weisbach with the Colebrook friction factor, fittings and elevation.
  • Water Hammer: the pressure wave speed in an elastic pipe, the Joukowsky surge pressure and the critical closure time.
  • Thermal Expansion & Loop: free expansion, the restrained stress and anchor force, and the guided cantilever leg needed to absorb the expansion.
  • Pipe Span & Frequency: natural frequency, bending stress and deflection of a pipe span with contents and insulation, for pinned, fixed or cantilever supports.
HOW THE APP WORKS
  • Every tab has its own English or metric unit selection and an equation strip that shows the formulas used. Changing the units converts the values already entered.
  • Preset lists fill in typical values: material properties (carbon steel, stainless steel, aluminum, copper), fluid properties and the B31.8 location class design factors.
  • View Equations opens a PDF with the equations, inputs, notes and references for all twenty tabs.
  • Save Model and Load Model store and restore the inputs of every tab in one file.
  • Export to Excel writes the inputs and results of every calculated tab to one workbook, with a summary sheet and a sheet for each tab. Numeric results are split into quantity, value and units, so they can be used in Excel.
  • Fluid Dynamics (new in ver 1.4) opens the vibrationdata_fluids GUI in its own window. In Matlab, vibrationdata_fluids.mlapp must be on the Matlab path. For the stand-alone version, put vibrationdata_fluids.exe in the same folder as vibrationdata_pressure.exe. If the fluids app is not found, the button offers to open its download page.
  • Plots open in separate windows: thick-wall stresses, external pressure buckling and the steam saturation line. Closing the app closes them too.
  • The app can also be opened from the vibrationdata GUI.
SOURCES
  • ASME Boiler and Pressure Vessel Code, Section VIII Division 1 and Section I.
  • ASME B31.1, B31.3, B31.4 and B31.8 piping codes, and ASME B36.10M pipe dimensions.
  • ASME PCC-2, API 510 and API 570.
  • Roark’s Formulas for Stress and Strain and Timoshenko, Strength of Materials.
  • Windenburg and Trilling, collapse of thin cylindrical shells under external pressure, and NASA SP-8032.
  • R.D. Blevins, Formulas for Natural Frequency and Mode Shape.
  • IAPWS-IF97 (IAPWS R7-97) for the steam saturation line.
  • Colebrook, Crane Technical Paper 410, and Wylie and Streeter, Fluid Transients in Systems.

Full references are in the View Equations PDF. The app is a study and checking aid. Design to the current edition of the governing code, using its allowable stresses and rules. The allowable stresses, material properties and other example inputs are illustrative.

The app is also part of the Vibrationdata Matlab Signal Analysis & Structural Dynamics Package. Please send me an email if you have questions or suggestions.

Tom Irvine

More stand-alone Matlab GUIs: Matlab Engineering GUI Packages Hub

Learn This in a Live Course

Natural frequencies, modal analysis and transient response, as in the pipe span and shell ring frequency tabs, are covered in the Structural Dynamics & FEA course, and welded joint fatigue in the Fatigue course. The February 2027 series includes live one-hour classes, IACET CEUs, recorded sessions and slides. See the schedule and fees or register here.

Leave a Comment