clc
clear all
close all

load Experiment_Bif_data.mat
load OLGA_Bif_top.mat
load MiniLoop_ss_data.mat
load MiniLoop_bif_data.mat
%%
figure(1)
rect = [0, 0, 15, 15];
set(gcf,'Color',[1,1,1],'PaperUnits','centimeters','PaperSize',[15 15],'PaperPosition',rect)
clf
subplot(2,1,1)
set(gcf,'Color',[1,1,1])
set(gca,'FontSize',10)
plot(Z_ss,P1_ss,'r','LineWidth',1)
title('Pressure at inlet of pipeline, \itP\rm_{in}','FontSize',12,'FontName','Times');
ylabel('\itP\rm_{in} [kpa]','FontSize',12,'FontName','Times')
xlabel('topside valve opening, \itZ\rm_1 [%]','FontSize',12,'FontName','Times')
hold on
plot(100*zs,y1,'-k')
plot(Zs(1:end),Pp_ss(1:end),'--b')
legend('Experiment','New low-order model','OLGA model','Orientation','Vertical')
plot(100*zs,y1min,'-k',100*zs,y1max,'-k')
hold on
plot(Zm(1:9),P1_av(1:9),'r',Zm(9:end),P1_min(9:end),'r',Zm(9:end),P1_max(9:end),'r','LineWidth',1)
plot(Zs(6:end),Pp_min(6:end),'--b',Zs(6:end),Pp_max(6:end),'--b','LineWidth',1)
ylim([10 50])


subplot(2,1,2)
set(gcf,'Color',[1,1,1])
set(gca,'FontSize',10)
plot(Z_ss,P2_ss,'r','LineWidth',1)
title('Pressure at top of riser, \itP\rm_{rt}','FontSize',12,'FontName','Times');
ylabel('\itP\rm_{rt} [kpa]','FontSize',12,'FontName','Times')
xlabel('topside valve opening, \itZ\rm_1 [%]','FontSize',12,'FontName','Times')
hold on
plot(100*zs,y2,'-k')
plot(Zs(1:end),Pt_ss(1:end),'--b')
legend('Experiment','New low-order model','OLGA model','Orientation','Vertical')
plot(100*zs,y2min,'-k',100*zs,y2max,'-k')
hold on
plot(Zm(1:9),P2_av(1:9),'r',Zm(9:end),P2_min(9:end),'r',Zm(9:end),P2_max(9:end),'r','LineWidth',1)
plot(Zs(6:end),Pt_min(6:end),'--b',Zs(6:end),Pt_max(6:end),'--b','LineWidth',1)
ylim([0 30])


%print -depsc C:\Users\jahansha\Documents\ECC2013\Figures\Bif_top
print -depsc C:\Users\jahansha\Documents\SPE_Journal\Figures\new_ExpBif