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

Community Tip - Your Friends List is a way to easily have access to the community members that you interact with the most! X

Solve Blocks Plotting Results

Callum1995
6-Contributor

Solve Blocks Plotting Results

Good Morning, 

 

I am encountering a problem with the attached file. I have created a sheet that solves siphon flow rate using a solve block. So far the calculator is able to solve for different heights (Z) if you enter this value. 

 

Now what I wish to do is create a plot that shows the flow rates for heights varying between say 1 to 2 meters head. I have defined n number of points and created a function that returns a vector with the different heights in it this vector uses the index k and goes from 0 to n. 

 

Now what I wish to do is run the values for Z through my solve block to get an output (V-out) which corresponds to each element of the vector Z. (e.g solve for 1m to 2m using the increments defined in the second sheet). This way I can create a plot of the values Z against the values V-out and show how the flowrate through the siphon varies with the available head. 

 

Many Thanks,

Callum 

1 ACCEPTED SOLUTION

Accepted Solutions
LucMeekes
23-Emerald III
(To:Callum1995)

You can make the result of the solve block a function of Z.

In Mathcad 11 it looks like this:

LucMeekes_0-1647614707322.png

Note that VfRe(Z) is a vector function of Z. You have to take it apart in the three functions:

LucMeekes_1-1647614768657.png

Now you can plot:

LucMeekes_2-1647614825589.png

Now you build this into Prime. I've attached a Prime6 file conversion of yours, for other people to help.

Success!
Luc

View solution in original post

6 REPLIES 6
LucMeekes
23-Emerald III
(To:Callum1995)

You can make the result of the solve block a function of Z.

In Mathcad 11 it looks like this:

LucMeekes_0-1647614707322.png

Note that VfRe(Z) is a vector function of Z. You have to take it apart in the three functions:

LucMeekes_1-1647614768657.png

Now you can plot:

LucMeekes_2-1647614825589.png

Now you build this into Prime. I've attached a Prime6 file conversion of yours, for other people to help.

Success!
Luc

LucMeekes
23-Emerald III
(To:Callum1995)

Incidentally, I get somewhat different results for Z=1.5 m than what your sheet shows:

V=3.485 m/s instead of 3.195 m/s, about 10 % more.

f=0.01485 instead of 0.01495, almost 1 % less.

Re=675650 instead of 619560, some 9 % more.

 

Luc

Callum1995
6-Contributor
(To:LucMeekes)

Hi Luc, 

 

That is interesting that the flowrate would be different. Out of curiosity what were your tolerances on the calculations? I have the standard 10^-3 on my sheet, thinking this may possibly influence the result obtained from the solve block. 

 

Thanks,

Callum 

Callum1995
6-Contributor
(To:Callum1995)

Or could it possibly be due to your minor loss coefficient? I have used a K value of 1.411 in my calculation. I have screen-shotted the other parameters. 

Callum1995_0-1647949551191.png

Thanks,

Callum 


@LucMeekes wrote:

Incidentally, I get somewhat different results for Z=1.5 m than what your sheet shows:

V=3.485 m/s instead of 3.195 m/s, about 10 % more.

f=0.01485 instead of 0.01495, almost 1 % less.

Re=675650 instead of 619560, some 9 % more.

 

Luc


Hmm, I implemented the solve block function in the P6 sheet you kindly provided and I get the very same result as in Callum1995's original sheet when I feed it with Z=1.5 m.

Werner_E_1-1647956425178.png

The algorithm for the non-linear solver has changed from real Mathcad to Prime, but I wouldn't have expected differences that large due to that change. My best guess is that you may have a typo in defining some constants like rho, ny or D.

 

Modified P6 sheet attached

LucMeekes
23-Emerald III
(To:Werner_E)

You're right.

Of course I checked and double-checked after I first saw the difference, but I overlooked the fact that I had set L=8 in instead of L=8 m.

Now, with L=8 m,  the results come out as 3.195358 m/s, 0.014935 and 619558.023724.

 

Luc

Top Tags