You are on page 1of 38

Simulation Software for the Analysis of electrical Power Networks,

Adjustable Speed Drives and Hydraulic Systems

TUTORIAL HYDRO 1: WATERHAMMER IN PIPE

Table of contents page

1 Introduction ...................................................................................................................... 2
2 Simulation model setup ................................................................................................... 3
2.1 Construction of the piping system ................................................................................. 3
2.2 Hydraulic connections (wires and crossings) ................................................................ 4
2.3 Parameters of the elements ............................................................................................ 5
2.4 Graphical features ........................................................................................................ 13
2.5 Simulation parameters ................................................................................................. 14
3 Initial condition determination ..................................................................................... 15
3.1 Initial conditions calculations ...................................................................................... 15
3.2 Initial conditions results ............................................................................................... 17
4 Simulation ....................................................................................................................... 18
4.1 Parameters of the elements .......................................................................................... 18
4.2 Simulation parameters ................................................................................................. 21
4.3 Simulation .................................................................................................................... 22
4.4 Simulation results......................................................................................................... 23
5 Suggestion for valve/injector modeling ........................................................................ 24
5.1 Modification of the piping system ............................................................................... 25
5.2 Parameters of the elements .......................................................................................... 25
5.3 Graphical features ........................................................................................................ 32
5.4 Simulation parameters ................................................................................................. 33
5.5 Initial conditions calculations ...................................................................................... 34
5.6 Simulation .................................................................................................................... 35
5.7 Simulation results......................................................................................................... 36
5.8 Modification of initial conditions ................................................................................ 37

Last update : 11.06.2019


SIMSEN Tutorial 1: WATERHAMMER IN PIPE 2

1 Introduction

This tutorial shows how to simulate the transient response of a piping system due to valve
closure. The figure 1.1 shows the layout of the system of interest. The system is made of an
upstream and downstream reservoir, a pipe and a downstream valve. The simulation will
proceed in two phases. First, the initial conditions are determined using a stabilization
procedure. In the second phase, the transient behavior of the piping system resulting from
downstream valve closure is simulated.

Figure 1.1: Layout of the system of interest

-2-
SIMSEN Tutorial 1: WATERHAMMER IN PIPE 3

2 Simulation model setup

2.1 Construction of the piping system

The list of elements to be inserted into the model is given in the table below, each with the
corresponding category to help you find them in the elements library. For help on how to insert
elements into a model, please consult the Quick_User_Guide, section 4.1 (Adding New
Elements).

Category Sub-category Element Type Required number


Hydro Reservoir Reservoir (Dam) 1
Hydro Reservoir Reservoir (Tank) 1
Hydro Pipes PipeZ 1
Hydro Valves-Sources Valve 1
Element Special Output 1
Functions Regulation Prog 1

Figure 2.1.1: Selecting and placing elements on the editing grid

Difference between PIPEZ and PIPEN:

It is recommended to use the element PIPEZ and not PIPEN. Indeed, even if the pipe dynamic
model in both elements is identical, the element PIPEZ offers the following advantages:
- It includes elevation of inlet and outlet of the pipe (Zin and Zout, origin of the new
pipe model) to compute automatically static pressure along the pipe assuming a
straight pipe between both ends;
- By default, the PIPEZ element provides many additional simulation results as
compared to PIPEN element, such as piezometric head Hz, kinetic head Hk, static
pressure Hp, and flow velocity C for both pipe extremities denoted “1” and “Nb”;
- The viscoelastic resistance Rve is automatically calculated based on the pipe/fluid
equivalent volumetric viscosity Mu.

-3-
SIMSEN Tutorial 1: WATERHAMMER IN PIPE 4

2.2 Hydraulic connections (wires and crossings)

You have placed your elements on the editing grid. Now you have to connect them, according
to the desired topology. In the element library panel, select the CONNECTIONS tab, then
select the wire and connect the element as shown in figure 2.2.1. For help on how to connect
elements with wires, please refer to the Quick_User_Guide, section 4.2 (Wire Elements
Together)

Figure 2.2.1: Wiring the elements

-4-
SIMSEN Tutorial 1: WATERHAMMER IN PIPE 5

2.3 Parameters of the elements

It is necessary to specify the parameters of the elements. The corresponding names are shown
in figure 2.3.1.

Figure 2.3.1: Elements names

Directly double-click on the element you want to parameterize. Thus, you can open the related
window for each element. The next pages will show you, with bold characters, the parameters
you have to introduce for each element of the hydraulic part.

