Quiet@Remove["Global`*"];
$HistoryLength=2;
SetDirectory[NotebookDirectory[]];

V=5*12*3.5;
Tin=22;
T1=0;
fi1=85;
T2=22;
fi2=70;
casVymeny=2*3600;
hustota=(349./(Tin+273));
msv=hustota*V;

Print["msv= ",msv," kg"]

x1= 3.25;
h1 = 8.13;
x2 = 11.74;
h2 = 52.05;

Δx = x2 - x1;
Δh = h2 - h1;
mvody = Δx * msv;
Print["mvody= ",mvody," g"]

e = Δh *msv;
Print["Energie= ",e," kJ"]

P = ((e )/casVymeny);
Print["Vykon= ",P" kW"]

t2 = 43.32;

Quiet@Remove["Global`*"];
$HistoryLength=2;
SetDirectory[NotebookDirectory[]];

Tin=20;
V=5*12*3.5;
x1= 11.86;
h1 = 50.3;
x2 = 8.86;
h2 = 34.49;
x3 = 8.86;
h3 = 42.67;
hustota=(349./(Tin+273));
msv=hustota*V;

Δx = x3 - x1;
Δh = h2 - h1;
Δh1 = h3 - h2;

mvody = Δx * msv;

Print["mvody= ",mvody," g"]

(*kolik musím chladit*)
e = Δh *msv;
Print["Energie= ",e," kJ"]

(*kolik musím dodat tepla*)
e1 = Δh1 *msv;
Print["Energie= ",e1," kJ"]

Quiet@Remove["Global`*"];
(*kolik tepla, vody a CO2 doda 20studentu*)
nStudentu=20;
qStudent=70;(*W/(m^2)*)
mStudent=80;
vyska=185;
Sstudent=0.007184*(mStudent^0.425)*(vyska^0.725);
Print["plocha studenta= ",Sstudent," (m^2)"];
vykon=nStudentu*qStudent*Sstudent;
Print["vykon ze studentu= ",vykon," W"]

p[t_]:=Exp[((1500.3+23.5*t)/(234+t))];
ps=p[35];
Tin=22;
fi=0.6;
pa=p[22]*fi;
ed=3.05*(10^(-3))*(ps-pa);
eres=1.72*(10^(-5))*qStudent*(5867-pa);
epohoda=0.42*(qStudent-58.15);
celkemVeVode=(ed+eres+epohoda)*nStudentu*Sstudent;
Print["ve vyparnem teple je ",celkemVeVode," W"]
veVzduchu=vykon-celkemVeVode;
Print["ohrevem vzduchu ",veVzduchu," W"]

(*glukoza*)
spalneTeplo=15.7*(10^6);
vznikCO2=(vykon/spalneTeplo)*(264/180);
CO2ZaHodinu=vznikCO2*3600;
msv=250;
koncentrace=0.04*(10^(-2));
mCO2Normalne=msv*koncentrace