I miss using Matlab.
Matlab code from an engineering measurements lab I did back in 2011. %% *****Pre-test(Lab_9): Rotameter calibration & desired Q calculation***** % Height measurements were taken from a rotameter for corresponding volume % flow rates calculated using a wet-test meter and a stopwatch. % The wet_test meter's volume change and stopwatch's time measurements % calculate the volume flow rate which serves as the standard. % The desired rotameter height is then calculated for a desired volume flow % rate using the calibration equation. close all; clear all; clc
% ------Recorded measurements------> V,t,h,Tamb,Pamb % wet-test meter volume change [ft^3] V= 0.25; % same measurement for all time recordings % stopwatch time [sec] t= [133.35 89.85 66.73 54.84 44.59 38.18 31.93 29.18 25.22 22.96 20.66 19.37 17.75 17.36]; % rotameter height [mm] h= [25 35 45 55 65 75 85 95 105 115 125 135 145 150]; % thermometer ambient temperature measurement [deg F] Tamb= 70; %[deg F] % black box barometer ambient pressure measurements [psi] Pamb= [15.10 15.07 15.07 15.05 15.04 15.03 15.02 15.01 14.99 14.99 14.98 14.89 14.88 14.86 14.86 14.85 14.79 14.77 14.70 14.70 14.64]; %[psi] % mean value for Pamb= 14.9186[psi] % ------Volume flow rate standard calculation------> Qstd % governing eqn: Qstd=V/t Qstd= V./t; %[ft^3/sec]
% ------Correction of Qstd for STP conditions------> Qstdstp % governing eqn: Qstdstp= Qstd*(Tamb/Tstp)*(Pstp/Pamb) % STP temperature and pressure values Tstp= 68; %[degrees F] Pstp= 14.7; %[psi] % temperature conversion to Rankine Tstp= Tstp+459.67; %[Rankine] Tamb= Tamb+459.67; %[Rankine] % correction calculation for Vdotstdstp Qstdstp= Qstd*(Tamb/Tstp)*(Pstp/mean(Pamb));
% ------Establishing calibration equation------> m,b,height(Q) % polyfit(x,y,1)= [m b] where y=(m*x)+b f= polyfit(Qstdstp,h,1); m= f(1); % slope, m = 9667.537881274884e[mm/(ft^3/sec)] b= f(2); % intercept, b = 9.040905428257874[mm] % h= (Qstdstp*9667.5)+9.0409 % function for determining rotameter height for a desired volume flow rate height= @(Q) (Q*m)+b; % output in [deg F] % height = rotameter height to set % Q = desired volume flow rate
% ------Determining desired volume flow rate------> Qd % governing eqn: Qd=(Re*D*v*pi)/4 % Reynolds number for desired flow rate Re= 1100; % expected diameter of pipe to be used [in] D= 0.55; %[in] % pipe diameter conversion to [ft] D= D*(1/12); %[ft] % dynamic viscosity of air [ft^2/sec] v= 0.000161; %[ft^2/sec] % calculation of desired Qd [ft^3/sec] Qd= (Re*D*v*pi)/4; %0.006375[ft^3/sec] Qdcfm= Qd*60; %0.3825[cfm];
% ------Determining desired rotameter height------> hd % desired rotameter height[mm] using height() calibration function hd= height(Qd); %hd=71.8456[mm]
% ------Uncertainty analysis------> uQd_1st, uQd_bias % --1st order error--> uQd_1st % 1st order error in Qstd assumed negligable % 1st order in Pamb from 21 sample, student t calculation Pamb_mean=mean(Pamb); %[psi] sample mean of 21 pressure readings % Sx= sqrt((1/v)*(sum of(Pamb(i)-Pamb_mean)^2)) N= length(Pamb); % N=21 v= N-1; % v=20 sum=0; for i=1:N sum= ((Pamb(i)-Pamb_mean)^2)+sum; % @end sum=0.3815 end Sx= sqrt((1/v)*sum); % Sx=0.1381[psi] % uncertainty analsis using student t because we are using a sample mean % Pamb= Pamb_mean +/- ((tv*Sx)/sqrt(N)) tv= 2.086; % student t value for v=20 and 95% confidence uPamb_1st= ((tv*Sx)/sqrt(N)); % uPamb_1st= 0.0629[psi] uTamb_1st= 0.5; %[deg F] 1/2 resolution of thermometer uh_1st= 0.5; %[mm] 1/2 resolution of rotameter % uncertainty in desired Q based on uPamb_1st; (partial derivative*uncertainty) uQdPamb_1st=Qd*(Tamb/Tstp)*(Pstp/mean(Pamb)^2)*uPamb_1st; %[ft^3/s] % uncertainty in desired Q based on uTamb_1st; (partial derivative*uncertainty) uQdTamb_1st= Qd*(1/Tstp)*(Pstp/mean(Pamb))*uTamb_1st; %[ft^3/s] % uncertainty in desired Qd based on uh_1st; (partial derivative*uncertainty) uQdh_1st= (1/m)*uh_1st; %[ft^3/s] % first order uncertainty in desired Qd value uQd_1st=sqrt((uQdPamb_1st^2)+(uQdTamb_1st^2)+(uQdh_1st^2)); %5.7597e-005[ft^3/s] uQdcfm_1st= uQd_1st*60; %0.0035[cfm];
% --curve fit error--> uQd_CF Syx =1.535; % from linear regression in excel N=length(h); % N=14; v=N-2; %v=12; tv= 2.179; % student t value for v=12 and 95% confidence % curve fit error in desired Qd volume flow rate uQd_CF= (tv*Syx)/m; %=3.3952e-004[ft^3/s] uQdcfm_CF= uQd_CF*60; %0.0204[cfm];
% --standard error--> uQd_std uTamb_std= 0.05; %[deg F] standard error in thermometer uPamb_std= 0.01; %[psi] standard error in barometer uh_std= 0.1; %[mm] standard error in rotameter uV_std= 0.0025; %[ft^3] standard error in wet test meter % Q=(h-b)/m % Q=(V/t)*(Tamb/Tstp)*(Pstp/Pamb) % Q= Qamb*(Tamb/Tstp)*(Pstp/Pamb) % uncertainty in desired Qd based on uPamb_std; (partial derivative*uncertainty) uQdPamb_std=Qd*(Tamb/Tstp)*(Pstp/Pamb_mean^2)*uPamb_std; %[ft^3/s] % uncertainty in desired Qd based on uTamb_std; (partial derivative*uncertainty) uQdTamb_std= Qd*(1/Tstp)*(Pstp/Pamb_mean)*uTamb_std; %[ft^3/s] % uncertainty in desired Qd based on uh_std; (partial derivative*uncertainty) uQdh_std= (1/m)*uh_std; %[ft^3/s] % uncertainty in desired Qd based on uV_std; (partial derivative*uncertainty) uQdV_std= (1/min(t))*(Tamb/Tstp)*(Pstp/Pamb_mean)*uV_std; %[ft^3/s] % standard error in desired Qd volume flow rate [ft^3/s] uQd_std= sqrt((uQdPamb_std^2)+(uQdTamb_std^2)+(uQdh_std^2)+(uQdV_std^2)); % uQd_std=1.4286e-004[ft^3/s] uQdcfm_std= uQd_std*60; %0.0086[cfm];
% --bias error--> uQd_bias uQd_bias= sqrt((uQd_CF^2)+(uQd_std^2)); %=3.6835e-004[ft^3/s] uQdcfm_bias= uQd_bias*60; %0.0221[cfm];
% ------Determining desired mass flow rate------> mdot % governing eqn: mdot= Qd*density_at_STP % air density[lbm/ft^3] @70[deg F], interpolation from Table A.6 values densitystp= (0.07633+0.07350)/2; %749.1500[lbm/ft^3] mdot= Qd*densitystp; %4.7759e-004[lbm/s]
% ------Uncertainty analysis------> umdot_1st, umdot_bias % --1st order error--> umdot_1st % uncertainty in mdot based on uQd_1st; (partial derivative*uncertainty) umdot_1st= uQd_1st*densitystp; %4.3149e-006[lbm/s]
% --bias error--> umdot_bias % uncertainty in mdot based on uQd_bias; (partial derivative*uncertainty) umdot_bias= uQd_bias*densitystp; %2.7595e-005[lbm/s]
%% ******Pre-Test(Lab 9): Thermocouple Calibration****** % Temperature measurements were taken from a thermocouple reader and a % thermometer in order to calibrate the thermocouple with the thermometer % acting as the standard. % Uncertainty intervals for curve fitted temperatures are established.
% ------Recorded temperature measurements------> T, Tstd % thermocouple readings [deg. F] T= [85.2 87.4 89.4 91.3 93.2 95.0 97.0 98.7 100.4 102.3 104.1 106.0 107.9 109.6 111.2 113.3 115.0]; % thermometer readings [deg. F] Tstd= [86.0 86.5 90.5 92.0 93.8 95.7 97.5 99.2 101.0 102.8 104.6 106.2 108.2 109.4 111.7 113.6 115.4];
% ------Establishing calibration equation------> m,b % polyfit(x,y,1)= [m b] where y=(m*x)+b f= polyfit(Tstd,T,1); m= f(1); % slope, m = 1.005234300539170[unitless] b= f(2); % intercept, b = -0.945418503187715[deg. F] % T= 1.0052*(Tstd)-0.9454
% ------Inverting calibration equation------> Tc(Tm) % x=(y-b)/m % Tstd= (T+0.9454)/1.0052 % function for correcting thermocouple readings Tc= @(Tm) (Tm-b)/m; % output in [deg F] % Tc = Corrected T value % Tm = T value measured by thermocouple
% ------Uncertainty analysis------> uTc_1st, uTc_bias % --1st order error--> uTc_1st uT_1st= 0.05; %[deg F] 1/2 resolution of thermocouple reader uTstd_1st= 0.05; %[deg F] 1/2 resolution of thermometer % uncertainty in corrected T values based on uT_1st uTcT_1st= (1/m)*uT_1st; %[deg F] (partial derivative*uncertainty) % uncertainty in corrected T values based on uTstd_1st uTcTstd_1st= (1/m)*uTstd_1st; %[deg F] (partial derivative*uncertainty) % first order uncertainty in corrected T values uTc_1st=sqrt((uTcT_1st^2)+(uTcTstd_1st^2)); %0.0703[def F]
% --curve fit error--> uTc_CF Syx =0.449238945; % from linear regression in excel N=length(T); % N=31; v=N-2; %v=29; tv= 2.045; % student t value for v=29 and 95% confidence % curve fit error in corrected T values uTc_CF= (tv*Syx)/m; %0.9139[deg F]
% --standard error--> uTc_std % standard error in corrected T values uTc_std= 0.05; %0.0500[deg F] standard error of thermometer
% --bias error--> uTc_bias % sbias error in corrected T values from standard and curve fit error uTc_bias= sqrt((uTc_CF^2)+(uTc_std)); %0.9409[deg F]
%% ******Lab 10: Thermocouple Temperature Correction****** % Temperature measurements were taken with the calibrated thermocouple % reader upsteam and downstream of a heat exchanger. % The measurements are corrected based on the thermocouple calibration. % Uncertainty intervals for the temperatures are established.
% ------Recorded thermocouple temperature measurements------> T1, T2 % 31 upstream readings [deg. F] T1m= [73.0 73.1 73.1 73.1 73.1 73.0 73.0 73.0 73.1 73.0 73.1 73.0 73.0 73.0 73.0 73.1 73.0 73.6 73.5 73.2 73.0 72.9 72.9 72.9 72.9 72.9 72.9 72.9 72.9 72.9 72.9]; % mean value for T1m= 73.0323[deg F] % 31 downstream readings at a single point, for error analysis only[deg. F] T2m= [95.5 95.4 95.5 95.6 95.4 95.6 95.6 95.6 95.1 95.4 95.5 95.6 95.6 95.7 95.6 95.6 95.6 95.5 95.3 95.2 95.3 95.6 95.7 95.6 95.7 95.7 95.7 95.8 95.7 95.7 95.8];
% ------Correction of T1m & T2m using calibration------> T1, T2 % using funtion Tc= @(Tm) (Tm-b)/m; % corrected output in [deg F] % Tc=Corrected value & Tm=value measured by thermocouple T1=Tc(T1m); %[deg F] T2=Tc(T2m); %[deg F]
% ------Calculation of system input temperature------> T1a % input temperature is just the average of the T1 values T1a= mean(T1); %73.5925[deg F]
% ------Uncertainty analysis for T1------> uT1_1st, uT1_bias % --1st order error--> uT1_1st % 1st order in T1 from 31 sample, student t calculation T1_mean=mean(T1); %[deg F] sample mean of 31 temperature readings % Sx= sqrt((1/v)*(sum of(T1(i)-T1_mean)^2)) N= length(T1); % N=31 v= N-1; % v=30 sum=0; for i=1:N sum= ((T1(i)-T1_mean)^2)+sum; % @end sum=0.7796 end Sx= sqrt((1/v)*sum); % Sx=0.1612 % uncertainty analsis using student t because we are using a sample mean % T1= T1_mean +/- ((tv*Sx)/sqrt(N)) tv= 2.042; % student t value for v=30 and 95% confidence uT1c_1st= ((tv*Sx)/sqrt(N)); %0.0591[deg F] % first order uncertainty in T1 based on uTc_1st (from calibration) uT1Tc_1st= uTc_1st; %0.0703[deg F] % first order uncertainty in corrected T1 uT1_1st= sqrt((uT1c_1st^2)+(uT1Tc_1st^2)); %0.0919[deg F]
% --bias error--> uT1_bias % bias error in T1 based on uTc_1st (from calibration) uT1_bias= sqrt(uTc_bias^2); %0.9409[deg F]
% ------Uncertainty analysis for T2------> uT2_1st, uT2_bias % --1st order error--> uT2_1st % 1st order in T2 from 31 sample, student t calculation T2_mean=mean(T2); %[deg F] sample mean of 31 temperature readings % Sx= sqrt((1/(N-1))*(sum of(T2(i)-T2_mean)^2)) N= length(T2); % N=31 v= N-1; % v=30 sum=0; for i=1:N sum= ((T2(i)-T2_mean)^2)+sum; % @end sum=0.8281 end Sx= sqrt((1/(N-1))*sum); % Sx=0.1661 % analysis using chi squared because we are using an average of values for % a single point in the exit temperature profile (the point of max slope) % T2= T2_mean +/- 2*sigma Xsquared= 16.8; % chi^2 value for v=30 and 95% confidence sigma= sqrt((v*Sx^2)/Xsquared); uT2c_1st= 2*sigma; %0.4440[deg F] % first order uncertainty in T2 based on uTc_1st (from calibration) uT2Tc_1st= uTc_1st; %0.0703[deg F] % first order uncertainty in corrected T1 uT2_1st= sqrt((uT2c_1st^2)+(uT2Tc_1st^2)); %0.4496[deg F]
% --bias error--> uT2_bias % bias error in T1 based on uTc_1st (from calibration) uT2_bias= sqrt(uTc_bias^2); %0.9409[deg F]
%% ******Lab 10: Mass Average Temperature Calculation****** % Thermocouple temperature measurements were taken at different radii from % the centerline of the pipe to establish the temperature profile for the % temperature downstream of the heat exchanger. % The measurements are corrected based on the thermocouple calibration. % The mass average temperature is calculated using the temperature profile. % Uncertainty intervals for the temperatures are established.
% ------Recorded measurements------> r,R,Tr % radial distance from tube center line measured by vernier [cm] r= [0.00 0.04 0.08 0.12 0.16 0.20 0.24 0.28 0.32 0.36 0.40 0.44 0.48 0.52 0.56 0.60 0.64]; %[cm] r= r/2.54; %[in] conversion of r to inches % radius of the flow tube from caliper measurement in inches R= 0.252; %[in] % thermocouple temperature reading [F] at tube exit and radius, r Trm= [81.70 82.00 82.50 82.70 83.50 84.60 85.30 86.00 88.10 90.10 92.30 95.00 97.00 99.30 101.70 103.10 104.00]; %[degrees F]
% ------Correction of Trm using calibration------> Tr % using funtion Tc= @(Tm) (Tm-b)/m; % corrected output in [deg F] % Tc=Corrected value & Tm=value measured by thermocouple Tr=Tc(Trm); %[deg F]
% ------Evaluation of Tmass average exit temperature------> T2ma % governing eqn: T2ma= integral of:(4/(R^2))*(Tr.*(1-((r.^2)/(R^2))).*r) f = (4/(R^2))*(Tr.*(1-((r.^2)/(R^2))).*r); % defining function T2ma = trapz(r,f); %89.6704[deg F] integrating & solving function
% ------Measurement uncertanties------> ur_1st,uR_1st,ur_bias,uR_bias % first uncertainty intervals ur_1st= 0.005; %[cm] 1/2 resolution of vernier ur_1st= ur_1st/2.54; %[in] uR_1st= 0.0005; %[in] 1/2 resolution of caliper uTr_1st= uT2_1st; %0.4496[deg F] from calibration and chi^2 analysis % bias uncertainty intervals ur_bias= 0.005; %[cm] standard error of vernier ur_bias= ur_bias/2.54; %[in] uR_bias= 0.01; %[in] standard error of caliper uTr_bias= uT2_bias; %0.9409[deg F] from calibration
% ------Uncertainty analysis for T2------> uT2ma_1st, uT2ma_bias % --1st order error--> uT2ma_1st % uncertainty in mass average temperature T2ma based on ur_1st % sequential perturbation to obtain error from r measurements uT2r_1st=0; for i=1:length(r) if r(i)+ur_1st >= R % r cannot be > R; perturb r down to avoid this r(i)=r(i)-ur_1st; f = (4/(R^2))*(Tr.*(1-((r.^2)/(R^2))).*r); T2 = trapz(r,f); uT2r_1st=sqrt((uT2r_1st^2)+((T2ma-T2)^2)); r(i)=r(i)+ur_1st; else r(i)=r(i)+ur_1st; f = (4/(R^2))*(Tr.*(1-((r.^2)/(R^2))).*r); T2 = trapz(r,f); uT2r_1st=sqrt((uT2r_1st^2)+((T2ma-T2)^2)); r(i)=r(i)-ur_1st; end end uT2r_1st; %0.0712[deg F] % uncertainty in mass average temperature T2ma based on uR_1st % single value perturbation to obtain error from single R measurement R= R+uR_1st; f = (4/(R^2))*(Tr.*(1-((r.^2)/(R^2))).*r); T2 = trapz(r,f); uT2R_1st=sqrt((T2ma-T2)^2); R=R-uR_1st; uT2R_1st; %0.0331[deg F] % uncertainty in mass average temperature T2ma based on uTr_1st % sequential perturbation to obtain error from Tr measurements uT2Tr_1st=0; for i=1:length(Tr) Tr(i)=Tr(i)+uTr_1st; f = (4/(R^2))*(Tr.*(1-((r.^2)/(R^2))).*r); T2 = trapz(r,f); uT2Tr_1st=sqrt((uT2Tr_1st^2)+((T2ma-T2)^2)); Tr(i)=Tr(i)-uTr_1st; end uT2Tr_1st; %0.1241[deg F] % first order uncertainty in mass average T2ma uT2ma_1st= sqrt((uT2r_1st^2)+(uT2R_1st^2)+(uT2Tr_1st^2)); %0.1468[deg F]
% --bias uncertainty--> uT2ma_bias % uncertainty in mass average temperature T2ma based on ur_Bias % sequential perturbation to obtain error from r measurements uT2r_bias=0; for i=1:length(r) if r(i)+ur_bias >= R r(i)=r(i)-ur_bias; % r cannot be > R; perturbing r down to avoids this f = (4/(R^2))*(Tr.*(1-((r.^2)/(R^2))).*r); T2 = trapz(r,f); uT2r_1st=sqrt((uT2r_bias^2)+((T2ma-T2)^2)); r(i)=r(i)+ur_bias; else r(i)=r(i)+ur_bias; f = (4/(R^2))*(Tr.*(1-((r.^2)/(R^2))).*r); T2 = trapz(r,f); uT2r_bias=sqrt((uT2r_bias^2)+((T2ma-T2)^2)); r(i)=r(i)-ur_bias; end end uT2r_bias; %0.0708[deg F] % uncertainty in mass average temperature T2ma based on uR_Bias % single value perturbation to obtain error from single R measurement R= R+uR_bias; f = (4/(R^2))*(Tr.*(1-((r.^2)/(R^2))).*r); T2 = trapz(r,f); uT2R_bias=sqrt((T2ma-T2)^2); R=R-uR_bias; uT2R_bias; %0.0985[deg F] % uncertainty in mass average temperature T2ma based on uTr_Bias % sequential perturbation to obtain error from Tr measurements uT2Tr_bias=0; for i=1:length(Tr) Tr(i)=Tr(i)+uTr_bias; f = (4/(R^2))*(Tr.*(1-((r.^2)/(R^2))).*r); T2 = trapz(r,f); uT2Tr_bias=sqrt((uT2Tr_bias^2)+((T2ma-T2)^2)); Tr(i)=Tr(i)-uTr_bias; end uT2Tr_bias; %0.2597[deg F] % bias uncertainty in mass average T2ma uT2ma_bias= sqrt((uT2r_bias^2)+(uT2R_bias^2)+(uT2Tr_bias^2)); %0.2866[deg F]
%% ******Lab 10: Heat Transfer Rate Calculation****** % Heat transfer rate is calculated using values for mass flow rate, input % temperature, mass average temperature out and the specific heat of air. % 1st and Nth order uncertainty intervals for the heat transfer rate are % established. % Thermal efficiency is calculated allong with uncertainty intervals as % well.
% ---Parameters for heat transfer rate calculation----> mdot,T1a,T2ma,cpavg % mass flow rate through heat transfer system mdot; %4.7759e-004[lbm/s] % input temperature of air into heat transfer system T1a; %73.5925[deg F] % mass average temperature out of heat transfer system T2ma; %89.6704[deg F] % heat capacity of air @70[deg F] cpavg= 0.2403; %[BTU/(lbm/deg F)]
% ------Heat transfer rate calculation------> Qdot % governing eqn: Qdot=mdot*cpavg*(T2-T1) Qdot=mdot*cpavg*(T2ma-T1a); %0.0020[BTU/s] QdotW= Qdot*1055.055852; %2.0630[Watts]
% ------Uncertainty analysis------> Qdot_1st, Qdot_bias, Qdot_Nth % --1st order uncertainty--> uQdot_1st umdot_1st; %4.3149e-006[lbm/s] uT1_1st; %0.0919[deg F] uT2ma_1st; %0.1468[deg F] % uncertainty in Qdot based on umdot_1st (partial derivative*uncertainty) uQdotmdot_1st=umdot_1st*cpavg*(T2ma-T1a); %1.7666e-005[BTU/s] % uncertainty in Qdot based on uT1_1st (partial derivative*uncertainty) uQdotT1_1st=mdot*cpavg*uT1_1st; %1.0546e-005[BTU/s] % uncertainty in Qdot based on uT2ma_1st (partial derivative*uncertainty) uQdotT2ma_1st=mdot*cpavg*uT2ma_1st; %1.6853e-005[BTU/s] % first order uncertainty in heat transfer rate Qdot uQdot_1st= sqrt((uQdotmdot_1st^2)+(uQdotT1_1st^2)+(uQdotT2ma_1st^2)); %uQdot_1st= 2.6595e-005[BTU/s] uQdotW_1st= uQdot_1st*1055.055852; %0.0281[Watts]
% --bias uncertainty--> uQdot_bias umdot_bias; %2.7595e-005[lbm/s] uT1_bias; %0.9409[deg F] uT2ma_bias; %0.2866[deg F] % uncertainty in Qdot based on umdot_bias (partial derivative*uncertainty) uQdotmdot_bias=umdot_bias*cpavg*(T2ma-T1a); %1.1298e-004[BTU/s] % uncertainty in Qdot based on uT1_bias (partial derivative*uncertainty) uQdotT1_bias=mdot*cpavg*uT1_bias; %1.0798e-004[BTU/s] % uncertainty in Qdot based on uT2ma_bias (partial derivative*uncertainty) uQdotT2ma_bias=mdot*cpavg*uT2ma_bias; %3.2891e-005[BTU/s] % first order uncertainty in heat transfer rate Qdot uQdot_bias= sqrt((uQdotmdot_bias^2)+(uQdotT1_bias^2)+(uQdotT2ma_bias^2)); %uQdot_1st= 1.5970e-004[BTU/s] uQdotW_bias= uQdot_bias*1055.055852; %0.1685[Watts]
% --Nth order uncertainty--> uQdot_Nth % Nth order uncertainty in heat transfer rate Qdot uQdot_Nth= sqrt((uQdot_1st^2)+(uQdot_bias^2)); %1.6190e-004[BTU/s] uQdotW_Nth= uQdot_Nth*1055.055852; %0.1708[Watts]
% ------Thermal efficiency calculation------> Qdot % governing eqn: eff=Qdotout/Qdotin Qdotin= 6; %[Watts] nominally set hear exchanger input (negligable error) Qdotout= QdotW; %2.062998[Watts] eff= Qdotout/Qdotin; %0.3438
% ------Uncertainty analysis for eff------> eff_1st, eff_bias, eff_Nth % uncertainty in eff based on QdotW_1st (partial derivative*uncertainty) ueff_1st= (1/Qdotin)*uQdotW_1st; %0.004677 % uncertainty in eff based on QdotW_bias (partial derivative*uncertainty) ueff_bias= (1/Qdotin)*uQdotW_bias; %0.028083 % uncertainty in eff based on QdotW_Nth (partial derivative*uncertainty) ueff_Nth= (1/Qdotin)*uQdotW_Nth; %0.028470









