Problem with boundary condition for coupled pde using PDEPE solver

조회 수: 3(최근 30일)
Kartikey Sharma
Kartikey Sharma 2021년 2월 20일
답변: Shashank Gupta 2021년 2월 23일
My boundary conditions are:
(left BC)
dCa/dx - vz*Ca + vz*Ca0 =0 at x=0
dCb/dx - vz*Cb = 0 at x=0
(Right BC)
dCa/dx = 0 at x=L
dCb/dx = 0 at x=L
f = [ dCa/dx ; dCb/dx ]
pl = [- vz*Ca + vz*Ca0 ; - vz*Cb ];
pr = [0 ; 0];
I am not able to define ql and qr here. I need to use 2*2 matrix for ql and qr but matlab donesn't allow me to do that and 1*1 matrix doesn't complete both of the BC. Any input is greatly appreacited.


Shashank Gupta
Shashank Gupta 2021년 2월 23일
Hi Kartikey,
Check out this link, it has some example demonstrating boudary condition using matrix. Also if you want you can convert your matrix constraint to set of vector constraints then you might be able to solve them in typical fashion. Also what exact error did you get when you tried giving up the matrix constraint, Do let me know. I am assuming you are giving these boundary condition in the way shown in this link.
I hope this helps.

Community Treasure Hunt

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

Start Hunting!

Translated by