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

Community Tip - Help us improve the PTC Community by taking this short Community Survey! X

The variable not accepting

RWickrama
10-Marble

The variable not accepting

I am taking self-faced training to gain Mathcad skills (using Prime 6.0)

In my worksheet, the variable is not accepting. I tries my best without success. So, looking forward to receive help from someone. Thanks a lot.

 

2020-04-23 15_36_00-Window.png

 

2020-04-23 15_39_45-Window.png

ACCEPTED SOLUTION

Accepted Solutions
Werner_E
25-Diamond I
(To:RWickrama)

I guess its a combination of two or three things (bugs in Prime).
1) The symbolics doesn't know anything about units

2) Prime very often fails when it comes to autolabelling, especially in conjunction with the symbolics

3) The new symbolics introduced and set by default with Prime 6 is even weaker than the old mupad (which stll can be set via the options.

 

The main reason is a misinterpretation of the unit psi by the symbolics.

If we evaluate P.seal and G symbolically we see the main problem:

Werner_E_0-1587685325080.png

In P.seal psi is correctly recognized as a unit but in G its seen as ordinary variable. So in your second expression using G we actually have psi[unit] and psi[variable] which are treated as two differently variables by the symbolic and they don't cancel.
The new symbolic is too less capable of solving the equation with those two unknowns, the old symbolic (you may give it a try) finds a (huge) solution, which at least gives you the desired result when evaluated numerically:

Werner_E_0-1587686164418.png

 

Fortunately there is a solution built into Prime (which often in such situations does not work as expected but in case of your equation it does).

In the calculation ribbon in calculation option turn on the option "Units/constants in symbolic math" and then recalculate the whole sheet (pressing F5, F9 or Ctrl-F9).

Werner_E_1-1587685789229.png

In case you only need the real solution you can use the "assume" modifier as shown in the pic.

 

 

 

View solution in original post

5 REPLIES 5
Werner_E
25-Diamond I
(To:RWickrama)

I guess its a combination of two or three things (bugs in Prime).
1) The symbolics doesn't know anything about units

2) Prime very often fails when it comes to autolabelling, especially in conjunction with the symbolics

3) The new symbolics introduced and set by default with Prime 6 is even weaker than the old mupad (which stll can be set via the options.

 

The main reason is a misinterpretation of the unit psi by the symbolics.

If we evaluate P.seal and G symbolically we see the main problem:

Werner_E_0-1587685325080.png

In P.seal psi is correctly recognized as a unit but in G its seen as ordinary variable. So in your second expression using G we actually have psi[unit] and psi[variable] which are treated as two differently variables by the symbolic and they don't cancel.
The new symbolic is too less capable of solving the equation with those two unknowns, the old symbolic (you may give it a try) finds a (huge) solution, which at least gives you the desired result when evaluated numerically:

Werner_E_0-1587686164418.png

 

Fortunately there is a solution built into Prime (which often in such situations does not work as expected but in case of your equation it does).

In the calculation ribbon in calculation option turn on the option "Units/constants in symbolic math" and then recalculate the whole sheet (pressing F5, F9 or Ctrl-F9).

Werner_E_1-1587685789229.png

In case you only need the real solution you can use the "assume" modifier as shown in the pic.

 

 

 

Dear Sir. Thanks a lot for the reply. Great answer.

I was good in Mathcad R15 and R15 in those days.  The Prime versions always gave me a hard time to meet with my calculations. Actually, I gave up doing with Mathcad. I never used, but, I kept renewing my Mathcad license.  

Recently, I took a try with Prime 6.0. I found, I was comfortable with a lot of things I could not do those days. Therefore, I decided to upgrade my lost Mathcad skills using Prime 6.0.

 

I noticed several times that weird things happening.  The things did not go through once, went through well later. I am basically sad that there are bugs.

 

However, I will, this time, keep continue.

 

Again, thanks for your reply with details.

 

 

 

StuartBruff
23-Emerald III
(To:RWickrama)

Two points - one for you and one for those using Mathcad Prime Express.

 

One: It's often worth doing a check of an expression outside of a definition - it's one of my most useful debugging techniques in Mathcad Prime.

 

2020 04 24 B.png

 

(On a side note, your Figure-2 shows that you're redefining Pseal to take the dimensionless λ values rather than a pressure).

 

Two: Mathcad Express users don't have the luxury of built-in symbolic processing, but they can still solve some categories of root finding problems, by using the built-in function root.

 

2020 04 24 A.png

 

Stuart

 

 

Dear sir. Thanks a lot for your reply with a great explanation and the attached worksheet.

I learned a lot. 

Thanks, again, a lot for your time.

StuartBruff
23-Emerald III
(To:RWickrama)

No worries, and I hope your "updating" to Prime goes well.

 

Stuart

 

(I gave up my licence because Prime was so lacking in capability compared to M15.  There are some improvements, but nothing of sufficient value that would entice me to retain/buy a licence, given that too many things I used in M15 that still aren't in Prime (direct image plotting is a 'Prime' example) and a few things are broken (eg, local functions can't be recursive, which kind of defeats the point for many of their uses).  

 

OTOH, Prime Express is very good value for the money(!), and is actually quite capable once you start using recursion to get round the lack of Programming).

Announcements

Top Tags