EmFDTD

所属分类:数学计算
开发工具:matlab
文件大小:22KB
下载次数:206
上传日期:2008-09-26 12:13:41
上 传 者540665036
说明:  fdtd计算二维光子晶体带隙,程序较长,用起来还可以
(FDTD Calculation of two-dimensional photonic crystal band gap, the program is longer, can also be used together)

文件列表:
AddSource.m (1113, 2006-12-28)
AdvanceETime.m (701, 2006-12-28)
AdvanceMTime.m (682, 2006-12-28)
BandStructure.m (1451, 2006-12-28)
BlochDiff.m (1335, 2006-12-28)
Column.m (503, 2006-12-28)
Constants.m (765, 2006-12-28)
EffectiveIndex.m (928, 2006-12-28)
emfdtd.m (646, 2006-12-28)
emplot.m (594, 2006-12-28)
GenerateSnapshot.m (582, 2006-12-28)
Go.m (1062, 2006-12-28)
InitialField.m (909, 2006-12-28)
Initialize.m (1263, 2006-12-28)
InitializePML.m (3613, 2006-12-28)
InitializeSource.m (909, 2006-12-28)
Introduction.m (789, 2006-12-28)
IsEven.m (505, 2006-12-28)
LoadComponent.m (620, 2006-12-28)
LoadField.m (605, 2006-12-28)
MakeFileName.m (634, 2006-12-28)
MakeProfile.m (983, 2006-12-28)
MeasurePower.m (739, 2006-12-28)
PeakDetect.m (739, 2006-12-28)
PlotBands.m (773, 2006-12-28)
PlotBandStructure.m (1431, 2006-12-28)
PlotSnapshot.m (1217, 2006-12-28)
PlotStructure.m (953, 2006-12-28)
PutHole.m (823, 2006-12-28)
PutRectangle.m (708, 2006-12-28)
Row.m (498, 2006-12-28)
RunFDTD.m (1115, 2006-12-28)
RunFFT.m (706, 2006-12-28)
SaveComponent.m (891, 2006-12-28)
SaveField.m (748, 2006-12-28)
ScanPath.m (751, 2006-12-28)
UserDefinedStructure.m (4459, 2006-12-28)
UserDefinedVariables.m (4497, 2006-12-28)

