Equations with Units on the 48G  Hewlett Packard
This is a discussion on Equations with Units on the 48G  Hewlett Packard ; OK so I did RTFM, and the units management seems pretty good, but I am not
sure the best way to do something.
I want to create an expression that can be solved for any variable. It looks
like this:
...

Equations with Units on the 48G
OK so I did RTFM, and the units management seems pretty good, but I am not
sure the best way to do something.
I want to create an expression that can be solved for any variable. It looks
like this:
H = (1/2)*Rho*V^2/g and
V = Q/A so since I will have Q and A, not V, then I would use:
H = (1/2)*Rho*Q^2/A^2/g
Simple? Sure until we look at the units I have to work with.
H is a dynamic pressure head in Pa, in H2O or mm H2O
V is velocity in ft/min or meter/sec
Rho is air density, could be lbm/ft^3, slug/ft^3 or in SI units
Q is a volumetric flow rate in CFM or cubic meter per minute.
A is a cross sectional area in mm, in or ft squared.
g is the grav constant (9.81 m/s^2 or 32.174 ft/s^2 and available in the
constants lib)
What would be great is if I could create the equation, enter data in any of
the units (using unit objects), and have the 48G handle the units
conversions internally and correctly output a pressure in any unit.
So the question is how can I program this up to best take advantage of the
built in units capability of a 48G? I tried creating a CFM unit and working
thru the equation but it does not combine units to result in pressure.
TIA
 Dan

Re: Equations with Units on the 48G
On Mon, 16 Apr 2007 10:52:57 0500, Revolvr wrote:
> I want to create an expression that can be solved for any variable.
> It looks like this: H = (1/2)*Rho*V^2/g and V = Q/A
> so since I will have Q and A, not V, then I would use:
> H = (1/2)*Rho*Q^2/A^2/g
>
> Simple? Sure until we look at the units I have to work with.
>
> H is a dynamic pressure head in Pa, in H2O or mm H2O
> V is velocity in ft/min or meter/sec
> Rho is air density, could be lbm/ft^3, slug/ft^3 or in SI units
> Q is a volumetric flow rate in CFM or cubic meter per minute.
> A is a cross sectional area in mm, in or ft squared.
> g is the grav constant (9.81 m/s^2 or 32.174 ft/s^2
> and available in the constants lib)
> What would be great is if I could create the equation,
> enter data in any of the units (using unit objects),
> and have the 48G handle the units conversions internally
> and correctly output a pressure in any unit.
> So the question is how can I program this up to best
> take advantage of the built in units capability of a 48G?
> I tried creating a CFM unit and working thru the equation
> but it does not combine units to result in pressure.
The original numeric solver (30 MENU in all HP48/49/50)
accepts units on all variables; as a very handy feature,
whenever you supply a value and ask the solver menu
to store it, any pure number on the stack is stored
with the units already present in the variable,
so that once variables have been created with desired units,
you need not bother appending units to your own values.
The Multiple Equation Solver (MES) from the Equation Library
(48G,49G,50G) does this same thing, which is why
you never need to append units when you enter values,
because the units have already been attached
to preallocated variables for each equation
(flags set by the first EQNLIB menu choose whether
to use units, and if so, whether SI or English units).
User programs may store an equation (or set) via STEQ,
then create variables , e.g.
{ 0_unit1 0_unit2 ... } { var1 var2 ... } STO
and then do 30 MENU (or MINIT, MITM, MSOLVR for MES)
to allow the user to continue using the numeric solver menu
(the "Solve Equation" formbased application may alternatively
be invoked via #B4001h LIBEVAL in 48G/49G/50G).
[r>] [OFF]