22
ASEN 2002 Lab 4 Group 7 Godwin Gladison University of Colorado at Boulder Aerospace Engineering Sciences Undergraduate Kennedy Harrmann University of Colorado at Boulder Aerospace Engineering Sciences Undergraduate Sarah Larson University of Colorado at Boulder Aerospace Engineering Sciences Undergraduate Matthew McKernan University of Colorado at Boulder Aerospace Engineering Sciences Undergraduate Alexander Swindell University of Colorado at Boulder Aerospace Engineering Sciences Undergraduate and Olivia Tonti University of Colorado at Boulder Aerospace Engineering Sciences Undergraduate 1 University of Colorado at Boulder

ASEN 2002 Lab 4 - Aerodynamics Lab 1

Embed Size (px)

Citation preview

Page 1: ASEN 2002 Lab 4 - Aerodynamics Lab 1

ASEN 2002 Lab 4 Group 7

Godwin Gladison University of Colorado at Boulder Aerospace Engineering Sciences Undergraduate

Kennedy Harrmann

University of Colorado at Boulder Aerospace Engineering Sciences Undergraduate

Sarah Larson University of Colorado at Boulder Aerospace Engineering Sciences Undergraduate

Matthew McKernan

University of Colorado at Boulder Aerospace Engineering Sciences Undergraduate

Alexander Swindell University of Colorado at Boulder Aerospace Engineering Sciences Undergraduate

and

Olivia Tonti University of Colorado at Boulder Aerospace Engineering Sciences Undergraduate

1

University of Colorado at Boulder

Page 2: ASEN 2002 Lab 4 - Aerodynamics Lab 1

I. Abstract In order to develop a better understanding of wind tunnel testing, and the associated concepts and

measurements, two wind tunnel experiments were performed. The first experiment focused on the measurement of airspeed in the wind tunnel, while the second focused on the effects of viscous flow and the boundary layer influence on centerline airspeed. The results were analyzed and compared to other groups’ data to complement the gained understanding of wind tunnel operation and calibration. It was found that there is a linear relationship between velocity and voltage, on the order of the velocity being approximately 5 times that of voltage. It was also found the boundary layer for the particular wind tunnel in testing was located at 6.5­7.0mm away from the walls of the test section, meaning all tests should be performed outside of that range to avoid boundary layer effects. Sources of error were found to include random error in the flow and systematic errors in data collection. The biggest source of error was likely the small openings left in the test section of the wind tunnel.

II. Introduction The this lab aimed to compute the airspeed of a test­section in a wind tunnel and subsequent errors. The

speed of air was calculated by applying the Conservation of Mass principle and Bernoulli’s Equation. The viscous boundary layer development was observed in the experiment to understand the impact of the airspeed on the test­section. The experiment assists in understanding the concepts about the flow measurements and wind tunnel testing.

III. Experimental Setup and Measurement Techniques First, the wind tunnel in the Integrated Teaching and Learning Laboratory basement was inspected for

damage or potential mechanisms of failure and the test chamber was cleared and its door sealed and locked shut. Using various pre­assigned voltages, the wind tunnel was brought up to speed and data was collected from the pressure transducers and stored by LABVIEW. Additionally, pressure was estimated using a U­tube manometer at each speed. The wind tunnel was then slowed to zero speed and the process repeated with each voltage.

The measurement of boundary­layer influence was measured using a similar set­up. However, an ELD boundary layer probe was implemented. Additionally, each measurement took place at 5 volts and the vertical location of the ELD probe varied.

IV. Airspeed Calculation and Airspeed Model In order to measure the airspeed in a wind tunnel, a series of assumptions and derivations must be made.

We know that the particular wind tunnel used in this lab is a low­speed wind tunnel, allowing us to assume the flow to be incompressible and steady. With these assumptions, we can apply Bernoulli’s equation in conjunction with the equation of state of perfect gases to compute the airspeed. The rearrangement of Bernoulli’s equation, with the substitution of the equation of state, to find the differential pressure is given by the following:

p ρV ( )Vp0 − ps = Δ = 21 2 = 2

1 patmRTatm

2 The above equation can then be rearranged further, giving us an equation which yields airspeed.

V =√2Δp( )patmRTatm

We used two different devices and configurations to make pressure measurements for computing airspeed. The first was a static­ring connected to a U­tube manometer, while the second was a pitot­static probe connected to a pressure transducer. To find the differential pressure using the static­ring, we must measure the atmospheric pressure in the room, and the static pressure at the ring (using the manometer). Subtracting the static pressure from the atmospheric pressure, we get the differential pressure. The pitot­static probe measures the differential pressure by isentropically bringing the flow to a stop to measure total pressure, and using static ports to measure static pressure. By applying these to the rearrangement of Bernoulli’s Equation above, we get the calculated airspeeds from each configuration. The results of these calculations are displayed in Fig.1.

2

University of Colorado at Boulder

Page 3: ASEN 2002 Lab 4 - Aerodynamics Lab 1

Figure 1. Airspeed calculations using various pressure measurement configurations.

It is evident through the analysis and comparison of the two configurations that there is a discrepancy between their associated differential pressures. The plot in Fig.1 reflects this discrepancy in the significant difference between the two airspeed calculations. This confirms the expectations detailed in the lab document. In order to account for this difference, a pressure loss coefficient, k, must be calculated and subtracted from the manometer differential pressure calculation.

p pk = Δ manometer−Δ pitot−static

V =√2(Δp )( )− k patmRTatm

