Skip to content

Commit

Permalink
update
Browse files Browse the repository at this point in the history
  • Loading branch information
overengineer committed Apr 16, 2019
1 parent 18a944f commit 5a04548
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 66 deletions.
4 changes: 2 additions & 2 deletions TR2D.m
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
sigma = 0;
ksi = (dt * sigma) / ( 2 * eps0* eps_r );
%calculation parameters
n_iter = 10000;
n_iter = 500;
%initalization
Hx = zeros(nx,ny);
Hy = zeros(nx,ny);
Expand All @@ -40,7 +40,7 @@
Ez(2:nx-1,2:ny-1) = ((1-ksi)/(1+ksi))*Ez(2:nx-1,2:ny-1) - ((1/(1+ksi))*(dt/(eps0*eps_r)))*((1/dx)*Hyx(2:nx-1,2:ny-1) - (1/dy)*Hxy(2:nx-1,2:ny-1));

for i=1:1:23
Ez(i*10,:) = Ez(i*10,:) + receivers(i,end:-1:1);
Ez(i*10,srcy) = Ez(i*10,srcy) + receivers(i,n);
end
%Neuman Condition
Ez(:,2) = -Ez(:,1);
Expand Down
61 changes: 0 additions & 61 deletions bitirme5.asv

This file was deleted.

6 changes: 3 additions & 3 deletions bitirme5.m
Original file line number Diff line number Diff line change
Expand Up @@ -22,12 +22,12 @@
sigma = 0.52; %S/m
ksi = (dt * sigma) / ( 2 * eps0 * eps_r );
%calculation parameters
n_iter = 10000;
n_iter = 500;
%initalization
Hx = zeros(nx,ny);
Hy = zeros(nx,ny);
Ez = zeros(nx,ny);
receivers = zeros(23,ny);
receivers = zeros(23,n_iter);
%iteration
for n=1:1:n_iter
%Maxwell Equations (TMz)
Expand All @@ -49,7 +49,7 @@
%display
%n = n + 1;
for i=1:1:23
receivers(i,:) = Ez(i*10,:);
receivers(i,n) = Ez(i*10,srcy);
end
pcolor(Ez')
colorbar
Expand Down
Binary file added bitirme5.mat
Binary file not shown.

0 comments on commit 5a04548

Please sign in to comment.