DECIC can not find consistent initial conditions - DAE (differential algebraic) system solved in Maple, but can't seem to implement a solving method in MATLAB
8 views (last 30 days)
Show older comments
Dear MATLAB community,
I am trying to solve a differential algebraic system of 12 variables using 12 equations. I have already solved the system in Maple, but would like to code the entire program (which will be based off the solving method of the system) in MATLAB for various reasons (GUI coding etc.)
However, I can not succeed at getting MATLAB to solve the system. I refuse to believe MATLAB can't do it, but at the same time I am not sure what I could do differently to succeed at solving the system. I've tried to implement the rough solving methods for the ode15i, ode15s and ode23t solvers up until the step of finding consistent initial conditions ( according to the official mathworks method ). All of the methods fail at this step. Either it's due to a 'Convergence failure in DECIC.' or 'Cannot resolve the constraints. Try using more accurate approximations of consistent initial conditions'. I have also had to simplify to problem because otherwise one of the solving method gets stuck at the step of verifying the differential index (it throws the error 'Exponent overflow.')
I have attached the script with my code and some comments. I use two classes in the script and will put the code for them down below. They are both part of a constants package I am putting together for my program.
ATOMIC WEIGHTS CLASS
classdef AtomicWeights
% ATOMICWEIGHTS list of atomic weights in g/mol
properties (Constant)
Al = 26.9815385;
Si = 28.085;
Fe = 55.845;
O = 15.999;
Ca = 40.078;
Mg = 24.305;
Ti = 47.867;
end
end
UNIVERSAL CLASS
classdef Universal
% UNIVERSAL list of universal constants
%
% R = gas constant expressed in m^3*Pa/(K*mol)
properties (Constant)
R = 8.3144621;
end
end
0 Comments
Answers (0)
See Also
Categories
Find more on Ordinary Differential Equations in Help Center and File Exchange
Products
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!