From Fig. 2 we can see that the pressure loss coefficient increases linearly with airspeed, suggesting that as the airspeed increases, the static­ring and U­tube manometer at the front of the test section actually measures higher values than it should. When we apply k to the differential pressure of the manometer, we get the corrected relationship between voltage and velocity as seen in Fig. 3.

3

University of Colorado at Boulder

Page 4: ASEN 2002 Lab 4 - Aerodynamics Lab 1

Figure 2. Pressure loss coefficient variation with velocity.

Figure 3. Airspeed calculations with the pressure loss coefficient correction applied to the manometer configuration.

The pressure transducer used with the pitot­static probe is more accurate than the U­tube manometer used with the static­ring at the front of the test section. This is because the manometer measurements depend on us to make an accurate reading of water levels in the tube, whereas the transducer makes readings electronically into a

4

University of Colorado at Boulder

Page 5: ASEN 2002 Lab 4 - Aerodynamics Lab 1

computer. With this method of making measurements with the manometer, there is a lot of room for user error. There are also typically two static­rings in wind tunnels so an average can be taken to get a more accurate measurement, however, the wind tunnel used in this lab only has one static­ring, adding to the inaccuracy. In calculating the the differential pressure with the manometer, the total pressure (or atmospheric pressure) is measured in a location where the air in the room is assumed to be stagnant. There may actually be some slight variations in environment at this location, resulting in a slight deviation from the actual atmospheric pressure, and consequently a deviation in accuracy of the measurement and calculation.

The method of least squares was used to fit the velocity and voltage data to the equation of a single line, given by:

elocity .0776(voltage) .7270 v = 5 −1 We can then rearrange the equation find voltage as a function of velocity:

oltage (velocity .7270) v = 15.0776 +1

This mathematical model tells us the voltage needed to achieve a certain desired airspeed in the wind tunnel. However, this is merely an approximation based on our data. Theoretically, an input voltage of zero should result in a velocity of zero, but our model does not support that. This knowledge, along with the interpretation of our velocity vs. voltage plots, leads us to believe the theoretical model should actually be as follows.

oltage (velocity) v = 51

Our data likely does not match this theoretical model due to inaccuracies in measurements and data, and the propagation of such inaccuracies through our calculations. These inaccuracies and their causes are detailed further in the following section.

V. Airspeed Measurement Uncertainty From the derived airspeed calculation, the uncertainty can be calculated. Using the direct measurements

found in the lab and their uncertainty, the airspeed uncertainty can be calculated. A general derivation equation is used which is as follows:

This states that the uncertainty in the velocity is equal to the square root of the sum of the partial of the

velocity equation with respect to the pressure change times the uncertainty in the pressure change squared and the partial derivative with respect to atmospheric pressure times the uncertainty in the atmospheric pressure squared and the partial with respect to atmospheric temperature time the uncertainty in the value squared. these values are calculated from the original velocity equation:

V =√2Δp( )patmRTatm

Calculating the partial derivatives with respect to each variable are as follows:

Δp δ = Tatm√R/2

ρatm√ ρatm

Δp Tatm T δ atm = Δp √R/2

ρatm√ ρatm

Δp Tatmρ δ atm = − T Δpatm √R/2

ρatm2√ ρatm

Δp Tatm

All of these values come together to calculate the uncertainty of the velocity at each point. The uncertainty

varies from .0001 to .0034. These values range with the different velocities and voltages. Taking the average of these velocities and uncertainties at the different voltages give us this result. The table below shows the average velocity with respect to voltage and its uncertainty. This data was from the Pitot­Static Probe.

5

University of Colorado at Boulder

Page 6: ASEN 2002 Lab 4 - Aerodynamics Lab 1

Voltage (V) Velocity (m/s) Uncertainty (m/s) Voltage (V) Velocity (m/s) Uncertainty (m/s)

0.5 1.5492 0.00011 5.5 25.2259 0.0018

1.0 3.9331 0.00028 6.0 28.5332 0.0020

1.5 5.9630 0.00042 6.5 31.2195 0.0022

2.0 8.2960 0.00058 7.0 34.6422 0.0024

2.5 10.6716 0.00075 7.5 36.5705 0.0026

3.0 13.5011 0.00095 8.0 39.0433 0.0027

3.5 15.6046 0.0011 8.5 41.8076 0.0029

4.0 18.2158 0.0013 9.0 44.5923 0.0031

4.5 20.6359 0.0014 9.5 46.5254 0..0033

5.0 23.9165 0.0017 10.0 48.9441 0.0034

The data in this table is from the manometer and is the same as the data above in the sense that it is the

voltage, velocity and the uncertainty involved.

Voltage (V) Velocity (m/s) Uncertainty (m/s)

0.5 2.9663 0.00021

2.5 27.9530 0.00196

4.5 40.3249 0.0028

6.5 50.3406 0.0035

8.5 59.9173 0.0042

The data gives us the same graph with the error bars taken into account. The average error is about 0.0018

but varies significantly.

6

University of Colorado at Boulder

Page 7: ASEN 2002 Lab 4 - Aerodynamics Lab 1

Figure 4. Velocity versus voltage uncertainty measurements

The largest source of error that happened was that the test section area in the wind tunnel was not sealed.

This caused a different pressure than intended for the lab to be measured. If the test section was sealed, the measurements could have been more accurate to calculate the accurate airspeed. There were random fluctuations associated with the measurements recorded that were caused due to the hardware used. There were manufacture error that could only be taken into consideration but not necessarily fixed during the experiment.

