function [sys] = v2_DiMeglio_model(t,x,u,output,par)

% Simplified model for riser slugging
% By: Florent Di Meglio
% Mines Paristech

% x1: Mass of gas in the elongated bubble (m_G1)
% x2: Mass of gas in the riser (m_G2)
% x3: Mass of liquid in the riser (m_L2)


[xdot,y] = v1_DiMeglio_model(x,u,par);

if isequal(output,'derivatives')
    sys = xdot;%t
    if ~isreal(sys)
        disp('Complex')
        sys=0*sys;
    end
elseif isequal(output,'measurements')
    sys = y(1:3);

end 

end