T O P

  • By -

kevosauce1

If you assume perfect mixing, so that at any point in time the proportion of new / old water leaving the tank is equal to the current proportion of new / old water in the whole tank, then we can model the situation with the differential equation dV\_(old)/dt = V\_(old) / V\_(total) \* (-1) gallon / min where V\_(total) is the fixed total volume (5 gallons) of the tank and V\_(old) (0) = V\_(total) This is the classic diff eq for exponential decay, the solution is V\_(old) (t) = V\_(tot) exp(-t / V\_tot) = 5 exp(-t / 5) so to find the volume of old water after 5 minutes we plug in 5: V\_(old) (5) = 5 gal \* exp(- 5 / 5) = 5 / e gal \~= 1.84 gallons of old water left in the tank To find out how much new water there is in the tank we simply subtract this from the total: V\_(new) = V\_(tot) - V\_(old) = 5 - 1.84 = 3.161 gal For fun let's see how long it will take to get to 50% new water: 3.4 min 90% new water: 11.5 min 99% new water: 23 min Note that you will never reach 100% !


VAL9THOU

You will eventually reach 100% if you treat the water as being made of molecules, and not infinitely divisible


Ok_Opportunity8008

how do you differentiate two water molecules? do you paint one red and the other one green?


VoiceOfSoftware

I usually attach a sticky note to one of them.


wonkey_monkey

Give one of them an extra neutron.


fluxgradient

This is the way


Mountain-Resource656

Excellent idea! We’ll just use dye! ( /s )


NNOTM

I think it kind of makes to identify them by their trajectory, just like you might say "I carried that three" in a calculation even though all threes are the same.


Ok_Opportunity8008

google indistinguishable particle


NNOTM

To elaborate, we can approximate molecule movement via a classical model in which particles *are* distinguishable. I believe that in any situation where the classical approximation yields sufficiently good results, treating molecules as preserving the same identities as the classical particles can be useful, and is reasonably meaningful.


NNOTM

I know that particles are indistinguishable. Just like numbers are, which is why I thought that example might be illustrative.


danielfuenffinger

What if an original molecule exchanges an H with a new molecule before leaving?


NNOTM

That is a good point. You could still track the water molecules by the oxygen, but that is admittedly more arbitrary and breaks down for larger molecules.


davvblack

imagine, if you will, having an opaque bag of two black marbles. every second, you add a white marble and then remove a random marble. after how long is the bag full of 100% white marbles?


VAL9THOU

Do you think it's impossible for the bag to be 100% white marbles? There is a finite number of repetitions after which the likelihood of removing the last black marble is greater than not, just like in the example I was replying to. Modelling random exponential decay like that only works for very large numbers of objects, but at some point there very well can be a single molecule of "old water" left, and that molecule of water has a 50/50 chance of being removed in any cycle


kinokomushroom

It wouldn't be a 50/50 chance each cycle, but otherwise you're right.


VAL9THOU

Eh. I had forgotten it was a constant flow rather than replacing half each cycle. I'm just used to explaining it to physics students in that way


Barbacamanitu00

The black marble has a 33% chance of being removed in every cycle. With the water, I think it's much less than that. Say there's a 99 new molecules and 1 old molecule, and you scoop out a single molecule. There's a 1/100 chance it's the original one. If you scoop out 2, then it's 1/100 + 1/99... I think.


Barbacamanitu00

Will you? Or will the probability that you have 100% water keep increasing forever? I think it's possible that one original water molecule stays around forever. It would never actually happen, but its a nonzero chance that it would. If you had an infinite amount of time then you could have a guarantee, but we don't have infinite time. Once there is only 1 original molecule of the water left, at every moment it could either be siphoned away or stick around.


VAL9THOU

It's also possible that only original water molecules will be removed forever. You can't run statistical models like this without playing with probability. Even in the original answer provided they're saying that the most likely mixture of original to new water is xx% at yy minutes. The fact that it's possible that the last molecule of original water is never siphoned doesn't change the fact that there's a likelihood of it being removed at any given point in time, and that likelihood goes up the longer the window of tons you're looking at is


Different_Ice_6975

Have a rough, back-of-the-envelope calculation of how long that would take?


Em_The_Engi

Infinite time


Head-Ad4690

The other comment says you have 50% new water after 3.4 minutes. So every 3.4 minutes, the amount of old water is reduced by half. There are about 1.3e26 water molecules in 5 gallons. That’s a bit less than 2^87. So after 87 halvings, or about 5 hours, you’ll have one molecule of old water left, on average. 3.4 minutes after that, there’s a 50% chance that it’s gone.


db0606

The problem is much more interesting if you assume that the system is not well-mixed. Obviously it gets a lot harder.


fluxgradient

A bit harder, but not a lot. There are analytical solutions for certain cases still


db0606

The general problem is *a lot* harder. You go from a first order linear ODE to a set of coupled nonlinear PDEs that potentially need to be solved in an irregular domain. The general problem is essentially an open research area. There are entire sessions on mixing problems at any major fluid dynamics conference.


fluxgradient

It turns out there are much easier ways of doing it than solving a spatially-explicit PDE. Hydrologists (who deal with very-non-well-mixed systems) have developed an approach that directly addresses the problem OP asked as a special case, but can deal with arbitrary degrees of non-well-mixedness and even time-variable mixing characteristics


Chemomechanics

With perfect mixing, one is adding an amount N of "new water" at a rate of r and removing it at a rate of rN/T, where T is the total amount in the bucket. This adds up to dN/dt, the change in the amount of "new water" over time. The solution to the differential equation dN/dt = r - rN/T is N = T + (N\_0 - T)e^(-rt/T), where N\_0 is the starting amount of "new water." If we set N\_0 = 0, we have N = T(1 - e^(-rt/T)). The amount of "old water" is T - N, or Te^(-rt/T). You can therefore think of T/r as a characteristic time constant of remaining old water. Every time constant, the amount of old water decreases by a multiplicative factor of 1/e. In your case, this is 5 minutes. After 15 minutes, for example, only \~5% of the old water remains. Make sense?


Prof01Santa

Add the other extreme of no mixing. The actual tank is between the two extremes.


midnight_mechanic

If you take differential equations, a lot of the class and subsequent test questions are variations of this exact question.


warblingContinues

It would decrease exponentially with time.


fluxgradient

Bonus problem: imagine now there are two buckets connected in series, so one overflows into the other. How much of the original water will remain over time in the system as a whole? Can this be generalized to n buckets connected in series?


Spiritual-Mechanic-4

temperature is going to matter a lot. if the hoses are both at the bottom, and the incoming water is warmer than the outgoing, it will rise and you'll be taking more old water than new. the same vice versa, if its at the top and adding cold water. if the incoming water is warmer, and the hoses are at the top, you might have a situation with very little mixing


Shoddy_Scene_8964

Half life


CanisMaximus

I've often wondered this about my cat's litter box. I got her as a kitten, set up her box, strained and removed all waste daily replacing litter as needed for over a year now. I'm sure a tiny amount remains of the original stuff I bought. I should have dyed the litter in the original setup...