PDEPE solver with off-diagonal coefficients
1 次查看(过去 30 天)
显示 更早的评论
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
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.
回答(0 个)
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 PDE Solvers 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!