How to solve DAE system using ode15s and a modified mass matrix

1 vue (au cours des 30 derniers jours)
Smaran
Smaran le 4 Juil 2016
Commenté : Smaran le 4 Juil 2016
I am trying to solve a system of differential algebraic equations using ode15s. I have modified the mass matrix accordingly. But I am getting an error related to 'odemass', perhaps because my new Mass matrix is singular. Can anyone help me..
Here is the error ...
* SWITCH expression must be a scalar or string constant.
Error in odemass (line 65) switch(mass)
Error in ode23t (line 180) [Mtype, Mt, Mfun, Margs, dMoptions] = odemass(FcnHandlesUsed,odeFcn,t0,y0,...
Error in TwoD_Main2 (line 22) [z,Y] = ode23t('Alphamodel2',zspan,Y0,options); *
  2 commentaires
Torsten
Torsten le 4 Juil 2016
You will have to supply your MATLAB code to get an answer to your question.
Best wishes
Torsten.
Smaran
Smaran le 4 Juil 2016
Hi, I have attached the files of my code here, Please let me know where I am going wrong..
Thanks in advance. :)

Connectez-vous pour commenter.

Réponses (1)

Torsten
Torsten le 4 Juil 2016
You must not return the derivatives in "Alphamodel2.m" for all values of r.
The solver supplies a scalar value for r each time "Alphamodel2" is called.
Evaluate A, S and T for the value of r supplied by the ODE-integrator.
Best wishes
Torsten.
  1 commentaire
Smaran
Smaran le 4 Juil 2016
The 'r' vector I am using helps to find the values of Y at different radial positions of the modeled reactor. I request you to suggest the modifications that I am supposed to make the code run.
Thanks in advance.. :)

Connectez-vous pour commenter.

Catégories

En savoir plus sur Mathematics dans Help Center et File Exchange

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by