In: Other
A 4,500 litre tank contains 2,500 litres of brine. There is 50
kg of salt initially present. Pure water is being put into the tank
at 20 litres/min. Brine solution is draining away at a rate of 15
litres/min.
a)Create a mathematical model of the dissolved salt in the
solution. Give amount of salt in terms of time (t).
b)Calculate how much salt is in the system after 15 minutes. State
all of the assumptions that you are using.
c)Create a working MATLAB program which deploys your mathematical
model above. It is important to show the steps that you have chosen
to create your mathematical model of this system.
This problem is based on mass balance in the stirred tank. The MATLAB program is based on finite difference equations. Proceed as follows:
(c) The MATLAB commands are to be given as follows (execute them in the same order), and the comments are written after the double slash sign, which don't have to be typed in the MATLAB command window:
>> syms c(t) //This command would define a symbolic function
c(t)
>> ode = diff(c,t) == -4*c/(500+t) //This command would define the model equation we have developed in part (a) above. The screen command prompt would then show the following execution messages:
ode(t) =
diff(c(t), t) == -(4*c(t))/(t + 500)
>> cSol(t) = dsolve(ode) // This command would solve the equation for c(t) as a function of time and display the following result
cSol(t) =
C1/(t + 500)^4
//which is same as what we obtained in part (a) above.