Skip to main content
1-Visitor
February 8, 2011
Question

problems with function referring to itself inconsistently

  • February 8, 2011
  • 4 replies
  • 6034 views

Hello, I am working on my senor design project, and I am trying to solve a system of equations using solve block in MathCAD prime. It contains constraints which refer to functions and known values defined above the block. The system of equations is made of linear species balances and non-linear kinetic and energy balances. I cannot figure out why it won't work. Can anyone help?

Note: I cannot post the file as it would be in breach of the rules regarding the project. But I would be willing to give examples of the types of equations I am using, and how I am using them.

4 replies

1-Visitor
February 8, 2011

So, moments after making the last post I noticed a multiplication sign missing before some parentheses. The syntax issues are now solved, but now I am having trouble coming up with guess values which solve the system. Any tips out there?

1-Visitor
February 8, 2011

The syntax issues are now solved, but now I am having trouble coming up with guess values which solve the system. Any tips out there?

Can you elaborate or post an example of the problem?

Mike

http://communities.ptc.com/servlet/JiveServlet/showImage/2-149416-2532/bar_anim.gif

1-Visitor
February 8, 2011

This is tough, because I am not allowed to discuss the problem with anyone. However, general questions regarding things such as MathCAD are allowed. So I guess I will refine my previous question. If a solve block is used to solve a system of equations containing 12 unknowns with 10 linear equations and 2 non-linear equations. With one of the non-linear equations being of 3rd order and the other of first order. If this system is properly modeled, and the guesses are in the correct order of magnitude, should MathCAD be able to find a solution?

Or in short, for this system how close does the guess have to be (rough estimates are perfectly fine) for MathCAD prime to solve it?

I apologize for my ambiguity, but I can't think of any examples like this without having a different version of it solved for me.

1-Visitor
February 8, 2011

If a solve block is used to solve a system of equations containing 12 unknowns with 10 linear equations and 2 non-linear equations.

Solve blocks require an equation for each unknown, so you would require 12 equations to find 12 unknowns.

and the guesses are in the correct order of magnitude, should MathCAD be able to find a solution?

The guesses can be in any order and Mathcad should be able to find a solution.

Or in short, for this system how close does the guess have to be (rough estimates are perfectly fine) for MathCAD prime to solve it?

Your guesses have to be relatively close - When I say relatively take that as a pinch of salt. I hardly ever think about the guess values unless an error returns. As a check I sometimes use the Minerr function. Minerr differs from Find or Minimize in that, if the chosen algorithm fails to converge, whatever answer found on the last allowable iteration is returned, even if it doesn't meet the convergence criteria. Basically if Minerr doesn't yield a result you know you have set the solve block up wrong.

Mike

http://communities.ptc.com/servlet/JiveServlet/showImage/2-149416-2532/bar_anim.gif

1-Visitor
February 9, 2011

Thanks for the help guys. While I still have not found a reasonable answer, I at least know it isn't a degree of freedom issue now. As the values minerr produces fail to meet many of the constraints imposed on feed values, I think the issue may be in how I calculated my energy balance. Seeing as how this is the only equation I derived myself. And here I was hoping that I would never have to read my thermo book again...

Again, thanks for the help. It is greatly appreciated!

1-Visitor
February 9, 2011

It's a shame to leave the thread there.

Thanks for the help guys. While I still have not found a reasonable answer, I at least know it isn't a degree of freedom issue now. As the values minerr produces fail to meet many of the constraints imposed on feed values.

So did find work?

Mike

http://communities.ptc.com/servlet/JiveServlet/showImage/2-149416-2532/bar_anim.gif

1-Visitor
February 9, 2011

No, I couldn't get it to work out. I have discovered, as expected, some flaws in my energy balance equations. I am trying to correct for them now, but it's pretty tough to get accurate thermo calculations without good thermo data which I have found to be hard to find.I am trying to find the Peng Robinson BiP's for brevity and because they define my system well. I am still missing some with those being the most non-ideal combinations. I am hoping that those will solve my convergence problem however.

I am kind of at a loss for what to do now though. I fear that looking for the BiP's might be fruitless, but I don't see a way around it. At least not in a way that allows for me to avoid writing 400 equations which pull the composition variables through the UNIQUAC correlations that I do have access to.