


set(0,'DefaultAxesFontName','times')
set(0,'DefaultAxesFontWeight','normal')
set(0,'DefaultAxesFontSize',12);
set(0,'DefaultAxesTitleFontWeight','normal')
set(0,'DefaultAxesTitleFontSizeMultiplier',1)

% figure(1),clf,
% xSize = 14; ySize = 10;  %size of the figure to be generated
% set(gcf,'PaperUnits','centimeters')
% set(gcf,'PaperPosition',[0 0  xSize ySize])
% 
% x0 = 0.11;
% xw = 0.36; dx = 0.14;  x1 = x0+xw+dx;
% y0 = 0.11; yw=0.4; dy=0.04;
% y1 = y0+dy+yw;
% 
% pos = [x0 y1 xw yw;  x1 y1 xw yw; x0 y0 xw yw;  x1 y0 xw yw];
% 
% Xbp3 = mean(Xbp(:,3))-Xbp(:,3);
% Xbp1 = mean(Xbp(:,3))-Xbp(:,1);
% Xbp2 = mean(Xbp(:,3))-Xbp(:,2);
% i3 = [1 5 8];
% 
% h1=subplot('position',pos(1,:))
% hh=plot(REstar,Xbp3,'ko','markerfacecolor','b'),grid
% hold on
% plot(REstar(i3),Xbp2(i3),'ko','markerfacecolor','r')
% plot(REstar(i3),Xbp1(i3),'ko','markerfacecolor','g')
% hold off
% legend('$\mathrm{Bo}=4000$','$\mathrm{Bo}=1000$','$\mathrm{Bo}=200$','location','northwest','interpreter','latex')
% set(h1,'xticklabel',[])
% %xlabel('Uw/C at y=3')
% %xlabel('RE^*')
% ylabel('$\Delta x_\mathrm{bp}/h_0$','interpreter','latex')
% %xlabel('$\mathrm{Re}^*$','interpreter','latex')
% text(1900,-0.4,'(a)','interpreter','latex')
% 
% AoHH = Void_Area(:,3)./(Ytop(:,3).^2)
% 
% h2=subplot('position',pos(2,:))
% plot(REstar,Void_Area(:,3)./(Ytop(:,3).^2),'ko','markerfacecolor','b'),grid
% hold on
% plot(REstar(i3),Void_Area(i3,2)./(Ytop(i3,2).^2),'ko','markerfacecolor','r')
% plot(REstar(i3),Void_Area(i3,1)./(Ytop(i3,1).^2),'ko','markerfacecolor','g')
% hold off
% %xlabel('Uw/C at y=3')
% ylabel('$A_\mathrm{O}/H_\mathrm{b}^2$','interpreter','latex')
% set(h2,'xticklabel',[])
% %xlabel('$\mathrm{Re}^*$','interpreter','latex')
% text(-1900,0.305,'(b)','interpreter','latex')
% 
% AspectRatio = W_fit(:,3)./L_fit(:,3);
% 
% subplot('position',pos(3,:))
% plot(REstar,W_fit(:,3)./L_fit(:,3),'ko','markerfacecolor','b'),grid
% hold on
% plot(REstar(i3),W_fit(i3,2)./L_fit(i3,2),'ko','markerfacecolor','r'),grid
% plot(REstar(i3),W_fit(i3,1)./L_fit(i3,1),'ko','markerfacecolor','g'),grid
% hold off
% %xlabel('Uw/C at y=3')
% ylabel('Aspect Ratio $W/L$','interpreter','latex')
% xlabel('$\mathrm{Re}^*$','interpreter','latex')
% text(1900,0.305,'(c)','interpreter','latex')
% 
% AjHH = Area_Lip(:,3)./(Ytop(:,3).^2);
%                        
% subplot('position',pos(4,:))
% plot(REstar,Area_Lip(:,3)./(Ytop(:,3).^2),'ko','markerfacecolor','b'),grid
% hold on
% plot(REstar(i3),Area_Lip(i3,2)./(Ytop(i3,2).^2),'ko','markerfacecolor','r'),grid
% plot(REstar(i3),Area_Lip(i3,1)./(Ytop(i3,1).^2),'ko','markerfacecolor','g'),grid
% hold off
% %xlabel('Uw/C at y=3')
% ylabel('$A_\mathrm{J}/H_\mathrm{b}^2$','interpreter','latex')
% xlabel('$\mathrm{Re}^*$','interpreter','latex')
% text(-1900,0.14,'(d)','interpreter','latex')
% % subplot(3,2,6)
% % plot(REstar,theta_fit(:,3),'ko','markerfacecolor','b'),grid
% % %xlabel('Uw/C at y=3')
% % ylabel('angle of overturn (deg)','interpreter','latex')
% % xlabel('$\mathrm{Re}^*$','interpreter','latex')
% 
% set(gcf,'PaperUnits','centimeters')
%      set(gcf,'papersize',[xSize ySize],'paperposition',[ 0 0 xSize ySize]);
% 
% 
% print('-dpdf','../FinalFigs/Results_overturn_geometry.pdf')

load OVERTURN_ANALYSIS.mat

figure(2),clf,
xSize = 14; ySize = 16;  %size of the figure to be generated
set(gcf,'PaperUnits','centimeters')
set(gcf,'PaperPosition',[0 0  xSize ySize])

x0 = 0.11;
xw = 0.36; dx = 0.14;  x1 = x0+xw+dx;
y0 = 0.08; yw=0.28; dy=0.025;
y1 = y0+dy+yw;  y2 = y1+dy+yw;  

pos = [x0 y2 xw yw;  x1 y2 xw yw; x0 y2 xw yw;  x1 y2 xw yw; x0 y1 xw yw;  x1 y1 xw yw; x0 y0 xw yw;  x1 y0 xw yw];

