# Numerically solving a system of parabolic PDEs and 1st order ODEs

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.

## migrated from physics.stackexchange.comNov 14 '18 at 19:54

This question came from our site for active researchers, academics and students of physics.

• I would suggest you should rather try your luck at MATLAB Central forums. The question does not seem related to physics. – kkm Nov 14 '18 at 17:33
• @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. – mnatch Nov 14 '18 at 17:39
• 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. – kkm Nov 14 '18 at 17:49
• I'm voting to close this question as off-topic because this is a question about math and graphing, not about physics. – JMac Nov 14 '18 at 19:46
• @kkm This is a much better fit for Computational Science an the maths site. – Emilio Pisanty Nov 14 '18 at 19:48