A transient model can be wrong in ways that no error message reports. We built the 12 km reference main the way it usually arrives from a GIS import, with a 2.4 m flowmeter spool and four other short pipes. We then ran it with a custom 0.1 s time step and HAMMER-style wave-speed adjustment. It reported a maximum head of 90.0 m; the converged answer is 119.3 m. At 0.05 s the same model put the line minimum at +1.4 m, below the +3.0 m design minimum used in this series, when the true value is +4.3 m, a pass. And a 90 s run of the correct model reports no upsurge at all, because the 119 m peak does not arrive until 101 s after the trip. This article sets out the five checks we make before any surge result leaves the office, with the numbers that show why each one matters.

1 · Five checks before you believe a transient run

The reference main for the surge series is a 12 km, DN800 ductile iron line carrying 0.70 m³/s (1.39 m/s) from an HGL of 85.0 m at the pump to 44.8 m at the reservoir. The wave speed is 1,050 m/s, so 2L/a = 22.9 s. Protection is a hydropneumatic vessel at the pump with 3.5 m³ of gas in a 20 m³ shell and a DN400 differential connection (see Sizing the Hydropneumatic Surge Vessel). Converged, this design keeps the line at or above +4.26 m (lowest at 4.3 km), with a maximum of 119.3 m at the pump, against a design minimum of +3.0 m and a project limit of 136 m.

