Anda di halaman 1dari 5

DUCT CALCULATOR PROGRAM INTRODUCTION The DUCT CALC program (hereafter called DUCT) is a program for IBM-PC's and

compatibles that calculates the required size of ducts given the maximum velocity and pressure drop allowed. It performs mathematical operations using reverse polish notation (RPN) similar to a Hewlett-Packard calculator. This program was written in BASIC by Randall C. Wilkinson and compiled into an .EXE file using Microsoft QuickBASIC. If you have a Microsoft mouse it will be automatically recognized and used. You can use the mouse to perform all DUCT functions. If the mouse is available, a number pad will appear to allow you to point to digits on the screen when entering numbers. Many default operating parameters for DUCT can be changed to suit your needs (or desires). Some of the parameters that can be changed are: max. duct velocity, max. duct pressure drop, default rectangular duct height, screen colors, menu locations on screen and numeric accuracy displayed. RPN OPERATION As mentioned above, the program operates like an HP calculator. When you enter a number, it is assumed to be an air quantity flowing in CFM. It is put into the bottom of the stack and the size of a duct is calculated according to the current sizing parameters. When you enter another number, the first number is pushed up to the second position the stack. The second CFM is sized and now occupies the bottom position in the stack. If the two ducts combine together to form a single duct, you can add the two air quantities together by pressing the '+' key. The air quantities are added together and now the new total CFM occupies the bottom spot in the stack. The new duct size is calculated and displayed. The program can perform addition, subtraction, multiplication and division. As you can see, this is a powerful tool for quickly sizing entire ductwork systems. Simply enter the air flowing from each branch in a system, the program sizes the branch duct, then that air can be added to the running total in the trunk duct, and the trunk duct will be automatically re-sized. The RPN stack can contain up to 13 items and can be saved to, or recalled from a disk file. DUCT SIZING When calculating the required size of a duct, the program will iterate until it finds the smallest standard diameter duct that does not exceed the maximum velocity or maximum pressure drop allowed. Once the diameter is calculated, the program then calculates the rectangular duct width so that the rectangular duct has the same pressure losses. The method for calculating the pressure drop in a duct was taken from the Carrier System Design Manual, Part 2, page 31. The formula for converting rectangular to round duct was taken from the same manual, page 34. Duct roughness factors used by DUCT are for new, clean, galvanized steel. Pressure drops displayed are per 100' of duct.

