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));
hodina=3600;
tmax=5*24*hodina;
λ=0.8;
d=0.6;
αin=5;
αout=10;
Tout=-5;
rce=D[T[x,t],t]==a*D[T[x,t],{x,2}];
Tin[t_]:=7+15Tanh[(t/(2*hodina))];
Plot[Tin[t],{t,0,5hodina},PlotRange->All];
poc=T[x,0]==-5;
okrOkr=-λ*D[T[x,t],x]==Tanh[t]*αout*(T[x,t]-Tout)/.x->d;
okrIn=-λ*D[T[x,t],x]==Tanh[t]*αin*(Tin[t]-T[x,t])/.x->0;
dohr={rce,poc,okrIn,okrOkr};
res=NDSolve[dohr,T[x,t],{x,0,d},{t,0,tmax}][[1]];
Plot3D[T[x,t]/.res,{x,0,d},{t,0,tmax},PlotRange->All]

σ=5.67*(10^(-8));
rZemSl=150*(10^9);
qZem=1351;
Pslunce=4.*Pi*(rZemSl^2)*qZem;
Solve[Pslunce==σ*1*4*Pi*(rS^2)*(6000^4),rS][[2]]

Ie=1;
U=10;
P=Ie*U;
α=10;
Tokoli=40;
S=2*(a^2);
ϵ=0.9;
σ=5.67*(10^(-8));

Pk=α*S*(Tchladic-Tokoli);
Ps=σ*ϵ*S*((((Tchladic+273))^4)-(((Tokoli+273))^4));
Rth=2;
rce={P==Pk+Ps,P==((150-Tchladic)/Rth)};
FindRoot[rce,{Tchladic,0.5*(Tokoli+150)},{a,0.1}]

ClearAll["Global`*"]

Simplify[q/.Solve[(∫_0^d)-q\[DifferentialD]x==(∫_T1^T2)(a*T+b)\[DifferentialD]T,q][[1]]]

σ=5.67*(10^(-8));
cm=0.01;
d1=3cm;
λ1=0.5;
λ2=0.178;
a=1.5;
α=5;
ϵ=0.9;

((1250+80)/2)

T1=1250;
T2=80;
To=35;

Rth1=(d1/(λ1*0.5(6*(a^2)+6*(((a+2d1))^2))));
Rth2=(d2/(λ2*0.5(6*(((a+2d1))^2)+6*(((a+2d1+2d2))^2))));

Pk=α*6*(((a+2d1+2d2))^2)*(T2-To);
Ps=σ*ϵ*6*(((a+2d1+2d2))^2)*((((T2+273))^4)-(((To+273))^4));

rce=((T1-T2)/(Rth1+Rth2))==Pk+Ps;
Tloiz=Solve[rce,d2][[-1]]
Pztraty=Pk+Ps/.Tloiz

hodina=3600;
tmax=1*24*hodina;
λ=λ1;
d=0.6;
a=((λ1)/(100*750));
Tout=35;
rce=D[T[x,t],t]==a*D[T[x,t],{x,2}];
poc=T[x,0]==35;
αout=5;
okrOkr=-λ*D[T[x,t],x]==Tanh[t]*αout*(T[x,t]-Tout)/.x->d;
okrIn=-λ*D[T[x,t],x]==Tanh[t]*((3*Pztraty)/(6*(1.5^2)))/.x->0;
dohr={rce,poc,okrIn,okrOkr};
res=NDSolve[dohr,T[x,t],{x,0,d},{t,0,tmax}][[1]];
Plot3D[T[x,t]/.res,{x,0,d},{t,0,tmax},PlotRange->All]

Plot[{Evaluate[T[x,t]/.res/.x->0],1250},{t,0,tmax}]

3*Pztraty

Uf=1.1*230;
Pjedenclanek=((3*Pztraty)/12);
U1clanek=(Uf/4);
Rjedenclanek=Rc/.Solve[Pjedenclanek==((U1clanek^2)/Rc),Rc][[1]];

Tdrat=1300;
Tpec=1250;
ϵ=0.95;
Smin=Smidr/.Solve[Pjedenclanek==0.8*σ*ϵ*Smidr*((((1300+273))^4)-(((Tpec+273))^4))][[1]]

Smincmkv=(Smin/(cm^2))

"drat prumer 4.25mm a ten ma odpor 1.015 Ω/m"

R1m=1.015;

Ldrat=(Rjedenclanek/R1m)