clc
clear all
clc
warning('off','all');
tic
% **** System parameters ****
par = MiniLoop_parameters();
% System goes unstable at z=
QG_in = 4.5; %litr/min
QL_lin = 4; %litr/min
wG_in0 = par.Rog_n*QG_in/(60*1000); %kg/s
wL_in0 = par.rho_L*QL_lin/(60*1000); %kg/s
% **** System Inputs ****
zs = [0.05:0.01:0.2 0.25 0.3:0.1:1];
ns = size(zs);
n = ns(2);
y1 = zeros(n,1);
y2 = zeros(n,1);
y3 = zeros(n,1);
global u0;
% ************************
for k = 1:n
    z0 = zs(k);
    u0 = [z0;wG_in0;wL_in0];
    disp(z0);
    [x0,y0] =  MiniLoop_initialize(u0,par);

y1(k) = y0(1);
y2(k) = y0(2);
y3(k) = y0(3);

end
toc

save('MiniLoop_ss_data.mat','zs','y1','y2','y3');
Bif_Plot;