Function of boundary conditions PDEPE

2 ビュー (過去 30 日間)
Ignacio
Ignacio 2014 年 3 月 20 日
コメント済み: Ignacio 2014 年 3 月 24 日
Hi! I want to set the boundary conditions for a heat transfer parabolic pde using the function PDEPE and the already curve fitted model interpol.mat (which has a function called fittedmodel that returns the temperature T at the time t, f.ex. fittedmodel(20)=300) as the temperature of the left and of the right wall, but it seems it does not work this way:
function [pl,ql,pr,qr] = pdex1bc(xl,ul,xr,ur,t)
load('interpol.mat');
pl=fittedmodel(t);
pr=fittedmodel(t);
ql=0;
qr=1;
The following error occurs:
Error using daeic12 (line 77)
This DAE appears to be of index
greater than 1.
Error in ode15s (line 311)
[y,yp,f0,dfdy,nFE,nPD,Jfac] =
daeic12(odeFcn,odeArgs,t,ICtype,Mt,y,yp0,f0,...
Error in pdepe (line 317)
[t,y] = ode15s(@pdeodes,t,y0,opts);
Error in pdemytry (line 45)
sol =
pdepe(m,@pdex1pde,@pdex1ic,@pdex1bc,x,t);
Thank you!

回答 (1 件)

Bill Greene
Bill Greene 2014 年 3 月 20 日
To set the temperature at each end to fittedmodel(t), you would define:
pl = ul-fittedmodel(t);
pr = ur-fittedmodel(t);
Take a look at the boundary condition equation 1-6 on this page pdepe
Bill
  1 件のコメント
Ignacio
Ignacio 2014 年 3 月 24 日
Thank you I will!

サインインしてコメントする。

Community Treasure Hunt

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

Start Hunting!

Translated by