13_Ex9_2_Fig9_12cells

13_Ex9_2_Fig9_12cells - -1- Design of a Control Valve =...

Info iconThis preview shows page 1. Sign up to view the full content.

View Full Document Right Arrow Icon
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: -1- Design of a Control Valve = Example 9.2 pg 219 and Figure 9.12 SEM2 This is an Example of using the MATLAB “cell” format in an m-file in order to “publish” the MATLAB program and results in a Microsoft WORD document – ready for additional editing. Note the use of %% to define new “cells” in the MATLAB editor. ⎛q⎞ ΔPv = ΔPy = 40 − 30 ⎜ ⎟ ⎝ 200 ⎠ 2 (9-7) “A pump furnishes a constant head of 40 psi over the entire flow rate range of interest. The heat exchanger pressure drop is 30 psig at 200 gal/min (qd) and can be assumed to be proportional to q2. Select the rated Cv of the valve and plot the installed characteristic for the following cases: (a) A linear valve that is half open a the design flow rate (b) An equal percentage valve (R=50 in Eq. 9-3) that is sized to be completely open at 110% of the design flow rate.” See text = from problem specifications, calculate for (a) Cv = 125 and for (b) Cv = 115. Linear valve: l1 = q1 , Cv ΔPv ⎛ q2 ln ⎜ ⎜ C ΔP v v Equal % valve: l2 = 1 + ⎝ ln R ⎞ ⎟ ⎟ ⎠ For minimum flow rate, lift = 0, for maximum flow rate, lift = 1. The linear valve can thus be used to adjust the flow between 0 and 221 gpm while the equal percentage valve operates between 15 and 220 gpm. In the MATLAB program the values of flow are specified and the equations above are used to calculate the corresponding lift value for each valve. From the Editor you click on the dropdown triangle to see the “Edit Publish Configuration” option and select (shown on next page) the format to be WORD instead of html, then click on the “Publish” button to create the WORD document that contains your program and plots as shown in the following pages. -2- %% Figure 9.12 Curves 1 and 2 - CHE 461 S2009 % MATLAB file = Fig9_12cells.m , % Plotting the installed valve characteristics curves 1 and 2. % Dr. Keith Levien, Oregon State University %% Setup of program and R for Eq. Percentage Valve clear all, format compact, format short R = 50; %% Linear Valve Characteristic Cv1 = 125; % units of gpm/(psi^0.5) q1 = 0:1:221; % feasible flow rates, gpm delPv1 = 40 - 30*(q1/200).^2 ; % psi lift1 = q1./(Cv1*sqrt(delPv1)); % dimensionless, 0 to 1 figure, plot(lift1,q1,'b-','LineWidth',2) xlabel('lift'), ylabel('q , gal/min'), grid title('Linear Valve, Example 9.2') %% Equal Percentage Valve Characteristic Cv2 = 115; ; % units of gpm/(psi^0.5) q2 = 15:220; % feasible flow rates, gpm delPv2 = 40 - 30*(q2/200).^2 ; % psi lift2 = 1 + log(q2./(Cv2*sqrt(delPv2))) / log(R); % dimensionless, 0 to 1 figure, plot(lift2,q2,'r--','LineWidth',2) xlabel('lift'), ylabel('q , gal/min'), grid title(['Equal Percentage Valve R = ' int2str(R) ' , Example 9.2']) %% Both Linear and Equal Percentage Valves figure plot(lift1,q1,'b-',lift2,q2,'r--','LineWidth',2) xlabel('lift'), ylabel('q , gal/min'), grid title(['Two Valves in Example 9.2 , R for Eq. Percentage = ' int2str(R)]) legend('Linear','Eq Percentage',0) The file Fig9_12cells.doc (same name as .m file but with .doc extension) can be found in the automatically created html subdirectory. -1- Figure 9.12 Curves 1 and 2 - CHE 461 S2009 MATLAB file = Fig9_12cells.m , Plotting the installed valve characteristics curves 1 and 2. Dr. Keith Levien, Oregon State University Setup of program and R for Eq. Percentage Valve ..................................................... - 1 Linear Valve Characteristic ........................................................................................ - 1 Equal Percentage Valve Characteristic ....................................................................... - 2 Both Linear and Equal Percentage Valves.................................................................. - 2 - Setup of program and R for Eq. Percentage Valve clear all, format compact, format short R = 50; Linear Valve Characteristic Cv1 = 125; % units of gpm/(psi^0.5) q1 = 0:1:221; % feasible flow rates, gpm delPv1 = 40 - 30*(q1/200).^2 ; % psi lift1 = q1./(Cv1*sqrt(delPv1)); % dimensionless, 0 to 1 figure, plot(lift1,q1,'b-','LineWidth',2) xlabel('lift'), ylabel('q , gal/min'), grid title('Linear Valve, Example 9.2') -2- Equal Percentage Valve Characteristic Cv2 = 115; % units of gpm/(psi^0.5) q2 = 15:220; % feasible flow rates, gpm delPv2 = 40 - 30*(q2/200).^2 ; % psi lift2 = 1 + log(q2./(Cv2*sqrt(delPv2))) / log(R); % dimensionless, 0 to 1 figure, plot(lift2,q2,'r--','LineWidth',2) xlabel('lift'), ylabel('q , gal/min'), grid title(['Equal Percentage Valve R = ' int2str(R) ' , Example 9.2']) Both Linear and Equal Percentage Valves figure plot(lift1,q1,'b-',lift2,q2,'r--','LineWidth',2) xlabel('lift'), ylabel('q , gal/min'), grid title(['Two Valves in Example 9.2 , R for Eq. Percentage = ' int2str(R)]) legend('Linear','Eq Percentage',0) -3- ...
View Full Document

Ask a homework question - tutors are online