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

cm=0.01;
d=5cm;
To=20;
Ts=60;
v=20;
Pr=0.7;
(*forced convection across cylinder correlations*)
Nu[re_]:=0.93*(re^0.4)*(Pr^0.4)/;5<re≤80;
Nu[re_]:=0.715*(re^0.46)*(Pr^0.4)/;80<re≤500;
Nu[re_]:=0.226*(re^0.6)*(Pr^0.4)/;500<re;
(*LogLogPlot[Nu[re],{re,5,50000}]*)

Dchar=d;
Tdef=((Ts+To)/2);
Print["Tdef= ",Tdef," °C"]

ν=16.92*(10^(-6));
Rey=v*(Dchar/ν);
Print["Re= ",Rey," -"]

nuOld=Nu[Rey];
Print["Nu po staru= ",nuOld]

NuNew[re_]:=0.3+((0.62*(re^0.5)*(Pr^(1/3)))/(((1+((((0.4/Pr)))^(2/3))))^(1/4)))*(((1+((((re/282000)))^(5/8))))^(4/5));
LogLogPlot[{Nu[re],NuNew[re]},{re,5,50000},PlotStyle->{Red,Blue}];

nunew=NuNew[Rey];
Print["Nu po novu= ",nunew," -"]

λ=27.35*(10^(-3));
α=nuOld*(λ/Dchar);
Print["α= ",α," W.(m^(-1)).(K^(-1))"]

SJedenM=Pi*d;
Pconv1m=SJedenM*α*(Ts-To);
Print["Pc= ",Pconv1m," W"]

ϵ=0.9;
σ=5.67*(10^(-8));
Prad=SJedenM*ϵ*σ*((((Ts+273))^4)-(((To+273))^4));
Print["Pr= ",Prad," W"]

Skolmy=((Pi*(d^2))/4);
γ=37*(10^6);
R1m=(1/(γ*Skolmy));
Solve[R1m*(proud^2)==Pconv1m][[2]]