Xbp3 = mean(Xbp(:,3))-Xbp(:,3);
Xbp1 = mean(Xbp(:,3))-Xbp(:,1);
Xbp2 = mean(Xbp(:,3))-Xbp(:,2);
i3 = [1 5 8];

h1=subplot('position',pos(1,:))
hh=plot(REstar,Xbp3,'ko','markerfacecolor','b'),grid
hold on
%plot(REstar(i3),Xbp2(i3),'ko','markerfacecolor','r')
%plot(REstar(i3),Xbp1(i3),'ko','markerfacecolor','g')
hold off
%legend('$\mathrm{Bo}=4000$','$\mathrm{Bo}=1000$','$\mathrm{Bo}=200$','location','northwest','interpreter','latex')
set(h1,'xticklabel',[])
%xlabel('Uw/C at y=3')
%xlabel('RE^*')
ylabel('$\Delta x_\mathrm{bp}/h_0$','interpreter','latex')
%xlabel('$\mathrm{Re}^*$','interpreter','latex')
text(1900,-0.4,'(a)','interpreter','latex')
axis([-2000 2400 -0.5 1.1])

h1=subplot('position',pos(2,:))
hh=plot(REstar,Ytop(:,3),'ko','markerfacecolor','b'),grid
hold on
%plot(REstar(i3),Ytop(i3,2),'ko','markerfacecolor','r')
%plot(REstar(i3),Ytop(i3,1),'ko','markerfacecolor','g')
hold off
%legend('$\mathrm{Bo}=4000$','$\mathrm{Bo}=1000$','$\mathrm{Bo}=200$','location','northwest','interpreter','latex')
set(h1,'xticklabel',[])
%xlabel('Uw/C at y=3')
%xlabel('RE^*')
ylabel('$H_\mathrm{b}/h_0$','interpreter','latex')
%xlabel('$\mathrm{Re}^*$','interpreter','latex')
text(-1900,0.685,'(b)','interpreter','latex')
axis([-2000 2400 0.6 0.7])

AoHH = Void_Area(:,3)./(Ytop(:,3).^2)

h2=subplot('position',pos(3,:))
plot(REstar,AoHH,'ko','markerfacecolor','b'),grid
hold on
%plot(REstar(i3),Void_Area(i3,2)./(Ytop(i3,2).^2),'ko','markerfacecolor','r')
%plot(REstar(i3),Void_Area(i3,1)./(Ytop(i3,1).^2),'ko','markerfacecolor','g')
hold off
%xlabel('Uw/C at y=3')
ylabel('$A_\mathrm{O}/H_\mathrm{b}^2$','interpreter','latex')
set(h2,'xticklabel',[])
%xlabel('$\mathrm{Re}^*$','interpreter','latex')
text(1900,0.35,'(c)','interpreter','latex')
axis([-2000 2400 0.28 0.36])

AspectRatio = W_fit(:,3)./L_fit(:,3);

subplot('position',pos(4,:))
plot(REstar,W_fit(:,3)./L_fit(:,3),'ko','markerfacecolor','b'),grid
hold on
%plot(REstar(i3),W_fit(i3,2)./L_fit(i3,2),'ko','markerfacecolor','r'),grid
%plot(REstar(i3),W_fit(i3,1)./L_fit(i3,1),'ko','markerfacecolor','g'),grid
hold off
%xlabel('Uw/C at y=3')
ylabel('$W/L$','interpreter','latex')
set(gca,'xticklabel',[])
%xlabel('$\mathrm{Re}^*$','interpreter','latex')
text(-1900,0.38,'(d)','interpreter','latex')
axis([-2000 2400 0.27 0.4])

AjHH = Area_Lip(:,3)./(Ytop(:,3).^2);
                       
subplot('position',pos(5,:))
plot(REstar,Area_Lip(:,3)./(Ytop(:,3).^2),'ko','markerfacecolor','b'),grid
hold on
%plot(REstar(i3),Area_Lip(i3,2)./(Ytop(i3,2).^2),'ko','markerfacecolor','r'),grid
%plot(REstar(i3),Area_Lip(i3,1)./(Ytop(i3,1).^2),'ko','markerfacecolor','g'),grid
hold off
%xlabel('Uw/C at y=3')
ylabel('$A_\mathrm{J}/H_\mathrm{b}^2$','interpreter','latex')
xlabel('$\mathrm{Re}^*$','interpreter','latex')
text(1900,0.23,'(e)','interpreter','latex')
axis([-2000 2400 0.12 0.24])

subplot('position',pos(6,:))
plot(REstar,theta_fit(:,3),'ko','markerfacecolor','b'),grid
hold on
%plot(REstar(i3),theta_fit(i3,2),'ko','markerfacecolor','r'),grid
%plot(REstar(i3),theta_fit(i3,1),'ko','markerfacecolor','g'),grid
hold off
%xlabel('Uw/C at y=3')
ylabel('$\theta_\mathrm{O}$~(deg)','interpreter','latex')
xlabel('$\mathrm{Re}^*$','interpreter','latex')
text(-1900,39,'(f)','interpreter','latex')
axis([-2000 2400 26 40])

% plot(REstar,theta_fit(:,3),'ko','markerfacecolor','b'),grid
% %xlabel('Uw/C at y=3')
% ylabel('angle of overturn (deg)','interpreter','latex')
% xlabel('$\mathrm{Re}^*$','interpreter','latex')

set(gcf,'PaperUnits','centimeters')
     set(gcf,'papersize',[xSize ySize],'paperposition',[ 0 0 xSize ySize]);


print('-dpdf','../FinalFigs/Results_overturn_geometry.pdf')
