Quiet@Remove["Global`*"];

mm=0.001;

Quiet@<<PhysicalConstants`

μ0=(VacuumPermeability//N)[[1]]
(*VacuumPermittivity//N*)

(Sqrt[(2/(ω*γ*μ))])/.{ω->2*Pi*50.,γ->57*(10^6),μ->μ0}

curl[vect_]:=Curl[vect, {r,θ,z}, "Cylindrical"]

Evect={0,0,Ez[r]};
Hvect={0,Hfi[r],0};
eqn1=Thread[curl[Evect]==-I*ω*μ*Hvect][[2]];
eqn2=Thread[curl[Hvect]==γ*Evect][[-1]];
sol=(DSolve[{eqn1,eqn2},{Ez[r],Hfi[r]},r][[1]]//Simplify[#,{ω>0,γ>0,μ>0.}]&)/.C[2]->0

(((-1))^(3/4))//ComplexExpand

Jzobecne[r_]=BesselJ[0,-(1-I)* (r/a) ] C[1]*γ

proud=Integrate[2*r*Pi*Jzobecne[r],{r,0,rmax}]

J[r]

J[r_]=Jzobecne[r]/.Solve[proud==Icelkovy,C[1] ][[1]]//FullSimplify;

Abs[J[r]/.dos]

dos={a->0.00942,Icelkovy->1,rmax->0.04};
Plot[Abs[J[r]/.dos],{r,0,rmax/.dos},AxesLabel->{"r [m]","Abs[J] [A/(m^2)]"},GridLines->Automatic,PlotStyle->{Red,Thick},AxesOrigin->{0,0},PlotRange->All]

ClearAll[Pztraty]
Pztraty[rmaxx_]:=Module[{dos={a->0.00942,Icelkovy->1,γ->57*(10^6),delka->1},jecko},
jecko=J[r]/.dos/.rmax->rmaxx;
delka*2*(Pi/γ)*NIntegrate[r*((Abs[jecko])^2),{r,0,rmaxx}]/.dos

];
Pztraty[0.001]

dos={a->0.00942,Icelkovy->1,γ->57*(10^6),delka->1};

RkuRhomogenni[rmax_]:=((Pztraty[rmax])/(1/(γ*Pi*(rmax^2))))/.dos;
RkuRTrubka[rmax_]:=((Pztraty[rmax])/(1/(γ*Pi*((rmax^2)-(((rmax-a))^2)))))/.dos;

{#,RkuRhomogenni[#]}&/@Range[0.00001,0.02,0.001];
ListPlot[%]

{#,RkuRTrubka[#]}&/@Range[0.02,0.1,0.01];
ListPlot[%]

Evect={0,Efi[r],0};
Hvect={0,0,Hz[r]};
eqn1=Thread[curl[Evect]==-I*ω*μ*Hvect][[-1]]
eqn2=Thread[curl[Hvect]==γ*Evect][[2]]

sol=DSolve[{eqn1,eqn2,Hz[rmax]==H0,-I*ω*μ*Hz[rmin]*Pi*(rmin^2)==2*Pi*rmin*Efi[rmin]},{Efi[r],Hz[r]},r];
solCiselne=Simplify[sol,{ω>0,γ>0,μ>0.}][[1]]/.(dos2={ω->2*Pi*50.,γ->57*(10^6),μ->μ0,rmin->6mm,rmax->45mm,rinduktor->rmax+5mm,H0->(10^6)});
Plot[Abs[Efi[r]/.solCiselne],Evaluate[{r,rmin,rmax}/.dos2],PlotRange->All,AxesOrigin->{0,0}]

tokVenku=Pi*μ*(H0*((rinduktor^2)-(rmax^2)))//.dos2;
tokUvnitr=Pi*μ*Hz[r]*(rmin^2)/.solCiselne/.r->rmin//.dos2;
integrand=2*Pi*μ*r*Hz[r]/.solCiselne/.dos2;
tokvTrubce=Integrate[integrand,{r,rmin,rmax}/.dos2];
tokCelkem=tokVenku+tokvTrubce+tokUvnitr;
(1/tokVenku){tokVenku,tokvTrubce,tokUvnitr}

QV=γ*((Abs[Efi[r]])^2)/.solCiselne/.dos2;
Plot[QV,Evaluate[{r,rmin,rmax}/.dos2],PlotRange->All,AxesOrigin->{0,0}]

grad[scal_]:=Grad[scal, {r,θ,z}, "Cylindrical"];
div[vect_]:=Div[vect, {r,θ,z}, "Cylindrical"]

λ=400;
ro=8960;
cp=400;
α=30;
To=20;
heatEqn=ro*cp*D[T[r,t],t]==div[λ*grad[T[r,t]]]+QV;
poc=T[r,0]==To;
okrUvnitr=D[T[r,t],r]==0/.r->rmin/.dos2;
okrVne=-λ*D[T[r,t],r]==α*(T[r,t]-To)/.r->rmax/.dos2;
tmax=6;
sol=NDSolve[{heatEqn,poc,okrUvnitr,okrVne},T,{t,0,tmax},{r,rmin,rmax}/.dos2][[1]];

Plot3D[T[r,t]/.sol,{t,0,tmax},Evaluate[{r,rmin,rmax}/.dos2]]

prubehy=(T[r,#]/.sol)&/@Range[0,tmax,1.];
Plot[Evaluate[prubehy],Evaluate[{r,rmin,rmax}/.dos2],GridLines->Automatic]

delkaInduktoru=1;
nZavitu=20;
proud=((delkaInduktoru*H0)/nZavitu)/.dos2;
tokUplneCelkem=tokCelkem*nZavitu;
napeti=tokUplneCelkem*I*ω/.dos2;
napeti*Conjugate[proud]