Needs["VectorAnalysis`"]

SetCoordinates[Cartesian[x,y,z]]

Div[Grad[T[x]]]

vysl=T[x]/.DSolve[{0==T''[x],T[0]==T1,T[d]==T2},T[x],x][[1]]

Grad[vysl]

λ*((T1-T2)/d)/.{λ->0.8,d->0.45,T1->15,T2->-10}

λ*((T1-T2)/d)/.{λ->0.04,d->0.1,T1->15,T2->-10}

Rth1=(0.45/(0.8*100));
Print["Rth1= ",Rth1," (K/W)"]

Rth2=(0.10/(.04*100));
Print["Rth2= ",Rth2," (K/W)"]

Q=((15-(-10))/(Rth1+Rth2));
Print["vykon= ",Q," W"]

Solve[((15-Tx)/Rth1)==Q]

SetCoordinates[Cylindrical[r,fi,z]]

r*Div[Grad[T[r]]]

res=T[r]/.DSolve[{0==r*Div[Grad[T[r]]],T[r1]==T1,T[r2]==T2},T[r],r][[1]]

Simplify[(-λ*Grad[res][[1]]/.r->rmin)*2*Pi*rmin*delka]

Plot[{Log[ksi],0.05((((ksi))^2)-1)},{ksi,1,10},AxesLabel->{"(r2/r1)"}]

(*dale*)

msteckou=0.2;
cp=4200;
T1=4;
T2=40;
ΔT=T2-T1;
Vykon=msteckou*cp*ΔT;
Print["P= ",(10^(-3))Vykon," kW"]

ρ=1000;
mm=0.001;
cm=10mm;
m=15cm;
d=3mm;
U=230;

ClearAll[T]
γ=Fit[{{20,(1/72.)},{75,(1/30.)}},{1,T[x]},T[x]];
(*Plot[γ,{T[x],0,100}]*)
Vsteckou=(msteckou/ρ);
vx=(Vsteckou/(m*d));

rce=ρ*cp*vx*D[T[x],x]==γ*((((U/d)))^2);
pocpodm=T[0]==4;
res=NDSolve[{rce,pocpodm},T,{x,0,1}][[1]];
tepl=T/.res;
Tout=40;
Plot[{tepl[x],Tout},{x,0,1}]
xmax=delka/.FindRoot[tepl[delka]==Tout,{delka,0.1,1}];
tepl[xmax]

pocpodm=T[0]==12;
res=NDSolve[{rce,pocpodm},T,{x,0,1}][[1]];
tepl=T/.res;
tepl[xmax]

γPHA=Fit[{{10,(1/35.)},{50,(1/10.)}},{1,T[x]},T[x]];
rce=ρ*cp*vx*D[T[x],x]==γPHA*((((U/d)))^2);
pocpodm=T[0]==4;
res=NDSolve[{rce,pocpodm},T,{x,0,1}][[1]];
tepl=T/.res;
tepl[xmax]
Plot[{tepl[x],Tout},{x,0,1}];

ClearAll["Global`*"]

a=5.2*(10^(-7));
λ=0.8;
d=0.6;
rce=D[T[x,t],t]==a*D[T[x,t],{x,2}]