PDEPE solver with off-diagonal coefficients

1 回表示 (過去 30 日間)
MG
MG 2018 年 11 月 26 日
コメント済み: MG 2018 年 11 月 27 日
Hello,
referring to the pdex4 example, I am trying to understand if the function f in this part of the code:
function [c,f,s] = pdex4pde(x,t,u,DuDx)
c = [1; 1];
f = [0.024; 0.17] .* DuDx;
y = u(1) - u(2);
F = exp(5.73*y)-exp(-11.47*y);
s = [-F; F];
can be modified by substituting the vector [0.024; 0.17] with a 2x2 matrix.
Basically, I would need to solve a system like this:
% |1| |u1| | d11*D(u1)/Dx + d12*D(u2)/Dx |
% | | .* D_ | | = D_ | |
% |1| Dt |u2| Dx | d21*D(u1)/Dx + d22*D(u2)/Dx |
%
% --- --- ------------------
% c u f(x,t,u,Du/Dx)
Also, is the PDEPE solver the most appropriate for this problem?
Thanks in advance
MG
  4 件のコメント
Torsten
Torsten 2018 年 11 月 27 日
編集済み: Torsten 2018 年 11 月 27 日
The boundary conditions have the general form
p + q*f = 0
where f in your example above is
f=[d11*DuDx(1)+d12*DuDx(2);d21*DuDx(1)+d22*DuDx(2)].
Thus you have to specify p(1),q(1), p(2), q(2) such that
p(1) + q(1)*(d11*DuDx(1)+d12*DuDx(2)) = 0
p(2) + q(2)*(d21*DuDx(1)+d22*DuDx(2)) = 0
Best wishes
Torsten.
MG
MG 2018 年 11 月 27 日
Of course, thank you, I am coding this part of the model just now.
Luckily for me, I don't need to add exotic functions in BCs, but only fixed coefficients.
Thank you for your kind support, cheers
MG

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

回答 (0 件)

カテゴリ

Help Center および File ExchangeEigenvalue Problems についてさらに検索

製品


リリース

R2018b

Community Treasure Hunt

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

Start Hunting!

Translated by