Skip to content

QuestionSo, I’m trying to have a 4th plotted figure (highlig

Do you have a similar question? Our professional writers have done a similar paper in past. Give Us your instructions and wait for a professional assignment!        

QuestionSo, I’m trying to have a 4th plotted figure (highlighted part) like the comparison from my plots 2 and 3 in one picture. But I’m not sure how to get this on. I’m proving my code for both the driver and two function files. And I need to modify my driver for a figure 4 so that it compares and plot both of 2nd and 3rd plot together if you can also describe what to use in such cases in Matlab. Driver fileExternal function fileInternal function filePlots:Reference comparison plot (my 4rth plot needs to look like this):Codes: %Driver to evaluate a liquid-liquid extractor model%This driver sets initial conditions, runs the solver,%and plots the results.%set initial conditions as given in the problem.clear allclose allclcVs =8;VL =5;%Initial conditions in mass (extensive)y0=[0,0,5,3.5]; %mass(kg)global Vs VL%solve the model, by calling ODE45 between 0 and 2000 seconds.[t,y]=ode45(@extractf,[0,2000],y0);figure(1)plot (t,y)%plot resulttitle(‘Tutorial 3 Liquid-Liquid Extractor- I Q1’)legend(‘mas’,’mbs’,’mla’,’mlb ‘);xlabel(‘time (s)’);ylabel(‘mass(kg)’);hold%Initial conditions in concentration (extensive but in concentration)c=y./[Vs Vs VL VL]; %concentration(kg/m3)figure(2)plot (t,c)%plot resulttitle(‘Tutorial 3 Liquid-Liquid Extractor- I Q2’)legend(‘Cas’,’Cbs’,’Cla’,’Clb ‘);xlabel(‘time (s)’);ylabel(‘Concentration(kg/m3)’);hold%Intensive.m?0=[0,0,5,3.5]./[Vs Vs VL VL]; %concentration(kg/m3)%solve the model, by calling ODE45 between 0 and 2000 seconds.[t,x]=ode45(@intensive,[0,2000],x0);figure(3)plot (t,x)%plot resulttitle(‘Tutorial 3 Liquid-Liquid Extractor- I Q3’)legend(‘Cas-I’,’Cbs-I’,’Cla-I’,’Clb-I’);xlabel(‘time (s)’);ylabel(‘Concentration(kg/m3)’);holdfunction f=extractf(t,y)%Code to describe liquid-liquid extractor%Based on extensive mass balances%% local variable assignmentmas = y(1); %kgmbs = y(2); %kgmla = y(3); %kgmlb = y(4); %kg%% Parameters and constantsglobal Vs VLkLa = 6.944E-4; %s-1kLb = 5.555E-4; %s-1Vs = 8; %m3VL = 5; %m3Ca1 = 0; %kg m-3Cb1 = 0; %kg m-3Ca3 = 1; %kg m-3Cb3 = 0.75; %kg m-3%% Inputs and disturbancesF1 = 0.0035; %m3 s-1F3 = 0.0015; %m3 s-1%% Constitutive%Property DefinationsCaL = mla/VL; %(9)CbL = mlb/VL; %(10)Cas = mas/Vs; %(9)Cbs = mbs/Vs; %(10)%Equilibrium definationsCaLstar = 1.25*Cas-0.2*Cbs; %(7)CbLstar = Cbs+0.5*(Cas)^2; %(8)%Mass TransfermdotA=kLa*(CaL-CaLstar)*VL; %(5)mdotB=kLb*(CbL-CbLstar)*VL; %(6)%% ConstrainsF2=F1; %(13)F4=F3; %(14)%% Conservation%Solvent Phasef(1) = F1 * Ca1 – F2 * Cas + mdotA; %(1)f(2) = F1 * Cb1 – F2 * Cbs + mdotB; %(2)%Liquid Phasef(3) = F3 * Ca3 – F4 * CaL – mdotA; %(3)f(4) = F3 * Cb3 – F4 * CbL – mdotB; %(1)f=f’;function f=intensive(t,x)%Code to describe liquid-liquid extractor%Based on extensive mass balances%% local variable assignmentCas = x(1); %kg/m3Cbs = x(2); %kg/m3Cla = x(3); %kg/m3Clb = x(4); %kg/m3%% Parameters and constantsglobal Vs VLkLa = 6.944E-4; %s-1kLb = 5.555E-4; %s-1Vs = 8; %m3VL = 5; %m3Ca1 = 0; %kg m-3Cb1 = 0; %kg m-3Ca3 = 1; %kg m-3Cb3 = 0.75; %kg m-3%% Inputs and disturbancesF1 = 0.0035; %m3 s-1F3 = 0.0015; %m3 s-1%% Constitutive%Equilibrium definationsCaLstar = 1.25*Cas-0.2*Cbs; %(7)CbLstar = Cbs+0.5*(Cas)^2; %(8)%Mass TransfermdotA=kLa*(Cla-CaLstar)*VL; %(5)mdotB=kLb*(Clb-CbLstar)*VL; %(6)%% ConstrainsF2=F1; %(13)F4=F3; %(14)%% Conservation%Solvent Phasef(1) = (F1 * Ca1 – F2 * Cas + mdotA)/Vs; %(1)f(2) = (F1 * Cb1 – F2 * Cbs + mdotB)/Vs; %(2)%Liquid Phasef(3) = (F3 * Ca3 – F4 * Cla – mdotA)/VL; %(3)f(4) = (F3 * Cb3 – F4 * Clb – mdotB)/VL; %(4)f=f’;MathStatistics and ProbabilitymatlabCHEE 3007

Get a plagiarism-free order today   we guarantee confidentiality and a professional paper and we will meet the deadline.    

Leave a Reply

Order a plagiarism free paper today. Get 20% off your first order!

X