Вы находитесь на странице: 1из 9

How to solve Water Networks using the Newton-Raphson method:

Step 1:

Draw your network:

1 2 3
10 l/s

6 4
5

25 l/s

15 l/s

Step 2:

Assume your flow directions – first guess:

1 Q12 2 Q23 3

10 l/s
Q16 Loop1 Q25 Loop2 Q34

4
6 Q56 5 Q45

25 l/s 15 l/s
Step 3:

Define your flow unknowns:

- Q16 = Q12 | 1ST Unknown


- Q25 | 2nd Unknown
- Q56 | 3rd Unknown
- Q34 | 4th Unknown
- Q45 | 5th Unknown
- Q23 |6th Unknown

Step 4:

Define your equations:

2 loops = 2 equations:

.
Head losses in a pipe is estimated as follow using the Darcy Weisbach equation:

.
Kpipe . Q2pipe > > > Kpipe is equal to where is the friction factor calculated
using the Colebrook – white equation.

So for loop 1, the equation is:

K16.Q162 + K12.Q122+K25.Q252-K56.Q562 = 0, replace Q12 with Q16 because Q12=Q16


K16.Q162 + K12.Q162+K25.Q252-K56.Q562 = 0

Equation for loop 2 is:


K23.Q232 + K34.Q342- K25.Q252-K45.Q452 = 0

4 more equations needed to solve the 6 unknowns, let’s look at some flow conservation:
Node 6 > 25l/s – Q16 – Q56 = 0
Node 4 > Q56 + Q25 – Q45 = 0
Node 2 > Q12 – Q25 – Q23 = 0, Replace Q12 with Q16 because Q12 = Q16
Q16 – Q25 – Q23 = 0
Node 3 > Q23 – Q34 -10 = 0

Summary of equations:
( )
( )
25l/s – Q16 – Q56 = 0

( )
Q56 + Q25 – Q45 = 0

( )
Q16 – Q25 – Q23 = 0

( )
Q23 – Q34 -10 = 0

( )
K16.Q162 + K12.Q162+K25.Q252-K56.Q562 = 0
K23.Q232 + K34.Q342- K25.Q252-K45.Q452 = 0

It is very important to know that the 6 equations above require solving using the Newton
Raphson method through the Jacobian matrix but we need to be careful while dealing with
the K values in our equation. As mentioned earlier each K value is dependent on the
diameter of the pipe and the friction factor. The friction factor is also dependent on the
flow rate therefore K values must be replaced with the approximated explicit Colebrook –
white equation. If you decide to use the exact implicit form of the Colebrook – white
equation, then additional 7 implicit Colebrook – white equations should be added to the 6
equations above. Luckily we have the explicit approximations of Colebrook – white
equation and for the purpose of this document we will use it.

= .
= .
( 1)
. ( . ) . ( . )
. . |#|
!. $ .
%