VI. Boundary Layer Influence To provide accurate data regarding the boundary layer at a specific point in the test section of the wind

tunnel, it is critical to first understand how the boundary layer develops across the length of the wind tunnel as well as provide an accurate measurement of its thickness at any given location to ensure that any model placed in the tunnel will not be affected by it. The equation used to determine the thickness of the boundary layer at the given test points is shown below:

@ V .95(V ) δ = y = 0 ∞ Where is the boundary layer thickness, is the the velocity of the air at the edge of the boundary layer, δ V

and is the approximate freestream velocity. Essentially, once the freestream velocity is determined, the velocity V ∞ of the air where the boundary layer ends is approximately equal to 95% of the calculated freestream velocity. A graph of the air velocity in the wind tunnel at our static port versus vertical displacement (shown below) gives a clear visualization of the thickness of the boundary layer and how the air velocity changes in relation to the freestream velocity towards the center of the tunnel.

7

University of Colorado at Boulder

Page 8: ASEN 2002 Lab 4 - Aerodynamics Lab 1

Figure 5. Vertical Displacement vs Velocity at Port 10.

It is important to note that this graph is representative of only our groups data at port 10, where our freestream velocity was approximately 22.9852±0.0034 m/s and the approximate thickness of the boundary layer (shown by the red star in figure 1) was measured to be 7.99 mm. How these values were determined for our group as well all of the groups combined is discussed in detail in the rest of this section.

To determine the thickness of the boundary layer as shown above is then a matter of determining at which point (in the y­direction) the retarded flow is equal to 95% of the free stream velocity. In our experiment, the boundary layer was measured at five different points along the test section. Each group took measurements at one static port, so there are two sets of measurements at each point. Each group also measured the free stream velocity above their specified static port. The boundary layer ports used in this this experiment were ports 7, 8, 9, 10 and 11 at 14.93in, 15.91 in, 16.89 in, 17.87 in and 18.85 in respectively. For our calculations, these distances were converted to meters.

To determine the speed at each point along the boundary, the ELD boundary layer probe was used to measure the differential pressure between the static and total pressures. This is the dynamic pressure inside of the wind tunnel. Using Bernoulli’s equation for incompressible, steady flow, and the equation of state, the following formula for velocity can be used:

V =√2Δp patm RTatm

To most accurately find the edge of the boundary layer at each static port, the two data sets from each static

port was combined into one data set and sorted. This was done because each group took measurements at different vertical locations. One group took measurements on the integer mm value, while the other group took measurements at the half mm values between integers (0, 0.5, 1.5 etc…). The velocities at every data point were then computed,

8

University of Colorado at Boulder

Page 9: ASEN 2002 Lab 4 - Aerodynamics Lab 1

and the point at which the velocity was greater than or equal to 95% of the free stream velocity was chosen as the boundary layer limit. The results for each static ports are shown in the figure below.

Figure 6. Experimental Boundary Layer Height vs Distance.

Boundary layer values [mm]:

Port 7 6.50mm Port 8 4.98mm Port 9 6.97mm Port 10 6.48mm Port 11 6.97mm

The next step was to compare our results to our theoretical predictions for the boundary layer. The boundary layer for laminar incompressible flow on a flat plane can be given by the equation below.

δ = 5.2x√Re x

The local Reynolds number, REx can is described as follows.

e R x = μρvx

Since the flow is incompressible, the density of air can be determined by applying the equation of state to the atmospheric temperature and and pressure measurements. Those results were averaged from each groups test data. The velocity used will be the free stream velocity (calculated using group 6&7 values). Plotting the analytical results against the experimental results resulted in the following:

9

University of Colorado at Boulder

Page 10: ASEN 2002 Lab 4 - Aerodynamics Lab 1

Figure 7. Boundary Layer Height vs Distance with analytical predictions.

The analytical prediction for the boundary layer (assuming laminar flow) was consistently 3.5 mm lower

than the experimental boundary layer findings, as shown by the previous figure. As expected the analytical turbulent boundary layer is significantly larger than the laminar boundary layer. The results from our data show the experimental boundary layer is in­between the two predicted results.

10

University of Colorado at Boulder

Page 11: ASEN 2002 Lab 4 - Aerodynamics Lab 1

The shortcomings of combining multiple groups data is that the test conditions for each data set were not equivalent. This can most clearly be seen by plotting the velocity vs vertical height from groups Three and Four.

Figure 8. Air velocity vs. height in test section.

Groups Three and Four both took measurements at static port 8, however on different days. Group 3 took

readings at the 0, 1, 2, 3,4….10 mm and group Four took readings as 0, 0.5, 1.5, 2.5….9.5 mm. Clearly from the graph, it can be seen that the velocity oscillations every half mm. This is because the two data sets are drastically different, one group’s measurements were significantly lower than the others. This error appears in the boundary layer limits figure above. The second data point is significantly lower than the other four data points. One possible explanation for this error is that one set of measurements was actually taken with respect to an incorrect static port, which resulted in the boundary layer appearing much lower than expected. Another method of analyzing the data would be to determine the boundary layer based off of each group’s findings. Then one could use linear extrapolation to find where the velocity reaches 95% of the free stream velocity. The findings between the two groups at each port could be averaged to determine the final boundary layer height. This would reduce the error created by having different testing conditions, as the values between those conditions would be averaged. However, this method has some drawbacks. Because the data is separated, the gap between data points is 1 mm, as opposed to 0.5 mm when combining both group’s data into one matrix.. A more consistent method would be to make sure that all data sets were taken under the same conditions and by the same members.

