WICHTIG: Der Betrieb von goMatlab.de wird privat finanziert fortgesetzt. - Mehr Infos...

Mein MATLAB Forum - goMatlab.de

Mein MATLAB Forum

 
Gast > Registrieren       Autologin?   

Partner:




Forum
      Option
[Erweitert]
  • Diese Seite per Mail weiterempfehlen
     


Gehe zu:  
Neues Thema eröffnen Neue Antwort erstellen

Helfen!! Für PDE Programm.

 

shiyichun
Forum-Newbie

Forum-Newbie


Beiträge: 3
Anmeldedatum: 22.01.08
Wohnort: ---
Version: ---
     Beitrag Verfasst am: 17.03.2008, 13:11     Titel: Helfen!! Für PDE Programm.
  Antworten mit Zitat      
Ich habe eine Program PDE zu plotten. Aber er hat immer Error!!
Wer kann ich sich helfen??
Programm is hier:
----------------------------------------------------------------------
function pipe
m = 0;
z = linspace(0,5,30); % Distance z=5 m
t = linspace(0,1,5); % Time t=10

sol = pdepe(m,@pipepde,@pipeic,@pipebc, z, t); % Extract the first solution component as T.
T = sol(:,:,1);

% A surface plot is often a good way to study a solution.
surf(z,t,T)
title('Numerical solution computed with 20 mesh points.')
xlabel('Distance z')
ylabel('Time t')

% A solution profile can also be illuminating.
figure
plot(z,T(end, : ) )
title('Solution at t = 10')
xlabel('Distance z')
ylabel('T(z,10)')

function [c,f,s] = pipepde(z,t,T,DTDz)

A=85.568;
B=50;
C=3.792e6;
Tu = 200+177.14*z; % Ambient temperature
c = C;
f = B*DTDz;
s = A*(3.1839*z^2+4.848*z+10.158)*(T-Tu);
%---------------------------------------------

function T0=pipeic(z)

T0=22.968*z^2+12.13*z+35.65; % initial condition when t=0
%---------------------------------------------

function [pl,ql,pr,qr] = pipebc(zl,Tl,zr,Tr,t)

Tz0 = 35.65; % temperature at z=0 at any time t

pl = Tz0; % Left boundary condition for z=0
ql = 0;

pr = 0; % Right boundary condition for z=L
qr = 1;
--------------------------------------------------------------------------------------

Immer Error von Matlab:

??? 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] = 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,zxmp1,xzmp1,varargin{:});

Error in ==> pipe at 6
sol = pdepe(m,@pipepde,@pipeic,@pipebc, z, t); % Extract the first solution component as T.



Danke!!

Yichun Shi

Email: shiyichun@gmail.com
Private Nachricht senden Benutzer-Profile anzeigen


Birgit

Gast


Beiträge: ---
Anmeldedatum: ---
Wohnort: ---
Version: ---
     Beitrag Verfasst am: 11.02.2009, 18:02     Titel:
  Antworten mit Zitat      
Das selbe problem habe ich auch .
Ich meine die selbe fehlermeldung hast du schon eine lösung gefunden?
 
Neues Thema eröffnen Neue Antwort erstellen



Einstellungen und Berechtigungen
Beiträge der letzten Zeit anzeigen:

Du kannst Beiträge in dieses Forum schreiben.
Du kannst auf Beiträge in diesem Forum antworten.
Du kannst deine Beiträge in diesem Forum nicht bearbeiten.
Du kannst deine Beiträge in diesem Forum nicht löschen.
Du kannst an Umfragen in diesem Forum nicht mitmachen.
Du kannst Dateien in diesem Forum posten
Du kannst Dateien in diesem Forum herunterladen
.





 Impressum  | Nutzungsbedingungen  | Datenschutz | FAQ | goMatlab RSS Button RSS

Hosted by:


Copyright © 2007 - 2024 goMatlab.de | Dies ist keine offizielle Website der Firma The Mathworks

MATLAB, Simulink, Stateflow, Handle Graphics, Real-Time Workshop, SimBiology, SimHydraulics, SimEvents, and xPC TargetBox are registered trademarks and The MathWorks, the L-shaped membrane logo, and Embedded MATLAB are trademarks of The MathWorks, Inc.