% % Tutorials / Circ_Waveguide % % Describtion at: % http://openems.de/index.php/Tutorial:_Circular_Waveguide % % Tested with % - Matlab 2009b % - openEMS v0.0.23 % % (C) 2010,2011 Thorsten Liebig close all clear clc %% setup the simulation %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% physical_constants; unit = 1e-3; %drawing unit in mm numTS = 50000; %max. number of timesteps % waveguide dimensions length = 2000; rad = 350; %waveguide radius in mm % frequency range of interest f_start = 300e6; f_stop = 500e6; mesh_res = [10 2*pi/49.999 10]; %targeted mesh resolution %% mode functions %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % by David M. Pozar, Microwave Engineering, third edition freq = linspace(f_start,f_stop,201); p11 = 1.841; kc = p11 / rad /unit; k = 2*pi*freq/C0; fc = C0*kc/2/pi; beta = sqrt(k.^2 - kc^2); n_eff = (beta/k); ZL_a = k * Z0 ./ beta; %analytic waveguide impedance % TE_11 mode profile E- and H-field kc = kc*unit; %functions must be defined in drawing units func_Er = [ num2str(-1/kc^2,15) '/rho*cos(a)*j1(' num2str(kc,15) '*rho)']; func_Ea = [ num2str(1/kc,15) '*sin(a)*0.5*(j0(' num2str(kc,15) '*rho)-jn(2,' num2str(kc,15) '*rho))']; func_Ha = [ num2str(-1/kc^2,15) '/rho*cos(a)*j1(' num2str(kc,15) '*rho)']; func_Hr = [ '-1*' num2str(1/kc,15) '*sin(a)*0.5*(j0(' num2str(kc,15) '*rho)-jn(2,' num2str(kc,15) '*rho))']; disp([' Cutoff frequencies for this mode and wavguide is: ' num2str(fc/1e6) ' MHz']); if (f_start