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

Community Tip - Want the oppurtunity to discuss enhancements to PTC products? Join a working group! X

Different results in MC-13 and MC-14

aprasun
5-Regular Member

Different results in MC-13 and MC-14

Hi all

I am facing a peculiar problem. same problem, I solve using two versions of Mathcad namely mathcad 13 and Mathcad 14. to my surprise, both are giving different results. I rechecked the results, but am unable to find bug. Kindly suggest the possible reasons and also suggest whose results I should accept and whose to discard.

For this I am attaching my file saved as Mathcad Version 11, mathcad version 13 and 14 files as well as screen captures showing results.

thanks

PRASUN
20 REPLIES 20
aprasun
5-Regular Member
(To:aprasun)

Sorry

I could not attach screen shots last time due to size limit. they are right here.


Prasun
StuartBruff
23-Emerald II
(To:aprasun)

On 5/25/2009 2:26:34 AM, aprasun wrote:
== I am facing a peculiar problem. same problem, I solve using two versions of Mathcad namely mathcad 13 and Mathcad 14. to my surprise, both are giving different results. I rechecked the results, but am unable to find bug. Kindly suggest the possible reasons and also suggest whose results I should accept and whose to discard.
== For this I am attaching my file saved as Mathcad Version 11, mathcad version 13 and 14 files as well as screen captures showing results.

