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 PTC Community Badges. Engage with PTC and see how many you can earn! X

Solver block for multiple pairs of input values

ptc-5045645
3-Visitor

Solver block for multiple pairs of input values

Hi everyone. I'm very new to MathCAD, using Prime 4.0. I was able to figure out solving 2 simultaneous equations using Solve blocks, and now I'd like to take that one step further so I could solve for multiple pairs of input values. That is, I already have a solve block that finds correct values w/ guess values x1 & y1, and would like one that will solve for x1 & y1, x2 & y2, x3 & y3... I'm guessing this would require some sort of matrix magic, but I'm not really sure. Obviously, I could just copy & paste the solve block for each new pair of inputs, but I have to believe there's a more elegant solution. Can anyone provide some advice?

1 ACCEPTED SOLUTION

Accepted Solutions

See if this works.

View solution in original post

7 REPLIES 7

With input values you obviously mean the guess values, right?

You can turn the solve block into a function with the guess values as arguments.

Just attach your worksheet with the example solve block which you expect to return different results for different guess values.

Here is an example of what I was talking about:

B.png

Worksheet in format P4 attached

This looks like a very clear example!  I'll try to implement it in my sheet, and share the results.  Thanks Werner_E!

I tried the method that you showed, but I think there's some extra details which I'm unsure about.  I've attached my sheet in Prime 4.0 format.  The equations are those for getting stress and deflection of a circular membrane subjected to uniform pressure and allowing for deflections greater than 1/2 membrane thickness.

 

The 2 equations must be solved simultaneously in sigma and y.  The design parameters I'd like to investigate are q (applied pressure), a (membrane radius), and t (membrane thickness).

 

So, I'm not sure how to establish my equations in the same form as what you showed, since I have parameters along with the variables sigma & y.

 

Can you offer some guidance Werner_E?

I only have Express, but that allows me to edit.  See the change in the first solve block, see if that doesn't work for all the pressures and thicknesses.

FredKohlhepp, that works quite well, thanks.  Is there a way to go one step further, and now have a matrix of pressures and thickness and get answers back for each group of input parameters?

 

I'm guessing this would be complicated, since each set of parameters produces sigma & y output results.  I've seen there's an option to vectorize equations, and have tried playing around a bit with that, but I think it's beyond my skill.

See if this works.

Top Tags