After spending some more time on this i've used 'for loops' to vary the defect depth but the result is messy..... Is there a better way than this?
% ANALYTICAL MODELS FOR PIPE BURST PRESSURE DUE TO SINGLE CORROSION
clc, close all, clear all
UTS=530; % Ultimate tensile strength ,MPa
sigma_y=448; % Yield strength, MPa
sigma_f= 1.1*sigma_y; % effective stress in MPa
n=10; % strain hardening as a %
t=16.8; % thickness, mm
D=558.8; % outer diamter, mm
L=(0:1:20); % defect length, mm
%d=(0:0.798:15.96); % defect depth, mm
w=0.1; % defect width, mm
% DNV Method
rootDt=sqrt(558.8*16.8);
Q=sqrt(1+(0.31.*(L/rootDt).^2)); % length correction factor
for d=0:0.798:15.96
Pb_DNV=(2*UTS*t/(D-t)).*((1-(d./t))./(1-(d./(t.*Q)))); % burst pressure with DNV Method
end
% Pipeline Corrosion Criterion (PCORRC) Evaluating Method
for d=0:0.798:15.96
Pb_PCORRC=(2*UTS*t/D).*(1-((d./t).*(1-(exp(-0.157*(L./sqrt(279.4.*(t-d))))))));
end