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

## Unit Assistance  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  23-Emerald II
(To:CS_10054396)

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

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

10 REPLIES 10  23-Emerald II
(To:CS_10054396)

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

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  21-Topaz II
(To:LucMeekes)

The specific gravity is dimensionless.  23-Emerald II
(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.  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)  23-Emerald II
(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):

Success!
Luc  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):

Thanks, Luc.

Stuart  21-Topaz II
(To:CS_10054396)

Something is missing in the red term.   24-Ruby V
(To:CS_10054396)

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 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:   3-Visitor
(To:Werner_E)

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! 😀  24-Ruby V
(To:CS_10054396)

@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. 