When introducing the parameters for each element, you can open the related help file by
clicking on the corresponding element and pressing F1. Thus, you can benefit from more
information about the current element.

-5-
SIMSEN Tutorial 1: WATERHAMMER IN PIPE 6

2.3.1 Reservoir Reserv1

- GENERAL DATA :

Name = RESERV1
Comment =
Writing = SI

- RATED VALUES :

Hn [m] = 0.00000000000E+0000
Qn [m3/s] = 0.00000000000E+0000

- PARAMETERS :

H [m] = 1.50000000000E+0002
Rho [kg/m3] = 1.00000000000E+0003
g [m/s2] = 9.81000000000E+0000

- INITIAL CONDITIONS :

Q [m3/s] = 0.00000000000E+0000

Explanation:

Each element of the system must have a different name. The rated values Hn, Qn are used when
the user wishes to get output results in per unit (‘Writing = PU’) and the two rated values are
required. As ‘Writing’ is by default set to SI (International System), you can omit the input of
rated values. The initial conditions are the values that will be used to start the next simulation.
The current explanation is valid for all the hydraulic elements.

-6-
SIMSEN Tutorial 1: WATERHAMMER IN PIPE 7

2.3.2 Pipe Pipe1

- GENERAL DATA :

Name = PIPE1
Comment =
Writing = SI

- RATED VALUES :

Hn [m] = 0.00000000000E+0000
Qn [m3/s] = 0.00000000000E+0000

- PARAMETERS :

Nb [1] = 5.00000000000E+0001
Zin [m] = 1.40000000000E+0002
Zout [m] = 0.00000000000E+0000
L [m] = 6.00000000000E+0002
D [m] = 5.00000000000E-0001
Dh [m] = 0.00000000000E+0000
Ah [m2] = 0.00000000000E+0000
a [m/s] = 1.20000000000E+0003
Lambda [1] = 1.80000000000E-0002
Ksi [1] = 1.00000000000E+0000
Mu [Pa.s] = 0.00000000000E+0000
Rho [kg/m3] = 1.00000000000E+0003
g [m/s2] = 9.81000000000E+0000

- INITIAL CONDITIONS :

Q1 [m3/s] = 0.00000000000E+0000
Hc1 [m] = 0.00000000000E+0000
Q2 [m3/s] = 0.00000000000E+0000
Hc2 [m] = 0.00000000000E+0000
Q3 [m3/s] = 0.00000000000E+0000
Hc3 [m] = 0.00000000000E+0000
Q4 [m3/s] = 0.00000000000E+0000
Hc4 [m] = 0.00000000000E+0000
Q5 [m3/s] = 0.00000000000E+0000
Hc5 [m] = 0.00000000000E+0000
Q6 [m3/s] = 0.00000000000E+0000
Hc6 [m] = 0.00000000000E+0000
Q7 [m3/s] = 0.00000000000E+0000
Hc7 [m] = 0.00000000000E+0000
Q8 [m3/s] = 0.00000000000E+0000
Hc8 [m] = 0.00000000000E+0000
Q9 [m3/s] = 0.00000000000E+0000
Hc9 [m] = 0.00000000000E+0000
Q10 [m3/s] = 0.00000000000E+0000

Explanation:

The number of elements Nb=50 has been determined using CFL criteria, see also PipeZ Help
File in section “NUMBER OF ELEMENTS NB”, considering time basis dT=0.01s leading to
dx=a*dT=1200*0.01=12m and Nb=L/dx=50. Elevation of the pipe inlet is Zin=140masl while
outlet is set at Zout=0masl.

-7-
SIMSEN Tutorial 1: WATERHAMMER IN PIPE 8

2.3.3 Valve Valve1

- GENERAL DATA :

Name = VALVE1
Comment =
Writing = SI

- RATED VALUES :

Hn [m] = 0.00000000000E+0000
Qn [m3/s] = 0.00000000000E+0000

- PARAMETERS :

K [1] = 4.75069424820E+0002
Aref [m2] = 1.96350000000E-0001
Rho [kg/m3] = 1.00000000000E+0003
g [m/s2] = 9.81000000000E+0000

- INITIAL CONDITIONS :

Q [m3/s] = 0.00000000000E+0000

Explanation:

The head loss coefficient has been determined to reach steady state discharge of Q=
4.77960800156E-0001 under gross head of 150m and considering reference cross section of
Aref=1.96350000000E-0001 m2 leading to a valve net head of H=143.48mWC. The head
losses through the valve being defined as follows:

