I'm trying to solve the following system of differential equations numerically. What are the available finite difference approaches and matlab solvers to solve such a system? Other approaches to solve the problem are welcome as well. The first two equations are quasi-steady and the rest of the equations have time derivatives in them. I'm trying using matlab's pdepe solver, but since the boundary conditions have to be specified even for the ODEs which have time-derivatives, I didn't think it as a viable option.

$$0= \rho \frac{\partial}{\partial z}\left(D \frac{\partial c_1}{\partial z} \right) - \it{source_1}\, $$

$$ 0= \rho \frac{\partial}{\partial z}\left(D \frac{\partial c_2}{\partial z} \right) - \it{source_2}\,$$

$$\frac{\partial c_3}{\partial t} = source_3$$

$$\frac{\partial c_4}{\partial t} = source_4$$

$$D = A_1 c_1 + A_2 c_2 + \dots + A_n c_n \,, \rho = 1 (say)\,.$$

The source terms for any particular equation (or concentration) contain dependence on the other concentrations.

  • 1
    $\begingroup$ I would suggest you should rather try your luck at MATLAB Central forums. The question does not seem related to physics. $\endgroup$
    – kkm
    Nov 14, 2018 at 17:33
  • $\begingroup$ @kkm I have already posted my question in Matlab Central forum. I posted it here to gain some input on other methods or approaches to solve this system. $\endgroup$
    – math
    Nov 14, 2018 at 17:39
  • $\begingroup$ You found the right forum there. There is also Math.SE, which might be more suitable for a question about attacking your system with numeric methods. I think it may be also a good idea to elaborate on the kind of the "algebraic eqns" that you have. A system of PDEs is always a tricky beast, aside of trivial cases. $\endgroup$
    – kkm
    Nov 14, 2018 at 17:49
  • $\begingroup$ I'm voting to close this question as off-topic because this is a question about math and graphing, not about physics. $\endgroup$
    – JMac
    Nov 14, 2018 at 19:46
  • 2
    $\begingroup$ @kkm This is a much better fit for Computational Science an the maths site. $\endgroup$ Nov 14, 2018 at 19:48


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.