Like this document? Why not share!

# Modelling Workshop Fluid Mechanics 2: Solution

## by TU Delft OpenCourseWare on Jan 27, 2014

• 117 views

The Modelling Workshop Fluid Mechanics 2 Solution of the Modelling Course of Industrial Design of the TU Delft

The Modelling Workshop Fluid Mechanics 2 Solution of the Modelling Course of Industrial Design of the TU Delft

### Views

Total Views
117
Views on SlideShare
117
Embed Views
0

Likes
0
0
1

No embeds

### Report content

11 of 1 previous next

• Maram Siuad Assign#3. 1 week ago
Are you sure you want to

## Modelling Workshop Fluid Mechanics 2: SolutionDocument Transcript

• P-W-F-2: "What the hell are you doing?" or "ooh, it is OK." Think about the question Model the system > restart; > P d t/ Po\$Vo Vo CAb\$ Ho Kh t ; P := t/ Po Vo Vo CAb Ho Kh t (3.1)
• > equ d rho\$diff h t , t \$Ab =K t q equ := ρ > q d t/Cd\$Ao\$rho\$sqrt 2\$ d h t dt Ab = K t q (3.2) P t KPb C2\$ g\$h t C diff h t , t rho 2 P t KPb C2 g h t C ρ q := t/Cd Ao ρ 2 d h t dt ; 2 (3.3) > we can omit 2 d h t here, see appendix. If you donot ommit, you need to convert the equation dt to a form which Maple can manage P t KPb C2\$ g\$h t ; rho 2 P t KPb q := t/Cd Ao ρ C2 g h t ρ > q d t/Cd\$Ao\$rho\$sqrt 2\$ (3.4) > Solve the problem parameters > Po d 2\$105 : Pb d 105 : Ab d 3.14\$0.32 : g d 9.8 : Cd d 0.6 : rho d 1060 : r d \$0.0254 : Ao d 3.14\$r2 : H d 0.948 : 9 16 Initial Maximum height of the beer > Ho d 0.225 K0.07; Vo d Ab\$H K0.225 ; Ab Ho := 0.7261783440 Vo := 0.0429048 (4.1) Initial conditions, let's suppose h0 is the initial height since the drum is not always full > ics d h 0 = Ho; ics := h 0 = 0.7261783440 review the ode (4.2)
• > equ 299.5560 d h t dt K 0.4076610798 = (4.3) 16.19049057 10000 K C19.6 h t 0.2481228000 K0.2826 h t 53 Solve it > sol d dsolve equ, ics , h t , numeric, output = listprocedure ; sol := t = proc t ... end proc, h t = proc t ... end proc (4.4) > h d rhs sol 2 ; h := proc t ... end proc (4.5) > The height > plot h t , t = 0 ..20 0.72 0.70 0.68 0.66 0.64 0.62 0.60 0.58 0.56 0 5 10 t 15 20
• > q t 16.19049057 10000 K C19.6 h t 0.2481228000 K0.2826 h t 53 0.4076610798 (4.6) now the flow rate > plot q t , t = 0 ..20 5 4 3 2 1 0 5 10 t 15 20 Following our designs before, what we get now is > q t ; 0.4076610798 16.19049057 10000 K C19.6 h t 0.2481228000 K0.2826 h t 53 > > > beerNew d tt/ int q t , t = tt ..tt C2.5 ; rho (4.7)
• tt C 2.5 q t dt beerNew := tt/ tt (4.8) ρ > > plot beerNew tt , tt = 0 ..20 0.010 0.008 0.006 0.004 0.002 0 5 10 tt 15 20 Evaluation Model in the old scenario > > qOld d t/Cd\$Ao\$rho\$sqrt 2\$g\$hOld t ; qOld := t/Cd Ao ρ The consevation of mass 2 g hOld t (5.1.1)
• > odeOld d rho\$diff hOld t , t \$Ab =K qOld t d odeOld := 299.5560 hOld t = K 1.804792536 dt hOld t (5.1.2) Solve the problem parameters > Ab d 3.14\$0.32 : g d 9.8 : Cd d 0.6 : rho d 1060 : Ao d 3.14\$r2 : Initial Maximum height of the beer > h0Max d 0.225 K0.07 Ab h0Max := 0.7261783440 (5.1.1.1) Initial conditions, let's suppose h0 is the initial height since the drum is not always full > icsOld d hOld 0 = h0Max; icsOld := hOld 0 = 0.7261783440 (5.1.1.2) review the ode > odeOld 299.5560 d hOld t dt =K 1.804792536 hOld t (5.1.1.3) solve odeOld, icsOld , hOld t ; 628332580632969 dsolOld := hOld t = t2 69239041000000000000 25066563 90772293 K t 90772293 5 C 104012500000000 125000000 change the solution to a function named h with parameter r and time t > dsolOld d dsolve > hh d rhs dsolOld : hOld d unapply hh, t ; 628332580632969 25066563 hOld := t/ t2 K t 69239041000000000000 104012500000000 90772293 C 125000000 now the flow rate > qOld t 90772293 (5.1.1.4) 5 (5.1.1.5)
• 0.4076610798 (5.1.1.6) 2 0.0001778666833 t K0.000004723515296 t 1/2 C14.23309554 90772293 5 every 2 second how much beer will pass the hose > beerOld d tt/ int qOld t , t = tt ..tt C2.5 rho tt C 2.5 qOld t dt beerOld := tt/ tt ρ (5.1.1.7) Evaluation 1: Comparison > with plots : > pl1 d plot beerOld tt , tt = 0 ..10, color = red ; pl1 := PLOT ... > pl2 d plot beerNew tt , tt = 0 ..10, color = blue ; pl2 := PLOT ... > display pl1, pl2 ; (5.2.1) (5.2.2)
• 0.011 0.010 0.009 0.008 0.007 0.006 0.005 0.004 0 2 4 6 8 10 tt > pl1 d plot hOld t , t = 0 ..10, color = red ; pl1 := PLOT ... > pl2 d plot h t , t = 0 ..10, color = blue ; pl2 := PLOT ... > display pl1, pl2 ; (5.2.3) (5.2.4)
• 0.72 0.70 0.68 0.66 0.64 0.62 0 2 4 6 8 10 t > Evaluation 2: Problems The average (median) reaction time is 215 milliseconds, maximal is 0.510 second. http://www.humanbenchmark.com/tests/reactiontime/stats.php > beerProblem d tt/ int q t , t = tt ..tt C0.215 ; rho tt C 0.215 q t dt beerProblem := tt/ > plot beerProblem tt , tt = 0 ..20 tt ρ (5.3.1)
• 0.0010 0.0008 0.0006 0.0004 0.0002 0 5 > beerBigProblem d tt/ 10 tt 15 20 int q t , t = tt ..tt C0.510 rho tt C 0.510 q t dt beerBigProblem := tt/ > plot beerBigProblem tt , tt = 0 ..20 tt ρ (5.3.2)
• 0.0025 0.0020 0.0015 0.0010 0.0005 0 5 10 tt 15 20 Conclusion: When the barrel is full, beer is out of the glass!!!!!!!!!!!!!!!!!! Advanced learning: We suppose people always find the problem in the begining, the relations between initial height with average human reaction time (0.215) > restart; > Po d 2\$105 : Pb d 105 : Ab d 3.14\$0.32 : g d 9.8 : Cd d 0.6 : rho d 1060 : r d \$0.0254 : Ao d 3.14\$r2 : H d 0.948 : > > for i from 1 to 8 by 1 do Ho d i\$0.1 : Vo d Ab\$H K0.225 : 9 16
• Po\$Vo ; Vo CAb\$ Ho Kh t P t KPb q d t/Cd\$Ao\$rho\$sqrt 2\$ C2\$ g\$h t ; rho equ d rho\$diff h t , t \$Ab =K t : q icsHeight d h 0 = Ho : sol d dsolve equ, icsHeight , h t , numeric, output = listprocedure : hh d rhs sol 2 : Po\$Vo PP d t/ ; Vo CAb\$ Ho Khh t PP t KPb qq d t/Cd\$Ao\$rho\$sqrt 2\$ C2\$ g\$hh t ; rho initialHeight i d i; int qq t , t = 0 ..0.215 beerProblemHeight i d : rho end do: > with plots : > pl d plot seq initialHeight i , beerProblemHeight i , i = 1 ..8 , color = red, style = line, axes = boxed : > display pl ; P d t/
• 0.00116 0.00115 0.00114 0.00113 1 2 3 4 5 6 7 8 > Appendix: Advanced learning ------------------ Why we omit manual steps, Maple can't do that ------------------------------------------------------------------> restart; Manual steps Here we follow equ 4.3, but put the d h t dt 2 part back to the equation d h t dt -
• 299.5560 d h t dt = 16.19049057 10000 K C19.6 h t C 0.2679048000 K0.2826 h t 53 K 0.4076610798 299.5560 diff h t , t K 0.407661079 2 d C h t : dt 2 = 2 = : 16.19049057 10000 K 0.2679048000 K0.2826 h t 53 16.19049057 10000 K C19.6 h t 0.2679048000 K0.2826 h t 53 5.399539742 105 d h t =K sqrt dt 2 16.19049057 10000 K C19.6 h t 0.2679048000 K0.2826 h t 53 5.399549742 105 K1 \$ diff h t , t C19.6 h t : d h t dt : Then we change the h to hNew to make difference with h(t) before > ode1 d K d hNew t = dt 0.00002998494565 K0.0003494357932 0.2679048000 K0.2826 hNew t 1/2 C0.00003629939020 hNew t : > ics1 d hNew 0 = 0.7961783440 : > sol1 d dsolve ode1, ics1 , hNew t , numeric, output = listprocedure ; sol1 := t = proc t ... end proc, hNew t = proc t ... end proc (6.1) > hNew d rhs sol1 2 ; hNew := proc t ... end proc > ode2 d 299.5560 d hOmit t dt K 0.4076610798 ode2 := 299.5560 (6.2) = 16.19049057 10000 K C19.6 hOmit t 0.2679048000 K0.2826 hOmit t 53 d hOmit t dt = 16.19049057 10000 K C19.6 hOmit t 0.2679048000 K0.2826 hOmit t 53 > ics2 d hOmit 0 = 0.7961783440 : > sol1 d dsolve ode2, ics2 , hOmit t , numeric, output = listprocedure ; sol1 := t = proc t ... end proc, hOmit t = proc t ... end proc (6.3) K 0.4076610798 (6.4) > hOmit d rhs sol1 2 ; hOmit := proc t ... end proc (6.5)
• > > with plots : > pl1 d plot hOmit t , t = 0 ..10, color = red ; pl1 := PLOT ... (6.6) Compare the result to h(t) before, now we know why. > pl2 d plot hNew t , t = 0 ..10, color = blue ; display pl1, pl2 ; pl2 := PLOT ... 0.78 0.76 0.74 0.72 0.70 0.68 0 2 4 6 t > 8 10