Download as txt, pdf, or txt
Download as txt, pdf, or txt
You are on page 1of 1

% Define material properties

K_Ic = 30; % Fracture toughness


C = 1e-11; % Paris law constant C
m = 3; % Paris law exponent m

% Initial crack length


a_0 = 1;

% Define loading conditions (stress range)


delta_sigma = 10; % Stress range

% Number of cycles
n_cycles = 100;

% Initialize arrays to store crack length and cycles


a = zeros(1, n_cycles);
N = zeros(1, n_cycles);

% Paris law for crack growth


for i = 1:n_cycles
da = C * (delta_sigma / K_Ic)^m;
a(i+1) = a(i) + da;
N(i+1) = N(i) + 1;
end

% Plot the crack growth curve


plot(N, a, 'b.-');
xlabel('Number of cycles (N)');
ylabel('Crack length (a)');
title('Crack Growth Simulation');
grid on;

% Calculate the total crack growth


total_crack_growth = sum(a);

fprintf('Total crack growth: %.2f mm\n', total_crack_growth);

You might also like