Kd
dH r = Q Q
2  g  Aref 2

-8-
SIMSEN Tutorial 1: WATERHAMMER IN PIPE 9

2.3.4 Reservoir Reserv2

- GENERAL DATA :

Name = RESERV2
Comment =
Writing = SI

- RATED VALUES :

Hn [m] = 0.00000000000E+0000
Qn [m3/s] = 0.00000000000E+0000

- PARAMETERS :

H [m] = 0.00000000000E+0000
Rho [kg/m3] = 1.00000000000E+0003
g [m/s2] = 9.81000000000E+0000

- INITIAL CONDITIONS :

Q [m3/s] = 0.00000000000E+0000

-9-
SIMSEN Tutorial 1: WATERHAMMER IN PIPE 10

2.3.5 Output Out

- GENERAL DATA :

Name = OUT
Comment =
Writing = YES

- REFERENCES X :

PIPE1 HC1 1/150 0 hC1 [p.u]


PIPE1 HC25 1/150 0 hC25 [p.u]
PIPE1 HC50 1/150 0 hC50 [p.u]

- PARAMETERS :

Explanation:

This unit reads the value HC1, HC25 and HC50 of the pipe Pipe1. These values are multiplied
by 1/150 and we add 0 in order to display them in PU. Even if the plotting program Visual 2.2
allows for multiple file open, this unit is useful to save time by choosing the variables you want
to output and by setting 'Writing = NO' in all other units, or simply by recording the variables
you want to compare in the same file.

For definitions of the HCXX, see the PIPEZ help file in the section “LIST OF QUANTITIES
AND PARAMETERS”.

Please note that HC1, HC25 and HC50 corresponds to pressure heads located in the middle of
the elements 1, 25 and 50 of the PIPE1 element. It corresponds respectively to positions x=6m,
x=294m, and x=594m. Indeed, according to length L=600m and number of elements Nb=50,
dx=L/Nb=12m, and center of element is located at x=dx/2=6m, while center of element 25 is
located at x=25*dx-dx/2=24.5*dx=294m, and element 50 is located at x=50*dx-
dx/2=49.5*dx=594m. See also spatial discretization, control volumes and state variables
locations in figure 2.3.2.

- 10 -
SIMSEN Tutorial 1: WATERHAMMER IN PIPE 11

Figure 2.3.2: Pipe element spatial discretization (top), control volumes (middle) and state
variables locations (bottom)

- 11 -
SIMSEN Tutorial 1: WATERHAMMER IN PIPE 12

Program Prog1

- GENERAL DATA :

Name = PROG1
Comment =
Writing = YES

- REFERENCES X :

- REFERENCES Y :

- DATA :

- PARAMETERS :

dT [sec] = 0.00000000000E+0000

- INITIAL CONDITIONS :

kdT [sec] = 0.00000000000E+0000


y1 [1] = 0.00000000000E+0000
y2 [1] = 0.00000000000E+0000
y3 [1] = 0.00000000000E+0000
y4 [1] = 0.00000000000E+0000
y5 [1] = 0.00000000000E+0000
y6 [1] = 0.00000000000E+0000
y7 [1] = 0.00000000000E+0000
y8 [1] = 0.00000000000E+0000
y9 [1] = 0.00000000000E+0000
y10 [1] = 0.00000000000E+0000
y11 [1] = 0.00000000000E+0000
y12 [1] = 0.00000000000E+0000
y13 [1] = 0.00000000000E+0000
y14 [1] = 0.00000000000E+0000
y15 [1] = 0.00000000000E+0000
y16 [1] = 0.00000000000E+0000
y17 [1] = 0.00000000000E+0000
y18 [1] = 0.00000000000E+0000
y19 [1] = 0.00000000000E+0000
y20 [1] = 0.00000000000E+0000

- 12 -
SIMSEN Tutorial 1: WATERHAMMER IN PIPE 13

2.4 Graphical features

It is advised to add some graphical elements to make your example more understandable. In
the element library panel, select the GRAPHICS tab, then select Lines and Arrow to create the
red arrow.

Add graphical elements as shown in figure 2.4.1.

Figure 2.4.1: Graphical features

- 13 -
SIMSEN Tutorial 1: WATERHAMMER IN PIPE 14

2.5 Simulation parameters

Select the following submenu command:

Parameters Simulation Parameters

