Solver block for multiple pairs of input values
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
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?
Solved! Go to Solution.
- Labels:
-
Mathcad Usage
Accepted Solutions
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
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.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
Here is an example of what I was talking about:
Worksheet in format P4 attached
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
This looks like a very clear example! I'll try to implement it in my sheet, and share the results. Thanks Werner_E!
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
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?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
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.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
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.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
