Skip to main content
1-Visitor
October 30, 2025
Question

Runaway Reaction Problem: ODE Solve

  • October 30, 2025
  • 1 reply
  • 388 views

MathCAD Experts,

I'm trying to implement a model of a runaway reaction in MathCAD and I am stuck. I have tried everything including rewriting it several times to make sure that I don't have inconsistent units. I used the same variable definitions and then evaluated the derivative terms to make sure they were properly defined before defining them as functions. I thought I'd solved all my problems and now it's telling me that my initial conditions "aren't valid differential equations." Any advice would be most helpful. 

 

I am using MathCAD 9.0.0

Sincerely,

Erik 

1 reply

25-Diamond I
October 30, 2025

Problem are not the units but your "implicit functions". They have no effect.

I have not tried but you may succeed if you include all these function in the odesolve command additionally to the five functions you are actually looking for.

 

In the attached Prime 9 sheet I used a different approach I defined these functions in front of the solve block and with the (currrent) values of T, P, etc. as their arguments.

Werner_E_0-1761867129536.png

These functions now are used in the ODE's in the solve block.

Werner_E_1-1761867288764.png

This works OK but I am not sure if the results are as you expected

Werner_E_2-1761867429216.png

 

 

1-Visitor
October 31, 2025

I'll double check the textbook to see if the I used were correct. But just to confirm, when defining implicit functions like this in ODE's those should be done outside of the solve block and they don't need to be of just the main independent variable?

25-Diamond I
October 31, 2025

As these implicit functions are used by the ODE's they have to be defined in front of the solve block (using normal definitions :=). But as these functions are using the current values of the unknown functions we are looking for, these current values have to be provided via arguments.

None of these functions depends on the time t, they just depend on current values of CA,CB, CS, T and P, So there is no need to add t to the argument list.

But what I did was just one way which came into my mind to deal with the problem.  Another might (you will have to give it a try) be as already said to let the definitions the way you wrote them inside the solve block but add their function names in the "odesolve" command. It might work (I am not sure about that) even though these functions are not ODE's.

A third way could be to get rid of these functions altogether and use their expressions when defining the ODE's. But I guess this would look quite ugly and confusing.