![]() |
PDE解偏微分方程遇到问题,程序有问题,求助!
主程序:
clc; can = 0; omiga=10^(15); pi=3.1416; x = linspace(-0.5*10^(-10),0.5*10^(-10),100); t = linspace(0,2*pi/omiga,100); u = pdepe(can,@eqn1,@initial1,@bc1,x,t); surf(x,t,u); title('Surface plot of solution.'); xlabel('Distance x'); ylabel('Time t'); 三个函数(分别是方程,初始条件和边界条件,写在三个.m中): function [c,b,s] = eqn1(x,t,u,DuDx) hbar=1.0546*10^(-34); m=9.1*10^(-31); omiga=10^(15); F=10^(10); pi=3.1416; d=10^(-10); c = i*hbar; b = -hbar^2/2/m*DuDx; s = F*x*cos(omiga*t); %没乘e function value = initial1(x) pi=3.1416; d=10^(-10); value=sqrt(2/d)*cos(pi*x/d); function [pl,ql,pr,qr] = bc1(xl,ul,xr,ur,t) d=10^(-10); pl = ul+d/2; ql = 0; pr = ur-d/2; qr = 0; 画不出图,并且有两个warning: Warning: Failure at t=1.029005e-305. Unable to meet integration tolerances without reducing the step size below the smallest value allowed (3.655592e-320) at time t. Warning: Time integration has failed. Solution is available at requested time points up to t=0.000000e+000. 使用版本是MATLAB7。 |
回复: PDE解偏微分方程遇到问题,程序有问题,求助!
有人能提供帮助么?。。。
|
所有时间均为北京时间。现在的时间是 06:17。 |
Powered by vBulletin
版权所有 ©2000 - 2025,Jelsoft Enterprises Ltd.