|
> this is a system of pde about a basic chemical
> engeering problems. i have tryed many tims, but it
> shows
> ?? Error using ==> funfun\private\daeic12
> This DAE appears to be of index greater than 1.
>
> Error in ==> ode15s at 374
> [y,yp,f0,dfdy,nFE,nPD,Jfac] =
> c] = daeic12(odeFcn,odeArgs,t,ICtype,Mt,y,yp0,f0,...
>
> Error in ==> pdepe at 290
> [t,y] =
> ode15s(@pdeodes,t,y0,opts,pde,ic,bc,m,xmesh,xi,xim,zxm
> p1,xzmp1,varargin{:});
>
> Error in ==> huagong at 6
> sol = pdepe(m,@fhua,@huaic,@huabc,x,t);
> anyone who will answer it will be greatly
> appreciated!
>
> the following is the program:
>
> function huagong
>
>
> m = 0;
> x = linspace(0,1,100);
> t = linspace(0,2,100);
>
> sol = pdepe(m,@fhua,@huaic,@huabc,x,t);
> u(1)= sol(:,:,1);
> u(2)= sol(:,:,2);
>
> figure;
> surf(x,t,u(1));
> title('u(1)(x,t)');
> xlabel('Distance x');
> ylabel('Time t');
>
> figure;
> surf(x,t,u(2));
> title('u(2)(x,t)');
> xlabel('Distance x');
> ylabel('Time t');
>
>
>
>
> function [c,f,s] = fhua(x,t,u,DuDx)
> T0=600;
> c = [1.2e-1; 1.2e-1;];
>
> f = [-u(1); u(2)];
> s = [-1.005e9*u(1)*exp(-1.59e5/(8.314*T0))
> -58.897*(-u(2))
> ];
>
>
> function u0 = huaic(x)
> u0= [1; 1];
>
>
> function [p1,q1,pr,qr] =
> ,q1,pr,qr] = huabc(x1,u1,xr,ur,t)
> p1 = [1; 1 ];
> q1 = [1; -1];
> pr = [0; 0];
> qr = [0; 0];
The best way will be that you write down your pdes
in a mathematical notation and we will afterwards
search for the errors in your above MATLAB code.
Best wishes
Torsten.
|