# “This DAE appears to be of index greater than 1” daeic12 (line76) error code

Hi I am trying to solve a set of pde converted into ODE and DAE using central finite difference method. I have used the MATLAB 'solve' command to determine the coefficients of fictitious nodes for boundary conditions. I am using the ode15s solver and getting "This DAE appears to be of index greater than 1" daeic12 (line76) error code. I have attached the code as a link below. The script file to run is main_code_live, which is a live script and explains how the pde have been converted into ode and dae along with the boundary conditions, rest all are necessary function files to run the main script. I have tried using a lot of suggestions found on Mathworks website but still not successful. Any help would be appreciated! https://drive.google.com/drive/folders/1emgOcdsnP81MP5ZBERefEJ0d4IP0qbSL?usp=sharing

• The code to establish an initial consistent state fails and has determined as the most likely reason that the DAE system has an index larger than 1. You need to either use a solver that can handle this higher index, 2 or 3 are possible. Or you need to employ explicitly methods for index reduction to transform the system, by enlarging it, to have index 1. – Lutz Lehmann Jan 19 at 7:53
• I have tried using symbolic matlab toolbox in my code and defined the equations using the matrices produced from the FDM approach instead of symbolic matrices and once I try to determine the index using isLowIndexDAE command I get a logical answer of 1 which means either the system has index 0 or 1 – Puneet Valecha Jan 19 at 19:45
• Then you need to check next if the two systems are actually the same, just with different computation paths. The index condition is a more generalized rank condition, like that it is in theory locally stable, but in practice can be ill-conditioned. If the physical situation says that the problem should be stable under perturbation, there could still be modelling errors that do not reflect this. – Lutz Lehmann Jan 19 at 19:50
• So I have tried using ode15i with the symbolic MATLAB toolbox and it throws up "Variables must be specified by univariate function calls - Error in sym/daeFunction (line 117)". I have also calculated the Jacobian for DAE part of the system and it is rank deficient because some diagonal entries are of the order of 1e10 while some 0.01 (which I assume MATLAB is treating them to be zero). Therefore I tried normalizing the matrix but still it is not full rank. The FDM technique is correct because I verified the ODE part of system with reference code(uses pdepe solver). What else can I do to debug? – Puneet Valecha Jan 20 at 14:50