Decoding Kotlin - Your guide to solving the mysterious in Kotlin.pptx
Flow in Pipes
1. Fluid Mechanics II
By
Dr. Jawad Sarwar
Assistant Professor
Department of Mechanical Engineering,
University of Engineering & Technology Lahore, Pakistan
2. Mass, like energy, cannot be created nor destroyed during a process but mass
and energy can be converted to each other.
𝐸 = 𝑚𝑐2 Where c is the speed of light (2.9979 × 108 m/s)
➢ For closed system, the conservation of mass principle is implicitly used by
requiring that the mass of the system remain constant during a process.
➢ For open system or control volume, mass can cross the boundaries,
therefore, the amount of mass entering or leaving the control volume must be
tracked.
Conservation of mass
The amount of mass flowing through a cross section per
unit time is called the mass flow rate.
The differential mass flow rate of fluid flowing across a
small area is expressed as:
𝛿 ሶ𝑚 = 𝜌𝑉𝑛d𝐴 𝑐
ሶ𝑚 = න
𝐴 𝑐
𝛿 ሶ𝑚 = න
𝐴 𝑐
𝜌𝑉𝑛d𝐴 𝑐
But 𝑉𝑎𝑣𝑔 =
1
𝐴 𝑐
𝐴 𝑐
𝑉𝑛d𝐴 𝑐 So ሶ𝒎 = 𝝆𝑽 𝒂𝒗𝒈 𝑨 𝒄
1
Mass flow rates
3. The volume of the fluid flowing through a cross section per unit time is called the
volume flow rate and is given by:
ሶ𝑽 = න
𝐴 𝑐
𝑉𝑛d𝐴 𝑐 = 𝑉𝑎𝑣𝑔 𝐴 𝑐 = 𝑉𝐴 𝑐
The mass and volume flow rate are related by:
ሶ𝑚 = 𝜌 ሶ𝑽
Note: The volume flow rate is also represented by Q.
Volume flow rate
𝑇𝑜𝑡𝑎𝑙 𝑚𝑎𝑠𝑠 𝑒𝑛𝑡𝑒𝑟𝑖𝑛𝑔
𝑡ℎ𝑒 𝐶𝑉 𝑑𝑢𝑟𝑖𝑛𝑔 ∆𝑡
−
𝑇𝑜𝑡𝑎𝑙 𝑚𝑎𝑠𝑠 𝑙𝑒𝑎𝑣𝑖𝑛𝑔
𝑡ℎ𝑒 𝐶𝑉 𝑑𝑢𝑟𝑖𝑛𝑔 ∆𝑡
=
𝑁𝑒𝑡 𝑐ℎ𝑎𝑛𝑔𝑒 𝑖𝑛 𝑚𝑎𝑠𝑠
𝑤𝑖𝑡ℎ 𝑡ℎ𝑒 𝐶𝑉 𝑑𝑢𝑟𝑖𝑛𝑔 ∆𝑡
Or
𝑚𝑖𝑛 − 𝑚 𝑜𝑢𝑡 = ∆𝑚 𝐶𝑉
In rate form:
ሶ𝑚𝑖𝑛 − ሶ𝑚 𝑜𝑢𝑡 =
d𝑚 𝐶𝑉
d𝑡
d𝑚 𝐶𝑉
d𝑡
=
d
d𝑡
න
𝐶𝑉
𝜌d𝑽
Since 𝑚 𝐶𝑉 = 𝐶𝑉
𝜌d𝑽
2
Conservation of mass principle
4. Conservation of mass principle - continued
Net mass flow rate:
ሶ𝑚 𝑛𝑒𝑡 = න
𝐶𝑆
𝛿 ሶ𝑚 = න
𝐶𝑆
𝜌𝑉𝑛d𝐴
Since 𝑉𝑛 = 𝑉 cos 𝜃 = 𝑉 ∙ 𝑛
So
ሶ𝑚 𝑛𝑒𝑡 = න
𝐶𝑆
𝜌(𝑉 ∙ 𝑛)d𝐴
3
ሶ𝑚 = න
𝐴 𝑐
𝛿 ሶ𝑚 = න
𝐴 𝑐
𝜌𝑉𝑛d𝐴 𝑐
General conservation of mass:
d
d𝑡
න
𝐶𝑉
𝜌d𝑽 + න
𝐶𝑆
𝜌(𝑉 ∙ 𝑛)d𝐴 = 0
General conservation of mass from
Reynold’s Transport Theorem
5. Mass balance for Steady Flow Processes
4
𝑖𝑛
ሶ𝑚 =
𝑜𝑢𝑡
ሶ𝑚
It states that the total rate of mass entering a
control volume is equal to the total rate of mass
leaving it. The conservation of mass principle for
a general steady-flow system with multiple inlets
and outlets can be expressed in rate form as:
Many engineering devices such as nozzles,
diffusers, turbines, compressors, and pumps
involve a single stream (only one inlet and one
outlet). For these, mass balance for single-stream
steady-flow system reduces to:
ሶ𝑚1 = ሶ𝑚2
The inlet state is represented by subscript 1 and
the outlet state is denoted by subscript 2.
ሶ𝑚1
ሶ𝑚2
6. Volume Flow rate
5
ሶ𝑽 =
ሶ𝑚
𝜌
ሶ𝑚 = 𝜌𝑉𝐴
ሶ𝑽 = 𝑉𝐴
Special Case 1: Incompressible Flow
The conservation of mass relations can be
simplified even further when the fluid is
incompressible (usually the case for liquids).
𝑖𝑛
ሶ𝑽 =
𝑜𝑢𝑡
ሶ𝑽 ( Τ𝑚3 𝑠)
For single-stream steady-flow systems it becomes
ሶ𝑽1 = ሶ𝑽2 𝑉1 𝐴2 = 𝑉2 𝐴2
Remember: There is no such thing as a “conservation of volume”
principle. Therefore, the volume flow rates into and out of a steady-flow
device may be different. For example, ሶ𝑽2 ≪ ሶ𝑽1 for an air compressor
shown above. This is due to the higher density of air at the compressor
exit.
Inlet
exit
7. 6
Special Case 1: Incompressible Flow - continued
Steady continuity equation: ∇ ∙ 𝜌𝑉 = 0
In Cartesian coordinates, this equation becomes
𝜕 𝜌𝑢
𝜕𝑥
+
𝜕 𝜌𝑣
𝜕𝑦
+
𝜕 𝜌𝑤
𝜕𝑧
= 0
Incompressible continuity equation:
∇ ∙ 𝑉 = 0
In Cartesian coordinates, this equation becomes
𝜕 𝑢
𝜕𝑥
+
𝜕 𝑣
𝜕𝑦
+
𝜕 𝑤
𝜕𝑧
= 0
Special Case 2: Steady compressible Flow
𝑑𝜌
𝑑𝑡
+ ∇ ∙ 𝜌𝑉 = 0
8. 7
Example 1
A garden hose attached with a nozzle is used to fill a
10-gal (1 gal = 3.7854 L) bucket. The inner diameter of
the hose is 2 cm, and it reduces to 0.8 cm at the nozzle
exit. If it takes 50 s to fill the bucket with water (ρ =
1000 kgm-3), determine
(a) The volume and mass flow rates of water through
the hose
(b) The average velocity of water at the nozzle exit.
Assume, water is incompressible, flow through the
hose is steady and no waste of water by splashing.
ሶ𝑽 =
𝑽
∆𝑡
Solution
ሶ𝑚 = 𝜌 ሶ𝑽
(a)
𝐴 𝑒 = 𝜋𝑟𝑒
2 The cross-sectional area of the
nozzle at the exit
ሶ𝑽 = 𝑉𝑒 𝐴 𝑒
The average velocity at the nozzle
is calculated as:
Note: Always use SI units and make conversions before solving a
problem
1 L = 10-3 m3 1 cm = 10-2 m
(b)
9. 8
Example 2
A 4-ft high (1 ft = 0.3048 m), 3-ft-diameter water tank
whose top is open to the atmosphere is initially filled
with water. Now the discharge plug near the bottom of
the tank is pulled out, and a water jet whose diameter
is 0.5 in (1 in = 0.0254 m) streams out (as shown in
figure). Determine how long it will take for the water
level in the tank to drop to 2 ft from the bottom.
Assume, water is incompressible, the distance
between the bottom of the tank and the center of the
hole is negligible compared to the total water height
and the gravitational acceleration is 32.2 ft/s2 (9.8 m/s2)
and the density of water is 1000 kg/m3.
Solution
𝑑𝑚 𝐶𝑉
𝑑𝑡
= ሶ𝑚𝑖𝑛 − ሶ𝑚 𝑜𝑢𝑡
The conservation of mass relation for a CV undergoing any process is given in
the rate form as:
Since ሶ𝑚𝑖𝑛 = 0 Therefore,
𝑑𝑚 𝐶𝑉
𝑑𝑡
= ሶ−𝑚 𝑜𝑢𝑡
ሶ𝑚 𝑜𝑢𝑡 = 𝜌𝑉𝐴 𝑜𝑢𝑡 Velocity, V? So find ‘V’ K.E=P.E
1
2
𝑚𝑉2
= 𝑚𝑔ℎሶ𝑚 𝑜𝑢𝑡 = 𝜌 2𝑔ℎ𝐴𝑗𝑒𝑡
𝐴 𝑡𝑎𝑛𝑘
𝐴𝑗𝑒𝑡
(i)
10. 9
Example 2 - continued
𝑚 𝐶𝑉 = 𝜌𝑽 = 𝜌𝐴 𝑡𝑎𝑛𝑘ℎ
Eq. (i) becomes as:
𝑑 𝜌𝐴 𝑡𝑎𝑛𝑘ℎ
𝑑𝑡
= −𝜌 2𝑔ℎ𝐴𝑗𝑒𝑡
𝜌 Τ𝜋𝐷𝑡𝑎𝑛𝑘
2
4 𝑑ℎ
𝑑𝑡
= −𝜌 2𝑔ℎ 𝜋𝐷𝑗𝑒𝑡
2
/4
Cancelling the common terms and separating the variables give
𝑑𝑡 = −
𝐷𝑡𝑎𝑛𝑘
2
𝐷𝑗𝑒𝑡
2
𝑑ℎ
2𝑔ℎ
න
0
𝑡
𝑑𝑡 = −
𝐷𝑡𝑎𝑛𝑘
2
𝐷𝑗𝑒𝑡
2
2𝑔
න
ℎ 𝑜
ℎ
𝑑ℎ
ℎ
𝑡 =
ℎ 𝑜 − ℎ2
𝑔/2
𝐷𝑡𝑎𝑛𝑘
𝐷𝑗𝑒𝑡
2
Using the same methodology, Determine
how long it will take for the discharge of the
entire amount of water in the tank?
11. As a simple example of a moving control volume,
consider a toy car moving at a constant absolute
velocity Vcar =10 km/h to the right. A high-speed jet
of water (absolute velocity Vjet = 25 km/h to the
right) strikes the back of the car and propels it. If
we draw a control volume around the car, the
relative velocity is Vr = 25 - 10 = 15 km/h to the
right.
Conservation of mass
𝑑
𝑑𝑡
න
𝐶𝑉
𝜌𝑑𝑽 + න
𝐶𝑆
𝜌 𝑉. 𝑛 𝑑𝐴 = 0
Moving or Deforming Control Volumes
This represents the velocity at which an observer
moving with the control volume would observe the
fluid crossing the control surface.
In other words, relative velocity is the fluid velocity
expressed relative to a coordinate system moving
with the control volume.
where
Nondeforming CV
𝑑
𝑑𝑡
න
𝐶𝑉
𝜌𝑑𝑽 + න
𝐶𝑆
𝜌 𝑉𝑟. 𝑛 𝑑𝐴 = 0
Relative velocity
𝑉𝑟 = 𝑉 − 𝑉𝐶𝑆
Absolute velocity
𝑉𝑟 = 𝑉 − 𝑉𝐶𝑉
Deforming CV
10
12. Conservation of mass – the continuity equation
𝑑
𝑑𝑡
න
𝐶𝑉
𝜌𝑑𝑽 + න
𝐶𝑆
𝜌 𝑉. 𝑛 𝑑𝐴 = 0
Divergence Theorem
න
𝑉
∇ ∙ Ԧ𝐺𝑑𝑽 = න
𝐴
Ԧ𝐺 ∙ 𝑛𝑑𝐴
Transforms a volume integral of
the divergence of a vector into an
area integral over the surface
that defines the volume
Del operator
න
𝐶𝑉
𝑑𝜌
𝑑𝑡
𝑑𝑽 + න
𝐶𝑉
∇ ∙ 𝜌𝑉 𝑑𝑽 = 0
න
𝐶𝑉
𝑑𝜌
𝑑𝑡
+ ∇ ∙ 𝜌𝑉 𝑑𝑽 = 0
This equation must hold for any CV regardless of its size and shape
which is only possible if integrand is identically zero.
𝑑𝜌
𝑑𝑡
+ ∇ ∙ 𝜌𝑉 = 0 Continuity EquationCompressible
form
11
14.
𝑖𝑛
ሶ𝑚 = 𝜌𝑢 −
𝜕 𝜌𝑢
𝜕𝑥
𝑑𝑥
2
𝑑𝑦𝑑𝑧 + 𝜌𝑣 −
𝜕 𝜌𝑣
𝜕𝑦
𝑑𝑦
2
𝑑𝑥𝑑𝑧 + 𝜌𝑤 −
𝜕 𝜌𝑤
𝜕𝑧
𝑑𝑧
2
𝑑𝑥𝑑𝑦
Net mass flow rate into CV:
Left face Rear faceBottom face
𝑜𝑢𝑡
ሶ𝑚 = 𝜌𝑢 +
𝜕 𝜌𝑢
𝜕𝑥
𝑑𝑥
2
𝑑𝑦𝑑𝑧 + 𝜌𝑣 +
𝜕 𝜌𝑣
𝜕𝑦
𝑑𝑦
2
𝑑𝑥𝑑𝑧 + 𝜌𝑤 +
𝜕 𝜌𝑤
𝜕𝑧
𝑑𝑧
2
𝑑𝑥𝑑𝑦
Net mass flow rate out of CV:
Right face Front faceTop face
න
𝐶𝑉
𝑑𝜌
𝑑𝑡
𝑑𝑽 ≅
𝜕𝜌
𝜕𝑡
𝑑𝑥𝑑𝑦𝑑𝑧
Rate of change of mass within CV:
𝜕𝜌
𝜕𝑡
𝑑𝑥𝑑𝑦𝑑𝑧 = −
𝜕 𝜌𝑢
𝜕𝑥
𝑑𝑥𝑑𝑦𝑑𝑧 −
𝜕 𝜌𝑣
𝜕𝑦
𝑑𝑥𝑑𝑦𝑑z −
𝜕 𝜌𝑤
𝜕𝑧
𝑑𝑥𝑑𝑦𝑑𝑧
Continuity equation in Cartesian coordinates:
𝜕𝜌
𝜕𝑡
+
𝜕 𝜌𝑢
𝜕𝑥
+
𝜕 𝜌𝑣
𝜕𝑦
+
𝜕 𝜌𝑤
𝜕𝑧
= 0
13
15. 14
Example 3
An air-fuel mixture is compressed by a piston in a
cylinder of an internal combustion engine (refer to
figure). The origin of coordinate ‘𝑦’ is at the top of the
cylinder, and ‘𝑦’ points straight down as shown. The
piston is assumed to move up at constant speed ‘𝑉𝑝’.
The distance ‘𝐿’ between the top of the cylinder and the
piston decreases with time according to the linear
approximation ‘𝐿 = 𝐿 𝑏𝑜𝑡𝑡𝑜𝑚 − 𝑉𝑝 𝑡’, where 𝐿 𝑏𝑜𝑡𝑡𝑜𝑚 is the
location of the piston when it is at the bottom of its cycle
at time 𝑡 = 0, as sketched in figure. At 𝑡 = 0, the density of the air-fuel mixture in
the cylinder is everywhere equal to 𝜌 0 . Estimate the density of the air-fuel
mixture as a function of time and the given parameters during the piston’s up
stroke.
Assume, Density varies with time, but not space; in other words 𝜌 = 𝜌 𝑡 .
Velocity component ‘𝑣’ varies with ‘𝑦’ and ‘𝑡’ but not with 𝑥 or 𝑧, in other words
𝑣 = 𝑣 𝑦, 𝑡 only. 𝑢 = 𝑤 = 0 and no mass escapes from the cylinder during the
compression.
Analysis
𝜕𝜌
𝜕𝑡
+
𝜕 𝜌𝑢
𝜕𝑥
+
𝜕 𝜌𝑣
𝜕𝑦
+
𝜕 𝜌𝑤
𝜕𝑧
= 0
Compressible continuity equation in Cartesian coordinates:
16. 15
𝜕𝜌
𝜕𝑡
+
𝜕 𝜌𝑣
𝜕𝑦
= 0
𝜕𝜌
𝜕𝑡
+
𝜕 𝜌𝑢
𝜕𝑥
+
0 𝑠𝑖𝑛𝑐𝑒 𝑢=0
𝜕 𝜌𝑣
𝜕𝑦
+
𝜕 𝜌𝑤
𝜕𝑧
0 𝑠𝑖𝑛𝑐𝑒 𝑤=0
= 0
Since, density is not a function of 𝑦, therefore,
𝜕𝜌
𝜕𝑡
+ 𝜌
𝜕 𝑣
𝜕𝑦
= 0 →
𝜕𝜌
𝜕𝑡
= −𝜌
𝜕 𝑣
𝜕𝑦 𝑣 ?
Since,𝑣 = 𝑣 𝑦, 𝑡 ,
Therefore, we need to find an expression of 𝑣 in terms of 𝑦 and 𝑡
𝑣 = −𝑉𝑝
𝑦
𝐿
𝜕𝜌
𝜕𝑡
= −𝜌
𝜕 −𝑉𝑝
𝑦
𝐿
𝜕𝑦
→
𝜕𝜌
𝜕𝑡
= 𝜌
𝑉𝑝
𝐿
𝜕𝜌 = 𝜌
𝑉𝑝
𝐿
𝜕𝑡
17. 16
න
𝜌 0
𝜌
𝜕𝜌
𝜌
= න
𝑡=0
𝑡
𝑉𝑝
𝐿 𝑏𝑜𝑡𝑡𝑜𝑚 − 𝑉𝑝 𝑡
𝜕𝑡
ln
𝜌
𝜌 0
= ln
𝐿 𝑏𝑜𝑡𝑡𝑜𝑚
𝐿 𝑏𝑜𝑡𝑡𝑜𝑚 − 𝑉𝑝 𝑡
Simplify
𝜌 = 𝜌 0
𝐿 𝑏𝑜𝑡𝑡𝑜𝑚
𝐿 𝑏𝑜𝑡𝑡𝑜𝑚 − 𝑉𝑝 𝑡
Refer to Integral table
𝜌
𝜌 0
=
1
1 − Τ𝑉𝑝 𝑡 𝐿 𝑏𝑜𝑡𝑡𝑜𝑚
→
In non-dimensional form
𝜌∗ =
1
1 − 𝑡∗
At 𝑡∗
= 1, the piston hits the top of the cylinder and 𝜌 goes to infinity.
In the actual internal combustion engine, the piston stops before
reaching the top of the cylinder, forming what is known as the
‘clearance volume’.