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

Community Tip - Stay updated on what is happening on the PTC Community by subscribing to PTC Community Announcements. X

Unit Assistance

CS_10054396
3-Visitor

Unit Assistance

Hello,

 

I'm quite new to MathCAD and I'm having problems with a unit somewhere in this BCGA pressure drop calculation. The error is "This value has units: Length^2 . Time^-2, but must have units: Pressure^2.

 

There is one input in the formula that is unitless (Specific Gravity), I wondered if this was causing the issue.

 

Any help would be appreciated! Thanks

1 ACCEPTED SOLUTION

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

I should guess that specific gravity needs units: weight per volume.

Essentially mathcad is telling you that your units aren't balanced.

You have P.drop, and P.inlet values that are pressures (Pa, n/m^2 or the like, bar in your case).

Now the large quotient under the root must have units of pressure squared (in order to be allowed to subtract it from P.inlet_N2 squared).

Copy that quotient outside of the root and evaluate it to see what unit Mathcad gives the result. Then you'll easily find what needs corrected.

 

There's also a magic number (32) in the expression. Does (should?) it have units?

 

Overlooking all, I see you (at least appear to) reference standards. Standards are a great source of formulae that lack physical basis: empirical formulae. Such formulae have a habit of requiring values with specific (implied) units, that will often not balance. If that is the case here, you should divide the implied units out in the expression, and add them later to the result.

 

Success!
Luc

View solution in original post

10 REPLIES 10
LucMeekes
23-Emerald III
(To:CS_10054396)

I should guess that specific gravity needs units: weight per volume.

Essentially mathcad is telling you that your units aren't balanced.

You have P.drop, and P.inlet values that are pressures (Pa, n/m^2 or the like, bar in your case).

Now the large quotient under the root must have units of pressure squared (in order to be allowed to subtract it from P.inlet_N2 squared).

Copy that quotient outside of the root and evaluate it to see what unit Mathcad gives the result. Then you'll easily find what needs corrected.

 

There's also a magic number (32) in the expression. Does (should?) it have units?

 

Overlooking all, I see you (at least appear to) reference standards. Standards are a great source of formulae that lack physical basis: empirical formulae. Such formulae have a habit of requiring values with specific (implied) units, that will often not balance. If that is the case here, you should divide the implied units out in the expression, and add them later to the result.

 

Success!
Luc

-MFra-
21-Topaz II
(To:LucMeekes)

The specific gravity is dimensionless.

LucMeekes
23-Emerald III
(To:CS_10054396)

If you name Sg not specific gravity, but specific mass, then its unit becomes kg/m^3 and the quotient under the root gets a unit of pressure. All that remains is to square. That may be an error in your formula, or in the standard.

And I still wonder the 32 is coming from. It just could be that 32 needs to be 32 units of pressure...

 

Success!
Luc

 

P.S. I like the comment you put next to the definition of ft.ball_R1.

"dully"=in a way that is boring and not exciting.

StuartBruff
23-Emerald II
(To:LucMeekes)


@LucMeekes wrote:

And I still wonder the 32 is coming from. It just could be that 32 needs to be 32 units of pressure...


"32" sounds suspiciously close to Earth's gravitational acceleration expressed in Imperial units (g032.17405 ft/s2), and pressure is g0 kg/m2.

 

Stuart

(I can't read the worksheet as I've only got Prime Express 7)

LucMeekes
23-Emerald III
(To:StuartBruff)

"(I can't read the worksheet as I've only got Prime Express 7)"

 

@StuartBruff There's an easy fix for that (in most cases):

https://community.ptc.com/t5/PTC-Mathcad/Can-t-see-your-sheet-but/m-p/636482

 

Success!
Luc

 

StuartBruff
23-Emerald II
(To:LucMeekes)


@LucMeekes wrote:

"(I can't read the worksheet as I've only got Prime Express 7)"

 

@StuartBruff There's an easy fix for that (in most cases):

https://community.ptc.com/t5/PTC-Mathcad/Can-t-see-your-sheet-but/m-p/636482

 

 


 

Shame on me! I'd forgotten about your pièce de résistance! 

 

Thanks, Luc.

 

Stuart

-MFra-
21-Topaz II
(To:CS_10054396)

Something is missing in the red term.

answer to CS_10054696.jpg

As Luc already suspected, you are applying an empirical formula to estimate(!) the pressure drop, which is not unit-balanced.

I found a reference here: https://dokumen.tips/documents/bcga-cp4-industrial-gas-cylinders-and-gas-distribution.html

Werner_E_0-1633197873735.png

So you should do as Luc suggested. Make all variables used in the formula unitless by dividing them by the units given in the reference document. You may then add the expected unit of the outcome ("bar" in this case) at the end:

Werner_E_1-1633198115876.png

 

 

Thanks for this, it seems MathCAD has default units no matter how you define them within your calculation inputs. So what you did here worked for me also, thanks for your assistance and such a detailed response! 😀


@CS_10054396 wrote:

Thanks for this, it seems MathCAD has default units no matter how you define them within your calculation inputs.

Yes, Mathcad stores quantities using default units, no matter which unit the variable was defined with.

But even if Mathcad would remember the units used in the definitions, your approach could not work because the formula in use simply is not unit balanced and fortunately Mathcad checks calculations for unit consistency - one of the big advantages when using Mathcad for calculations.

Top Tags