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

0 Members and 1 Guest are viewing this topic.

#### Ron Heigh

• Guest ##### you say you're pretty good at numbers....hehehehe
« Reply #15 on: February 07, 2004, 09:47:40 AM »
On a different note:
If you use a math software like MathCAD, you can input the formula and define the variables.
It will then allow you assign values to some and tell you what the remaining variable needs to be to satisfy the equation.
If you can derive the Lisp equivalent, look here. ##### you say you're pretty good at numbers....hehehehe
« Reply #16 on: February 07, 2004, 12:53:01 PM »
When all else fails use a Sledge Hammer. CAB

Code: [Select]
`(defun Rnd_to_Sqr(Dia ; dia of round duct                  A   ;; side A of square duct                  / loop fuzz B)  ;;  Returns Side B of square duct  (setq B A  ; B is target        fuzz 0.001        loop T)  (while loop    (setq Dia2 (* 1.3                  (exp                    (/                      (log                        (/                          (expt (* A B) 5) (expt (+ A B) 2)                        )                       )                     8)                   )                  )          )      (if(equal Dia2 Dia fuzz)       (setq loop nil); done       (setq B (* B (/ Dia Dia2)))      )  )  (princ)  B )(princ)(defun c:test()  (setq SideA 12.0        dia 13.118        SideB (Rnd_to_Sqr dia SideA)  )  (princ))`
I've reached the age where the happy hour is a nap. (°¿°)
Windows 10 core i7 4790k 4Ghz 32GB GTX 970

#### Water Bear

• Guest ##### Bravo!!
« Reply #17 on: February 07, 2004, 02:27:16 PM »
CAB ..I wouldn't believe it if I hadn't seen it with my own eyes! Idon't quite understand HOW u made it work..but it works! Bravo! and thank you

#### DParcon

• Guest ##### you say you're pretty good at numbers....hehehehe
« Reply #18 on: February 07, 2004, 06:17:11 PM »
Water Bear,

To get A, B & D known: A = (0.836812758 x D X D) / B

To get B, A & D known: B = (0.836812758 x D X D) / A

Above formulas were derived from round to square formula:

Round to Square (A=B): A = 0.914774703 x D

You can also use an iteration loop in lisp based on the
original formula (as posted by CAB).

Have fun.

Don

#### Water Bear

• Guest ##### you say you're pretty good at numbers....hehehehe
« Reply #19 on: February 07, 2004, 08:44:45 PM »
Thanx Don ..those sure make it easy

I compared various examples using a Trane ductulator with CAB's hammer, and he is VERY accurate...

thanx again, and welcome to the club.  ##### you say you're pretty good at numbers....hehehehe
« Reply #20 on: February 07, 2004, 09:11:37 PM »
Revised the routine to make sure A is a real, else it won't work.

Don you formula only works if sides are 12x12?

Code: [Select]
`(defun Rnd_to_Sqr(Dia ; dia of round duct                  A   ;; side A of square duct                  / loop fuzz B)  (if (= (type a) 'INT);; make sure A is a REAL    (setq A (* A 1.0))  )  (setq B A  ; B is target        fuzz 0.001        loop T)  ;;  Returns Side B of square duct  (while loop    (setq Dia2 (* 1.3                  (exp                    (/                      (log                        (/                          (expt (* A B) 5) (expt (+ A B) 2)                        )                       )                     8)                   )                  )          )      (if(equal Dia2 Dia fuzz)       (setq loop nil); done       (setq B (* B (/ Dia Dia2)))      )  )  (princ)  B )(princ)`
I've reached the age where the happy hour is a nap. (°¿°)
Windows 10 core i7 4790k 4Ghz 32GB GTX 970

#### Water Bear

• Guest ##### you say you're pretty good at numbers....hehehehe
« Reply #21 on: February 08, 2004, 12:06:35 AM »
I've tried Don's but I get inconsistent results. Case in point:

25 inch round to something by 12

