Community Tip - Want the oppurtunity to discuss enhancements to PTC products? Join a working group! X

Translate the entire conversation x

Solve Function for value

EM_13040032
2-Explorer

Solve Function for value

Afternoon,

I am using the Mathcad Prime 10.

 

I'm fairly new to Mathcad so there may be an obvious answer to this. 

I have a few graphs like this, and am needing to determine the value of v for each curve (green/blue) that gives a Y value of the red line. Is there an easy way to do this? 

EM_13040032_0-1741880624902.png

Also, unrelated and mostly a formatting request, the Y-axis is Pressure, and will only display in Pa, I would prefer psi for this situation but cannot for the life on me figure out if I can change it. Any ideas?

 

Thanks for your help in advance.

3 REPLIES 3
Werner_E
25-Diamond I
(To:EM_13040032)


@EM_13040032 wrote:

Afternoon,

I am using the Mathcad Prime 10.

 

I'm fairly new to Mathcad so there may be an obvious answer to this. 

I have a few graphs like this, and am needing to determine the value of v for each curve (green/blue) that gives a Y value of the red line. Is there an easy way to do this? 

 

First let me say that its always better to attach the worksheet itself, not just a screenshot.

To determine the value v so that  p.s(v)=Y you could either use a numeric solve block with "find" or the "root" function.

Depending on the nature of your functions p.s(v) you may also have luck using the symbolic "solve", but as you are just looking for numeric values I would vote against using it.

Solve block and "root" function" will only work with functions, so this method will not work for Pscmc, as this seems to be a vector. If necessary you may define an interpolating function based in the vector so you are able to use the aforementioned methods or you may help yourself using the some lookup function with the modifier "near".

Look up the mentioned methods and functions in the help and if you run into troubles come back here and post your worksheet with your attempt.

 

 


Also, unrelated and mostly a formatting request, the Y-axis is Pressure, and will only display in Pa, I would prefer psi for this situation but cannot for the life on me figure out if I can change it. Any ideas?

You are not using Primes native plot feature (which is missing grind lines, second y-axis, etc. etc.) but the Chart component, which is a very slow and badly integrated third party add-on. This component can't deal with units at all which means that it is actually a disruptive foreign body in a program like Prime.

The Chart component will always use the dimensionless value in the default unit (determined by the units system chosen). You can only override it by doing the unit-stripping yourself by dividing by the desired unit. So you can manually force the display in values in psi by writing something like

Werner_E_0-1741882607307.png

 

 

 

Fair point, I've attached a worksheet with that gives the calcs up to the point I'm on about. At the bottom there are 2 yellow boxes v0 and v1 that are manually changed by referring to the chart above it. This isnt ideal as parameter above changes are not carried through the entire sheet. I would like to define these variables so that they update according to the intersections on the graph.

 

Also got the units changes thanks for that 👍

Werner_E
25-Diamond I
(To:EM_13040032)

I usually decide against using a solve block because I feel it looks ugly and takes up much space. A solve block is needed if you have additional constraints which have to be considered.

So in the attached sheet I settled for the "root" function. The "root" function can be used in two flavours, either by providing a guess values in front of it or by providing a left and right limit within the function.

As the latter is most compact and worked well in case of your functions, I used this:

Werner_E_0-1741885999574.png

Prime 10 worksheet attached

 

Announcements

Top Tags