Skip to main content
1-Visitor
October 26, 2012
Solved

Simultaneous Equations won't Solve

  • October 26, 2012
  • 3 replies
  • 6149 views

I'm new at this, so please bear with me. I'm running Mathcad 15 M010 (also tried on Prime 2.0 with the same results)... I'm attempting to use a solve block (Given/Find) to determine the necessary outside diameter of a pipe given a known loading case. When I try to solve the 3 simultaneous equations, I do not get the right answer - matter of fact, the values that I get aren't even valid given the equations I'm using. However, when I merge my equations together in a single equation the solution works fine. I've attached the Mathcad file (Simultaneous equation2.xmcd) with the issue so hopefully someone is up to teaching a rookie how to do this stuff. Thanks in advance.

Best answer by HarveyHensley

Nonlinear problems with multiple variables can be difficult. The search algorithm is going into non-feasible regions. You have prevented that in the second method by making the substitutions for I and A.a. Another way is to make I and A.a functions of either dia.in or a new variable that is the ratio of dia.in to dia.out. Then you have just one variable to find. With the ratio variable, you set the limits between 0 and 1 which is convenient for all cases.

3 replies

12-Amethyst
October 26, 2012

Your initial guesses should be feasible values. Assume the dia.out, calc the guesses for I and A.a.

19-Tanzanite
October 27, 2012

As Harvey says, your guesses are too far off. Numerical solvers for nonlinear equations are iterative. They start at your guesses, and head downhill on the objective function surface to find the minimum. In this case it finds a minimum, and then can't improve it, so it gives up. There is a bug here, because Find should report that no valid solution was found, and it doesn't. (In Mathcad 11, right before they rewrote the compute engine, it does report that it can't find a valid solution). In particular, your guesses for I and Aa are orders of magnitude off. Simply increasing I to 10, which is still way off, will get you the correct solution.

1-Visitor
October 29, 2012

Thanks for the replies - yea I knew my guesses were way off because I was going to some extremes trying to diagnose what was going on with my original set of more logical knowns and guesses. How accurate do I need to be with my guesses, and is it important that I guess either low or high? Picture below (same equation but more reasonable values), if I guess 'I' to be a value of 1 as below, it does not solve right; if I guess it to be 0.1 it does solve right; and if I guess it to be .01 it does not solve right?!? I also never get an error saying it's not solving right. This could lead to some serious errors - anyone have more ideas? Thanks

Simul3.jpg

1-Visitor
October 29, 2012

It actually only solves correctly with "I" values guessed between 0.06 and 0.1?!?

1-Visitor
October 30, 2012

Thanks for the clarification - I'm going to have to be more careful in setting up the equations in the future! The remaining question is why I don't get an error when it doesn't solve correctly? Reconfiguring my equations will help some, but it is impractical for me to check every solution in a large sheet to verify it solved correctly! I've lost confidence in the reported solutions at this stage.

23-Emerald I
October 30, 2012

I'm sorry!

With a fixed inside diameter, both inertia (I) and area (Aa) are direct functions of outside diameter.

So your simultaneous equations collapse (by substitution) into one equation with the outside diameter as the unknown. And that solve block works just fine. Then turning constraints into equations gives you area and inertia.

While what you wrote is correct, as Harvey said, you managed to confuse the solver--returning a negative value for inertia was a good clue. Properly simplified, the solver works correctly.