Skip to main content
9-Granite
July 26, 2022
Solved

units are not compatible

  • July 26, 2022
  • 3 replies
  • 2275 views

I am getting error units are not compatible for the said equations and not unable to figure out the way to solve it. Any help is appreciated 

Best answer by Werner_E

On contrary to Prime, MC15 uses static unit checking (SUC) and thats the reason it works OK in MC15.

But in Prime you have to assign a correct unit even if the value is zero:

Werner_E_0-1658863883229.png

 

3 replies

16-Pearl
July 26, 2022

Look at each of the two expressions you're trying to add, they are different units - energy and length don't mix. The simple fix is to look at the break-down of what you're adding and adjust one of your inputs (or maybe more?) so you end-up with the same types.

 

Cheers

9-Granite
July 26, 2022

The same equations work in Mathcad 15 

16-Pearl
July 26, 2022

Hmmm - could please you share the v15 file? That would be interesting to see & compare if it works.

Werner_E25-Diamond IAnswer
25-Diamond I
July 26, 2022

On contrary to Prime, MC15 uses static unit checking (SUC) and thats the reason it works OK in MC15.

But in Prime you have to assign a correct unit even if the value is zero:

Werner_E_0-1658863883229.png

 

15-Moonstone
July 26, 2022

Hello.

 

The error message you get is the right one. It is because you have the terms with the different units. You can't add up meters with Jouls.

See the attached, modified mathcad file.

 

Probably, mathcad 15 sees away from the units and adds up the numerical values only.

Anyway, you need to look up at your equation and figure out the missing/or excessing units. I do not know what you are calculating in this file, but assume that the constant "Cs" must have the same units as "Cc"