Search for question
Question

CHEE 205 In Class Challenge 1 CHEE 205 – In Class Challenge 8: Solving Systems of Equations in MATLAB Introduction Engineers frequently encounter systems of linear equations in their work. For example, in chemical and environmental engineering, these systems can represent mass balances around process units or interactions between pollutants in an environmental system. The ability to solve these systems is therefore crucial. In this challenge, we're going to solve a system of equations related to a process in a chemical plant. We have a system of reactors where the concentrations and the flow rates of the species involved need to be balanced at a steady state. Objective Our goal for this in-class challenge is to: Solve a system of linear equations that represent mass balances around a set of mixing tanks. The Challenge Consider a system where: Reactor 1 receives an inflow with a concentration of A at 4 M, and it sends out an outflow at a rate of x1 L/min. Reactor 2 receives the x1 L/min flow from Reactor 1 and also has an inflow at a rate of 3 L/min with a concentration of A at 2 M. Reactor 2 sends out an outflow at a rate of x2 L/min. Reactor 3 receives the x2 L/min flow from Reactor 2 and drains all of its inflow. Write and solve the mass balance for chemical A in each reactor. For example, for Reactor 1, the mass balance can be written as: 4 - x1*4 = 0 where x1 is the flow rate from Reactor 1 to Reactor 2. Similar equations can be written for Reactor 2 and 3. Write a script in MATLAB to solve this system of equations. Starter Code % Define the system matrix A and the right-hand side vector B % Solve the system % Display the results CHEE 205 – In Class Challenge 8: Solving Systems of Equations in MATLAB [Name] [Date] Submit Your Solution in the Below Mentioned Format Our goal for this in-class challenge is to: Solve a system of linear equations that represent mass balances around a set of mixing tanks. In Class Challenge Solution Format Code Output [Insert your code output here] MatLab Code [Copy and paste your code here] CHEE 205 In Class Challenge Introduction to MatLab and Python