==================================================== In the Name of the Most High ==================================================== ==================================================== ==================================================== ELECTROMAGNETIC FINITE-DIFFERENCE TIME-DOMAIN VERSION 1.20, RELEASE 1 (C) Copyright 2005 Sharif University of Technology School of Electrical Engineering All Rights Reserved ==================================================== ==================================================== ==================================================== Please read this file before using this code. ==================================================== (A) Introduction ==================================================== Electromagnetic Finite-Difference Time-Domain (EmFDTD) is a basic two-dimensional FDTD code developed at the School of Electrical Engineering, Sharif University of Technology. This code has been written based on the standard Yee's FDTD algorithm. Applications include propagation, scattering, and diffraction of electromagnetic waves in homogeneous and non-homogeneous isotropic media for in-plane propagating waves. Negative permittivites or permeabilities as well as dispersion is not included. Zero, Periodic, and Perfectly Matched Layer boundary conditions may be selectively applied to the solution domain. The program is best suited for study of propagation and diffraction of electromagnetic waves in Photonic Crystal structures. EmFDTD is written in MATLAB language and has been tested under MATLAB 5.0 and higher versions. ==================================================== (B) Installation ==================================================== Create a folder such as E:\EmFDTD\ and Unzip EmFDTD.zip into E:\EmFDTD\. You furthermore need to create the internal subdirectory E:\EmFDTD\Output\, where EmFDTD stores its output datafiles. Under MATLAB, select E:\EmFDTD\ as the working path and run the code according to the instructions below. ==================================================== (C) Usage ==================================================== EmFDTD consists of two scripts emfdtd.m, emplot.m, and other thirty six .m files, which provide internal functions to the above scripts. You may run EmFDTD only by typing either emfdtd or emplot at the MATLAB command line. The electromagnetic problem and structure is defined in the following functions UserDefinedVariables.m, UserDefinedStructure.m. The user is normally allowed to modify only these two .m files starting with the prefix 'UserDefined'. The rest of the code communicated through the initial data defined in the UserDefined*.m functions. The description of problem is completely given in the UserDefinedVariables.m function. Adjustable variables ONLY are: %%%%%%%%%% Simulation Type %%%%%%%%%%%%%%%% Mode=TM; % TE (H-polarization) or TM (E-polarization) StructureType=0; % 0 => Square Lattice, 1 => Triangular Lattice, -1 => Extended Square Lattice BoundaryType=1; % 0 => Zero(x-y), 1 => Bloch(x-y), 2 => Bloch(x)/Zero(y) % 3 => Zero(x)/Bloch(y), 4 => Bloch(x)/PML(y), 5 => PML(x)/Bloch(y), 6 => PML(x-y) Source=0; % 0 => Initial Field, 1 => Point Source, 2 => Huygens Source %%%%%%%%%%%% Control Variables %%%%%%%%%%%%%%%% LatticeCnt=24; % Number of Grid Points Per Lattice Constant xCells=1; % Number of primitive cells along x-direction yCells=1; % Number of primitive cells along y-direction dT=0.25; % Time step compared to the maximum allowed time step TimeSteps=2^14; % The total number of time steps TimeDecimation=1; % The sampling decimation factor SnapshotTimes=[]; % An array declaring the snapshot moments PowerTime=2^6; % The time step from which power integration starts PowerPlanes=[2 xGrid-1];% An array declaring the x-position of integration planes of power DefaultFileNamePrefix='Square'; % Default file name prefix FileExtension='.dat'; % Extension name xProbe=round(xGrid/2); % x-coordinate of field Probe yProbe=round(yGrid/2); % y-coordinate of field Probe NoDiv=16; % Number of divisions along each direction in inverse lattice MaximumFreqency=0.6; % Maximum normalized frequency in band-structure simulations Threshold=0.001; % Minimum relative detectable peak in the Fourier spectrum %%%%%%%%%%%% Source Variables %%%%%%%%%%%%%%%%% % Gaussian Initial Field Alpha=1.2/xGrid; % Decay factor in initial Gaussion field xCenter=round(xGrid/2); % x-coordinate of Center of Gaussion initial field yCenter=round(yGrid/2); % y-coordinate of Center of Gaussion initial field % Point Source NormalizedFrequency=0.2373; % Normalized Source Frequency a/l (Lattice Constant/Free Space Lambda) SourceDuration=TimeSteps; % The time step at which source is turned off xSource=round(xGrid/2); % x-coordinate of the point source ySource=round(yGrid/2); % y-coordinate of the point source % Symmetric Huygens Slab Waveguide Source ModeNumber=0; % Mode number WaveguideWidth=LatticeCnt; % Film thickness eC=Air; % Permittivity of Cladding mC=1; % Permeability of Cladding eF=Silicon; % Permittivity of Film mF=1; % Permeability of Film SourceWidth=2*WaveguideWidth; % Width of the Huygens source %%%%%%%%%%%% Garphics Controls %%%%%%%%%%%%%%%% ShowStructure=True; % Plot the structure on snapshots StructureColor=0.33; % Structure color level (ranging from -1 to 1) ShowPML=False; % Hide the PML layers around DrawStructure=False; % Generate separate Permittivity and Permeability plots Animate=False; % No Frame by Frame Display & Pause Do not modify the rest of the code and/or variables, unless you have full understanding of the operation and algorithm of EmFDTD. In UserDefinedStructure.m the profile of permittivity and permeability is defined. Several internal functions are given therein, to which the user may refer for further descriptions. ==================================================== (D) Warranty ==================================================== There is no warranty coming with this code. ==================================================== (E) Copyright ==================================================== The EmFDTD software is freeware, which means it may be freely distributed and used indefinitely for research or academic usage. However, no part of the code may directly or indirectly be published, used, modified or compiled for linking to other codes, or posted on the other webpages. Output of the code, however, may be used in presentations, research articles, and classrooms. The user needs in this case to properly acknowledge by including: 'The results are generated by EmFDTD code developed at Sharif University of Technology,' in the written form. All rights are reserved, and belong to the School of Electrical Engineering at Sharif University of Technology. ==================================================== (F) Bugs, Questions and Comments ==================================================== The user is kindly requested to report the bugs or send the questions and comments to the following address: S. Khorasani School of Electrical Engineering Sharif University of Technology P. O. Box 11365-9363 Tehran, Iran Email: pbg@ee.sharif.edu Fax: +***21-6602-3261 ==================================================== Enjoy! Dated: December 28, 2006

近期下载者

相关文件


收藏者