Pigs at the Junction: Moving Constraints Meeting Equal-Pressure Nodes in Gas Networks

Gas pipelines are routinely cleaned and inspected by a "pig," a plug pushed through the pipe by the gas itself. Gas leaks past the pig only through a small bypass, so the pig acts as a moving obstacle. It carries a sharp pressure drop and limits how much gas can pass it. Pipeline networks are also joined at junctions. The standard physically correct rule at a junction says that pressure is the same in every pipe meeting there. When a pig enters a junction, these two rules conflict. The obstacle wants a pressure jump while the junction forbids one. Nobody has written down what should happen, and no numerical method handles it. Today's simulators either blur the pig's jump across several grid cells or break down when the pig sits within one cell of the node.

We propose to treat the pig and the junction as two cases of one object: a coupling condition at an interface. We then solve their merger as a single small problem at the node. The resolution is simple to state. The equal-pressure rule holds at a junction except on the branch that currently contains the pig. On that branch the pressure may jump by exactly the force the pig carries. This composite rule becomes a small linear system with one inequality when it is written in Jin–Xin relaxation variables. Those are variables in which the nonlinear gas equations are replaced by a linear system with a stiff source, so all wave curves become straight lines. Combined with a reconstruction inside the grid cell that holds the pig, this gives a scheme that keeps the pig's jump sharp and conserves mass. It also introduces no spurious pressure spikes as the pig crosses the node.

Core Claim

The flow is the 1D isothermal Euler equations on each pipe, with density $\rho$, velocity $u$ and sound speed $a_k$ on pipe $k$, following Coupling conditions for gas networks governed by the isothermal Euler equations. A pig at position $y(t)$ imposes jump conditions in its own moving frame. The first is that mass flux relative to the pig is continuous and capped by the bypass capacity $Q_{\max}$. The second is that the jump in momentum flux equals the force $\Phi$ the pig exerts on the gas, divided by the pipe cross-section:

$$\rho^-(u^- - \dot y) = \rho^+(u^+ - \dot y) = q \le Q_{\max}, \qquad \big[\rho (u-\dot y)^2 + a^2 \rho\big]_{-}^{+} = -\Phi,$$

Here the superscripts $\mp$ denote the states just behind and just ahead of the pig. The pig's motion obeys $M\ddot y = A(p^- - p^+) - F_{\mathrm{fric}}$, where $M$ is its mass, $A$ the pipe area and $F_{\mathrm{fric}}$ wall friction.

This is the system analogue of the scalar moving-bottleneck constraint of Modeling of moving bottlenecks in traffic flow: a PDE-ODE model with moving density constraints. When the bypass saturates, the jump it produces is not one that the classical Lax entropy test admits. Standard shock-capturing schemes therefore replace it with something wrong. That is the meaning of "non-classical" here.

The node condition we propose keeps mass conservation, $\sum_{\mathrm{in}} A_i \rho_i u_i = \sum_{\mathrm{out}} A_j \rho_j u_j$. It replaces strict equal pressure with $a_i^2 \rho_i = a_j^2 \rho_j + \delta_{jk}\,\Phi(t)$ for the branch $k$ holding the pig. This reduces to the Banda–Herty–Klar condition when no pig is present. Far from the node it reduces to the isolated moving constraint. It is the only choice consistent with momentum balance over a control volume containing both the node and the pig. That makes it the natural answer to the overdetermination identified as Gap 3 in our source material.

The claim to test is twofold. First, this composite condition yields a well-defined half-Riemann problem at the node. Second, a relaxation-based scheme can enforce it with the same interface dissipation it uses for plain junctions, so the crossing produces neither smearing nor spikes.

Research Program

The method borrows from two lines of work and contradicts neither.

The first is A central scheme for coupled hyperbolic systems. It couples two hyperbolic systems at a fixed interface through Jin–Xin relaxation, avoiding nonlinear wave curves. It shows that consistency as the relaxation parameter goes to zero requires a specific nonlinear coupling, which the authors call "Approach 4." Its test case is a fixed turbine that removes momentum, which is structurally a stationary pig. We make that interface move, and we let it merge with a multi-pipe node.

The second is A conservative scheme for non-classical solutions to a strongly coupled PDE-ODE problem. It keeps a scalar moving-bottleneck jump sharp on a fixed grid by reconstructing two states inside the cell containing the obstacle, while correcting interface fluxes so mass is conserved exactly. We extend the reconstruction to a 2×2 system. We also handle the case it cannot reach: when the obstacle is within half a cell of a node, the reconstruction would need states from across the junction.

The work has three parts.

The analytic part characterizes the composite half-Riemann problem in relaxation variables. Because wave curves are straight there, the node problem becomes a linear system plus one complementarity condition: either $q < Q_{\max}$ and $\Phi$ is given by a bypass law, or $q = Q_{\max}$ and $\Phi$ is free. We aim to prove existence and uniqueness of its solution for 1-to-1 nodes with a sound-speed step, and for 1-to-2 and 2-to-1 tees.

The numerical part builds the scheme. In-cell reconstruction is used while the pig is in the interior of a pipe. When the pig is within one cell of the node, the scheme switches to the composite node solver, with the subcell pig position entering as a parameter rather than as a mesh location. Fluxes are corrected so that total mass, summed over all edges, is conserved to round-off.

The verification part checks the scheme in the scalar limit. Our scheme reduces to a traffic model in which a slow vehicle crosses a speed-limit discontinuity. Existence for that case is proved analytically in On the Existence of Solution of Conservation Law with Moving Bottleneck and Discontinuity in FLux, but that paper presents no numerical scheme. Our reduced scheme would be the first one for that resonant case.

