资源简介
本书英文名叫The Finite Difference Time Domain Method for Electromagnetics With MATLAB Simulations,Atef Elsherbeni编写。中文名《MATLAB模拟的电磁学时域有限差分法》,俞志远翻译。本文件里还有源程序可供参考学习
代码片段和文件信息
% This program demonstrates a one-dimensional FDTD simulation.
% The problem geometry is composed of two PEC plates extending to
% infinity in y and z dimensions parallel to each other with 1 meter
% separation. The space between the PEC plates is filled with air.
% A sheet of current source paralle to the PEC plates is placed
% at the center of the problem space. The current source excites fields
% in the problem space due to a z-directed current density Jz
% which has a Gaussian waveform in time.
% Define initial constants
eps_0 = 8.854187817e-12; % permittivity of free space
mu_0 = 4*pi*1e-7; % permeability of free space
c = 1/sqrt(mu_0*eps_0); % speed of light
% Define problem geometry and parameters
domain_size = 1; % 1D problem space length in meters
dx = 1e-3; % cell size in meters
dt = 3e-12; % duration of time step in seconds
number_of_time_steps = 2000; % number of iterations
nx = round(domain_size/dx); % number of cells in 1D problem space
source_position = 0.5; % position of the current source Jz
% Initialize field and material arrays
Ceze = zeros(nx+11);
Cezhy = zeros(nx+11);
Cezj = zeros(nx+11);
Ez = zeros(nx+11);
Jz = zeros(nx+11);
eps_r_z = ones (nx+11); % free space
sigma_e_z = zeros(nx+11); % free space
Chyh = zeros(nx1);
Chyez = zeros(nx1);
Chym = zeros(nx1);
Hy = zeros(nx1);
My = zeros(nx1);
mu_r_y = ones (nx1); % free space
sigma_m_y = zeros(nx1); % free space
% Calculate FDTD updating coefficients
Ceze = (2 * eps_r_z * eps_0 - dt * sigma_e_z) ...
./(2 * eps_r_z * eps_0 + dt * sigma_e_z);
Cezhy = (2 * dt / dx) ...
./(2 * eps_r_z * eps_0 + dt * sigma_e_z);
Cezj = (-2 * dt) ...
./(2 * eps_r_z * eps_0 + dt * sigma_e_z);
Chyh = (2 * mu_r_y * mu_0 - dt * sigma_m_y) ...
./(2 * mu_r_y * mu_0 + dt * sigma_m_y);
Chyez = (2 * dt / dx) ...
./(2 * mu_r_y * mu_0 + dt * sigma_m_y);
Chym = (-2 * dt) ...
./(2 * mu_r_y * mu_0 + dt * sigma_m_y);
% Define the Gaussian source waveform
time = dt*[0:number_of_time_steps-1].‘;
Jz_waveform = exp(-((time-2e-10)/5e-11).^2);
source_position_index = round(nx*source_position/domain_size)+1;
% Subroutine to initialize plotting
initialize_plotting_parameters;
% FDTD loop
for time_step = 1:number_of_time_steps
% Update Jz for the current time step
Jz(source_position_index) = Jz_waveform(time_step);
% Update magnetic field
Hy(1:nx) = Chyh(1:nx) .* Hy(1:nx) ...
+ Chyez(1:nx) .* (Ez(2:nx+1) - Ez(1:nx)) ...
+ Chym(1:nx) .* My(1:nx);
% Update electric field
Ez(2:nx) = Ceze (2:nx) .* Ez(2:nx) ...
+ Cezhy(2:nx) .* (Hy(2:nx) - Hy(1:nx-1)) ...
+ Cezj(2:nx) .* Jz(2:nx);
Ez(1) = 0; % A
属性 大小 日期 时间 名称
----------- --------- ---------- ----- ----
目录 0 2019-06-25 14:33 MATLAB模拟的电磁学时域有限差分法\
目录 0 2019-06-25 14:33 MATLAB模拟的电磁学时域有限差分法\Appendix_A\
文件 3184 2012-09-07 15:40 MATLAB模拟的电磁学时域有限差分法\Appendix_A\fdtd_1d_code.m
文件 836 2012-09-07 15:40 MATLAB模拟的电磁学时域有限差分法\Appendix_A\initialize_plotting_parameters.m
文件 353 2012-09-07 15:40 MATLAB模拟的电磁学时域有限差分法\Appendix_A\plot_fields.m
目录 0 2019-06-25 14:33 MATLAB模拟的电磁学时域有限差分法\Appendix_C\
文件 3206 2012-09-07 15:40 MATLAB模拟的电磁学时域有限差分法\Appendix_C\polar_plot_constant_phi.m
文件 2418 2012-09-07 15:40 MATLAB模拟的电磁学时域有限差分法\Appendix_C\polar_plot_constant_theta.m
目录 0 2019-06-25 14:33 MATLAB模拟的电磁学时域有限差分法\Chapter_1\
目录 0 2019-06-25 14:33 MATLAB模拟的电磁学时域有限差分法\Chapter_10\
文件 5155 2012-09-07 15:40 MATLAB模拟的电磁学时域有限差分法\Chapter_10\calculate_domain_size.m
文件 600 2012-09-07 15:40 MATLAB模拟的电磁学时域有限差分法\Chapter_10\define_geometry.m
目录 0 2019-06-25 14:33 MATLAB模拟的电磁学时域有限差分法\Chapter_10\example_10_a\
文件 606 2012-09-07 15:40 MATLAB模拟的电磁学时域有限差分法\Chapter_10\example_10_a\define_geometry.m
文件 1364 2012-09-07 15:40 MATLAB模拟的电磁学时域有限差分法\Chapter_10\example_10_a\define_output_parameters.m
文件 2723 2012-09-07 15:40 MATLAB模拟的电磁学时域有限差分法\Chapter_10\example_10_a\define_problem_space_parameters.m
文件 853 2012-09-07 15:40 MATLAB模拟的电磁学时域有限差分法\Chapter_10\example_10_a\define_sources_and_lumped_elements.m
文件 2640 2012-09-07 15:40 MATLAB模拟的电磁学时域有限差分法\Chapter_10\initialize_thin_wire_updating_coefficients.m
文件 1820 2012-09-07 15:40 MATLAB模拟的电磁学时域有限差分法\Chapter_10\initialize_updating_coefficients.m
目录 0 2019-06-25 14:33 MATLAB模拟的电磁学时域有限差分法\Chapter_11\
文件 4054 2012-09-07 15:40 MATLAB模拟的电磁学时域有限差分法\Chapter_11\calculate_and_display_farfields.m
文件 7067 2012-09-07 15:40 MATLAB模拟的电磁学时域有限差分法\Chapter_11\calculate_farfields_per_plane.m
文件 506 2012-09-07 15:40 MATLAB模拟的电磁学时域有限差分法\Chapter_11\calculate_incident_plane_wave_power.m
文件 661 2012-09-07 15:40 MATLAB模拟的电磁学时域有限差分法\Chapter_11\define_sources_and_lumped_elements.m
文件 4680 2012-09-07 15:40 MATLAB模拟的电磁学时域有限差分法\Chapter_11\display_transient_parameters.m
目录 0 2019-06-25 14:33 MATLAB模拟的电磁学时域有限差分法\Chapter_11\example_11_a\
文件 250 2012-09-07 15:40 MATLAB模拟的电磁学时域有限差分法\Chapter_11\example_11_a\define_geometry.m
文件 1352 2012-09-07 15:40 MATLAB模拟的电磁学时域有限差分法\Chapter_11\example_11_a\define_output_parameters.m
文件 2718 2012-09-07 15:40 MATLAB模拟的电磁学时域有限差分法\Chapter_11\example_11_a\define_problem_space_parameters.m
文件 661 2012-09-07 15:40 MATLAB模拟的电磁学时域有限差分法\Chapter_11\example_11_a\define_sources_and_lumped_elements.m
目录 0 2019-06-25 14:33 MATLAB模拟的电磁学时域有限差分法\Chapter_11\example_11_b\
............此处省略433个文件信息
- 上一篇:二维薄板声子晶体.mph
- 下一篇:精通MATLAB神经网络.zip
相关资源
- 精通MATLAB神经网络.zip
- matlab对Paviau高光谱数据集分类
- MATLAB数字水印dwt+dct+多攻击+GUI界面.
- MATLAB数学实验第2版 [胡良剑,孙晓君
- MATLAB之父 编程实践 中文版
- Quaternion and Octonion Color Image Processing
-
《基于matlab-simuli
nk仿真技术》薛定 - matlab智能算法
- MATLAB高效编程技巧与应用:25个案例分
- 基于MATLAB故障诊断技术光盘及工具箱
- matlab-mapping toolbox-提取自r2019b
- 基于matlab车流量统计
- 《精通MATLAB金融计算》.pdf
- 数值分析及其MATLAB实现284528
- 图论算法及其MATLAB实现全书+源代码
- MATLAB编程与工程应用第二版,完整扫
- MATLAB数值积分方法在电气工程中的应
- MATLAB数值分析与应用
- TLD算法作者原MATLAB+C版添加个人注释
- 灰色关联分析算法matlab实现
- 小波工具箱最全ppt-Matlab中的小波分析
-
基于Simuli
nk的OFDM系统分析及仿真学 - 模糊层次分析法的Matlab实现
- MATLAB图像处理_程序实现与模块化仿真
- 数值计算方法与MATLAB应用
- matlab卫星定位算法
- matlab程序设计基础与应用.pdf276654
- 数学建模案例matlab代码
- MATLAB仿真在现代通信中的应用
- 中科大科学计算与MATLAB语言课件
评论
共有 条评论