I haven't run it in M13 or M14 (just M11), but I'll put good money on it being that the default solver in M14 is Levenberg-Marquart rather than Conjugate Gradient (which the M11 and M13 (I guess) use.

Stuart

(That's hot off the press - I haven't looked in detail at your worksheet)

As Stuart surmises, the difference is due to the different default algorithm. As to which you should accept, probably neither. Both solutions satisfy your conditions to within the default tolerances (remember, with numerical methods nothing is ever exact). That two solutions that are so different satisfy the conditions indicate that the conditions do not define a solution very well. If you tighten the tolerances, with both TOL and CTOL at 1E-9 then no solution is found.

You also have a major scale issue. Find works by minimizing the overall length of the error vector. When one element in the error vector is much larger than another, the smaller one is often not "seen" in the overall error, and so that constraint is not well applied. Using relative, rather than absolute, errors often avoids this issue. But it does have it's own issue, as it implies a different set of weights in the least squares solution (the basis of both find and minerr). You can do least squared ignoring weights, but you cannot avoid them actually being present and affecting your results. Sometimes just scaling the values to work with values more or less near one helps. Try to avoid having more than two or three orders of magnitude difference between components.
__________________
� � � � Tom Gutman
aprasun
5-Regular Member
(To:TomGutman)



1. Can we plot graphs of the equations in order to have rough estimate of roots?

2. As it is evident from the mathcad 14 output that the third equation has not converged properly. This gives some idea and encourages us to tighten the tolerances as well as modify the "seed" values slightly.

Prasun

Plotting is always a good idea to get some idea of the behaviour of systems. But there is a problem when you have three independent variables -- that requires four dimensional plots,which are not provided for in Mathcad (nor, by and large, in the human brain).

In principle each equation defines a solution surface, and you can try to plot those surfaces. But plotting a surface defined implicitly (as f(x,y,x)=0) is not trivial. There have been a few sheets posted on this issue.
__________________
� � � � Tom Gutman

On 5/26/2009 3:54:28 PM, Tom_Gutman wrote:
>when you have three independent variables -- that requires four dimensional plots,which are not provided for in Mathcad (nor, by and large, in the human brain).

We live in a 4D world. A 4D plot it is an animation of a 3D surface plot. Hard to print, that's true; maybe some fews interesting frames can represent the time variation.

Also, have some kind of sensors for the time, and the human perception of the time is discrete (not continous).

With a ms form scroll bar whith a script that assign the variable FRAME you can easy preview the animation without playing the avi generetad.

Alvaro.

Interesting concept. Could you apply it to the current problem to illustrate the behaviour of the functions involved, and explicate why there are some difficulties in obtaining a well defined answer?
__________________
� � � � Tom Gutman

On 5/26/2009 10:27:24 PM, Tom_Gutman wrote:
>Could you apply it to the current problem ...

Can't. Can't read at this time mc up to 11. The only thing that I can see is the jpg image.

Attached shows an example of a "4d plot", and how to show the starting point for searching a numerical root, and where the algorithm return an unique solution, in a problem that usually have a lot.

If the problem is a minimization, the extrema are also function of the time, and this setup can shows the variation with the time of these points.

Alvaro.

The extrema version. A direct discretization can find sometimes better answers than the Maximize function.

Regards. Alvaro.

I don't see that Prasun also post a mc 11 version. I just see that.

Attached looks similar, but isn't in the idea of 4D plots. I think that there are something bad with the equations, because isn't acutally a system 3x3.

This can be showed evaluating the Resolvant of the system (avaible for nonlinear systems too), but this is a theoretical tool, and I can't implement this in a practical way.

Thus, here, P/Ecr is eliminated from the system, and the animation shows only the starting point and the root obtained, but not as function of P/Ecr, wich for the equations in the work is a bad setup.

Concluiding: there are an additional condition to determine P/Ecr with unicity (or a set with few values).

Alvaro.

You've used the second equation to remove one of the independent variables, making the system one of two variables. No problem plotting those. And a good application of the general rule that constraints of the form x=e, where e is an expression not involving x and x is a variable named in the find (or minerr) statement should not be used. Such constraints should be replaced with equivalent function definitions, reducing the number of unkowns by one.

But your function A makes no sense. f1 and f2 must both be zero. But their product is zero if either is zero.
__________________
� � � � Tom Gutman

On 5/27/2009 7:44:46 PM, Tom_Gutman wrote:
>But your function A makes no sense. f1 and f2 must both be zero. But their product is zero if either is zero.


Yes, you're right. For the given/find block with only one function the correct setup is A(u,v)=|f1(u,v)|+|f2(u,v)| or f1^2+f2^2 for reals.

But, A isn't used, so, better is putting f1=0 and C*f2=0 in the solve block, with C a convenient factor (near 10^5).

Acutally A is an unwanted survival from developing the solution from the others worksheets.

The elimination of superflous variables in non linear system isn't only for convenience; have also theoretical substent. The Resolvant are studied for Lagrange (I guess, maybe was other guy) reducing to linear problems near the solutions. For some systems it is possible find the resolvants, but I think that have not practical applications, except maybe, in the algebraic curves, and at very high level.

Alvaro.

On 5/26/2009 6:40:32 AM, aprasun wrote:
>1. Can we plot graphs of the
>equations in order to have
>rough estimate of roots?
>
>2. ...
>Prasun
____________________________

Sure you can, as attached. I didn't dare posting earlier as that piece of Engineering looks all scrap to me. Do more steps on your own ... how many solutions do you think you will get ? You can see clearly that you can't solve for both alpha & beta , you can solve for one, the other being fixed. Does it makes sense if that piece of Enginering makes sense as you seem to trust it so much like Gospel ?



jmG

Replacing the second constraint with a function definition and scaling the third constraint produces a stable solution.
__________________
� � � � Tom Gutman
aprasun
5-Regular Member
(To:TomGutman)

dear Tom/Alvaro

thanks for suggesting "Faster version" of solutions. may I expect the " stabilized" results even if I change the "Guess" values of the variables. I tried to change the guess values and the result went into imaginary numbers.

Have some suggestion?

Prasun

On 5/28/2009 1:30:43 AM, aprasun wrote:
>dear Tom/Alvaro
>
>thanks for suggesting "Faster
>version" of solutions. may I
>expect the " stabilized"
>results even if I change the
>"Guess" values of the
>variables. I tried to change
>the guess values and the
>result went into imaginary
>numbers.
>
>Have some suggestion?
>
>Prasun
___________________________

Try going to right route as demonstrated in my previous reply. No problem to parameterize the Given/Find, there are plenty of examples in this forum.

jmG

... in your opinion, where do you think there is (are) solution(s) ?



jmG

On 5/28/2009 1:30:43 AM, aprasun wrote:
>thanks for suggesting "Faster version" of solutions.

That's it is not the concept of the posts that I read here, aren't fast (by istelf).

>may I expect the " stabilized" results even if I change the "Guess" values of the variables.

You can't. Usually two surfaces intercepts over a curve and maybe some few isolated points. But actually, at anything, like an entire volume.

The concept of a 'stable' solution is one that have a small set of isolated points, and for a reasonable range of guess values, all fall in the same one point.

The extended concept is that, even the solution could be anything (like complexes in your case), there are some ranges for alpha and beta that the solutions are equals (but not always).

You must impose more restrinctions over your problem. There are one or two equations losed.

A lot of times the restrictions came from the factorys: only some sizes avaibles, only some stress, and thinks like this.

All angular obertures are admisibles? (remember that you write your angles in radians, from 0 to 1 there are a lot of degrees there). Which is the definition of 'fisured concrete'? Never is 'broken concrete'? For the low, you take corrosion=1.5 mm and thickness 20 mm - corrosion. How correlates this variations with the half angles? For the high, alpha and beta are half angles, so, which is their upper limit? 1 rad is near 60 deg, too much for a 'half angle'.

If you include some range also for the external pressure (is external, isn't? So, can't be anything, someone sure know how much could be) you can include the pressure equation as restriction in a minmax problem.

Or search in the literature the lost equation.

Alvaro.

Yes, your first equation imposes restrictions on α and β to be real. If you have values not consistent with this restriction, you get imaginary values. Note that this is associated with the denominator going to zero, hence a singularity.

You can get rid of the imaginaries by the simple expedient of squaring both sides of the equation, thus getting rid of the square root. But you still have the pole, and the find algorithm will generally not be able to cross that pole in searching for a solution. So you still need guess values that are reasonable and viable -- and on the right side of the singularity.

You might have noticed the somewhat odd range I used for plotting. That is because I originally ran into the imaginary values problem.

As you suggested in your original posts, plots can be extremely helpful in visualizing and understanding the behaviour of the system.
__________________
� � � � Tom Gutman

There is nothing about faster or not faster or imaginary ... etc. You have passed too mystic relationships, not conform to the "Engineering" if that "Engineering" is valid but we have no means to check it. Whatever, your entire project is simple (as interpreted), but you must understand the solutions as well as the project itself.

All done final & tutored between Marletts.

jmG
Top Tags