(0.836812758 x 25 X 25) / 12 = 43.58399

Trane ductulator indictates it should be 49

If I use CAB's hammer I get  48.8559 close enough for me!
That's almost a 260 sq in difference.

#### Water Bear

• Guest ##### you say you're pretty good at numbers....hehehehe
« Reply #22 on: February 08, 2004, 11:38:08 AM »
However,in all fairness to Don, using his original equation I get:

0.914774703 x 25.0 = 22.869367575

compared using ASHRAE formula:

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

And plugging into CABs'hammer:

(Rnd_to_Sqr 25.0 22.869367575) you get 22.8694 Q.E.D.

#### DParcon

• Guest ##### you say you're pretty good at numbers....hehehehe
« Reply #23 on: February 08, 2004, 12:47:38 PM »
WaterBear,

In the formulas I've posted, the round to square is the
accurate one since it was derived from the ASHRAE formula.
Since you're the one in need of a shorcut, you can verify
the accuracy of the formula for all cases. I repeat, I can
vouch for the accuracy on round to square cases only. The
formulas for the rectangular duct was derived using an equal
area method using the area of the square duct equivalent of
the round duct. I've not tested the conversion formulas and
the accuracy might be questionable. Sorry for the confusion,
as I was hoping that you'll be able to see through the formulas.

#### Water Bear

• Guest ##### you say you're pretty good at numbers....hehehehe
« Reply #24 on: February 08, 2004, 01:28:38 PM »
Don't get me wrong I fully appreciate your taking time out to assist in this puzzle...
Everyone has a different angle of attack for a given problem, which is why I come here.
Just for the record, I ended up using a combination of BOTH methods!

Thanx again.... #### daron

• Guest ##### you say you're pretty good at numbers....hehehehe
« Reply #25 on: February 09, 2004, 09:52:59 AM »
I am not that good at math. Stig, is my algebra go to.

#### DEVITG ##### round to rectangle duct
« Reply #26 on: February 09, 2004, 05:58:52 PM »

I had post on the lily pond at this link , it is a xls file that allow to calc the b side given the diameter and the a side.
It explain it self and give the credit to ACRODUSTER1 , a fellowmember of EFUNDA .
http://theswamp.org/lilly.pond/devitg/red2rect.xls
efunda could be found at
http://www.efunda.com/forum/forum.cfm
Location @ Córdoba Argentina Using ACAD 2019  at Window 7

• Guest ##### you say you're pretty good at numbers....hehehehe
« Reply #27 on: April 14, 2004, 03:14:27 PM »
Quote from: Daron
I am not that good at math. Stig, is my algebra go to.

But, I could only get as far as D^4/1.3^4 = (A^2.5 * B^2.5)/(A + B) ... soooo, I went to a math guy and he cracked it! Only took him a few month `(defun testit (s1 s2)  (* 1.3 (/ (expt (* s1 s2) 0.625)(expt (+ s1 s2) 0.25))))(defun C:EQDUCT (/ a b d di x1 x2 y)  (setq di (getreal "\nEnter diameter of round duct: ")        b (getreal "\nEnter side in rectangular duct: ")  )  (setq d (/ (expt di 4.0) (expt 1.3 4.0)) ;;2.8561)        y  (sqrt b)        x1 (* (expt (/ (* 2 d) (* 5 (expt y 5.0))) (/ 1.0 3.0)) 2.0)        x2 (- x1              (/ (- (* (expt y 5.0) (expt x1 5.0))                    (* d (expt x1 2.0))                    (* d (expt y 2.0))                 )                 (- (* 5.0 (expt y 5.0) (expt x1 4.0))                    (* 2.0 d x1)                 )              )           )  )  (setq a (expt x2 2.0))  (mapcar 'princ (list "\nMissing side = "                       (fix a)                       "\nTest: Input diameter: " di                       "\n      Calculated diam.: " (setq d (testit a b))                       )                    )  (princ))`