Initially i had the following system of pdes to solve:
$$\frac{\partial A}{\partial x} =\frac{1}{v_A(y)}.\frac{1}{Pe_A} .\frac{\partial^2A}{\partial y^2} \qquad for \quad 0\leq y\leq \alpha$$ $$\frac{\partial B}{\partial x} =\frac{1}{v_B(y)}.\frac{1}{Pe_B} .\frac{\partial^2B}{\partial y^2} \qquad for \quad \alpha\leq y\leq 1$$
with the following initial and boundary conditions
at $x=0, A=1\quad and \quad B=0$
at $y=0 \qquad \frac{\partial A}{\partial y}=0 \qquad$ and $\qquad y=1 \qquad \frac{\partial B}{\partial y}=0$
Both domains are coupled by a first order reversible reaction such as
at $y=\alpha$
$$\frac{\partial A}{\partial y}=-Bi_A.(A-\frac{1}{K_D}B)$$ $$\frac{\partial B}{\partial y}=-Bi_B.(A-\frac{1}{K_D}B)$$
where $Pe_A, Pe_B, Bi_A, Bi_B, and\quad K_D\quad$ are constants.
I have successfuly solved the following system using an implicit euler scheme for the x-space derivative and second order central difference for the y-space second derivative for the internal nodes. Points at $y=0$ and $y=1$ were discretized using second order backward discritization. Then to link between both domains the interface conditions was discritized also using backward discritization.
Now i want to developp more my model by considiering the following system of 4 pdes:
$$\frac{\partial A}{\partial x} =\frac{1}{v_A(y)}.\frac{1}{Pe_A} .\frac{\partial^2A}{\partial y^2} \qquad for \quad 0\leq y\leq \alpha$$ $$\frac{\partial A_1}{\partial x} =\frac{1}{v_{A1}(y)}.\frac{1}{Pe_{A1}} .\frac{\partial^2A_1}{\partial y^2} \qquad for \quad 0\leq y\leq \alpha$$ $$\frac{\partial B}{\partial x} =\frac{1}{v_B(y)}.\frac{1}{Pe_B} .\frac{\partial^2B}{\partial y^2} \qquad for \quad \alpha\leq y\leq 1$$ $$\frac{\partial B_1}{\partial x} =\frac{1}{v_{B1}(y)}.\frac{1}{Pe_{B1}} .\frac{\partial^2B_1}{\partial y^2} \qquad for \quad \alpha\leq y\leq 1$$
the boundary conditions are the same as the previuos system except that this time the interface condition is a non linear condition of the following form at $y=\alpha$
$$\frac{\partial A}{\partial y}=-Bi_A.A.A_1^2.B^2$$ $$\frac{\partial A_1}{\partial y}=-2.Bi_{A1}.A.A_1^2.B^2$$ $$\frac{\partial B}{\partial y}=2.Bi_B.A.A_1^2.B^2$$ $$\frac{\partial B_1}{\partial y}=-Bi_{B1}.A.A_1^2.B^2$$
and now i am confused on how to solve numerically such a system i have read about the segregated approach to solve coupled pdes. My understanding is that we fix all dependant variable but one where we solve for it and do the same for each variable. Then we iterate until convergence. However, i am not really sure how to implement it. If can anyone point me in the right direction or useful literature, i would be grateful. Note that if it is feasable i want to stick with my previously develloped scheme and then elaborate it to take into account the coupling.
Thanks in advance for any help
I do not know how to simulate pdes but there are two functions in Matlab you should be looking
pdepe
and another app is called pdetoolbox https://uk.mathworks.com/products/pde.html