%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % Inputting a 2D matrix "data" containing the data set % This routine scales the data into the appropriate units (bar, C, g/s) % used for plotting % Note: mscaledata.m should be used to run the model % % Data returned as "ScaleDataIO" % Jan 2004 by Denise McKay % June 2004 % after slm fix by Denise McKay % Aug 2004 AgS %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % UNIT ADJUSTMENTS PCaIn=(data(:,28)*249.089+101325)/100000; % convert from inH2O gauge to bar absolute TCaIn=data(:,38); % grab Cathode inlet temp data PAnIn=(data(:,27)*6894.76+101325)/100000; % AnInlPres from psig to bar abs TAnIn=data(:,42); % grab anonde inlet temp data PCaOut=(data(:,29)*249.089+101325)/100000; % CatOutlPres from inH2O gauge to bar absolute TCaOut=data(:,40); % grab Cathode outlet temp data PAnOut=(data(:,45)*249.089+101325)/100000; % AnOutPres from inH20 to bar absolute TAnOut=data(:,44); % grab Anode outlet temp data %rho_air=PCaIn./(8314.34.*TCaIn).*(28.97); %calculates air density (kg/m3) rho_air=1.2236;% air density at 15.6 degC and 1 atm (kg/m3) %rho_H2=PAnIn./(8314.34.*TAnIn).*(2.016); % calculates h2 denisty as funct of T and P (kg/m3) rho_H2=0.0838; %h2 density at 20 degC and 1 atm (kg/m3) WaCaIn=data(:,31).*(0.001/60).*rho_air*1000; % converts slm to g/s WHAnIn=data(:,30).*(0.001/60).*rho_H2*1000; % converts volumetric flow (slm) to mass flow (g/s) % calc vapor using ideal gas law for density of air TWPSOut=data(:,26); % cooling water temperature(K) out PS section TWPSIn=data(:,46); % cooling water temperature(K) TWHMOutIn=data(:,49); % Humidifier out water temperature(K) WWPSIn=data(:,48)/60*1000; % mass flow of water into PS from l/min to g/sek WWHMOut=data(:,47)/60*1000; % mass flow of water out of Humidification from l/min to g/sek