Professional Documents
Culture Documents
Tank_1,with area _A1 and initial Height H1, and Tank_2, with Tank 1
area _A2 and initial Height H2, are conected via a valve "V" _A1 = 10
with a pipe of diameter "D", lenght "L", and absolute rugosity H1 = 1.5
"Rabs". At the time t = 0, the valve is suddenly open [1]
Tank 2
_A2 = 5
H2 = 1.2
A1
Selected iteration interval
dt = 0.1
H1
Tank_1 Tank_2
System of three differential equa
(See sheets 2 and 3)
A2 H2 d
H (t )⋅A 1=−q(t ) (2 )
dt 1
Valve "V" d
H (t )⋅A 2 =+ q(t ) (3)
dt 2
2 2
dq g⋅π⋅d g⋅¿ π⋅d 2⋅
= H 1− ⋅H 2 − 3
A full bore ball valve is considered. Thus, a value K = 0 is assumed. dt 4⋅L 4⋅L d
1.7000
1.5000
1.4000
1.3000
1.2000
1.4000
1.3000
1.2000
1.1000
0 20 40 60 80
2 2
⋅d g⋅¿ π⋅d 2⋅f
H 1− ⋅H 2 − 3 ⋅q2 (9 ) 2⋅f
L 4⋅L d ⋅π
Microsoft Editor de
ecuaciones 3.0
q
[ τn ]
=q
[τ n− 1]
[ [τ
+ ( H 1 n−1 −H 2 n−1 ) −
] [τ ]
3
d ¿π
⋅q
[ τ n−1 ]
¿ abs (
te differences
[ τ n−1 ]
] [ τ n −1 ] q
n
=H 2 + ¿ Δt ( 16)
A2
2⋅f
−1 ] [ τ n−1 ]
) − 3 ⋅q ¿ abs q
d ¿π
( [ τ n−1 ] )
¿ Δt (17 )
]
Rev. cjc. 04.08.2016
2
+h 2⋅A 2
A 2 )⋅h final
hfinal =h1⋅A 1 +h 2⋅A 2
A1 +h2⋅A 2
+A 2
1*A1 + H2*A2)/(A1+A2)
m
Microsoft Editor de
ecuaciones 3.0
2⋅f
3
d ¿π
⋅q
[ τ n−1 ]
¿ abs ( q
[ τ n −1 ] )
]
¿ Δt ( 17 )
Microsoft Equation
3.0
Tank 1 Tank 2
time (s)
60 180 200
Momentum equation applied to the dv
F=m p⋅
fluid in the pipe dt
F⋅dt=m p⋅dv (a ) dv
F=V p⋅ρ⋅
F: Resulting force acting on the mass dt
F=∑ Fi
dt: acting time interval (s)
mp : mass of water in the pipe
(Water in tanks is considered no moving )
dv: velocity change in the pipe
Microsoft Editor de
ecuaciones 3.0
From equation
Forces acting on the pipe
dv
F=F 1− F2 −F r (c) F=V p⋅ρ⋅
dt
F1 : Force acting on the water pipe, on with
tank 1 -side . F=F 1− F2 −F r
F 2 : Force acting on the water pipe, on
F1 −F 2 −F r =V p⋅ρ⋅
tank 2 -side .
F r : Friction force acting on the pipe and with
shell in oposite direction as the fluid 1
v= ⋅q
velocity A
dv 1 dq
tank 2 -side . 1 2 r p
F1 −F 2 −F r =V p⋅ρ⋅
dq g⋅A 2⋅f
= ⋅( H 1−H 2 ) − 3 ⋅q 2 (8)
dt L d ⋅π
π
A = ⋅d 2 (4 )
4
Differential equation
dq g⋅π⋅d 2 2⋅f
= ⋅( H 1 −H 2 ) − 3 ⋅q2 (9 )
dt 4⋅L d ⋅π
Differential equation
dq g⋅π⋅d 2 2⋅f 2
= ⋅( H 1 − H 2 ) − 3 ⋅q (9)
dt 4⋅L d ⋅π
Change in height
Tank 1 q
Volume change in a time Δt
ΔV =q⋅Δ t
ΔH 2 =
( )
A2
⋅Δ t (12 )
q
Microsoft Equation
3.0
H 1 =H 1_previous -
( )
A1
⋅Δt (13
H 2 =H 2_previous +
A2
¿Δt
( ) (14 )
[τ ]
[ τn ] [ τ n−1 ] q n−1
H 2 =H 2 + ¿ Δt (16 )
A2
2 2_previous
(A ) 2
[ τ n−1 ]
[ τn ] [ τ n−1 ] q
H 2 =H 2 + ¿ Δt (16 )
A2 Microsoft Equation
3.0
dv
=m p⋅
dt A1
dv
=V p⋅ρ⋅ (b)
dt H1
Tank_1 Tank_2
Microsoft Editor de
ecuaciones 3.0
A2 H2
Valve "V"
F1 F2
Fr
m equation
dv
=V p⋅ρ⋅ (b )
dt
h
=F 1− F2 −F r (c)
dv
−F 2 −F r =V p⋅ρ⋅
dt
d with
1
⋅q
A
1 dq
2 r p
dt
d with
1
⋅q
A
1 dq
= ⋅
A dt
1 dq
−F 2 −F r =V p⋅ρ⋅ ⋅ (1 )
A dt Microsoft Editor de
ecuaciones 3.0
f⋅2⋅L⋅ρ 2 1 dq
γ⋅A⋅( H 1 −H 2 ) − 3 ⋅q =V p⋅ρ⋅ ⋅
d ⋅π A dt
with V p = A⋅L
f⋅2⋅L⋅ρ 2 1 dq
γ⋅A⋅( H 1 −H 2 ) − 3
⋅q =V p⋅ρ⋅ ⋅
d ⋅π A dt
with V p = A⋅L
f⋅2⋅L⋅ρ 2 1 dq
γ⋅A⋅( H 1 −H 2 ) − 3
⋅q = A⋅L⋅ρ⋅ ⋅
d ⋅π A dt
f⋅2⋅L⋅ρ 2 dq
γ⋅A⋅( H 1 −H 2 ) − 3 ⋅q =L⋅ρ⋅
d ⋅π dt
γ⋅A 2⋅f dq
⋅( H 1 −H 2 )− 3 ⋅q2 =
L⋅ρ d ⋅π dt
dq g⋅A 2⋅f
= ⋅( H 1−H 2 ) − 3 ⋅q 2 ( 8)
dt L d ⋅π
Microsoft Equation
3.0
Microsoft Equation
3.0
(8)
0)
0)
Microsoft Editor de
ecuaciones 3.0
Microsoft Equation
3.0
Microsoft Equation
3.0
q
H 2 =H 2_previous +
( )
A2
⋅Δt (14 )
(11)
H1 = H1_previous - (qprevious/A1) * Dt
q
A1
⋅Δt
) (13 )
Microsoft Equation
3.0
H2 = H2_previous + (qprevious/A2) * Dt
flow rate
g⋅π⋅d 2 g⋅¿ π⋅d 2 2⋅f
+
[
4⋅L
H 1−
4⋅L
2
d ⋅π
2
⋅H 2 − 3 ⋅q ⋅Δt
] ( 10)
Page 2 of 8
Page 3 of 8
dq
(1 )
dt
(2 )
(3 )
(4 )
ds
(5 )
(6 )
(7 )
Microsoft Equation
3.0
Page 4 of 8
Page 5 of 8
Page 6 of 8
7 of 8
(12)
(14 )
Microsoft Equation
3.0
(14)
(15)
8 of 8
Microsoft Equation
3.0
) ] ¿ Δt ( 17 )
Microsoft Equation
3.0
Resume of equations
d
H (t )⋅A 1=−q(t ) (2 ) [τ ] [τ ]
dt 1 H 1 n =H 1 n −1 −
d
H 2 ( t )⋅A 2 =+ q(t ) (3 ) [τ ] [τ ]
dt H 2 n =H 2 n −1 +
Differential equation for the flow rate
2
g⋅π⋅d
[
2
dq g⋅π⋅d 2⋅f [ τn ] [τ n−1]
dt
=
4⋅L
⋅( H 1 −H 2 ) − 3 ⋅q2 ( 9) q =q + ¿(H
d ⋅π 4⋅L
Microsoft Editor de
ecuaciones 3.0
H1 = H1_anterior - (qanterior/A1) * Dt
H2 = H2_anterior + (qanterior/A2) * Dt
q= qanterior + ( g*p*d^2 / (4*L) * ( H1_anterior - H2_anterior) - 2 / ( p * d^3 ) * fanterior * Abs(q
Rev. cjc. 04.08.2016
[ τ n− 1 ]
[τn] [ τ n −1 ] q
H 1 =H 1 − ¿ Δt ( 15)
A1
[ τ n−1 ]
[τ ] [τ ] q
H 2 n =H 2 n −1 + ¿ Δt ( 16)
A2
2
g⋅π⋅d 2⋅f
+
[
4⋅L
[τ ] [τ ]
d ¿π
[τ ] [τ ]
¿ ( H 1 n −1 − H 2 n−1 ) − 3 ⋅q n−1 ¿ abs ( q n−1 ) ¿ Δt (17 )
]
-15
-16
nterior
* Abs(qanterior) * qanterior ) * Dt -17
Rev. cjc. 04.08.2016
) ] ¿ Δt (17 )