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

Community Tip - When posting, your subject should be specific and summarize your question. Here are some additional tips on asking a great question. X

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
23-Emerald I
(To:ptc-5045645)

See if this works.

7 REPLIES 7
24-Ruby V
(To:ptc-5045645)

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.

24-Ruby V
(To:Werner_E)

Here is an example of what I was talking about:

Worksheet in format P4 attached

3-Visitor
(To:Werner_E)

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

3-Visitor
(To:ptc-5045645)

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?

23-Emerald I
(To:ptc-5045645)

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.

3-Visitor
(To:Fred_Kohlhepp)

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.

23-Emerald I
(To:ptc-5045645)

See if this works.

Announcements
Top Tags