Skip to main content
12-Amethyst
September 11, 2015
Solved

Find result sometimes has wrong sign

  • September 11, 2015
  • 13 replies
  • 5005 views

I'm using a Given ... Find solve block in a function.

When I call the function with an argument, sometimes the result has a positive sign, sometimes negative.  Mathematically it is correct, but I can't figure out why it's giving sign changes, and I only want positive results.

The seeded guess value is positive.  If I seed the guess value to high to try to sneak in to the solution from the high side, the function fails frequently.

I tried adding an inequality inside the solve block (R_guess>0 in) to try to force a positive result.  The function fails all the time.

Looking for suggestions to get only a positive result from the Given ... Find function.


Capture.PNG

Best answer by Werner_E

Change R.guess to 0.01 in

You may also take the absolute value of all results.

Are you aware that R.reduced(R1) simply returns R1 ?

13 replies

1-Visitor
September 11, 2015

Please provide a worksheet as the image does not show all the variables.

Mike

23-Emerald I
September 11, 2015

Andrew Kelly wrote:

I'm using a Given ... Find solve block in a function.

When I call the function with an argument, sometimes the result has a positive sign, sometimes negative.  Mathematically it is correct, but I can't figure out why it's giving sign changes, and I only want positive results.

The seeded guess value is positive.  If I seed the guess value to high to try to sneak in to the solution from the high side, the function fails frequently.

I tried adding an inequality inside the solve block (R_guess>0 in) to try to force a positive result.  The function fails all the time.

Looking for suggestions to get only a positive result from the Given ... Find function.


Capture.PNG

Mike has asked for your sheet.  Some of the questions that jump out:

      In the first line, what is R2?

      In the second line, what is Ereduced?

      What value do you have for scriterion?

At first look, a(R,P) is a cube root, so can be negative or positive, your solve block uses a (R,P) squared, so Pmax is forced positive whether R is positive or negative.

15-Moonstone
September 11, 2015

Hello

These are the formulas for the Hertz contacts, it is the area between two spheres.

The E is young's modulus of each sphere.

See attached in French, but you'll probably find the same thing in English.

Kind regards.

Denis.

Contact de Hertz — Wikipédia

akelly12-AmethystAuthor
12-Amethyst
September 11, 2015

Here is the full worksheet.  It's an attempt to find the recommended spherical radius for an arbitrary force, such that a specific contact pressure is obtained.

Note: V15 M040.

Werner_E25-Diamond IAnswer
25-Diamond I
September 11, 2015

Change R.guess to 0.01 in

You may also take the absolute value of all results.

Are you aware that R.reduced(R1) simply returns R1 ?

akelly12-AmethystAuthor
12-Amethyst
September 11, 2015

Werner Exinger wrote:

Change R.guess to 0.01 in

Can someone explain how/why the seed value affects the results?

I understand the layman's concept that when multiple answers are possible, the seed value should be close to the answer.  But what I'm seeing is that it isn't always picking the solution that is closest to the seed value.

R.guess = 0.01 in --> all results are positive

R.guess = 10 in --> results are sometimes positive, sometimes negative

R.guess = 10000 in --> all results are negative