Skip to main content
1-Visitor
February 4, 2019
Solved

Newbie problem solving system of 3 ODE's

  • February 4, 2019
  • 1 reply
  • 6150 views

 

Hello,

 

I was able (with some help from the community 🙂 to solve a single ODE using a MathCAD 5.0 Solve Block but now I want to solve a system of 3 ODE's but I am getting an error (see attached file).

 

I suspect I am making some newbie error. If someone can enlighten me as to what that error is and tell me how to do the calculation correctly, it would be much appreciated.

 

TIA,

 

--Doug

 

Best answer by Werner_E

The problem is the equation for px'(t).

If you replace a for something dimensionless it works.

If k1 has the unit L^2/(min*mol^2) it works.

So something with that equation seems to be wrong.

1 reply

25-Diamond I
February 4, 2019

You have to apply units, even if the value is zero.

So to be on the save side you should write px'(0 s)=...

 

But you have a unit problem/mismatch in your equations:

You have an expression (1-px(t)) which means px(t) is dimensionless!

So your equation MeOH'(t)=-px'(t) meanst that MeOH(t) must be dimensionless, too.

But one of your IC says MeOH(0 s)=a*rx and this would mean unit mol/Litre which is NOT dimensionless.

So that's a discrepancy.

Maybe the "1" in (1-px(t)) is not unitless? But then there would be other discrepancies, I think.

25-Diamond I
February 4, 2019

OK, I found another error which caused the "unknown error" you experience. You typed a capital "P" instead of a lower case "p" as argument of odesolve.

The solve block still fails as of the aforementioned unit mismatches.

I tried your solveblock without any units at all and it works OK.

 

 

ddenholm1-VisitorAuthor
1-Visitor
February 4, 2019

 

I did fix the typo with the capital "P" but then hit the new units of measure issue.

 

Thanks for point that out.

 

I am trying to solve this system for a colleague. I need to get back to him and get the units of measure issues resolved.