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

Community Tip - When posting, your subject should be specific and summarize your question. Here are some additional tips on asking a great question. X

This value must be a vector

JR_9175191
6-Contributor

This value must be a vector

In the solve block there is an issue with my vectorized values where even if they are vectorized the solve block will still ask them to be in vector form.

Also, for some odd reason I believe my if statement asks for a scalar result even though I am following my professors' steps in which his if statement works.

Attached you will find the worksheet in question.

 

Thank you.

1 ACCEPTED SOLUTION

Accepted Solutions


@terryhendicott wrote:

Hi,

Seems Werner has beat me to it.


🙂

 

The extra pair of parentheses you added are not necessary in Prime,  but I, too, would recommend using them for better clarity.

 

You (resp. @JR_9175191 )  forgot to assign the result to the variable Q so the calculation below the solve block use the guess value which you duplicated in front of the sheet

 

I would also recommend to use explicit vectorization every time we want vectorization to be done and not rely on Primes implicit vectorization.

Werner_E_0-1701652481167.png

 

@JR_9175191 

I have not checked you sheet against it, but you may want to use the input values in this document and see if the results match to ensure that your sheet does not have any hidden typos

https://citeseerx.ist.psu.edu/document?repid=rep1&type=pdf&doi=92fa1ba8def9d4d6f7c233505271b180e763c8e1

 

 

 

 

View solution in original post

13 REPLIES 13

Hi,

Do you intend to get three answers for Q to match each length of pipes or one answer for Q after it has passed through three pipes in a line?

Cheers 

Terry

Hi Terry,

 

Three answers, one for each pipe.

 

Thank you for your quick reply.

 

Jan

Hi,

Can you supply the equations for flow given by your instructor?

Cheers

Terry

JR_9175191_2-1701648349917.pngJR_9175191_3-1701648358608.png

JR_9175191_0-1701650694756.png

 

JR_9175191_4-1701648371400.png

 

 

Thank you give me some time to examine.

I added a section of the example that was missing.

ppal
17-Peridot
(To:JR_9175191)

Maybe like this

Not sure if a negative value is what you expect but you had a least two errors:

1) Your function f() was defined wrongly as at the end you simply typed "Re" instead of the full function call

2) epsilon is defined as a scalar, its not a 3x1 vector, so you should not use it as if it were a vector

Werner_E_0-1701649373697.png

Maybe the way I fixed your function f() is not the way it finally should be ...
Maybe W.s is not supposed to be zero?

 

Hi,

Seems Werner has beat me to it.

Changes I made are:

Capture.JPG

Capture2.JPG

Capture3.JPG

Capture4.jpg

 

 


@terryhendicott wrote:

Hi,

Seems Werner has beat me to it.


🙂

 

The extra pair of parentheses you added are not necessary in Prime,  but I, too, would recommend using them for better clarity.

 

You (resp. @JR_9175191 )  forgot to assign the result to the variable Q so the calculation below the solve block use the guess value which you duplicated in front of the sheet

 

I would also recommend to use explicit vectorization every time we want vectorization to be done and not rely on Primes implicit vectorization.

Werner_E_0-1701652481167.png

 

@JR_9175191 

I have not checked you sheet against it, but you may want to use the input values in this document and see if the results match to ensure that your sheet does not have any hidden typos

https://citeseerx.ist.psu.edu/document?repid=rep1&type=pdf&doi=92fa1ba8def9d4d6f7c233505271b180e763c8e1

 

 

 

 

JR_9175191
6-Contributor
(To:Werner_E)

My viscosity was wrong, thats why it was giving such a weird value.

JR_9175191
6-Contributor
(To:Werner_E)

Still have to figure out where to base my initial assumption at, but there is no pump in the system so W.s would be zero.


@JR_9175191 wrote:

Still have to figure out where to base my initial assumption at, but there is no pump in the system so W.s would be zero.


Yes, I was just plying around and noticed that we get a positive value for Q if W.s is set to a larger positive value.

It was just later that I noticed in the pdf document I linked to that they also model a pump/turbine-less system and get a positive value.
Thats why I suggested to give your sheet a try with the values in that document to see if it arrives at the same results.

Top Tags