Another limitation caused by choosing the first data point with is that one stray velocity V = .95(V ) > 0 ∞ measurement can significantly alter the calculated boundary layer height. To ensure that the height calculated was not a stray value, the velocity data from each static port was linearized using the method of Least­Squares. This resulted in changes seen in the Figure 9.

11

University of Colorado at Boulder

Page 12: ASEN 2002 Lab 4 - Aerodynamics Lab 1

Figure 9. Boundary layer height with Linearized Experimental Data

Overall, the linearized data shows a higher boundary layer than the non­linearized data. This brings our estimate closer to turbulent flow than laminar flow.

VII. Conclusion Using two different differential pressure measurement configurations, it was found that there is a linear

relationship between voltage and velocity. Through analysis and interpretation of our plot of velocity versus voltage, we were able to predict that the velocity follows a mathematical model given by: velocity=5*voltage. Further analysis of the data revealed that our prediction was close to the model our data actually followed, which is the model given by: velocity=5.0776*voltage­1.7270. Deviation from the predicted model is most likely due to our biggest source of error, which was openings in the test section.

For the purposes of this lab, the preferred configuration for measuring pressure and calculating airspeed is the pitot­static probe. The pitot­static configuration is more accurate and it doesn’t require correction with the pressure loss coefficient. However, in the case of running tests on a body, such as an airfoil, the static­ring configuration would be preferred.This is because when testing a model, a pitot­static probe would need to be placed upstream of the model, causing a wake which could influence the model tests. A static­ring in this case would cause no wake and no influence on the testing of the model.

The boundary layer was found to be around 6.5­7.0 mm along from the experimental data. This falls directly between the laminar analytical boundary layer and the turbulent analytical boundary layer. This may seem to indicate that on this interval, the boundary layer is transitioning from laminar to turbulent flow. However, it is more likely that the flow is laminar, as slope of the boundary layer in the experimental data is much closer to the slope predicted by the laminar flow. The turbulent flow slope is much steeper. Overall, these findings indicate that the boundary layer only affects the airspeed within 7mm. To avoid the influence of the boundary layer, all tests done in the wind tunnel should take place at least 7mm away from the edges of the test section.

12 University of Colorado at Boulder

Page 13: ASEN 2002 Lab 4 - Aerodynamics Lab 1

Appendix Air Speed Calculation and Uncertainty % airspeed.m %% Housekeeping clear all; close all; clc; %% pitot static probe data [ DATA_MAT ] = ImportVelVolt; p_atm = DATA_MAT(:,7); T_atm = DATA_MAT(:,2); delta_p_airspeed = DATA_MAT(:,3); delta_p_aux = DATA_MAT(:,4); voltage = DATA_MAT(:,1); p_atm_avg = mean(p_atm); T_atm_avg = mean(T_atm); % by voltage % calculate velocity R = 287; density = p_atm_avg /(R * T_atm_avg); velocity = sqrt(2 * delta_p_airspeed ./ density); % plot data figure(1) plot(voltage,velocity,'b'); hold on xlabel('Voltage (V)','FontSize',14,'FontName','TimesNewRoman'); ylabel('Velocity (m/s)','FontSize',14,'FontName','TimesNewRoman'); set(gca,'FontSize',12,'FontName','TimesNewRoman'); title('Velocity Vs. Voltagee','FontSize',16,'FontName','TimesNewRoman'); %% water monometer data man = xlsread('WaterMonometerData','A2:C6'); voltage_man = man(:,1); h1 = man(:,2); h2 = man(:,3); delta_h = (h2­h1).*0.0254; % [m] g = 9.807; % Accel due to gravity [m/s2] SG = 0.826; % Specific gravity given in lab doc [unitless] rhoSubstance = SG*1000; % SG multiplied by density of water to find density of substance [kg/m3] % I referenced section 2­8 and Example 2­3 in Cengel for this % Ps = p_atm_avg + rhoSubstance*g*delta_h % delta_p_mon = p_atm_avg­Ps = p_atm_avg­(p_atm_avg+rhoSubstance*g*delta_h) % ==> delta_p_mon = rhoSubstance*g*delta_h delta_p_man = rhoSubstance*g.*delta_h; % [Pa] % delta_p_mon = w * delta_h; velocity_man = sqrt(2 * delta_p_man ./ density); plot(voltage_man, velocity_man,'k'); legend('Pitot­Static Probe','Manometer','Location','SouthEast'); % Average the airspeed differential pressure into a vector of the same size % as the manometer data. Allows for subtraction of vectors delta_p_airspeed2(1,1) = mean(delta_p_airspeed(1:length(delta_p_airspeed)/5,1)); delta_p_airspeed2(2,1) = mean(delta_p_airspeed((length(delta_p_airspeed)/5)+1:2*length(delta_p_airspeed)/5,1)); delta_p_airspeed2(3,1) = mean(delta_p_airspeed((2*length(delta_p_airspeed)/5)+1:3*length(delta_p_airspeed)/5,1)); delta_p_airspeed2(4,1) = mean(delta_p_airspeed((3*length(delta_p_airspeed)/5)+1:4*length(delta_p_airspeed)/5,1)); delta_p_airspeed2(5,1) = mean(delta_p_airspeed((4*length(delta_p_airspeed)/5)+1:5*length(delta_p_airspeed)/5,1)); velocity2 = sqrt(2 * delta_p_airspeed2 ./ density); % Calculate and plot pressure loss coeff, k k = delta_p_mon­delta_p_airspeed2;