Which design minimum? The minimum pressure is a project criterion, set by the owner or the designer, not a physical limit. This series uses +3.0 m: the line stays above atmospheric with a margin, so no air is drawn in at joints or air valves and the model's uncertainty is covered. Many owners and consultants accept a sub-atmospheric minimum instead, commonly around −3 m (−0.3 bar). That is defensible when the pipe, joints and fittings are rated for it (EN 805 asks components to withstand −0.8 bar, or −8.2 m), when the 6.8 m left before vapour at −9.8 m covers the model's uncertainty, and when every air valve that will open below atmospheric is in the model and sized for the air it admits. Both criteria can be right, but neither is a default to copy: the minimum you design to must be checked against the allowable values that apply to your project. That means the project specification, the owner’s or utility’s standards, and the manufacturers’ vacuum ratings for the pipe, joints, gaskets, valves and air valves. If any of them is stricter, it governs. Once the minimum is fixed, what matters is the margin between the computed minimum and the chosen one. A numerical error eats that margin whichever criterion you use. The chart in section 5 lets you set your own (see also the pipe's real limits).

Every number in this article comes from two method-of-characteristics codes written independently for this series: the solver behind the surge protection series and a new multi-pipe solver that reproduces it to 0.01 m on the uniform main [1][2]. Neither is Bentley HAMMER, but the time-step and adjustment logic follows the HAMMER documentation [3][4], so the effects shown here are the ones a HAMMER user meets. The five checks are:

  1. The steady state. Flows, HGL at both ends and the pump duty point match the hydraulic design before anything is tripped.
  2. The time step and the adjustment it forces. One time step serves the whole model, so every pipe's length or wave speed is bent to fit it. Sections 2 to 6 cover this.
  3. Grid convergence. Halving the time step should leave the answer unchanged (section 7).
  4. Run duration. The envelope must stop changing well before the run ends (section 8).
  5. A hand check. A test case whose answer is known, such as the Joukowsky rise for a fast valve closure, must come out right (section 9).
The reviewer's question “How do you know this number is right?” A surge report that cannot answer it with the time step, the adjustments, a halved-step rerun and a run duration has not been checked, whatever software produced it. The surge study report article lists where each of these goes in the deliverable.

2 · Why one time step forces an adjustment

The method of characteristics moves along lines on which a pressure wave travels one reach in one time step. Each pipe i is cut into \(n_i\) reaches of length \(\Delta x_i = a_i\,\Delta t\), and that only works if its length is a whole number of reaches [1][5]:

\[ n_i \;=\; \frac{L_i}{a_i\,\Delta t} \quad\text{must be an integer} \;\ge 1 \]

With dozens of pipes of arbitrary length and several wave speeds, no practical \(\Delta t\) satisfies every pipe exactly. HAMMER therefore rounds each \(n_i\) and changes either the pipe's length or its wave speed so the rounded value fits [3][4]:

\[ \text{Adjust length: } L_i' = n_i\,a_i\,\Delta t \qquad\qquad \text{Adjust wave speed: } a_i' = \frac{L_i}{n_i\,\Delta t} \]

In both modes the wave takes \(n_i\,\Delta t\) to cross the pipe instead of \(L_i/a_i\). The difference lies in what else changes. Adjusting the length keeps the pipe's impedance \(a/gA\), so each metre per second of flow change still produces the right head change, but the pipe holds a different volume of water. Adjusting the wave speed keeps the volume but changes the impedance: a pipe whose wave speed is cut from 1,150 to 24 m/s responds to a flow change with 2 % of the head it should, and behaves like a small soft accumulator.

HAMMER shows the result in its Transient Time Step Options dialog: the time step, and the Max, Mean and RMS Adjustment over all pipes, in absolute terms or as a percentage. Length is the default adjustment; wave speed is offered as faster and acceptable for slow mass oscillations [3]. When the adjustment is too large HAMMER warns that the approximation “deviates excessively from the entered values”, and suggests lengthening short pipes, subdividing long ones or raising the Max Adjustment value [3]. The documentation says plainly that there is no hard rule for how much adjustment is acceptable, and that users should test the sensitivity of their results [4]. The rest of this article is that test, on one model.

The tempting shortcut Raising Max Adjustment until the warning goes away, or typing in a larger Custom Time Step to make a big model run faster, is exactly how the results in section 5 were produced. Both are legitimate settings. Neither is safe without the checks that follow.

3 · The model as it arrives

A model built from a GIS export or a station layout drawing carries every fitting that was drawn as a pipe. Ours has five pieces of steel station pipework between the pump and the boundary valve (one of them a 2.4 m magnetic flowmeter spool), a 3.2 m spool at a washout chamber, a 5.6 m spool at an air valve tee and a 41 m steel road crossing, among ten long ductile iron pipes. The total is still 12,000 m. The steel station pipework is thicker-walled, so we give it 1,150 m/s.

The as-imported model, and what two time steps do to it in each adjustment mode (adjustment as a percentage of the entered value)
PipeDescriptionL (m)a (m/s)Travel time (s)n at 0.1 sLength adj. at 0.1 sWave speed adj. at 0.1 sn at 0.005 s
P-1Pump discharge spool6.51,1500.00571+1,669 %−94.3 %1
P-2Discharge header11.01,1500.00961+945 %−90.4 %2
P-3Header to vessel tee and meter18.41,1500.01601+525 %−84.0 %3
P-4Flowmeter spool2.41,1500.00211+4,692 %−97.9 %1
P-5Meter to station boundary valve27.71,1500.02411+315 %−75.9 %5
P-6Field main486.01,0500.46295+8.0 %−7.4 %93
P-7Field main1,212.51,0501.154812+3.9 %−3.8 %231
P-8Field main834.61,0500.79498+0.6 %−0.6 %159
P-9Washout chamber spool3.21,0500.00301+3,181 %−97.0 %1
P-10Field main1,560.21,0501.485915+0.9 %−0.9 %297
P-11Road crossing (steel sleeve)41.01,1500.03571+180 %−64.3 %7
P-12Field main922.81,0500.87899+2.4 %−2.3 %176
P-13Field main1,407.31,0501.340313−3.0 %+3.1 %268
P-14Air valve tee spool5.61,0500.00531+1,775 %−94.7 %1
P-15Field main2,015.01,0501.919019−1.0 %+1.0 %384
P-16Field main1,175.91,0501.119911−1.8 %+1.8 %224
P-17Field main to reservoir2,269.91,0502.161822+1.8 %−1.7 %432

At 0.1 s the flowmeter spool, whose true travel time is 2.1 ms, has to become one reach of 0.1 s. Adjusting length turns 2.4 m of pipe into 115 m; adjusting wave speed turns 1,150 m/s into 24 m/s. The long pipes barely move. The Mean and RMS figures look alarming only because a handful of short pipes dominate them, which is the first lesson: read the adjustment pipe by pipe, not as one number.

4 · Interactive: the adjustment for any time step

Choose the model and the adjustment mode and move the time step. The chart shows the largest adjustment in the model over the whole range of time steps for both modes; the table lists every pipe at the selected step. The readouts are the three figures HAMMER reports.

Time step against the adjustment it forces
\(n_i = \max(1, \mathrm{round}(L_i/a_i\Delta t))\). Length mode: \((n_i a_i\Delta t - L_i)/L_i\). Wave speed mode: \((L_i/n_i\Delta t - a_i)/a_i\). Max, mean and RMS of the absolute values over all pipes, unweighted. Log scales on both axes.
Section 6 explains how the short pipes were merged.
The table and readouts follow this choice.
From 0.001 to 0.2 s.
Max adjustment
–
Mean adjustment
–
RMS adjustment
–
Worst pipe
–
Reaches in the model
–
Run effort vs 0.1 s
–
PipeL (m)a (m/s)nModelled L / aAdjustment

On the as-imported model the largest adjustment never falls below 5 % in either mode, even at 0.001 s with 11,421 reaches for a 12 km main. The cleaned model gets below 5 % at 0.005 s with 2,284 reaches, and below 1.1 % at 0.002 s. The curves are saw-toothed: a slightly larger step can need less adjustment than a smaller one, because what matters is how close each \(L_i/a_i\Delta t\) falls to a whole number. Run effort is the number of reaches times the number of steps, relative to the same model at 0.1 s.

5 · What the adjustment does to the answer

We ran the vessel-protected trip on both models at seven time steps in both modes, 150 s each, and compared every result with a reference run of the as-imported model at 0.0005 s (22,850 reaches, largest adjustment 4.3 %). The reference gives +4.26 m at 4.3 km, a maximum of 119.27 m and a peak gas volume of 16.19 m³. The cleaned model at 0.0005 s agrees to 0.01 m.

Vessel-protected pump trip on the as-imported model. Reference: +4.26 m minimum, 119.27 m maximum
Δt (s)ReachesMin, length adj. (m)Max, length adj. (m)Min, wave speed adj. (m)Max, wave speed adj. (m)
0.265+2.64123.07+12.4485.00
0.1122+3.58121.43+4.9289.95
0.05234+4.05120.07+1.44109.69
0.02575+4.20119.52+4.07117.57
0.011,144+4.25119.34+4.18118.96
0.0052,285+4.26119.29+4.24119.21
0.0025,710+4.26119.28+4.25119.35

Four things stand out.

The same trip, the same model, different time steps
Vessel-protected pump trip, 150 s runs. Upper: highest head on the line. Lower: lowest pressure head on the line. Dashed lines are the 0.0005 s reference run of the as-imported model (+4.26 m and 119.27 m). Time step on a log scale.
Both adjustment modes are drawn.
Readouts for the length (L) and wave speed (a) modes.
+3.0 m in this series; many owners accept about −3 m.
Max adjustment, L / a
–
Highest head, L / a
–
Error on the max, L / a
–
Lowest head, L / a
–
Error on the min, L / a
–
Verdict at the minimum, L / a
–

Switch to the cleaned model and the spread collapses: at 0.1 s the maximum is within 1.2 m of the reference in both modes, and from 0.05 s down every result is within 0.15 m. At 0.1 s the cleaned model in wave-speed mode still drops the minimum to +3.4 m near 1 km, because the 41 m road crossing is then one reach with its wave speed cut by 64 % and the 66 m station pipe by 43 %. At 0.2 s even the cleaned model fails in wave-speed mode (−0.4 m). A large custom time step is the first thing we look for in someone else's run.

6 · Cleaning the model: what to merge and what to keep

The cure for adjustment is rarely a smaller time step. On a large network that multiplies run time, and HAMMER's documentation itself points to lengthening short pipes, subdividing long ones and using Skelebrator to remove short pipes [3][4]. We merged five things:

Some things must never be merged away, whatever they do to the time step: a dead-end branch (it reflects the wave and doubles the pressure at its end), a closed valve, the node of any protection device, a high point or a change of gradient on the profile, and any pipe where the diameter changes enough to change the impedance. When in doubt, keep the pipe and reduce the time step for that run only.

Our working rule We clean the model until the largest adjustment is a few percent on every pipe longer than about two reaches, and then prove the time step by halving it (section 7). We read the adjustment pipe by pipe: on the cleaned model at 0.05 s, a 40 % length change on the 41 m road crossing moved the answer by 0.14 m at most, while a 98 % wave-speed change on a 2.4 m spool beside the pump moved the maximum by 29 m.

7 · Halve the step: grid convergence on the uniform main

Even with no adjustment at all, a coarse grid smears steep wave fronts and moves the extremes. On the uniform reference main, where any \(\Delta t = 12{,}000/(1{,}050\,N)\) fits exactly, we ran three cases at six grid sizes: the vessel design, the 400 kg·m² flywheel of Pump Inertia and the Flywheel, and the unprotected trip, whose peak comes from cavity collapse.

Grid convergence on the uniform 12 km main, 150 s runs
Reaches NΔx (m)Δt (s)Vessel: min (m)Vessel: max (m)Flywheel: min (m)Unprotected max, vapour cavity (m)Unprotected max, gas cavity (m)
304000.381+4.57118.90+9.40189.1168.1
602000.191+4.41119.06+9.36189.3161.1
1201000.095+4.33119.15+9.34189.9164.6
240500.048+4.29119.19+9.33190.0161.2
480250.024+4.27119.21+9.32190.0162.5
960120.012+4.26119.22+9.32190.1162.2

The two protected cases converge cleanly. From the coarsest grid to the finest, the vessel minimum falls by 0.31 m, and every halving halves the change (0.16, 0.08, 0.04, 0.02, 0.01 m), which is first-order behaviour. A model at 0.38 s would report +4.57 m and overstate the margin above +3.0 m by a quarter. The flywheel minimum hardly moves (0.08 m). The collapse peak behaves differently: the vapour cavity model settles at 189–190 m, while the gas cavity model wanders between 161 and 168 m with no trend. Collapse peaks do not converge the way a single-phase result does, which is why this series quotes them as a range and designs to keep the line out of vapour [6][7].

Does the answer stop moving when the step is halved?
Uniform reference main, N = 30 to 960 reaches (\(\Delta t\) = 0.38 to 0.012 s). Upper: the two protected minima. Lower: the unprotected maximum in the two cavity models. Grid on a log scale.
The readouts compare it with the run at half the step (twice the reaches).
How much change you will accept before trusting the run.
Vessel min, this run
–
At half the step
–
Change on halving
–
Extrapolated value
–
Verdict
–

The extrapolated value assumes first-order convergence: \(H_\infty \approx 2H_{2N} - H_N\). From every grid, even N = 30 (0.38 s), the extrapolation lands within 0.01 m of the finest run. With a 0.10 m tolerance the vessel minimum is converged from N = 60. Select N = 960 and there is no finer run to compare with, which is the honest position for any production model: the last halving is the evidence.

In HAMMER this check is two runs: the time step HAMMER suggests, and the same scenario with Use Custom Time Step? checked and half that value. The documentation recommends the same kind of test with a very small step [4]. Compare the minimum and maximum envelopes at the critical points, not only at the pump.

8 · Run duration: the peak that arrives at 101 seconds

A pump trip on a long main with a vessel is a slow event. The first downsurge is over in one wave cycle, but the column then swings back and forth between the vessel and the reservoir with a period set by the gas volume and the length of the line, much longer than 2L/a. On the reference main the lowest head is reached at 18.6 s. The highest head, 119.2 m at the pump, comes at 101 s on the return swing, more than four times 2L/a. The HAMMER workflow article on this site uses 90 s as an example duration; on this main a 90 s run would report a maximum of 85.0 m, the steady head, and miss the upsurge entirely.

What a run of a given length would report
Vessel-protected pump trip on the uniform reference main, 400 s at \(\Delta t\) = 0.0095 s. Head at the pump and at mid-line (6 km); the shaded area is the part of the event a run of the chosen length never sees. The dashed traces are the line envelope as it builds up.
2L/a = 22.9 s. The vertical line marks the end of the run.
Duration / (2L/a)
–
Reported min
–
Reported max
–
Max missed by
–
Verdict
–

The minimum is captured from 19 s onwards; the maximum needs 102 s. Between 102 and 400 s nothing changes, so 150 s (6.6 × 2L/a) is enough here. On a main protected by air valves, a one-way tank or a flywheel the governing peak can come later still, after a cavity has grown and collapsed or a tank has drained.

Our rule: run at least long enough to see the first full swing of the slowest oscillation in the system, then extend the run by half and confirm that neither envelope moves. If the maximum or minimum occurs in the last quarter of the run, the run is too short.

9 · Hand checks the model must pass

Before trusting a model of a real system, we run a test scenario whose answer we already know. The cleanest is the Joukowsky test: replace the pump with a reservoir at the duty head, put a valve at the far end, and close it faster than 2L/a. The head at the valve must jump by [1][5]

\[ \Delta H \;=\; \frac{a\,\Delta V}{g} \;=\; \frac{1050 \times 1.3926}{9.81} \;=\; 149.1\ \text{m} \]

Our test model holds 45.8 m at the valve in steady flow (1.0 m across the open valve).

Joukowsky test on the uniform main: valve at 12 km closing linearly, reservoir at 85.0 m upstream
CheckHand valueModelComment
Rise at the valve, instant closure (first step)149.1 m149.1 mfrom 45.8 m to 194.9 m in one step
Head at the valve, 5 s closure, just after closureabout 195 m196.3 mclosure well inside 2L/a, so the full Joukowsky rise plus a little line packing
Peak at the valve, instant closure≥ 194.9 m233.8 m at 22.9 sJoukowsky plus line packing, just before the reflection returns at 2L/a = 22.9 s
Peak at the valve, 5 s closure≥ 194.9 m227.5 m at 24.4 sslightly lower and later: the rise is built over 5 s instead of in one step

The rise above the Joukowsky value is line packing: as the front runs upstream it meets water at progressively higher head, and the water still flowing towards the valve behind it keeps packing the line, so the head at the valve keeps climbing until the reflection returns [1][8]. On a long, high-friction main it is a real part of the peak. If the first rise in your model is a few percent off \(a\Delta V/g\), look at the adjusted wave speeds before anything else.

Three more checks take minutes:

10 · Setting it up in Bentley HAMMER

Field names differ slightly between HAMMER versions; these follow the current documentation [3][4][9].

  1. Compute the steady state first and compare it with the design model: flows, pump duty points and the HGL at the ends of the main (85.0 m and 44.8 m here).
  2. Clean the model for transients. Merge station pipework, chamber spools and other short pipes as in section 6, or use Skelebrator, but keep every device node, dead end, closed valve and high point.
  3. Open Transient Time Step Options and read the suggested Time Step and the Max, Mean and RMS Adjustment. Set Adjustment Type to relative so the figures are percentages, and sort the pipe adjustments to find the worst pipes.
  4. Leave Adjust on Length unless you have a reason to change it, and do not raise Max Adjustment just to clear the warning. If the warning appears, fix the short pipes it points to.
  5. Set the run duration in time, not time steps, and make it at least 6–7 × 2L/a for a pumped main with a vessel. Extend it by half once and confirm that the envelopes do not change.
  6. Choose report points at the pump, at the vessel, at every high point and knee, and at mid-line, and turn on Generate Animation Data so the profile envelopes can be checked along the whole line.
  7. Run the halved step: check Use Custom Time Step?, enter half the suggested value, and rerun the governing scenario. Record both results in the report.
  8. Run the Joukowsky test once per model as a separate scenario, with the pump replaced by a reservoir and a valve closing in a fraction of 2L/a at the far end.
  9. Record everything: time step, adjustment mode, max/mean/RMS adjustment, the worst pipes, the halved-step result and the run duration, in the model basis of the report.

11 · Checklist

Surge analysis practice series
  1. Is your HAMMER run right? Time step, adjustment and run duration
  2. Pump data for a pump trip: inertia, specific speed and four-quadrant curves
  3. Reading the surge envelope against the pipe's real limits
  4. The surge study report: what to deliver and what a reviewer checks
The protection devices themselves are covered in the surge protection design series.

References & standards

  1. Wylie, E.B. & Streeter, V.L. Fluid Transients in Systems. Prentice Hall, 1993: the method of characteristics, the Courant condition, interpolation and wave-speed adjustment, and the Joukowsky relation.
  2. Abokhatwa, M. Surge protection design series, abokhatwa.com, 2026: the reference main, the vessel design and the verified MOC solver used throughout this article.
  3. Bentley Systems. OpenFlows HAMMER documentation, “Transient Time Step Options Dialog Box”: time step, Max, Mean and RMS Adjustment, Adjust (Length or Wave speed), Adjustment Type, Use Custom Time Step and the excessive-adjustment warning.
  4. Bentley Systems. OpenFlows HAMMER documentation, “Selection of the Time Step”: why the time step forces adjustments, the absence of a fixed limit, and sensitivity testing with a smaller step.
  5. Chaudhry, M.H. Applied Hydraulic Transients, 3rd ed. Springer, 2014: discretisation of pipe networks, wave-speed adjustment and the accuracy of characteristic methods.
  6. Bergant, A., Simpson, A.R. & Tijsseling, A.S. “Water hammer with column separation: a historical review.” Journal of Fluids and Structures, 22(2), 2006: vapour and gas cavity models and why collapse peaks depend on the model and the grid.
  7. Simpson, A.R. & Bergant, A. “Numerical comparison of pipe-column-separation models.” Journal of Hydraulic Engineering, 120(3), 1994: grid sensitivity of the discrete vapour cavity model.
  8. Thorley, A.R.D. Fluid Transients in Pipeline Systems, 2nd ed. Professional Engineering Publishing, 2004: line packing and the effect of friction on the transient peak.
  9. Karney, B.W. & Ghidaoui, M.S. “Flexible discretization algorithm for fixed-grid MOC in pipelines.” Journal of Hydraulic Engineering, 123(11), 1997: the errors introduced by wave-speed adjustment and interpolation, and ways to limit them.
#SurgeAnalysis #WaterHammer #HydraulicTransients #BentleyHAMMER #OpenFlowsHAMMER #TimeStep #WaveSpeedAdjustment #CourantCondition #MethodOfCharacteristics #GridConvergence #ModelVerification #RunDuration #Joukowsky #LinePacking #ColumnSeparation #SurgeVessel #PumpTrip #TransmissionMain #DuctileIron #PumpStation #TransientAnalysis #HydraulicModelling #Skeletonization #PipelineDesign #WaterEngineering