Fill the main file as follows:

COMMENT :

SIMULATION PARAMETERS :

Time min [sec] = 0.0000000000000


Time max [sec] = 100.000000000000
Integration step [sec] = 0.0100000000000
Precision for immediate events [%] = 1.0000000000000
Precision for simultaneous events [%] = 1.0000000000000
Integration process [-] = RK45
Write in output files every [1] = 1
Initial conditions from [E/M] = E
Disturbances activated [Y/N] = NO

CONSTANT DATA :

PARAMETERS :

INITIAL CONDITIONS :

DISTURBANCES :

Explanation:

Transient behavior of the system will be simulated during 100s with an integration step of 10
ms.

- 14 -
SIMSEN Tutorial 1: WATERHAMMER IN PIPE 15

3 Initial condition determination

3.1 Initial conditions calculations

Click the InHydro menu to enter stabilization mode. Then, in the menu InHydro, select Flow
Stabilization and answer Yes to the next question. The simulation for initial condition
determination starts. When the stabilization simulation is terminated, the simulation window
looks as shown in figure 3.1.1.

Figure 3.1.1: End of the stabilization simulation

Please wait until you can read the last simulation message
‘End of simulation: <s> = save and update, <any other key> = quit’.

Then, save the last calculated point by pressing the <s> key, to update initial condition of
elements for the next simulation.
The window closes automatically.

Explanation:

The procedure InHydro enables to determine initial conditions of simulation model based on
model parameter setting. At the end of the InHydro procedure, as stable steady state conditions
are reached, see figure 3.2.1, the hydraulic conditions obtained at t=100s are saved in element
window parameter if the users press “s”. Please also note that the stm model itself will not be
“saved”. If the user presses “any other key”, the final conditions of the Inhydro procedure will
not be updated in the hydraulic elements parameter windows. If you open the PIPE1 parameter
window, you will see that the section “initial conditions” of head and discharge from H1 to
H50 and Q1 to Q51 has been updated with steady state conditions found during Inhydro, see
example below. Please also note that according to positive inlet discharge convention, the last
discharge is considered negative.

- 15 -
SIMSEN Tutorial 1: WATERHAMMER IN PIPE 16

- GENERAL DATA :

Name = PIPE1
Comment =
Writing = SI

- RATED VALUES :

Hn [m] = 0.00000000000E+0000
Qn [m3/s] = 0.00000000000E+0000

- PARAMETERS :

Nb [1] = 5.00000000000E+0001
Zin [m] = 1.40000000000E+0002
Zout [m] = 0.00000000000E+0000
L [m] = 6.00000000000E+0002
D [m] = 5.00000000000E-0001
Dh [m] = 0.00000000000E+0000
Ah [m2] = 0.00000000000E+0000
a [m/s] = 1.20000000000E+0003
Lambda [1] = 1.80000000000E-0002
Ksi [1] = 1.00000000000E+0000
Mu [Pa.s] = 0.00000000000E+0000
Rho [kg/m3] = 1.00000000000E+0003
g [m/s2] = 9.81000000000E+0000

- INITIAL CONDITIONS :

Q1 [m3/s] = 4.77960812058E-0001
Hc1 [m] = 1.49934763553E+0002
Q2 [m3/s] = 4.77960812058E-0001
Hc2 [m] = 1.49804298401E+0002
Q3 [m3/s] = 4.77960812058E-0001
Hc3 [m] = 1.49673823902E+0002
Q4 [m3/s] = 4.77960812058E-0001
Hc4 [m] = 1.49543357012E+0002
Q5 [m3/s] = 4.77960812058E-0001
Hc5 [m] = 1.49412888504E+0002
Q6 [m3/s] = 4.77960812058E-0001
Hc6 [m] = 1.49282413823E+0002
Q7 [m3/s] = 4.77960812058E-0001
Hc7 [m] = 1.49151951773E+0002
Q8 [m3/s] = 4.77960812058E-0001
Hc8 [m] = 1.49021479643E+0002
Q9 [m3/s] = 4.77960812058E-0001
Hc9 [m] = 1.48891007806E+0002
Q10 [m3/s] = 4.77960812058E-0001

Hc49 [m] = 1.43672228499E+0002
Q50 [m3/s] = 4.77960812058E-0001
Hc50 [m] = 1.43541761193E+0002
Q51 [m3/s] = -4.77960812058E-0001
Hc51 [m] = 0.00000000000E+0000
Q52 [m3/s] = 0.00000000000E+0000
Hc52 [m] = 0.00000000000E+0000

