Help with all of these problems I need it in matlab code or

Help with all of these problems. I need it in matlab code... or could someone type it out in code and help?
Please scan your solution as a PDF file and upload it to Canvas. Only part of your solution will be graded. Instructions: Upload your Matlab code as a \".m\' file. Use the publish\' feature of Matlab to create pdf versions of code and out- put, and append to the rest of your pdf solution. Acrobat is available in the computer lab to merge pdf files. Please use the fprintf function to generate labeled output. A stream of numbers is not acceptable by itself. Instead, make sure your Matlab output is easily read. For example, printf A1. boiling temperature at 1 bar is *g C temp) This homework will make extensive use of the Lee and Kesler correlations to approximate thermodynamic properties. We will be concerned with dimethyl ether, which is also known as the refriger- ant R-E170. The following data is given: 127.15°C Pe 53.4 bar 0.2 Also, for dimethyl ether, Pig. 17.004 17.895 x 10 2T -5.2300 x 10 T 1.9163 x 10 T for T in K and CP in J/mol K. Q1. Use L K Eq. (17) to estimate the boiling temperature at 1 bar pressure. (For comparison, the experimental value is -24.81°C). Q2. Use the L-K tables to estimate the latent heat of vaporization at 1 bar. (For comparison, the experimental value is 461.55 Jg.) Q3. A vapor compression refrigeration cycle operates between 1 bar and 10 bar. What is the quality exiting the expander? Q4. \"One ton of refrigeration\' is the rate of heat removal that would freeze one ton of pure water at 0°C in 24 hours: 3.516 kw. What is the mass flow rate through the refrigerator per ton of refrigeration? Q5. What is the rate of work needed by a perfectly efficient isentropic compressor (per ton)? Assume ideal gas properties, estimate necessary thermodynamic prop- erties at 1 bar saturated vapor. Greg Miller

Solution

p = Antoine.data; h2o = p.h2o; % Use Tsat method to report boiling point of water problem(\'Normal Boiling Points\'); answer(\'Normal Boiling Point\',p.h2o.Tsat(760),\'deg C\'); disp(sep); % Use Tsat method to report normal boiling points for all compounds in the % Antoine class data set. disp(\'Normal Boiling Points of Species in Antoine\'\'s Database\'); f = fields(p); for i = 1:length(f) disp(sprintf(\'%6s %7.2f [deg C]\',f{i},p.(f{i}).Tsat(760))) end disp(sep) P = 53.4 ; z_bnz = 0.5; z_tol = 0.5; % Using Raoult\'s law, solve for vapor phase mole fractions has a function % of temperature y_bnz = @(T)z_bnz*bnz.Psat(T)/P; y_tol = @(T)z_tol*tol.Psat(T)/P; Tbub = fzero(@(T)y_bnz(T) + y_tol(T) - 1, 100); problem(\'Bubble Point Calculation\') answer(\'z_bnz\',z_bnz,\'mole fraction\'); answer(\'z_tol\',z_tol,\'mole fraction\'); disp(sep); answer(\'latent heat\',Tbub,\'deg C\'); % A graphical interpretation of the solution process T = 127.5; plot(T,y_bnz(T)+y_tol(T),T,y_bnz(T),T,y_tol(T)); xlabel(\'Temperature [deg C]\'); ylabel(\'Mole Fraction\'); title(\'vapor phase mole fractions\'); legend(\'y_{bnz}+y_{tol}\',\'y_{bnz}\',\'y_{tol}\',\'Location\',\'NW\'); ax = axis; hold on; plot([Tbub Tbub ax(1)],[ax(3) 1 1],\'--\'); plot(Tbub,1,\'.\',\'Markersize\',15); text(Tbub,1.05,sprintf(\' T_{bubble} = %5.2f deg C\',Tbub), ... \'HorizontalAlignment\',\'center\'); plot(Tbub,y_bnz(Tbub),\'g.\',\'Markersize\',15); plot([Tbub,ax(1)],y_bnz(Tbub)*[1 1],\'g--\'); text(Tbub,y_bnz(Tbub),sprintf(\' y_{bnz} = %5.3f\',y_bnz(Tbub))); plot(Tbub,y_tol(Tbub),\'r.\',\'Markersize\',15); plot([Tbub,ax(1)],y_tol(Tbub)*[1 1],\'r--\'); text(Tbub,y_tol(Tbub),sprintf(\' y_{tol} = %5.3f\',y_tol(Tbub))); hold off;
Help with all of these problems. I need it in matlab code... or could someone type it out in code and help? Please scan your solution as a PDF file and upload i

Get Help Now

Submit a Take Down Notice

Tutor
Tutor: Dr Jack
Most rated tutor on our site