Plotting of Numerical laplace inverse

2 次查看(过去 30 天)
I have this code for calculation of numerical laplace of my problem but i want to plot my sloution against 'y' instead of 't'.
by fixing value of 'y' i am having solution and graph of this numerical laplace between solution and 't'.
Kindly guide me how i can plot my solution against 'y'.
n=0;
n=n+1;
Er=10^-10;
Pr = 21;
phi = .04;
kC = 6600;
kF = .613;
rowF = 997;
rowC = 2600;
cpC = 425;
cfF = 4179;
betaC = 27;
betaF = 21;
lambda = 1;
Gr = 1;
phi1 = 1 - phi + phi*((rowC)/(rowF));
phi2 = 1/((1 - phi)^(2.5));
phi3 = 1 - phi + phi*((rowC*betaC)/(rowF*betaF));
phi4 = 1 - phi + phi*((rowC*cpC)/(rowF*cfF));
phi5 = (1 - phi + 2*phi*(kC/(kC - kF))*log((kC + kF)/(2*kF)))/(1-phi+2*phi*(kF/(kC - kF))*log((kC + kF)/(2*kF)));
a0 = phi1/phi2;
b0 = 1/(2*lambda);
b1 = (phi4/phi5)*pr ; %b1=-11
a = (a0 - b1)/(a0*lambda); %a=11
a1 = (phi3/phi2)*Gr;
a2 = (a0 - b1)/(a0*lambda); %a2=-11
a3 = (a1*sqrt(b1))/(a0*lambda); %a3=7
a4=phi2*a1; %a4=2.1882
lambda0 = 1/lambda;
a5 = a4 - (a4*lambda0)/a2; % a5=2.38
a6 = (a4*lambda0)/a2; %a6=-.1926
a7 = a3/a2;
c = sqrt(lambda*a0);
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
TIME=35;
Lmax=1;
u=1.5;
tmax=(u*TIME)/Lmax;
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
T=50;
sg0=0.00001;
sg=sg0-log(Er)/(2*T);
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
A1=a1*(lambda*sg+1)/(sg^2*(a0*lambda*sg+a0-b1));
% sol=-A1*(exp(-y*sqrt(a0*sg*(lambda*sg+1))))+A1*exp(-y*sqrt(b1*q));
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
t=0.0:0.1:tmax;
f=zeros(1,length(t));
f=f+ones(1,length(t))*1/2*(-A1*(exp(-y*sqrt(a0*sg*(lambda*sg+1))))+A1*exp(-y*sqrt(b1*sg)));
for j=1:length(t)
for p=1:1500 %p is the index of summation
A1=a1*(lambda*(sg+p*pi*i/T)+1)/((sg+p*pi*i/T)^2*(a0*lambda*(sg+p*pi*i/T)+a0-b1));
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
f(j)=f(j)+real(((-A1*(exp(-y*sqrt(a0*(sg+p*pi*i/T)*(lambda*(sg+p*pi*i/T)+1))))+A1*exp(-y*sqrt(b1*(sg+p*pi*i/T))))).*cos(p*pi*t(j)/T))-...
imag(((-A1*(exp(-y*sqrt(a0*(sg+p*pi*i/T)*(lambda*(sg+p*pi*i/T)+1))))+A1*exp(-y*sqrt(b1*(sg+p*pi*i/T))))).*sin(p*pi*t(j)/T));
end
f(j)=f(j)*exp(sg*t(j))/T% we are multiplying u with time becoz to bring the dimensionlesss effect.
end
plot(t.*Lmax/u,f,'k');

回答(0 个)

类别

Help CenterFile Exchange 中查找有关 Line Plots 的更多信息

标签

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by