Skip to main content

Element Formulation & Architecture

The Pipe Stress FEA engine is built on a robust 3D structural solver. The core architecture utilizes a three-phase solving sequence:

  1. Matrix Assembly & Preprocessing: Discretizing curves, generating soil-spring meshes, and building the global stiffness and mass matrices.
  2. State Resolution: Applying loads and solving for displacements (utilizing an iterative penalty method for non-linear boundary conditions like friction and gaps).
  3. Code Compliance: Extracting localized forces to evaluate ASME B31 stress ratios and flange leakage.

1.1 The 12-DOF Beam Element

The fundamental building block of the pipeline model is a 2-node, 12-Degree-of-Freedom (DOF) 3D Euler-Bernoulli beam element. Each node possesses 6 DOFs: three translational (x,y,zx, y, z) and three rotational (θx,θy,θz\theta_x, \theta_y, \theta_z).

The local element stiffness matrix [k][k] is a 12×1212 \times 12 matrix formulated using the pipe's cross-sectional properties:

  • AA: Cross-sectional area
  • EE: Elastic Modulus
  • GG: Shear Modulus
  • II: Moment of Inertia
  • JJ: Polar Moment of Inertia
  • LL: Element Length

ASME B31J Flexibility Integration

A distinct feature of this engine is the direct integration of ASME B31J Flexibility Factors (kk) into the displacement solution. Rather than treating bends and tees as standard rigid pipes and applying stress multipliers post-solution, the engine inherently softens the stiffness matrix for these components.

The effective inertia and torsional constants are modified prior to matrix assembly:

Iin,eff=IkinI_{in, eff} = \frac{I}{k_{in}} Iout,eff=IkoutI_{out, eff} = \frac{I}{k_{out}} Jeff=JktorJ_{eff} = \frac{J}{k_{tor}}

This ensures that the global displacement geometry accurately reflects the localized ovalization and flexibility of piping fittings.

1.2 Coordinate Transformation

Because the local stiffness matrix [k][k] is aligned with the element's longitudinal axis, it must be rotated to align with the Global (X,Y,Z)(X, Y, Z) coordinate system before assembly.

The engine calculates a 3×33 \times 3 direction cosine matrix based on the element's spatial vector. A 12×1212 \times 12 transformation matrix [T][T] is then constructed to rotate both translations and rotations.

The global stiffness matrix for the element [Ke][K_e] is obtained via:

[Ke]=[T]T[k][T][K_e] = [T]^T [k] [T]

The Vertical Axis

The engine dynamically adjusts the local transverse and vertical axes based on the user's Global Settings. If the user defines Z as the vertical elevation axis, the horizontal plane is evaluated as X-Y, and the transformation matrix is rotated accordingly.

1.3 The Consistent Mass Matrix

For dynamic load cases (such as Modal Analysis or Seismic Occasional loads), the engine eschews simplified lumped-mass models in favor of a Consistent Mass Matrix [M][M].

This 12×1212 \times 12 matrix distributes the mass of the steel pipe, internal fluid, external coating, and inline valves continuously along the beam's shape functions. It accounts for both translational mass (μ\mu) and rotational inertia (JρJ_{\rho}):

Jρ=μ(ro2+ri22)J_{\rho} = \mu \left( \frac{r_o^2 + r_i^2}{2} \right)

This continuous mass distribution guarantees highly accurate fundamental frequency extraction during eigenvalue modal analysis, avoiding the "stair-stepping" inaccuracies common in lumped-mass models.

1.4 Rigid In-Line Components (Valves & Flanges)

Valves and flanges are modelled exactly as they are in CAESAR II, CAEPIPE and AutoPIPE: as discrete rigid elements placed in series along the centreline, each occupying its own face-to-face length and never overlapping a neighbour. A flanged valve is therefore represented as a sequence of butting segments:

[pipe] — [flange] — [valve body] — [flange] — [pipe]

Rigidity

Each valve or flange element is assigned a high relative stiffness by multiplying its bending and torsional constants by a large factor:

Irigid=1000IJrigid=1000JI_{rigid} = 1000 \cdot I \qquad J_{rigid} = 1000 \cdot J