13

University of Colorado at Boulder

Page 14: ASEN 2002 Lab 4 - Aerodynamics Lab 1

figure(2) plot(velocity_mon,k) xlabel('Velocity (m/s)','FontSize',16,'FontName','TimesNewRoman') ylabel('Pressure Loss Coefficient, k','FontSize',16,'FontName','TimesNewRoman') title('Pressure Loss Coefficient vs. Velocity') set(gca,'FontSize',12,'FontName','TimesNewRoman') % Apply k to manometer delta_p_mon2 = delta_p_mon ­ k; velocity_mon2 = sqrt(2 * delta_p_mon2 ./ density); figure(3) plot(voltage_mon,velocity_mon2,'k') hold on plot(voltage,velocity,'b') xlabel('Voltage (V)','FontSize',16,'FontName','TimesNewRoman') ylabel('Velocity (m/s)','FontSize',16,'FontName','TimesNewRoman') title('Velocity vs. Voltage with Pressure Loss Coefficient Correction') legend('Manometer','Pitot­Static Probe','Location','northwest') set(gca,'FontSize',12,'FontName','TimesNewRoman') hold off % Least Squares approximation for airspeed model y = velocity; A = [voltage ones(length(voltage),1)]; Pls = inv(A'*A)*A'*y; % Pls(1) is our slope and Pls(2) is our y intercept Ypred = @(x) Pls(1)*x+Pls(2); %% Uncertainty syms deltaP Patm1 Tatm1 v1 = sqrt((2*deltaP))/((Patm1/(R*Tatm1))); dvdP= diff( v1,deltaP); dvdPatm = diff(v1, Patm1); dvdTatm = diff(v1, Tatm1); ddeltaP = 0.01*deltaP; dPatm= 0.015*Patm1; dTatm = 0.015*Tatm1; dv = sqrt(( dvdP*ddeltaP)2+(dvdPatm*dPatm)2+(dvdTatm*dTatm)2); dv_val = zeros(length(p_atm),1); for i = 1: length(p_atm) dv_val(i)= vpa(subs(dv,[deltaP,Patm1,Tatm1],[delta_p_airspeed(i),p_atm_avg,T_atm_avg])); end dv_val = double(dv_val); dv_avg = mean(dv_val); %airspeed velocity uncertainty errorbar(voltage,velocity,dv_val,'b'); dv_man = zeros(length(delta_p_man),1); for i = 1:length(delta_p_man) dv_man(i)= vpa(subs(dv,[deltaP,Patm1,Tatm1],[delta_p_man(i),p_atm_avg,T_atm_avg])); end errorbar(voltage_man,velocity_man,dv_man,'k'); %% by voltage averages j = 1; for i = .5:.5:10 mat(j,1) = i; values = find(voltage == i); mat(j,2) = mean(velocity(values(1):values(end))); mat(j,3) = mean(dv_val(values(1):values(end))); j = j + 1; end

14

University of Colorado at Boulder

Page 15: ASEN 2002 Lab 4 - Aerodynamics Lab 1

mat2(:,1) = voltage_man; mat2(:,2) = velocity_man; mat2(:,3) =dv_man; Boundary Layer Influence %Code by Mthew McKerman and Alex Swindell %Last Modified 11/17/15 %Project: ASEN 2002 Aero Lab #1 %Purpose: analyze the boundary layer for the ITLL wind tunnel. clear; clc; clear all; close all; [ Pair1,Pair2,Pair3,Pair4,Pair5 ] = BoundImportPairs(); % Clears workspace and all open windows %Data is: % 1 ELD probe Y axis [mm] % 2 Atmospheric Temperature [K] % 3 Airspeed Differential Pressure [Pa] % 4 Aux Differential Pressure [Pa] % 5 ELD Probe x axis [mm] % 6 Atmosphereic Pressure [Pa] % 7 Voltage [V] R = 287; % Pair 1 P_atm = Pair1(:,6); T_atm = Pair1(:,2); P0 = Pair1(:,3); q = Pair1(:,4); Y = Pair1(:,1); U_Pair1= []; for i = 1:length(P_atm)

U_Pair1(i) = sqrt(2*q(i)*((R*T_atm(i))/P_atm(i))); end %LS extrapolation: A = [Y(1:440)'; ones(1,length(Y(1:440)))].'; LS1 = inv(A'*A)*A'*U_Pair1(1:440)'; Pair1Extrapolation = LS1(2) + LS1(1)*Y(1:440); figure(5) plot(Pair1Extrapolation(1:440),Y(1:440)) hold on; plot(U_Pair1(1:440),Y(1:440)) hold off; U_freestream_Pair1 = sum(U_Pair1(441:length(U_Pair1)))/(length(U_Pair1)­440); U_BL_edge_Pair1 = 0.95*U_freestream_Pair1; for i =1:length(U_Pair1)

if U_Pair1(i) >= U_BL_edge_Pair1 BL_index_Pair1 = i; break

end end for i =1:length(U_Pair1)

if Pair1Extrapolation(i) >= U_BL_edge_Pair1 BL_lineind1 = i; break

end

15

University of Colorado at Boulder

Page 16: ASEN 2002 Lab 4 - Aerodynamics Lab 1

end BL_pair1_line = Y(BL_lineind1) BL_height_Pair1 = Y(BL_index_Pair1); % Pair 2 P_atm = Pair2(:,6); T_atm = Pair2(:,2); P0 = Pair2(:,3); q = Pair2(:,4); Y = Pair2(:,1); U_Pair2= []; for i = 1:length(P_atm)

U_Pair2(i) = sqrt(2*q(i)*((R*T_atm(i))/P_atm(i))); end %LS extrapolation: A = [Y(1:440)'; ones(1,length(Y(1:440)))].'; LS1 = inv(A'*A)*A'*U_Pair2(1:440)'; Pair2Extrapolation = LS1(2) + LS1(1)*Y(1:440); figure(6) plot(Pair2Extrapolation(1:440),Y(1:440)) hold on; plot(U_Pair2(1:440),Y(1:440)) U_freestream_Pair2 = sum(U_Pair2(441:length(U_Pair2)))/(length(U_Pair2)­440); U_BL_edge_Pair2 = 0.95*U_freestream_Pair2; for i =1:length(U_Pair2)

if U_Pair2(i) >= U_BL_edge_Pair2 BL_index_Pair2 = i; break

end end for i =1:length(U_Pair2)

if Pair2Extrapolation(i) >= U_BL_edge_Pair2 BL_lineind2 = i; break

end end BL_pair2_line = Y(BL_lineind2) BL_height_Pair2 = Y(BL_index_Pair2); % Pair 3 P_atm = Pair3(:,6); T_atm = Pair3(:,2); P0 = Pair3(:,3); q = Pair3(:,4); Y = Pair3(:,1); U_Pair3= []; for i = 1:length(P_atm)

U_Pair3(i) = sqrt(2*q(i)*((R*T_atm(i))/P_atm(i))); end %LS extrapolation: A = [Y(1:440)'; ones(1,length(Y(1:440)))].'; LS1 = inv(A'*A)*A'*U_Pair3(1:440)'; Pair3Extrapolation = LS1(2) + LS1(1)*Y(1:440); figure(7) plot(Pair3Extrapolation(1:440),Y(1:440))

16

University of Colorado at Boulder

Page 17: ASEN 2002 Lab 4 - Aerodynamics Lab 1

hold on; plot(U_Pair3(1:440),Y(1:440)) U_freestream_Pair3 = sum(U_Pair3(441:length(U_Pair3)))/(length(U_Pair3)­440); U_BL_edge_Pair3 = 0.95*U_freestream_Pair3; for i =1:length(U_Pair3)

if U_Pair3(i) >= U_BL_edge_Pair3 BL_index_Pair3 = i; break

end end for i =1:length(U_Pair3)

if Pair3Extrapolation(i) >= U_BL_edge_Pair3 BL_lineind3= i; break

end end BL_pair3_line = Y(BL_lineind3) BL_height_Pair3 = Y(BL_index_Pair3); % Pair 4 P_atm = Pair4(:,6); T_atm = Pair4(:,2); P0 = Pair4(:,3); q = Pair4(:,4); Y = Pair4(:,1); U_Pair4= []; for i = 1:length(P_atm)

U_Pair4(i) = sqrt(2*q(i)*((R*T_atm(i))/P_atm(i))); end %LS extrapolation: A = [Y(1:440)'; ones(1,length(Y(1:440)))].'; LS1 = inv(A'*A)*A'*U_Pair4(1:440)'; Pair4Extrapolation = LS1(2) + LS1(1)*Y(1:440); figure(7) plot(Pair4Extrapolation(1:440),Y(1:440)) hold on; plot(U_Pair4(1:440),Y(1:440)) U_freestream_Pair4 = sum(U_Pair4(441:length(U_Pair4)))/(length(U_Pair4)­440); U_BL_edge_Pair4 = 0.95*U_freestream_Pair4; for i =1:length(U_Pair4)

if U_Pair4(i) >= U_BL_edge_Pair4 BL_index_Pair4 = i; break

end end for i =1:length(U_Pair4)

if Pair4Extrapolation(i) >= U_BL_edge_Pair4 BL_lineind4= i; break

end end BL_pair4_line = Y(BL_lineind4) BL_height_Pair4 = Y(BL_index_Pair4); % Pair 5 P_atm = Pair5(:,6);

17

University of Colorado at Boulder

Page 18: ASEN 2002 Lab 4 - Aerodynamics Lab 1

T_atm = Pair5(:,2); P0 = Pair5(:,3); q = Pair5(:,4); Y = Pair5(:,1); U_Pair5= []; for i = 1:length(P_atm)

U_Pair5(i) = sqrt(2*q(i)*((R*T_atm(i))/P_atm(i))); end %LS extrapolation: A = [Y(1:440)'; ones(1,length(Y(1:440)))].'; LS1 = inv(A'*A)*A'*U_Pair5(1:440)'; Pair5Extrapolation = LS1(2) + LS1(1)*Y(1:440); figure(7) plot(Pair5Extrapolation(1:440),Y(1:440)) hold on; plot(U_Pair5(1:440),Y(1:440)) U_freestream_Pair5 = sum(U_Pair5(441:length(U_Pair5)))/(length(U_Pair5)­440); U_BL_edge_Pair5 = 0.95*U_freestream_Pair5; for i =1:length(U_Pair5)

if U_Pair5(i) >= U_BL_edge_Pair5 BL_index_Pair5 = i; break

end end for i =1:length(U_Pair5)

if Pair5Extrapolation(i) >= U_BL_edge_Pair5 BL_lineind5= i; break

end end BL_pair5_line = Y(BL_lineind5) BL_height_Pair5 = Y(BL_index_Pair5); BL_height_all_pairs = [BL_height_Pair1 BL_height_Pair2 BL_height_Pair3 BL_height_Pair4 BL_height_Pair5] portsIN =[9.05, 10.03, 11.01, 11.99, 12.97, 13.95, 14.93, 15.91, 16.89, 17.87, 18.85]; ports_m = .0254*portsIN; mu = 1.7897*(10­5); rho = [];

for i = 441:480 rho(i­440) = 287*Pair3(i,2)/(Pair3(i,6)); end

rho_avg = sum(rho)/length(rho); Rex = []; for i = 1:length(ports_m) Rex(i) = (U_freestream_Pair3*rho_avg/mu)*ports_m(i); end sigma = []; for i = 1:length(Rex)

sigma(i)= 5.2*ports_m(i)/sqrt(Rex(i)); end sigma_mm = 1000*sigma; sigmaT = [];

18

University of Colorado at Boulder

Page 19: ASEN 2002 Lab 4 - Aerodynamics Lab 1

for i = 1:length(Rex) sigmaT(i)= .37*ports_m(i)/((Rex(i)).2);

end sigmaT_mm = 1000*sigmaT; BL_all_line =[BL_pair1_line,BL_pair2_line,BL_pair3_line,BL_pair4_line,BL_pair5_line]; % figure(1) % plot(ports_m(7:11), BL_height_all_pairs); % hold on; % plot(ports_m(7:11), sigma_mm(7:11)) % title('Boundary Layer Limits','FontSize',16,'FontName','TimesNewRoman'); % xlabel('Port Locations [m]','FontSize',16,'FontName','TimesNewRoman'); % ylabel('Boundary layer height [mm]','FontSize',16,'FontName','TimesNewRoman'); % axis([ports_m(7) ports_m(11) 0 8]) % legend('Experimental Boundary Layer','Analytical Boundary Layer','Location','southeast'); % figure(2) plot(ports_m(7:11), BL_height_all_pairs); hold on; plot(ports_m(7:11), sigmaT_mm(7:11)) hold on; plot(ports_m(7:11), sigma_mm(7:11)) hold on; plot(ports_m(7:11), BL_all_line); title('Linearized Boundary Comparison','FontSize',16,'FontName','TimesNewRoman'); xlabel('Port Locations [m]','FontSize',16,'FontName','TimesNewRoman'); ylabel('Boundary layer height [mm]','FontSize',16,'FontName','TimesNewRoman'); axis([ports_m(7) ports_m(11) 0 15]) legend('Experimental Boundary Layer','Analytical Turbulant Boundary Layer','Analytical Laminar Boundary Layer','Linearized Experimental Boundar Layer','Location','southeast'); figure(3) plot(Pair1(1:440,1),U_Pair1(1:440)) hold on; plot(Pair2(1:440,1),U_Pair2(1:440)) hold on; plot(Pair3(1:440,1),U_Pair3(1:440)) hold on; plot(Pair4(1:440,1),U_Pair4(1:440)) hold on; plot(Pair5(1:440,1),U_Pair5(1:440)) hold on; % plot(xlim, [1 1]*U_BL_edge_Pair1, '­b') % hold on; % plot(xlim, [1 1]*U_BL_edge_Pair2, '­r') % hold on; % plot(xlim, [1 1]*U_BL_edge_Pair3, '­y') % hold on; % plot(xlim, [1 1]*U_BL_edge_Pair4, '­m') % hold on; % plot(xlim, [1 1]*U_BL_edge_Pair5, '­g') % legend('Pair1','Pair2','Pair3','Pair4','Pair5','Pair1Limit','Pair2Limit','Pair3Limit','Pair4Limit','Pair5Limit','Location','southeast') legend('Pair1','Pair2','Pair3','Pair4','Pair5','Location','southeast') % % % figure(4) % plot(Pair2(1:440,1),U_Pair2(1:440)) % title('Velocity Versus Displacement: Pair 2','FontSize',16,'FontName','TimesNewRoman') % xlabel('Probe height [mm]','FontSize',16,'FontName','TimesNewRoman') % ylabel('Calculated Velocity [m/s]','FontSize',16,'FontName','TimesNewRoman')

19

University of Colorado at Boulder

Page 20: ASEN 2002 Lab 4 - Aerodynamics Lab 1

%This code reads in all boundary layer data from all groups in lab section %011 function [ Pair1,Pair2,Pair3,Pair4,Pair5 ] = BoundImport( ) G1 = xlsread('BoundaryLayer_S011_G01.csv','A2:G241'); G2 = xlsread('BoundaryLayer_S011_G02.csv','A2:G241'); G3 = xlsread('BoundaryLayer_S011_G03.csv','A2:G241'); G4 = xlsread('BoundaryLayer_S011_G04.csv','A2:G241'); G5 = xlsread('BoundaryLayer_S011_G05.csv','A2:G241'); G6 = xlsread('BoundaryLayer_S011_G06.csv','A2:G241'); G7 = xlsread('BoundaryLayer_S011_G07.csv','A2:G241'); G8 = xlsread('BoundaryLayer_S011_G08.csv','A2:G241'); G9 = xlsread('BoundaryLayer_S011_G09.csv','A2:G241'); G10 = xlsread('BoundaryLayer_S011_G10.csv','A2:G241'); Pair1 = [G1;G2]; Temp = Pair1(:,1); Pair1(:,1)=Pair1(:,6); AllData(:,6)=Temp; Pair1 = sortrows(Pair1); Pair2 = [G3;G4]; Temp = Pair2(:,1); Pair2(:,1)=Pair2(:,6); Pair2(:,6)=Temp; Pair2 = sortrows(Pair2); Pair3 = [G5;G6]; Temp = Pair3(:,1); Pair3(:,1)=Pair3(:,6); Pair3(:,6)=Temp; Pair3 = sortrows(Pair3); Pair4 = [G7;G8]; Temp = Pair4(:,1); Pair4(:,1)=Pair4(:,6); Pair4(:,6)=Temp; Pair4 = sortrows(Pair4); Pair5 = [G9;G10]; Temp = Pair5(:,1); Pair5(:,1)=Pair5(:,6); Pair5(:,6)=Temp; Pair5 = sortrows(Pair5); %Data is: %ELD probe Y axis [mm] %Atmospheric Temperature [K] %Airspeed Differential Pressure [Pa] %Aux Differential Pressure [Pa] %ELD Probe x axis [mm] %Atmosphereic Pressure [Pa] %Voltage [V] end function [ SortedData ] = ImportVelVolt( ) %This code reads in all "Velocity Voltage" data from section 011, and sorts

20

University of Colorado at Boulder

Page 21: ASEN 2002 Lab 4 - Aerodynamics Lab 1

%it by voltage level. %Colomns are as follows: %Atmosphereic Pressure [Pa] %Atmospheric Temperature [K] %Airspeed Differential Pressure [Pa] %Aux Differential Pressure [Pa] %ELD Probe x axis %ELD probe Y axis %Voltage G1 = xlsread('VelocityVoltage_S011_G01.csv','A2:G101') G2 = xlsread('VelocityVoltage_S011_G02.csv','A2:G101') G3 = xlsread('VelocityVoltage_S011_G03.csv','A2:G101') G4 = xlsread('VelocityVoltage_S011_G04.csv','A2:G101') G5 = xlsread('VelocityVoltage_S011_G05.csv','A2:G101') G6 = xlsread('VelocityVoltage_S011_G06.csv','A2:G101') G7 = xlsread('VelocityVoltage_S011_G07.csv','A2:G101') G8 = xlsread('VelocityVoltage_S011_G08.csv','A2:G101') G9 = xlsread('VelocityVoltage_S011_G09.csv','A2:G101') G10 = xlsread('VelocityVoltage_S011_G10.csv','A2:G101') AllData = [G1; G2; G3; G4; G5; G6; G7; G8; G9; G10;]; Temp = AllData(:,1); AllData(:,1)=AllData(:,7); AllData(:,7)=Temp; %Data is as Follows: %Voltage %Atmospheric Temperature [K] %Airspeed Differential Pressure [Pa] %Aux Differential Pressure [Pa] %ELD Probe x axis %ELD probe Y axis %Atmosphereic Pressure [Pa] SortedData = sortrows(AllData); end This code is to plot the graphs vertical displacement and voltage. clear all close all % Clears workspace and all open windows filename = 'BoundaryLayerRefrence_5V_XLoc­PitotStaticProbe.xls'; BL_Reference = xlsread(filename); % Reads the excel file P_atm = xlsread(filename,'A:A'); P_atm = P_atm'; T_atm = xlsread(filename,'B:B'); T_atm = T_atm'; P0 = xlsread(filename,'C:C'); P0 = P0'; q = xlsread(filename,'D:D'); q = q'; Y = xlsread(filename,'F:F'); Y = Y'; R = 287; U = []; for i = 1:length(P_atm) U(i) = sqrt(2*q(i)*((R*T_atm(i))/P_atm(i))); end

21

University of Colorado at Boulder

Page 22: ASEN 2002 Lab 4 - Aerodynamics Lab 1

figure(1) plot(Y(1:420),U(1:420)) xlabel('Vertical Displacement (Y)') ylabel('Velocity (U)') title('Vertical Displacement vs Velocity') %%%% Boundary layer calculation at port 10 (our data) %%%% %%%% Y vs U graph for our data %%%% clear all close all % Clears workspace and all open windows filename = 'BoundaryLayer_S011_G07.csv'; BL_Reference = xlsread(filename); % Reads the excel file P_atm = xlsread(filename,'A:A'); P_atm = P_atm'; T_atm = xlsread(filename,'B:B'); T_atm = T_atm'; P0 = xlsread(filename,'C:C'); P0 = P0'; q = xlsread(filename,'D:D'); q = q'; Y = xlsread(filename,'F:F'); Y = Y'; R = 287; U = []; % Function for velocity for i = 1:length(P_atm)

U(i) = sqrt(2*q(i)*((R*T_atm(i))/P_atm(i))); end % averaging the freestream velocities U_freestream = sum(U(222:length(U)))/(length(U)­221); % Calculating the velocity at the edge of the boundary layer U_BL_edge = 0.95*U_freestream; % Finding the height at which this velocity occurs for i =1:length(U)

if U(i) >= U_BL_edge BL_index = i; break

end end BL_height = Y(BL_index); % Plotting the data figure(1) plot(U(1:221),Y(1:221)) ylabel('Vertical Displacement (Y) in mm','FontSize',16,'FontName','TimesNewRoman') xlabel('Velocity (U) in m/s','FontSize',16,'FontName','TimesNewRoman') title('Vertical Displacement vs Velocity','FontSize',16,'FontName','TimesNewRoman') set(gca,'FontSize',12,'FontName','TimesNewRoman'); hold on plot(U_BL_edge,BL_height,'r*') legend('Y vs U','Edge of Boundary Layer') fprintf('The height of the boundary layer is %0.4fmm\n',BL_height)

22

University of Colorado at Boulder