Message Boards Message Boards

A problem about NDSolve:idelay

Posted 2 years ago

This is my notebook, the function is in this form enter image description here. but, I get the error:

NDSolve::idelay: Initial history needs to be specified for all variables for delay-differential equations.

My code is not very beautiful, sorry!

Is there anybody that can help me? Thank you very much,

POSTED BY: Cao Bb
5 Replies
Posted 2 years ago

ok, i know where the problem is. I used Norm[] to a vector, then derivative of this with the elements of the vector. then derivative of the result with the elements fo the vector again. Conjugation occurs in this process. the problem is solved when I add //ComplexExpand behind Norm[]. thank you very much

POSTED BY: Cao Bb

The error message states that your equations are not resulting in numbers. This clue suggests that you need to evaluate the equations at the start to find a syntax error. By setting time to zero and substituting in all the initial conditions, you can evaluate the first step manually to see what is wrong.

(cpdae /. t -> 0) /. (cpinit /. Equal -> Rule)

This should result in equations with only the lowest derivatives and numbers, however, I get terms that have expressions like this:

+(1/2) Sqrt[3] Derivative[1][Conjugate][Sqrt[3]/2]

You have the derivative of Conjugate[] applied to constants. You need to fix your equations before trying to run NDSolve so these terms are not there. I have not looked in detail at what you are doing but is it safe to set those terms to zero? -- I'm not sure what the derivative of the Conjugate function really means. It likely results from the chain rule applied to Conjugate[function[t]]. If you fix this, your equations should evaluate.

I hope this helps.

Regards,

Neil

POSTED BY: Neil Singer
POSTED BY: Neil Singer
Posted 2 years ago

Thanks for your help, I think your suggestion is feasible.

POSTED BY: Cao Bb
Posted 2 years ago

Sorry to interrupt, I’ve modified my code and initial conditions. But, I get another error.

NDSolve::nlum the function value ....is not a list of numbers with dimensions......

Thank you very much.

Attachments:
POSTED BY: Cao Bb
Reply to this discussion
Community posts can be styled and formatted using the Markdown syntax.
Reply Preview
Attachments
Remove
or Discard

Group Abstract Group Abstract