Reputation: 41
Equation:
variable: z, t
want: S = S(z,t), A = A(z,t)
parameter: a,b,c
i is sqrt(-1)
d is the partial derivative operator
dS/dt = -i*a*z*S - i*b*A
(d/dz +c*d/dt)A = -i*S
Boundary condition:
sigma is the pulse width
tm is center of the pulse
at z = 0,
A(1,t) = (0.398942/sigma)*exp(-((t-tm).^2)/(2*sigma^2)) (Gaussian pulse)
at z = 1, boundary condition is not clear. Expected to be near 0. If I use Mathematica, then it is not necessary to specify this boundary condition. Actually this boundary is the aim of solving this pde.
Initial condition:
at t = 0,
S = 0
A = 0(near 0. It should be the rim of the above Gaussian pulse)
I was trying to solve this pde set with pdepe. The result shows:
??? Error using ==> daeic12 at 77 This DAE appears to be of index greater than 1.
My question is: can pdepe solve peds like these?
×××××××××××××××××××××××××××××××××××××××××××××××××××××××××××××××××××××××××
Details: change the equation into the form of:
[1; c].* d/dt [S; A] = d/dz [0; -A] + [-i*a*z*S-i*b*A; -i*S]
Then my code for equation: (parameter name is changed, not long called a, b and c)
function [ c,f,s ] = myPdeNoDecay( z,t,u,dudz)
LoverzetacT = 6.712414322355693e-05;
betaLT = 66.713366022882500;
omegayetaksbarLT = 4.183966095613130e+02;
c = [1;LoverzetacT];
f = [0;-u(2)];
s = -1i*[betaLT.*z.*u(1)+omegayetaksbarLT.*u(2);u(1)];
end
Boundary condition:
function [ pl,ql,pr,qr ] = myPdeNoDecayBC( xl,ul,xr,ur,t )
tm = 0.5; %ns, Normalized central time of the pulse
sigma = 0.1; %ns, Normalized width of the pulse, 10^-7s
pl = [ul(2)-iniShape(t,sigma,tm);0];
ql = [0;0];
pr = [0;0];
qr = [0;0];
end
function [G] = iniShape(t,sigma,tm)
G = (0.398942/sigma)*exp(-((t-tm).^2)/(2*sigma^2));
end
Initial condition:
function [ u0 ] = myPdeNoDecayIC( x )
u0 = [0;0];
end
main function:
clear
close all
tlist = 0:0.05:1;
zlist = 0:0.05:1;
LoverzetacT = 6.712414322355693e-05;
betaLT = 66.713366022882500;
omegayetaksbarLT = 4.183966095613130e+02;
tm = 0.5; %ns, Normalized central time of the pulse
sigma = 0.1; %ns, Normalized width of the pulse, 10^-7s
m = 0;
sol = pdepe(m,@myPdeNoDecay,@myPdeNoDecayIC,@myPdeNoDecayBC,zlist,tlist);
figure('numbertitle','off','name','my PDE with no decay or two-ph detuning')
subplot(211);
surf(zlist,tlist,sol(:,:,1));
title('The solution of S');
xlabel('z');
ylabel('t');
zlabel('S(z,t)');
title('The solution of a');
xlabel('z');
ylabel('t');
zlabel('a(z,t)');
error is:
??? Error using ==> daeic12 at 77
This DAE appears to be of index greater than 1.
Upvotes: 1
Views: 1339
Reputation: 24127
No, pdepe can't solve equations where the DAE index is greater than one.
Upvotes: 1