- 16 -
SIMSEN Tutorial 1: WATERHAMMER IN PIPE 17

3.2 Initial conditions results

Figure 3.2.1: The head and discharge at valve1.

Explanation:

The steady state conditions are reached after 100 s from initial conditions set to zero.

- 17 -
SIMSEN Tutorial 1: WATERHAMMER IN PIPE 18

4 Simulation

4.1 Parameters of the elements

4.1.1 Valve Valve1

- GENERAL DATA :

Name = VALVE1
Comment =
Writing = pu

- RATED VALUES :

Hn [m] = 1.50000000000E+0002
Qn [m3/s] = 4.77960800156E-0001

- PARAMETERS :

K [1] = 4.75069424820E+0002
Aref [m2] = 1.96350000000E-0001
Rho [kg/m3] = 1.00000000000E+0003
g [m/s2] = 9.81000000000E+0000

- INITIAL CONDITIONS :

Q [m3/s] = 4.77960800156E-0001

Explanation:

In order to compare easily the different curves the values are written in PU (‘Per Unit’).

- 18 -
SIMSEN Tutorial 1: WATERHAMMER IN PIPE 19

4.1.2 Program Prog1

- GENERAL DATA :

Name = PROG1
Comment =
Writing = YES

- REFERENCES X :

PROG1 Time 1 0 Time [s] ; x1 = Time

- REFERENCES Y :

VALVE1 K=y2 1 0

- DATA :

g = 9.81 ; [m/s2]
Aref = 0.19635 ; [m2]
Qo = 0.4775 ; [m3/s]
Hn = 143.2 ; [m]
Tclose = 2.1 ; [s]
Tstart = 1 ; [s]
y1 = 1-((x1-Tstart)/Tclose)^0.75
y1 = MAX(y1,1e-6)
y2 = Hn/(Qo*Qo*y1*y1)*2*g*Aref*Aref

- PARAMETERS :

dT [sec] = 0.00000000000E+0000

- INITIAL CONDITIONS :

kdT [sec] = 0.00000000000E+0000


y1 [1] = 0.00000000000E+0000
y2 [1] = 0.00000000000E+0000
y3 [1] = 0.00000000000E+0000
y4 [1] = 0.00000000000E+0000
y5 [1] = 0.00000000000E+0000
y6 [1] = 0.00000000000E+0000
y7 [1] = 0.00000000000E+0000
y8 [1] = 0.00000000000E+0000
y9 [1] = 0.00000000000E+0000
y10 [1] = 0.00000000000E+0000
y11 [1] = 0.00000000000E+0000
y12 [1] = 0.00000000000E+0000
y13 [1] = 0.00000000000E+0000
y14 [1] = 0.00000000000E+0000
y15 [1] = 0.00000000000E+0000
y16 [1] = 0.00000000000E+0000
y17 [1] = 0.00000000000E+0000
y18 [1] = 0.00000000000E+0000
y19 [1] = 0.00000000000E+0000
y20 [1] = 0.00000000000E+0000

- 19 -
SIMSEN Tutorial 1: WATERHAMMER IN PIPE 20

Explanation:

The closure law of the valve Valve1 is taken into account using a program Prog1. The closure
law is started at Tstart = 1 s and lasts Tclose = 2.1 s. This law is defined using the initial
discharge and head at the valve Valve1 obtained as initial conditions and a function MAX to
limit the losses coefficient. The variable Time is defined and exists for all of the elements and
corresponds to the time of the simulation.

We have:

K Ro H
H = R  Q  Q =  Q Q R= = 2 n 2
2  g  Aref
2 2
y1 y1  Qo
Introducing:
0.75
 t − Tstart 
y1 = 1 −  
 Tclose 
It yields:
H
K = 2 n 2  2  g  Aref2

y1  Qo

This approach enables to parameterize a valve model only knowing nominal discharge and net
head and defining closing and starting time of the valve closure.

- 20 -
SIMSEN Tutorial 1: WATERHAMMER IN PIPE 21

4.2 Simulation parameters

Select the following submenu command:

Parameters Simulation Parameters

Fill the main file as follows:

COMMENT :

SIMULATION PARAMETERS :

Time min [sec] = 0.0000000000000


