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

Solve block stuck equal to "guess value"?

dsochor
10-Marble

Solve block stuck equal to "guess value"?

In the attached mathcad prime 3.1 worksheet I'm attempting to utilize a solve block to determine the actual value of the variable xNA. A guess value was used earlier in the worksheet. Although the worksheet produces no errors it's setting the solved value to whatever the guess value is. How can I stop this behavior? Is it due to incorrect constraints?

 

ACCEPTED SOLUTION

Accepted Solutions
LucMeekes
23-Emerald III
(To:dsochor)

You changed nothing to the Solve block itself.

DJF is fuly right in stating that the solve block is working and doing exactly what you are asking.

But, your solve block is a bit silly, and it probably does not deliver what you had in mind.

Here's why:

You define a guess value for Xna far up.

clipboard_image_0.png

Just above the solve block you define a target value with:

clipboard_image_1.png

This makes sure that Equilibrium gets the value of Xna applied to that equation within absolute bars.

Now, in the solve block, you essentially request to find the value of Xna such that, when it is applied to that same equation between absolute bars, it delivers Equilibrium.

I don't need a solve block to know that the result of that is exactly: 32.018 in. In fact I don't even need to know the equation, because this holds no matter what equation you have (so long as it does not result in an error).

If you change

clipboard_image_2.png

e.g. to

clipboard_image_3.png

At both sides, in the definition of Equilibrium as well as in the contstraint of the solve block, you'll get the very same answer.

I think you need a different value for Equilibrium (one that not depends on the guess value of Xna)...

 

Success!
Luc

 

 

View solution in original post

6 REPLIES 6
DJF
16-Pearl
16-Pearl
(To:dsochor)

Looks like it's doing exactly what you told it to do.  Ttot and Fc don't seem to actually change with Xna so your guess value doesn't matter.  Any value will work so it stops with the guess.  So go back a few steps and figure out where those functions went wrong.

Werner_E
25-Diamond I
(To:dsochor)

Your solve block works - just try to use a guess value like 10 in or lower.

A plot may give you a hint as to whats going on:

clipboard_image_1.png

Every value of x.NA greater than approx. 13.7 in is a valid solution for your solve block equation.

 

LucMeekes
23-Emerald III
(To:dsochor)

Here's one part where your functions become unrelated to Xna:

clipboard_image_0.png

|

clipboard_image_1.png

followed by:

clipboard_image_2.png

You HAVE to make part1...4 each dependent on Xna, if you want Ttot to be dependent on Xna.

So: part1(Xna)...

 

Success!
Luc

Thanks LucMeekes, adding the xNA dependency to each part of the attached modified spreadsheet changed the solve block. The solve block no longer copies the guess value but instead uses the initial guess earlier. The solve block still doesn't work but it's getting closer. Perhaps I need to adjust the constraints needed to be adjusted.

 

LucMeekes
23-Emerald III
(To:dsochor)

You changed nothing to the Solve block itself.

DJF is fuly right in stating that the solve block is working and doing exactly what you are asking.

But, your solve block is a bit silly, and it probably does not deliver what you had in mind.

Here's why:

You define a guess value for Xna far up.

clipboard_image_0.png

Just above the solve block you define a target value with:

clipboard_image_1.png

This makes sure that Equilibrium gets the value of Xna applied to that equation within absolute bars.

Now, in the solve block, you essentially request to find the value of Xna such that, when it is applied to that same equation between absolute bars, it delivers Equilibrium.

I don't need a solve block to know that the result of that is exactly: 32.018 in. In fact I don't even need to know the equation, because this holds no matter what equation you have (so long as it does not result in an error).

If you change

clipboard_image_2.png

e.g. to

clipboard_image_3.png

At both sides, in the definition of Equilibrium as well as in the contstraint of the solve block, you'll get the very same answer.

I think you need a different value for Equilibrium (one that not depends on the guess value of Xna)...

 

Success!
Luc

 

 

Thanks LucMeekes, changing the constraint equation and adding xNA dependency to prior equations fixed the issue. The fixed mathcad is attached to the original post

Announcements

Top Tags