This screencast will show how to develop mathematical models which involve more than
one differential equation. The problem that we're going to analyze is shown on the screen,
and what it shows is we have a blending tank which mixes two streams with different mass
flow rates with different concentrations of salt. The tank is well mixed, as an assumption,
and the outlet has a mass flow rate of W and a salt concentration of x, and the question
is asking us to develop a dynamic model that accounts for how height changes as a function
of time, and how salt concentration changes as a function of time. In order to do this
what we have to do is start with our mass balances because there is no indication that
there is a change in temperature which would require an energy balance so lets start with
a mass balance.The general mass balance equation has been presented here where accumulation
equals in minus out plus generation minus reaction. In this case no chemical reaction
is occurring, so therefore the last two terms will go to zero. The important point to note
with this problem is the fact that we're trying to track two different values as a function
of time, both salt concentration and tank height. Due to the fact that we're trying
to track two variables provides a good hint that we're probably going to need two differential
equations. So the question now becomes is what differential equations can we develop
here. First is we can develop and overall balance, which would include the salt and
the water, and our second balance would be a component balance, either salt or water.
In this case since we're trying to track salt concentration and everything has been defined
as such it probably makes best sense to stick with a salt balance. So first we will start
by developing our mathematical model by starting with an overall balance. In our overall balance
we have two streams coming in, both W(1) and W(2), and we have one steam coming out which
is W. For our accumulation term, our accumulation term is going to be d mass d time, and our
mass here will be over the control volume over which we are completing our mass balance,
which in this case is our tank. So if we quickly draw the sketch of the tank here the amount
of mass in the tank at any given time, remember the fact that we had a height H and a cross
sectional area A, the amount of mass can be simply written as the density of the fluid
multiplied by the volume of the fluid. The volume can be further simplified by multiplying
the cross sectional area A multiplied by the height H, and the right hand side is remaining
unchanged. For a final simplification what we can do here is factor out the rho and the
A because they both assumed constant. So that will leave us with our overall mass balance,
and as you note here that H is in the differential which will allow for it to be tracked as a function
of time. So therefore we have our first part of our mathematical model. For the salt balance,
just as recollection to the problem statement, the amount of salt was provided in terms of
mass fractions, so what we're now trying to do here is develop a balance for the amount
of salt we have. For the first stream, W1, W1 represents the total mass of fluid coming
in. The salt mass fraction says what fraction of that mass flow rate is salt, so therefore
in order to get the mass of salt all we have to do is multiply this flow rate by the salt
mass fraction. We do the same thing for both the second inlet stream and the outlet stream,
and our accumulation term will represent the amount of salt that is in the tank, and this
analysis is very similar to what we just completed in the overall mass balance accumulation term,
with the only difference being the fact that we have multiply by the mass fraction of salt
inside the tank. Since our tank is well mixed we can say the fact that the outlet mass fraction
of salt is going to equal the mass fraction of salt inside the tank, so what that leaves
us with in the accumulation term is rho times the volume, which can be represented as A
times H, multiplied by the mass fraction of salt, which is x. So before we look at the
right hand side of this equation, what we're going to do is factor out the left hand side.
However, if we look at this we notice that we have a bit of an issue. The fact that both
H and x here are variables. We really can't handle a derivative which has H and x in it
in order to do any useful analysis, so therefore when we see situations like this what we have
to do is we have to use the chain rule as applied to derivatives. In order to use the
chain rule here this term is now going to become two terms, one where the first variable
inside the derivative is held constant, and one where the second term inside the derivative
is held constant. So therefore our left hand side now becomes, we'll hold H constant first,
so rho A h dx dt plus rho A x multiplied by d H dt. At first glance this looks like it
could be potentially be quite a problem, trying to solve an equation with two differential
in it, but fortunately we already have a relationship for rho A d H dt. So the relationship for
rho A d H dt, well we already solved for that. That came from our overall mass balance. So
therefore what we can now do is substitute the right hand side into our equation. Now
what we'll do is substitute in this equation, and also bring back our right hand side of
the equation for our salt balance, and what this gives us is rho A H dx dt, we can't really
do too much with that, and thats fine because really our goal here is to be able to develop
an equation that tracks the salt concentration inside the tank as a function of time, and
that is what this does. We'll then add x multiplied by the right hand side of our overall mass
balance, and its going to equal our right hand side of our salt balance. What we'll
now do is move the second term on the left hand side over to the right in order to isolate
the derivative. By looking at our terms on the right hand side the first thing the first
thing that jumps out is that the x W terms can cancel. The second thing we can do here
is group together our W1 terms and our W2 terms. So once we complete this we've reached
our final mathematical model. We have rho A H dx dt equals W1 multiplied by x1 minus
x, plus W2 times x2 minus x. So therefore the mathematical model that describes the
salt mass fraction inside the tank and the height as a function of time can be expressed
by both this equation and the mass balance that we developed for the overall mass balance,
so these two equations together provide the dynamic model for the system.