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

Community Tip - Help us improve the PTC Community by taking this short Community Survey! X

Trying to use a solve block to solve for multiple inputs simultaneously

ES_10230081
2-Guest

Trying to use a solve block to solve for multiple inputs simultaneously

Hi, I am a student that is new to Mathcad and am having a lot of trouble getting a solve block to calculate the value of 2 separate variables with an indexed input. If anyone has any knowledge on how to get mathcad to do this, it would be very appreciated. Thanks

1 ACCEPTED SOLUTION

Accepted Solutions

I would rather turn all calculations into functions of theta.2 and use the function to plot

Werner_E_1-1646614530328.png

 

I attach the worksheet. At the and I also show how you could create vectors of values in case you would prefer that.
You will note that in the second solve block I had to get rid of the unit "in" temporary using the function "UnitsOf" and had to add it later. The reason is that Mathcad won't allow to define a function which returns a vector with mixed dimensions (angle and length).

 

View solution in original post

6 REPLIES 6

The error message a solve block throws most often are rather meaningless or misleading.

Right click the red theta6 and chose "Trace Error" and then "First". This brings up a more meaningful error message.

Werner_E_0-1646606925674.png

 

The reason for your solve block failing is the range for theta.2.

You should use ranges only to

.) index vectors/matrices

.) create a for-loop in a program

.) use it for the abscissa values in a 2D plot

 

I am not sure what you had in mind to do with that range. If the goal was to make the results of the solve block dependent on theta.2, you can turn the solve block into a function of theta.2

Werner_E_1-1646607510938.png

which you could use that way

Werner_E_2-1646607554785.png

You may also define separate functions for the two result values

Werner_E_3-1646607670853.png

You may now define a range variable and use it for plotting (note that you also have to add the unit "deg" to the second value 1)

Werner_E_4-1646607755867.png

You may use this range also to display a crude table of values

Werner_E_5-1646607811746.png

but you can't use those value for further calculations, can't assign the lists to a variable, etc.

If thats what you need you would have to create vectors, not ranges.

 

 

Very helpful information. My final goal is to plot the path of a point on a mechanism as a link (with angle theta 2) does a full rotation. So based off of what you said, I would need to create vectors, not ranges, as I need to use the value of theta 2 for further calculations. Would you be able to show me how to do this? If you need more information id be glad to give it

 

I would rather turn all calculations into functions of theta.2 and use the function to plot

Werner_E_1-1646614530328.png

 

I attach the worksheet. At the and I also show how you could create vectors of values in case you would prefer that.
You will note that in the second solve block I had to get rid of the unit "in" temporary using the function "UnitsOf" and had to add it later. The reason is that Mathcad won't allow to define a function which returns a vector with mixed dimensions (angle and length).

 

You are a saint for taking the time to help me understand this. I am a senior in Mechanical Engineering and am just now beginning to learn the many great uses of mathcad. Once again, thank you for the thorough and detailed response!

This is also my first time posting on this forum, if there is anything I can do besides giving you a thumbs up let me know as I would gladly take the time to do it.

You are welcome. I'm glad I could help.

Top Tags