From: Alina Stoian on
"Hello,

I'm trying to solve a system of 3 partial differential equations (3 diffusion equations, 2nd law of Fick) using ode15s! First of all, I transformed my system in an ODE system using the finite difference method to discretize each equation. After, I attached the boundary conditions , that after the discretization are become algebraic equations , and so in the end I' m obliged to solve a DAE system. From my readings I understood that I have to use ode15s to solve M*y'=f(t,y)! I defined the matrix M, by putting 0 where ever I have an algebraic equation, and I 've created a separate function file for f(t,y), in which I defined the coefficients of the variables. The function f(t,y) has the form B(n,n)*C(n), where B is the matrix with the variable's coefficients and C is the variable vector!
After the first run of the code I obtained negative results so I thought that it's best to adimensionalize the variables, and I did so, and now I'm confronting with a warning message :'Warning: Failure at t=3.124127e+00. Unable to meet integration tolerances without reducing the step
size below the smallest value allowed (7.105427e-15) at time t. '' . I know that the coefficient 's matrix is ill conditionned but what I don't know is how to handle this problem!""


I forgot to mention that the equations are coupled and that I'm trying to simulate the transfer of a specie through three different phases ( that's why I have 3 basic diffusion equations).