cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
Showing results for 
Search instead for 
Did you mean: 

Community Tip - Need help navigating or using the PTC Community? Contact the community team. X

Anyone think the numerical solve block is WEAK?

ptc-4735478
1-Newbie

Anyone think the numerical solve block is WEAK?

Please check the attached file and change the initial guess value....

I understand a intial guess value is important for a numerical solver....

But for this problem...a deviation of 0.01 from the solution is enough to cause an error while using Find and it only happens in prime 2.0. I think this is telling me to put prime 2.0 in trash!

When solving the exact same system of equation in MC15, the initial guess can practically be any thing....and it always converge with a tolerence of 10^-7

This problem has multiple solution depending on the initial guess. And MC15 can always converge with tiny tolerence and find the corresponding answer. But prime 2.0 cannot!!

BTW, The system of equation is just an exact copy of Harvey Hensley example on a CSTR, which was written in MC15.

http://communities.ptc.com/docs/DOC-2373

1 ACCEPTED SOLUTION

Accepted Solutions

henry leung schrieb:

Oh..I have F000, an older version..i guess thats why...

Don't know if thats the cause, but sure F000 is the first release from February 2012, M010 is the current release dated October 2012. Vladimir had posted the list of bug fixes for that version http://communities.ptc.com/message/190370#190370

The only bug fix having to do with solve blocks I could spot was

"Fixes an issue where a solve block in Mathcad Prime 2.0 returns incorrect results when constraints are created by copying their definitions"

View solution in original post

12 REPLIES 12

I don't know much about Prime so I can only image that you didn't use the same numerical algorithm. In MC15 you would right click the word "find" or "minerr" and usually a good choice is Nonlinear/Levenberg-Marquardt.

I don't know which algorithm Prime defaults to and if and how you can change it there. I remember vaguely reading in the help of Prime that it choses the algorithm automatically. Maybe there is no way to force it to a specific one.

Did you let convert your working Mathcad15 worksheet to Prime format or did you typed it in from scratch?

Werner Exinger wrote:

I don't know which algorithm Prime defaults

Levenberg-Marquardt

Try just clicking on Calculate, within the Calculation Tab. The file worked ok for me when I did this! It seems to be the same idiosyncrasy that Valery has come across a couple of times.

Alan

Hi Alan,

I have no luck clicking on Calculate within the calculation tab. Tried F9 and Ctrl+F9 also, still does not work.

When you say the file worked, are you able to converge using Find? what is the tolerance and error you got?

If I deviate from the answer by 0.001, Find fail.

If I deviate from the answer by 0.0001, Find works but still with a greater error than MC 15.......

Anyone know how to choose the numerical method in Prime 2.0??

When you say the file worked, are you able to converge using Find? what is the tolerance and error you got?

The results are exactly the same regardless of the offset. See the screenshot for wout:=ans+0.1

numeric1.png

I don't have Prime 2 so I won't be able to help much. I do have Prime 1 and the help file says that Levenberg-Marquardt (LM) is tried first if the problem is nonlinear, which it is. I too couldn't find a way to choose the method.

I hope that the others helping can determine why the program works for Alan and Werner but not you. If there is no reason found, this should be submitted to the PTC support group. If that is the case, they need to examine what changes were made, if any, to Find and LM.

It may be important to start comparing operating systems and release versions for the three of you.

Good luck, everyone. Keep us posted on the progress and outcome.

Harvey

PS: As a workaround, you might try relaxing CTOL to a larger number. I get the same answer with CTOL=.001.

It may be important to start comparing operating systems and release versions for the three of you.

OK, so here we go: Windows XP SP3, Prime 2.0 M010, (32-bit, of course).

TOL=10^(-6), CTOL=10^(-3)

Oh..I have F000, an older version..i guess thats why...

henry leung schrieb:

Oh..I have F000, an older version..i guess thats why...

Don't know if thats the cause, but sure F000 is the first release from February 2012, M010 is the current release dated October 2012. Vladimir had posted the list of bug fixes for that version http://communities.ptc.com/message/190370#190370

The only bug fix having to do with solve blocks I could spot was

"Fixes an issue where a solve block in Mathcad Prime 2.0 returns incorrect results when constraints are created by copying their definitions"

Wow...I think that is the bug....

I type in the constraint instead of copying it..then everything works....and I got your answer also..

I think this bug fix is very important.....glad they do it.....

but that just give me one more reason to use MC15...how many bugs like this are still hidden.....

henry leung schrieb:

Wow...I think that is the bug....

I type in the constraint instead of copying it..then everything works....and I got your answer also..

I think this bug fix is very important.....glad they do it.....

but that just give me one more reason to use MC15...how many bugs like this are still hidden.....

Thats really interesting. Glad you got it running. Thanks to Harvey as he pointed us to comparing versions. As you wrote you are using Prime 2.0 I wouldn't have thought that a different maintainance release could be the cause.

I for myself sure will stay with version 15 for quite some while. I don't like Prime. Not because of bugs, but because I don't like the awsome slow reaction speed, my dislike of the ribbon interface and lack of important keyboard shortcuts and of course because of the many missing features which M15 already had the whole time. Another reason for me is the bad visibility of the cursor resp. the grey "highlight" - I find it very difficult to see and akward editing an expression on my notebook screen.

AlanStevens wrote:

Try just clicking on Calculate, within the Calculation Tab. The file worked ok for me when I did this! It seems to be the same idiosyncrasy that Valery has come across a couple of times.

Alan

May by this http://twt.mpei.ac.ru/ochkov/Carpet/carpet_eng.htm

Top Tags