Community Tip - Visit the PTCooler (the community lounge) to get to know your fellow community members and check out some of Dale's Friday Humor posts! X
Hi Mathcad-Community,
I am running into the following error not able to debug it. First I though, that I might have a unit mismatch but after rechecking, everything seems to be consisten so far. What is the cause for the error?
Is this what you want to do?
Hi muser,
I am looking for the function phi(t). I have no clue, why the solve-block runs into a error. I think it might have to do something with the following equation, because when I remove J_Motor*2*Pi*n'(t), the solver is able to give me phi(t).
What's the error?
@ppal wrote:
What's the error?
The error is later in the solve block with odesolve!
The complicated way of substituting the functions phi and its derivates for normal variables is necessary because the solve block with odesolve unfortunately will not work if you use a function which has the solved for function as its argument. At least that was what I could come up with in another thread of the OP 😉
@NS_10096872
In the other thread I vaguely remember a second solution which avoided the substitute method - not sure if it was posted by Fred or Stuart. Did you already try this approch?
Furthermore you may notice that, if you are using a newer version of Prime, after you recalculate the sheet, some derivates will not be substituted by phi1 or phi2. The reason is Primes infamous auto-labelling.
I played around with the worksheet for quite some while getting to get the substitute to work and finally ended up redefining the function F.W using phi0, phi1 and phi2 replaced by hand 😞
Nevertheless the solve block with odesolve does not work and still throws the error of not being able to build the matrix of derivatives.
No idea whats the cause and how to fix it.
Are you absolutely sure about the equation in the solve block and the initial conditions?
We often had seen here in the forum people which had problems with odesolve and in the end it turned out that the model was wrong or that errors had crept into the equations used.