Community Tip - Stay updated on what is happening on the PTC Community by subscribing to PTC Community Announcements. X
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
Solved! Go to Solution.
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
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
The specific gravity is dimensionless.
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.
@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 (g_{0} = 32.17405 ft/s^{2}), and pressure is g_{0} kg/m^{2}.
Stuart
(I can't read the worksheet as I've only got Prime Express 7)
"(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
@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
Something is missing in the red term.
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:
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.