Time max [sec] = 20.0000000000000
Integration step [sec] = 0.0100000000000
Precision for immediate events [%] = 1.0000000000000
Precision for simultaneous events [%] = 1.0000000000000
Integration process [-] = RK45
Write in output files every [1] = 1
Initial conditions from [E/M] = E
Disturbances activated [Y/N] = NO

CONSTANT DATA :

PARAMETERS :

INITIAL CONDITIONS :

DISTURBANCES :

Explanation:

Transient behavior of the system will be simulated during 20s with an integration step of 10
ms.

- 21 -
SIMSEN Tutorial 1: WATERHAMMER IN PIPE 22

4.3 Simulation

Click the Sim menu to enter simulation mode and answer Yes to the next question. The
transient simulation starts. When the simulation is terminated, the simulation window looks as
shown in figure 4.3.1.

Figure 4.3.1: End of the simulation.

At the end of the simulation, wait until you can read the last simulation message:
‘End of simulation: <s> = save and update, <any other key> = quit’.

Close the simulation window without saving the last calculated point by pressing <any other
key>.

Explanation:

According to your selection, the following actions will be undertaken:


- Press <s>: the initial conditions will be updated in the simsen stm model for all
elements according to the system conditions obtained at t=20s;
- Press <any other key>: the initial conditions will not be updated.

For most of the simulation models, the following rules generally apply:
- At the end of the Inhydro procedure: Press <s> to update initial condition you
determined with InHydro procedure; if necessary, the Inhydro procedure can be
launched several times in series and pressing <s> after each calculation in order to
reach fully steady state conditions:
- At the end of a system simulation: Press <any other key> to avoid losing initial
conditions found with InHydro procedure.

- 22 -
SIMSEN Tutorial 1: WATERHAMMER IN PIPE 23

4.4 Simulation results

Figure 4.4.1: Head and discharge along the pipe and at downstream valve (select OUT.vis
and VALVE1.vis)

Figure 4.4.2: Head and discharge along the pipe and at downstream valve (select
VALVE1.vis and PROG1.vis)

End of Tutorial

- 23 -
SIMSEN Tutorial 1: WATERHAMMER IN PIPE 24

5 Suggestion for valve/injector modeling

The valve characteristic used in the first part of this tutorial is defined analytically using
constant parameters. In case the valve characteristic is known, it is possible to take it into
account using two Points functions (element “FPOINT”); one for the valve closing law and one
for the valve characteristic itself.

This second part of the tutorial shows how to consider such modeling based on known valve
characteristics as illustrated in figure 5.1.

Figure 5.1: Layout of the system of interest

- 24 -
SIMSEN Tutorial 1: WATERHAMMER IN PIPE 25

5.1 Modification of the piping system

The list of elements to be inserted into the model is given in the table below, each with the
corresponding category to help you find them in the elements library. For help on how to insert
elements into a model, please consult the Quick_User_Guide, section 4.1 (Adding New
Elements).

Category Sub-category Element Type required number


Functions Regulation FPoints 2

Figure 5.1.1: Selecting and placing elements on the editing grid

5.2 Parameters of the elements

It is necessary to specify the parameters of the elements. The corresponding names are shown
in figure 5.2.1.

Figure 5.2.1: Elements names

- 25 -
SIMSEN Tutorial 1: WATERHAMMER IN PIPE 26

Directly double-click on the element you want to parameterize. Thus, you can open the related
window for each element. The next pages will show you, with bold characters, the parameters
you have to introduce for each element of the hydraulic part.

When introducing the parameters for each element you can call the related help file by clicking
on the corresponding button on the bottom right of the window. Thus, you can benefit from
more information about the element.

- 26 -
SIMSEN Tutorial 1: WATERHAMMER IN PIPE 27

5.2.1 Points Function FP_Y

- GENERAL DATA :

Name = FP_Y
Comment =
Writing = YES

- REFERENCES X :

FP_Y Time 1 0 Time [s]

- REFERENCES Y :

- DATA :

x1 [s] : 0 y1 [-] : 1
x2 [s] : 10 y2 [-] : 1
x3 [s] : 20 y3 [-] : 0
x4 [s] : 100 y4 [-] : 0

Explanation:

The Points Function corresponds to a y=y(x) function defined by series of points. The FPoint
element “FP_Y” defines the valve closing law. The valve closing law is defined considering
y=1 for open position of the valve, and y=0 for closed position.

- 27 -
SIMSEN Tutorial 1: WATERHAMMER IN PIPE 28

5.2.2 Points Function FP_KV

- GENERAL DATA :

