Continue to Site

Eng-Tips is the largest engineering community on the Internet

Intelligent Work Forums for Engineering Professionals

  • Congratulations GregLocock on being selected by the Eng-Tips community for having the most helpful posts in the forums last week. Way to Go!

Plotting Solve Block Results

Status
Not open for further replies.

gambitjj

Civil/Environmental
Sep 11, 2008
6
Does anyone know how to do this?

I am having problems sizing a control valve and would like to graph the results to verfiy that my system is stable. To do this, I would like to iterate my solve block over a range of predetermined values and plot the response of Qbw and PopenR.

If anyone has an example of this, please let me know. I know that range variables are not allowed in solve blocks, though. I was wondering how it was done.

Please pardon the organization of the sheet :). Just scroll to the end and take a look at the results. The block works.

gambitjj
 
Replies continue below

Recommended for you

You create a function with a list of variables to be changed and assign to it the Find function:

Given
blah
blah

func(x,y):=Find(z)

Then, iterate on func(x,y)

TTFN

FAQ731-376
 
Can I use this approach with units or do the variables have to be dimensionless?
 
I am having a really hard time performing this calc with units. I've seen web examples of it done without units. Can someone confirm or provide an example of this being done with units?
 
I have had problems when using units. Functions link ln() will not work. I don't use units because very little of the math I do is simple arithmetic or algebra.

BTW, I can't play because you posted using version 14. I would always post problems using version 11. I have version 13 but I know many have stayed with 11.

I have lots of examples of control using solve, find, minerr etc. Perhaps you can find an example of what you need here even though I don't know exactly what you want.
ftp://ftp.deltacompsys.com/public/NG/Mathcad%20-%20IAE3.pdf
It has a little of everything I think.


 
That looks to be a good source of MathCAD examples !
ftp://ftp.deltacompsys.com/public/NG/

Philip
 
Wow, this worksheet need some work. To start with I would assign the table for flows and heads to a variable 'Column'.
I inserted a table that by insert->data->table and copied your data into the one I made
Column:=TableOfHeadsAndFlows
I can't show the Table of Head and flow in text but you know what I mean

Flow:=Column<0>
Head:=Column<1>

After I fixed that I got the graph below to work.

I didn't get any data in the System table except a 0 at System0,0

As IRStuff said, you aren't using the given and find correctly. I didn't see the given for the find.
The proper way to use find is like this
ftp://ftp.deltacompsys.com/public/NG/Mathcad%20-%20CenterOfCircleCalculations.pdf
The answer stretches across a couple of pages.

That looks to be a good source of MathCAD examples !
ftp://ftp.deltacompsys.com/public/NG/
There are other directories. My company, Delta Computer Systems, makes motion controllers so I must be able to do closed loop control and simulations. I generated these pdf files to make my points clear on other forums. I can see I need to update some.


 
Thanks for the help. I admit that the sheet has to be organized, but the solve block works fine. I am just trying to iterate the solve block at this point.

"I didn't get any data in the System table except a 0 at System0,0

As IRStuff said, you aren't using the given and find correctly. I didn't see the given for the find."

That's weird all components work fine in my version. Now that you mention it, I do remember when saving as a v11 file, Mathcad warned that I might lose some features. This is frustrating. All graphs and the solve block worked. The find command is in a hidden region near the end of the sheet where it says "results vector collapsed".

Would a pdf help?
 
 http://files.engineering.com/getfile.aspx?folder=c8327fa5-c7e4-4e46-9168-975537e9e360&file=Mathcad_-_flow_balance_3.pdf
First, you have not defined System.

Next, the vector result (and thus the parameters) of the Find function cannot contain elements with different units. This is true of any matrix of vector - all elements have to be either unitless or have the same units.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor