Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

I need it in matlab form please ome Tools Project No. 4-Enalproiect [10% of Fina

ID: 2088836 • Letter: I

Question

I need it in matlab form please

ome Tools Project No. 4-Enalproiect [10% of Final Grade) Due Thursday, July 12 before the Final Exam 13:00-5:00 PM Problem Adapted from Problem 8.31] The yield strength, a, of many metals depends on the size of the grains. For these metals the relationship between the yield stress and the average grain diameter, d, can be modeled by the Hall-Petch equation The data file "project04 of average grain diameter and yield stress. Use the worksheet that corresponds to yaur a) Using curve fitting, determine the constants "and "K in the Hall-Petch equation for this material. Make a plot that shows the data points with circle markers and the Hall-Petch equation with a solid line. b) Use inear interzoiation to determine the yield stress of material with the following grain sizes, in mm, and print the results in a table format along with the stresses predicted by the Hal-Petch constants found in (a). d [0.005, 0.01, D.02, 0.03, 0.05, 0.10] c) Make a plot that shows the data points with circle markers, the Hall-Petch equation with a solid line, and the results in the table found in (b) with squares d) Use cubic internolatian to determine the yield stress of material with grain sizes as specified in (b), Make a plot that shows tha results along with the data, Hall-Petch equation, and the linear interpolation results e) What conclusions can you draw from these results?

Explanation / Answer

Y = [207.79, 155.43, 130.98, 100.97, 92.90, 77.13, 66.82, 63.97]' ;
d = [0.005, 0.009,.016, 0.025, 0.040, 0.062, 0.085, 0.110]' ;
%%%%%%%%%%%%% PART a %%%%%%%%%%
%Linear Model with Nonpolynomial Terms
sigma = [ones(size(d)) d.^(-0.5)] ; % Form the design matrix.
a = sigmaY ; % Calculate equation coefficients.
sigma_o = a(1,1) ;   
k = a(2,1) ;
syms d1 % create a variable for grain size
f(d1) = sigma_o + k*(d1^(-0.5)) ; % generate Hall Petch equation
% Plot the data
figure ; % Open the plot
plot(d,Y,'o') ; % plot the given data with circular markers
hold on ;
fplot(f) ; % plot the Hall Petch equation
hold on ;
%%%%%%%%%%%%% Part b %%%%%%%%%%
data_from_part_b = [ 0.005, 0.01, 0.02, 0.03, 0.05, 0.10]' ;   
Stress_linear_interpolation = interp1q(d,Y, data_from_part_b) ; % Stress values using Linear Interpolation method through interp1q function
Stress_Hall_petch = sigma_o + k*(data_from_part_b.^(-0.5)) ; % Stress values from Hall Petch equation

tab = table(data_from_part_b, Stress_linear_interpolation, Stress_Hall_petch) ; % generate a table to display data
%%%%%%%%%%%% PART c %%%%%%%%%%
plot(data_from_part_b, Stress_linear_interpolation, 'square') ; % Continue the plot by showing Linear Interpilation data with square markers
hold on ;
%%%%%%%%%%%% PART D %%%%%%%%%%
Stress_Cubic_Interpoation = spline(d, Y, data_from_part_b) ; % Stress values using cubic Interpolation method through spline function
plot(data_from_part_b, Stress_Cubic_Interpoation, '*' ) ; % Continue the plot by showing Linear Interpilation data with * markers

% Add the plot properties
title('Different Interpolation Methods') ;
xlabel('d (mm)') ;   
ylabel('Y, (MPa)') ;

%%%%%%%%%%% PART e %%%%%%%%%
% As we can see in the plot that the cubic interpolation gives more
% accurate results as compared to linear interpolation. The stress values
% in case of cubic interpolation converges more towards the Hall Petch
% equation.