Skip to main content
1-Visitor
April 24, 2020
Solved

ODEsolve too few initial conditions

  • April 24, 2020
  • 2 replies
  • 4208 views

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

Best answer by AlanStevens

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

 

2 replies

21-Topaz II
April 25, 2020

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.

SelimVrl1-VisitorAuthor
1-Visitor
April 25, 2020

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:(

25-Diamond I
April 25, 2020

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.

 

SelimVrl1-VisitorAuthor
1-Visitor
April 25, 2020

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

19-Tanzanite
April 25, 2020

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