Any Errors in My Differential Equation for a Leaking and Refilling Container?

  • Context: Undergrad 
  • Thread starter Thread starter SidVicious
  • Start date Start date
  • Tags Tags
    Container Ode
Click For Summary

Discussion Overview

The discussion revolves around setting up and solving a differential equation for a cylindrical container that leaks from the bottom while being refilled at a constant rate. Participants explore the formulation of the equation, the application of Euler's method for numerical solutions, and the implications for plotting the height of water over time.

Discussion Character

  • Technical explanation
  • Mathematical reasoning
  • Homework-related

Main Points Raised

  • One participant presents a differential equation based on the rate of change of volume, incorporating Torricelli’s Law for the speed of water exiting the container.
  • Another participant confirms the initial formulation of the differential equation as correct, contingent on the validity of the speed formula.
  • The first participant seeks clarification on the application of Euler's method, questioning whether the absence of time on the right-hand side of the equation affects the method's validity.
  • A later reply supports the use of Euler's method and suggests plotting the height against time for various small step sizes to check for convergence.
  • There is a suggestion to potentially perform an analytical integral to compare with the numerical simulation results.

Areas of Agreement / Disagreement

Participants generally agree on the correctness of the differential equation and the application of Euler's method, but there is no consensus on the necessity or implications of the absence of time in the equation.

Contextual Notes

The discussion does not resolve whether the assumptions made in the differential equation are sufficient or if additional factors should be considered. There is also no definitive conclusion on the effectiveness of the numerical method in this context.

Who May Find This Useful

Readers interested in differential equations, numerical methods, fluid dynamics, or those working on similar problems involving dynamic systems may find this discussion relevant.

SidVicious
Messages
4
Reaction score
0
I have to set up a differential equation for a leaking cylindrical container that is being refilled at a constant rate. Its leaking from the bottom, refilled from the top, and starts empty.
Wondered if someone could check if what i have done so far is right..?
h=height of water
A=cylinder cross section
a=hole cross section
v=speed of water out = Sqrt(2gh) using Torricelli’s Law
b=rate of water going in

Rate of change of volume dV/dt= -av+b = A*dh/dt
Sub in v = Sqrt(2gh):
A*dh/dt=-a*sqrt(2gh)+b -----> dh/dt = (-a*Sqrt(2gh)+b)/A

Any errors?!
Thanks!
 
Physics news on Phys.org
Seems fine to me. As long as the formula for v is correct.

Torquil
 
Thanks Torquil.
I have to solve this using Eulers method:
yn+1 = yn + hf(xn,yn)
xn+1 = xn + h
where h is a step in x, to be chosen.
y=height of water(original h)
x=t
f(x,y) = dh/dt

As there is no t on the rhs of the differential equation will this formula work?

n=o : yn=0(t=o)=0
n=1 : yn=1 = (yn=0) + h((-a*Sqrt(2g(yn=0))+b)/A)
n=2 : yn=2 = (yn=0) + h((-a*Sqrt(2g(yn=0))+b)/A) + h((-a*Sqrt(2g(yn=1))+b)/A)
etc..

I want to make a plot of y against x (height water vs time) at the end, can i do that using this method as there is no t on rhs...?!

Thanks again!
 
Yes that seems correct. To plot the height vs time, plot the points y_n vs h*x_n, for all values of n. Try doing everything for various small values of h to determine if the result has converged. Maybe you can even perform the integral analytically and get an exact result to compare with your computer simulation.

Torquil
 

Similar threads

  • · Replies 7 ·
Replies
7
Views
4K
  • · Replies 3 ·
Replies
3
Views
3K
  • · Replies 1 ·
Replies
1
Views
12K
  • · Replies 65 ·
3
Replies
65
Views
9K
  • · Replies 1 ·
Replies
1
Views
2K
  • · Replies 2 ·
Replies
2
Views
2K
Replies
1
Views
4K
  • · Replies 3 ·
Replies
3
Views
4K
  • · Replies 0 ·
Replies
0
Views
4K
  • · Replies 13 ·
Replies
13
Views
3K