Author Topic: you say you're pretty good at numbers....hehehehe  (Read 6820 times)

0 Members and 1 Guest are viewing this topic.

Water Bear

• Guest
you say you're pretty good at numbers....hehehehe
« on: February 06, 2004, 08:47:20 PM »
I came across this formula for calculating the circular equivalent of  a rectangular duct and I managed to string it out so it works...here it is:

Code: [Select]
(* 1.3 (exp(/(log (/ (expt (* A B) 5) (expt (+ A B) 2)))8)))

where A and B are reals; solves for D (diameter)

I wonder if someone could rearrange this equation ,so that if I knew :
B and D I could find A or if I knew A and D I could find B

Go ahead, give it shot...I've only been on it ALL day!

mohobrien

• Guest
you say you're pretty good at numbers....hehehehe
« Reply #1 on: February 06, 2004, 09:13:48 PM »
This looks like a challenge!
Is this really what expt is?
Function EXP, EXPT

Syntax:

exp number => result

expt base-number power-number => result

Arguments and Values:

number---a number.

base-number---a number.

power-number---a number.

result---a number.

Description:

exp and expt perform exponentiation.

exp returns e raised to the power number, where e is the base of the natural logarithms. exp has no branch cut.

expt returns base-number raised to the power power-number. If the base-number is a rational and power-number is an integer, the calculation is exact and the result will be of type rational; otherwise a floating-point approximation might result. For expt of a complex rational to an integer power, the calculation must be exact and the result is of type (or rational (complex rational)).

The result of expt can be a complex, even when neither argument is a complex, if base-number is negative and power-number is not an integer. The result is always the principal complex value. For example, (expt -8 1/3) is not permitted to return -2, even though -2 is one of the cube roots of -8. The principal cube root is a complex approximately equal to #C(1.0 1.73205), not -2.

expt is defined as b^x = e^x log b. This defines the principal values precisely. The range of expt is the entire complex plane. Regarded as a function of x, with b fixed, there is no branch cut. Regarded as a function of b, with x fixed, there is in general a branch cut along the negative real axis, continuous with quadrant II. The domain excludes the origin. By definition, 0^0=1. If b=0 and the real part of x is strictly positive, then b^x=0. For all other values of x, 0^x is an error.

When power-number is an integer 0, then the result is always the value one in the type of base-number, even if the base-number is zero (of any type). That is:

(expt x 0) ==  (coerce 1 (type-of x))

If power-number is a zero of any other type, then the result is also the value one, in the type of the arguments after the application of the contagion rules in Section 12.1.1.2 (Contagion in Numeric Operations), with one exception: the consequences are undefined if base-number is zero when power-number is zero and not of type integer.

Water Bear

• Guest
you say you're pretty good at numbers....hehehehe
« Reply #2 on: February 06, 2004, 09:21:22 PM »
that's it...  Now I've thrown down the gaunlet!

mohobrien

• Guest
you say you're pretty good at numbers....hehehehe
« Reply #3 on: February 06, 2004, 09:25:30 PM »
take a look at the brackets. one too many.

9 "(" and only 8 ")"

CAB

• Global Moderator
• Seagull
• Posts: 10388
you say you're pretty good at numbers....hehehehe
« Reply #4 on: February 06, 2004, 09:35:02 PM »
Code: [Select]
(setq b (/ (* pi (expt (/ d 2) 2)) a))
I've reached the age where the happy hour is a nap. (°¿°)
Windows 10 core i7 4790k 4Ghz 32GB GTX 970
Please support this web site.

Water Bear

• Guest
you say you're pretty good at numbers....hehehehe
« Reply #5 on: February 06, 2004, 09:35:40 PM »
syntax  is correct ..substitute 12.0 for all A's and B's then run it in editor should come up with 13.118

Water Bear

• Guest
you say you're pretty good at numbers....hehehehe
« Reply #6 on: February 06, 2004, 09:42:19 PM »
Good try CAB! but if you use 12.0 for both A and B, the circular equivalent is 13.118...therefore if you use these as input  13.118 as D and 12.0 as A ,you should logically derive 12.0 as B. Yours comes up with 11.2627

CAB