Name = FP_KV
Comment =
Writing = YES

- REFERENCES X :

FP_Y y 1 0 yvalve [-]

- REFERENCES Y :

- DATA :

x1 [-] : 0 y1 [-] : 0
x2 [-] : 0.1 y2 [-] : 0.0987055
x3 [-] : 0.2 y3 [-] : 0.189818
x4 [-] : 0.3 y4 [-] : 0.2733375
x5 [-] : 0.4 y5 [-] : 0.349264
x6 [-] : 0.5 y6 [-] : 0.4175975
x7 [-] : 0.6 y7 [-] : 0.478338
x8 [-] : 0.7 y8 [-] : 0.5314855
x9 [-] : 0.8 y9 [-] : 0.57704
x10 [-] : 0.9 y10 [-] : 0.6150015
x11 [-] : 1 y11 [-] : 0.64537

Explanation:

The Points Function corresponds to the valve discharge coefficient characteristic as function
of the valve obturator position Kv=Kv(y) defined by series of points. This discharge
characteristic corresponds to a Pelton turbine injector discharge characteristic defined as
follows:
Q = Kv  Aref  2  g  H r

The input of this function is the output of the element “FP_Y”, corresponding to the valve
obturator position defined between 0 and 1 (respectively closed to open).

- 28 -
SIMSEN Tutorial 1: WATERHAMMER IN PIPE 29

Program PROG1

- GENERAL DATA :

Name = PROG1
Comment =
Writing = YES

- REFERENCES X :

FP_KV y 1 0 Kv [-]

- REFERENCES Y :

VALVE1 K=y1 1 0

- DATA :

Kv=max(1e-6,x1)
Kd=1/(Kv^2)
y1=Kd

- PARAMETERS :

dT [sec] = 0.00000000000E+0000

- INITIAL CONDITIONS :

kdT [sec] = 0.00000000000E+0000


y1 [1] = 0.00000000000E+0000
y2 [1] = 0.00000000000E+0000
y3 [1] = 0.00000000000E+0000
y4 [1] = 0.00000000000E+0000
y5 [1] = 0.00000000000E+0000
y6 [1] = 0.00000000000E+0000
y7 [1] = 0.00000000000E+0000
y8 [1] = 0.00000000000E+0000
y9 [1] = 0.00000000000E+0000
y10 [1] = 0.00000000000E+0000
y11 [1] = 0.00000000000E+0000
y12 [1] = 0.00000000000E+0000
y13 [1] = 0.00000000000E+0000
y14 [1] = 0.00000000000E+0000
y15 [1] = 0.00000000000E+0000
y16 [1] = 0.00000000000E+0000
y17 [1] = 0.00000000000E+0000
y18 [1] = 0.00000000000E+0000
y19 [1] = 0.00000000000E+0000
y20 [1] = 0.00000000000E+0000

Explanation:

As the injector characteristic is defined by a discharge characteristic, the discharge coefficient


Kv is converted into a head loss coefficient Kd, as needed in the valve element “VALVE1”.

See below different classical valve characteristics definitions and the related conversion
equations:

- 29 -
SIMSEN Tutorial 1: WATERHAMMER IN PIPE 30

Q = Kv  Aref  2  g  dH r

Kd ( y)
dH r = Q Q
2 gAref 2

1  1 
dH r = 
2 
− 1 Q  Q
2 gAref  K 2

Description Head loss coefficient Discharge coefficient Discharge factor


Inlet\Oulet Kd Kv K
Kd Kd 1 1
Kd = 2 Kd = 2 −1
Kv K
Kv 1 Kv K
Kv = Kv =
Kd 1− K 2
K 1 Kv K
K= K=
1 + Kd 1 + Kv 2

- 30 -
SIMSEN Tutorial 1: WATERHAMMER IN PIPE 31

5.2.3 VALVE VALVE1

- GENERAL DATA :

Name = VALVE1
Comment =
Writing = pu

- RATED VALUES :

Hn [m] = 1.50000000000E+0002
Qn [m3/s] = 4.77960800158E-0001

- PARAMETERS :

K [1] = 2.40094600000E+0000
Aref [m2] = 1.43140000000E-0002
Rho [kg/m3] = 1.00000000000E+0003
g [m/s2] = 9.81000000000E+0000

- INITIAL CONDITIONS :

Q [m3/s] = 4.77960812333E-0001

Explanation:

