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.

Emma Thompson
Contributor
4.9
43
6 months ago
Preview (2 of 5 Pages)
100%
Purchase to unlock

Page 1

Analysis of Liquid and Vapor Phase Compositions and Flow Rates in a Multicomponent System: A MATLAB Simulation - Page 1 preview image

Loading page ...

Analysis of Liquid and Vapor Phase Compositions and Flow Rates in a Multicomponent System: A MATLABSimulationMatlab codefunctionproject1(z,k,k_end,F,xLeft,xRight)%Thisprogramplottheoutputcompositionsandflowratesinbothphasesas%functionsofK7asK7varyingfrom0.05to4.00bytakingn-componentsystem%withthefeedcompositions,K-values,totalfeedrate,bracketinterval%forrootsandtherangeofk7(ornthk)%Input::%zvalues%kvalues%k_endintheform[ab];inthiscaseitsk7[0.054]%F--feedrate%xLeft:InitialLowerGuess%xRight:InitialUpperGuess%Output::%Plottheoutputcompositionsandflowratesinbothphasesas%functionsofK7asK7variesfrom0.05to4.00.%SampleTest:%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.054];%project1(z,k,k_end,F,xLeft,xRight)%generatingvaluesofk7inthegivenintervalk7=k_end(1):0.01:k_end(2);%checkfornoofinputsifnargin<6,error('minimum6inputargumentsrequired'),end%declaretheoutputvariablesroot=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));fori=1:length(k7)k1=[k,k7(i)];root(i)=BracketBisect(z,k1,xLeft,xRight);V(i)=root(i)*F;L(i)=F-V(i);forj=1:length(z)

Page 2

Preview Mode

This document has 5 pages. Sign in to access the full document!

Study Now!

XY-Copilot AI
Unlimited Access
Secure Payment
Instant Access
24/7 Support
Document Chat

Document Details

Related Documents

View all