BOSfluids
Tutorial
Water hammer (part 2)
The Water hammer tutorial is a 2 part tutorial describing the
phenomena of water hammers in piping systems and how BOSfluids
can examine the pressure spike and unbalanced forces. The tutorial
will go into further details and available options within the postprocessing of results.
BOSfluids
Water Hammer Part 2
1. INTRODUCTION
The document discusses the post processing procedure for the Water Hammer example. It
covers aspects of creating 2-D plots, and 3-D visualization of results, reporting of results,
adjusting plot and output setting and exporting results.
Figure 1 | 3-D image of model
After creating and setting up the model and running the simulation in part 1 of the water
hammer tutorial, the user should have steady state and transient output files for review. The
results that are of interest in this section are:
The pressure rise in the system due to the valve closure
The unbalanced forces that result from the closure
2. POST PROCESSING FEATURES
At the tab Results, the output from the analysis can be reviewed. The tab looks as shown in
Figure 2.
Copyright  Dynaflow Research Group.
Page 1 of 8
BOSfluids
Water Hammer Part 2
Figure 2 | Results view window
Inside the red box with label B in above figure, the minimum and maximum values for the
whole system are shown. The values at the left apply to the current time as indicated at the
red box with label A, while the values at the right are the minimum and maximum value
occurring for the entire simulation time.
Output can be reviewed in the 3D-visualization as well as in graphical format. After having
run the transient solution, the following options are available:
3-D Graphical results  Under the Heading 3-D Output, you can select variables Flow Rate,
Force, Pressure and Velocity. These variables are plot in the visualizer. To review the results
through time, use one of the following options:
use the slider to view the variation of the selected variable through time
use the Animate button to view the variation of the selected variable through time
Note: you can vary the speed of the animation using the Set the animation speed button.
Profile plot - Click the button
and enter a first and last node to plot the selected
variable in graph format. The selected variable is plotted with length along your selected piping
on the horizontal axis. Note that when entering a first and last node, the flow path needs to be
Page 2 of 8
Copyright  Dynaflow Research Group.
BOSfluids
Water Hammer Part 2
unique. For flow paths with branches, no logical graph output is possible and therefore, the
program will return a message that this is not possible.
The Profile plot and the 3-D graphical results can be viewed simultaneously. When using the
slider or the Animate button as discussed before, both the 3-D graphical results and the Profile
plot vary through time in a synchronous way.
2-D Output  Under the heading 2-D Output, you can select the variables of interest and plot
these for selected points of the system. The variable types you can select depend on the
points you select. Points you can select are:
Nodes  For individual nodes, you can plot Flow Rate, Force, Pressure and Velocity.
Node groups  For groups of nodes, you can plot the same variables as for individual
nodes. Node groups are created in the BCs and Nodes tab.
Element  For all element types different than the pipe element, you can plot the
variables of interest. For example, for a valve, you can plot Flow Rate, Opening and
Pressure Drop.
Element groups  For groups of elements, you can plot the same variables as for
individual elements.
The selected variable is plotted with time on the horizontal axis. When plotting groups of
nodes or elements, one graph is plotted for each node or element in this group. Frequency
spectrums are also able to be plotted by changing the x-axis from time domain to frequency
domain.
Since for the Steady State solution there is no variation in time, some options are not
available to review the results for this analysis type.
2.1. Absolute values and Max and Min
In the Results tab, the user can select to display the absolute values of the selected variables
and the maximum and minimum markers. These options can be accessed by clicking the
Configure Output Setting button
found along the Results toolbar.
The display of absolute values is useful when the user is not interested in the direction of the
flow rate or force, but rather the maximum or minimum magnitude of the variable. This in
combination with the displaying the maximum and minimum markers assist to quickly
identify and located areas of greatest interest.
Copyright  Dynaflow Research Group.
Page 3 of 8
BOSfluids
Water Hammer Part 2
2.2. Settings in Plotted Results
When results are plotted in a graph, the user is able to modify various features. The options
can be found by accessing the settings options by clicking the settings icon
or by
accessing View  Settings. Various options can be adjusted, including:
Title of plot
Labels of the X and Y axis
Set the range of X and Y axis
The option to remove or show the legend of the plot
Select which data set to display
Change the properties of the plotting style for each data set, including color, line
width and point style.
Adjusting the plot settings allow the user to fully customize the appearance of the graphs.
The graphs can be exported as a data files or figures to be included in reports.
2.3. Reporting of results
By selecting the
icon, the user can select from a range of different reports to view the
input and output of the simulation. The common reports that are viewed include:
Data Listing (SRG file). Describes the model and the input for the solver. This is
useful when trying to debug the model, or view the input into the solver. It describes
each element in the model, and the analysis parameters.
Max and min pressure, flow rate and force. Reports the maximum and minimum
value for each output parameter for each element, including position and at what
time.
Pipe parameters. Reports the parameters for the piping elements in the model,
including pipe length, wave speed and friction factor used.
Steady state and transient warnings and messages. Reports any warnings or errors
during solving of the steady state and transient simulation.
If unexpected results appear in the model, it is always useful to check the above mentioned
reports for any errors in the input. Similarly, it is useful to quickly identify the maximum
and minimum parameters in the model.
Page 4 of 8
Copyright  Dynaflow Research Group.
BOSfluids
Water Hammer Part 2
3. ANALYZING RESULTS
Let us examine the steady state pressure profile solution, at t=0, across the entire pipe length,
illustrated in Figure 3. Selecting the profile plot button, enter the starting and ending node 1
and 125 respectively.
Figure 3 | Pressure profile of pipeline
The variations of pressure upstream of the valve are due to the height variation along the
line and the related hydrostatic pressure variation. Also, we see a significant pressure drop
across the valve of approximately 1.6 bar. This is due to the relatively small discharge
coefficient
Let us now observe the transient solution. It can be seen from the min/max values displayed
in the Results tab, that the maximum pressure occurs at node 5 (directly before the valve)
and the minimum pressure occurs at node 4 (directly after the valve).
The pressure drop across the valve can be shown in a time plot. Go to the 2-D Output 
Element. Select valve1 from the drop down menu and tick Pressure Drop from the data set,
and click Plot. The following plot should be observed.
Copyright  Dynaflow Research Group.
Page 5 of 8
BOSfluids
Water Hammer Part 2
Figure 4 | 2-D transient plot of the pressure drop across the valve
Figure 4 illustrates the initial pressure drop at steady state across the valve is constant as
expected (note that since the pressure increases from node 4 to node 5, the pressure drop has
a negative value). As the valve begins to close after 1 second, a large spike in pressure across
the valve is observed of approximately 12 bar. After the valve is fully closed at t=1.4 seconds,
the propagation of the water hammer wave through the pipeline can clearly be seen.
The large spike in pressure during closing of valve creates a significant force in the system.
This can be seen by selecting 2-D Output  Node  5 and Data Sets  Force and clicking Plot.
Figure 5 | 2-D transient profile of the unbalanced force applied to the valve
Figure 5 shows that a maximum force of 34 kN is experienced by the valve during closing.
This is a significant force impulse that could generate high stresses on the valve and its
Page 6 of 8
Copyright  Dynaflow Research Group.
BOSfluids
Water Hammer Part 2
connections. From this analysis it becomes apparent that it should be checked whether the
installed valve is rated for these pressure and force spikes. The same applies for the piping.
After the valve is closed, the reflecting pressure waves create a sinusoidal unbalanced force
on the system. The magnitude and frequency of the impulse and sinusoidal force needs to be
examined so that it doesnt excite a mode of vibration of the mechanical system. This is
particularly important for the force pairs specified earlier in part 1.
To determine the frequency and amplitude of a sinusoidal force, the plot of can be changed
from a time domain to a frequency domain. Figure 6 shows the force frequency plot at node
50.
Figure 6 | Frequency spectrum plot at node 50
It can be seen that for node 50 a peak occurs at a frequency of 4 Hz with a magnitude of
800N. The frequency matches to what we expect from theory for an open close system. The
theoretical solution of the natural frequency of the system can be found from the wave
speed, c and the system length, L:
 =
1373 [/]
=
= 4.0 
4  85 []
4
To determine the impact of the unbalanced forces on the piping, the unbalanced force profile
can be exported. This profile can then be imported by a pipe stress analysis program of
choice. The profiles are exported by selecting Tools  Exporting Forces. A list of all the node
pairs which were defined by the user before the analysis (see part 1) are displayed and the
user can select which node pairs to export. Various output formats are available.
One option the user has is to export the unbalanced forces in a data file which can be
imported by the CAESAR II pipe stress program. The unbalanced forces can be used to
Copyright  Dynaflow Research Group.
Page 7 of 8
BOSfluids
Water Hammer Part 2
perform a dynamic stress analysis. An example of such an analysis is found in the tutorial
Water Hammer  Dynamic analysis using CAESAR II.
Page 8 of 8
Copyright  Dynaflow Research Group.