Answered step by step
Verified Expert Solution
Question
1 Approved Answer
MATLAB QUESTION: In an industrial process there are 3 storage tanks as shown in Figure 1. There are valves controlling the flow rates into and
MATLAB QUESTION: In an industrial process there are 3 storage tanks as shown in Figure 1. There are valves controlling the flow rates into and out of the system 1,in and 3,out as well as the flow rates between tanks 1,2 and 2,3.
The Problem: In an industrial process there are 3 storage tanks as shown in Figure 1. There are valves controlling the flow rates into and out of the system q1in and q3,out as well as the flow rates between tanks q1,2 and q2,3. You are tasked with making an analysis of the steady state (no change with time) condition of the tank system under 4 scenarios representing 4 different settings for the valves. The steady-state system is defined by the following mass conservation rules . 1,in F 1,2 1,2 F 42,3 2,393,out The flow rate into the system is controlled by a valve (represented by u) and is a constant: 1in U . *The flow rate between tanks 1 and 2 is controlled by a valve (represented by a1,2) and also the difference between levels in tanks 1 and 2: q12- a1,2(x1 - x2) The flow rate between tanks 2 and 3 is controlled by a valve (represented by a23) and also the difference between levels in tanks 2 and 3: q2,3 a2,3(x2 - X3) The flow rate out of the system is controlled by a valve (represented by a3.out) as well as the level of tank 3: q3,out- . a,outX3 These relationships combine to form the linear system in row-format Ax- b. The values of u, a1,2,a2,3 and a3,out are given and x is a column vector of the unknownsx1, x2 and x3 1,2 1,2 a1,2 -(a12 + a2,3) a2,3 2,3 i,in 3,out 1,2 2,3 Part 1: Loading Data from Files (9 points) Open a new script file and save it as L05.m (4 pts) Prompt the user to enter the 4 quantities u, a1,2, a2,3 and a3.out 2. 1. (5 pts) Create the matrix A and the right-hand-side b Part 2: Solving a System of Equations Under Different Conditions (15 points) Below your code for Part 1, create a branch structure (if-elseif) to perform the following 1. If there is no inflow (u = 0) but all other valves are open (a1,2, a2.3 and a3,out # 0) then the tanks will be empty. Set x = [0; 0,0] and print the following message to screen: There is only the trivial solution: tanks are empty For example, the conditional expression for this part will be 2. If there is nonzero inflow (u (a1,2, a2.3 or a3 out are zero), there is no solution and the valve settings are not compatible with the system. Set x- [NaN; NaN; NaN] (Hint: Do not put NaN in quotes) and print the following message to screen 0) but any one of the other three valves are closed There is no solution: open all valves 3. If there is zero inflow (u = 0) but any one of the other three valves are closed (one or more of a1,2, a2,3 or a3,out ls zero), then one (or more) of the tanks will be empty but the other(s) may have an arbitrary depth. There are an infinite number of solutions, depending on how much fluid is in the system initially and its initial distribution between the 3 tanks. Set the solution x - [0; 0; 0] and print the following message to screen: There are an infinity solutions: open all valves. 4. If the inflow is non-zero (u non-zero), then the system has a unique, non-trivial equilibrium solution. Find the solution x using left-divide and print the following message to screen 0) and all valves are open (a1,2, a2.3 and a3,out are also The fluid depths are: Tank 1 -XX. XX Tank 2 - XX.XX Tank 3 - XX. XXStep by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started