Answered step by step
Verified Expert Solution
Question
1 Approved Answer
Figure 2 is shown above. Create a Matlab code to solve the differential equation using a forward finite difference. Also, plot the liquid height as
Figure 2 is shown above. Create a Matlab code to solve the differential equation using a forward finite difference. Also, plot the liquid height as a function of time and note approximately how long it would take for the tank to empty. All information given is shown above.
A spherical tank has a circular orfice in its bottom through which the liquid flows out (see Figure 2). The flow rate throught the hole can be estimated as Qout CA 2gh (1) where Qout is the outflow (m3/s), C is an empirically derived coefficient, A is the area of the orfi ce (m2), g is the gravitational constant (9.81 m/s and h is the depth of liquid in the tank. The balance equation describing the volume of liquid in the tanke is dV (2) Qout dt Additionally, the volume of liquid in the tank can be calculated as a function of of the liquid height and the tank radius as follows: Th (3r h) (3) Combining these three expressions leads to the following differential equation: dh -CA 2gh (4) dt 2Trh Th2 (You should try and derive this result for yourself, although you do not need to document it.) Solve this differential equation numerically using a forward finite difference. Note that the denominator of the right-hand-side will become zero when the tank is empty. To keep the solver "sane" you should check if h at each time point is less than or equal to zero. If it is, just set h 0, which captures what happens physically anyway A spherical tank has a circular orfice in its bottom through which the liquid flows out (see Figure 2). The flow rate throught the hole can be estimated as Qout CA 2gh (1) where Qout is the outflow (m3/s), C is an empirically derived coefficient, A is the area of the orfi ce (m2), g is the gravitational constant (9.81 m/s and h is the depth of liquid in the tank. The balance equation describing the volume of liquid in the tanke is dV (2) Qout dt Additionally, the volume of liquid in the tank can be calculated as a function of of the liquid height and the tank radius as follows: Th (3r h) (3) Combining these three expressions leads to the following differential equation: dh -CA 2gh (4) dt 2Trh Th2 (You should try and derive this result for yourself, although you do not need to document it.) Solve this differential equation numerically using a forward finite difference. Note that the denominator of the right-hand-side will become zero when the tank is empty. To keep the solver "sane" you should check if h at each time point is less than or equal to zero. If it is, just set h 0, which captures what happens physically anywayStep by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started