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 个)

产品


版本

R2018b

Community Treasure Hunt

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

Start Hunting!

Translated by