Skip to content
Solved Assignments

Analysis of Liquid and Vapor Phase Compositions and Flow Rates in a Multicomponent System: A MATLAB Simulation

This solved assignment uses MATLAB simulations to analyze liquid and vapor phase compositions in multicomponent systems.

Preview 2 of 5 pages

See the first 2 pages exactly as they appear in the document.

  1. Page 1
    Read page 1 as text

    Analysis of Liquid and Vapor Phase Compositions and Flow Rates in a Multicomponent System: A MATLAB Simulation Matlab code function project1(z,k,k_end,F,xLeft,xRight) % This program plot the output compositions and flow rates in both phases as % functions of K7 as K7 varying from 0.05 to 4.00 by taking n - component system % with the feed compositions , K - values, total feed rate, bracket interval % for roots and the range of k7( or nth k ) % Input:: % z values % k values % k_end in the form [a b] ; in this case its k7 [0.05 4] % F -- feed rate % xLeft : Initial Lower Guess % xRight : Initial Upper Guess % Output:: % Plot the output compositions and flow rates in both phases as % functions of K7 as K7 varies from 0.05 to 4.00. % Sample Test: % F = 1500; % z = [0.16,0.09,0.21,0.13,0.06,0.15,0.20]; % k = [3.52,1.92,1.22,0.84,0.43,0.08]; % k7 = 0.05:0.01:4; % xLeft = 0; % xRight = 1; % k_end = [0.05 4]; % project1(z,k,k_end,F,xLeft,xRight) % generating values of k7 in the given interval k7 = k_end(1):0.01:k_end(2); % check for no of inputs if nargin<6,error( 'minimum 6 input arguments required' ), end % declare the output variables root = zeros(1,length(k7)); V = zeros(1,length(k7)); L = zeros(1,length(k7)); x = zeros(length(k7),length(z)); y = zeros(length(k7),length(z)); for i=1:length(k7) k1 = [k,k7(i)]; root(i) = BracketBisect(z,k1,xLeft,xRight); V(i) = root(i)*F; L(i)=F - V(i); for j=1:length(z)

  2. Page 2

3 more pages in the full document

Unlock it once and it stays in your library, ready to chat with or turn into flashcards.

Unlock the full document
See all

Study this document with CramX

Once it is in your library, every tool can work from it.