Baselines

The naive reference is a pig smeared into a short porous zone with a localized friction source, run with the MUSCL relaxation scheme of Coupling conditions for gas networks governed by the isothermal Euler equations at its equal-pressure nodes. It is what a practitioner would code first. It is run on identical grids and CFL numbers. Its zone width and friction coefficient are tuned on the 1-to-1 case only, with the same number of trial settings we allow ourselves. Our scheme beats it if it gives lower $L^1$ error on the tee benchmarks at every resolution, and lower pig arrival-time error.

The strongest existing competitor is a stitched scheme: in-cell reconstruction A conservative scheme for non-classical solutions to a strongly coupled PDE-ODE problem, lifted to the gas system, in pipe interiors, combined with the Approach-4 relaxation coupling A central scheme for coupled hyperbolic systems at nodes. It switches between the two by holding the pig at the node for one step. This is the strongest competitor because it uses the best published tool for each half of the problem. The only thing it lacks is our composite condition. Reported performance for its components is limited. The in-cell scheme reports empirical $L^1$ convergence between $\mathcal{O}(\Delta x^{0.8})$ and $\mathcal{O}(\Delta x^{1.5})$ on its scalar Cases 0–IV. The relaxation coupling reports first-order $L^1$ convergence, with no error table. We found no reported result on Lacuna for any pig-crossing-junction benchmark, so we will reimplement this baseline ourselves. Our scheme beats it if three things hold during the crossing: total mass error stays at round-off rather than at the size of one step's transfer; the node pressure overshoot shrinks under refinement rather than staying fixed; and the convergence rate on crossing problems matches the rate on pig-free problems.

The key ablation enforces strict equal pressure at the node even when the pig is there, with $\Phi$ dropped from the node condition. This isolates the composite condition from the rest of the machinery. If the ablation performs equally well, the central claim is wrong.

Why not just…?

Why not just make the pig a moving vertex of the graph and use a moving mesh? This is the most serious alternative. Away from junctions it is a clean way to keep the jump sharp. It fails exactly where we focus. As the pig approaches a node, the edge between them shrinks to zero length, its cells degenerate, and the time step collapses unless cells are merged. Merging cells is itself an unanalyzed composite node. We will implement this alternative with cell merging and run it on the same crossings. If it matches our accuracy at equal cost, we will report that our contribution reduces to the composite node condition, which the moving-mesh method would then need as well.

Why not just smear the pig into a friction zone and refine the grid? That might converge under refinement. However, the zone has no mechanism to cap mass flux relative to the pig. Under saturated bypass it produces a classical profile in place of the non-classical jump, which is the failure documented for the scalar case in A conservative scheme for non-classical solutions to a strongly coupled PDE-ODE problem. Our convergence study will show whether its error plateaus in the saturated regime.

Why not just use a high-order shock-capturing scheme, or a learned flux? Low-dissipation schemes such as the targeted ENO scheme of An efficient targeted ENO scheme with local adaptive dissipation for compressible flow simulation add dissipation precisely at jumps to enforce classical entropy conditions, so they treat the pig's jump as an error to remove. The neural finite volume method of (U)NFV: (Un)Supervised Neural Finite Volume Methods for Solving Hyperbolic PDEs reports up to 10x lower error than Godunov on scalar laws. It is limited to scalar classical problems with no mechanism for moving inequality constraints, so it cannot be run on this system as published. We will include a fifth-order WENO baseline without in-cell reconstruction on Cases 0–IV and the 1-to-1 case, to show the failure directly rather than assert it.

Proposed Experiments

The benchmark ladder starts with the scalar Cases 0–IV of A conservative scheme for non-classical solutions to a strongly coupled PDE-ODE problem. There our scheme should reproduce the published sharpness and convergence range. Next is the scalar resonant crossing of a speed-limit jump from On the Existence of Solution of Conservation Law with Moving Bottleneck and Discontinuity in FLux, checked against a fine-grid wave-front-tracking reference. On the gas side, we use the 1-to-1 node with $a_1 = 6$, $a_2 = 8$ from Coupling conditions for gas networks governed by the isothermal Euler equations, with a pig added. We run it with bypass both unsaturated and saturated. Finally, we use the 1-to-2 and 2-to-1 tees of An asymptotic-preserving scheme for isentropic flow in pipe networks, with a pig entering one outgoing branch.

The metrics are:

  • $L^1$ error against a reference computed on a much finer grid;
  • total mass error over the whole network;
  • the node pressure difference compared with the predicted $\Phi(t)$;
  • the peak spurious overshoot near the node;
  • the pig's arrival time at a downstream station;
  • the observed convergence order;
  • wall-clock cost.

Three checks decide the claim. First, on the saturated tee crossing, the strict-equal-pressure ablation should show a pressure overshoot or mass defect that persists under refinement, while the composite condition removes it. Second, the stitched baseline should lose convergence order only on crossing problems, which is the specific failure our method targets. Third, the composite node problem should have a unique solution across a sweep of sound-speed ratios and bypass capacities. Existence failing there would mean the condition needs further physics, such as junction loss factors, which existing work also omits.

A last check concerns stiffness. Real pipelines run at low Mach number, and An asymptotic-preserving scheme for isentropic flow in pipe networks reports roughly 140 times speedup over an explicit scheme at Mach 0.001. That makes compatibility with its implicit treatment of the acoustic terms a necessary later step. We will report whether the composite node remains well-posed in that limit, rather than claim it in advance.