Community Tip - When posting, your subject should be specific and summarize your question. Here are some additional tips on asking a great question. X
Hi,
I'm trying to solve some ODE equations system to determine behavior of species, temperature and pressure for a plug flow reactor.
I already put all equations, relations between all terms and also the initial conditions, but on odesolve block i receive a message that says: "Too few initial conditions".
Thanks in advance for your help.
Solved! Go to Solution.
Whenever Mathcad shows an error you can rightclick the erroneous position and get the option for error tracing. But in your case there seems to be nothing to trace.
I guess the error is because you still have a number of undefined functions in your ODE solve block which you don't solve for:
Not sure if I caught them all.
You are using these undefined functions and their derivatives in the solve block and so Mathcad expects you to provide guess values for them and also that you solve for them.
So either add what Mathcad is expecting or maybe you can find another way to set up your model equations using less functions.
You use a lot of undefined functions - all those x.---, h and MW.mix and other MW.---
You have to solve for ALL the unknown functions and also provide initial conditions.
Or you try to formulate the system using fewer functions.
Hi Mr. Werner,
I dont know what you really mean... for example for MW.mix
now when I include thay on derivatives for odesolve...:
As I see is totally constrained, for initial stage...
All MW functions MW.CH4, MW.O2.... etc are constants...
I would appreciate your detailed explanation.
Regards,
Nicolas.
All the functions you use in the solve block must either be defined before the solve block or must be included in the closing odesolve(...) statement. You must solve for those functions even if they are only intermedeate functions you are not interested in finally.
I was wrong about most of the MW.--- as you actually never used them as functions.
But this does not apply to MW.mix which you use as function. But I can't see that this function is used anywhere (maybe I overleooked something). So I think it could be deleted. BTW, when you write the derivative of MW.mix(x) (which seems not to be used anywhere, too) it should read MW.mix(x)^-2 rather than MW.mix(x)^2.
EDIT: I overlooked that MW.mix is used in the ODE for function P(x).
I would suggest to replace these functions by their definition and write
If you don't like this idea, there are two alternatives, though:
1) You define in front of the solve block
and in the solve block you use
Not really better, I know. But you get the idea.
2) Use
as you did initially anyway and delete what you wrote for the derivative of MW.mix (Mathcad knows how to build a derivative anyway).
Add an initial condition for MW.mix
and add MW.mix to list of functions to solve for:
You will have to find similar solutions for all other functions which are not defined but used in the solve block.
Hi Mr. Werner,
I have checked all suggestions that you made. At least mathcad now tries to solve a little time, but the error keeps the same.
Maybe there is a way to detect which variable is faulting? or some way to trace the error or debug it?
Whenever Mathcad shows an error you can rightclick the erroneous position and get the option for error tracing. But in your case there seems to be nothing to trace.
I guess the error is because you still have a number of undefined functions in your ODE solve block which you don't solve for:
Not sure if I caught them all.
You are using these undefined functions and their derivatives in the solve block and so Mathcad expects you to provide guess values for them and also that you solve for them.
So either add what Mathcad is expecting or maybe you can find another way to set up your model equations using less functions.
Hi Mr Werner,
I checked the model, sadly it doesnt work for me. thanks for take your time to try an answer for me.
Regards,
Nicolàs.