Question: Given that A = [ - 1 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 1 , 0

Given that A =[-1,0,0,0,0,0,0,0,1,0,0,0,-1,-1 ; 0,-1,0,0,0,0,0,0,0,1,0,0,-1,0; 0,0,-1,0,0,0,0,0,0,0,1,0,1,-1 ; 0,0,0,-1,0,0,0,0,0,0,0,1,0,1 ; 1,0,0,0,-1,0,0,0,-1,0,0,0,0,0; 0,1,0,0,0,-1,0,0,0,-1,0,0,0,0; 0,0,1,0,0,0,-1,0,0,0,-1,0,0,0; 0,0,0,1,0,0,0,-1,0,0,0,-1,0,0; 0,0,0,0,0,0,0,0,-0.9,0,0,0,1,1; 0,0,0,0,0,1,0,0,0,-1,0,0,0,0; 0,0,0.85,0,0,0,0,0,0,0,-1,0,0,0; 0,0,0,-0.65,0,0,0,0,0,0,0,1,0,0; 0.1,0,0,0,-1,0,0,0,0,0,0,0,0,0; 0,0,0,0,0,0,0,0,0,0,0,0,-0.3,0.7];
and
B =[-10 ; -20 ; 0; 0; 0; 0; 0; 0; 9; 0; 0; 0; 0; 0];
Where Ax = B :
- write a MATLAB, user-defined function that will solve the set of equations using the Gauss Seidel method. Compare how this performs against the results generated using MATLAB's in-built functions.
-Test your MATLAB code to study the range of possible solutions, i.e. solutions for which realistic solutions are possible (for example, negative flowrates can be solutions, but are not possible).
- Try and expand your MATLAB code to develop a code that would handle a more complicate Flowsheet balance -( each unknown in the balance represents an unknown ffrom a process flow diagram ie edit amount of inputs, unknowns etc)(arbitrary number of reactions , for example, or additional units of equipment).
 Given that A =[-1,0,0,0,0,0,0,0,1,0,0,0,-1,-1 ; 0,-1,0,0,0,0,0,0,0,1,0,0,-1,0; 0,0,-1,0,0,0,0,0,0,0,1,0,1,-1 ; 0,0,0,-1,0,0,0,0,0,0,0,1,0,1 ; 1,0,0,0,-1,0,0,0,-1,0,0,0,0,0;

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 Chemical Engineering Questions!