Question1: The compound tank system shown in Figure 1 consists of a spherical tank of radius R1 and a cylindrical tank of diameter D2. A liquid of constant density is fed at a volumetric rate F1in into the top of a spherical tank and volumetric rate F2in into the top of the cylindrical tank. The spherical and cylindrical tanks interact through the pipe connecting them. The flow rates into the connecting pipe depend on the heights of the liquid in the tanks. The volumetric flow rate out of the spherical tank into the pipe is given by F1out =k1√h1 , while the volumetric flow rate out of the cylindrical tank into the pipe is given by F2out =k1√h2 where h1 and h2 are the heights of the liquid in the spherical and cylindrical tanks respectively and k1 is the common valve coefficient. The cylindrical tank also has a drain on the right-hand side which has volumetric flow rate F3out =k2√h2 where k2 is the valve coefficient for the right-hand side drain.
a) Obtain a dynamic model that describes the heights of the liquid in the tanks. Is this a linear or nonlinear model?
b) For constant input flow rates, F1in and F2in, analytically determine the steady-state values of h1 and h2. Do the shapes and dimensions of the tanks affect the steady-state values?
c) Simulate the system and plot the heights of the liquid in the tanks versus time for constant input flow rates using the values given in the table below. (Run the simulation for 2000 sec)
|
F1in
|
|
|
|
|
|
2.0 ft3/s
|
|
|
F2in
|
|
|
1.0 ft3/s
|
|
|
|
R1
|
|
|
|
|
10.0 ft
|
|
|
|
D2
|
|
|
20.0 ft
|
|
|
|
|
|
k1
|
|
|
|
|
|
2.0 ft5/2/s
|
|
|
|
k2
|
|
|
3.0 ft5/2/s
|
|
|
|
h1(0)
|
|
|
|
|
|
4.0 ft
|
|
|
h2(0)
|
|
|
|
4.0 ft
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Question 2: Chaotic systems areö ones for which small changes eventually lead to results that can be dramatically different. The R ssler system is one of the simplest sets of differential equations thatöexhibits chaotic dynamics. In addition to their theoretical value in studying chaotic systems, the R ssler equations are useful in several areas of physical modeling including analyzing chemical kinetics for reaction networks. Consider the reaction network:
k1
A1 + X 2X
k-1
k2
X +Y 2Y
k-2
k3
A5+Y A2
k-3
k4
X +Z A3
k-4
k5
A4 +Z 2Z
k-5
where X, Y, and Z represent the chemical species whose concentrations vary and A1, A2, A3, A4, and A5 are chemical species whose concentrations are held fixed by large chemical reservoirs, serving to keep the system out of thermodynamic equilibrium. ki and k-i denote the forward and inverse reaction rates.
The system of differential equations that describe the concentrations x, y, and z (for chemical speciesX, Y, and Z) are:
dx
|
=-y -z
|
dt
|
|
dy
|
= x +ay
|
dt
|
|
dz
|
=b -cz +xz
|
dt
|
|
a) Simulate this system for a=0.380, b = 0.300, and c = 4.280 with initial conditions x(0) = 0.1, y(0) = 0.2, z(0) = 0.3. Run the simulation for 200 seconds using a fixed-step size algorithm with a step size of 0.001 seconds. Plot the concentrations x, y, and z versus time on one figure with three subplots. Additionally, in separate graphs, plot the phase-space plots: x versus y, x versus z, and y versus z. Finally, make a 3-D plot of x vs y vs z using the Matlab graphics command "plot3".
b) Illustrate the sensitivity of the solution to variations in the initial conditions by repeating the simulation of part (a) with x(0) = 0.0999 and then with x(0) = 0.1001. (A 0.1% change in the value of the initial condition in either direction.) Keep the initial conditions for y(0) and z(0) the same as in part (a). Show the sensitivity by superimposing the plots for the new values you obtain for x(t),y(t), and z(t) with the original plots for x vs t, y vs t, and z vs t. In addition, make plots of the differences: x(t) - xorginal(t) vs t, y(t) - yorginal(t) vs t , and z(t) - zorginal(t) vs t.
c) Illustrate the sensitivity of the solution to variations in parameter values by repeating the simulation of part (a) with c =4.280001. [Use the original initial conditions from part (a).] Show the sensitivity with the same set of plots as in part (b). Why is this system non-linear? Qualitatively describe the sensitivity to initial conditions and parameter values.
Question 3: A continuous stir tank reactor (CSTR) is used to produce a product P from chemicals A andB. The reaction is A + B àP. A is in excess and the rate of decomposition of B is given by:
where k1 and k2 are constants and x2 is the product concentration. The equations describing the system are given by:
dx1/dt = u1+u2-0.2x1
dx2/dt = (Cb1-x2)u1x+(Cb2-x2)u2x-k1k2/(1+kx)2
The parameters are: Cb1 = 24.9 , Cb2 = 0.1 , k1 = k2 = 1 , and u1 = u2 = 1. The initial conditions are: x1(0) = 10 and x2(0) = 0.
a) First, simulate the equation for x1 only since it does not depend on x2. Note the steady-state value that you find for x1.
b) In the model for x2 , initialize the integrator for x1 to the steady-state value you found in part (a) and initialize x2(0) = 0. Run the simulation for 1000 seconds to determine x2(t) and the steady-state value of x2.
c) Repeat the simulation for x2 using an initial value x2(0) = 10. Note the new steady-state value you find for x2.
d) Both of the previous cases are stable. There is another steady state corresponding to everything else being the same and the steady states for x2 and x1 being x2 = 2.793 and x1 = 100. This is an unstable steady state. Demonstrate this by setting the initial value of the integrator for x2 to x2(0) = 2.80 and show that the simulation goes to the upper steady-state value. Repeat the simulation with x2(0) = 2.79 and show that it goes to the lower steady-state value. This means that any small fluctuation will cause the system to fall to steady state of part (b) or rise to the steady state of part (c).
e) Demonstrate that the steady state with x2 = 2.793 is unstable by linearizing the equation for x2 about the steady-state values and showing that the linear system that results is unstable. You can do this by either solving the differential equation or by simulating the system with a small initial ?x2.
Question 4: Consider the following linear system:
G(s) = -8s+6/2s2+9s2+13s+6, For this problem, use a unit step input.
a) Create a model for this system using only integrators and run it for 10 seconds.
b) Replace the integrators with discrete integrators and investigate the effect of forward, backward, and trapezoidal integrators with sampling times of 0.01, 0.1, and0.2 seconds.
c) For each case, compare the true solution to the discrete solution in two ways:
(i) Plot the true solution (in blue) and discrete solution (in red) on a single plot.
(ii) Plot the difference between the true solution and the discrete solution.
If you want to be really fancy, use the subplot command to show both plots in a single figure.
d) Compute an estimate of the integral square error for each case and create a table of these differences.
e) What conclusions can you draw regarding the accuracy of the different methods and step sizes?