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

Community Tip - Learn all about the Community Ranking System, a fun gamification element of the PTC Community. X

Inequality Inside Given Find Block

ptc-1939792
3-Visitor

Inequality Inside Given Find Block

I'm using a Given - Find block for an equation with multiple solutions. I'm trying to use an inequality sign "<" to force the solver to give me a solution in a certain range of values. The solver seems to ignore the inequality sign. Is this a bug? Does the Given Find block ignore inequality signs? Or am I doing something wrong?

1 ACCEPTED SOLUTION

Accepted Solutions

You are doing nothing wrong and you should get the desired result.

The problem is well know and has to do with the units used. You are using pF in your calculations but Mathcads solve block will work with values in the default unit F. That way the values for C.shunt internally are so small, that we fall below a certain limit of numerical precision. Mathcads solve block usually does not distinguish between < and <=, so even if you demand C.shunt to be smaller than 120 pF, Mathcad would also be happy if its equal and the values are so small that for Mathcads precision they are considered equal. Setting CTOL to a smaller value should cure that problem, but unfortunately Mathcad solve block fails, not finding a solution at all.

 

You may have noticed that its also a matter of the guess value. If you set it to 11 pF you get the desired solution.

One way to cope with the problem is by multiplying the values in your inequation by a large number, like

Werner_E_0-1579735958442.png

A better way IMHO is to make the inequation unitless:

Werner_E_1-1579736053349.png

This solves the problem and you get the desired 101.9 pF without having to change the guess value.

 

View solution in original post

6 REPLIES 6

You are doing nothing wrong and you should get the desired result.

The problem is well know and has to do with the units used. You are using pF in your calculations but Mathcads solve block will work with values in the default unit F. That way the values for C.shunt internally are so small, that we fall below a certain limit of numerical precision. Mathcads solve block usually does not distinguish between < and <=, so even if you demand C.shunt to be smaller than 120 pF, Mathcad would also be happy if its equal and the values are so small that for Mathcads precision they are considered equal. Setting CTOL to a smaller value should cure that problem, but unfortunately Mathcad solve block fails, not finding a solution at all.

 

You may have noticed that its also a matter of the guess value. If you set it to 11 pF you get the desired solution.

One way to cope with the problem is by multiplying the values in your inequation by a large number, like

Werner_E_0-1579735958442.png

A better way IMHO is to make the inequation unitless:

Werner_E_1-1579736053349.png

This solves the problem and you get the desired 101.9 pF without having to change the guess value.

 

Thanks! Cshunt/pF<120 works great.

-MFra-
21-Topaz II
(To:ptc-1939792)

Hi

ptc answer.jpg

 

Thank you for your detailed response. I noticed a couple things that I haven't seen before.

 

How do you type the double lines for your parallel impedance function ("||") without Mathcad interpreting it as the absolute value function?

 

What do statements like fs=fs accomplish?

LucMeekes
23-Emerald III
(To:ptc-1939792)

[CTRL-SHFT-k] toggles between normal entry and entry of symbols. That's how you can enter | and others.
The statement f:=f essentially undefines f for the symbolic processor. But f remains defined for the numeric processor.

Success!
Luc
-MFra-
21-Topaz II
(To:-MFra-)

Hi!,

there's nothing new - it's all in Mathcad's guide. You should check it out. I send you a photo related to the topic of operators:

mathcad techniques.jpg

 

Top Tags