% This script calculates the calibration matrix entries for two cracks of
% length cl1 and cl2, at angles theta1 and theta2 respectively, placed in a
% wedge of angle 2*alpha. The entries a, b, c, d, e, f, g, and h are
% the matrix entries. The numerical value may differ from those published
% if different parameter values are used.
% 
% This script was written in MATLAB R2017b and requires TwoCrackCalib and
% WilliamsEigenSol.
%
% The results produced are displayed in equation 26
% 
% Daniel Riddoch, 2021-03-01
% University of Oxford, Department of Engineering Science
clc
clear
close all
%% Inputs
% This section contains all the inputs to the problem, both physical and
% numerical.
alpha=3*pi/4;                               % Wedge half-angle(radians)
theta1=pi/4;                                % Crack 1 angle(radians)
theta2=-pi/4;                               % Crack 2 angle(radians)
cl1=0.5;                                      % Crack 1 length
cl2=1;                                      % Crack 2 length
N=100;                                      % Number of points on the crack face(default value is 100)
n=500;                                      % Number of Gauss points for notch faces(default value is 500)
facl=200;                                   % Length of free surfaces for notch faces(default value is 200)
%% Calibration
% This section calculates the entries of the calibration matrix set out in
% equation 25
[a,b,c,d,e,f,g,h]=TwoCrackCalib(alpha,theta1,theta2,cl1,cl2,n,facl,N);