When started, the program assumes you are sizing low pressure/velocity ductwork. The pressure drop limit is initially set to 0.10 inches H2O/100', and velocity limit is set to 1200 FPM. STARTING DUCT Starting the program can be done by typing DUCT. After an initial title screen, a blank screen will be displayed. The block near the center of the screen is the mouse pointer. At the top of the screen is a list of all valid operators or commands and the keys that invoke them. At the right is a number pad that lets you point with the mouse to enter numbers. At the bottom of the screen is the DUCT CFM or OPERATOR prompt. This is where new numbers are entered before going into the stack. The open area in the center is where the stack will be. EXAMPLES Enter 500 then press ENTER. A duct is sized for 500 CFM. Enter 5000 then press ENTER. Another duct is sized, this time for 5000 CFM. Enter 50000 then press ENTER. Press [UP ARROW] to increase rectangular duct height, until the HT field says 60. Notice that the duct width decreases as height increases. The screen now displays three sized ducts. A 110x60 duct carrying 50,000 CFM is limited by velocity. This is confirmed by looking at the VEL field, it is near its limit of 1200 FPM. But the PDROP field says 0.016 in./100', this is well below the limit of 0.1. A more realistic maximum velocity for such a large duct might be 2500 FPM. Press 'D' for Duct data, The stack momentarily disappears, and the program prompts for a new velocity limit. Enter 2500 then press ENTER. Then it prompts for a new pressure drop limit, press ENTER to keep the same 0.1. The program now prompts for a new default duct height, press enter to keep the previous entry. The stack should re-appear. Changing the pressure drop and velocity limits will not effect ducts that have already been sized, pressing 'S' will force the duct at the bottom of the stack to be re-sized. The new diameter, velocity, and duct width will be displayed. OPERATORS An operator is an action that is performed by the program. Some operators act on numbers in the stack, some perform program control functions. All operators are invoked by pressing the keystroke corresponding to that operator as indicated at the top of the screen. The following is a description of each operator, and how it is used: ADD (`+' key) Adds the CFM in position 1 of the stack to the CFM in position 2, then erases both CFMs from the stack, and inserts the sum into position 1, pushing the remaining items up in the stack. The new CFM is sized as a duct. SUBT (`-' key)

Subtracts the CFM in position 1 of the stack from the CFM in position 2, then erases both CFMs from the stack, and inserts the difference into position 1, pushing the remaining items up in the stack. The new CFM is sized as a duct. MULT (`*' key) Multiplies the number in the CFM field in position 1 of the stack by the CFM in position 2, then erases both items from the stack, and inserts the new CFM into position 1, pushing the remaining items up in the stack. The new CFM is sized as a duct. DIVIDE (`/' key) Divides the CFM in position 2 of the stack by the number in the CFM field in CFM in position 1, then erases both items from the stack, and inserts the new CFM into position 1, pushing the remaining items up in the stack. The new CFM is sized as a duct. DROP (`X' key) Drops (discards) the item in position 1 of the stack (the bottom), and shifts the remaining items down 1 position. SWAP (`W' key) Exchanges the items in positions 1 and 2 with each other. DUP (`U' key) Moves all items in the stack up 1 position and duplicates the item now in position 2 to position 1. SIZE (`S' key) Forces the program to re-size the duct in position 1 of the stack. The redisplays the new size MODES (`M' key) Not yet implemented. Eventually will allow summing pressures rather than airflows, with the intention of being able to calculate total system pressure drop. Currently does nothing. DUCT DATA (`D' key) Prompts for velocity and pressure drop limits as well as default rectangular duct height to be used for subsequent duct sizing. MORE HT (`up arrow' key)

Increases the rectangular duct height for the duct in position 1 of the stack. The duct width is re-calculated and adjusted on screen to be equivalent to the duct diameter already calculated. LESS HT (`dn arrow' key) Decreases the rectangular duct height for the duct in position 1 of the stack. The duct width is re-calculated and adjusted on screen to be equivalent to the duct diameter already calculated. LOAD (`L' key) Reads items into the stack from a file called RPN.STK as saved by the SAVE operator. SAVE (`A' key) Writes all data in the stack to a file called RPN.STK in the current subdirectory. The file is stored as ASCII characters in a comma delimited format, with each line in the file corresponding to a stack position. The numbers are stored with full numeric accuracy, regardless of the display accuracy. This file could easily be read by LOTUS, dBASE, etc. CLEAR (`C' key) Destroys forever, all information in all positions of the stack. QUIT (`Q' key) Quits the program and returns to DOS. CUSTOMIZING When the DUCT program is started it looks in the current subdirectory for a file called DEFAULT.RPN. If that file exists, the program will read CUSTOMIZING parameters from it and use those parameters for the current DUCT session. A DEFAULT.RPN file can be loaded from another subdirectory by specifying the full path and file name as a command line parameter to the DUCT command from the DOS prompt. For example: C:\DOS>DUCT C:\MYDIR\MYSETUP.RPN

An example DEFAULT.RPN file looks like this: FORMAT HEADER : cfmdiavelpdrophtwdthlenfrict CFM FORMAT :########_ DIAM FORMAT :###_

VELOCITY FORMAT PDROP FORMAT HEIGHT FORMAT WIDTH FORMAT LENGTH FORMAT FRICTION FORMAT STACK LINE PROMPT LINE OPERATORS LINE DEFAULT PDROP DEFAULT VELOCITY DEFAULT HEIGHT DEFAULT FRICTION DEFAULT ROUNDING PAD LINE MAX LINES STACK FG STACK BG OPERATORS FG OPERATORS BG PAD FG PAD BG PROMPT FG PROMPT BG

:#####_ :##.###_ :###_ :####_ :#####_ : #.##_ :23 :25 :5 :.1 :1200 :18 :.9 :2 :20 :23 :1 :3 :3 :1 :1 :2 :15 :0

The program will read each line and look for the key words listed above. It will then skip up to and including the colon. All characters after the colon are significant. The FORMAT HEADER item is printed as a string at the top of the stack. The FORMAT items specify the way numbers will look on screen, refer to the BASIC manual, under the PRINT USING statement, for the meaning of the symbols used. The LINE items specify which screen line on the particular item will be located. Mouse sensitivity will move with the location of the item. The number used will be the screen location of the lowest line of multi-line items. The DEFAULT items specify the numbers assumed when calculating duct sizes. The FG and BG items specify the foreground and background colors as used by BASIC's COLOR command. The program will use built-in defaults for any items that do not appear in your custom DEFAULT.RPN file. Thus, you may leave out any items that do not concern you.

Anda mungkin juga menyukai