Help with pdepe - This DAE appears to be of index greater than 1.

2 views (last 30 days)
Hey,
i am trying to make a shearrate and temperature model for a fluid of high viscosity and to solve it with pdepe. My Problem is, that it usually shows the error:
This DAE appears to be of index greater than 1.
After looking around a little, I tried to change the initial function to a polynome. Which kind of worked but the Condition of the Problem got very bad, so it just became another error.
I believe the Problem is based in my second Function b(2) and the Variable u(2) which have no direct dependency in time but Temperature only, which is my first variable u(1).
Anyway I see no possibility in changing that. Can anyone help me with the math and/or pdepe?
Main Script -----------------
m = 1;
x = linspace(4.9,8.5,10);
t = linspace(0.0001,20,10);
sol = pdepe(m,@eqn1,@initial1,@bc1,x,t);
u1 = sol(:,:,1);
u2 = sol(:,:,2);
subplot(2,1,1)
surf(x,t,u1);
title('u1(x,t)');
xlabel('Distance x');
ylabel('Time t');
subplot(2,1,2)
surf(x,t,u2);
title('u2(x,t)');
xlabel('Distance x');
ylabel('Time t');
eqn1 --------------------
function [c,b,s] = eqn1(x,t,u,DuDx)
Lambda = 0.2; % []
A = 6500; % [Pa*s]
B = 0.14; % [s]
C = 0.7; % [-]
Ts = 120; % [°C]
Tb = 240; % [°C]
WLF2C1 = 8.86;
WLF2C2 = 101.6;
rho = 1000; % [kg/m^3]
cp = 1200; % [J/kg*K]
at = 10^( ((WLF2C1*(Tb-Ts))/(WLF2C2+Tb-Ts)) - ((WLF2C1*(u(1)-Ts))/(WLF2C2+u(1)-Ts)) );
Eta = ((A*at)/((1+B*at*DuDx(2))^C));
c = [ rho*cp ; 0];
b = [ Lambda*DuDx(1) ; x*Eta*DuDx(2)];
s = [ DuDx(2)*DuDx(2)*Eta; 0];
initial1 ---------------------
function value = initial1(x)
Ra = 8.5; % [mm]
n = 15; %[1/min]
Omega = 2*pi*n/60; % [1/s]
if x==8.5 value = [260;Omega*Ra];
else value = [20;0]; end;
%Alternative:
%value = [(1.34122*(10^(-07))*(x^9.957314218)+19); (5.657713661*(10^(-10))*x^4.704980411)];
bc1 ---------------
function [pl,ql,pr,qr] = bc1(xl,ul,xr,ur,t)
Ra = 8.5; % [mm]
n = 15; %[1/min]
Omega = 2*pi*n/60; % [1/s]
V = Omega*Ra;
Twand = 260; % [°C]
pl = [0; ul(2)];
ql = [1; 0];
pr = [ur(1)-Twand; ur(2)-(V)];
qr = [0; 0];
And btw. How to make good formating in this forum?

Answers (0)

Categories

Find more on Mathematics in Help Center and File Exchange

Tags

Products

Community Treasure Hunt

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

Start Hunting!