PDEPE solver with off-diagonal coefficients

1 Ansicht (letzte 30 Tage)
MG
MG am 26 Nov. 2018
Kommentiert: MG am 27 Nov. 2018
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 Kommentare
Torsten
Torsten am 27 Nov. 2018
Bearbeitet: Torsten am 27 Nov. 2018
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 am 27 Nov. 2018
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

Melden Sie sich an, um zu kommentieren.

Antworten (0)

Produkte


Version

R2018b

Community Treasure Hunt

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

Start Hunting!

Translated by