資源簡介
這個程序是用matlab實現二維fdtd的運算,吸收邊界用PML來處理,希望大家認真學習參悟。
代碼片段和文件信息
%***********************************************************************
%?????2-D?FDTD?TE?code?with?PML?absorbing?boundary?conditions
%***********************************************************************
%
%?????Program?author:?Susan?C.?Hagness
%?????????????????????Department?of?Electrical?and?Computer?Engineering
%?????????????????????University?of?Wisconsin-Madison
%?????????????????????1415?Engineering?Drive
%?????????????????????Madison?WI?53706-1691
%?????????????????????608-265-5739
%?????????????????????hagness@engr.wisc.edu
%
%?????Date?of?this?version:??February?2000
%
%?????This?MATLAB?M-file?implements?the?finite-difference?time-domain
%?????solution?of?Maxwell‘s?curl?equations?over?a?two-dimensional
%?????Cartesian?space?lattice?comprised?of?uniform?square?grid?cells.
%
%?????To?illustrate?the?algorithm?a?6-cm-diameter?metal?cylindrical?
%?????scatterer?in?free?space?is?modeled.?The?source?excitation?is?
%?????a?Gaussian?pulse?with?a?carrier?frequency?of?5?GHz.
%
%?????The?grid?resolution?(dx?=?3?mm)?was?chosen?to?provide?20?samples
%?????per?wavelength?at?the?center?frequency?of?the?pulse?(which?in?turn
%?????provides?approximately?10?samples?per?wavelength?at?the?high?end
%?????of?the?excitation?spectrum?around?10?GHz).
%
%?????The?computational?domain?is?truncated?using?the?perfectly?matched
%?????layer?(PML)?absorbing?boundary?conditions.??The?formulation?used?
%?????in?this?code?is?based?on?the?original?split-field?Berenger?PML.?The
%?????PML?regions?are?labeled?as?shown?in?the?following?diagram:?
%
%????????????----------------------------------------------
%???????????|??|????????????????BACK?PML????????????????|??|
%????????????----------------------------------------------
%???????????|L?|???????????????????????????????????????/|?R|
%???????????|E?|????????????????????????????????(ibjb)?|?I|
%???????????|F?|????????????????????????????????????????|?G|
%???????????|T?|????????????????????????????????????????|?H|
%???????????|??|????????????????MAIN?GRID???????????????|?T|
%???????????|P?|????????????????????????????????????????|??|
%???????????|M?|????????????????????????????????????????|?P|
%???????????|L?|?(11)??????????????????????????????????|?M|
%???????????|??|/???????????????????????????????????????|?L|
%????????????----------------------------------------------
%???????????|??|????????????????FRONT?PML???????????????|??|
%????????????----------------------------------------------
%
%?????To?execute?this?M-file?type?“fdtd2D“?at?the?MATLAB?prompt.
%?????This?M-file?displays?the?FDTD-computed?Ex?Ey?and?Hz?fields?at?
%?????every?4th?time?step?and?records?those?frames?in?a?movie?matrix?
%?????M?which?is?played?at?the?end?of?the?simulation?using?the?“movie“?
%?????command.
%
%***********************************************************************
clear
%***********************************************************************
%?????Fundamental?constan
評論
共有 條評論