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

(*free convection*)
ν=1.6507*(10^(-5));
Pr=0.71289;
λ=0.027;
Dchar=0.5;
Ts=50;
Ta=20;
Tdef=((50+20)/2);
β=(1/(Tdef+273));
g=9.81;
Gr=((β*(Ts-Ta)*g*(Dchar^3))/(ν^2));
Print["Gr*Pr=Ra= ",grpr=Gr*Pr," [-]"]
Nu=0.59*(grpr^(1/4));
Print["Nu= ",Nu," [-]"]
α=((Nu*λ)/Dchar);
Print["α= ",α," W.(m^(-2)).(K^(-1))"]
S=2*1*.5;
power=α*S*(Ts-Ta);
Print["convective power= ",power," W"]

(*forced convection*)
Remove["Global`*"];
"Nu=Nu(Re,Pr), Re=((velocity*Dchar)/ν), Pe=Pr*Re"

(*humid air*)
Quiet@Remove["Global`*"];
x1=3.3*(10^(-3));
h1=13*(10^3);
x2=8.7*(10^(-3));
h2=42*(10^3);
T2=20;
energyPer1kg=h2-h1;
H2Oper1kg=x2-x1;
Volume=100;
density=(349./(T2+273));
massOfDryAir=Volume*density;
neededEnergy=massOfDryAir*energyPer1kg;
needeH2O=massOfDryAir*H2Oper1kg;
Print["we need ",(neededEnergy/(10^6))," MJ and ",needeH2O," kg of H2O"]