登 录
註 冊
论坛
微波仿真网
注册
登录论坛可查看更多信息
微波仿真论坛
>
程序
>
Susan C. Hagness的1D/2D/3D FDTD(matlab)源码
发帖
回复
1
2
3
4
5
6
...28
下一页
到第
页
确认
88803
阅读
277
回复
[
资料共享
]
Susan C. Hagness的1D/2D/3D FDTD(matlab)源码
离线
gwzhao
方恨少
UID :17098
注册:
2008-08-24
登录:
2019-01-09
发帖:
1374
等级:
荣誉管理员
0楼
发表于: 2008-10-23 14:40:30
— 本帖被 tensor 从 资料库 移动到本区(2009-10-28) —
[post]%***********************************************************************
5S4Nx>
% 1-D FDTD code with simple radiation boundary conditions
+PYV-@q
%***********************************************************************
<sC(a7i1
%
dzIBdth
% Program author: Susan C. Hagness
OAkqPG&w
% Department of Electrical and Computer Engineering
oc"p5Y3,Os
% University of Wisconsin-Madison
t%mi#Gh(
% 1415 Engineering Drive
- k0a((?
% Madison, WI 53706-1691
[\ku,yd%0
% 608-265-5739
0")_%
%
hagness@engr.wisc.edu
YHN6/k7H
%
(hwzA *(c
% Date of this version: February 2000
ikZYc ${
%
c\.)vH
% This MATLAB M-file implements the finite-difference time-domain
iK4\N;H
% solution of Maxwell's curl equations over a one-dimensional space
CZzt=9
% lattice comprised of uniform grid cells.
'@ 24<T]
%
EZWWvL
% To illustrate the algorithm, a sinusoidal wave (1GHz) propagating
mg*iW55g
% in a nonpermeable lossy medium (epsr=1.0, sigma=5.0e-3 S/m) is
Lj /^cx
% modeled. The simplified finite difference system for nonpermeable
w8+phN(-M
% media (discussed in Section 3.6.6 of the text) is implemented.
s1OSuSL>
%
N n_b
% The grid resolution (dx = 1.5 cm) is chosen to provide 20
/*g0M2+OZo
% samples per wavelength. The Courant factor S=c*dt/dx is set to
3x(Y+ ymP
% the stability limit: S=1. In 1-D, this is the "magic time step."
F~v0CBcAL
%
PdKcDKJ
% The computational domain is truncated using the simplest radiation
=&g:dX|q8
% boundary condition for wave propagation in free space:
g#P]72TQ
%
=?CIC%6m
% Ez(imax,n+1) = Ez(imax-1,n)
]#N8e?b,
%
=n.&N
% To execute this M-file, type "fdtd1D" at the MATLAB prompt.
}G(#jOYk
% This M-file displays the FDTD-computed Ez and Hy fields at every
k Jz^\Re
% time step, and records those frames in a movie matrix, M, which is
[?6+ r
% played at the end of the simulation using the "movie" command.
#pWy%U
%
v#d3W| ~
%***********************************************************************
yu#m6K
([m4dr
clear
l/?bXNt
"wVisL2+.
%***********************************************************************
{%2p(5FB
% Fundamental constants
2X`t&zg
%***********************************************************************
di;~$rI!?
UJS vtD{g
cc=2.99792458e8; %speed of light in free space
oVl:g:K40
muz=4.0*pi*1.0e-7; %permeability of free space
C^?/9\
epsz=1.0/(cc*cc*muz); %permittivity of free space
-Nr*na^H9#
7LaRFL.,kO
freq=1.0e+9; %frequency of source excitation
P{RGW.Ci@
lambda=cc/freq; %wavelength of source excitation
P/S ,dhs(
omega=2.0*pi*freq;
?5G;=#I
p>U= Jg
%***********************************************************************
<'T DOYb
% Grid parameters
4[Ko|
%***********************************************************************
U*EBH
. Z`xNp
ie=200; %number of grid cells in x-direction
2*W|s7cc
U8aNL sw
ib=ie+1;
iQ;lvOja
RSeav
dx=lambda/20.0; %space increment of 1-D lattice
nr>Yj?la
dt=dx/cc; %time step
x[&)\[t
omegadt=omega*dt;
9G1ZW=83
9qq6P!
nmax=round(12.0e-9/dt); %total number of time steps
ra ,.vJuT
jJ RaY3
%***********************************************************************
&G-dxET]
% Material parameters
eiA$) rzy
%***********************************************************************
%U[H`E
)eX{a/Be
eps=1.0;
2L.6!THG
sig=5.0e-3;
uxX 3wY;M
RdjoVCf
%***********************************************************************
>N0L
% Updating coefficients for space region with nonpermeable media
`/G9*tIR8g
%***********************************************************************
xNJ*TA[+
)*}?EI4.
scfact=dt/muz/dx;
e ?Jgk$"
>2'A~?%
ca=(1.0-(dt*sig)/(2.0*epsz*eps))/(1.0+(dt*sig)/(2.0*epsz*eps));
6m:$RW
cb=scfact*(dt/epsz/eps/dx)/(1.0+(dt*sig)/(2.0*epsz*eps));
H ~<.2b
qus%?B{b}
%***********************************************************************
ErQGVE;zk
% Field arrays
*\0h^^|@
%***********************************************************************
6/0bis H
nWd;XR6|
ez(1:ib)=0.0;
(76tYt~I=
hy(1:ie)=0.0;
HbCcROl(
M"Y,kA|+
%***********************************************************************
h5n@SE>G
% Movie initialization
$F/xv&t
%***********************************************************************
@E> rqI;`
hBDmC_\~
x=linspace(dx,ie*dx,ie);
7 $Cv=8
b-#oE{(\'
subplot(2,1,1),plot(x,ez(1:ie)/scfact,'r'),axis([0 3 -1 1]);
gd0a,_`M
ylabel('EZ');
/mn'9=ks
7a4Z~r27/
subplot(2,1,2),plot(x,hy,'b'),axis([0 3 -3.0e-3 3.0e-3]);
[.;I}
xlabel('x (meters)');ylabel('HY');
x45F-w{
4`sW_ ks
rect=get(gcf,'Position');
b6""q9S!
rect(1:2)=[0 0];
a3[,3
/RF&@NJE5
M=moviein(nmax/2,gcf,rect);
|/u,6`
E]pDp /D
%***********************************************************************
pe!"!xJE
% BEGIN TIME-STEPPING LOOP
6anH#=(
%***********************************************************************
EQy~ ^7V B
GCrsf
for n=1:nmax
cVaGgP}\
{P ==6/<2o
%***********************************************************************
$b) k
% Update electric fields
i@=(Y~tD`
%***********************************************************************
rwpH9\GE
3'55!DE
ez(1)=scfact*sin(omegadt*n);
'qoaMJxN`
<Ug1g0.
rbc=ez(ie);
^ b{~]I
ez(2:ie)=ca*ez(2:ie)+cb*(hy(2:ie)-hy(1:ie-1));
Rz<'&Z>;
ez(ib)=rbc;
"i%=QON`
A4)TJY 3g
%***********************************************************************
|-]'~@~
% Update magnetic fields
#_'^oGz`
%***********************************************************************
.aC/ g?U
4SIS#m
hy(1:ie)=hy(1:ie)+ez(2:ib)-ez(1:ie);
8&y#LeM1TT
F ^)( 7}ph
%***********************************************************************
`cFNO:
% Visualize fields
2}9M7Z",2
%*********** ..
e'3y^Vg
FD8d-G
未注册仅能浏览
部分内容
,查看
全部内容及附件
请先
登录
或
注册
共
3
条评分
,
rf币
+11
,
技术分
+1
chenjiabao1989
rf币
+10
十分期待您分享下一贴!
2014-09-29
casey
rf币
+1
有自己的观点
2008-10-23
casey
技术分
+1
当时加错了,补上
2008-10-23
逆流而上
离线
gwzhao
方恨少
UID :17098
注册:
2008-08-24
登录:
2019-01-09
发帖:
1374
等级:
荣誉管理员
1楼
发表于: 2008-10-23 14:40:53
%***********************************************************************
kg]6q T;Y
% 2-D FDTD TE code with PML absorbing boundary conditions
k8+J7(_c
%***********************************************************************
QIGU i,R
%
GHcx@||C?
% Program author: Susan C. Hagness
UrizZ5a
% Department of Electrical and Computer Engineering
z_$c_J
% University of Wisconsin-Madison
hi1Ial\Y
% 1415 Engineering Drive
U]sAYp^$
% Madison, WI 53706-1691
dgkS5Q$/
% 608-265-5739
W/!P1M n
%
hagness@engr.wisc.edu
[! $NTt_
%
GpeW<% \P
% Date of this version: February 2000
uGMzU&+
%
.P)lQk\
% This MATLAB M-file implements the finite-difference time-domain
I/Vw2
% solution of Maxwell's curl equations over a two-dimensional
[ ulub|
% Cartesian space lattice comprised of uniform square grid cells.
pX SShU#
%
,*XB11P
% To illustrate the algorithm, a 6-cm-diameter metal cylindrical
"#r)NYq`"|
% scatterer in free space is modeled. The source excitation is
CLrX!JV>
% a Gaussian pulse with a carrier frequency of 5 GHz.
#{q.s[g*+1
%
T?pS2I~
% The grid resolution (dx = 3 mm) was chosen to provide 20 samples
E{|B&6$[}
% per wavelength at the center frequency of the pulse (which in turn
5CFNBb%Xy
% provides approximately 10 samples per wavelength at the high end
$9,&BW_*
% of the excitation spectrum, around 10 GHz).
4`5yrCd
%
{JgY-#R?{(
% The computational domain is truncated using the perfectly matched
z$%twBg}#
% layer (PML) absorbing boundary conditions. The formulation used
2IJK0w@
% in this code is based on the original split-field Berenger PML. The
^HC6v;K
% PML regions are labeled as shown in the following diagram:
`pfIgryns
%
$y8-JR~
% ----------------------------------------------
FOXSs8"c]!
% | | BACK PML | |
XDemdMy$
% ----------------------------------------------
h3CA,$HJ
% |L | /| R|
] 4dl6T
% |E | (ib,jb) | I|
faQmkO
% |F | | G|
=8\.fp
% |T | | H|
e2O6q05 ?Q
% | | MAIN GRID | T|
U g "W6`
% |P | | |
U N9hZ>9
% |M | | P|
bE _8NA"2
% |L | (1,1) | M|
a `R%\@1
% | |/ | L|
R*[sO*h\k
% ----------------------------------------------
puC91
% | | FRONT PML | |
S[Du >
% ----------------------------------------------
u.GnXuax
%
Y MX9Z||
% To execute this M-file, type "fdtd2D" at the MATLAB prompt.
{~U3|_"[pX
% This M-file displays the FDTD-computed Ex, Ey, and Hz fields at
bF"l0 jS
% every 4th time step, and records those frames in a movie matrix,
:o'x?]
% M, which is played at the end of the simulation using the "movie"
X;I9\Cp]!
% command.
vF27+/2+R
%
3kn-tM
%***********************************************************************
)'djqpM.
vY4sU@+V
clear
KNVu[P)rv
nuce(R
%***********************************************************************
W7S~~
% Fundamental constants
YWFE*wQ!
%***********************************************************************
'FErk~}/4s
f>N DtG.6
cc=2.99792458e8; %speed of light in free space
o`bc/3!
muz=4.0*pi*1.0e-7; %permeability of free space
rW{!8FhI
epsz=1.0/(cc*cc*muz); %permittivity of free space
80=0S^gEZ
&9yZfp
freq=5.0e+9; %center frequency of source excitation
WMB%?30
lambda=cc/freq; %center wavelength of source excitation
uz8LF47@:-
omega=2.0*pi*freq;
>P/36'
!jj`Ht)
%***********************************************************************
.xRdKt!p
% Grid parameters
w*qj0:i5as
%***********************************************************************
aB,-E>+
3Ua?^2l
ie=100; %number of grid cells in x-direction
#<*Vc6pC
je=50; %number of grid cells in y-direction
pXk^EV0
lzEynMO+
ib=ie+1;
^hIdmTf6
jb=je+1;
;*(-8R/
Un6R)MVT
is=15; %location of z-directed hard source
6r)P&J
js=je/2; %location of z-directed hard source
]~TsmR[
PYkhY;*
dx=3.0e-3; %space increment of square lattice
q/i2o[f'n
dt=dx/(2.0*cc); %time step
s3>a
SVCh!/qe\
nmax=300; %total number of time steps
zxyl+tU &
s)^/3a
iebc=8; %thickness of left and right PML region
XqTguO'
jebc=8; %thickness of front and back PML region
$L/`nd
rmax=0.00001;
(80m'.X
orderbc=2;
W2vL<
ibbc=iebc+1;
5UEZpxnv
jbbc=jebc+1;
}9fa]D-a?
iefbc=ie+2*iebc;
@*6fEG{,q
jefbc=je+2*jebc;
GY~$<^AK
ibfbc=iefbc+1;
wI%M3XaBws
jbfbc=jefbc+1;
B~Sj#(WEa
^? fOccfQ{
%***********************************************************************
f"MID6
% Material parameters
VBhUh~:Om
%***********************************************************************
$RD~,<oEm
-&Rv=q>
media=2;
mQ[$U
{2\Y%Y'}*
eps=[1.0 1.0];
7({)ou x
sig=[0.0 1.0e+7];
yaUtDC.|
mur=[1.0 1.0];
}`tSRB7
sim=[0.0 0.0];
`^M]|7
U&^q#['
%***********************************************************************
&W<7!U:2m
% Wave excitation
! ]4u"e
%***********************************************************************
3jx%]S^z|
HbTVuf o
rtau=160.0e-12;
W`>|OiuF
tau=rtau/dt;
Rh="<'d
delay=3*tau;
6!<I'M'[e
P>/:dt'GJ}
source=zeros(1,nmax);
I7ao2aS
for n=1:7.0*tau
sy&[Q{,4
source(n)=sin(omega*(n-delay)*dt)*exp(-((n-delay)^2/tau^2));
i)i>Ulj*i
end
~A0]vcP
4Gu'WbJ
%***********************************************************************
`+H=3`}X
% Field arrays
1T^WMn:U
%***********************************************************************
WgNA%.|,
"HOZ2_(o
ex=zeros(ie,jb); %fields in main grid
0z8(9DlTc
ey=zeros(ib,je);
]!hjKu"
hz=zeros(ie,je);
I68u%fCv
;UdM8+^/V]
exbcf=zeros(iefbc,jebc); %fields in front PML region
_"8n&=+
eybcf=zeros(ibfbc,jebc);
o[C^z7WG0
hzxbcf=zeros(iefbc,jebc);
te@m#`p9
hzybcf=zeros(iefbc,jebc);
hRkCB
Y=S0|!u
exbcb=zeros(iefbc,jbbc); %fields in back PML region
IwyA4Ak Ru
eybcb=zeros(ibfbc,jebc);
]*0zir/
hzxbcb=zeros(iefbc,jebc);
QkrQM&Im
hzybcb=zeros(iefbc,jebc);
v+ $3
Q):#6|u+
exbcl=zeros(iebc,jb); %fields in left PML region
?ANWI8'_j
eybcl=zeros(iebc,je);
M.}9)ho
hzxbcl=zeros(iebc,je);
=G-OIu+H!U
hzybcl=zeros(iebc,je);
!3b& S4
!0{SVsc)
exbcr=zeros(iebc,jb); %fields in right PML region
Iiy5;:CX:q
eybcr=zeros(ibbc,je);
YvY|\2^K
hzxbcr=zeros(iebc,je);
^y5A\nz&
hzybcr=zeros(iebc,je);
LU3pCM{
DV5hTw0
%***********************************************************************
\u[x<-\/6
% Updating coefficients
, ZsZzZ#
%***********************************************************************
Fis!MMh.$
o;8$#gyNY
for i=1:media
&L6Ivpj-
eaf =dt*sig(i)/(2.0*epsz*eps(i));
.UK0bxoa
ca(i)=(1.0-eaf)/(1.0+eaf);
~Ztn(1N
cb(i)=dt/epsz/eps(i)/dx/(1.0+eaf);
6-U_TV
haf =dt*sim(i)/(2.0*muz*mur(i));
I9?\Jbqg
da(i)=(1.0-haf)/(1.0+haf);
@Q1!xA^S
db(i)=dt/muz/mur(i)/dx/(1.0+haf);
2?,Jn&i5
end
!6/UwPs
oO2DPcK
%***********************************************************************
o "z()w~
% Geometry specification (main grid)
v93b8/1
%***********************************************************************
Nd(,oXa~
0]d;)_`@
% Initialize entire main grid to free space
?:R ]p2 ID
i?T-6{3I
caex(1:ie,1:jb)=ca(1);
)%C.IZ_s2
cbex(1:ie,1:jb)=cb(1);
,,H5zmgA
N&8$tJ(hhx
caey(1:ib,1:je)=ca(1);
196aYLE
cbey(1:ib,1:je)=cb(1);
9<mMU:
Ym'h vK
dahz(1:ie,1:je)=da(1);
>.<VD7p
dbhz(1:ie,1:je)=db(1);
_zj^k$ j
r8:r}Qj2w[
% Add metal cylinder
yP"2.9\erH
K V5 '-Sv1
diam=20; % diameter of cylinder: 6 cm
f 3UCELJ
rad=diam/2.0; % radius of cylinder: 3 cm
/-M:6
icenter=4*ie/5; % i-coordinate of cylinder's center
EjP;P}_iK
jcenter=je/2; % j-coordinate of cylinder's center
)fJ"Hq
~WA@YjQ]
for i=1:ie
V]zZb-m=
for j=1:je
-2hirA<^
dist2=(i+0.5-icenter)^2 + (j-jcenter)^2;
-2.7Z`*(
if dist2 <= rad^2
k_pv6YrE
caex(i,j)=ca(2);
y##h(y
cbex(i,j)=cb(2);
Y3 $jNuV
end
QE]'Dc%
dist2=(i-icenter)^2 + (j+0.5-jcenter)^2;
45~x #Q
if dist2 <= rad^2
(~~m 8VJ>
caey(i,j)=ca(2);
CCTU-Xz/
cbey(i,j)=cb(2);
[F<E0rjwM
end
(T1< (YZ
end
LL<xygd
end
]B/>=t"E
ItVN,sVJb
%***********************************************************************
:qm\FsO
% Fill the PML regions
w =GMQ8
%***********************************************************************
H-_gd.VD
=-sTV\
delbc=iebc*dx;
O:?3B!wF
sigmam=-log(rmax/100.0)*epsz*cc*(orderbc+1)/(2*delbc);
"#C2+SKM1
bcfactor=eps(1)*sigmam/(dx*(delbc^orderbc)*(orderbc+1));
Sz5t~U=G
1EU4/6!C
% FRONT region
TPp]UG
GDLw_usV
caexbcf(1:iefbc,1)=1.0;
8lQ}-8
cbexbcf(1:iefbc,1)=0.0;
<8WFaP3,
for j=2:jebc
UytMnJ88
y1=(jebc-j+1.5)*dx;
7I3_$uF
y2=(jebc-j+0.5)*dx;
JM7mQ'`Ud
sigmay=bcfactor*(y1^(orderbc+1)-y2^(orderbc+1));
dN2JOyS
ca1=exp(-sigmay*dt/(epsz*eps(1)));
:^7w
cb1=(1.0-ca1)/(sigmay*dx);
sVyV|!K
caexbcf(1:iefbc,j)=ca1;
0F[f%2j
cbexbcf(1:iefbc,j)=cb1;
0? {ADQz
end
LS~at.3zX
sigmay = bcfactor*(0.5*dx)^(orderbc+1);
wfo, r 7
ca1=exp(-sigmay*dt/(epsz*eps(1)));
.n<vhLDQn
cb1=(1-ca1)/(sigmay*dx);
[c{\el9H
caex(1:ie,1)=ca1;
H07\z1?.K
cbex(1:ie,1)=cb1;
bq/Aopfr
caexbcl(1:iebc,1)=ca1;
K P]ar.
cbexbcl(1:iebc,1)=cb1;
1Q@]b_"Xh
caexbcr(1:iebc,1)=ca1;
YTTyMn
cbexbcr(1:iebc,1)=cb1;
--$* q"
c~<;}ve^z
for j=1:jebc
-,8LL@_
y1=(jebc-j+1)*dx;
]dUG=dWO
y2=(jebc-j)*dx;
P&0eu
sigmay=bcfactor*(y1^(orderbc+1)-y2^(orderbc+1));
8'PZA,CW
sigmays=sigmay*(muz/(epsz*eps(1)));
@R&d<^I&M
da1=exp(-sigmays*dt/muz);
l<6GZ
db1=(1-da1)/(sigmays*dx);
ceUe*}\cr
dahzybcf(1:iefbc,j)=da1;
n&[CTOV
dbhzybcf(1:iefbc,j)=db1;
01r%K@ xX\
caeybcf(1:ibfbc,j)=ca(1);
x9YQd69
cbeybcf(1:ibfbc,j)=cb(1);
5%}e j)@
dahzxbcf(1:iefbc,j)=da(1);
$d*9]M4
dbhzxbcf(1:iefbc,j)=db(1);
S;4:`?s=i
end
(=j;rfvP
UWT%0t_T
% BACK region
{lf{0c$X.
ovKM;cRs/
caexbcb(1:iefbc,jbbc)=1.0;
<YyE1|
cbexbcb(1:iefbc,jbbc)=0.0;
v0DDim?cc
for j=2:jebc
-#ZvjEaey
y1=(j-0.5)*dx;
Qu|CXUk
y2=(j-1.5)*dx;
) H,Xkex
sigmay=bcfactor*(y1^(orderbc+1)-y2^(orderbc+1));
@j|E"VYY
ca1=exp(-sigmay*dt/(epsz*eps(1)));
ZDW9H6ux
cb1=(1-ca1)/(sigmay*dx);
D?n6h\h\$%
caexbcb(1:iefbc,j)=ca1;
`*s:[k5k
cbexbcb(1:iefbc,j)=cb1;
!Se0&Ob
end
c5ij2X|I
sigmay = bcfactor*(0.5*dx)^(orderbc+1);
DhE-g<
ca1=exp(-sigmay*dt/(epsz*eps(1)));
LdZVXp^
cb1=(1-ca1)/(sigmay*dx);
WE\TUENac(
caex(1:ie,jb)=ca1;
t]HY@@0g
cbex(1:ie,jb)=cb1;
#*g=F4>t
caexbcl(1:iebc,jb)=ca1;
gkr9+
cbexbcl(1:iebc,jb)=cb1;
+p%3pnj:K
caexbcr(1:iebc,jb)=ca1;
R,3cJ Y_%
cbexbcr(1:iebc,jb)=cb1;
~e}JqJ(97
n{gEIUo#
for j=1:jebc
{w2] Is2F
y1=j*dx;
WFF?VBT'^
y2=(j-1)*dx;
COw"6czX/
sigmay=bcfactor*(y1^(orderbc+1)-y2^(orderbc+1));
zM0}(5$m
sigmays=sigmay*(muz/(epsz*eps(1)));
i(.e=
da1=exp(-sigmays*dt/muz);
x_Ev2 c'4
db1=(1-da1)/(sigmays*dx);
h4]^~stI
dahzybcb(1:iefbc,j)=da1;
`\( ?^]WLa
dbhzybcb(1:iefbc,j)=db1;
2F2Hl
caeybcb(1:ibfbc,j)=ca(1);
cQEUHhRg!
cbeybcb(1:ibfbc,j)=cb(1);
!+SL=xy!{
dahzxbcb(1:iefbc,j)=da(1);
AlQhKL}|s
dbhzxbcb(1:iefbc,j)=db(1);
%Y&48''"
end
0x<ASfka
TsFhrtnx&X
% LEFT region
JVoC2Z<
uU^DYgs
caeybcl(1,1:je)=1.0;
6 - 3?&+
cbeybcl(1,1:je)=0.0;
HTL6;87w+]
for i=2:iebc
&qbEF3p^@
x1=(iebc-i+1.5)*dx;
it}h8:^<
x2=(iebc-i+0.5)*dx;
Wep^He\:
sigmax=bcfactor*(x1^(orderbc+1)-x2^(orderbc+1));
72;'8
ca1=exp(-sigmax*dt/(epsz*eps(1)));
~uhW~bT
cb1=(1-ca1)/(sigmax*dx);
33~MP;
caeybcl(i,1:je)=ca1;
'x%gJi#
cbeybcl(i,1:je)=cb1;
pB:XNkxL
caeybcf(i,1:jebc)=ca1;
Tf3CyH!k
cbeybcf(i,1:jebc)=cb1;
'iW
caeybcb(i,1:jebc)=ca1;
3H,x4L5j
cbeybcb(i,1:jebc)=cb1;
{.LJ(|(Mz
end
RiTL(Yx
sigmax=bcfactor*(0.5*dx)^(orderbc+1);
|[rn/
ca1=exp(-sigmax*dt/(epsz*eps(1)));
*tv&