Community Tip - You can change your system assigned username to something more personal in your community settings. X
Good morning, PTC Community:
I am getting stuck in quite a simple solve block. See attached for pipe min wall thickness calculation.
A sensible solution for OD is somewhere slightly greater than 0.60-inch.
Is this related to TOL or CTOL commands? Even if I take the TOL or CTOL off, the solution gets stuck in the solver.
Do I have too many items in the Guess block?
I use Mathcad Prime 10.0.1.0.
Your review and suggestions for a fix will be appreciated.
Regards,
Joseph T.
Solved! Go to Solution.
When you define r (and other variables) dependent on OD in your solve block it uses the guess values and is never changed. It remains a constant.
That way you actually don't have any equation in OD in your solve block and Prime cannot fulfill your "equation"
because the value on the left hand side is constant 2.295 (which is what you get with the guess value OD=0.75 in).
There are two possible ways to solve your problem:
1) Turn every assignment like
into an equation
You would have to do this five times.
Drawback is that you now must have the solve block to solve for six variables (OD, r, t, Sig1, Sig2 and Sig.VM) even though you are only interested in OD.
2) The way I would prefer and have chosen in the attached sheet.
Turn all those assignments which depend on OD into functions of OD. I would also move these functions out of the solve block in front of it. That way all that remains in the solve block is the guess and one equation. The additional constraint OD>ID is not really necessary if the guess is large enough, but I would leave it there just to be on the safe side.
This is what it looks like now:
BTW, you could also use the "root" function to do the job
Depending on the range you provide you may also get the solution which is lower than ID
The "root" function could also used by providing a guess value in front instead of the range limits:
Prime 10 sheet attached
When you define r (and other variables) dependent on OD in your solve block it uses the guess values and is never changed. It remains a constant.
That way you actually don't have any equation in OD in your solve block and Prime cannot fulfill your "equation"
because the value on the left hand side is constant 2.295 (which is what you get with the guess value OD=0.75 in).
There are two possible ways to solve your problem:
1) Turn every assignment like
into an equation
You would have to do this five times.
Drawback is that you now must have the solve block to solve for six variables (OD, r, t, Sig1, Sig2 and Sig.VM) even though you are only interested in OD.
2) The way I would prefer and have chosen in the attached sheet.
Turn all those assignments which depend on OD into functions of OD. I would also move these functions out of the solve block in front of it. That way all that remains in the solve block is the guess and one equation. The additional constraint OD>ID is not really necessary if the guess is large enough, but I would leave it there just to be on the safe side.
This is what it looks like now:
BTW, you could also use the "root" function to do the job
Depending on the range you provide you may also get the solution which is lower than ID
The "root" function could also used by providing a guess value in front instead of the range limits:
Prime 10 sheet attached
Werner - I like the 2nd approach that you have explained above, and it works perfectly.
Thank you for the speedy response and solution options.
Getting to a resolution within minutes of my post is unheard of anywhere. So, this is much appreciated.
Regards,
Joseph T.
Manual solution for OD = 0.66733-inch (call it 0.667-inch), with MOS ~ 1.5.
See attached.
@thodij wrote:
Manual solution for OD = 0.66733-inch (call it 0.667-inch), with MOS ~ 1.5.
See attached.
Correct 🙂
Guess our posting have crossed.
BTW, demanding that the MoS>=1.5 does not make much sense, because any OD value larger than the 0.667 in makes the MoS larger.
The same is true for any value of OD smaller than 0.348 in.
Werner,
If I set MOS >= 1.5, and set a TOL on the MOS to, say +0.001/-0.000 within the solve block, then that will constrain the problem solution.
What do you think?
Joseph T.
What exactly does the CTOL & TOL commands do within the solve block?
Could these two commands be placed within the Constraints section?
Thanks,
Joseph T.
I am not sure what exactly you would like to achieve and why you are concerned about tolerance.
And if you use MoS >= 1,5 and use a guess value of 0.75 in, the result sure will be 0.75 in simply because using this value for OD makes your expression for MoS so large that it significantly exceeds 1.5 and so of course fulfills the constraint that MoS should be larger than 1.5. As already written above - ANY value for OD larger than the 0,667 in will make MoS larger than 1.5 and so is a solution.
But if you use a smaller guess like OD=0.5 in, it makes sense. Here also the additional constraint OD>ID is important. If you use OD<ID Prime will return the lower solution 0.348 in.
I don't think your solve block will be significantly affected by the values of CTOL or TOL (unlike the result of the “root” function), but if you want to change these values (default is 10^.3 for both), then I would definitely do it above the solve block, possibly at the very beginning of the sheet or via the menu (Calculation ribbon, Worksheet Settings).
You can try it out - display the result of Z with 15 decimal places and compare the results with different values of CTOL/TOL.
Thank you, Werner, for taking the time to respond and clarify.
Best regards,
Joseph T.
Werner, if I do the following in the constraints section, then I can enforce an upper and lower limit on the MOS:
Thanks,
Joseph T.
You sure could do so but what would be the sense of it?
This forces (if you use the OD>ID constraint) the solution to be somewhere inbetween the two values OD1 and OD2
A small range of 10^-5 in
And it will depend on the guess value in the solve block, which of the two values you will get.
Werner,
Yes, I see your point, and I appreciate your taking the time to explain.
Thanks,
Joseph T.