Water filling a barrel with leakage

  • Thread starter Thread starter lkmarcum
  • Start date Start date
  • Tags Tags
    Leakage Water
Click For Summary

Discussion Overview

The discussion revolves around modeling the height of water in a barrel that is being filled while simultaneously leaking. Participants explore mathematical approaches to represent the height of water as a function of time, considering both inflow and outflow rates. The context includes numerical modeling and theoretical comparisons over a specified time period.

Discussion Character

  • Homework-related
  • Mathematical reasoning
  • Technical explanation

Main Points Raised

  • One participant states the inflow rate of water is 36.8 lb/sec and the outflow rate is related to the height of water, specifically 9.2*h lb/sec.
  • Another participant suggests that the problem can be modeled using a differential equation, which can be solved either symbolically or through numerical approximation.
  • A participant outlines the need to model the height of water from t = 1 to 250 seconds and to compare this with a theoretical height equation provided.
  • One participant describes the relationship between volume and height, noting that the volume of water when the height is h feet is 4.60*h cubic feet, leading to a rate of change of volume equation.
  • Another participant proposes a numerical simulation approach, suggesting the use of small time intervals to calculate inflow and outflow, updating the height iteratively.
  • A later reply expresses gratitude for the guidance received and indicates a desire to implement the solution in Matlab using a loop.

Areas of Agreement / Disagreement

Participants do not reach a consensus on the exact method for modeling the height of water, with some suggesting numerical simulation while others consider differential equations. The discussion remains unresolved regarding the best approach to take.

Contextual Notes

Participants express uncertainty about the setup of the mathematical model and the implications of the leak on the height of water over time. There are also references to the need for accurate time step selection in numerical methods.

lkmarcum
Messages
3
Reaction score
0

Homework Statement


The flow of water into a barrel = 36.8 lb/sec.
The height of the water = h = weight of the water in the barrel/(density of water)(bottom area of barrel)

There is a "leak" at the bottom of the barrel at h = 0. Flow out of the barrel is related to the depth of the water in the barrel. The deeper the water in the barrel the faster it will flow out. For this barrel the water flow out in lb/sec is = 9.2*h.

The area of the barrel is A = 4.60 ft^2. The density of water is p = 62.4 lb/ft^3.

Develop a mathematical model to represent the height of the water in the barrel as a function of time.

Homework Equations


I'm given an equation for the theoretical height of the water:
htheo(t) = 4(1-exp(-.032t))

The Attempt at a Solution


I'm drawing a blank on this, unfortunately. I have to develop a model for h(t) to use in a Matlab script to produce a matrix for height values from t = 0 to 250 seconds.

My original thought was to set h = (36.8t - 9.2h)/(density*area) and then solve for h. But of course that resulted in a linear equation with no maximum height of the water. This is obviously incorrect since the water will eventually even out as the leak factor is equal to the incoming water, when h = 4 ft.

I simply cannot wrap my mind around how to set up an equation for this. Any help at all would be greatly appreciated!
 
Physics news on Phys.org
Hi lkmarcum, Welcome to Physics Forums.

Is this implementation meant to be a numerical approximation (simulation), or are you meant to derive the closed form formula? The problem can be modeled by a differential equation which can either be solved symbolically or you can "integrate" it by numerical approximation (either using a built-in solver or by implementing your own numerical integrator).
 
The problem is presented in three parts:

1) Find a way to approximately model the height from t = 1 to 250

2) Find height values over the same time period using the equation for the theoretical height.

3) Plot the data from parts 1 and 2 to give a comparison.

Parts 2 and 3 are no problem. It's finding a way to model the system in Matlab for part 1 that is giving me fits.
 
QUOTE="lkmarcum, post: 4905241, member: 530041"]

Homework Statement


The flow of water into a barrel = 36.8 lb/sec.
The height of the water = h = weight of the water in the barrel/(density of water)(bottom area of barrel)

There is a "leak" at the bottom of the barrel at h = 0. Flow out of the barrel is related to the depth of the water in the barrel. The deeper the water in the barrel the faster it will flow out. For this barrel the water flow out in lb/sec is = 9.2*h.

The area of the barrel is A = 4.60 ft^2.[/quote]
So the volume when the water is h feet high is 4.60 h cubic feet.

The density of water is p = 62.4 lb/ft^3.
The water is coming in at 36.8 lbs/sec the volume is increasing by 36.8/62.4= 0.590 ft^3/sec.
But water is also going out at 9.2h lbs/sec= (9.2/62.4)h= 0.147h ft^3/sec.

dV/dt is the rate at which the volume of water is changing: dV/dt= 0.590- 0.147h.
Since V= 4.60 h, dV/dt= 4.60 dh/dt= 0.590- 0.147h

Develop a mathematical model to represent the height of the water in the barrel as a function of time.

Homework Equations


I'm given an equation for the theoretical height of the water:
htheo(t) = 4(1-exp(-.032t))

The Attempt at a Solution


I'm drawing a blank on this, unfortunately. I have to develop a model for h(t) to use in a Matlab script to produce a matrix for height values from t = 0 to 250 seconds.

My original thought was to set h = (36.8t - 9.2h)/(density*area) and then solve for h. But of course that resulted in a linear equation with no maximum height of the water. This is obviously incorrect since the water will eventually even out as the leak factor is equal to the incoming water, when h = 4 ft.

I simply cannot wrap my mind around how to set up an equation for this. Any help at all would be greatly appreciated!
 
So it looks like you want to create a numerical model, essentially a simulation of the system.

Consider a small time interval (time step) Δt at some instant t during the filling. At time t the current height of the water is h. How much water flows into the barrel during that time interval? How much (approximately) flows out during that interval? At the end of the time interval (new time = t + Δt), what's the new volume of water in the barrel, and thus the new height h?

Starting at t = 0, volume = 0, and h = 0, repeat the above saving values of h and t along the way, until your Δt's sum to 250 seconds. Play with the size of Δt to see how it affects accuracy compared to the theoretical result.
 
gneill - Thank you very much for your help. This definitely got me pointed in the right direction. Now I just need to figure out how to use a "for loop" to execute this in Matlab!

Again, thank you for taking the time!
 

Similar threads

  • · Replies 5 ·
Replies
5
Views
3K
  • · Replies 56 ·
2
Replies
56
Views
6K
  • · Replies 6 ·
Replies
6
Views
4K
Replies
55
Views
4K
  • · Replies 6 ·
Replies
6
Views
2K
Replies
1
Views
2K
  • · Replies 3 ·
Replies
3
Views
3K
  • · Replies 4 ·
Replies
4
Views
4K
Replies
8
Views
2K
  • · Replies 6 ·
Replies
6
Views
3K