t0 = 4;
tk = 80;
tp = 105;
cvody = 4186;
Δ = tk  -  t0;
m = 200*100;
Q = 
        m*cvody*(Δ/(24*60*60)) // 
          N;
Print["Q= ", Q, "  W"]

Δ1 = tp - t0;
Δ2 = tp - tk;
resKS = 
        Solve[Q == 
            kS*((Δ1 - Δ2)/Log)[Δ(1/Δ)2]];
\(Print["kS= ", 
      kS /. %[\([1]\)], \*""  W.\!\(K\^\(-1\)\)""]\)

mpivo  =  0.5;
Qpullitr  =  
        cvody*mpivo*(tk - t0);
Print[Qpullitr/10^9 GJ]

Print[(Qpullitr*700)/10^9  "Kč/pullitr"]

Print[Qpullitr/3600000 "kWh/pullitr"]

Print[2*Qpullitr/3600000 "Kč/pullitr"]

0.1*200*100

λFe = 14;
ntrubek = 40;
QV = ((200*100*(10^(-3)))/(3600*24. ));
\(Print["QV= ", 
      QV, \*"" \!\(m\^3\).\!\(s\^\(-1\)\)""]\)
mm = 0.001;
tsteny = 1  mm;
Din = 6  mm;
S1trubka = Pi*((Din^2)/4);
Scelkem = ntrubek*S1trubka;
vpivo = (QV/Scelkem);
\(Print["vpivo= ", vpivo, \*"" m.\!\(s\^\(-1\)\)""]\)

Tdef = 0.25*(2  tp + t0 + tk);
Print["Tdef= ", Tdef, " K"]
ν = (10^(-6)) Fit[{{70, 0.413}, {80, 0.365}}, {1, T}, T] /. 
          T -> Tdef;
\(Print["ν= ", ν, \*"" (m^2).(s^(-1))""]\)

Rey = ((vpivo*Din)/ν);
Print["Re= ", Rey, " -"]

Pr = 
        Fit[{{60, 2.98}, {80, 2.22}}, {1, T}, T] /. 
          T -> Tdef;
Print["Pr= ", Pr, " -"]

λ = 
        Fit[{{50, 0.645}, {80, 0.670}}, {1, T}, T] /. 
          T -> Tdef;
\(Print["λ= ", λ, \*"" W.(m^(-1)).(K^(-1))""]\)

Nu1 = 0.023*(Rey^0.8)*(Pr^0.4);
Print["Nu1= ", Nu1, "  Re= ", 
        Rey];
αpivo = ((Nu1*λ)/Din);
\(Print["αpivo= ", αpivo, \*"" W.(m^(-1)).(K^(-1))""]\)

g = 10;
Dcharpara = Din + 2*tsteny;
νpara = 0.294*(10^(-6));
Ga = ((g*(Dcharpara^3))/ν)(para^2);
Prpara = 1.75;
r = 2.27*(10^6);
K = (r/(cvody*(tp - Ts)))

Nupara = 
        0.72*(((Ga*Prpara*K))^((1/4)));
λkondenzat = 0.682;
αpara = ((Nupara*λkondenzat)/Dcharpara)

λFe

Rthtrubka = 
        (tsteny/(Pi*(Din + 1*tsteny)*el*λFe));
Rthpivo = (1/(αpivo*Pi*Din*el));
Rthpara = 
        (1/(αpara*Pi*(Din + 2*tsteny)*el));
rov1 = 
        q1 == ((Tp - Tpivo)/(Rthtrubka + Rthpivo + Rthpara));
rov2 = q1 == ((Tp - Ts)/Rthpara);
res = 
        N[(Solve[{rov1, rov2}, {q1, Ts}] /. {Tp -> 105})[[2]], 
          5];
(q1/(el*(105 - Tpivo))) /. res /. Tpivo -> 4

Rthtrubka = 
        (tsteny/(Pi*(Din + 1*tsteny)*el*λFe));
Rthpivo = (1/(αpivo*Pi*Din*el));
Rthpara = 
        (1/(5000*Pi*(Din + 2*tsteny)*el));
Rthsum = Rthpara + Rthpivo + Rthtrubka

naseKS = (ntrubek/Rthsum);
naseKS == kS /. resKS[[1]]
Solve[%]

Tpstud = 4;
Tpast = 80;
msteckou = (m/(24. *3600));
ClearAll[Qvym1];
r1 = 
        Qvym1 == msteckou*
            cvody*(Tpivostred - Tpstud);
r2 = 
        Qvym1 == msteckou*
            cvody*(Tpast - Tpivoout);
Δ1 = Tpast - Tpivostred;
Δ2 = Tpivoout - Tpstud;
r3 = 
        Qvym1 == 
          kS*((Δ1 + Δ2)/2);
rce = {r1, r2, r3};
res = Solve[
            rce, {Qvym1, Tpivoout, 
              Tpivostred}][[1]];
Tpivostr = Tpivostred /. res;
vykon = 
        msteckou*cvody*(Tpast - Tpivostr);
\(\(Plot[{Tpivostr, vykon\/1000}, {kS, 100, 10000}, 
        AxesLabel -> {\*""kS[W.(m^(-2)).(K^(-1))]"", "Tpis[°C]"}, 
        PlotStyle -> {{Hue[0], Thickness[0.008]}, {GrayLevel[0], 
              Thickness[0.008]}}];\)\)