The stress intensity factor K at a crack in a beam exposed to pure M bending M i
ID: 3666339 • Letter: T
Question
The stress intensity factor K at a crack in a beam exposed to pure M bending M is given by: is a parameter that depends on the geometry of the specimen and crack. For the case of pure bending, Write a program in a script file that calculates the stress intensity factor K. The program should read the values of M, b, t, and a from an ascii text file using the load command. The output should be in the form of a paragraph combining text and numbers,- i.e., something like: "The stress intensity factor for a beam that is 0.25 m wide and 0.01 m thick with an edge crack of 0.05 m and an applied moment of 20 N-m is XX Pa-sqrt(m)." where XX stands for the value of K. Use the program to calculate K when M = 20 N-m, b = 0.25 m, i = 0.01 m, and a = 0.05 m.Explanation / Answer
Save this as k.m
function K = k(M,b,t,a)
alpha = (a/b);
beta = (pi*alpha)/2;
sigma = (6*M)/(t*b^2);
C = sqrt(tan(beta)/beta) * ((0.923 + 0.199 * (1 - sin(beta))^2)/(cos(beta)));
K = C * sigma * sqrt(pi * a);
%############################################################################
load('values.txt');
M = values(:,1);
b = values(:,2);
t = values(:,3);
a = values(:,4);
K = feval(@k,M,b,t,a);
s = sprintf('The stress intensity factor for a beam that is %.2f m wide and %.2f m thick with an edge crack of %.2f m and an applied moment of %.2f N-m is %.2f Pa-sqrt(m).',b,t,a,M,K);
disp(s);
%#################################################################################
create a text file with name as 'values.txt' and write 20 0.25 0.01 0.05 in first line.
Related Questions
drjack9650@gmail.com
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.