Professional Pipe Stress Analysis | ASME B31.3 • B31.1 • EN 13480
pip install -r requirements.txtDouble-click run_gui.bat or run from a terminal:
python run_gui.py
A splash screen appears while the 3D engine initialises. On first launch you will see the Welcome Screen with a single "Open PCF File" button and the 4-step workflow banner at the top.
The banner at the top of the screen shows your current position in the analysis workflow. Each step lights up as you progress:
The primary model input is a Piping Component File (.pcf) exported from CADWORX, SmartPlant, PDS, or similar software.
| Action | How |
|---|---|
| Open a single PCF | Ctrl+O or File → Open PCF… or drag-and-drop onto the window |
| Open & stitch multiple PCFs | Ctrl+Shift+O or File → Open Multiple PCFs (Stitch)… Nodes at the same coordinates are automatically merged. Default stitch tolerance is 10 mm. |
| Custom stitch tolerance | File → Open Multiple PCFs (Custom Tolerance)… |
After loading a PCF, a PCF Attribute & Support Mapper dialog appears with two tabs:
After loading a PCF, an Excel workbook (*_project_inputs.xlsx) is
automatically generated alongside it. This workbook contains multiple sheets:
| Sheet | Purpose |
|---|---|
| LineList | Per-line operating conditions: T1/T2/T3 temperatures, P1/P2/P3 pressures, fluid densities, hydro test pressure |
| Elements | Per-element overrides: wall thickness, material, SIF, DX/DY/DZ routing vectors |
| Restraints | Additional supports not in the PCF (node, type, stiffness). Merges with PCF supports. |
| Config | Global settings: ambient temperature, gravity direction, design code, wind/seismic parameters |
You can edit inputs in three ways:
Run → Analysis Options… opens a dialog to configure:
Direction of gravity. Default: −Z. All support directions are relative to this.
| Action | Control |
|---|---|
| Rotate (orbit) | Left-click and drag |
| Pan | Middle-click and drag or Shift + left-click drag |
| Zoom | Scroll wheel |
| Keyboard fly | W/A/S/D move, Q/E up/down, arrow keys rotate |
| Fit model to view | Home or Zoom Extents button |
| Button / Menu | Description |
|---|---|
| Iso | Standard isometric view |
| Top | Plan view (looking down) |
| Front | Looking from north |
| Right | Looking from east |
Additional orientations are available via View → View Orientation.
The North Direction can be configured via View → North Direction (default: +Y).
The "Color by" dropdown in the View toolbar controls how model elements are coloured. Options include:
After running analysis, the Plot Type dropdown becomes active:
Select the desired Load Case from the case dropdown, then click Plot.
Press N or click the Nodes toggle to show/hide node numbers. Node numbers correspond to the FEM model node IDs used in all results tables.
Press E or click ⬚ Select to enter box-selection mode:
Left-click on a pipe element to select it. The selected element is highlighted in cyan and the Element Info dock appears on the right side showing:
Press Esc to deselect.
Right-click on an element to open the context menu:
| Menu Item | Description |
|---|---|
| Change Support Type | Change an existing support at this node (REST, GUIDE, LINE_STOP, ANCHOR, SPRING, HANGER). Shows current type with a checkmark. |
| Remove Support | Remove the support from a node |
| Add Support at Node | Add a new support at either end node of the element |
| Split Element at Length… | Split a pipe element at a specified distance along its length |
| Reroute Element (DX/DY/DZ)… | Change the routing direction of an element. Option to cascade changes to all downstream nodes. |
| Delete Element | Remove an element from the model |
Overlay a laser scan onto your piping model for as-built verification:
If the 3D view feels sluggish, toggle Perf in the toolbar or View → Performance Mode. This uses lighter rendering for smoother navigation on large models.
Supports define how the piping system is restrained. The software recognises the following support types:
| Type | Behaviour | Restrained DOFs |
|---|---|---|
| REST | Resting support (one-way, vertical). The pipe can lift off. Generates friction in lateral directions (μ = 0.3 default). |
+Z (anti-gravity, lift-off allowed) |
| ANCHOR | Fully fixed point. All translations and rotations restrained. | UX, UY, UZ (+ rotations if applicable) |
| GUIDE | Prevents lateral movement but allows axial sliding along the pipe. Applied using directional penalty stiffness perpendicular to the pipe axis. | Perpendicular to pipe axis |
| LINE_STOP | Prevents axial movement along the pipe but allows lateral movement. Applied using directional penalty stiffness along the pipe axis. | Along pipe axis |
| SPRING / HANGER | Vertical spring support (variable or constant effort) | +Z (spring stiffness) |
A node can have multiple support types. For example, a GUIDE+REST support provides both lateral restraint (guide) and vertical one-way support (rest). The label is shown in the 3D viewer as "GUIDE+REST" and each component contributes its boundary conditions independently.
The following base loads are computed automatically from the model and inputs:
| Case | Description | Source |
|---|---|---|
| W | Weight (dead load) | Pipe + fluid + insulation self-weight |
| P1, P2, P3 | Pressure | Internal pressure thrust at elbows, tees, end caps + bourdon effect at bends |
| T1, T2, T3 | Thermal expansion | Temperature change from ambient → equivalent axial forces |
| HP1 | Hydrotest pressure | Hydrostatic test pressure thrust forces |
| WIND | Wind | Drag forces on exposed pipe per SANS 10160-3 wind profile |
| SEIS | Seismic | Equivalent static inertia forces (weight × g-factor) |
These are built by combining base cases:
| Case | Definition | Stress Type |
|---|---|---|
| SUS | W + P1 | SUS |
| OPE | W + P1 + T1 | OPE |
| EXP | OPE − SUS | EXP |
| HYD | W + HP1 | SUS |
| WIND | Wind lateral loads | OCC |
| SEIS | Seismic inertia loads | OCC |
Open via Run → Edit Load Cases… (Ctrl+L). The editor shows a spreadsheet-style table where you can:
W+P1+T1, OPE-SUS, 1.5*W+P1SUS Sustained —
Primary stresses from weight + pressure. Must not exceed Sh
(hot allowable). Per B31.3 §302.3.5.
OPE Operating — Full operating condition (weight + pressure + thermal). Used for support loads and displacement checks.
EXP Expansion —
Secondary (self-limiting) stress range from thermal cycling. Must not exceed
SA = f(1.25 Sc + 0.25 Sh).
Per B31.3 §302.3.5(d).
OCC Occasional —
Sustained + occasional loads (wind, seismic). Allowed
1.33 × Sh (B31.3) or 1.2 × Sh (B31.1).
Press F5 or click the green ▶ Run Analysis button in the toolbar.
A progress popup shows:
For each base load case (W, P1, T1, WIND, SEIS, etc.), the solver assembles the
global stiffness matrix, applies boundary conditions, and solves K·U = F.
The W (weight) case uses a nonlinear iterative solver because of:
Convergence is typically achieved in 3–10 iterations. The solver uses displacement under-relaxation (α = 0.7) for stability.
Combined cases (SUS, OPE, EXP, HYD, OCC) are assembled from base case results using the definitions in the Load Case Editor.
Each element is checked against the selected design code (ASME B31.3/B31.1/EN 13480). The stress ratio (actual ÷ allowable) is computed, and elements are flagged PASS or FAIL.
| Feature | Menu | Description |
|---|---|---|
| Modal Analysis | Run → Modal Analysis (Frequencies)… | Compute natural frequencies and mode shapes. Specify the number of modes to extract. |
| Response Spectrum | Run → Response Spectrum Analysis… | SRSS or CQC combination of modal responses to a seismic response spectrum. Includes built-in ASCE 7-22 design spectrum helper. |
After analysis completes, the Results Dashboard dock appears at the bottom of the screen. It has three tabs:
A summary table showing every load case with columns:
Click a row to load that case's detailed element stresses in the Element Stresses tab.
Sortable table of per-element stress results for the selected load case. Columns include element ID, node IDs, stress type, computed stress (MPa), allowable stress (MPa), stress ratio, and PASS/FAIL status. Click any row to highlight and zoom to that element in the 3D viewer.
Per-node displacement table: node ID, DX, DY, DZ (mm), and resultant magnitude. Colour-coded by magnitude. Click a row to zoom to that node.
A dedicated Support Loads panel shows reaction forces and moments at every support node. Filter by load case using the dropdown. Columns:
Export the table to CSV via the Export CSV button.
The Log dock at the bottom shows a detailed text log of all analysis steps: element counts, support registration, solver convergence, load case progress, maximum displacements, and any warnings or errors. This is the first place to look if results seem unexpected.
After analysis, switch the Plot Type dropdown to Stress, Displacement, or Code Compliance, select a load case, and click Plot. The 3D model updates with colour-coded results and a legend bar.
For displacement plots, adjust the Scale field next to the plot controls. "Auto" picks a reasonable exaggeration factor. Typical useful values are 10–100×.
| Action | Menu | Output |
|---|---|---|
| Text Report | Report → Generate Text Report | Comprehensive plain-text report with model summary, element stresses, support reactions, and code compliance |
| PDF Report (ASME B31.3) | Report → Generate PDF Report (ASME B31.3)… | Formatted PDF with cover page, ToC, compliance tables, and summary |
| Weight Report | Report → Pipe Weight Report… | Breakdown of pipe, fluid, and insulation weight by line number and per element |
| Excel Results | Ctrl+E or File → Export Results (Excel)… | Full results workbook with sheets for displacements, stresses, reactions, and compliance |
| Neutral Export (.C2) | File → Export to Neutral (.C2) | Model in neutral exchange format for cross-validation |
The software includes a built-in material database with common piping materials. You can also create your own via File → Material Library → Generate Material Library Template… and load it with Load Material Library…. The library provides temperature-dependent properties:
An optional AI chat panel is available via View → AI Assistant. It uses Google Gemini and has deep knowledge of ASME B31.3 and pipe stress analysis. The assistant can:
GEMINI_API_KEY environment variable or .env file.
Set up via Tools → Add AI Tokens….
Ctrl+S or File → Save Project… saves the entire project state
(PCF path, inputs workbook, analysis options, support overrides, attribute mappings)
to a .json project file.
Ctrl+L or File → Load Project… restores a previously saved project, re-loading the PCF and inputs.
| Shortcut | Action |
|---|---|
| Ctrl+O | Open PCF file |
| Ctrl+Shift+O | Open & stitch multiple PCFs |
| Ctrl+D | Open CADWORX DWG file |
| Ctrl+S | Save project |
| Ctrl+L | Load project / Edit load cases |
| Ctrl+E | Export results to Excel |
| F5 | Run analysis |
| F6 | Validate model |
| Home | Zoom extents (fit model to view) |
| N | Toggle node labels |
| B | Toggle box-selection mode |
| M | Toggle measure mode |
| P | Toggle draw-pipe mode |
| Esc | Clear selection / exit selection mode |
| W/A/S/D | Fly navigation (forward/left/back/right) |
| Q/E | Fly down / up |
| Arrow keys | Rotate camera |
| Menu Item | Description |
|---|---|
| Tools → View Static Solver Convergence… | Residual trend plot for the nonlinear weight/sustained solver |
| Tools → View Modal Solver Convergence… | Eigenvalue convergence for modal analysis |
| Tools → Solver Diagnostics Summary | Text summary of solver parameters, matrix size, conditioning |
| Tools → Open Monitoring Folder | Opens the local folder where run logs are stored |
| Tools → View Recent Run Summary | Summary of recent analysis runs with timing and results |
File → Material Library → Edit Wall Thickness… opens a specialised editor for per-element wall thickness overrides with pipe schedule lookup integration.
The HYD case = Weight + Hydro Pressure (HP1). The hydro test pressure (typically 1.5× design) creates pressure thrust forces at every change of direction: elbows, tees, and end caps. At a straight pipe, forces from adjacent elements cancel. At a bend, the direction change produces a net lateral force that pushes the pipe sideways. This is physically correct behaviour. If the displacements are excessive, consider adding more guides near elbows.
Wind and seismic loads are lateral forces that can only be resisted by lateral restraints (GUIDEs, LINE_STOPs, ANCHORs). If most supports are REST type (vertical only), lateral loads have very little restraint. Add GUIDE supports at regular intervals (typically every 6–12 m) near elbows and at pipe racks.
A GUIDE allows the pipe to slide freely along its axis but prevents lateral (sideways) movement. A LINE_STOP is the opposite: it prevents the pipe from sliding along its axis but allows lateral movement. Both use directional penalty stiffness to correctly handle pipes at any orientation.
REST supports are modelled as nonlinear one-way springs. In the first solver iteration they are all engaged. On subsequent iterations, the solver checks whether the pipe has displaced downward (into the support = engaged) or upward (lifting off = released). Friction forces (μ × normal reaction) are also computed at engaged REST supports. The solver iterates until convergence (typically 3–10 iterations).
Yes. For each element under pressure:
Thick-wall (Lamé) equations are used when t/D > 0.1.
For ASME B31.3:
Separate in-plane and out-of-plane SIFs (ii, io) are used at bends and tees.
This usually means the nonlinear solver did not converge, or supports are not being recognised. Check the log for warnings. Common causes:
It is not. The installer is built with PyInstaller, which packages Python and the
application into a single .exe. Because the executable is not yet
code-signed, Windows Defender and SmartScreen do not recognise the
publisher and may show a “Windows protected your PC” screen.
To install, click More info on the warning, then Run anyway.
The installer itself is a plain self-extracting launcher; on first run it downloads the
Python runtime and packages from python.org and pypi.org.
A code-signing certificate removes this warning. The certificate is a
one-off (usually yearly) purchase, and the same certificate is reused to sign every
new build. Revising the code and rebuilding the .exe does not
require a new certificate — you simply re-sign the new build with your existing
certificate before publishing it.
Open the Support Loads dock (View → Support Loads). Filter by load case. Nodes with zero reactions may indicate lifted-off supports. The console log also prints a summary of one-way support engagement status.
Yes. Export the model via File → Export to Neutral (.C2) and import it into other pipe stress analysis tools for comparison. The Results Excel also provides data in a format that facilitates side-by-side comparison.
The PCF reader handles: pipes, elbows/bends, tees (equal and reducing), reducers, flanges, gaskets, valves, spectacle blinds, steam traps, filters, strainers, and miscellaneous components. Fittings (flanges, valves, etc.) are modelled as rigid elements with 100× stiffness and their actual weight.
Each element's thermal strain ε = α·ΔT is converted to equivalent nodal forces N = E·A·α·ΔT applied as opposing axial forces at the element ends. Temperature-dependent material properties (E, α) are used when available. The thermal pre-stress correction ensures correct force recovery for both free and restrained elements.
| Quantity | Unit |
|---|---|
| Length / Displacement | mm |
| Force | N |
| Moment | N·mm |
| Stress | MPa (N/mm²) |
| Pressure (input) | bar or kPa (converted internally to MPa) |
| Temperature | °C |
| Weight / Density | kg, kg/m³ |
| Wind speed | m/s |
| Term | Meaning |
|---|---|
| PCF | Piping Component File — standard neutral format for exchanging piping models |
| FEM | Finite Element Method — numerical technique for structural analysis |
| DOF | Degree of Freedom — each node has 6 DOFs: 3 translations (UX, UY, UZ) and 3 rotations (RX, RY, RZ) |
| SIF | Stress Intensification Factor — multiplier accounting for stress concentration at fittings (bends, tees) |
| Bourdon effect | Pressure-induced opening moment at bends that tends to straighten the elbow |
| Pressure thrust | Unbalanced force at changes in direction caused by internal pressure acting on the internal cross-sectional area |
| Lift-off | When a pipe lifts off a one-way (REST) support, creating a gap. The support reaction becomes zero. |
| Friction | Lateral resistance at REST supports proportional to the normal (vertical) reaction: Ffriction = μ · Fnormal |
| Penalty stiffness | Very large spring stiffness used to model rigid constraints in specific directions (e.g. 10¹⁰ N/mm for guides/line stops) |
| Sustained stress | Primary stress from sustained loads (weight + pressure) that cannot self-relieve |
| Expansion stress | Secondary stress from thermal expansion that is self-limiting (displacement-controlled) |
| Occasional stress | Short-duration loads (wind, seismic) combined with sustained |
| Allowable stress | Maximum permitted stress per the design code, depends on material and temperature |
If you encounter issues, check the Log dock for error messages and warnings. Common troubleshooting steps:
Piper Analytics — Professional Pipe Stress Analysis
ASME B31.3 • ASME B31.1 • EN 13480