Community Tip - Did you know you can set a signature that will be added to all your posts? Set it here! X
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.
Solved! Go to Solution.
@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.
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
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
Thank you give me some time to examine.
I added a section of the example that was missing.
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
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:
@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.
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
My viscosity was wrong, thats why it was giving such a weird value.
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.