cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
Showing results for 
Search instead for 
Did you mean: 

We are troubleshooting an issue impacting community login, and it may be intermittently unavailable. Sorry for any inconvenience.

ODEsolve too few initial conditions

SelimVrl
4-Participant

ODEsolve too few initial conditions

Hi, 

When I try to solve ODE functions in mathcad I am getting this error. I saw a lot of solutions about this problem but couldnt fix it because my equations are too dependent to each other. Can you help me with the solution ? mathcad1.pngmathcad2.png

ACCEPTED SOLUTION

Accepted Solutions

You need to separate out the expression for T and make it a function - see attached.

 

As it stands there are a lot of expressions producing rather linear outputs!  The results are sensitive to initial guesses for temperature and for the initial values of X1 and X2.  

 

I've rewritten R2 to avoid the initial divide by zero error.

 

Alan

 

View solution in original post

8 REPLIES 8
-MFra-
21-Topaz II
(To:SelimVrl)

Hi,

In a preliminary phase, I can tell you right away that: The constant L is not used; Functions that are in the denominator cannot have a null initial value. I continue in the search for a solution.

SelimVrl
4-Participant
(To:-MFra-)

Hi,

Thanks for sparing your time. V is dependent on L but since the ODEs at the and are dependent on V, I did not write it before "given". I corrected it but still having same error:(

Werner_E
25-Diamond I
(To:SelimVrl)

You have a lot of equations and unknow/undefined functions but you solve just for two of them. That can't work.

 

Set up the solve block, so that it only contains the  ODEs for X1 and X2 and T and ONLY the initial conditions for X1(0) and X2(0) and T. As Francesco already wrote T(0)=0 is not possible as of the division by zero problem.

Delete all the other initial conditions as they should not be necessary.

The functions you have set up in front with the boolean equal sign must be defined using the assignment ":=" and must also have X1 and/or X2 and/or T as function arguments.

Something like

Werner_E_0-1587811553211.png

Those functions may and should be defined before the "Given" keyword.

Furthermore you should delete the definition T:=300 as T obviously is not a variable or constant but a function of v you are looking for.

 

I am not sure if your solve block could work as you don't provide an ODE for T(v) but give it a try with the changes described above.

 

SelimVrl
4-Participant
(To:Werner_E)

Hi,

Thanks for your help. I followed your advices and still having the same error. Do you think it is because there is no ODE for T(v)?

mathcad1.pngmathcad2.png

You need to separate out the expression for T and make it a function - see attached.

 

As it stands there are a lot of expressions producing rather linear outputs!  The results are sensitive to initial guesses for temperature and for the initial values of X1 and X2.  

 

I've rewritten R2 to avoid the initial divide by zero error.

 

Alan

 

SelimVrl
4-Participant
(To:AlanStevens)

Thank you so much Alan, that is really helpful. I have one question about working principle of "tend". When I increase or decrease it, after some point the odesolve is not working. What is the reason of that ? And why changing initial temperature is affecting the working of "tend" ?

"I have one question about working principle of "tend". When I increase or decrease it, after some point the odesolve is not working. What is the reason of that ? And why changing initial temperature is affecting the working of "tend" ?"   

 

This is a function of your equations!  What do you expect the output to look like?  Does it look reasonable for the existing range of conditions in the worksheet?  Do you expect X1 to go negative while X2 goes positive? Does the system change rapidly for some conditions?  I don't know anything about the system being modelled, so I have no feel for how sensible the results are.  Only you can say!

 

Alan

 

 

 

 

 

SelimVrl
4-Participant
(To:AlanStevens)

Okey I understood. Thank you all for helping and sparing your time my problem is solved.

Best regards,

Selim

Announcements

Top Tags