• Global Moderator
• Seagull
• Posts: 10388
you say you're pretty good at numbers....hehehehe
« Reply #7 on: February 06, 2004, 09:56:59 PM »
i did not get 13.118  as dia, i got 13.5406

Code: [Select]
(defun c:test()
(setq a     12.0
b     12.0
area (* a b)
)
(setq dia (* (sqrt(/ area pi)) 2))

(setq b (/ (* pi (expt (/ dia 2) 2)) a))
(princ)
)
(princ)
I've reached the age where the happy hour is a nap. (°¿°)
Windows 10 core i7 4790k 4Ghz 32GB GTX 970
Please support this web site.

CAB

• Global Moderator
• Seagull
• Posts: 10388
you say you're pretty good at numbers....hehehehe
« Reply #8 on: February 06, 2004, 09:59:34 PM »
mohobrien,

your way over my head

CAB
I've reached the age where the happy hour is a nap. (°¿°)
Windows 10 core i7 4790k 4Ghz 32GB GTX 970
Please support this web site.

Water Bear

• Guest
you say you're pretty good at numbers....hehehehe
« Reply #9 on: February 06, 2004, 10:08:46 PM »
AH! therein lies the rub! ASHRAE (american Society of heating, refrigerating and ac engineers) say that the equivalent area in sq inches is NOT the same once you changed the shape of the duct because of friction losses. That is why they use the equation I posted.

CAB

• Global Moderator
• Seagull
• Posts: 10388
you say you're pretty good at numbers....hehehehe
« Reply #10 on: February 06, 2004, 11:31:36 PM »
Oh, I see,  not equivalent area but equivalent flow characteristics.

I did find the formula but the math is too much for me. Perhaps
someone can convert it.

I've reached the age where the happy hour is a nap. (°¿°)
Windows 10 core i7 4790k 4Ghz 32GB GTX 970
Please support this web site.

mohobrien

• Guest
you say you're pretty good at numbers....hehehehe
« Reply #11 on: February 06, 2004, 11:47:51 PM »
My last math class was 1969. I don't think I could have figured this one then either.
But I see why my back bedroom was so cold when the temp went to -48C last week. I used corrugated tin foil for ducting and I hear that five feet of that is like trying to push heat down 250 feet of straight pipe.
Back to topic:
I'm out of my league. All I can say is you'd have to use differential equations to figure it the other way. I'm lost.
Code: [Select]
(* 1.3
(exp (/ (log (/ (* 248832.0(* B B B B B) )
(+ 144 (* 24 B) (* B B))
)
)
8
)
)
)

Water Bear

• Guest
you say you're pretty good at numbers....hehehehe
« Reply #12 on: February 07, 2004, 12:08:35 AM »
That 's the one CAB! Don't feel bad guys..I've been on this one LONG time and haven't figured it out yet! Small minds=lower tax brackets...I'm in the lowest.
Maybe the heavy hitters like Stig or Keith, Daron or Se7en can have a go at it....

Keith™

• Villiage Idiot
• Seagull
• Posts: 16797
• Superior Stupidity at its best
you say you're pretty good at numbers....hehehehe
« Reply #13 on: February 07, 2004, 02:02:33 AM »
Ok, I have looked at this and to be quite honest with you, my algebra is a little rusty.

What I have managed to decipher basically gets you down to the point where the quadratic formula "should" come into play, but after looking at it for a bit, I am confused about how to exactly get the answer to an equation that requires the variable from another equation.

For example....

X = AB^5
Y = (A+B)^2
Z = X/Y

Z is known
A is known
B is unknown
So, the problem is you must calculate X or Y before you can calculate Z

Now if anyone can solve this bit of the equasion for X and/or Y I can finish the modifications.
Proud provider of opinion and arrogance since November 22, 2003 at 09:35:31 am
CadJockey Militia Field Marshal

Water Bear

• Guest
you say you're pretty good at numbers....hehehehe
« Reply #14 on: February 07, 2004, 09:05:53 AM »
Exactly Keith...that was about as far as I got, could not figure out how to isolate A or B

Perhaps someone has an alternate way.. the problem is that this is the equation to calc a round  IF you know the square size..problem  is  I'm starting with a round and need to go to square (or rectang)