ME80_HW5_Solution_F19.pdf - 5 MATLAB To run code download both the M file and the “AluminumTestData.csv” file from Coursework and put them in the

ME80_HW5_Solution_F19.pdf - 5 MATLAB To run code download...

This preview shows page 1 - 10 out of 10 pages.

Image of page 1
Image of page 2
Image of page 3
Image of page 4
Image of page 5
Image of page 6
Image of page 7
MATLAB: To run code, download both the M file and the AluminumTestData.csv file from Coursework and put them in the same folder. clear all close all clc % Sample length is gauge length in meters L1 = 0.09764; L2 = 0.09771; L3 = 0.051308; L4 = 0.09741; % Sample radii in meters R1 = 0.01265/2; R2outer = 0.01265/2; R2inner = 0.01003/2; R3outer = 0.01308/2; R3inner = 0.01005/2; R4outer = 0.01516/2; R4inner = 0.01001/2; % Calculate J for each sample J1 = pi/2*R1^4; J2 = pi/2*(R2outer^4 - R2inner^4); J3 = pi/2*(R3outer^4 - R3inner^4); J4 = pi/2*(R4outer^4 - R4inner^4); % Read in the torque vectors from the .csv file T1 = csvread( 'AluminumTestData.csv' ,0,0,[0,0,2,0]); T2 = csvread( 'AluminumTestData.csv' ,0,2,[0,2,19,2]); T3 = csvread( 'AluminumTestData.csv' ,0,4,[0,4,11,4]); T4 = csvread( 'AluminumTestData.csv' ,0,6,[0,6,17,6]); % Tead in the rotation vectors from the .csv file Phi1 = csvread( 'AluminumTestData.csv' ,0,1,[0,1,2,1]); Phi2 = csvread( 'AluminumTestData.csv' ,0,3,[0,3,19,3]); Phi3 = csvread( 'AluminumTestData.csv' ,0,5,[0,5,11,5]); Phi4 = csvread( 'AluminumTestData.csv' ,0,7,[0,7,17,7]); % Plot the torque vs rotation for all the samples
Image of page 8
Image of page 9
Image of page 10

You've reached the end of your free preview.

Want to read all 10 pages?

Unformatted text preview: figure plot(Phi1, T1, Phi2, T2, Phi3, T3, Phi4, T4); xlabel( 'Rotation (Radians)' ) ylabel( 'Torque (Nm)' ) title( 'Torque vs Rotation in Aluminum Samples' ); % Calculate the Max Shear stress in each sample Tau1 = T1*R1/J1; Tau2 = T2*R2outer/J2; Tau3 = T3*R3outer/J3; Tau4 = T4*R4outer/J4; % Calculate the Shear Strain in each sample Gamma1 = Phi1*R1/L1; Gamma2 = Phi2*R2outer/L2; Gamma3 = Phi3*R3outer/L3; Gamma4 = Phi4*R4outer/L4; figure plot(Gamma1, Tau1, Gamma2, Tau2, Gamma3, Tau3, Gamma4, Tau4) xlabel( 'Shear Strain' ); ylabel( 'Shear Stress (Pa)' ); title( 'Shear Stress vs Shear Strain in Aluminum Samples' ); % Calculate the modulus of rigidity by finding the slope of the Gamma-Tau % curve Line1 = polyfit(Gamma1, Tau1, 1); G1 = Line1(1); Line2 = polyfit(Gamma2, Tau2, 1); G2 = Line2(1); Line3 = polyfit(Gamma3, Tau3, 1); G3 = Line3(1); Line4 = polyfit(Gamma4, Tau4, 1); G4 = Line4(1); G = mean([G1, G2, G3, G4]) % The mean value of G is about 23.86 GPa StdDevG = std([G1, G2, G3, G4]) % The standard deviation is about 3.32 GPa...
View Full Document

  • Spring '08
  • Levenston,M

What students are saying

  • Left Quote Icon

    As a current student on this bumpy collegiate pathway, I stumbled upon Course Hero, where I can find study resources for nearly all my courses, get online help from tutors 24/7, and even share my old projects, papers, and lecture notes with other students.

    Student Picture

    Kiran Temple University Fox School of Business ‘17, Course Hero Intern

  • Left Quote Icon

    I cannot even describe how much Course Hero helped me this summer. It’s truly become something I can always rely on and help me. In the end, I was not only able to survive summer classes, but I was able to thrive thanks to Course Hero.

    Student Picture

    Dana University of Pennsylvania ‘17, Course Hero Intern

  • Left Quote Icon

    The ability to access any university’s resources through Course Hero proved invaluable in my case. I was behind on Tulane coursework and actually used UCLA’s materials to help me move forward and get everything together on time.

    Student Picture

    Jill Tulane University ‘16, Course Hero Intern

Ask Expert Tutors You can ask You can ask ( soon) You can ask (will expire )
Answers in as fast as 15 minutes