The reference diameter of the Pelton turbine injector is Dref=0.135m and the fully open head
loss coefficient is computed according to the discharge coefficient obtained for y=1 as follows:

1 1
Kd = 2
= = 2.400946
Kv 0.64537 2

- 31 -
SIMSEN Tutorial 1: WATERHAMMER IN PIPE 32

5.3 Graphical features

It is advised to add some graphical elements to make your example more understandable. In
the element library panel, select the GRAPHICS tab, then select Lines and arrow to create the
red arrows.

Add graphical elements as shown in figure 5.3.1.

Figure 5.3.1: Graphical features

- 32 -
SIMSEN Tutorial 1: WATERHAMMER IN PIPE 33

5.4 Simulation parameters

Select the following submenu command:

Parameters Simulation parameters

Fill the main file as follows:

COMMENT :

SIMULATION PARAMETERS :

Time min [sec] = 0.0000000000000


Time max [sec] = 100.000000000000
Integration step [sec] = 0.0100000000000
Precision for immediate events [%] = 1.0000000000000
Precision for simultaneous events [%] = 1.0000000000000
Integration process [-] = RK45
Write in output files every [1] = 1
Initial conditions from [E/M] = E
Disturbances activated [Y/N] = NO

CONSTANT DATA :

PARAMETERS :

INITIAL CONDITIONS :

DISTURBANCES :

Explanation:

Transient behavior of the system will be simulated during 100s with an integration step of 10
ms.

- 33 -
SIMSEN Tutorial 1: WATERHAMMER IN PIPE 34

5.5 Initial conditions calculations

Click the InHydro menu to enter stabilization mode. Then, in the menu InHydro select Flow
Stabilization and answer Yes to the next question. The simulation for initial condition
determination starts. When the stabilization simulation is terminated, the simulation window
looks as shown in figure 5.5.1.

Figure 5.5.1: End of the stabilization simulation

Please wait until you can read the last simulation message
‘End of simulation: <s> = save and update, <any other key> = quit’.

Then, save the last calculated point by pressing the <s> key, to update initial condition of
elements for the next simulation.
The window closes automatically.

Remarque:

During the InHydro procedure, all Function and Regulation elements are not active.

- 34 -
SIMSEN Tutorial 1: WATERHAMMER IN PIPE 35

5.6 Simulation

Click the Sim menu to enter simulation mode and answer Yes to the next question. The
transient simulation starts. When the simulation is terminated, the simulation window looks as
shown in figure 5.6.1.

Figure 5.6.1: End of the simulation.

At the end of the simulation, wait until you can read the last simulation message:
‘End of simulation: <s> = save and update, <any other key> = quit’.

Close the simulation window without saving the last calculated point by pressing <any other
key>.

- 35 -
SIMSEN Tutorial 1: WATERHAMMER IN PIPE 36

5.7 Simulation results

Figure 5.7.1: Valve head, discharge and obturator position (select VALVE1.vis and
FP_Y.vis)

- 36 -
SIMSEN Tutorial 1: WATERHAMMER IN PIPE 37

5.8 Modification of initial conditions

- GENERAL DATA :

Name = FP_Y
Comment =
Writing = YES

- REFERENCES X :

FP_Y Time 1 0 Time [s]

- REFERENCES Y :

- DATA :

x1 [s] : 0 y1 [-] : 0.8


x2 [s] : 10 y2 [-] : 0.8
;x3 [s] : 20 y3 [-] : 0
;x4 [s] : 100 y4 [-] : 0

Proposed procedure:

To avoid recalculating the initial valve head losses for a new simulation with a different initial
opening, you can follow the proposed procedure. To define a new set of initial condition for a
new simulation it is possible to proceed as follow:
- 1) update “FP_Y” initial injector opening; y=0.8 here above
- 2) put in comments the two last lines of the injector closing law by using “;” to
simulate constant opening
- 3) perform simulation and press “s” at the end of the simulation in order to update
the valve head loss coefficient corresponding to the new injector opening
- 4) perform InHydro procedure and press “s” at the end of InHydro to update
hydraulic initial conditions
- 5) uncomment the two last lines of the “FP_Y” element by removing the “;”
- 6) launch new simulation

- 37 -
SIMSEN Tutorial 1: WATERHAMMER IN PIPE 38

Figure 5.8.1: Valve head, discharge and obturator position for the simulation with y=0.8 as
initial conditions defined with the procedure described above (select VALVE1.vis and
FP_Y.vis)

End of Tutorial

- 38 -

You might also like