function qa=f1(t,ha)
global flow1s flow2s conta
F_in=2.2;
F_in2=1.6;
if t>300
    F_in2=3.1;
end
area=100;
%area_sal=0.001*3600;
area_sal=1;
if ha(1)>ha(2)
flow1=sqrt(20*ha(1)-20*ha(2));
flow2=sqrt(20*ha(2));
else
flow1=0;
flow2=sqrt(20*ha(2)-20*ha(1))/100-100*sqrt(20*ha(2));
end    
    
if ha(1)>ha(2)
dh1_dt=(F_in-sqrt(20*ha(1)-20*ha(2))*area_sal)/area;
dh2_dt=(F_in2+sqrt(20*ha(1)-20*ha(2))*area_sal-sqrt(20*ha(2))*area_sal)/area;
else
    dh1_dt=(F_in+sqrt(20*ha(2)-20*ha(1))*area_sal)/area;
dh2_dt=(F_in2-sqrt(20*ha(2)-20*ha(1))*area_sal-sqrt(20*ha(2))*area_sal)/area;
end
if conta==4
flow1s=[flow1s flow1];
flow2s=[flow2s flow2];
end
qa(1)=dh1_dt;
qa(2)=dh2_dt;
