%% 计算传导电流与位移电流的比值
% \nabla \times \nabla \times \mathbf{E}+{\left(\omega^2 \varepsilon \mu -i\omega \mu \sigma \right)}\mathbf{E}=0
% \mathit{\mathbf{r}}=\;\mathrm{i}\omega \mu \sigma /\omega^2 \varepsilon \mu


es0 = 8.854187817*10^-12;

f = logspace(0,8,100);
omega = 2*pi*f;
sig = logspace(-4,0,100);

esp = 81*es0;%linspace(1,84,100);
% es = linspace(1,84,100).*es0;

omega_es = omega.*esp;
r = omega_es./sig';

[F,S]= meshgrid(f,sig);


contourf(log10(S),log10(F),log10(r),1000,'EdgeColor','none')
hold on
contour(log10(S),log10(F),log10(r),'k.','ShowText','on')
% xlabel('log_{10}{\rho} {\Omega}m ','FontSize',12,'FontWeight','bold')
xlabel('log_{10}{(\sigma)} {S/m} ','FontSize',12,'FontWeight','bold')
ylabel('log_{10}(Frequency) Hz','FontSize',12,'FontWeight','bold')
set(gca,'FontSize',10,'FontWeight','bold',LineWidth=1.5)
grid on
grid minor

colormap(jet(20));
clim([-6,4])
h=colorbar;
set(h,'FontSize',10,'FontWeight','bold')
set(get(h,'title'),'string','$$log10(\frac{\sigma}{{\omega}{\epsilon}})$$','Interpreter','latex','Position', [45 125 0])
% contourf(log10(S),log10(F),log10(r),14,'k')

% caxis([-4,2])
% plot(f,sig)