How can i implemente this PDE boundary conditions?

1 回表示 (過去 30 日間)
Claudio D'Amato
Claudio D'Amato 2020 年 3 月 27 日
コメント済み: Claudio D'Amato 2020 年 3 月 27 日
I wrote this code using pdepe to implement this system (I wrote the constant terms like a, b, c, d, and for simplicity)
function[c,f,s]=heatsempccl(z,t,u,dudz)
global rhoc cp kc h eps q sigma Tinf volf volm rhom Hu mc n
c=[1;1];
f=[(kc/(rhoc*cp));0].*dudz;
A1=75000; %[1/s]
E1=74690; %[J/mol]
A2=21666.667; %[1/s]
E2=58370; %[J/mol]
R=8.314462; %[J/(mol*K)]
k1=A1*exp(-E1/(R*u(1)));
k2=A2*exp(-E2/(R*u(1)));
dalfadt=(k1+k2*u(2)^mc)*(1+u(2))^n;
s=[((volm*rhom*Hu)/rhoc*cp)*dalfadt;dalfadt];
end
How can i write the boundary conditions d(alpha)/dz=0 at both ends?
  9 件のコメント
Torsten
Torsten 2020 年 3 月 27 日
編集済み: Torsten 2020 年 3 月 27 日
Why do you use c(2)=1/dalphadt and s(2)=1 instead of c(2)=1 and s(2)=dalphadt ?
And in the definition of dalphadt, you use (1+u(2))^n instead of (1-u(2))^n.
Taking larger tolerances may also improve convergence.
Claudio D'Amato
Claudio D'Amato 2020 年 3 月 27 日
perfect, all solved. thank you so much for your availability and patience!!!

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

回答 (0 件)

Community Treasure Hunt

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

Start Hunting!

Translated by