% % EXAMPLE / waveguide / Rect_Waveguide % % This example demonstrates: % - waveguide mode excitation % - waveguide mode matching % - pml absorbing boundaries % % % Tested with % - Matlab 2009b % - openEMS v0.0.17 % % (C) 2010 Thorsten Liebig close all clear clc %% switches postproc_only = 0; %% setup the simulation %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% physical_constants; unit = 1e-3; %drawing unit in mm numTS = 50000; %max. number of timesteps % waveguide dimensions length = 1000; a = 1000; %waveguide width b = 600; %waveguide height %waveguide TE-mode definition m = 1; n = 0; mesh_res = [10 10 10]; %% setup FDTD parameters & excitation function %%%%%%%%%%%%%%%%%%%%%%%%%%%% f_start = 175e6; f_stop = 500e6; % dump special frequencies to vtk, use paraview (www.paraview.org) to % animate this dumps over phase vtk_dump_freq = [200e6 300e6 500e6]; freq = linspace(f_start,f_stop,201); k = 2*pi*freq/c0; kc = sqrt((m*pi/a/unit)^2 + (n*pi/b/unit)^2); fc = c0*kc/2/pi; %cut-off frequency beta = sqrt(k.^2 - kc^2); %waveguide phase-constant ZL_a = k * Z0 ./ beta; %analytic waveguide impedance disp([' Cutoff frequencies for this mode and wavguide is: ' num2str(fc/1e6) ' MHz']); if (f_start