K = to . .' = . ( 2)
.
. .
* . -
. ) . . ,
|#|
!. $ .
( % +

. ( 3)
./.|/|
.
KXX.Q2XX =
* . -
. ) . . ,
|#|
!. $ .
( % +
Step 5:
How to solve the system of equations using Newton - Raphson method?

First:
You need to assume the values of the unknown flow rate; this will be called Trial 0.

Trial 0:
23 = 15 '/6
3 <
34 = 5'/6
2 ;
2 45 = 10'/6 ;
2 25 = 5'/6 ;
2 56 = 5'/6 ;
1 16 = 12 = 20'/6:

Second: list all the links parameters, Diameter and roughness factors:
Link 1-2:
Diameter = 0.6 m, Roughness = 0.000001
Link 2-3:
Diameter = 0.4 m, Roughness = 0.000001
Link 3-4:
Diameter = 0.2 m, Roughness = 0.000001
Link 4-5:
Diameter = 0.3 m, Roughness = 0.000001
Link 6-5:
Diameter = 0.2 m, Roughness = 0.000001
Link 1-6:
Diameter = 0.6 m, Roughness = 0.000001
Link 2-5:
Diameter = 0.2 m, Roughness = 0.000001
Third: Write the following Jacobian Matrix:
Replace K with its equivalent as per equation (3), the function below should be with respect
to Q.
= ( ) = ( ) = ( ) = ( ) = ( ) = ( )
3 <
2= 23 = 34 = 45 = 25 = 56 = 16 ;
2= ( ) = ( ) = ( ) = ( ) = ( ) = ( );
2= 23 = 34 = 45 = 25 = 56 = 16 ;
2= ( ) = ( ) = ( ) = ( ) = ( ) = ( );
2 ;
2= 23 = 34 = 45 = 25 = 56 = 16 ;
2= ( ) = ( ) = ( ) = ( ) = ( ) = ( );
2= 23 = 34 = 45 = 25 = 56 = 16 ;
2= ( ) = ( ) = ( ) = ( ) = ( ) = ( );
2 ;
2= 23 = 34 = 45 = 25 = 56 = 16 ;
2= ( ) = ( ) = ( ) = ( ) = ( ) = ( );
1= 23 = 34 = 45 = 25 = 56 = 16 :
The above matrix will be equal to:
0 0 0 0 −1 −1
30 0 −1 +1 +1 0 <
2−1 0 0 −1 0 +1 ;
2 ;
21 −1 0 0 0 0 ;
20 0 0 +@ −A +B;
1 +C +D −E − 0 0 :
a, b, c, d, e, f and g are in dependent on their respective flow rates
Inserting the Trial 0 flow rates values in the matrix above will give the following:

0 0 0 0 −1 −1
3 0 0 −1 +1 +1 0 <
2 ;
2 −1 0 0 −1 0 +1 ;
2 1 −1 0 0 0 0 ;
2 0 0 0 0.042378 −0.042378 0.001320124;
10.003679 0.042378 −0.0105684 −0.042378 0 0 :
I JK = I JK − LMNO . IP JK
The Newton iterative method is defined by:

I JK Q6 RℎE RℎE T@'UE6 V 'VW X@RE6 @R RXQ@' Y


I JK Q6 RℎE T@'UE6 V 'VW X@RE6 @R RXQ@' Y + 1
LMNO Q6 RℎE QYTEX6E V RℎE M@CVAQ@Y Z@RXQ[
IP JK Q6 RℎE T@'UE6 V RℎE 6 E\U@RQVY6 @R RXQ@' Y

Let’s find the inverse of the Jacobian Matrix: LMNO



1.0564826 0.00544785 −1.02374171 −0.0218452 −24.801425 −0.515485
31.05648267 0.0054478 −1.02374171 −1.021845 −24.801425 −0.51548548<
2 ;
2 1.5698776 −0.655678 −1.500549 −1.38068624 −52.516788 −32.5802596;
2 0.7566975 0.16943667 −0.738403 −0.67942049 −13.8576815 −16.0323870;
20.81318018 0.17488453 −0.76214536 −0.7012657 −38.659107 −16.5478725;
1 1.813180 0.17488453 −0.76214536 −0.701265742 −38.6591071 −16.5478725:

Let’s find IP JK
]
3 ] <
2 ;
2 ] ;
2 ] ;
2]. ]]]]^_`a^_bc;
1 −]. ]]]]dcefe_ :

0.015 −0.00042507 0.01542507


Fn.[J]-1

30.005< 3 −0.000425071 < 3 0.00542507 <


2 ; 2 ; 2 ;
I JK 0.01 0.00017974743 0.009820252
=2 ;−2 ;=2 ;
2 0.005 ; 2 0.0003024097 ; 2 0.00469759 ;
20.005; 2−0.00012266202; 2 0.00512266 ;
Let’s find

1 0.02 : 1 −0.00012266 : 1 0.02012266 :

The Unit of I JK above is m3/s


In l/s I JK :
15.42507
3 5.42507 <
2 ;
2 9.820252 ;
2 4.69759 ;
2 5.12266 ;
120.12266:

Repeat Step 5 but use I JK I JK for trial 1


Step 6:

found in step 5 as

15.42507
3 5.42507 <
2 ;
I J =2
K 9.820252 ;
2 4.69759 ;
2 5.12266 ;
120.12266:
Inserting the Trial 1 flow rates values in the Jacobian matrix will give the following:

0 0 0 0 −1 −1
30 0 −1 +1 +1 0 <
2−1
2 0 0 −1 0 +1 ;;
21 −1 0 0 0 0 ;
20 0 0 +@ −A +B;
1 +C +D −E − 0 0 :

0 0 0 0 −1 −1
3 0 0 −1 +1 +1 0 <
2 ;
2 −1 0 0 −1 0 +1 ;
2 1 −1 0 0 0 0 ;
2 0 0 0 0.04029049 −0.043219234 0.00138569;
10.00376451 0.0452777446 −0.010413531 −0.04029049 0 0 :
Let’s find the inverse of the Jacobian Matrix: LMNO
−0.38356592 −0.129160357 −0.39172264 0.56158565 5.8863968 12.40312791
3 −0.3835659 −0.12916035 −0.39172264 −0.4384143 5.8863968 12.40312791 <
2 ;
2−0.61643407 −0.87083964 −0.60827735 −0.56158565 −5.88639689 −12.40312791;
2 −0.3075584 0.067862180 −0.319595181 −0.2950628 8.68642579 −6.51673102 ;
2−0.30887558 0.061298176 −0.2886821 −0.2665227 −14.5728226 −5.8863968 ;
1 −0.6911244 −0.0612981 0.2886821 0.26652277 14.57282268 5.88639689 :

Let’s find IP JK
]. ]]]^b`]ae^
3 ]. ]]]^b_f`e^ <
2 ;
2]. ]]]]__eb_`_;
2 ] ;
2 ]. ]]]]__bfd ;
1 ]. ]]^e_^abb :

0.01542507 0.00016805 0.01525701


Fn.[J]-1

3 0.00542507 < 30.00016805< 3 0.00525694 <


2 ; 2 ; 2 ;
I JK 0.009820252 0.00007726 0.00974298
= 2 ;-2 ; =2 ;
2 0.00469759 ; 2 0 ; 2 0.00469759 ;
2 0.00512266 ; 20.00007769; 2 0.00504496 ;
Let’s find

1 0.02012266 : 10.00127156: 10.019955034:

The Unit of I JK above is m3/s

In l/s I JK :
15.25701 23
3 5.25694 < 3 34 <
2 ; 2 45
;
2 9.74298 ;=2 ;
2 4.69759 ; 2 25 ;
2 5.04496 ; 2 56 ;
119.955034: 1 16 = 12:
A third trial can be carried out to reduce the % error but the answer above is satisfactory.

Вам также может понравиться