MATLAB Answers

PDEtoolbox_Error using daeic3 (line 230) Need a better guess y0 for consistent initial conditions.

4 views (last 30 days)
Minjun Bae
Minjun Bae on 26 Feb 2020
Commented: Minjun Bae on 6 Mar 2020
Hello,
I am trying to solve a system with three partial differential equations coupled by using PDE toolbox.
As I simulate my code, I keep getting an error, saying
Error using daeic3 (line 230)
Need a better guess y0 for consistent initial conditions.
I cannot figure out where the error comes from. Can anyone help me to figure out what the problem is?
Attached PDF file is equations and corresponding code that I am trying to solve.
Any help would be very much appreciated.
Also, let me know if I could provide more information regarding this.

  0 Comments

Sign in to comment.

Accepted Answer

Ravi Kumar
Ravi Kumar on 5 Mar 2020
You do have a singula mass matrix becuase of the equation 2. If I understand correctly equation 1 can be solved in isolation. Once you have u1, can you attempt to solve equation 2 and 3 using u1? This may or may not resolve the issue, it will simplify the system a bit.

  3 Comments

Minjun Bae
Minjun Bae on 5 Mar 2020
Good afternoon,
Thank you so much for the feedback.
My equation 2, which has been modified a little bit, is that
Since state.u(1,:) returns to a matrix with scalar value,
it is my understanding that I cannot use gradient function because it will return 1) gradient wrt x only.
So I defined the equation 2 as below:
(coefficients except f was set to 0)
[[function fmatrix = fcoeffunction(location,state)
.....
fmatrix(2,:) = E_over + I_tkns*(state.ux(1,:).*state.ux(2,:)+state.uy(1,:).*state.uy(2,:))/denom
where denom is defined as
denom = sqrt(state.ux(1,:).^2+state.uy(1,:).^2);]]
I ran the simulation again, and I got the error saying
Error using daeic3, this DEA appears to be of index greater than 1.
I believe that error also comes up when I have a singular matrix (?).
Do you think it is possible for you to identify what the problem is?
Thank you so much for your support.
Ravi Kumar
Ravi Kumar on 5 Mar 2020
Can you attach the complete code that produces the error? Reproduction could would help identify any workaround.
Minjun Bae
Minjun Bae on 6 Mar 2020
Hello,
Please see the attached pdf file. I have included two function handles as well as my main code.
Thank you so much!
Best regards,

Sign in to comment.

More Answers (0)

Sign in to answer this question.

Tags