parametry = {d -> 0.14, stena -> 0.012, 
          hmotnost -> 37.88, N11 -> 133, I1 -> 500, 
          eps0 -> 8.854*(10^(-12)), epsr -> 1, 
          mi0 -> 4*Pi*(10^(-7)), mir -> 10, gama -> 5*(10^6), 
          gamaCu -> 5.5*(10^10), f -> 50};
doskonst = {ρ -> 7874. , 
          cp -> 200, λ -> 15, vz -> 0.5, 
          T0 -> 20, 
          Tokoli -> 20, ϵ -> 0.85, σ -> 
            5.67*(10^(-8)), alfa -> 20, zmax -> 5, 
          delkainduktoru -> 2};
hloubkavniku = (Sqrt[(2/(2*Pi*f*mi0*gamaCu))]) /. 
        Union[doskonst, parametry]

r2 = d/2 /. parametry
r4 = r2 - stena /. parametry

ω := 2*Pi*f
ka2 := (ω^2)*eps0*epsr*mi0*mir - I*ω*mi0*mir*
          gama
H11 := ((N11*I1)/delkainduktoru) /. parametry /. 
        doskonst
rce = 
        D[H[r], {r, 2}] + (1/r)*D[H[r], r] + ka2*H[r] == 0 /. 
          parametry;
hh[r_] = 
        H[r] /. DSolve[rce, H[r], 
              r][[1]];
rce1 = hh[r2] - H11 == 0 /. parametry;

rce2 = -((2*Pi*r4)/gama)*hh'[
                  r4] + I*ω*Pi*(r4^2)*mi0*mir*
                hh[r4] == 0 /. parametry;

resC1 = Solve[rce1, 
            C[1]][[1]];

    resC2 = Solve[
            Simplify[rce2 /. resC1]][[1]];

    cecka = Union[resC1, resC2];

hh[r] //. cecka

hacko[r_] = hh[r] //. cecka

B[r_] = hacko[r]*mi0*mir //. parametry

rvnitrni = r4 /. parametry;
rvnejsi = r2 /. parametry;

Plot[Abs[B[r]], {r, rvnitrni, rvnejsi}, 
        AxesLabel -> {"r[m]", "B(T)"}, 
        ImageSize -> {400, 300}, PlotStyle -> {Hue[0]}, 
        PlotRange -> All, PlotRange -> All, 
        PlotPoints -> 300] /. parametry

Plot[Abs[hacko[r]], {r, rvnitrni, rvnejsi}, 
        AxesLabel -> {"r[m]", "H[A/m]"}, 
        ImageSize -> {400, 300}, PlotStyle -> {Hue[0]}, 
        PlotRange -> All] /. parametry

rce4 = 
        Ee[r] + (1/gama)*hacko'[r] == 0 /. 
          parametry;
reseni1 = Solve[rce4, 
            Ee[r]][[1]];
ecko[r_] = Ee[r] /. reseni1;

Plot[Abs[ecko[r]], 
      Evaluate[{r, rvnitrni, rvnejsi}, 
        AxesLabel -> {"r[m]", "E[V/m]"}, 
        ImageSize -> {400, 300}, PlotStyle -> {Hue[0]}], 
      PlotRange -> All]

prepocitano na aktualni objem co bude v induktoru

vykon = Abs[ecko[r]]^2*gama /. parametry;

rvnitrni
rvnejsi
r4 /. parametry
r2 /. parametry

celkovyvykondotrubky = 
      NIntegrate[
        vykon*2*Pi*delkainduktoru*r /. doskonst, {r, rvnitrni, 
          rvnejsi}]

Plot[vykon, {r, rvnitrni, rvnejsi}, 
      AxesLabel -> {"r[m]", "P[W/m3]"}, 
      ImageSize -> {400, 300}, PlotStyle -> {Hue[0]}, 
      PlotRange -> All]

tau = 0.01;
skok[t1_, t2_, x_] = 
            0.5 (Tanh[((x - t1)/tau)] - Tanh[((x - t2)/tau)]);
Plot[
          skok[0, delkainduktoru /. doskonst, kk], {kk, -2, 4}, 
          PlotRange -> All]

QV[r_, z_] = (skok[0, delkainduktoru, z])*vykon /. 
                doskonst;

QV[r_,z_]=(skok[0,delkainduktoru,z]+skok[delkainduktoru*1.5,delkainduktoru*2.5,z])*vykon/.doskonst;

rce = ρ*cp*vz*
              D[T[r, z], 
                z] == λ*((1/r)*D[T[r, z], r] + 
                    D[T[r, z], {r, 2}]) + QV[r, z] /. 
          doskonst;
okrz = T[r, 0] == T0 /. doskonst;
okrvnitrni = (D[T[r, z], r] /. r -> r4 /. 
              parametry) == 0;
okrvnejsi = (-λ*D[T[r, z], r] /. r -> r2 /. 
                parametry /. 
              doskonst) == (alfa*(T[r2 /. parametry, z] - 
                        Tokoli) + ϵ*σ*((((T[r2 /. parametry, z] + 273))^4) - (Tokoli^4)) /. 
                doskonst)*(((z/0.1))/((z/0.1) + 1));

restep = NDSolve[{rce, okrz, okrvnitrni, okrvnejsi}, T[r, z], 
            Evaluate[{r, r4, r2} /. parametry], 
            Evaluate[{z, 0, zmax} /. 
                doskonst]][[1]];
teplota[r_, z_] = T[r, z] /. restep;

Plot3D[
      teplota[r, z], Evaluate[{r, rvnitrni, rvnejsi}], 
      Evaluate[{z, 0, zmax} /. doskonst], ImageSize -> {400, 300}, 
      PlotPoints -> 28, 
      AxesLabel -> {"r[m]", "z[m]", "T[°C]"}, 
      PlotRange -> All]

Plot[{teplota[r4 /. parametry, z], teplota[r2 /. parametry, z]}, 
      Evaluate[{z, 0, zmax} /. doskonst], ImageSize -> {400, 300}, 
      AxesLabel -> {"l[m]", "T[°C]"}, 
      PlotRange -> All, PlotStyle -> {Hue[0], Hue[0.6]}]

modra-teplota na vnejsim poloprumeru
cervena-teplota na vnitrnim polomeru

rc

rc := r2 + 0.005
fi1 = 
      mir*NIntegrate[2*Pi*r*hacko[r], Evaluate[{r, r4, r2} /. parametry]] /. 
        parametry
fi2 = 
      NIntegrate[2*Pi*r*hacko[r2 /. parametry], 
        Evaluate[{r, r2, rc} /. parametry]]
fi3 = 
      NIntegrate[2*Pi*r*hacko[r4 /. parametry], 
        Evaluate[{r, 0, r4} /. parametry]]
tokcelkem = 
      N11*mi0*(fi1 + fi2 + fi3) /. parametry
indukovanenapeti = tokcelkem*I*2*Pi*f /. parametry

odpor = ((2*Pi*0.085*N11*N11*1.2)/(gamaCu*hloubkavniku)) /. 
        parametry

odpor civky

napetinaodporu = odpor*I1 /. parametry

napetizdroje = napetinaodporu + indukovanenapeti

Abs[napetizdroje]

impedance = napetizdroje/I1 /. parametry

cinnyvykon = 
      (I1^2)*Re[impedance] /. parametry
jalovyvykon = (I1^2)*Im[impedance] /. parametry

cinnyvykon /. parametry

jalovyvykon /. parametry

kondenzator = 
      (jalovyvykon/(2*Pi*f*Abs[napetizdroje]*Abs[napetizdroje])) /. 
        parametry