8.1 Filling a Water Tank: Two Cases
207
8.1.2 Case 2: Continuously Increasing Rate
This case is more tricky. As in the previous case, there is 1 L of water in the tank
from the start. When the tank fills up, however, the rate of volume increase, r, is
always equal to the current volume of water, i.e., r = V (in units of L s −1 ). So, for
example, at the time when there is 2 L in the tank, water enters the tank at 2 L s −1 ,
when there is 2.1 L in the tank, water comes in at 2.1 L s −1 , and so on. Thus, contrary
to what we had in Case 1, r is not constant for any period of time within the 3 s
interval, it increases continuously and gives us a steeper and steeper curve for V (t).
Writing this up as for Case 1, the information we have is
V (0) = 1 L,
and, for the rate (in L s −1 ),
r(t) = V (t),
0 s < t ≤ 3 s .
Let us, for simplicity, assume that we also are given the exact solution in this case,
which is V (t) = e t . This allows us to easily check out the performance of any
computational idea that we might try.
So, how can we compute the development of V , making it compare favorably to
the given solution?
An Idea Clearly, we will be happy with an approximately correct solution, as
long as the error can be made “small enough”. In Case 1, we effectively computed
connected straight line segments that matched the true development of V because
of piecewise constant r values. Would it be possible to do something similar here
in Case 2, i.e., compute straight line segments and use them as an approximation
to the true solution curve? If so, it seems we could benefit from a very simple
computational scheme! Let us pursue this idea further to see what comes out of
it.
The First Time Step Considering the very first time step, we should realize that,
since we are given the initial volume V (0) = 1 L, we do know the correct volume
and correct rate at t = 0, since r(t) = V (t). Thus, using this information and
pretending that r stays constant as time increases, we will be able to compute a
straight line segment for the very first time step (some Δt must be chosen). This
straight line segment will then become tangent to the true solution curve when t = 0.
The computed volume at the end of the first time step will have an error, but if our
time step is not too large, the straight line segment will stay close to the true solution
curve and the error in V should be “small”.
The Second Time Step What about the second time step? Well, the volume we
computed (with an error) at the end of the first time step, must now serve as the
starting volume and (“constant”) rate for the second time step. This allows us to
compute an approximation to the volume also at the end of the second time step. If
Précédent

- 227/350

Suivant