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

Community Tip - Did you get an answer that solved your problem? Please mark it as an Accepted Solution so others with the same problem can find the answer easily. X

The units are not compatible

JR_9175191
10-Marble

The units are not compatible

Having issues with the solve block, "units are not compatible"

 

I know the part that is bad is the part in the screenshot as that part was added specifically for this scenario.

 

JR_9175191_0-1705456788403.png

Would also like to simplify it as its the same equation with different Q value determined by the Q[ value.

 

Please advise,

 

Thank you!!

ACCEPTED SOLUTION

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

Your variable (array) Q has a unit:

LucMeekes_0-1705495185277.png

This means that you cannot add e.g.

LucMeekes_1-1705495215356.png

because you cannot add apples to pears.

Either there's something wrong in your formula (Maybe 11.7 needs the unit gpm as well, while 2.29 is unitless, or 11.7 has the unit 1/gpm while 2.29 has 1/gpm^2), or this formula is empirical (it works for the technology, but is not derived from physics basics, in which case case you could divide the units out.)

 

To simplify the expression, you can define a function (outside of the solve-block), e.g.:

LucMeekes_3-1705495971397.png

and the replace the three terms with:

LucMeekes_4-1705496005384.png

But, first you have to decide about units.

 

Success!
Luc

View solution in original post

2 REPLIES 2
LucMeekes
23-Emerald III
(To:JR_9175191)

Your variable (array) Q has a unit:

LucMeekes_0-1705495185277.png

This means that you cannot add e.g.

LucMeekes_1-1705495215356.png

because you cannot add apples to pears.

Either there's something wrong in your formula (Maybe 11.7 needs the unit gpm as well, while 2.29 is unitless, or 11.7 has the unit 1/gpm while 2.29 has 1/gpm^2), or this formula is empirical (it works for the technology, but is not derived from physics basics, in which case case you could divide the units out.)

 

To simplify the expression, you can define a function (outside of the solve-block), e.g.:

LucMeekes_3-1705495971397.png

and the replace the three terms with:

LucMeekes_4-1705496005384.png

But, first you have to decide about units.

 

Success!
Luc

Werner_E
25-Diamond I
(To:JR_9175191)

Luc already told you the main problem (actually already Prime did 🙂 ).

Some additional remarks:

 

1) You have just one single equation, but you want seven variables (6 in Q and Ws) to be solved for? That possibly can't work OK. There may be an infinite number of solutions, starting with six values remaining the same as the guess value and just one value changing up to an infinite number of solutions where all seven values differ at end from the guesses. You sure need additional constraints for the seven variables!
BTW, as in your example N=2, variable Q3 and Q6 are not used in the formula at all, nonetheless you demand Prime to solve for them as well!

 

2) The offending part with the wrong units which you added should not be part of the expression which is added in the sum as it has nothing to do with the sum variable "i". Its just a constant summand which is added to every summand in the calculated sum. So there is no need to calculate that expression N times from anew, simply multiply it by N and add it at the end after the summation.

 

Here is a working version but in no way I would claim that its correct and does what you intend it to do. I followed Luc's suggestion with the function Kq in which I stripped the unit from Q and added the unit feet at the end because to fit the rest of the formula a length is needed here. So its just a hack to make it work with respect to the units but has not meaning with respects to physics. Its very likely that you have to correct the unit mismatch in your formula in a quite different way!

You can see the Prime chooses to change just three of your guess values (see my remark #1 for this). Its noticeable that its exactly the three variable Q2, Q4 and Q5 used in the offending expression you introduced.

Werner_E_0-1705506446481.png

 

 

Announcements

Top Tags