Skip to main content
1-Visitor
September 23, 2021
Solved

Unit Assistance

  • September 23, 2021
  • 4 replies
  • 3766 views

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

Best answer by LucMeekes

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

4 replies

LucMeekes23-Emerald IVAnswer
23-Emerald IV
September 23, 2021

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

21-Topaz II
October 2, 2021

The specific gravity is dimensionless.

23-Emerald IV
September 23, 2021

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 V
October 2, 2021

@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 IV
October 4, 2021

"(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

 

21-Topaz II
October 2, 2021

Something is missing in the red term.

answer to CS_10054696.jpg

25-Diamond I
October 2, 2021

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

 

 

1-Visitor
October 4, 2021

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! ðŸ˜€

25-Diamond I
October 4, 2021

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