Question: USE MATLAP: In real life we are never given a differential equation to solve. We must find the differential equation based on what we know

USE MATLAP:
In real life we are never given a differential equation to solve. We must find the differential equation based
on what we know about the process and physical laws. Let's look at the tank problem that we did in Week
8, but this time with a slight twist.
Two tanks with capacities of 10 liters initially contain 2 grams of salt and 1 liter of water. Water containing
1gL of salt enters the first tank at a rate of 2L? hour, and the well-mixed solution flows out of the first tank
into the second tank at a rate equivalent to the volume of the first (i.e.,V1LHr). None of the brine flows
out of the second tank.
To model the process follow the steps in the lecture for each tank separately. Notice that the rate for the
second tank will depend on the first.
(1) Model the problem for the volume in liters as an IVP(s) and by using ode45(for MATLAB) or
solve_ivp (for Python) solve the IVP (ODE + IC) for the volume of water in the tanks. Solve from
time t=0 to t=6 with t=0.01. Save the volume of the first tank at each time as a 6011 column
vector named A1 and the volume of the second tank at each time as a 6011 column vector named
A2.
(2) At what time to the nearest integer does the water start overflowing (hint: use the round function)?
Save this integer value as A3. And which tank does it overflow from (1 or 2)? Save this integer value
as A4.
(3) Model the problem for the amount of salt in grams as an IVP(s) and by using ode45(for MATLAB)
or solve_ivp (for Python) solve the IVP (ODE+IC) for the amount of salt in the tanks. Solve from
time t=0 to t=6 with t=0.01. Save the amount of salt of the first tank at each time as a 6011
column vector named A5 and the amount of salt of the second tank at each time as a 6011 column
vector named A6.
(4) What is the salt concentration when tank that overflowed in part (b) is completely full of brine? Save
this salt concentration (remember it's amount/volume) as A7.
 USE MATLAP: In real life we are never given a differential

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!