Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

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.
image text in transcribed

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Databases On The Web Designing And Programming For Network Access

Authors: Patricia Ju

1st Edition

1558515100, 978-1558515109

More Books

Students also viewed these Databases questions

Question

3. Define the attributions we use to explain behavior

Answered: 1 week ago