function [pt2,Tt2,m2,mf,Qid]=komora_spalania(pt1,Tt1,m1,Tt2,s_b,d_b,d)


if exist('d','var')==0 
    d='k';
end
    
if  d=='k' || d=='K' || d=='b' || d=='B'
    cp=1200;
   
else
    cp=1250;
end
Wu=43e6;
mf=m1*cp*(Tt2-Tt1)/Wu/d_b;
pt2=s_b*pt1;
Qid=mf*Wu;
m2=m1+mf;
end