This makes the component effectively rigid relative to the connected pipe while keeping the stiffness matrix well-conditioned (a true infinite stiffness would make the system singular). This matches the "rigid element" treatment used by the major commercial codes.

Weight

Following the same convention as CAESAR II / CAEPIPE / AutoPIPE, a rigid element carries only its specified component weight — the steel self-weight of the modelled stub is not added, because the rigid body is a stand-in for the real component rather than a length of pipe:

  • Valves contribute the user-supplied body mass plus actuator/operator mass, distributed along the element. The actuator centre-of-gravity offset is retained for seismic eccentric-mass effects.
  • Flanges contribute their specified mass as a concentrated nodal load at the flange node.
  • The bore fluid inside a valve or flange is still carried, since the component is full of process fluid.

This avoids the double-counting that would otherwise occur if the rigid stub's steel weight were summed on top of the catalogue component weight.

Flange ↔ valve adjacency

When a flange is placed directly against a valve, the flange occupies its pipe side only and butts up to the valve face — the two rigid bodies are sequential, never co-located. The 3D viewer reflects this by drawing the flange single-sided toward the pipe whenever an adjacent rigid valve is detected, so the geometry on screen matches the structural model with no visual overlap.

Legacy models

Older models may store a flange purely as a node component without a dedicated rigid element. For backward compatibility the engine still synthesizes a short rigid flange stub in that case, biting the flange length into the adjacent pipe only — never into a valve.

Flanged Valve auto-layout

The Route tab provides a Flanged Valve component that builds the complete flange → valve → flange assembly in one action. The entered route offset sets the direction; the assembly is laid out from the component lengths so it spans:

Lassembly=Lflange+Lvalve+LflangeL_{assembly} = L_{flange} + L_{valve} + L_{flange}

Three rigid elements (two F- flanges, one V- valve) and the intermediate nodes are generated automatically in series, each occupying its own length with no overlap. The valve carries its body and actuator masses (with actuator CoG offsets), the flanges carry their per-flange mass at the valve-adjacent nodes, and the optional flange-leakage assessment is attached to the valve connection. This reproduces the way a flanged valve is built from catalogue face-to-face lengths in CAESAR II / CAEPIPE / AutoPIPE.

1.5 Mesh Expansion, Preview & Validation

Bends, tees and flanges are entered as single nodes but are expanded into their true analysis mesh when the model is processed:

  • A bend node is replaced by tangent-point nodes <node>_A / <node>_B (pulled back along each leg by the tangent length T=Rtan(θ/2)T = R\tan(\theta/2)) plus arc nodes <node>_seg_i; the original corner node is removed.
  • A tee node keeps its centre, but each leg is re-connected to a generated weld-point node — run ends <node>_A / <node>_B at half the run length, and the branch outlet <node>_C at the run outer wall plus fitting height.
  • A legacy node-component flange synthesizes a rigid stub node <node>_F_<element>.

Analysis-mesh preview

Because these nodes exist only in the expanded mesh, the 3D viewer offers a Preview Analysis Mesh toggle (pre-analysis state). It calls the /api/preprocess endpoint, which runs the geometry expansion without solving and returns the generated nodes, elements and any diagnostics. This lets you verify — before committing to an analysis — exactly where the tangent and weld points land and which node a flange or flanged valve actually joins.

Geometry validation

The expansion validates the mesh and refuses to produce corrupt geometry. Errors (analysis is rejected with the message):

  • A bend tangent length, or a tee run/branch dimension, that does not fit within the adjacent element (the generated node would land beyond the neighbour, inverting the element).
  • A rigid flange or valve element attached directly to a bend or tee node (the fitting would need to trim the rigid component). The message states the minimum pipe-spool length to insert.

Warnings (returned with results and shown in the UI):

  • A bend or tee skipped because it does not have exactly 2 (bend) or 3 (tee) connected elements, has no radius, or has collinear legs — previously these were skipped silently, leaving a sharp corner with no SIF.
  • A legacy flange whose length had to be clamped to fit its adjacent element.