ࡱ>  XZW]z wbjbj I=A%11QQQeee84Le?"??777A>C>C>C>C>C>C>$ACg>Q71:777g>11?V97A>V9V9V=@q >{Ue88= ->R?0?> jD88jD >jDQ > 77V977777g>g>V9777?7777jD777777777 : A VBASIC SPREADSHEET TO CALCULATE DUCT DIAMETER AND PRESSURE LOSS USING EQUAL FRICTION by Fred W. Dougherty, P.E. Introduction: This article presents an automated quick and simple equal friction solution to calculating duct diameter and pressure loss, using an iterative solution to the Colbrook equation. An initial duct diameter is calculated for duct segment airflows at a p/100 to be input by the designer. Typical values for supply and return ducts would be 0.09, 0.095, or 0.100 inches of water per 100 of duct. In the calculations that follow, this parameter is referred to as dp100. The complete solution requires running two VBasic macros in Excel. A copy of the excel workbook with the two macros can be downloaded by ASHRAE members from the ASHRAE web site. The solutions and macros presented here will primarily be of interest to the independent design engineer who is designing HVAC systems for small commercial projects under 20,000 square feet, generally using DX unitary equipment. Commercial duct design software would normally be used for larger, more complex projects. However, a review of the algorithms described in this article will provide an insight into how the commercial software works, so that it isnt simply a black box. The method outlined here can also be applied to the static regain design method, but that exercise is left up to the reader. The Designers Problem: After laying out the ductwork for an air conditioning project and computing the air flow to each terminal, the designer knows the air flow and length for each supply and return duct segment, and can select a duct height that is compatible with the geometric restraints in the area where the ducts will be routed. A segment can be defined as a run of duct from one branch to the next. A branch may be a major junction or a take-off for a terminal diffuser or return grille. His problem is therefore to select a diameter for the duct segment, find a width if the duct is to be rectangular, and then to estimate the duct friction and fitting dynamic losses for each segment of the critical duct routing path. The sum of losses of all of the supply and return segments will make up the external static pressure requirement for the air handling unit. If the filter is external to the unit, the filter and bracket may be included as a segment, or the filter pressure loss may simply be added if internal to a packaged air handler. For small projects, this procedure is often done manually using charts and fitting loss coefficients provided in the ASHRAE Handbook Fundamentals.1 Even if a duct design computer program is available, the input/output is often too cumbersome to be practical for small projects. On the other hand, a thorough analysis using manual methods will also consume resources in a tight design budget, and can lead to potentially serious errors or unnecessarily over sized ducts. A Simple Spreadsheet Solution: As noted before, the projects for which this spreadsheet would be useful are generally under 20,000 sf, and will have more than one zone. Design air flow will therefore typically be less than 15,000 cfm. Referring to reference 1, figure 9, the recommended range for dp100 is .08 to .6 inches of water (iw) per 100 of duct. Experience shows that selecting a target dp100 near the low end of this range - .09 to .1 iw/100 results in low energy use at a reasonable material cost. At air flows greater than 15,000 cfm, air velocity in the duct may become excessive and create noise problems. This program does not address this contingency, so at these higher air flows, the user is advised to manually calculate duct diameter based on an acceptable air velocity, rather than relying on the diameter calculated based on equal friction. The spreadsheet runs two macros. The first is newductsize which calculates duct diameter as a function of segment air flow and desired dp100, and duct width as a function of input duct height (If rectangular. If duct height is input as zero of left blank, duct width will be set to zero.) Duct segment length is also input into newductsize but is only used as input to the second macro. Figure 1 is a flow diagram showing the architecture of the macro, and the formulas used for the calculations. An example of the output of newductsize is shown as Table 1 below. (Shaded cells are calculated, clear cells are user input.) Table 1 INPUT/OUTPUT OF MACRO NEWDUCTSIZE Several things should be noted. All of the dp100 values are identical. This is the value selected by the designer for the calculation. Second, the values for dia and width are not whole numbers. This is a problem because in practice, duct dimensions are always presented in design documents as integer inches. This problem is corrected when the friction factor macro is run. Twelve segments are shown. The first six are supply duct segments, and the second six are return duct segments with cfm reduced by the pro-rated amount of outdoor air delivered in the supply. In the case shown, each room in the zone has a return corresponding to its supply, so the program automatically calculates the reduced return air flow, and assumes that the return duct height will be the same as the supply. This feature can be overridden if not applicable, allowing the user to input return segments with air flows and duct heights. Because this method is so simple, it is practical to run it for all of the duct routes in a branching system, to ensure finding the critical route which will result in the maximum external static pressure on the air handler. Iteration Techniques The heart of the method presented here is an iterative solution to the Colbrook equation which draws on that proposed in Calculating Pressure Drop in Piping Systems by Thomas Lester, P.E. in the July 2003 Journal 2. While friction factor, denoted as f, may have a wide range of values in piping problems, the range in the areas of interest in air conditioning duct design are fairly narrow, and an iterative solution is easier and more compatible as a simple IF loop imbedded in a computer program. The Colbrook equation is presented in the Handbook3 as follows: 1/f0.5 = 2 log10 (12/3.7D + 2.51/Re/f0.5) Lester suggests solving this equation using the built-in excel iteration algorithm by evaluating each side separately starting with an initial guess of f. This can be expressed as follows: factor = 1/f0.5 and factor1 = 2 log10 (12/3.7D + 2.51/Re/f0.5) However, it is not clear that the built-in iteration algorithm can be called in a VBasic macro, so the method presented here performs the iteration within the macro, as follows: diff = factor  factor1 if abs(diff) > .0001 then f = f * (1 + (factor factor1) / factor) repeat until diff <= .0001 return f An example of the f iteration loop in VBasic follows: guess initial f f = .02 ifloopf: 'calculate fact and fact1 fact = 1 / (f ^ 0.5) Sheet2.Cells(15 + sbrcount, 13) = fact fact1 = -2 * ((Log(12 * e / 3.7 / dia + 2.51 / Re / f ^ 0.5)) / Log(10)) Sheet2.Cells(15 + sbrcount, 14) = fact1 diff = (fact - fact1) Sheet2.Cells(15 + sbrcount, 15) = diff countf = countf + 1 Sheet2.Cells(15 + sbrcount, 11) = countf If countf < 99 Then If Abs(diff) > 0.0001 Then f = f * (1 + (fact - fact1) / fact) GoTo ifloopf End If Sheet2.Cells(15 + sbrcount, 9) = f End If This simple linear iteration, diagramed at the end of this paper, seems to work flawlessly for the range of air flows and friction loss factors (dp100) of interest in HVAC air duct design. The iteration to find a diameter that satisfies a particular dp100 is more challenging. As shown on figure 2, the dp100 iteration is logarithmic rather than linear. To get the loop to converge, the diff function must be as follows: diffdp100 = (log(dp100A) log(dp100))/log(dp100) where dp100 = desired final value and dp100A = value calculated as a function of diameter diameter is then changed as follows after each iteration, to allow the algorithm to converge: D = D*(1 + 0.1*((log(dp100) log(dp100A)) / log(dp100))) If the duct is to be rectangular, then a third iteration is needed to determine w, given D and h. H is held fixed, and w is varied until a calculated diameter equals that determined from the two earlier nested iterations.  Finding Friction Loss The second macro is friction factor, and uses the inputs and outputs from newductsize. In addition, up to seven fittings may be entered with either loss coefficient C or p. The fittings are coded from 1 to 7, and up to four may be entered for each duct segment. A more complete explanation of this will be given later in the article. The macro  friction factor accepts air flow, diameter, height, and width, line by line, from the output of newductsize. Because width is not a whole number in newductsize, friction factor first rounds width up or down to the nearest integer up if the decimal is more than .3 higher than the lower integer, down if it is less than .3. (This is to keep duct dimensions from getting unnecessarily large). Using the new integer value of width, a new diameter is calculated for each segment from D = ( 1.3 ( hw ).625 ) / ( h + w ).25 Similarly, if the duct is to be round, the value calculated in newductsize must be rounded to the nearest integer, resulting in a new value for duct diameter. The rounding algorithms for diameter are set up to avoid a final duct size less than 6 inches, and to round up to the nearest even integer if the duct is larger than 10 inches. This latter is because snap-lock round duct is generally only available in even size increments above 10 inches. With air flow and diameter, new values for V and Re may be calculated, and a new value for f using the Colbrook iteration described above. Thus, for each segment, the duct friction loss may be calculated using the familiar Darcy equation1 already used in the dp100 iteration of  newductsize : dp = 12Lf ( V / 1097 )2 ) / D As a check, dp100 is calculated by substituting 100 in place of L, to ensure that this parameter has not strayed beyond reason. An example of the output of friction factor showing duct friction loss is below as Table 2: Table 2 OUTPUT OF MACRO FRICTION FACTOR Duct Friction Loss The output shown above was drawn from the results shown in the Input/Output" of Macro Newductsize, and does not include the fitting dynamic losses which will be described in the next section. Fitting Dynamic Losses Fitting dynamic losses are discussed in the ASHRAE Handbook1, which also includes a limited selection of fitting loss coefficients. A more comprehensive catalogue of loss coefficients may be found in Idelchik. (2001)4 or the ASHRAE Duct Fitting Database, 2002. Fitting loss coefficients express the loss of a fitting as the ratio of the dynamic pressure loss to the total velocity pressure at the entrance to the fitting: pfix = C * pv where pv = (V/1097)2 Pressure loss for terminal devices such as supply diffusers and return grilles, or for duct mounted equipment such as duct furnaces and variable volume valves, may be found directly from manufacturer s data. Macro  Friction Loss allows the user to input C or p for up to seven fixtures or duct devices, in the form shown as Table 3: The user inputs the fixture type and C or p as appropriate. The macro reads C and dp for each fixture type. If dp = 0 the macro calculates p using the formula above, otherwise p is input directly for the appropriate fixture. Prior to running the macro, the user inputs the fixture code 1 -7 for each fixture type in each segment. The input/output is illustrated in Table 3. Up to four codes (fixtures or devices) may be input for each segment.  Table 4 is a continuation of Table 2, overlapping duct dp as previously shown. the columns coda, codb, codc and codd are input from the fixture library, table 3. The parameters dpfixa dpfixd are the losses either input from table 3, or calculated as a function of velocity pressure and loss coefficient. Table 4 INPUT/OUTPUT OF MACRO FRICTION FACTOR Fitting Dynamic Losses  The fixture p is summed at the bottom of the column  fixdp , and this is added to the sum of duct segment friction losses to provide  systotdp which is the external static pressure on the zone air handler. Summary The method outlined here, and incorporated in the Excel file duct size by dp100 is in no way new, but instead automates the manual methods described in the ASHRAE Handbook Fundamentals1. After laying out the duct routing for a zone, and determining the distribution of air flow to each space in the zone, the designer may use the macros in this workbook to closely size his ductwork using the equal friction method, with a friction loss factor (dp100) of his choosing. Ducts are sized using the macro newductsize with input of duct segment air flows, height desired for rectangular ducts, and segment length. The output of newductsize is then read by the macro friction factor which calculates duct segment friction losses after rounding up duct height or diameter to the next integer. The designer may also input fixture loss coefficient or p for up to seven fixtures types or duct devices, and then input up to four fixture types for each duct segment. The macro will calculate fixture dynamic pressure loss for each segment, and return an external static pressure for the zone air handler. FIGURE 1 - FLOW DIAGRAM FOR MACRO NEWDUCTSIZE V = duct velocity, fps Q = air flow, cfm D = hydraulic diameter, in Re = Reynolds number f = Moody friction factor  wc e !!!!!!","2"6"#### $$<$B$J$%[&&&&&&(()-)****++,,ƼƶjhUmHnHu h5H*h  h5CJ hCJhB*CJphhB*CJph hH* hH*jh5UmHnHu h5H* h56 h5h80Wr st   MN$a$qrw!!6"8"##H$J$%%%6&Q&Z&[&&&&&$a$&&&&'c'''''(5(X(((((())*****&+`^`^ ^`&+'+++++,,,,L/N/111133V5X555666677$a$$a$,,,1111144V5X5555566666777788888:: :::":,:4:6:N:P:R:T:;;@=@vAAACCrDDDIjh5UmHnHu hH* hH* h56hOJQJ%jh5OJQJUmHnHuhB*OJQJhph h5H*hB*H*hphhB*hph h5hjhU677j9k9R:T:;;<<;@>@uAvA~AAAACCCIII,J-J.JHJZJ$a$I.J0JZJ[JJJKL^4^8^^^b^^^^^^^__a$a&a6aaTaVaXa\a^a`ababbbbbbbbbbcccdcjdndBeDeeef.f0f6f8f:fXfZfPgRg h"hhh jj(k*kllԻhB*OJQJhphhB*H*hphhB*hphhmHnHu hH*UjhUmHnHuhJZJvJJK4^b^^^_aa>aZa\a`abbbbjdrdBeef8fXfPg hh] = roughness coefficient  = density, lbs/ft3 L = duct length, ft  h = duct inside height, in  w = duct inside width, in go to  next segment V=Q/((PiD2/4)/144) Re = 8.56DV    change dia factor = 1/f.5 factor1 =  2log(12/3.7/D+2.51/Re/f.5) change f  no  yes return f  dp100A = 12Lf(V/1097)2)/D  L = 100   no  yes return dia   yes   no  dia1=(1.3(hw).625)/(h+w).25   change dia1   no   yes return w References: ASHRAE Handbook-Fundamentals, 2005, Chapter 35 Lester, Thomas  Calculating Pressure Drop in Piping Systems , ASHRAE Journal vol. 45, #7, p 41-44, July 2003 ASHRAE Handbook-Fundamentals, 2005, Chapter 35, page 35.7 I. E. Idelchik, Handbook of Hydraulic Resistance  Third Edition, 2001, Begell House Publishers     PAGE  PAGE 4  EMBED Excel.Sheet.8   EMBED Excel.Sheet.8  Figure 2  EMBED Excel.Sheet.8  start macro newductsize clear contents of calculated cells read cfm, h,, , dp100 guess dia (D) calc V, Re guess f calc factor, factor1 factor = factor1 calc dp100A=f(f,,V,dia) dp100A=dp100 h = 0 guess w calc dia1 = f(h,w) dia1 = dia  EMBED Excel.Sheet.8   EMBED Excel.Sheet.8  Table 3 h j(klllll(mnoppqqqq(rsvs8ttBtDtHtJtNtPt & Fllllm mmm m&m(m*mnnooppppqqrrrsJsssss8t:t>t@tDtFtJtLtPtRt^t`tbtfthtttvtxtzt|tttttt˼'jOL h5CJUVmHnHuh 0JmHnHu h0Jjh0JUjhU h56 h5hmHnHuhB*H*hphhB*hphjhUmHnHuh7Ptbtdtft|t~tttttttuuunupuuuuuvvv v0v2v$a$&`#$ttttttttuuu4u6u8u:u>unupuuuuuvvv v0v2v\v^vvvvvvvvvvvww0w2w4w`wbwdwfwjwlwwwwǿj9hU'j$OL h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zv3j 9|zpe_7GKO4Bj7 ;B?=g}0pc9q::L#}NP4v`md_̖辬LyiATQ|*RӠDT4)3ɗj݂m3|3rQa6X2+[$0oa LnጜNiDQ  !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNPQRSTUVPY\_`abcdefghijklmnopqrstuvwxyz{|}~Root Entry FIm[@Data O]WordDocumentIObjectPool( SIm_1286885282 F S SOle CompObjfObjInfo  !"#$&'()*+,-./012345679:;<=>?@ABCDFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~ FMicrosoft Excel WorksheetBiff8Excel.Sheet.89qb0* pHd VBAProject4@j = r Y0H J< rstdole>stdole h%^*\G{00020430-C 0046}#2.0#0#C:\WINDOWS\system32\STDOLE2.TLB# Autom`ation`MSFor ms>SFFrms/|Workbook&^p_VBA_PROJECT_CUR"$ S SVBA S Sdirfh Ba= ThisWorkbook =xxL;"8X1Arial1Arial1Arial1Arial1Arial1& Courier New"$"#,##0_);\("$"#,##0\)!"$"#,##0_);[Red]\("$"#,##0\)""$"#,##0.00_);\("$"#,##0.00\)'""$"#,##0.00_);[Red]\("$"#,##0.00\)7*2_("$"* #,##0_);_("$"* \(#,##0\);_("$"* "-"_);_(@_).))_(* #,##0_);_(* \(#,##0\);_(* "-"_);_(@_)?,:_("$"* #,##0.00_);_("$"* \(#,##0.00\);_("$"* "-"??_);_(@_)6+1_(* #,##0.00_);_(* \(#,##0.00\);_(* "-"??_);_(@_)0.0 0.0000 0.000 0.00000 0.000000 0.000E+00                + ) , *  " # !  D      @   ! "     " "T  D "P  D "    D "   @) "P) "T)   "        DA  @A "t  "t A "p A  ` A Sheet1`Sheet2cfm: |iduct dpReynolds Number Re = 8.56*D*Ve=rho=V=Q/((Pi*D^2/4)/144)D=(1.3(a*b)^.625)/(a+b)^.25height awidth bdia D airflow QVRecfminfpmf'Lfan outtee thrudiffuserfan inFixtures Fixture Cel tee branchdp ret grillecodecount /Duct Size and Rectangular/round duct conversion D=alog(.38352*log(cfm) + .00864)diaheightwidthbranchdiff iwgdp = (12*f*L*rho*(V/1097)^2)/Ddp/100'Colbrook(1/f^.5 = -2*log(12*e/3.7/D+2.51/Re/f^.5)Project System-Zonecalculation date system-zone!DUCT SIZE CALCULATION SPREADSHEET Template HP1, zone 1Zone air flow =Zone outdoor air =supply air flow =outdoor air flow =return air flow =sbrcountmax = rcfmoacfmdp100=e =rho = dp100(target) =dp100countf fcountwfact1factsbrcount.Curve fit of dia for dp100=.095 (first guess):clear cell: input data.shaded cell: calculated by macro "newductsize"vdpRun macro "friction factor"Run macro "newductsize"iwgfixdpdiffwsystotdpcodacodbcodccoddiwg/100'fixture libraryduct legft formulas:fixed parameters (user input)brcountmax =IThe macro "newductsize" computes duct diamter for a given cfm based on equal friction, using the delta p per 100' [dp100(target] input on this sheet in cell I9. Therefore the duct diameters and widths shown on sheet two are not rounded to the nearest whole inch. When running the macro "friction factor", the duct diameter and width will be rounded to achievable dimensions before calculating the final duct velocity and friction loss. Segment length, input on sheet 2, is used by the friction factor macro to compute duct dp using the equation above. This macro will also compute fixture loss based on either fixture "C" values from ASHRAE (Idle'chik) or dp input by the user from manufacturers data. The user may input C or dp for up to seven fixtures, and up to four fixture codes may be input for each segment in the cells indicated. TAll data below calculated by macro except fixture codes, which are input by the user%fixture type, C, and dp input by userreturn segments =return segments: -0 means returns correspond to supply segments$>0 means returns are entered by user9If retseg = 0 then set sbrcountmax = supply duct segmentsCIf retseg >0 then set sbrcountmax = supply and return duct segments+see notes regarding return segments setting To run this macro: First input cfm, desired duct height, and segment length on sheet two in the columns indicated. Input the maximum number of supply duct segments "subcountmax" in the indicated cell. If duct height is input as zero, then the macro will assume that the duct segment will be round duct, not rectangular. Run macro "new ductsize" which will calculate both supply duct and return duct diameter and width for each segment input, up to the maximum number of supply duct segments input, with a return duct segment calculated for each supply duct segment. If "return segments" is input greater than zero, the user may instead input return segment cfm and height, and set input "sbrcountmax" equal to the total number of supply and return duct segments to be calculated.fixture C or dpxThis macro will clear the contents of all calculated cells. The fixture loss input cells, N32 - Q100 will not be clearedairflowiw/100'j$   o l nt r }o% @o W@ y a@ 5"  c s@?33$ATw(Н00sT0pxu 7A~S0, 0azp0c c X/ 1c S0Tt00(>Pw*!"a@Project3 Template 333' system-zone3 HP1, zone 1 33  2fixture library6 222" . /%fixture type, C, and dp input by user6 ///"   code Fixtures  Fixture C  dp0"/ formulas:////&/fixed parameters (user input)/// ~  ? +fan out~  +R@2 ,"Reynolds Number Re = 8.56*D*V e=+a2U0*3? ~  @  +el~  +&@2 ,"$D=(1.3(a*b)^.625)/(a+b)^.25 rho=+Oe? ~  @ +tee thru~  +@2 ,"V=Q/((Pi*D^2/4)/144)dp100(target) =~ +"@ ~  @ + tee branch~  +T@2 ," ~  @ +fan in~  +>@2 ," Colbrook1 (1/f^.5 = -2*log(12*e/3.7/D+2.51/Re/f^.5)  Zone air flow = ~ +@ ~ @ +diffuser +~ ,@0 " ' dp = (12*f*L*rho*(V/1097)^2)/D  Zone outdoor air = ~ +@o@ ~ @ + ret grille +~ ,@0 "L "  4To run this macro: First input cfm, desired duct height, and segment length on sheet two in the columns indicated. Input the maximum number of supply duct segments "subcountmax" in the indicated cell. If duct height is input as zero, then the macro will aH 4444444444444"L 44444444444444  "L44444444444444  "L44444444444444  ":44444444444444  :44444444444444  :   4The macro "newductsize" computes duct diamter for a given cfm based on equal friction, using the delta p per 100' [dp100(target] input on this sheet in cell I9. Therefore the duct diameters and widths shown on sheet two are not rounded to the nearest whol64444444444444 :44444444444444 :44444444444444 :44444444444444  :44444444444444  :44444444444444  :44444444444444  :************** ***]'TAll data below calculated by macro except fixture codes, which are input by the user0********* brcountmax =~ (@'xThis macro will clear the contents of all calculated cells. The fixture loss input cells, N32 - Q100 will not be cleared0  duct leg airflow Qheight awidth bdia D V Re Lduct dp dp/100'  vdp fixdp systotdp 0fixture C or dp 111count f' &fact&fact1 &diff cfm in in in fpm ft  iwg iwg/100'  iwg  iwg  iwg  -coda -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NNN0>>>>>>>>>>>>>>>>>>>@#T0A#B#C#D# E#F#G#H#I#J#K#PGL#M#N#O#P#Q#R#TGS#T#U#TV#TGW#X#PwPGY#PGZ#TwT[#\#]#^#T0_#:@ :A :B :C :D :E :F :G :H :I :J :K :L:M:N:O4P4Q4R4S4T4U4V4W4X4Y4Z4[4\4]4^4_D l>>>>>>>>>>>>>>>>888888888888888`#T0a#b#c#d# e#f#g#h#i#j#k#PGl#m#n#o#p#q#r#TGs#t#u#Tv#TGw#x#PwPGy#PGz#TwT{#|#}#~#T0#` a b c d e f g h i j k l m n o p q r s t u v w x y z { | } ~ D`l #T0#### #      d>@J       Sheet1   dMbP?_*+%M:KODAK ESP 5 AiO\C odXXLetterDINU"4( (KOSD d4ArialCurrent PreferencetEXCEL.EXE"dXX??U} $ } $ } $ }  dp100aX,T0      PGTGTTGPwPGPGTwTProject$ System-Zone clear cell: input datacalculation date 7.shaded cell: calculated by macro "newductsize"8/Duct Size and Rectangular/round duct conversion 'Run macro "newductsize"supply air flow =~ %@ cfmdp100== ?return segments:  6 -0 means returns correspond to supply segments outdoor air flow =~ %@o@oacfm e =@*3?  - $>0 means returns are entered by user return air flow =~ %@ rcfmrho = e?B9If retseg = 0 then set sbrcountmax = supply duct segments  L CIf retseg >0 then set sbrcountmax = supply and return duct segments  sbrcountmax =  ~ @4 +see notes regarding return segments setting  return segments = ~  $ D=(1.3(a*b)^.625)/(a+b)^.25 7 .Curve fit of dia for dp100=.095 (first guess): )  D=alog(.38352*log(cfm) + .00864)  airflow "height dia "width $dp100 branch $sbrcount L  f count countf countw fact fact1 diff diffw 7cfm 8in 9in 8in 9iw/100' 9ft 9 9ft :#@6(@`10@3@()Z?`x@54@ e<\? >@(@&@  M@  ַ@B?#@6(@-@ %/@(A?i@?5.@+T? >@(@"@  2 _@ _@X yI?#Ȏ@6$@`+@As0@(k? |@@56@gLئk? >@&@&@  CF=( @ e @KC?#@6$@%&@K|$@(Pq?b@@5 @]T? =@$@@  .d~@ _k@]?@pK?#x@6$@`0#@` @(ZK?r@@5(@~Nٕ? <@&@ @  Ӻ-a@ $a@?`#C#@U@6`N@~ (ب?@54@? 6@*@ @  l؂@ z7n@O?#Q@~ #@"@~ (*>?@54@뾫į? 4@*@ @  _@ l^@ F?#8>t@~ #$@`Z"@Ao@(/3?@5(@2(Y? <@(@ @  J](@ @y?eG# E!|@~ #$@@$@M"@(.:9? @5 @ :T4j? =@&@@  ;q@ @qZ?yF#4@~ #$@`*@@ˮ,@(h|?"@56@{fՓ? =@&@$@  p'@ @:* ΝE?#='@~ #(@@S+@@E+@(b?$@5.@tLbid? >@&@ @  )@ k6*@`ق e4D?#@#(@ /@0@(~k?&@54@Q? >@(@$@  V{|Q@ =da@`! wD? ~ (@&! &!)&. &. &. @$D<k@**** T0!"#$ %&'()*+PG . !. ". #. $. %. &. '. (. ). *.+> @  Sheet2 rG696F10B0-5685-412F-B363-9D4194E2095D5G4.TWD#Microsoft > b Ob Libprary:Q04QFD061C56-4442-49F6-B0AE-B7A3875B0QDOCUME~1\User\L OCALS@Temp\VBE\E,EXg,.E .`M }OffDic}Of@iTc}/02DF8D04C-5BFA-101@B-BDE5}AjA|420gram File,s\U\MSO97.DLL^ 8.0R^ ThisWork bookN2@1Ti@W‘kbokHB1-C@,B8*"B+BSheet12S@e@Pt1PMTj2 2 2bޫ kodule5cm2dmoJu50 g!#' #/ 1$(3/ \`5 @$' /`$g$p0iU5 3$3o3$R*o+ `&MB/1$2a) Td#11rI" U0%444/ =K) !<ZF@K"@ F4#) $NAx8#4#) $NAZF@K"@4Sheet1 Sheet2%Module1 ;Module28*(SLSS6"N0{00020820-0000-0000-C000-000000000046}Y0H$*\Rffff*1f484ec1ab($H` !1 $ $ $0h@0MExAttribute VB_Name = "She@et1" Bast0{00020820- C$0046} |CreatablFalse PredeclaIdTru "ExposeTemplate`Deriv$eCustomizd<1& _OYݕ FpϑKVzTx6#pϑKVzT1& _OYݕ4(SLSS6"N0{00020820-0000-0000-C000-000000000046}Y0H"*\Rffff*d484ed1b6($H0hs $ $ $p@8MExAttribute VB_Name = "She@et2" Bast0{00020820- C$0046} |CreatablFalse PredeclaIdTru "ExposeTemplate`Deriv$eCustomizdxh \` (3 @6 "$`2@`4<`x(`^:`dt`fp("`&X"`T`.PP`L`H`D`h`\`8: Hh@( X`x 0xxPPX`h@ @ @ @ @ @( @ @ X`hp@V@ @  @ @ @t @d @(T @D 8@@4 @$ @ @ @@ @ @8 @Z @`@ @dX `@tp @l @pt @rd @vT @xHD @@4 @@$ @@ @@ @@( @88hME"   28 P (..6  8 *;;; 8  "@ ;D D4,Gh ,$ 0$(X779909P9999 8 (X " H9bX0 9( X 9 8x P$h6& 6&X";  ";( 999h X  p 833303H3`3x3333333 38"P"p"""""777(7H  h p x  8 0H`x Ph ( 88888%X8x":";": 8":P ";( H @      8lp frictionfactor Macro+ Macro recorded 6/10/2008 by Fred Dougherty variablesZZZZZ(Z@ZZ branch loopstart main if loophh 0 '0  set counter 4 '4Z<$Sheet2.Cells(7 + brcount, 4) = widthcounteZ=recalc diameter with dia = (1.3*(width*height)^.625)/(width +< guess widthForms *3" @ . '$Sheet2.Cells(7 + brcount, 4) = widthu =recalc diameter with dia = (1.3*(width*height)^.625)/(width +P d 4  ,6dZ 0c f co8l'0 *3" @ . 'P(x guess initial fct 2-C6? act@ l$ ,6, h$ ,6' X'l X'l B'p 0$ ,6  2 4  ,6t1+ XF8g({Gz?'ll f 4  ,6,6 ?'d  4  ,601 TZ `'4 %6'^Dim diaprime As Single X 4  ,6 brc?  .?  . ?'X1/re 4  %6'B,6  d f  d 'fIf@@ 4 ^ ^'@p 4 4  ,6,6'00 $get cfm,height,width,length,e, Re, D13) =  &H.! @ X'Q!@ X 'B'ZPZZZZZ 4  %6'&,6 4  %6'. 4  %6' & 4  ,6 . 4  ,6  4  ,6@ 0 4  ,6  4  ,6V B 4  ,6 4  %6'  4  ,6    I X' d  I X'` %6' %6'@  4 ,6  4 ,6 Calculate fact and fact1 @ @ XGz@ B ? $: $:'f:nO ^  %6') = Re   'ee0 8 @ ' 0Z8 .F X   'Xg'  ffffff?  '  .F 4  %6'Xgells .F{Gz?'g'allows next step when width = 0 0X '   '=  ^  ,6  ^  ,6 d f '2 'V V 4  ,6 4  %6'Z 4  %6'` 4  %6'd 4 %6't'l'p'r'v'x code a losses ZF ףp= ? V'lg ZF)\(? V'lg ZF{Gz? V'lg ZF? V'lg ZF333333? V'lg ZF{Gz?'lg ZFQ?'lg code b losses `F ףp= ? V'pg `F)\(? V'pg `F{Gz? V'pg `F? V'pg `F333333? V'pg `F{Gz?'pg `FQ?'pg code c losses dF ףp= ? V'rg dF)\(? V'rg dF{Gz? V'rg dF? V'rg dF333333? V'rg dF{Gz?'rg dFQ?'rg code d losses tF ףp= ? V'vg tF)\(? V'vg tF{Gz? V'vg tF? V'vg tF333333? V'vg tF{Gz?'vg tFQ?'vgcalculate dpfix l 4 ,6 p 4 ,6 r 4 ,6 v 4 ,6 l p r v 'x x 4  ,6 ^   %6'  x '  ^   ,6  ^  ,6 4 '4 ^  %6'  ^  ,6   ' V 4 ,6,6'lfixture loss loop: 4  %6'Z 4  %6'` 4  %6'd 4  %6't'p'r'v'x code a losses ZF 'lg ZF 'lg ZF 'lg ZF 'lg ZF 'lg ZF 'lg `F 'pg `F 'pg `F 'pg `F 'pg `F 'pg code b losses `F 'pg `F)\(? V'pg `F{Gz? V'pg `F? V'pg `F333333? V'pg `F{Gz?'pg `F 'pg code c losses dF 'rg dF)\(? V'rg dF{Gz? V'rg dF? V'rg dF333333? V'rg dF{Gz?'rg dF 'rg code d losses tF 'vg tF)\(? V'vg tF{Gz? V'vg tF? V'vg tF333333? V'vg tF{Gz?'vg tF 'vgcalculate dpfix l 4  ,6 p 4  ,6 r 4  ,6 v 4  ,6 l p r v 'x x 4 ,6 ^  %6'  x '  ^  ,6  x '  4 ,6   ^  ,6  ^  %6' @ %6' %6' %6' %6'  %6'  %6' %6' %6' %6'  %6'  %6'  %6' %6' %6' %6' %6' %6' %6' %6'  F V 'g  F V 'g  F V 'g  F V 'g  F V 'g  F V 'g  F V 'g ZF 'lg dF 'rg dF 'rg dF 'rg dF 'rg dF 'rg tF 'vg tF 'vg tF 'vg tF 'vg tF 'vgendloop: GoTo endloop:ha32.m100$B@"clear contents of calculated cells8r32.z100$B@EAttribute VB_Name = "Module1" Sub frictionfacto`r()  l.Descrip`acro recorded 6/10/2008 by Fr"DoughertymWProcDatacInvoke_Funcc \n14>' ' M"variab@les Dim f As Single U 1 D V eE R rhocfm length heightQwid dp dp100if!QcounIn tegerGXbrd 'branch loopN maxAC'clear conts of calculaBtcellRange("a32.m@6").CA C r&z- 3= 1C-A-= Sheet1.CA@(29, 3'start ma in if=Do Until+i= 0J31 +E, 1)`ib'get H,B,@,G,e, R`D"!M$2$14k {LZ2"#N:4#digi7%d<,0 ^ % %B(c* + 0.7) /d:8#If &0 Then 0.01A< 'allows next step wbD 0(1.3 * F# )``0.625d+c25Bp >s3K@%D&%D$V`?/ ((3.1416JD2A4)1 44b= 8.5#* V,^7, 9C+jV6FKY@=!W 3A^,]=:=@4= bX6A R=l]8 VAguess initial f;D L00`GH7f1A_[ @Q_ !EI{$ eCtS* q=pLV109,^ /1`roi##bm0+ 2APdptot %"dFv1-<)<1906:7fixturepp>D5P #v400H0dp01 5PTw2Y13]48].5P;610UM7.1(cs(qdix    Ip``Bw`q#*4P2!Ea c'33%4# 5qw6!6]:77cxoda#c(bPG@EpB6$Yd_Z7 c:! q&dpfixd = 0 p'code a @lossesIf Ta1 Tphen f1U J2J2 J3%3U %4%4 %5%5U %6%677 bb    JFAIFF JFAIFF @F FcFcFFAFF FAFF FAFF FAFF FAFF FAFF FdFFAFF FAFF FAFJ#I#J#I#J#I#@#'calculatepSheet1.Cells(31 + brcount, 23V)IB$a4bU5c6d_BF@bcgX12f H tot max x2, B+,,i %  = ?9)#sysdpe 6<hD 3)b A+ 1'endloop:R%+ DNL allEnd SuT xi(6 << <Y0H"*\Rffff*a487a3b7bHxp8$(MEx"Attribute VB_Name = "Module2" x=KModule3D3Module4EModule5__SRP_0 x e *6 <<LLLLLLL"L"<Y0H$*\Rffff*5748fce4ba*\R1*#b4*\R1*#b8*\R1*#20b*\R1*#b4*\R1*#b4*\R1*#b4*\R1*#b4*\R1*#b4$*\Rffff*1f484ec1ab*\R0*#12*\R1*#15d*\R1*#b4"*\Rffff*d484ed1b60$$`&x`(h`*\x`, X`pP#`.L`0F`2P<`.$H$`,`t`p`l`X0`H`@@d$$`*`h``D``T``` `8Bp@ ` |k 8``4`8 :  @ 8PhH `x@h @ @  @ @ @  @: @ @x @FPt @d @\ @L @B< .008@, @d @ @f8 @ @H @0 `@` @ @ @ 8@x @| ME" 0 0@ p  (08@H0 P HX @H  (`.0.H h6(37h 5x453  "K=*2("H"K (CX(C x 28 ";; :7@9  77 7( 5@ 5X 5p   0)  " ( 8 @  "H 8h bv 8 9  0 8@  ` p $*  88  6J (4   X  DGh8 8p 9 ( h  ;9 0 NhD4@9@  $ pX`8 P ` 29 .8 h p9 variablesZ@ZXZpZZZZZZ branch loop' End IfZh :  %6'F  'e Z8'0   %6'& &F8gZPZ  %6' )Wx?iVy? &$:+ٱ? '*ZPlhget height and diameter  = co  * ,  * ',8 guess width6 &   ,6cfmh * ,  *'a6@hP'  'wi    ,6a)   ,6return duct size startountcfmmax = Sheet2.Cells(7, 3)'9 Sheet2.Cells(15 + sbrcount - rbrcount, 10) = sbrcountmax Do While rbrcount <= sbrcountmax  GoTo endall count = 1h(   %6'(set counter for dp100 loopstart main return if loopcalculate diameter from cfmifloopr:Z6 Sheet2.Cells(15 + sbrcount + rbrcount, 8) = length If count < 30 Then count = count + 1 set counterget height and diameter GoTo ifloopr guess width diff = (dia - dia1) / dia' & ( '&0 *   ,615 +  ' adjust cfmZZ7=======================================================7 height = Sheet2.Cells(15 + sbrcount - rbrcount - 1, 3)  End If6 rbrcount = rbrcount + 1,6 If diff > 0.001 Then'. If rcfm <= 0 Then GoTo endallrbrc7 length = Sheet2.Cells(15 + sbrcount - rbrcount - 1, 8).0 width = width * (1 + (dia - dia1) / dia) 5 Sheet2.Cells(15 + sbrcount + rbrcount, 4) = widthP? 5 Sheet2.Cells(15 + sbrcount + rbrcount, 5) = count @Z set counter )calculates duct diameter as a function of)dp100, then calculates duct width given a duct height.ZZ ,start main supply if loop - iterate on dp100    ,6om c@ %6'@ %6' %6'  ,6 @ ,6   ,6calculate V and Re &H.! @ *'Q!@ * 'Bhstart f loop guess initial fF{Gz?''  ?'d d  ,6 @ @ *Gz@ B ? $: $:'f f   ,6 2   ,6  '   ,6 c 2-C6?  d f  d ' get e, rho, dp100, L d  I *' 0 '0Z   ,6 02 h    ,6 0  ,6 *   ,6 MbP? id( width = (dia * 3.1417 - height * 2) / 2 Calculate fact and fact166 Sheet2.Cells(15 + sbrcount + rbrcount, 3) = heightI dia1 = (1.3 * (width * height) ^ 0.625) /' (width + height) ^ 0.25h *   ,6Z8Z      4new, rbrcount = 0 8Sheet2.Cells(30 + testcount, 12) = count 'killHrecalc diameter with dia = (1.3*(width*height)^.625)/(width +height)^.25calculate dia1 $: $:  $:' -C6? - d * *   * '*1) / *? $: $:  $: '*P %6'.C':B/Sheet2.Cells(30 + testcount, 4) = V 'kill8Sheet2.Cells(30 + testcount, 11) = dp100 'killrcfmmax = Sheet2.Cells(9, 3)0cfmfactor = rcfmmax / cfmmaxa1 6 Sheet2.Cells(15 + sbrcount - rbrcount, 9) = cfmfactor 6 Sheet2.Cells(15 + sbrcount + rbrcount, 7) = rbrcount 8Hrecalc diameter with dia = (1.3*(width*height)^.625)/(width +height)^.25A rcfm = cfmfactor * Sheet2.Cells(15 + sbrcount - rbrcount - 1, 1)1 Sheet2.Cells(15 + sbrcount + rbrcount, 1) = rcfm7 dia = 10 ^ (0.38352 * 0.434294 * Log(rcfm) + 0.00864)0 Sheet2.Cells(15 + sbrcount + rbrcount, 2) = dia1Sheet2.Cells(30 + testcount, 2) = cfm 'kill1Sheet2.Cells(30 + testcount, 3) = dia 'kill   %6'.?  .?  . ?',0set up cfm and rcfmn cfmguess duct diameter from cfm , : ':: %6'@ & 'sh  _= Shee : _ '| : F & F '(`F'(g - set   :  ,6 :   %6'& ` :   %6'. .  :  ,6 ( :   ,6XZhZ digits = 0factor = 10 ^ digits facto+width1 = Int(width * factor + 0.7) / factor^ digi8 .F'g .Fg 'Sheet2.Cells(28 + sbrcount, 4) = width1Z .'    ,6P8   '  ,6  ,6   ,6( %6'   Fg : ':  d f '20c15.g100$B@i15.p100$B@"clear contents of calculated cellsAttribute VB_Name = "Module3" Public Sub newductsize() 'calcul ates . dizter as a funct@ion ofVdp100, then nwidth giva+d height.variab@les Dim cfm As Singlermax1 b&e$ho  1  yleng countIn`tegerUAfŗwdif cs@ff jf`actorA sd. 'branch loop D~Ar2d Do@di0gitsA no(tapASngclear cJoYn ofd cellRange("c15.g").CA C i'set upand AC:I9= Sheet2.C(11, 3oa`.`~19%D&y%aCd- `D:=!/#j7AC 8H 9#retseg 11)#c= 1, !J:Do While x<= ,`. 5 +- / 2, EIfp 6 T \="?-2 Else 0j#16)b$-F2&+> 0CGoTo end@r1@ ` *ۃB2)X-& "g ntM2 g=@F+AAeLBmainHC@ .'start a supply ifb - i gK0›`Kq, 7guesfrob 1001 #widthWa* (1t)Uo=x+ 1GoTo ifloopw End Ifend}: dEc M0'digi tsfactor10 1 Int($* +7{4". 28 EY12?CT{.FXset L\cfm@A- |fm"!A ea ll@ejSub (6 << <Y0H$*\Rffff*134884aed0h0$`$$ Dou$8(j`&````(`*`,``.``0`2````X8ME@ H lp D_dp100 Macro+ Macro recorded 7/21/2008 by Fred Dougherty variablesZZZZZZZZZZZZZZ branch loopZZ'start main supply if loop  %6'  '  _    ,6calculate diameter from cfm   %6'& &F8g   %6'( )Wx?iVy? &$:+ٱ? '* set counter'0get height and diameter   %6'. *   ,6 guess width *3" @ . '=recalc diameter with dia = (1.3*(width*height)^.625)/(width + height)^.25<p?  .?  . ?', * ,  *'2 0 '0 0 2MbP?  * ,  * '<hh    ,6 0   ,6  ' & ( '& &   ,67=======================================================start main return if loop'  %6' %6'  '6 Sheet2.Cells(15 + sbrcount - rbrcount, 9) = cfmfactor    ,6  _     ,6 adjust cfmcalculate diameter from cfm      %6' F8g     ,6 )Wx?iVy? $:+ٱ? '* GoTo endall set counter'0get height and diameter     %6'.     %6' *    ,6 .    ,6     ,6 guess width *3" @ . '=recalc diameter with dia = (1.3*(width*height)^.625)/(width + height)^.25?  .?  . ?', * ,  *'2 0 '0 0 2MbP?  * ,  * '8h0h(     ,6 0    ,6  '8l"Attribute VB_Name = "Module4" K)^ rUxg@?@ACDEFGHIJKLNOPRSTUWXYZ[\_bcdefghijklmnpqrstuvwxyz{|}     -. !"#$%&'()*+,1/023de56789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcfpgijklmnorstuvwxyz{|}~rU~}     Y 1 I) $ .'%:%"$ q5.'%: %"$ q56( %(%"$ Up*53( %( %"$ 7( %( %"$ *sp5npj*sl nlnps05(%(%npj%"$ 4(%(% @"$ 5( %(%nlj%"$ 3( %( %"$  (k*D]I\K((%(%"$ *sx6=(%(%"$ t5(]c\nxjt*shshH((%(%nhjd%"$ 5K((%(%"$ *sL6(]p\r nxn0stCk*D%(%ntj%"$ Ck*D%(%nLj%"$ (p.k.k* 8k.D%(%k.D%"$ ;k.D%(%"$ *sx5 nx ;k.D%(%"$ *sh57nx9 t\ )Wx?iVy?o\+ٱ?s\9k.D%(%n\j%"$ 7(%( %"$ *sd57(%( %"$ *s`57(%( %"$ *sT55(%(%nTj%"$ 5(%(%ndj%"$ 5( %(%n`j%"$ pF)nxH.! @n\ϳ붶kLQ!@n\kL<{Gz?,pD"(,?8k.D%( % @"$ v nd @n\kGz@<,?Δ B9 t\ 9 to\okd5 8k.D%(% @"$ *s<9k.D%(%nnx?϶st9kp>8kD%"$  k>cn@-C6?nxntnpntsx'& nxnTn\nhIϳnlsH& nxdn\nhIϳnlsD;k:D(%( % @"$ nHj(;k:D(%( % @"$ 9kV@e{OתC  B2;8ϡcJƸ=xAv7LZA$j ? !_ _B_var_tediffdia _B_var_diffdp _B_var_dp100a1Hdia2cI` _B_var_dia2l dp100prime~_B_var_dp100primerecalcӬdiameter(endsub: _B_var_endsubHall'twcountifloopwT insertretloopҏsetcountIp_B_var_setcountGrcount-8mainloopfcfmloop_B_var_mainloopU>cfm2 _B_var_cfm2 _B_var_Cell Module5f fixtureloss(A Application* CommandBars VisiblevdpP _B_var_vdpacoda _B_var_coda##brountYcodb _B_var_codb$#codccodecfixaWD _B_var_cfixaDdpfixa1ixadpfixb1dpfixc1codddpfixd1dpfix| _B_var_dpfix@SSheet3v _B_var_brount _B_var_codc%# _B_var_code'# _B_var_dpfixa8 _B_var_dpfixb9 _B_var_dpfixc: _B_var_codd&# _B_var_dpfixd;ItemzdpfixtotV_B_var_dpfixtot(.Sum _B_var_SumȒtot9 brcountmxx_B_var_brcountmx<{RoundUph_B_var_RoundUpvlround _B_var_Rounddigitsfactor _B_var_factorW5width1y _B_var_width1^ _B_var_digitssendloopwRgot _B_var_gotQnotap ductdptot u_B_var_ductdptote~dptot _B_var_dptotsysdp* _B_var_sysdpsysdptot_B_var_sysdptotpfixadp _B_var_fixadpendloop*dpfix11 _B_var_dpfix1(dpfix21dpfix31dpfix41dpfix51dpfix61dpfix71cfix1GD _B_var_cfix14cfix2HDcfix3IDcfix4JDcfix5KDcfix6LDcfix7MD _B_var_dpfix2) _B_var_dpfix3* _B_var_dpfix4+ _B_var_dpfix5, _B_var_dpfix6- _B_var_dpfix7. _B_var_cfix25 _B_var_cfix36 _B_var_cfix47 _B_var_cfix58 _B_var_cfix69 _B_var_cfix7:oacfmA _B_var_oacfmmretsegQ, _B_var_retseg endcfmloopdSheeRange  ClearContents{M#     @PROJECT %BPROJECTwmMSummaryInformation( 'Q<DocumentSummaryInformation8V0000001={3832D640-CF90-11CF-8E43-00A0C911005A};VBE;&H00000000 [Workspace] ThisWorkbook=0, 0, 0, 0, C Sheet1=0, 0, 0, 0, C Sheet2=0, 0, 0, 0, C Module1=39, 12, 716, 257, Module2=0, 0, 655, 241, C Module3=24, 38, 679, 279, C Module11=0, 0, 0, 0, C Module4=88, 88, 742, 329, C Module5=88, 88, 742, 329, C ThisWorkbookThisWorkbookSheet1Sheet1Sheet2Sheet2Module1Module1Module2Module2Module3Module3Module11Module11Module4Module4Module5Module5Oh+'0 @H ]Excel VBA - Clearing contents of a sheet below a Row - VBA - Forums at ProgrammersHeaven.comwFred DoughertyaFred DoughertyaMicrosoft Excel@՜.+,D՜.+,  PXp x F&D Engineeringj Sheet1Sheet2  Worksheets 6> _PID_GUIDAN{8D929DDC-7475-4F71-AC6B-9EB4AD9F3AB9} FMicrosoft Excel ChartBiff8Excel.Sheet.89q_1287074383r* F S{UOle ]CompObj),^bObjInfo`f0* pHd VBAProject4@j = r  yH J< rstdole>stdole h%^*\G{00020430-C 0046}#2.0#0#C:\WINDOWS\system32\STDOLE2.TLB# Autom`ation`MSFor ms>SFFrms/| rG696F10B0-5685-412F-B363-9D4194E2095D5G4.TWD#Microsoft > b Ob Libprary:Q04QFD061C56-4442-49F6-B0AE-B7A3875B0QDOCUME~1\User\L OCALS@Temp\VBE\E,EXg,.E Workbook+L4__VBA_PROJECT_CUR"J S{UVBA6 S{Udiraj Ba= ThisWorkbook=xxL;"8X1Arial1Arial1Arial1Arial1Arial1Arial1Arial1Arial1Arial1Arial"$"#,##0_);\("$"#,##0\)!"$"#,##0_);[Red]\("$"#,##0\)""$"#,##0.00_);\("$"#,##0.00\)'""$"#,##0.00_);[Red]\("$"#,##0.00\)7*2_("$"* #,##0_);_("$"* \(#,##0\);_("$"* "-"_);_(@_).))_(* #,##0_);_(* \(#,##0\);_(* "-"_);_(@_)?,:_("$"* #,##0.00_);_("$"* \(#,##0.00\);_("$"* "-"??_);_(@_)6+1_(* #,##0.00_);_(* \(#,##0.00\);_(* "-"??_);_(@_)0.0 0.0000 0.000 0.00000 0.000000 0.000E+00                + ) , *  " # !  D     "T "P  @   ! "     #   Chart1|Sheet1SSheet2^Sheet3cfm:NDlegduct dpReynolds Number Re = 8.56*D*Ve=rho=V=Q/((Pi*D^2/4)/144)D=(1.3(a*b)^.625)/(a+b)^.25height awidth bdia D airflow QVRecfminfpmf'Lfan outtee thrudiffuserfan inbrcountFixtures Fixture Cel tee branchdp ret grillecodecount /Duct Size and Rectangular/round duct conversion D=alog(.38352*log(cfm) + .00864)diaheightwidthbranchduct fact1fact2diff iwgdp = (12*f*L*rho*(V/1097)^2)/Ddp/100'brcountmax =Colbrook(1/f^.5 = -2*log(12*e/3.7/D+2.51/Re/f^.5)Project System-Zonecalculation date system-zone!DUCT SIZE CALCULATION SPREADSHEET Template HP1, zone 1Zone air flow =Zone outdoor air =supply air flow =outdoor air flow =return air flow =sbrcountmax = rcfmoacfmFixture lossesMacro newductsizeV=cfm/(144*D^2*3.1416/4)B !^olHtj r 7{ 5 ^ JP8 5X6Z020i.  1N5[6z020vd 5\ 5] (Н02 } v+ 5`6020#Y  -i vA 5a60209V azp01N1N Yi i 5c t~ 5d 5e1NS0Tt004*^ 5q9  Chart1   dMbP?_*+%MKhp psc 2100 series 2100 series!@m߀dtBe@RLd3Arial8(wBeںںhp psc 2100 series 2100 series,LocalOnly,DrvConvert"d??U} $ } $ }  t##w#wG###w#### # # # # #####0#######l######T0#*!DUCT SIZE CALCULATION SPREADSHEETH!"a@Project Template  system-zone HP1, zone 1: "   code Fixtures  Fixture C  dp0"Reynolds Number Re = 8.56*D*V e=a2U0*3? ~  ? fan out~  R@2 "$D=(1.3(a*b)^.625)/(a+b)^.25 rho=Oe? ~  @  el~  &@2 "V=Q/((Pi*D^2/4)/144) ~  @ tee thru~  @2 " ~  @  tee branch~  T@2 "Colbrook1(1/f^.5 = -2*log(12*e/3.7/D+2.51/Re/f^.5) Zone air flow =~ @  ~  @ fan in~  >@2 "'dp = (12*f*L*rho*(V/1097)^2)/D Zone outdoor air =~ @o@  ~  @ diffuser ~  @0"  ~ @  ret grille ~ @0 " duct brcountmax = ~ (@D " leg  airflow Q height a width b dia D V Re L duct dp dp/100'   count f'  fact1 fact2 diff& "  cfm in in in fpm   iwg     & " ?@(@ @4@~ 9@ `|@ #@~ 6@ e? "`? ' dp = (12*f*L*rho*(V/1097)^2)/D  ~ 2@ !@8? "`1@ "`1@~ $& "@@(@ d0@~ 8@cU@`*%@~ .@}Fb? "|u? ! V=cfm/(144*D^2*3.1416/4)   ~ 2@!`?"G@"G@~ $&"@@$@@ 1@~ 7@`@ =@~ @Q? "?  ~ 3@!`c?" l\@" l\@~ $&"@@$@4%@~ 6@@\n@~ ,@{j? "C?  ~ 3@!?" q@" q@~ $@@$@d @~ 5@uv@¼@~ 4@ Zw? "G1?  ~ 3@! ʒ?"@"@~ $$@@ @o @4@f@@,@~ &@vMp? "@?  ~ 3@!?" @" @~ $@@ @V@~ 3@ V@ (@~ &@St? #ϧ?  ~ 3@!?"ర@"ర@~ $ @@$@|@2@ ڋ@qA4@Ԉ?# ?   ~ 4@!}?"@"@~ $"@@$@ D"@~ 1@9@A~ ,@ "? #`Ռ?  ~ 4@!@]e?"`@"`@~ $$@@$@(u.@~ 0@@@A~ @`z? #B?  ~ 5@!SO?"@"@~ $$&@@(@T,@.@ @A~ .@zٖ? " ?  ~ 4@!;?"@"@~ $(@@(@/2@~ ,@@D@ A~ 6@@? "?  ~ 4@!*?"`@"`@~ $,!"!""$,!"!""$,!"!""$,!"!""$,!"!""$,!"!""$,!"!""$DlGQK 000000 #w!#wG"###$#w%#&#'#(#)#*#+#,#-#.#/#0#1#02#3#4#5#6#7#8#l9#:#;#<#=#>#T0?#, !"!""$,!!"!""$,"!"!""$,#!"!""$,$!"!""$,%!"!""$,&'Fixture losses*',(,),*,+,,,-,.,/"0 "1 "2 "3 "4 "5 "6 "7 "8 "9 ": "; "< "= "> "? Dl0000000I00000000&&&&&&&&&&&&&&&@#wA#wGB#C#D#wE#F#G#H#I#J#K#L#M#N#O#P#Q#0R#S#T#U#V#W#X#lY#Z#[#\#]#^#T0_#@ A B C D E F G H I J K L M N O P Q R S T U V W X Y Z [ \ ] ^ _ Dl `#wa#wGb#c#d#we#f#g#h#i#j#k#l#m#n#o#p#q#0r#s# ` a b c d e f g h i j k l m n o p q r s,|>@ Sheet1   dMbP?_*+%"??U} $ } $ } $   T0    w             0      Project System-Zonecalculation date8/Duct Size and Rectangular/round duct conversionMacro  newductsizesupply air flow =~ @ cfmoutdoor air flow =~ @o@oacfmreturn air flow =!@air DD rcfm sbrcountmax =  ~ @ $ D=(1.3(a*b)^.625)/(a+b)^.25 )  D=alog(.38352*log(cfm) + .00864)  cfm dia height width count branch brcount L@9@(@@4@&@`x@6@@8@(@ d0@&@i@?.@@7@$@@ 1@&@ |@@@  @6@$@4%@$@b@@,@  @5@$@d @$@r@@4@  6@4@ @o @*@@U@@&@  @3@ @V@~ .@&@?~  @@2@$@|@~ &@?4@  @1@$@ D"@~ $@@,@  @0@$@(u.@~ &@@@  $@.@(@T,@$@@.@  @,@(@/2@~ &@@6@  @*@ @(@ 4< ,05X[pHuPP^^^H|jjjVj0>@ Sheet2   dMbP?_*+%"??U>@ Sheet3 .`M }OffDic}Of@iTc}/02DF8D04C-5BFA-101@B-BDE5}AjA|420gram File,s\U\MSO97.DLL^ 8.0R^ ThisWork bookN2@1Ti@W‘kbokHB1-C@,B8*"B+BSheet12S@e@Pt1PMTj2 2 2b̪޴ 3 3 3  > wodule@#2$yo&uŠ#n#\`~!j/ #/ 1$/i5 @$' `$Kg$p+  M$$23aSd$1%" 0% CharTc#=CTar $ul)=Chart1/1oSheet1~Sheet204Sheet3xul# (SLSS<N0{00020821-0000-0000-C000-000000000046}8($HMExAttribute VB_Name = "Cha@rt1" Bast0{000@20821- 0C$0046} |CreatablFalse Predec$laIdTru "ExposeTemplateDeriv$eCustomizd<ZF@K"@ F4#) $NAx8#4#) $NAZF@K"@4(SLSS6"N0{00020820-0000-0000-C000-000000000046} yH $*\Rffff*1f484ec1ab($H` !1 $ $ $0h@0MExAttribute VB_Name = "She@et1" Bast0{00020820- C$0046} |CreatablFalse PredeclaIdTru "ExposeTemplate`Deriv$eCustomizd<1& _OYݕ FpϑKVzTx6#pϑKVzT1& _OYݕ4(SLSS6"N0{00020820-0000-0000-C000-000000000046} yH "*\Rffff*d484ed1b6($H0hs $ $ $p@8MExAttribute VB_Name = "She@et2" Bast0{00020820- C$0046} |CreatablFalse PredeclaIdTru "ExposeTemplate`Deriv$eCustomizd<'KGV^ F"##IOx6>#"##IOԧ'KGV^4(SLSS6"N0{00020820-0000-0000-C000-000000000046} yH "*\Rffff*e484ed1b6(d$H0hs $ $ $p@8MExAttribute VB_Name = "She@et3" Bast0{00020820- C$0046} |CreatablFalse PredeclaIdTru "ExposeTemplate`Deriv$eCustomizdModule135qModule2*Module32>__SRP_0A xP\`n46 L"LLLLLL"L<8<<< yH $*\Rffff*7f485166b9*\R1*#b4"*\Rffff*d484ed1b6*\R1*#b4*\R1*#b4*\R1*#b4*\R1*#b4*\R1*#b4*\R0*#12*\R1*#15d*\R1*#b4$*\Rffff*1f484ec1ab*\R1*#b4 8"0[$ $`kMM"$*Macro recorded 6/10/2008 by Fred Dougherty 14`Xl`@d$$h`B``0>"$`2@`4<`x(`^:`dt`fp("`&X"`T`.PP`L`H`D`h`\: @4 Hh@x$ X@( Px8PX`h@ @ @ @ @ 88hMEM"   28 PPX`hpx6 p8 *;;;;;p 0$(7h7999 99p99 P0 (X "`9bX 9@9 8H h$86&6&(999 @  8lp frictionfactor Macro+ Macro recorded 6/10/2008 by Fred Dougherty variablesZZZZZ(Z@ZZ branch loopstart main if loophh 0 '0  set counter 4 '4Z<$Sheet2.Cells(7 + brcount, 4) = widthcounteZ=recalc diameter with dia = (1.3*(width*height)^.625)/(width +< guess widthForms *3" @ . '$Sheet2.Cells(7 + brcount, 4) = widthu =recalc diameter with dia = (1.3*(width*height)^.625)/(width +P d 4  ,6dZ 0c f co d f '28l'0 *3" @ . 'P(x guess initial fct 2-C6? act@ l$ ,6, h$ ,6' X'l X'l B'p 0$ ,6  2 4  ,6t1+ XF8g({Gz?'ll f 4  ,6,6 ?'d 4  ,601 TZ `'4  %6'^Dim diaprime As Single X 4  ,6 brc 4  %6'B,6  d f  d 'fIf@@ 4 ^ ^'@p 4 4  ,6,6'00 $get cfm,height,width,length,e, Re, D13) =  &H.! @ X'Q!@ X 'B'ZPZZZZZ 4  %6'&,6 4  %6'. 4  %6' & 4  ,6 . 4  ,6  4  ,6@ 0 4  ,6  4  ,6 B 4  ,6 4  %6'  4  ,6    I X' d  I X'` %6' %6'@  4 ,6  4 ,6 Calculate fact and fact1 @ @ XGz@ B ? $: $:'f:nO 4  %6'X  Attribute VB_Name = "Module1" Sub frictionfacto`r()  l.Descrip`acro recorded 6/10/2008 by Fr"DoughertymWProcDatacInvoke_Funcc \n14>' ' M"variab@les Dim f As Single U 1 D V eE R rhocfm length heightQwid dp dp100if!QcounIn tegerGXbrd 'branch loopN maxA  8= 1  = Sheet1.Cells(11, 4'start main ifDo Until D+3 + , 1) @get Um,a,],k,e, RD-Av*2*4  t 3 #<:A! GuZ8 D2 V!/ ((3.1416 * D ^ 2) /0144_ = 8.5#* V_E75, n9 J04F1*3@=a1 3!8,]4A,=5!#=X6 7vRC8#;Q guess initial fIf2<= 0 Then GoTo endallf80.02 sAYzdyxP ifav:Calculaϡ and sbu@(fB0.5:tjBA -2I((Log(1Ae 3.7D@g2.51@L/@^ A Ot0)1B( d0`* (A - 9A2a E( z?"Iw8C< 99b9Abs(Q) >@ 1<f1`[ Q_ R"WEPIC% d= YtF* =V109A2`foEd0XA"ddev10"n :CbT#>Lls5020 Gxi(6 << < yH "*\Rffff*a487a3b7bHxp8$(MEx"Attribute VB_Name = "Module2" K)^rU~~~~~~~~~~~~~~~~~xzP6 L"LL< yH $*\Rffff*b348790aaa*\R0*#12*\R1*#15d*\R1*#b4"*\Rffff*d484ed1b6*\R1*#b4*\R1*#b480$`&x`(h`*dx`,h``p\#`.@X`0R`2L`FH$`D`t`p`l`XH`T   `Bp< @, `@ `` @ p@ `Jkk P  MEk" 4 :0  (08@ HPX(0x p68 ` 8 ";;@:7P  ;9 (( DP L4  0@$X98  9  > 7p7H  <"<  "<  ".M`0"=:7    (B(Bp "="=8"= ( D8 L4` ` $"="<@  0  ( x  variablesZ@ZXZpZZZZZZ branch loop'Zh  _    ,6calculate diameter from cfm2   %6'& &F8gZPZ  %6' )Wx?iVy? &$:+ٱ? '* set counter'0get height and diameter   %6'. *   ,6 guess width *3" @ . '=recalc diameter with dia = (1.3*(width*height)^.625)/(width + height)^.25<?  .?  . ?',e = * ,  *'2 0 '0 0 2MbP?   * ,  * '<hh    ,6` 0   ,6  '` & ( '& &   ,6`@88l0(   %6'(  'start main supply if loopstart main return if loop' GoTo endallcalculate diameter from cfm  'Z *    ,6brcoun .    ,6rcount 0 '0$  %6''0 set counterhget height and diameter  _- he 0  guess width     ,6'=recalc diameter with dia = (1.3*(width*height)^.625)/(width + height)^.25h adjust cfm     ,6,6ZZ7======================================================= F8g2.Ce %6'rc      %6'     ,6maxt      %6'.6 Sheet2.Cells(15 + sbrcount - rbrcount, 9) = cfmfactornt, )Wx?iVy? $:+ٱ? '*count,?  .?  . ?', * ,  *'2 2MbP?  * ,  * ' *3" @ . '  ' 0    ,6     %6'Z    ,6     ,6.calculates duct diameter for supply and return4using decreased return air flow based on outdoor airx Attribute VB_Name = "Module3" Public Sub newductsize() 'calcul ates . dizter for supply and return`using decreaDse0 ai2low bon outdoD6variables Dim cfm As SOlermax1 b&s % 1 width height! lengcounInteger}diff%a}factsrL 'branch loopV R '= 0@ 'star@t mainif= Sheet2.Cells(11, 3@GA I- 1&o While Ex <=@*C K5 +, 7)E@FȺro[@ 1/If@$0 Then GoTo endall \@K(6$@10 ^ (0.38352 * 0.4 34294Log(')80.00864'se\t bJEIL=a('gTx\me{59"2,` +guess fc cg= (`3.1417 - * / 2@re32wihA1.3*(B *)^.625)2/ +25 ifa_:c1@+(@D*D )-0 / _ J Vt-1) ` c/+EY!!Fbu< 3/cFCd > >001"J(* (1@B**EI Q E`Ifi;4;y5acvv{#m-7e -=n# Lƛ ?=1 # reBLf9@7= /a@@̤GIe, 9",fmc 1z102DU6Uo Ug bV adjusIfmoW fjW! : T*- @ e(Y?Y6YF*+V, &&= YYYp8'kaZsBZ:PZZn(?[䈿щx, N8Dt,q\=POO@3Q)[(1j08qC %Og4Z* OgOgOgOgOgBgr_g_g_g _g`_ga!*/U$s_gQ_g i_g2+c|p/_g_g .Sg?qogW, h?"2, h&CXU]dÛ  ~~~@ 1SBo/   a a a a a Y) a  A      ThisWorkbookSheet1Sheet2Sheet3Module1 VBAProjectF=C:\Program Files\Common Files\Microsoft Shared\VBA\VBA332.dllVBA Q y(F 3C:\Program Files\Microsoft Office\Office\EXCEL8.OLBExcel i80FC:\WINDOWS\system32\STDOLE2.TLBstdole qHoiV/AcAC:\WINDOWS\system32\MSForms.TWDMSForms aAX.E .`M VBDIu .C:\DOCUME~1\User\LOCALS~1\Temp\VBE\MSForms.EXD iAhL-[DR 2C:\Program Files\Microsoft Office\Office\MSO97.DLLOffice Qyxfrictionfactor FZF@K"@ F4#) $NADF Worksheet @ VBA332.DLL K 5 1& _OYݕpϑKVzTF kDAbJH_F*=(:G~?@ABCDEFGHIJKLMNOPQSTUVWXYZ[\]^_`abcdfghijklmnoprstvwxz{|}~p<6($ %(%4"$ 4Up:45knx?϶st9 kp>8 kD%4"$ 44 k>cn@-C6?nxntnpntsx & nxnTn\nhIϳnlsH& nxdn\nhIϳnlsD9 kHModule1 7f485166b9*D"\`0`nModule2 a487a3b7b*DixModule3 b348790aaa*D0Module11 874879081b*D\"  Chart1 1248b0158b*Dulx`H0@Y2 ؽ%:nO4D59J79Vz1 g,K\%F%LH_Xi n }cͻ>V@e{OתC  B2;8 FKD- To84 as B=dim@DoDElseRf]go`IfreturnsingleThentoUntilwhilewidthExcel+VBAWin16~Win32Macduct size analysisAstdole`MSFormsC VBAProjectOfficeu ThisWorkbook| _EvaluateSheet1Sheet2Sheet3Workbookk WorksheetModule1bfrictionfactorvcfm}brcfm diadia1bheight|count0vdiffcbrcountCellsendalllLogdifloopf1$]e\Re^guess  _B_var_guess-_Defaultjg4L]g^brcounbrcou_brco brcUzbr\D[_B_var_D Calculate brcountmaxIsheet[ _B_var_sheetHfactfact10 factprime=r_B_var_factprime{diaprimeN_B_var_diaprimee&reprime_B_var_reprimeV dimfactprime7_B_var_dimfactprimepLog107H _B_var_Log10$ initialcount1#8LclengthYdp\dp100Cell _B_var_Dostart _B_var_start _B_var_EndFgotoEnd _B_var_IfP _B_var_go _B_var_ifloopJ+VmB18u_B_var_l rho _B_var_rhoModule2cModule3dductsizeyModule4eModule11V _B_var_endall^ newductsize+~sbrcountkrbrcountÊ sbrcountmax3di\ _B_var_di_B_var_brcount cfmfactor _B_var_cfmfactor*rcfm _B_var_rcfmxrcfmmaxCcfmmaxabrcountrbrcxsbcountf_B_var_sbcountjifloop1TiflooprTrdiarbrountSChart1Chart?#     @2 Module=Module3 Module=Module11 Document=Chart1/&H00000000 Name="VBAProject" HelpContextID="0" CMG="63619074B478B478B478B478" DPB="838170549155915591" GC="A3A150B471B571B58E" [Host Extender Info] &H00000001={3832D640-CF90-11CF-8E43-00A0C911005A};VBE;&H00000000 [Workspace] ThisWorkbook=0, 0, 0, 0, C Sheet1=0, 0, 0, 0, C Sheet2=0, 0, 0, 0, C Sheet3=0, 0, 0, 0, C Module1=-8, 13, 669, 258, Module2=0, 0, 655, 241, C Module3=35, 66, 690, 307, C Module11=0, 0, 0, 0, C Chart1=0, 0, 0, 0, C ThisWorkbookThisWorkbookSheet1Sheet1Sheet2Sheet2Sheet3Sheet3Module1Module1Module2Module2Module3Module3Module11Module11Chart1Chart1Oh+'08@Xp Fred DoughertyFred DoughertyMicrosoft Excel@SummaryInformation(-MuDocumentSummaryInformation8y_1287138897P F{U{UOle ՜.+,D՜.+,L PXp x F&D Engineeringj Sheet1Sheet2Sheet3Chart1  WorksheetsCharts 6> _PID_GUIDAN{8D929DDC-7475-4F71-AC6B-9EB4AD9F3AB9} FMicrosoft Excel WorksheetBiff8Excel.Sheet.89qb0* pHd VBAProject4@j = r Y0H J< rstdole>stdole h%^*\G{00020430-C 0046}#2.0#0#C:\WINDOWS\system32\STDOCompObjORfObjInfoWorkbookQpa_VBA_PROJECT_CUR"n{U{U     ,P !"#$%&'()*+H./0123456789:;<=>?@ABCDEFfIJKLMNO[bRSTUVWXYZ\]^_`acdenghijklmopqrsuvwxyz{|}~ Ba= ThisWorkbook, =xxL;"8X1Arial1Arial1Arial1Arial1Arial1& Courier New"$"#,##0_);\("$"#,##0\)!"$"#,##0_);[Red]\("$"#,##0\)""$"#,##0.00_);\("$"#,##0.00\)'""$"#,##0.00_);[Red]\("$"#,##0.00\)7*2_("$"* #,##0_);_("$"* \(#,##0\);_("$"* "-"_);_(@_).))_(* #,##0_);_(* \(#,##0\);_(* "-"_);_(@_)?,:_("$"* #,##0.00_);_("$"* \(#,##0.00\);_("$"* "-"??_);_(@_)6+1_(* #,##0.00_);_(* \(#,##0.00\);_(* "-"??_);_(@_)0.0 0.0000 0.000 0.00000 0.000000 0.000E+00                + ) , *  " #  D      @   ! "     "T "P  D "    D   @) "P)    D  @ "T "P "T "t  "4 "0   "       "t ) "4  $ "PA  @A "p A  DA  DA  DA !PA Sheet1[aSheet2cfm: |iduct dpReynolds Number Re = 8.56*D*Ve=rho=V=Q/((Pi*D^2/4)/144)D=(1.3(a*b)^.625)/(a+b)^.25height awidth bdia D airflow QVRecfminfpmf'Lfan outtee thrudiffuserfan inFixtures Fixture Cel tee branchdp ret grillecodecount /Duct Size and Rectangular/round duct conversion D=alog(.38352*log(cfm) + .00864)diaheightwidthbranchdiff iwgdp = (12*f*L*rho*(V/1097)^2)/Ddp/100'Colbrook(1/f^.5 = -2*log(12*e/3.7/D+2.51/Re/f^.5)Project System-Zonecalculation date system-zone!DUCT SIZE CALCULATION SPREADSHEET Template HP1, zone 1Zone air flow =Zone outdoor air =supply air flow =outdoor air flow =return air flow =sbrcountmax = rcfmoacfmdp100=e =rho = dp100(target) =dp100countf fcountwfact1factsbrcount.Curve fit of dia for dp100=.095 (first guess):clear cell: input data.shaded cell: calculated by macro "newductsize"vdpRun macro "friction factor"Run macro "newductsize"iwgfixdpdiffwsystotdpcodacodbcodccoddiwg/100'fixture libraryduct legft formulas:fixed parameters (user input)brcountmax =IThe macro "newductsize" computes duct diamter for a given cfm based on equal friction, using the delta p per 100' [dp100(target] input on this sheet in cell I9. Therefore the duct diameters and widths shown on sheet two are not rounded to the nearest whole inch. When running the macro "friction factor", the duct diameter and width will be rounded to achievable dimensions before calculating the final duct velocity and friction loss. Segment length, input on sheet 2, is used by the friction factor macro to compute duct dp using the equation above. This macro will also compute fixture loss based on either fixture "C" values from ASHRAE (Idle'chik) or dp input by the user from manufacturers data. The user may input C or dp for up to seven fixtures, and up to four fixture codes may be input for each segment in the cells indicated. TAll data below calculated by macro except fixture codes, which are input by the user%fixture type, C, and dp input by userreturn segments =return segments: -0 means returns correspond to supply segments$>0 means returns are entered by user9If retseg = 0 then set sbrcountmax = supply duct segmentsCIf retseg >0 then set sbrcountmax = supply and return duct segments+see notes regarding return segments setting To run this macro: First input cfm, desired duct height, and segment length on sheet two in the columns indicated. Input the maximum number of supply duct segments "subcountmax" in the indicated cell. If duct height is input as zero, then the macro will assume that the duct segment will be round duct, not rectangular. Run macro "new ductsize" which will calculate both supply duct and return duct diameter and width for each segment input, up to the maximum number of supply duct segments input, with a return duct segment calculated for each supply duct segment. If "return segments" is input greater than zero, the user may instead input return segment cfm and height, and set input "sbrcountmax" equal to the total number of supply and return duct segments to be calculated.fixture C or dpxThis macro will clear the contents of all calculated cells. The fixture loss input cells, N32 - Q100 will not be clearedairflowiw/100'j \  o lF nt rU } +/ W+ 9a5 ^ V2N#33$Sw(Н00sT0t |I ]S0, 0b azp0N2NN2N-XXh2NS0Tt00(9Pw*!"a@Project7 Template 777$ system-zone7 HP1, zone 1 77  6fixture library6 666" . 3%fixture type, C, and dp input by user6 333"   code Fixtures  Fixture C  dp0"3 formulas:3333&3fixed parameters (user input)333 ~  ? 'fan out~  'R@2 ("Reynolds Number Re = 8.56*D*V e='a2U0*3? ~  @  'el~  '&@2 ("$D=(1.3(a*b)^.625)/(a+b)^.25 rho='Oe? ~  @ 'tee thru~  '@2 ("V=Q/((Pi*D^2/4)/144)dp100(target) =~ '"@ ~  @ ' tee branch~  'T@2 (" ~  @ 'fan in~  '>@2 (" Colbrook1 (1/f^.5 = -2*log(12*e/3.7/D+2.51/Re/f^.5)  Zone air flow = ~ '@ ~ @ 'diffuser '~ (@0 " ' dp = (12*f*L*rho*(V/1097)^2)/D  Zone outdoor air = ~ '@o@ ~ @ ' ret grille '~ (@0 "L "  8To run this macro: First input cfm, desired duct height, and segment length on sheet two in the columns indicated. Input the maximum number of supply duct segments "subcountmax" in the indicated cell. If duct height is input as zero, then the macro will aH 8888888888888"L 88888888888888"L88888888888888"L88888888888888":88888888888888:88888888888888:8The macro "newductsize" computes duct diamter for a given cfm based on equal friction, using the delta p per 100' [dp100(target] input on this sheet in cell I9. Therefore the duct diameters and widths shown on sheet two are not rounded to the nearest whol68888888888888:88888888888888:88888888888888:88888888888888:88888888888888:88888888888888:88888888888888:&&&&&&&&&&&&&&&&&]$TAll data below calculated by macro except fixture codes, which are input by the user0&&&&&&&&&brcountmax =~ (@$xThis macro will clear the contents of all calculated cells. The fixture loss input cells, N32 - Q100 will not be cleared0<duct leg< airflow Q<height a<width b<dia D <V <Re <L<duct dp =dp/100'  vdp fixdp systotdp 4fixture C or dp 555count f' #fact#fact1 #diff> >cfm >in >in >in >fpm> >ft > iwg >iwg/100'  1iwg  1iwg  1iwg  9coda 9codb 9codc 9codd 1  : ;;22222<??@=(@@4@@0@?@@?3A~ ?4@An? Aɵ? 3<ߵ? +? A{C? ?@@(@`?@@@~ j@"?I2t i}?{kce?~ Dcl PbPPP>>>P>>>>>>>> #T0!#"###$#%#&#'#(#)#*#+#PG,#-#.#/#0#1#2#SG3#4#5#T6#SG7#8#PwPG9#PG:#S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#SGS#T#U#TV#SGW#X#PwPGY#PGZ#SwT[#\#]#^#T0_#:@:A:B:C:D:E:F:G:H:I:J:K:L:M:N:O4P4Q4R4S4T4U4V4W4X4Y4Z4[4\4]4^4_D l>>>>>>>>>>>>>>>>888888888888888`#T0a#b#c#d#e#f#g#h#i#j#k#PGl#m#n#o#p#q#r#SGs#t#u#Tv#SGw#x#PwPGy#PGz#SwT{#|#}#~#T0#` a b c d e f g h i j k l m n o p q r s t u v w x y z { | } ~ D`l #T0#####      d>@, , J       Sheet1   dMbP?_*+%M:KODAK ESP 5 AiO\C odXXLetterDINU"4( (KOSD d4ArialCurrent PreferencetEXCEL.EXE"dXX??U} $ } $ } $  dp100aXdT0     PGSGTSGPwPGPGSwTProject$ System-Zone clear cell: input datacalculation date 7.shaded cell: calculated by macro "newductsize"8/Duct Size and Rectangular/round duct conversion $Run macro "newductsize"supply air flow =~ "@ cfmdp100== ?return segments:  6 -0 means returns correspond to supply segments outdoor air flow =~ "@o@oacfm e =@*3?  - $>0 means returns are entered by user return air flow =~ "@ rcfmrho = e?B9If retseg = 0 then set sbrcountmax = supply duct segments  L CIf retseg >0 then set sbrcountmax = supply and return duct segments  sbrcountmax =  ~ @4 +see notes regarding return segments setting  return segments = ~  $ D=(1.3(a*b)^.625)/(a+b)^.25 7 .Curve fit of dia for dp100=.095 (first guess): )  D=alog(.38352*log(cfm) + .00864)  airflow  height dia  width !dp100 branch !sbrcount L  f count countf countw fact fact1 diff diffw /cfm 0in 1in 0in 1iw/100' 1cfm 1 1ft 22222222*@+(@`10@3@%)Z?`x@*4@ e<\? >@(@&@  M@  ַ@B?*@+(@-@ %/@%A?i@?*.@+T? >@(@"@  2 _@ _@X yI?*Ȏ@+$@`+@As0@%k? |@@*6@gLئk? >@&@&@  CF=( @ e @KC?*@+$@%&@K|$@%Pq?b@@* @]T? =@$@@  .d~@ _k@]?@pK?*x@+$@`0#@` @%ZK?r@@*(@~Nٕ? <@&@ @  Ӻ-a@ $a@?`#C*@U@+`N@~ %ب?@*4@? 6@*@ @  l؂@ z7n@O?*Q@~ *@"@~ %*>?@*4@뾫į? 4@*@ @  _@ l^@ F?*8>t@~ *$@`Z"@Ao@%/3?@*(@2(Y? <@(@ @  J](@ @y?eG* E!|@~ *$@@$@M"@%.:9? @* @ :T4j? =@&@@  ;q@ @qZ?yF*4@~ *$@`*@@ˮ,@%h|?"@*6@{fՓ? =@&@$@  p'@ @:* ΝE?*='@~ *(@@S+@@E+@%b?$@*.@tLbid? >@&@ @  )@ k6*@`ق e4D?*@*(@ /@0@%~k?&@*4@Q? >@(@$@  V{|Q@ =da@`! wD?%~ (@&,%&,-.-----&)%&)%&)%@%D<k@**** T0!"#$%&'()*+PG,-./012SG345T6SG78PwPG9PG:SwT;<=>T0?$ )%$!)%$")%$#)%$$)%$%)%$&)%$')%$()%$))%$*)$+$,$-$.$/"0"1"2"3"4"5"6"7"8"9":";"<"=">"?D`l((((((((((((((((&&&&&&&&&&&&&&&@T0ABCDEFGHIJKPGLMNOPQRSGSTUTVSGWXPwPGYPGZSwT[\]^T0_"@"A"B"C"D"E"F"G"H"I"J"K"L"M"N"O"P"Q"R"S"T"U"V"W"X"Y"Z"["\"]"^"_D@l&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&`T0abc"`"a"b"c <&&&>@ Sheet2 VBA\{U{UdirfSheet1UWSheet2LE2.TLB# Autom`ation`MSFor ms>SFFrms/| rG696F10B0-5685-412F-B363-9D4194E2095D5G4.TWD#Microsoft > b Ob Libprary:Q04QFD061C56-4442-49F6-B0AE-B7A3875B0QDOCUME~1\User\L OCALS@Temp\VBE\E,EXg,.E .`M }OffDic}Of@iTc}/02DF8D04C-5BFA-101@B-BDE5}AjA|420gram File,s\U\MSO97.DLL^ 8.0R^ ThisWork bookN2@1Ti@W‘kbokHB1-C@,B8*"B+BSheet12S@e@Pt1PMTj2 2 2bޫ kodule5cm2dmoJu50 g!#' #/ 1$(3/ \`5 @$' /`$g$p0iU5 3$3o3$R*o+ `&MB/1$2a) Td#11rI" U0%444/ =K) !<ZF@K"@ F4#) $NAx8#4#) $NAZF@K"@4(SLSS6"N0{00020820-0000-0000-C000-000000000046}Y0H$*\Rffff*1f484ec1ab($H` !1 $ $ $0h@0MExAttribute VB_Name = "She@et1" Bast0{00020820- C$0046} |CreatablFalse PredeclaIdTru "ExposeTemplate`Deriv$eCustomizd<1& _OYݕ FpϑKVzTx6#pϑKVzT1& _OYݕ4(SLSS6"N0{00020820-0000-0000-C000-000000000046}Y0H"*\Rffff*d484ed1b6($H0hs $ $ $p@8MExAttribute VB_Name = "She@et2" Bast0{00020820- C$0046} |CreatablFalse PredeclaIdTru "ExposeTemplate`Deriv$eCustomizdxi(6 << <Y0H"*\Rffff*a487aModule1VZ;Module2*Module3Y[-D3Module4xh \` (3 @6 "$`2@`4<`x(`^:`dt`fp("`&X"`T`.PP`L`H`D`h`\`8: Hh@( X`x 0xxPPX`h@ @ @ @ @ @( @ @ X`hp@V@ @  @ @ @t @d @(T @D 8@@4 @$ @ @ @@ @ @8 @Z @`@ @dX `@tp @l @pt @rd @vT @xHD @@4 @@$ @@ @@ @@( @88hME"   28 P (..6  8 *;;; 8  "@ ;D D4,Gh ,$ 0$(X779909P9999 8 (X " H9bX0 9( X 9 8x P$h6& 6&X";  ";( 999h X  p 833303H3`3x3333333 38"P"p"""""777(7H  h p x  8 0H`x Ph ( 88888%X8x":";": 8":P ";( H @      8lp frictionfactor Macro+ Macro recorded 6/10/2008 by Fred Dougherty variablesZZZZZ(Z@ZZ branch loopstart main if loophh 0 '0  set counter 4 '4Z<$Sheet2.Cells(7 + brcount, 4) = widthcounteZ=recalc diameter with dia = (1.3*(width*height)^.625)/(width +< guess widthForms *3" @ . '$Sheet2.Cells(7 + brcount, 4) = widthu =recalc diameter with dia = (1.3*(width*height)^.625)/(width +P d 4  ,6dZ 0c f co8l'0 *3" @ . 'P(x guess initial fct 2-C6? act@ l$ ,6, h$ ,6' X'l X'l B'p 0$ ,6  2 4  ,6t1+ XF8g({Gz?'ll f 4  ,6,6 ?'d  4  ,601 TZ `'4 %6'^Dim diaprime As Single X 4  ,6 brc?  .?  . ?'X1/re 4  %6'B,6  d f  d 'fIf@@ 4 ^ ^'@p 4 4  ,6,6'00 $get cfm,height,width,length,e, Re, D13) =  &H.! @ X'Q!@ X 'B'ZPZZZZZ 4  %6'&,6 4  %6'. 4  %6' & 4  ,6 . 4  ,6  4  ,6@ 0 4  ,6  4  ,6V B 4  ,6 4  %6'  4  ,6    I X' d  I X'` %6' %6'@  4 ,6  4 ,6 Calculate fact and fact1 @ @ XGz@ B ? $: $:'f:nO ^  %6') = Re   'ee0 8 @ ' 0Z8 .F X   'Xg'  ffffff?  '  .F 4  %6'Xgells .F{Gz?'g'allows next step when width = 0 0X '   '=  ^  ,6  ^  ,6 d f '2 'V V 4  ,6 4  %6'Z 4  %6'` 4  %6'd 4 %6't'l'p'r'v'x code a losses ZF ףp= ? V'lg ZF)\(? V'lg ZF{Gz? V'lg ZF? V'lg ZF333333? V'lg ZF{Gz?'lg ZFQ?'lg code b losses `F ףp= ? V'pg `F)\(? V'pg `F{Gz? V'pg `F? V'pg `F333333? V'pg `F{Gz?'pg `FQ?'pg code c losses dF ףp= ? V'rg dF)\(? V'rg dF{Gz? V'rg dF? V'rg dF333333? V'rg dF{Gz?'rg dFQ?'rg code d losses tF ףp= ? V'vg tF)\(? V'vg tF{Gz? V'vg tF? V'vg tF333333? V'vg tF{Gz?'vg tFQ?'vgcalculate dpfix l 4 ,6 p 4 ,6 r 4 ,6 v 4 ,6 l p r v 'x x 4  ,6 ^   %6'  x '  ^   ,6  ^  ,6 4 '4 ^  %6'  ^  ,6   ' V 4 ,6,6'lfixture loss loop: 4  %6'Z 4  %6'` 4  %6'd 4  %6't'p'r'v'x code a losses ZF 'lg ZF 'lg ZF 'lg ZF 'lg ZF 'lg ZF 'lg `F 'pg `F 'pg `F 'pg `F 'pg `F 'pg code b losses `F 'pg `F)\(? V'pg `F{Gz? V'pg `F? V'pg `F333333? V'pg `F{Gz?'pg `F 'pg code c losses dF 'rg dF)\(? V'rg dF{Gz? V'rg dF? V'rg dF333333? V'rg dF{Gz?'rg dF 'rg code d losses tF 'vg tF)\(? V'vg tF{Gz? V'vg tF? V'vg tF333333? V'vg tF{Gz?'vg tF 'vgcalculate dpfix l 4  ,6 p 4  ,6 r 4  ,6 v 4  ,6 l p r v 'x x 4 ,6 ^  %6'  x '  ^  ,6  x '  4 ,6   ^  ,6  ^  %6' @ %6' %6' %6' %6'  %6'  %6' %6' %6' %6'  %6'  %6'  %6' %6' %6' %6' %6' %6' %6' %6'  F V 'g  F V 'g  F V 'g  F V 'g  F V 'g  F V 'g  F V 'g ZF 'lg dF 'rg dF 'rg dF 'rg dF 'rg dF 'rg tF 'vg tF 'vg tF 'vg tF 'vg tF 'vgendloop: GoTo endloop:ha32.m100$B@"clear contents of calculated cells8r32.z100$B@EAttribute VB_Name = "Module1" Sub frictionfacto`r()  l.Descrip`acro recorded 6/10/2008 by Fr"DoughertymWProcDatacInvoke_Funcc \n14>' ' M"variab@les Dim f As Single U 1 D V eE R rhocfm length heightQwid dp dp100if!QcounIn tegerGXbrd 'branch loopN maxAC'clear conts of calculaBtcellRange("a32.m@6").CA C r&z- 3= 1C-A-= Sheet1.CA@(29, 3'start ma in if=Do Until+i= 0J31 +E, 1)`ib'get H,B,@,G,e, R`D"!M$2$14k {LZ2"#N:4#digi7%d<,0 ^ % %B(c* + 0.7) /d:8#If &0 Then 0.01A< 'allows next step wbD 0(1.3 * F# )``0.625d+c25Bp >s3K@%D&%D$V`?/ ((3.1416JD2A4)1 44b= 8.5#* V,^7, 9C+jV6FKY@=!W 3A^,]=:=@4= bX6A R=l]8 VAguess initial f;D L00`GH7f1A_[ @Q_ !EI{$ eCtS* q=pLV109,^ /1`roi##bm0+ 2APdptot %"dFv1-<)<1906:7fixturepp>D5P #v400H0dp01 5PTw2Y13]48].5P;610UM7.1(cs(qdix    Ip``Bw`q#*4P2!Ea c'33%4# 5qw6!6]:77cxoda#c(bPG@EpB6$Yd_Z7 c:! q&dpfixd = 0 p'code a @lossesIf Ta1 Tphen f1U J2J2 J3%3U %4%4 %5%5U %6%677 bb    JFAIFF JFAIFF @F FcFcFFAFF FAFF FAFF FAFF FAFF FAFF FdFFAFF FAFF FAFJ#I#J#I#J#I#@#'calculatepSheet1.Cells(31 + brcount, 23V)IB$a4bU5c6d_BF@bcgX12f H tot max x2, B+,,i %  = ?9)#sysdpe 6<hD 3)b A+ 1'endloop:R%+ DNL allEnd SuT 3b7bHxp8$(MEx"Attribute VB_Name = "Module2" xx e *6 <<LLLLLLL"L"<Y0H$*\Rffff*5748fce4ba*\R1*#b4*\R1*#b8*\R1*#20b*\R1*#b4*\R1*#b4*\R1*#b4*\R1*#b4*\R1*#b4$*\Rffff*1f484ec1ab*\R0*#12*\R1*#15d*\R1*#b4"*\Rffff*d484ed1b60$$`&x`(h`*\x`, X`pP#`.L`0F`2P<`.$H$`,`t`p`l`X0`H`@@d$$`*`h``D``T``` `8Bp@ ` |k 8``4`8 :  @ 8PhH `x@h @ @  @ @ @  @: @ @x @FPt @d @\ @L @B< .008@, @d @ @f8 @ @H @0 `@` @ @ @ 8@x @| ME" 0 0@ p  (08@H0 P HX @H  (`.0.H h6(37h 5x453  "K=*2("H"K (CX(C x 28 ";; :7@9  77 7( 5@ 5X 5p   0)  " ( 8 @  "H 8h bv 8 9  0 8@  ` p $*  88  6J (4   X  DGh8 8p 9 ( h  ;9 0 NhD4@9@  $ pX`8 P ` 29 .8 h p9 variablesZ@ZXZpZZZZZZ branch loop' End IfZh :  %6'F  'e Z8'0   %6'& &F8gZPZ  %6' )Wx?iVy? &$:+ٱ? '*ZPlhget height and diameter  = co  * ,  * ',8 guess width6 &   ,6cfmh * ,  *'a6@hP'  'wi    ,6a)   ,6return duct size startountcfmmax = Sheet2.Cells(7, 3)'9 Sheet2.Cells(15 + sbrcount - rbrcount, 10) = sbrcountmax Do While rbrcount <= sbrcountmax  GoTo endall count = 1h(   %6'(set counter for dp100 loopstart main return if loopcalculate diameter from cfmifloopr:Z6 Sheet2.Cells(15 + sbrcount + rbrcount, 8) = length If count < 30 Then count = count + 1 set counterget height and diameter GoTo ifloopr guess width diff = (dia - dia1) / dia' & ( '&0 *   ,615 +  ' adjust cfmZZ7=======================================================7 height = Sheet2.Cells(15 + sbrcount - rbrcount - 1, 3)  End If6 rbrcount = rbrcount + 1,6 If diff > 0.001 Then'. If rcfm <= 0 Then GoTo endallrbrc7 length = Sheet2.Cells(15 + sbrcount - rbrcount - 1, 8).0 width = width * (1 + (dia - dia1) / dia) 5 Sheet2.Cells(15 + sbrcount + rbrcount, 4) = widthP? 5 Sheet2.Cells(15 + sbrcount + rbrcount, 5) = count @Z set counter )calculates duct diameter as a function of)dp100, then calculates duct width given a duct height.ZZ ,start main supply if loop - iterate on dp100    ,6om c@ %6'@ %6' %6'  ,6 @ ,6   ,6calculate V and Re &H.! @ *'Q!@ * 'Bhstart f loop guess initial fF{Gz?''  ?'d d  ,6 @ @ *Gz@ B ? $: $:'f f   ,6 2   ,6  '   ,6 c 2-C6?  d f  d ' get e, rho, dp100, L d  I *' 0 '0Z   ,6 02 h    ,6 0  ,6 *   ,6 MbP? id( width = (dia * 3.1417 - height * 2) / 2 Calculate fact and fact166 Sheet2.Cells(15 + sbrcount + rbrcount, 3) = heightI dia1 = (1.3 * (width * height) ^ 0.625) /' (width + height) ^ 0.25h *   ,6Z8Z      4new, rbrcount = 0 8Sheet2.Cells(30 + testcount, 12) = count 'killHrecalc diameter with dia = (1.3*(width*height)^.625)/(width +height)^.25calculate dia1 $: $:  $:' -C6? - d * *   * '*1) / *? $: $:  $: '*P %6'.C':B/Sheet2.Cells(30 + testcount, 4) = V 'kill8Sheet2.Cells(30 + testcount, 11) = dp100 'killrcfmmax = Sheet2.Cells(9, 3)0cfmfactor = rcfmmax / cfmmaxa1 6 Sheet2.Cells(15 + sbrcount - rbrcount, 9) = cfmfactor 6 Sheet2.Cells(15 + sbrcount + rbrcount, 7) = rbrcount 8Hrecalc diameter with dia = (1.3*(width*height)^.625)/(width +height)^.25A rcfm = cfmfactor * Sheet2.Cells(15 + sbrcount - rbrcount - 1, 1)1 Sheet2.Cells(15 + sbrcount + rbrcount, 1) = rcfm7 dia = 10 ^ (0.38352 * 0.434294 * Log(rcfm) + 0.00864)0 Sheet2.Cells(15 + sbrcount + rbrcount, 2) = dia1Sheet2.Cells(30 + testcount, 2) = cfm 'kill1Sheet2.Cells(30 + testcount, 3) = dia 'kill   %6'.?  .?  . ?',0set up cfm and rcfmn cfmguess duct diameter from cfm , : ':: %6'@ & 'sh  _= Shee : _ '| : F & F '(`F'(g - set   :  ,6 :   %6'& ` :   %6'. .  :  ,6 ( :   ,6XZhZ digits = 0factor = 10 ^ digits facto+width1 = Int(width * factor + 0.7) / factor^ digi8 .F'g .Fg 'Sheet2.Cells(28 + sbrcount, 4) = width1Z .'    ,6P8   '  ,6  ,6   ,6( %6'   Fg : ':  d f '20c15.g100$B@i15.p100$B@"clear contents of calculated cellsAttribute VB_Name = "Module3" Public Sub newductsize() 'calcul ates . dizter as a funct@ion ofVdp100, then nwidth giva+d height.variab@les Dim cfm As Singlermax1 b&e$ho  1  yleng countIn`tegerUAfŗwdif cs@ff jf`actorA sd. 'branch loop D~Ar2d Do@di0gitsA no(tapASngclear cJoYn ofd cellRange("c15.g").CA C i'set upand AC:I9= Sheet2.C(11, 3oa`.`~19%D&y%aCd- `D:=!/#j7AC 8H 9#retseg 11)#c= 1, !J:Do While x<= ,`. 5 +- / 2, EIfp 6 T \="?-2 Else 0j#16)b$-F2&+> 0CGoTo end@r1@ ` *ۃB2)X-& "g ntM2 g=@F+AAeLBmainHC@ .'start a supply ifb - i gK0›`Kq, 7guesfrob 1001 #widthWa* (1t)Uo=x+ 1GoTo ifloopw End Ifend}: dEc M0'digi tsfactor10 1 Int($* +7{4". 28 EY12?CT{.FXset L\cfm@A- |fm"!A ea ll@ejSub       !"#$%&'()*+,-./01245678:;<?@ADEFGJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~=K(6 << <Y0H$*\Rffff*134884aed0h0$`$$ Dou$8(j`&````(`*`,``.``0`2````X8ME@ H lp D_dp100 Macro+ Macro recorded 7/21/2008 by Fred Dougherty variablesZZZZZZZZZZZZZZ branch loopZZ'start main supply if loop  %6'  '  _    ,6calculate diameter from cfm   %6'& &F8g   %6'( )Wx?iVy? &$:+ٱ? '* set counter'0get height and diameter   %6'. *   ,6 guess width *3" @ . '=recalc diameter with dia = (1.3*(width*height)^.625)/(width + height)^.25<p?  .?  . ?', * ,  *'2 0 '0 0 2MbP?  * ,  * '<hh    ,6 0   ,6  ' & ( '& &   ,67=======================================================start main return if loop'  %6' %6'  '6 Sheet2.Cells(15 + sbrcount - rbrcount, 9) = cfmfactor    ,6  _     ,6 adjust cfmcalculate diameter from cfm      %6' F8g     ,6 )Wx?iVy? $:+ٱ? '* GoTo endall set counter'0get height and diameter     %6'.     %6' *    ,6 .    ,6     ,6 guess width *3" @ . '=recalc diameter with dia = (1.3*(width*height)^.625)/(width + height)^.25?  .?  . ?', * ,  *'2 0 '0 0 2MbP?  * ,  * '8h0h(     ,6 0    ,6  '8l"Attribute VB_Name = "Module4" K)^ Module5XdQ__SRP_0 __SRP_1]_3]__SRP_49xg@__SRP_7acB@__SRP_8C {crU @prU  A i 4  c__SRP_9`hH@__SRP_cIt__SRP_dege__SRP_e@rU @prU~}     Y 1 I) $ .'%:%"$ q5.'%: %"$ q56( %(%"$ Up*53( %( %"$ 7( %( %"$ *sp5npj*sl nlnps05(%(%npj%"$ 4(%(% @"$ 5( %(%nlj%"$ 3( %( %"$  (k*D]I\K((%(%"$ *sx6=(%(%"$ t5(]c\nxjt*shshH((%(%nhjd%"$ 5K((%(%"$ *sL6(]p\r nxn0stCk*D%(%ntj%"$ Ck*D%(%nLj%"$ (p.k.k* 8k.D%(%k.D%"$ ;k.D%(%"$ *sx5 nx ;k.D%(%"$ *sh57nx9 t\ )Wx?iVy?o\+ٱ?s\9k.D%(%n\j%"$ 7(%( %"$ *sd57(%( %"$ *s`57(%( %"$ *sT55(%(%nTj%"$ 5(%(%ndj%"$ 5( %(%n`j%"$ pF)nxH.! @n\ϳ붶kLQ!@n\kL<{Gz?,pD"(,?8k.D%( % @"$ v nd @n\kGz@<,?Δ B9 t\ 9 to\okd5 8k.D%(% @"$ *s<9k.D%(%nnx?϶st9kp>8kD%"$  k>cn@-C6?nxntnpntsx'& nxnTn\nhIϳnlsH& nxdn\nhIϳnlsD;k:D(%( % @"$ nHj(;k:D(%( % @"$ 9kV@e{OתC  B2;8ϡcJƸ=xAv7LZA$j ? !_ _B_var_tediffdia _B_var_diffdp _B_var_dp100a1Hdia2cI` _B_var_dia2l dp100prime~_B_var_dp100primerecalcӬdiameter(endsub: _B_var_endsubHall'twcountifloopwT insertretloopҏsetcountIp_B_var_setcountGrcount-8mainloopfcfmloop_B_var_mainloopU>cfm2 _B_var_cfm2 _B_var_Cell Module5f fixtureloss(A Application* CommandBars VisiblevdpP _B_var_vdpacoda _B_var_coda##brountYcodb _B_var_codb$#codccodecfixaWD _B_var_cfixaDdpfixa1ixadpfixb1dpfixc1codddpfixd1dpfix| _B_var_dpfix@SSheet3v _B_var_brount _B_var_codc%# _B_var_code'# _B_var_dpfixa8 _B_var_dpfixb9 _B_var_dpfixc: _B_var_codd&# _B_var_dpfixd;ItemzdpfixtotV_B_var_dpfixtot(.Sum _B_var_SumȒtot9 brcountmxx_B_var_brcountmx<{RoundUph_B_var_RoundUpvlround _B_var_Rounddigitsfactor _B_var_factorW5width1y _B_var_width1^ _B_var_digitssendloopwRgot _B_var_gotQnotap ductdptot u_B_var_ductdptote~dptot _B_var_dptotsysdp* _B_var_sysdpsysdptot_B_var_sysdptotpfixadp _B_var_fixadpendloop*dpfix11 _B_var_dpfix1(dpfix21dpfix31dpfix41dpfix51dpfix61dpfix71cfix1GD _B_var_cfix14cfix2HDcfix3IDcfix4JDcfix5KDcfix6LDcfix7MD _B_var_dpfix2) _B_var_dpfix3* _B_var_dpfix4+ _B_var_dpfix5, _B_var_dpfix6- _B_var_dpfix7. _B_var_cfix25 _B_var_cfix36 _B_var_cfix47 _B_var_cfix58 _B_var_cfix69 _B_var_cfix7:oacfmA _B_var_oacfmmretsegQ, _B_var_retseg endcfmloopdSheeRange  ClearContents{M#     @414" GC="3D3FCE2FF64DF74DF7B2" [Host Extender Info] &H00000001={3832D640-CF90-11CF-8E43-00A0C911005A};VBE;&H00000000 [Workspace] ThisWorkbook=0, 0, 0, 0, C Sheet1=0, 0, 0, 0, C Sheet2=0, 0, 0, 0, C Module1=39, 12, 716, 257, Module2=0, 0, 655, 241, C Module3=24, 38, 679, 279, Z Module11=0, 0, 0, 0, C Module4=88, 88, 742, 329, C Module5=88, 88, 742, 329, C ThisWorkbookThisWorkbookSheet1Sheet1Sheet2Sheet2Module1Module1Module2Module2Module3Module3Module11Module11Module4Module4Module5Module5Oh+'0 @H ]Excel VBA - Clearing contents of a sheet below a Row - VBA - Forums at ProgrammersHeaven.comwFred DoughertyaFred DoughertyaMicrosoft Excel@՜.+,D՜.+,SummaryInformation(Sq<DocumentSummaryInformation8_1287208469Nt F{U{UOle   PXp x F&D Engineeringj Sheet1Sheet2  Worksheets 6> _PID_GUIDAN{8D929DDC-7475-4F71-AC6B-9EB4AD9F3AB9} FMicrosoft Excel WorksheetBiCompObjsvfObjInfoWorkbookuK_VBA_PROJECT_CUR"{U{Uff8Excel.Sheet.89qb0* pHd VBAProject4@j = r Y0H J< rstdole>stdole h%^*\G{00020430-C 0046}#2.0#0#C:\WINDOWS\system32\STDOLE2.TLB# Autom`ation`MSFor ms>SFFrms/| rG696F10B0-5685-412F-B363-9D4194E2095D5G4.TWD#Microsoft > b Ob Libprary:Q04QFD061C56-4442-49F6-B Ba= ThisWorkbook =xxL;"8X1Arial1Arial1Arial1Arial1Arial1& Courier New"$"#,##0_);\("$"#,##0\)!"$"#,##0_);[Red]\("$"#,##0\)""$"#,##0.00_);\("$"#,##0.00\)'""$"#,##0.00_);[Red]\("$"#,##0.00\)7*2_("$"* #,##0_);_("$"* \(#,##0\);_("$"* "-"_);_(@_).))_(* #,##0_);_(* \(#,##0\);_(* "-"_);_(@_)?,:_("$"* #,##0.00_);_("$"* \(#,##0.00\);_("$"* "-"??_);_(@_)6+1_(* #,##0.00_);_(* \(#,##0.00\);_(* "-"??_);_(@_)0.0 0.0000 0.000 0.00000 0.000000 0.000E+00                + ) , *  " #  D      @   ! "     "T "P  D "    D   @)    D  @ "T "P "T "t  "4 "0   "t ) "4  $ "PA  @A "p A  DA  DA  DA !PA "      XA "XA  ` A  @  Sheet1EcSheet2cfm: iduct dpReynolds Number Re = 8.56*D*Ve=rho=V=Q/((Pi*D^2/4)/144)D=(1.3(a*b)^.625)/(a+b)^.25height awidth bdia D airflow QVRecfminfpmf'Lfan outtee thrudiffuserfan inFixtures Fixture Cel tee branchdp ret grillecodecount /Duct Size and Rectangular/round duct conversion D=alog(.38352*log(cfm) + .00864)diaheightwidthbranchdiff iwgdp = (12*f*L*rho*(V/1097)^2)/Ddp/100'Colbrook(1/f^.5 = -2*log(12*e/3.7/D+2.51/Re/f^.5)Project System-Zonecalculation date system-zone!DUCT SIZE CALCULATION SPREADSHEET Template HP1, zone 1Zone air flow =Zone outdoor air =supply air flow =outdoor air flow =return air flow =sbrcountmax = rcfmoacfmdp100=e =rho = dp100(target) =dp100countf fcountwfact1factsbrcount.Curve fit of dia for dp100=.095 (first guess):clear cell: input data.shaded cell: calculated by macro "newductsize"vdpRun macro "friction factor"Run macro "newductsize"iwgfixdpdiffwsystotdpcodacodbcodccoddiwg/100'fixture libraryduct legft formulas:fixed parameters (user input)brcountmax =IThe macro "newductsize" computes duct diamter for a given cfm based on equal friction, using the delta p per 100' [dp100(target] input on this sheet in cell I9. Therefore the duct diameters and widths shown on sheet two are not rounded to the nearest whole inch. When running the macro "friction factor", the duct diameter and width will be rounded to achievable dimensions before calculating the final duct velocity and friction loss. Segment length, input on sheet 2, is used by the friction factor macro to compute duct dp using the equation above. This macro will also compute fixture loss based on either fixture "C" values from ASHRAE (Idle'chik) or dp input by the user from manufacturers data. The user may input C or dp for up to seven fixtures, and up to four fixture codes may be input for each segment in the cells indicated. TAll data below calculated by macro except fixture codes, which are input by the user%fixture type, C, and dp input by userreturn segments =return segments: -0 means returns correspond to supply segments$>0 means returns are entered by user9If retseg = 0 then set sbrcountmax = supply duct segmentsCIf retseg >0 then set sbrcountmax = supply and return duct segments+see notes regarding return segments setting To run this macro: First input cfm, desired duct height, and segment length on sheet two in the columns indicated. Input the maximum number of supply duct segments "subcountmax" in the indicated cell. If duct height is input as zero, then the macro will assume that the duct segment will be round duct, not rectangular. Run macro "new ductsize" which will calculate both supply duct and return duct diameter and width for each segment input, up to the maximum number of supply duct segments input, with a return duct segment calculated for each supply duct segment. If "return segments" is input greater than zero, the user may instead input return segment cfm and height, and set input "sbrcountmax" equal to the total number of supply and return duct segments to be calculated.fixture C or dpxThis macro will clear the contents of all calculated cells. The fixture loss input cells, N32 - Q100 will not be clearedairflowiw/100'j C  o lv nt r } +_ W+ia5  (N#33$Sw(Н00sT0@Y !S0Sazp0(N(N|f||DS(NS0Tt00(9Pw*!"a@Project? Template ???$ system-zone? HP1, zone 1 ??  Afixture library6 AAA" . B%fixture type, C, and dp input by user6 BBB"   7code CFixtures C Fixture C  7dp0"< formulas:<<<<&<fixed parameters (user input)<<< ~  5? Dfan out~  DR@2 !"Reynolds Number Re = 8.56*D*V e='a2U0*3? ~  5@  Del~  D&@2 !"$D=(1.3(a*b)^.625)/(a+b)^.25 rho='Oe? ~  5@ Dtee thru~  D@2 !"V=Q/((Pi*D^2/4)/144)dp100(target) =~ '"@ ~  5@ D tee branch~  DT@2 !" ~  5@ Dfan in~  D>@2 !" Colbrook1 (1/f^.5 = -2*log(12*e/3.7/D+2.51/Re/f^.5)  Zone air flow = ~ '@ ~ 5@ Ddiffuser D~ !@0 " ' dp = (12*f*L*rho*(V/1097)^2)/D  Zone outdoor air = ~ '@o@ ~ 5@ D ret grille D~ !@0 "L "  @To run this macro: First input cfm, desired duct height, and segment length on sheet two in the columns indicated. Input the maximum number of supply duct segments "subcountmax" in the indicated cell. If duct height is input as zero, then the macro will aH @@@@@@@@@@@@@"L @@@@@@@@@@@@@@"L@@@@@@@@@@@@@@"L@@@@@@@@@@@@@@":@@@@@@@@@@@@@@:@@@@@@@@@@@@@@:@The macro "newductsize" computes duct diamter for a given cfm based on equal friction, using the delta p per 100' [dp100(target] input on this sheet in cell I9. Therefore the duct diameters and widths shown on sheet two are not rounded to the nearest whol6@@@@@@@@@@@@@:@@@@@@@@@@@@@@:@@@@@@@@@@@@@@:@@@@@@@@@@@@@@:@@@@@@@@@@@@@@:@@@@@@@@@@@@@@:@@@@@@@@@@@@@@:&&&&&&&&&&&&&&&&&]$TAll data below calculated by macro except fixture codes, which are input by the user0&&&&&&&&&brcountmax =~ (@$xThis macro will clear the contents of all calculated cells. The fixture loss input cells, N32 - Q100 will not be cleared05duct leg5 airflow Q5height a5width b5dia D 5V 5Re 5L5duct dp 6dp/100'  vdp fixdp systotdp =fixture C or dp >>>count f' #fact#fact1 #diff7 7cfm 7in 7in 7in 7fpm7 7ft 7 iwg 7iwg/100'  0iwg  0iwg  0iwg  2coda 2codb 2codc 2codd 0  3 44111115?8@6(@94@90@8@@83A~ 84@:n? :ɵ? 3<ߵ? +? A{C? ?@@(@`?@@@~ j@"?I2t i}?{kce?~ Dcl PbPPP>>>P>>>>>>>> #T0!#"###$#%#&#'#(#)#*#+#PG,#-#.#/#0#1#2#SG3#4#5#T6#SG7#8#PwPG9#PG:#SwT;#<#=#>#T0?# 5@8@6(@90@ 9z7.@ 8`@ 8 @8.@ :? :]? n%?~  ?~ @    ~ (@ `!? [@  ![@$  !5@8Ȏ@6$@91@!9@hB,@!8D@!8@~ !86@!:ْ?! :@k?! 4hW?~ ! ! ْ?! @@ ! !~ !&@!`Kr?!@!@$!@"5@8@6$@9$@"9%@"8@"8`@~ "8 @":d?" :আ?"  t?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r#SGs#t#u#Tv#SGw#x#PwPGy#PGz#SwT{#|#}#~#T0#` a b c d e f g h i j k l m n o p q r s t u v w x y z { | } ~ D`l #T0#####      d>@  J       Sheet1   dMbP?_*+%M:KODAK ESP 5 AiO\C odXXLetterDINU"4( (KOSD d4ArialCurrent PreferencetEXCEL.EXE"dXX??U} $ } $ } $  dp100aXdT0     PGSGTSGPwPGPGSwTProject$ System-Zone clear cell: input datacalculation date 7.shaded cell: calculated by macro "newductsize"8/Duct Size and Rectangular/round duct conversion $Run macro "newductsize"supply air flow =~ "@ cfmdp100== ?return segments:  6 -0 means returns correspond to supply segments outdoor air flow =~ "@o@oacfm e =@*3?  - $>0 means returns are entered by user return air flow =~ "@ rcfmrho = e?B9If retseg = 0 then set sbrcountmax = supply duct segments  L CIf retseg >0 then set sbrcountmax = supply and return duct segments  sbrcountmax =  ~ @4 +see notes regarding return segments setting  return segments = ~  $ D=(1.3(a*b)^.625)/(a+b)^.25 7 .Curve fit of dia for dp100=.095 (first guess): )  D=alog(.38352*log(cfm) + .00864)  airflow  height dia  width !dp100 branch !sbrcount L  f count countf countw fact fact1 diff diffw .cfm /in 0in /in 0iw/100' 0cfm 0 0ft 11111111)@*(@`10@3@%)Z?`x@)4@ e<\? >@(@&@  M@  ַ@B?)@*(@-@ %/@%A?i@?).@+T? >@(@"@  2 _@ _@X yI?)Ȏ@*$@`+@As0@%k? |@@)6@gLئk? >@&@&@  CF=( @ e @KC?)@*$@%&@K|$@%Pq?b@@) @]T? =@$@@  .d~@ _k@]?@pK?)x@*$@`0#@` @%ZK?r@@)(@~Nٕ? <@&@ @  Ӻ-a@ $a@?`#C)@U@*`N@~ %ب?@)4@? 6@*@ @  l؂@ z7n@O?)Q@~ )@"@~ %*>?@)4@뾫į? 4@*@ @  _@ l^@ F?)8>t@~ )$@`Z"@Ao@%/3?@)(@2(Y? <@(@ @  J](@ @y?eG) E!|@~ )$@@$@M"@%.:9? @) @ :T4j? =@&@@  ;q@ @qZ?yF)4@~ )$@`*@@ˮ,@%h|?"@)6@{fՓ? =@&@$@  p'@ @:* ΝE?)='@~ )(@@S+@@E+@%b?$@).@tLbid? >@&@ @  )@ k6*@`ق e4D?)@)(@ /@0@%~k?&@)4@Q? >@(@$@  V{|Q@ =da@`! wD?%~ (@&+%&+,-,,,,,&(%&(%&(%@%D<k@**** T0!"#$%&'()*+PG,-./012SG345T6SG78PwPG9PG:SwT;<=>T0?$ (%$!(%$"(%$#(%$$(%$%(%$&(%$'(%$((%$)(%$*($+$,$-$.$/"0"1"2"3"4"5"6"7"8"9":";"<"=">"?D`l((((((((((((((((&&&&&&&&&&&&&&&@T0ABCDEFGHIJKPGLMNOPQRSGSTUTVSGWXPwPGYPGZSwT[\]^T0_"@"A"B"C"D"E"F"G"H"I"J"K"L"M"N"O"P"Q"R"S"T"U"V"W"X"Y"Z"["\"]"^"_D@l&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&`T0abc"`"a"b"c <&&&>@ Sheet2 VBA{U{UdirfSheet1y{Sheet20AE-B7A3875B0QDOCUME~1\User\L OCALS@Temp\VBE\E,EXg,.E .`M }OffDic}Of@iTc}/02DF8D04C-5BFA-101@B-BDE5}AjA|420gram File,s\U\MSO97.DLL^ 8.0R^ ThisWork bookN2@1Ti@W‘kbokHB1-C@,B8*"B+BSheet12S@e@Pt1PMTj2 2 2bޫ kodule5cm2dmoJu50 g!#' #/ 1$(3/ \`5 @$' /`$g$p0iU5 3$3o3$R*o+ `&MB/1$2a) Td#11rI" U0%444/ =K) !      !"$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abdefghijklmnopqrstuvwxyz{|}~<ZF@K"@ F4#) $NAx8#4#) $NAZF@K"@4(SLSS6"N0{00020820-0000-0000-C000-000000000046}Y0H$*\Rffff*1f484ec1ab($H` !1 $ $ $0h@0MExAttribute VB_Name = "She@et1" Bast0{00020820- C$0046} |CreatablFalse PredeclaIdTru "ExposeTemplate`Deriv$eCustomizd<1& _OYݕ FpϑKVzTx6#pϑKVzT1& _OYݕ4(SLSS6"N0{00020820-0000-0000-C000-000000000046}Y0H"*\Rffff*d484ed1b6($H0hs $ $ $p@8MExAttribute VB_Name = "She@et2" Bast0{00020820- C$0046} |CreatablFalse PredeclaIdTru "ExposeTemplate`Deriv$eCustomizdxModule1z~;Module2*Module3}D3Module4#    ( !"#$%&')*+,-./<C23456789:O=>?@ABDEFNGHIJKLMP`QRSTaVWXYZ[\]^_vbtdefghijklmnopqrsuwyx|}~xh \` (3 @6 "$`2@`4<`x(`^:`dt`fp("`&X"`T`.PP`L`H`D`h`\`8: Hh@( X`x 0xxPPX`h@ @ @ @ @ @( @ @ X`hp@V@ @  @ @ @t @d @(T @D 8@@4 @$ @ @ @@ @ @8 @Z @`@ @dX `@tp @l @pt @rd @vT @xHD @@4 @@$ @@ @@ @@( @88hME"   28 P (..6  8 *;;; 8  "@ ;D D4,Gh ,$ 0$(X779909P9999 8 (X " H9bX0 9( X 9 8x P$h6& 6&X";  ";( 999h X  p 833303H3`3x3333333 38"P"p"""""777(7H  h p x  8 0H`x Ph ( 88888%X8x":";": 8":P ";( H @      8lp frictionfactor Macro+ Macro recorded 6/10/2008 by Fred Dougherty variablesZZZZZ(Z@ZZ branch loopstart main if loophh 0 '0  set counter 4 '4Z<$Sheet2.Cells(7 + brcount, 4) = widthcounteZ=recalc diameter with dia = (1.3*(width*height)^.625)/(width +< guess widthForms *3" @ . '$Sheet2.Cells(7 + brcount, 4) = widthu =recalc diameter with dia = (1.3*(width*height)^.625)/(width +P d 4  ,6dZ 0c f co8l'0 *3" @ . 'P(x guess initial fct 2-C6? act@ l$ ,6, h$ ,6' X'l X'l B'p 0$ ,6  2 4  ,6t1+ XF8g({Gz?'ll f 4  ,6,6 ?'d  4  ,601 TZ `'4 %6'^Dim diaprime As Single X 4  ,6 brc?  .?  . ?'X1/re 4  %6'B,6  d f  d 'fIf@@ 4 ^ ^'@p 4 4  ,6,6'00 $get cfm,height,width,length,e, Re, D13) =  &H.! @ X'Q!@ X 'B'ZPZZZZZ 4  %6'&,6 4  %6'. 4  %6' & 4  ,6 . 4  ,6  4  ,6@ 0 4  ,6  4  ,6V B 4  ,6 4  %6'  4  ,6    I X' d  I X'` %6' %6'@  4 ,6  4 ,6 Calculate fact and fact1 @ @ XGz@ B ? $: $:'f:nO ^  %6') = Re   'ee0 8 @ ' 0Z8 .F X   'Xg'  ffffff?  '  .F 4  %6'Xgells .F{Gz?'g'allows next step when width = 0 0X '   '=  ^  ,6  ^  ,6 d f '2 'V V 4  ,6 4  %6'Z 4  %6'` 4  %6'd 4 %6't'l'p'r'v'x code a losses ZF ףp= ? V'lg ZF)\(? V'lg ZF{Gz? V'lg ZF? V'lg ZF333333? V'lg ZF{Gz?'lg ZFQ?'lg code b losses `F ףp= ? V'pg `F)\(? V'pg `F{Gz? V'pg `F? V'pg `F333333? V'pg `F{Gz?'pg `FQ?'pg code c losses dF ףp= ? V'rg dF)\(? V'rg dF{Gz? V'rg dF? V'rg dF333333? V'rg dF{Gz?'rg dFQ?'rg code d losses tF ףp= ? V'vg tF)\(? V'vg tF{Gz? V'vg tF? V'vg tF333333? V'vg tF{Gz?'vg tFQ?'vgcalculate dpfix l 4 ,6 p 4 ,6 r 4 ,6 v 4 ,6 l p r v 'x x 4  ,6 ^   %6'  x '  ^   ,6  ^  ,6 4 '4 ^  %6'  ^  ,6   ' V 4 ,6,6'lfixture loss loop: 4  %6'Z 4  %6'` 4  %6'd 4  %6't'p'r'v'x code a losses ZF 'lg ZF 'lg ZF 'lg ZF 'lg ZF 'lg ZF 'lg `F 'pg `F 'pg `F 'pg `F 'pg `F 'pg code b losses `F 'pg `F)\(? V'pg `F{Gz? V'pg `F? V'pg `F333333? V'pg `F{Gz?'pg `F 'pg code c losses dF 'rg dF)\(? V'rg dF{Gz? V'rg dF? V'rg dF333333? V'rg dF{Gz?'rg dF 'rg code d losses tF 'vg tF)\(? V'vg tF{Gz? V'vg tF? V'vg tF333333? V'vg tF{Gz?'vg tF 'vgcalculate dpfix l 4  ,6 p 4  ,6 r 4  ,6 v 4  ,6 l p r v 'x x 4 ,6 ^  %6'  x '  ^  ,6  x '  4 ,6   ^  ,6  ^  %6' @ %6' %6' %6' %6'  %6'  %6' %6' %6' %6'  %6'  %6'  %6' %6' %6' %6' %6' %6' %6' %6'  F V 'g  F V 'g  F V 'g  F V 'g  F V 'g  F V 'g  F V 'g ZF 'lg dF 'rg dF 'rg dF 'rg dF 'rg dF 'rg tF 'vg tF 'vg tF 'vg tF 'vg tF 'vgendloop: GoTo endloop:ha32.m100$B@"clear contents of calculated cells8r32.z100$B@EAttribute VB_Name = "Module1" Sub frictionfacto`r()  l.Descrip`acro recorded 6/10/2008 by Fr"DoughertymWProcDatacInvoke_Funcc \n14>' ' M"variab@les Dim f As Single U 1 D V eE R rhocfm length heightQwid dp dp100if!QcounIn tegerGXbrd 'branch loopN maxAC'clear conts of calculaBtcellRange("a32.m@6").CA C r&z- 3= 1C-A-= Sheet1.CA@(29, 3'start ma in if=Do Until+i= 0J31 +E, 1)`ib'get H,B,@,G,e, R`D"!M$2$14k {LZ2"#N:4#digi7%d<,0 ^ % %B(c* + 0.7) /d:8#If &0 Then 0.01A< 'allows next step wbD 0(1.3 * F# )``0.625d+c25Bp >s3K@%D&%D$V`?/ ((3.1416JD2A4)1 44b= 8.5#* V,^7, 9C+jV6FKY@=!W 3A^,]=:=@4= bX6A R=l]8 VAguess initial f;D L00`GH7f1A_[ @Q_ !EI{$ eCtS* q=pLV109,^ /1`roi##bm0+ 2APdptot %"dFv1-<)<1906:7fixturepp>D5P #v400H0dp01 5PTw2Y13]48].5P;610UM7.1(cs(qdix    Ip``Bw`q#*4P2!Ea c'33%4# 5qw6!6]:77cxoda#c(bPG@EpB6$Yd_Z7 c:! q&dpfixd = 0 p'code a @lossesIf Ta1 Tphen f1U J2J2 J3%3U %4%4 %5%5U %6%677 bb    JFAIFF JFAIFF @F FcFcFFAFF FAFF FAFF FAFF FAFF FAFF FdFFAFF FAFF FAFJ#I#J#I#J#I#@#'calculatepSheet1.Cells(31 + brcount, 23V)IB$a4bU5c6d_BF@bcgX12f H tot max x2, B+,,i %  = ?9)#sysdpe 6<hD 3)b A+ 1'endloop:R%+ DNL allEnd SuT i(6 << <Y0H"*\Rffff*a487a3b7bHxp8$(MEx"Attribute VB_Name = "Module2" x=Kx e *6 <<LLLLLLL"L"<Y0H$*\Rffff*5748fce4ba*\R1*#b4*\R1*#b8*\R1*#20b*\R1*#b4*\R1*#b4*\R1*#b4*\R1*#b4*\R1*#b4$*\Rffff*1f484ec1ab*\R0*#12*\R1*#15d*\R1*#b4"*\Rffff*d484ed1b60$$`&x`(h`*\x`, X`pP#`.L`0F`2P<`.$H$`,`t`p`l`X0`H`@@d$$`*`h``D``T``` `8Bp@ ` |k 8``4`8 :  @ 8PhH `x@h @ @  @ @ @  @: @ @x @FPt @d @\ @L @B< .008@, @d @ @f8 @ @H @0 `@` @ @ @ 8@x @| ME" 0 0@ p  (08@H0 P HX @H  (`.0.H h6(37h 5x453  "K=*2("H"K (CX(C x 28 ";; :7@9  77 7( 5@ 5X 5p   0)  " ( 8 @  "H 8h bv 8 9  0 8@  ` p $*  88  6J (4   X  DGh8 8p 9 ( h  ;9 0 NhD4@9@  $ pX`8 P ` 29 .8 h p9 variablesZ@ZXZpZZZZZZ branch loop' End IfZh :  %6'F  'e Z8'0   %6'& &F8gZPZ  %6' )Wx?iVy? &$:+ٱ? '*ZPlhget height and diameter  = co  * ,  * ',8 guess width6 &   ,6cfmh * ,  *'a6@hP'  'wi    ,6a)   ,6return duct size startountcfmmax = Sheet2.Cells(7, 3)'9 Sheet2.Cells(15 + sbrcount - rbrcount, 10) = sbrcountmax Do While rbrcount <= sbrcountmax  GoTo endall count = 1h(   %6'(set counter for dp100 loopstart main return if loopcalculate diameter from cfmifloopr:Z6 Sheet2.Cells(15 + sbrcount + rbrcount, 8) = length If count < 30 Then count = count + 1 set counterget height and diameter GoTo ifloopr guess width diff = (dia - dia1) / dia' & ( '&0 *   ,615 +  ' adjust cfmZZ7=======================================================7 height = Sheet2.Cells(15 + sbrcount - rbrcount - 1, 3)  End If6 rbrcount = rbrcount + 1,6 If diff > 0.001 Then'. If rcfm <= 0 Then GoTo endallrbrc7 length = Sheet2.Cells(15 + sbrcount - rbrcount - 1, 8).0 width = width * (1 + (dia - dia1) / dia) 5 Sheet2.Cells(15 + sbrcount + rbrcount, 4) = widthP? 5 Sheet2.Cells(15 + sbrcount + rbrcount, 5) = count @Z set counter )calculates duct diameter as a function of)dp100, then calculates duct width given a duct height.ZZ ,start main supply if loop - iterate on dp100    ,6om c@ %6'@ %6' %6'  ,6 @ ,6   ,6calculate V and Re &H.! @ *'Q!@ * 'Bhstart f loop guess initial fF{Gz?''  ?'d d  ,6 @ @ *Gz@ B ? $: $:'f f   ,6 2   ,6  '   ,6 c 2-C6?  d f  d ' get e, rho, dp100, L d  I *' 0 '0Z   ,6 02 h    ,6 0  ,6 *   ,6 MbP? id( width = (dia * 3.1417 - height * 2) / 2 Calculate fact and fact166 Sheet2.Cells(15 + sbrcount + rbrcount, 3) = heightI dia1 = (1.3 * (width * height) ^ 0.625) /' (width + height) ^ 0.25h *   ,6Z8Z      4new, rbrcount = 0 8Sheet2.Cells(30 + testcount, 12) = count 'killHrecalc diameter with dia = (1.3*(width*height)^.625)/(width +height)^.25calculate dia1 $: $:  $:' -C6? - d * *   * '*1) / *? $: $:  $: '*P %6'.C':B/Sheet2.Cells(30 + testcount, 4) = V 'kill8Sheet2.Cells(30 + testcount, 11) = dp100 'killrcfmmax = Sheet2.Cells(9, 3)0cfmfactor = rcfmmax / cfmmaxa1 6 Sheet2.Cells(15 + sbrcount - rbrcount, 9) = cfmfactor 6 Sheet2.Cells(15 + sbrcount + rbrcount, 7) = rbrcount 8Hrecalc diameter with dia = (1.3*(width*height)^.625)/(width +height)^.25A rcfm = cfmfactor * Sheet2.Cells(15 + sbrcount - rbrcount - 1, 1)1 Sheet2.Cells(15 + sbrcount + rbrcount, 1) = rcfm7 dia = 10 ^ (0.38352 * 0.434294 * Log(rcfm) + 0.00864)0 Sheet2.Cells(15 + sbrcount + rbrcount, 2) = dia1Sheet2.Cells(30 + testcount, 2) = cfm 'kill1Sheet2.Cells(30 + testcount, 3) = dia 'kill   %6'.?  .?  . ?',0set up cfm and rcfmn cfmguess duct diameter from cfm , : ':: %6'@ & 'sh  _= Shee : _ '| : F & F '(`F'(g - set   :  ,6 :   %6'& ` :   %6'. .  :  ,6 ( :   ,6XZhZ digits = 0factor = 10 ^ digits facto+width1 = Int(width * factor + 0.7) / factor^ digi8 .F'g .Fg 'Sheet2.Cells(28 + sbrcount, 4) = width1Z .'    ,6P8   '  ,6  ,6   ,6( %6'   Fg : ':  d f '20c15.g100$B@i15.p100$B@"clear contents of calculated cellsAttribute VB_Name = "Module3" Public Sub newductsize() 'calcul ates . dizter as a funct@ion ofVdp100, then nwidth giva+d height.variab@les Dim cfm As Singlermax1 b&e$ho  1  yleng countIn`tegerUAfŗwdif cs@ff jf`actorA sd. 'branch loop D~Ar2d Do@di0gitsA no(tapASngclear cJoYn ofd cellRange("c15.g").CA C i'set upand AC:I9= Sheet2.C(11, 3oa`.`~19%D&y%aCd- `D:=!/#j7AC 8H 9#retseg 11)#c= 1, !J:Do While x<= ,`. 5 +- / 2, EIfp 6 T \="?-2 Else 0j#16)b$-F2&+> 0CGoTo end@r1@ ` *ۃB2)X-& "g ntM2 g=@F+AAeLBmainHC@ .'start a supply ifb - i gK0›`Kq, 7guesfrob 1001 #widthWa* (1t)Uo=x+ 1GoTo ifloopw End Ifend}: dEc M0'digi tsfactor10 1 Int($* +7{4". 28 EY12?CT{.FXset L\cfm@A- |fm"!A ea ll@ejSub (6 << <Y0H$*\Rffff*134884aed0h0$`$$ Dou$8(j`&````(`*`,``.``0`2````X8ME@ H lp D_dp100 Macro+ Macro recorded 7/21/2008 by Fred Dougherty variablesZZZZZZZZZZZZZZ branch loopZZ'start main supply if loop  %6'  '  _    ,6calculate diameter from cfm   %6'& &F8g   %6'( )Wx?iVy? &$:+ٱ? '* set counter'0get height and diameter   %6'. *   ,6 guess width *3" @ . '=recalc diameter with dia = (1.3*(width*height)^.625)/(width + height)^.25<p?  .?  . ?', * ,  *'2 0 '0 0 2MbP?  * ,  * '<hh    ,6 0   ,6  ' & ( '& &   ,67=======================================================start main return if loop'  %6' %6'  '6 Sheet2.Cells(15 + sbrcount - rbrcount, 9) = cfmfactor    ,6  _     ,6 adjust cfmcalculate diameter from cfm      %6' F8g     ,6 )Wx?iVy? $:+ٱ? '* GoTo endall set counter'0get height and diameter     %6'.     %6' *    ,6 .    ,6     ,6 guess width *3" @ . '=recalc diameter with dia = (1.3*(width*height)^.625)/(width + height)^.25?  .?  . ?', * ,  *'2 0 '0 0 2MbP?  * ,  * '8h0h(     ,6 0    ,6  '8l"Attribute VB_Name = "Module4" K)^ rU~~~~~~~~~~~~~~~~~~~~~~~~~~~~~Module5|1__SRP_0c __SRP_1]__SRP_4xg@nx?϶st9kp>8kD%"$  k>cn@-C6?nxntnpntsx'& nxnTn\nhIϳnlsH& nxdn\nhIϳnlsD;k:D(%( % @"$ nHj(;k:D(%( % @"$ 9kV@e{OתC  B2;8ϡcJƸ=xAv7LZA$j ? !_ _B_var_tediffdia _B_var_diffdp _B_var_dp100a1Hdia2cI` _B_var_dia2l dp100prime~_B_var_dp100primerecalcӬdiameter(endsub: _B_var_endsubHall'twcountifloopwT insertretloopҏsetcountIp_B_var_setcountGrcount-8mainloopfcfmloop_B_var_mainloopU>cfm2 _B_var_cfm2 _B_var_Cell Module5f fixtureloss(A Application* CommandBars VisiblevdpP _B_var_vdpacoda _B_var_coda##brountYcodb _B_var_codb$#codccodecfixaWD _B_var_cfixaDdpfixa1ixadpfixb1dpfixc1codddpfixd1dpfix| _B_var_dpfix@SSheet3v _B_var_brount _B_var_codc%# _B_var_code'# _B_var_dpfixa8 _B_var_dpfixb9 _B_var_dpfixc: _B_var_codd&# _B_var_dpfixd;ItemzdpfixtotV_B_var_dpfixtot(.Sum _B_var_SumȒtot9 brcountmxx_B_var_brcountmx<{RoundUph_B_var_RoundUpvlround _B_var_Rounddigitsfactor _B_var_factorW5width1y _B_var_width1^ _B_var_digitssendloopwRgot _B_var_gotQnotap ductdptot u_B_var_ductdptote~dptot _B_var_dptotsysdp* _B_var_sysdpsysdptot_B_var_sysdptotpfixadp _B_var_fixadpendloop*dpfix11 _B_var_dpfix1(dpfix21dpfix31dpfix41dpfix51dpfix61dpfix71cfix1GD _B_var_cfix14cfix2HDcfix3IDcfix4JDcfix5KDcfix6LDcfix7MD _B_var_dpfix2) _B_var_dpfix3* _B_var_dpfix4+ _B_var_dpfix5, _B_var_dpfix6- _B_var_dpfix7. _B_var_cfix25 _B_var_cfix36 _B_var_cfix47 _B_var_cfix58 _B_var_cfix69 _B_var_cfix7:oacfmA _B_var_oacfmmretsegQ, _B_var_retseg endcfmloopdSheeRange  ClearContents{M#     @ID="{9FA233D8-BF91-47B3-938F-A252E28CAD51}" Document=ThisWorkbook/&H00000000 Document=Sheet1/&H00000000 Document=Sheet2/&H00000000 Module=Module1 Module=Module2 Module=Module3 Module=Module11 Module=Module4 Module=Module5 Name="VBAProject" HelpContextID="0" CMG="3C3ECF5353B157B157B157B157" DPB="9E9C6DEDAD2D0E2E0E2E0E" GC="0002F3F4F4F4F40B" [Host Extender Info] &H00000001={3832D640-CF90-11CF-8E43-00A0C911005A};VBE;&H00000000 [Workspace] ThisWorkbook=0, 0, 0, 0, C Sheet1=0, 0, 0, 0, C Sheet2=0, 0, 0, 0, C Module1=39, 12, 716, 257, Module2=0, 0, 655, 241, C Module3=24, 38, 679, 279, Z Module11=0, 0, 0, 0, C Module4=88, 88, 742, 329, C Module5=88, 88, 742, 329, C ThisWorkbookThisWorkbookSheet1Sheet1Sheet2Sheet2Module1Module1Module2Module2Module3Module3Module11Module11Module4Module4Module5Module5Oh+'0 @SummaryInformation(w/<DocumentSummaryInformation84_1287212836 F{U{UOle ;H ]Excel VBA - Clearing contents of a sheet below a Row - VBA - Forums at ProgrammersHeaven.comwFred DoughertyaFred DoughertyaMicrosoft Excel@՜.+,D՜.+,  PXp x F&D Engineeringj Sheet1Sheet2  Worksheets 6> _PID_GUIDAN{8D929DDC-7475-4F71-AC6B-9EB4AD9F3AB9} FMicrosoft Excel WorksheetBiff8Excel.Sheet.89qb0* pHd VBAProject4@j = CompObj<fObjInfo>Workbook{ґ_VBA_PROJECT_CUR"{U{U  Ba= ThisWorkbook,=xxL;"8X1Arial1Arial1Arial1Arial1Arial1& Courier New"$"#,##0_);\("$"#,##0\)!"$"#,##0_);[Red]\("$"#,##0\)""$"#,##0.00_);\("$"#,##0.00\)'""$"#,##0.00_);[Red]\("$"#,##0.00\)7*2_("$"* #,##0_);_("$"* \(#,##0\);_("$"* "-"_);_(@_).))_(* #,##0_);_(* \(#,##0\);_(* "-"_);_(@_)?,:_("$"* #,##0.00_);_("$"* \(#,##0.00\);_("$"* "-"??_);_(@_)6+1_(* #,##0.00_);_(* \(#,##0.00\);_(* "-"??_);_(@_)0.0 0.0000 0.000 0.00000 0.000000 0.000E+00                + ) , *  " # !  D      @   ! "     "T "P  D    D   @) "P)    D  @ "T "P "T "t  "4 "0   "     "pA  `A tA pA "tA "tA "p A "t A  d A  ` A  DA  DA  DA  @A Sheet1dSheet2cfm: kduct dpReynolds Number Re = 8.56*D*Ve=rho=V=Q/((Pi*D^2/4)/144)D=(1.3(a*b)^.625)/(a+b)^.25height awidth bdia D airflow QVRecfminfpmf'Lfan outtee thrudiffuserfan inFixtures Fixture Cel tee branchdp ret grillecodecount /Duct Size and Rectangular/round duct conversion D=alog(.38352*log(cfm) + .00864)diaheightwidthbranchdiffdp = (12*f*L*rho*(V/1097)^2)/Ddp/100'Colbrook(1/f^.5 = -2*log(12*e/3.7/D+2.51/Re/f^.5)Project System-Zonecalculation date system-zone!DUCT SIZE CALCULATION SPREADSHEET Template HP1, zone 1Zone air flow =Zone outdoor air =supply air flow =outdoor air flow =return air flow =sbrcountmax = rcfmoacfmdp100=e =rho = dp100(target) =dp100countf fcountwfact1factsbrcount.Curve fit of dia for dp100=.095 (first guess):clear cell: input data.shaded cell: calculated by macro "newductsize"vdpRun macro "friction factor"Run macro "newductsize"fixdpdiffwsystotdpcodacodbcodccoddfixture libraryduct legft formulas:fixed parameters (user input)brcountmax =IThe macro "newductsize" computes duct diamter for a given cfm based on equal friction, using the delta p per 100' [dp100(target] input on this sheet in cell I9. Therefore the duct diameters and widths shown on sheet two are not rounded to the nearest whole inch. When running the macro "friction factor", the duct diameter and width will be rounded to achievable dimensions before calculating the final duct velocity and friction loss. Segment length, input on sheet 2, is used by the friction factor macro to compute duct dp using the equation above. This macro will also compute fixture loss based on either fixture "C" values from ASHRAE (Idle'chik) or dp input by the user from manufacturers data. The user may input C or dp for up to seven fixtures, and up to four fixture codes may be input for each segment in the cells indicated. TAll data below calculated by macro except fixture codes, which are input by the user%fixture type, C, and dp input by userreturn segments =return segments: -0 means returns correspond to supply segments$>0 means returns are entered by user9If retseg = 0 then set sbrcountmax = supply duct segmentsCIf retseg >0 then set sbrcountmax = supply and return duct segments+see notes regarding return segments setting To run this macro: First input cfm, desired duct height, and segment length on sheet two in the columns indicated. Input the maximum number of supply duct segments "subcountmax" in the indicated cell. If duct height is input as zero, then the macro will assume that the duct segment will be round duct, not rectangular. Run macro "new ductsize" which will calculate both supply duct and return duct diameter and width for each segment input, up to the maximum number of supply duct segments input, with a return duct segment calculated for each supply duct segment. If "return segments" is input greater than zero, the user may instead input return segment cfm and height, and set input "sbrcountmax" equal to the total number of supply and return duct segments to be calculated.fixture C or dpxThis macro will clear the contents of all calculated cells. The fixture loss input cells, N32 - Q100 will not be clearedairflowiw/100'dpfixadpfixbdpfixcdpfixdiwj Œ  o lv nt r : ^ Vjb#5  V2N33$Sw(Н00sT0Q ||||d|e|| azp0N2NN2NhS|i| 2|h2NS0Tt00(9Pw*!"a@Project5 Template 555$ system-zone5 HP1, zone 1 55  4fixture library6 444" . 3%fixture type, C, and dp input by user6 333"   1code 2Fixtures 2 Fixture C  1dp0"3 formulas:3333&3fixed parameters (user input)333 ~  ? 'fan out~  'R@2 ("Reynolds Number Re = 8.56*D*V e='a2U0*3? ~  @  'el~  '&@2 ("$D=(1.3(a*b)^.625)/(a+b)^.25 rho='Oe? ~  @ 'tee thru~  '@2 ("V=Q/((Pi*D^2/4)/144)dp100(target) =~ '"@ ~  @ ' tee branch~  'T@2 (" ~  @ 'fan in~  '>@2 (" Colbrook1 (1/f^.5 = -2*log(12*e/3.7/D+2.51/Re/f^.5)  Zone air flow = ~ '@ ~ @ 'diffuser '~ (@0 " ' dp = (12*f*L*rho*(V/1097)^2)/D  Zone outdoor air = ~ '@o@ ~ @ ' ret grille '~ (@0 "L "  6To run this macro: First input cfm, desired duct height, and segment length on sheet two in the columns indicated. Input the maximum number of supply duct segments "subcountmax" in the indicated cell. If duct height is input as zero, then the macro will aH 6666666666666"L 66666666666666  "L66666666666666  "L66666666666666  ":66666666666666  :66666666666666  :   6The macro "newductsize" computes duct diamter for a given cfm based on equal friction, using the delta p per 100' [dp100(target] input on this sheet in cell I9. Therefore the duct diameters and widths shown on sheet two are not rounded to the nearest whol66666666666666 :66666666666666 :66666666666666 :66666666666666  :66666666666666  :66666666666666  :66666666666666  :&&&&&&&&&&&&&& &&&]$TAll data below calculated by macro except fixture codes, which are input by the user0&&&&&&&&& brcountmax =~ (@$xThis macro will clear the contents of all calculated cells. The fixture loss input cells, N32 - Q100 will not be cleared0  duct leg airflow Qheight awidth bdia D V Re L7duct dp 8dp/100'  7vdp 7fixdp 7systotdp 9fixture C or dp :::;count 7f' <fact<fact1 <diff7dpfixa7dpfixb7dpfixc7dpfixd cfm in in in fpm ft =iw =iw/100'  =iw  =iw  =iw  /coda /codb /codc /codd =  > ??@ =iw =iw =iw =iw?@(@4@0@@@3A~ 4@An? Aɵ? A#? A`K? A˥<~$? B?B@B@BA(@C`?C@@C@~ DC _x?CX}?CAe?~ CDl PbPPP>>>P>>>>>>>l #T0!#"###$##%#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(@,@)+Q,@)`7~@) @~ ).@)A@?) A?) Aq58 ?) A*KEa?) AV?~ ) B@ )BBB~ )A&@)Ci?)C @)C @~ )D)C*KEa?)CCC*(@@(@1@*/@*@`@*QA~ *4@*Ad{?* A=?* A6BZ ]?* ACoIt?* A?* B@B@B@*B*A(@Cd?*C@*C@~ *D *Cۢ?*C$Td?*C~|?~ *C:+AAAAABBBBACCCDCCCC,,A? , AA , A"9?, A"9{x? , BBBBACCCDCCCC:-  :.  :/  :0  :1  :2  :3  :4  :5  :6  :7  :8 :9 :: :; :< := :> :? DlTpp^lrrrr>>>>>>>>>>>>>>>>>>>@#T0A#B#C#D##E#F#G#H#I#J#K#PGL#M#N#O#P#Q#R#SGS#T#U#TV#SGW#X#PwPGY#PGZ#SwT[#\#]#^#T0_#:@ :A :B :C :D :E :F :G :H :I :J :K :L:M:N:O4P4Q4R4S4T4U4V4W4X4Y4Z4[4\4]4^4_D l>>>>>>>>>>>>>>>>888888888888888`#T0a#b#c#d##e#f#g#h#i#j#k#PGl#m#n#o#p#q#r#SGs#t#u#Tv#SGw#x#PwPGy#PGz#SwT{#|#}#~#T0#` a b c d e f g h i j k l m n o p q r s t u v w x y z { | } ~ D`l #T0######      d>@,,J       Sheet1   dMbP?_*+%M:KODAK ESP 5 AiO\C odXXLetterDINU"4( (KOSD d4ArialCurrent PreferencetEXCEL.EXE"dXX??U} $ } $ } $  dp100aXdT0#     PGSGTSGPwPGPGSwTProject$ System-Zone clear cell: input datacalculation date 7.shaded cell: calculated by macro "newductsize"8/Duct Size and Rectangular/round duct conversion $Run macro "newductsize"supply air flow =~ #@ cfmdp100== ?return segments:  6 -0 means returns correspond to supply segments outdoor air flow =~ #@o@oacfm e =@*3?  - $>0 means returns are entered by user return air flow =~ #@ rcfmrho = e?B9If retseg = 0 then set sbrcountmax = supply duct segments  L CIf retseg >0 then set sbrcountmax = supply and return duct segments  sbrcountmax =  ~ @4 +see notes regarding return segments setting  return segments = ~  $ D=(1.3(a*b)^.625)/(a+b)^.25 7 .Curve fit of dia for dp100=.095 (first guess): )  D=alog(.38352*log(cfm) + .00864)  airflow !height dia !width "dp100 branch "sbrcount L  f count countf countw fact fact1 diff diffw /cfm 0in 1in 0in 1iw/100' 1cfm 1 1ft 22222222*@+(@`10@3@%)Z?`x@*4@ e<\? >@(@&@  M@  ַ@B?*@+(@-@ %/@%A?i@?*.@+T? >@(@"@  2 _@ _@X yI?*Ȏ@+$@`+@As0@%k? |@@*6@gLئk? >@&@&@  CF=( @ e @KC?*@+$@%&@K|$@%Pq?b@@* @]T? =@$@@  .d~@ _k@]?@pK?*x@+$@`0#@` @%ZK?r@@*(@~Nٕ? <@&@ @  Ӻ-a@ $a@?`#C*@U@+`N@~ %ب?@*4@? 6@*@ @  l؂@ z7n@O?*Q@~ *@"@~ %*>?@*4@뾫į? 4@*@ @  _@ l^@ F?*8>t@~ *$@`Z"@Ao@%/3?@*(@2(Y? <@(@ @  J](@ @y?eG* E!|@~ *$@@$@M"@%.:9? @* @ :T4j? =@&@@  ;q@ @qZ?yF*4@~ *$@`*@@ˮ,@%h|?"@*6@{fՓ? =@&@$@  p'@ @:* ΝE?*='@~ *(@@S+@@E+@%b?$@*.@tLbid? >@&@ @  )@ k6*@`ق e4D?*@*(@ /@0@%~k?&@*4@Q? >@(@$@  V{|Q@ =da@`! wD?%~ (@&,%&,-.-----&)%&)%&)%@%D<k@**** T0!"#$#%&'()*+PG,-./012SG345T6SG78PwPG9PG:SwT;<=>T0?$ )%$!)%$")%$#)%$$)%$%)%$&)%$')%$()%$))%$*)$+$,$-$.$/"0"1"2"3"4"5"6"7"8"9":";"<"=">"?D`l((((((((((((((((&&&&&&&&&&&&&&&@T0ABCD#EFGHIJKPGLMNOPQRSGSTUTVSGWXPwPGYPGZSwT[\]^T0_"@"A"B"C"D"E"F"G"H"I"J"K"L"M"N"O"P"Q"R"S"T"U"V"W"X"Y"Z"["\"]"^"_D@l&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&`T0abc"`"a"b"c <&&&>@ Sheet2 VBA{U{Udir?fSheet1MSheet2`r Y0H J< rstdole>stdole h%^*\G{00020430-C 0046}#2.0#0#C:\WINDOWS\system32\STDOLE2.TLB# Autom`ation`MSFor ms>SFFrms/| rG696F10B0-5685-412F-B363-9D4194E2095D5G4.TWD#Microsoft > b Ob Libprary:Q04QFD061C56-4442-49F6-B0AE-B7A3875B0QDOCUME~1\User\L OCALS@Temp\VBE\E,EXg,.E .`M }OffDic}Of@iTc}/02DF8D04C-5BFA-101@B-BDE5}AjA|420gram File,s\U\MSO97.DLL^ 8.0R^ ThisWork bookN2@1Ti@W‘kbokHB1-C@,B8*"B+BSheet12S@e@Pt1PMTj2 2 2bޫ kodule5cm2dmoJu50 !#' #/ 1$?5/ \`5 @$' /`$g$p0iU5 3$3o3$R*o+ `&MB/1$2a) Td#11rI" U0%444/ =K) !<ZF@K"@ F4#) $NAx8#4#) $NAZF@K"@4(SLSS6"N0{00020820-0000-0000-C000-000000000046}Y0H$*\Rffff*1f484ec1ab($H` !1 $ $ $0h@0MExAttribute VB_Name = "She@et1" Bast0{00020820- C$0046} |CreatablFalse PredeclaIdTru "ExposeTemplate`Deriv$eCustomizd<1& _OYݕ FpϑKVzTx6#pϑKVzT1& _OYݕ4(SLSS6"N0{00020820-0000-0000-C000-000000000046}Y0H"*\Rffff*d484ed1b6($H0hs $ $ $p@8MExAttribute VB_Name = "She@et2" Bast0{00020820- C$0046} |CreatablFalse PredeclaIdTru "ExposeTemplate`Deriv$eCustomizdxiModule1=Module2s*Module3D3Module4x \` ?5@6 "$`2@`4<`x(`^:`dt`fp("`&X"`T`.PP`L`H`D`h`\`8`Z6h``4X" 0`d2`t0xH:x0, @ PX`hp X @ ( @ @ @ @ X`hp@(@XP@Ph@ @| @l @\ @L @< @, @ @ @ @ @ @  @l X @r @v @x| @l @\ @L @(< (@, 88ME"   28 P 3p3 33(3@3X3p3333333 (.h.6  8 *;;; 8  "@ ;D D4,Gh ,$ 0$(X779909P9999 8 (X " H9bX0 9( X 9 8x P$h6& 6&X";  ";( 999h @ 88"8"X"x""""::::0  P X ` h p  0H`x 8Ph  8888 %@8`":";": 8":8 "; 0 @      `8lp frictionfactor Macro+ Macro recorded 6/10/2008 by Fred Dougherty variablesZZZZZ(Z@ZZ branch loopstart main if loophh 0 '0  set counter 4 '4Z<$Sheet2.Cells(7 + brcount, 4) = widthcounteZ=recalc diameter with dia = (1.3*(width*height)^.625)/(width +< guess widthForms *3" @ . '$Sheet2.Cells(7 + brcount, 4) = widthu =recalc diameter with dia = (1.3*(width*height)^.625)/(width +P d 4  ,6dZ 0c f co8l'0 *3" @ . 'P(x guess initial fct 2-C6? act@ l$ ,6, h$ ,6' X'l X'l B'p 0$ ,6  2 4  ,6t1+ XF8g({Gz?'ll f 4  ,6,6 ?'d  4  ,601 TZ `'4 %6'^Dim diaprime As Single X 4  ,6 brc?  .?  . ?'X1/re 4  %6'B,6  d f  d 'fIf@@ 4 ^ ^'@p 4 4  ,6,6'00 $get cfm,height,width,length,e, Re, D13) =  &H.! @ X'Q!@ X 'B'ZPZZZZZ 4  %6'&,6 4  %6'. 4  %6' & 4  ,6 . 4  ,6  4  ,6@ 0 4  ,6  4  ,6V B 4  ,6 4  %6'  4  ,6    I X' d  I X'` %6' %6'@  4 ,6  4 ,6 Calculate fact and fact1 @ @ XGz@ B ? $: $:'f:nO ^  %6') = Re   'ee0 8 @ ' 0Z8 .F X   'Xg'  ffffff?  '  .F 4  %6'Xgells .F{Gz?'g'allows next step when width = 0 0X '   '=  ^  ,6  ^  ,6 d f '2 V 4  ,6 4  %6'Z 4  %6'` 4  %6'd 4 %6't'l'p'r'v'x code a losses ZF ףp= ? V'lg ZF)\(? V'lg ZF{Gz? V'lg ZF? V'lg ZF333333? V'lg ZF{Gz?'lg ZFQ?'lg code b losses `F ףp= ? V'pg `F)\(? V'pg `F{Gz? V'pg `F? V'pg `F333333? V'pg `F{Gz?'pg `FQ?'pg code c losses dF ףp= ? V'rg dF)\(? V'rg dF{Gz? V'rg dF? V'rg dF333333? V'rg dF{Gz?'rg dFQ?'rg code d losses tF ףp= ? V'vg tF)\(? V'vg tF{Gz? V'vg tF? V'vg tF333333? V'vg tF{Gz?'vg tFQ?'vgcalculate dpfix l 4 ,6 p 4 ,6 r 4 ,6 v 4 ,6 l p r v 'x x 4  ,6 ^   %6'  x '  ^   ,6  ^  ,6 4 '4 ^  %6'  ^  ,6   ' V 4 ,6,6'lfixture loss loop: 4  %6'Z 4  %6'` 4  %6'd 4  %6't'p'r'v'x code a losses ZF 'lg ZF 'lg ZF 'lg ZF 'lg ZF 'lg ZF 'lg `F 'pg `F 'pg `F 'pg `F 'pg `F 'pg code b losses `F 'pg `F)\(? V'pg `F{Gz? V'pg `F? V'pg `F333333? V'pg `F{Gz?'pg `F 'pg code c losses dF 'rg dF)\(? V'rg dF{Gz? V'rg dF? V'rg dF333333? V'rg dF{Gz?'rg dF 'rg code d losses tF 'vg tF)\(? V'vg tF{Gz? V'vg tF? V'vg tF333333? V'vg tF{Gz?'vg tF 'vgcalculate dpfix l 4  ,6 p 4  ,6 r 4  ,6 v 4  ,6 l p r v 'x x 4 ,6 ^  %6'  x '  ^  ,6  x '  4 ,6   ^  ,6  ^  %6' @ %6' %6' %6' %6'  %6'  %6' %6' %6' %6'  %6'  %6'  %6' %6' %6' %6' %6' %6' %6' %6'  F V 'g  F V 'g  F V 'g  F V 'g  F V 'g  F V 'g  F V 'g ZF 'lg dF 'rg dF 'rg dF 'rg dF 'rg dF 'rg tF 'vg tF 'vg tF 'vg tF 'vg tF 'vgendloop: GoTo endloop:ha32.m100$B@"clear contents of calculated cells8r32.z100$B@'Z'`'d'tZPZxZZ %6' %6'  %6'  %6'  %6' %6' %6' %6' %6' %6' %6' %6'  I'V@0Attribute VB_Name = "Module1" Sub frictionfacto`r()  l.Descrip`acro recorded 6/10/2008 by Fr"DoughertymWProcDatacInvoke_Funcc \n14>' ' M"variab@les Dim f As Single U 1 D V eE R rhocfm length heightQwid dp dp100if!QcounIn tegerGXbrd 'branch loopN maxACPcodabcddpfix1@Sheet1.Cells(5p, 144B2UM6M3M7M4UM8M5M9-6-10M7N1Hc3  r R 3)!'clear coVnts of calculat cA< Range("a32.mb").CCrz#^ ea= 1C^A^= K2:start m@ain if'fDo Until + |= 0 a 31 +%>)Ab'get U ,,",c,e, R`D"$2b14k =Z2KÕ:ndi0 r P-2$((Log(1EeP3.7PDF2.5a&0<'0)os(:2`-= Cp= z(R -t WT2'd@ eq(%Y ?XBD9ac< 99BAbs(Q) >L00`GH7f1A_[ @Q !EI$ egCtS* q=pLV109,^ /1`ro/i##m+ 2, 9$dptot s+se#D|1-µB':7turepp>DP v p=/$0c B$C֯A*U2't3A3z^4e t5߼r6Qu6:77߳BRb#cP@dqdaDG1 + brcount, 15) codc = Sheet1.Cells(3 6dT7T@dpfixaX0b w \ .'e a l ossesRIf c1 Then s1 %2%23344556677 bOFAIFF JFAIFF JFAIFF JFAIFF JFAIFF JFAIFF @F FcFFFAFF FAFF FAFF FAFF FAFF FAFF G#dP#apI#O#I#J#I#J#I#J#I#J#I#J#I#@#'calculatep23)B$a4b5c6dBF`bc2f 1H tot max 2 2i£BA+,i % 8ئ9sysdpe # Y <cBD 3)+ B\G ' endloop:O%+ DLPC_ allpEnd Su*Q(6 << <Y0H"*\Rffff*a487a3b7bHxp8$(MEx"Attribute VB_Name = "Module2" %    # !"$'&7(/)*+,-.06123458N9:L<=>?@ABCDEFGHIJKMOXWQRSTUVY[\]^_`abcdefghijklmnopqrstuvwxyz{|x e *6 <<LLLLLLL"L"<Y0H$*\Rffff*5748fce4ba*\R1*#b4*\R1*#b8*\R1*#20b*\R1*#b4*\R1*#b4*\R1*#b4*\R1*#b4*\R1*#b4$*\Rffff*1f484ec1ab*\R0*#12*\R1*#15d*\R1*#b4"*\Rffff*d484ed1b60$$`&x`(h`*\x`, X`pP#`.L`0F`2P<`.$H$`,`t`p`l`X0`H`@@d$$`*`h``D``T``` `8Bp@ ` |k 8``4`8 :  @ 8PhH `x@h @ @  @ @ @  @: @ @x @FPt @d @\ @L @B< .008@, @d @ @f8 @ @H @0 `@` @ @ @ 8@x @| ME" 0 0@ p  (08@H0 P HX @H  (`.0.H h6(37h 5x453  "K=*2("H"K (CX(C x 28 ";; :7@9  77 7( 5@ 5X 5p   0)  " ( 8 @  "H 8h bv 8 9  0 8@  ` p $*  88  6J (4   X  DGh8 8p 9 ( h  ;9 0 NhD4@9@  $ pX`8 P ` 29 .8 h p9 variablesZ@ZXZpZZZZZZ branch loop' End IfZh :  %6'F  'e Z8'0   %6'& &F8gZPZ  %6' )Wx?iVy? &$:+ٱ? '*ZPlhget height and diameter  = co  * ,  * ',8 guess width6 &   ,6cfmh * ,  *'a6@hP'  'wi    ,6a)   ,6return duct size startountcfmmax = Sheet2.Cells(7, 3)'9 Sheet2.Cells(15 + sbrcount - rbrcount, 10) = sbrcountmax Do While rbrcount <= sbrcountmax  GoTo endall count = 1h(   %6'(set counter for dp100 loopstart main return if loopcalculate diameter from cfmifloopr:Z6 Sheet2.Cells(15 + sbrcount + rbrcount, 8) = length If count < 30 Then count = count + 1 set counterget height and diameter GoTo ifloopr guess width diff = (dia - dia1) / dia' & ( '&0 *   ,615 +  ' adjust cfmZZ7=======================================================7 height = Sheet2.Cells(15 + sbrcount - rbrcount - 1, 3)  End If6 rbrcount = rbrcount + 1,6 If diff > 0.001 Then'. If rcfm <= 0 Then GoTo endallrbrc7 length = Sheet2.Cells(15 + sbrcount - rbrcount - 1, 8).0 width = width * (1 + (dia - dia1) / dia) 5 Sheet2.Cells(15 + sbrcount + rbrcount, 4) = widthP? 5 Sheet2.Cells(15 + sbrcount + rbrcount, 5) = count @Z set counter )calculates duct diameter as a function of)dp100, then calculates duct width given a duct height.ZZ ,start main supply if loop - iterate on dp100    ,6om c@ %6'@ %6' %6'  ,6 @ ,6   ,6calculate V and Re &H.! @ *'Q!@ * 'Bhstart f loop guess initial fF{Gz?''  ?'d d  ,6 @ @ *Gz@ B ? $: $:'f f   ,6 2   ,6  '   ,6 c 2-C6?  d f  d ' get e, rho, dp100, L d  I *' 0 '0Z   ,6 02 h    ,6 0  ,6 *   ,6 MbP? id( width = (dia * 3.1417 - height * 2) / 2 Calculate fact and fact166 Sheet2.Cells(15 + sbrcount + rbrcount, 3) = heightI dia1 = (1.3 * (width * height) ^ 0.625) /' (width + height) ^ 0.25h *   ,6Z8Z      4new, rbrcount = 0 8Sheet2.Cells(30 + testcount, 12) = count 'killHrecalc diameter with dia = (1.3*(width*height)^.625)/(width +height)^.25calculate dia1 $: $:  $:' -C6? - d * *   * '*1) / *? $: $:  $: '*P %6'.C':B/Sheet2.Cells(30 + testcount, 4) = V 'kill8Sheet2.Cells(30 + testcount, 11) = dp100 'killrcfmmax = Sheet2.Cells(9, 3)0cfmfactor = rcfmmax / cfmmaxa1 6 Sheet2.Cells(15 + sbrcount - rbrcount, 9) = cfmfactor 6 Sheet2.Cells(15 + sbrcount + rbrcount, 7) = rbrcount 8Hrecalc diameter with dia = (1.3*(width*height)^.625)/(width +height)^.25A rcfm = cfmfactor * Sheet2.Cells(15 + sbrcount - rbrcount - 1, 1)1 Sheet2.Cells(15 + sbrcount + rbrcount, 1) = rcfm7 dia = 10 ^ (0.38352 * 0.434294 * Log(rcfm) + 0.00864)0 Sheet2.Cells(15 + sbrcount + rbrcount, 2) = dia1Sheet2.Cells(30 + testcount, 2) = cfm 'kill1Sheet2.Cells(30 + testcount, 3) = dia 'kill   %6'.?  .?  . ?',0set up cfm and rcfmn cfmguess duct diameter from cfm , : ':: %6'@ & 'sh  _= Shee : _ '| : F & F '(`F'(g - set   :  ,6 :   %6'& ` :   %6'. .  :  ,6 ( :   ,6XZhZ digits = 0factor = 10 ^ digits facto+width1 = Int(width * factor + 0.7) / factor^ digi8 .F'g .Fg 'Sheet2.Cells(28 + sbrcount, 4) = width1Z .'    ,6P8   '  ,6  ,6   ,6( %6'   Fg : ':  d f '20c15.g100$B@i15.p100$B@"clear contents of calculated cellsAttribute VB_Name = "Module3" Public Sub newductsize() 'calcul ates . dizter as a funct@ion ofVdp100, then nwidth giva+d height.variab@les Dim cfm As Singlermax1 b&e$ho  1  yleng countIn`tegerUAfŗwdif cs@ff jf`actorA sd. 'branch loop D~Ar2d Do@di0gitsA no(tapASngclear cJoYn ofd cellRange("c15.g").CA C i'set upand AC:I9= Sheet2.C(11, 3oa`.`~19%D&y%aCd- `D:=!/#j7AC 8H 9#retseg 11)#c= 1, !J:Do While x<= ,`. 5 +- / 2, EIfp 6 T \="?-2 Else 0j#16)b$-F2&+> 0CGoTo end@r1@ ` *ۃB2)X-& "g ntM2 g=@F+AAeLBmainHC@ .'start a supply ifb - i gK0›`Kq, 7guesfrob 1001 #widthWa* (1t)Uo=x+ 1GoTo ifloopw End Ifend}: dEc M0'digi tsfactor10 1 Int($* +7{4". 28 EY12?CT{.FXset L\cfm@A- |fm"!A ea ll@ejSub x=K(6 << <Y0H$*\Rffff*134884aed0h0$`$$ Dou$8(j`&````(`*`,``.``0`2````X8ME@ H lp D_dp100 Macro+ Macro recorded 7/21/2008 by Fred Dougherty variablesZZZZZZZZZZZZZZ branch loopZZ'start main supply if loop  %6'  '  _    ,6calculate diameter from cfm   %6'& &F8g   %6'( )Wx?iVy? &$:+ٱ? '* set counter'0get height and diameter   %6'. *   ,6 guess width *3" @ . '=recalc diameter with dia = (1.3*(width*height)^.625)/(width + height)^.25<p?  .?  . ?', * ,  *'2 0 '0 0 2MbP?  * ,  * '<hh    ,6 0   ,6  ' & ( '& &   ,67=======================================================start main return if loop'  %6' %6'  '6 Sheet2.Cells(15 + sbrcount - rbrcount, 9) = cfmfactor    ,6  _     ,6 adjust cfmcalculate diameter from cfm      %6' F8g     ,6 )Wx?iVy? $:+ٱ? '* GoTo endall set counter'0get height and diameter     %6'.     %6' *    ,6 .    ,6     ,6 guess width *3" @ . '=recalc diameter with dia = (1.3*(width*height)^.625)/(width + height)^.25?  .?  . ?', * ,  *'2 0 '0 0 2MbP?  * ,  * '8h0h(     ,6 0    ,6  '8l"Attribute VB_Name = "Module4" Module5__SRP_0 __SRP_1]__SRP_4xd@6 ACDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefgiklmopqrstuvwxyz{|}~crU @prU~}     Y 1 I) $ .'%:%"$ q5.'%: %"$ q56( %(%"$ __SRP_9@__SRP_ct__SRP_d=e__SRP_e?@Up*53( %( %"$ 7( %( %"$ *sp5npj*sl nlnps05(%(%npj%"$ 4(%(% @"$ 5( %(%nlj%"$ 3( %( %"$  (k*D]I\K((%(%"$ *sx6=(%(%"$ t5(]c\nxjt*shshH((%(%nhjd%"$ 5K((%(%"$ *sL6(]p\r nxn0stCk*D%(%ntj%"$ Ck*D%(%nLj%"$ (p.k.k* 8k.D%(%k.D%"$ ;k.D%(%"$ *sx5 nx ;k.D%(%"$ *sh57nx9 t\ )Wx?iVy?o\+ٱ?s\9k.D%(%n\j%"$ 7(%( %"$ *sd57(%( %"$ *s`57(%( %"$ *sT55(%(%nTj%"$ 5(%(%ndj%"$ 5( %(%n`j%"$ pF)nxH.! @n\ϳ붶kLQ!@n\kL<{Gz?,pD"(,?8k.D%( % @"$ v nd @n\kGz@<,?Δ B9 t\ 9 to\okd5 8k.D%(% @"$ *s<9k.D%(%nV@e{OתC  B2;8ϡcJƸ=xAv7LZA$j ? !_ _B_var_tediffdia _B_var_diffdp _B_var_dp100a1Hdia2cI` _B_var_dia2l dp100prime~_B_var_dp100primerecalcӬdiameter(endsub: _B_var_endsubHall'twcountifloopwT insertretloopҏsetcountIp_B_var_setcountGrcount-8mainloopfcfmloop_B_var_mainloopU>cfm2 _B_var_cfm2 _B_var_Cell Module5f fixtureloss(A Application* CommandBars VisiblevdpP _B_var_vdpacoda _B_var_coda##brountYcodb _B_var_codb$#codccodecfixaWD _B_var_cfixaDdpfixa1ixadpfixb1dpfixc1codddpfixd1dpfix| _B_var_dpfix@SSheet3v _B_var_brount _B_var_codc%# _B_var_code'# _B_var_dpfixa8 _B_var_dpfixb9 _B_var_dpfixc: _B_var_codd&# _B_var_dpfixd;ItemzdpfixtotV_B_var_dpfixtot(.Sum _B_var_SumȒtot9 brcountmxx_B_var_brcountmx<{RoundUph_B_var_RoundUpvlround _B_var_Rounddigitsfactor _B_var_factorW5width1y _B_var_width1^ _B_var_digitssendloopwRgot _B_var_gotQnotap ductdptot u_B_var_ductdptote~dptot _B_var_dptotsysdp* _B_var_sysdpsysdptot_B_var_sysdptotpfixadp _B_var_fixadpendloop*dpfix11 _B_var_dpfix1(dpfix21dpfix31dpfix41dpfix51dpfix61dpfix71cfix1GD _B_var_cfix14cfix2HDcfix3IDcfix4JDcfix5KDcfix6LDcfix7MD _B_var_dpfix2) _B_var_dpfix3* _B_var_dpfix4+ _B_var_dpfix5, _B_var_dpfix6- _B_var_dpfix7. _B_var_cfix25 _B_var_cfix36 _B_var_cfix47 _B_var_cfix58 _B_var_cfix69 _B_var_cfix7:oacfmA _B_var_oacfmmretsegQ, _B_var_retseg endcfmloopdSheeRange  ClearContents{M#     @0 [Workspace] ThisWorkbook=0, 0, 0, 0, C Sheet1=0, 0, 0, 0, C Sheet2=0, 0, 0, 0, C Module1=39, 12, 716, 257, Z Module2=0, 0, 655, 241, C Module3=24, 38, 679, 279, C Module11=0, 0, 0, 0, C Module4=88, 88, 742, 329, C Module5=88, 88, 742, 329, C ThisWorkbookThisWorkbookSheet1Sheet1Sheet2Sheet2Module1Module1Module2Module2Module3Module3Module11Module11Module4Module4Module5Module5Oh+'0 @H ]Excel VBA - Clearing contents of a sheet below a Row - VBA - Forums at ProgrammersHeaven.comwFred DoughertyaFred DoughertyaMicrosoft Excel@՜.+,D՜.+,  PXp xSummaryInformation(<DocumentSummaryInformation81TableZDSummaryInformation( F&D Engineeringj Sheet1Sheet2  Worksheets 6> _PID_GUIDAN{8D929DDC-7475-4F71-AC6B-9EB4AD9F3AB9}Oh+'0 ,8 X d p |hq<UBSS9uCj bzXVZ! xllx*8C L1Ը(f1c0''-=Ju͟hi6аghu]3ilf D'msa6yATbh@밈vsl Z߬вW]{^ l }=0A󪦞Wyճ96ɘ|l1-=61mb.u/[6ꐕmO1sXlR]lR̳IL5oF2"Pd̍\G렺^7#fA陎;šyDԈlzO r"w 8be;I_%OIv)ǎ;ڡ z{JIJ6e)ߝd]Y؛yneo_v( ªGLz{^SAmqT}iN}ugKuBܑ^g=Lk?zNA3=@[?BFYZkWշҎ3\[O/S>nEVvK;)7Q`6uy  ~Dd  ZZ0  # A2VY` }9;R>+329`!*Y` }9;R>+3*L A'_xUAOA~3]vFq!1^ Эmf 6x 1^{z桉$뛙7.iQo0lp=b< C9J1lqY GpaMxMK4eObv9P`S2;yWf!Ew1c "s|}9`!t65>1c "s D'p&BxoDgN6"IsR$TlX$rS$(X˶\8qJ{X)_P+ 7T qelPjB]>pHO͵ٯԯPwXژZr LSGԒS[h k\G#TK*ȍ+h "6@RzTUW,b)PcZ1c5 'Xet3˙ZgJY8SU™Zgji:S0YE*8\G΀^qusڒZWP a)9=$̩̜)fG zN 8!w N3#f͘)r-dGW+ȥ@\Z6@ 7՜.+,0$ hp  F&D EngineeringvDocumentSummaryInformation8TCompObjy!A 0A VBASIC SPREADSHEET TO CALCULATE DUCT DIAMETER Title  F'Microsoft Office Word 97-2003 Document MSWordDocWord.Document.89q^ 666666666vvvvvvvvv666666>6666666666666666666666666666666666666666666666666hH6666666666666666666666666666666666666666666666666666666666666666662 0@P`p2( 0@P`p 0@P`p 0@P`p 0@P`p 0@P`p 0@P`p8XV~_HmH nH sH tH @`@ Normal5CJ_HmH sH tH f "f Heading 1$<@&*5CJKHOJQJ_HmHnHsH tH uNN  Heading 2$*$@&^ 5>*tHuH@H  Heading 3$*$<@&tHuP@P  Heading 4$$@&a$B*OJQJhtH u:@:  Heading 5$$@&a$>@>  Heading 6$$@&a$CJDA`D Default Paragraph FontViV 0 Table Normal :V 44 la (k ( 0No List >>> Title $*$a$5CJtHuRJR Subtitle$$x*$a$5CJPJtHu2B2  Body Textx6P@"6  Body Text 25BQ@2B  Body Text 35B*htH u4 @B4 Footer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CM m<.vpIYfZY_p[=al-Y}Nc͙ŋ4vfavl'SA8|*u{-ߟ0%M07%<ҍPK! ѐ'theme/theme/_rels/themeManager.xml.relsM 0wooӺ&݈Э5 6?$Q ,.aic21h:qm@RN;d`o7gK(M&$R(.1r'JЊT8V"AȻHu}|$b{P8g/]QAsم(#L[PK-![Content_Types].xmlPK-!֧6 +_rels/.relsPK-!kytheme/theme/themeManager.xmlPK-!Ptheme/theme/theme1.xmlPK-! ѐ' theme/theme/_rels/themeManager.xml.relsPK] 8B^w(/8LXtB     !"#9:;8B^w(/8LXt B  $$$',Iltww&+-=?A&&+7ZJhPt2vw'()*,.<>@  '!!35BY[Xoqt:::::=>_2$ЙSQ@ 42$ 6B_i[62$ߟYÉfX2$Y` }9;R>+322$65>1c "s|͗@6=h(  \  C A ?#" ?\  C A ?#" ?\   # #" ? \   C A ?#" ?V    #" ?  \   #  #" ? V    #" ?  \  # #" ?  \  # #" ?  \  # #" ?  \  # #" ?  \  # #" ?!  \  # #" ? \  # #" ?# bB  S D#" ?\B  C D#" ?\B  C D#" ?bB @ S D#" ?\B  C D#" ?\B  C D#" ?\  # #" ?& bB  S D#" ?$bB @ S D#" ?bB  S D#" ?(\B   C D#" ?\ ! # !#" ?* \ " # "#" ?, \ # # ##" ?1 bB $ S D#" ?2\B % C D#" ?.bB &@ S D#" ?-bB ' S D#" ?3bB ( S D#" ?4bB ) S D#" ?'\B * C D#" ?0bB , S D#" ?bB - S D#" ? bB . S D#" ?bB / S D#" ?bB 0 S D#" ?bB 1 S D#" ?bB 2 S D#" ?bB 3 S D#" ? bB 4 S D#" ?"bB 5 S D#" ?%bB 6 S D#" ?)bB 7 S D#" ?+bB 8 S D#" ?/\ 9 C A ?#" ?\ : C A ?#" ?\ ; # #" ? bB <@ S D#" ? \B = C D#" ? B S  ?E j(^._./>5?5j55 6;6<6f6677777777g8h8i8j8z88V9W99:=:M::1;;&<'<<"======>????B 4  0t %T @0! 4;pT9#T:p$ 4,@t  t  Xt-0t  |t=P"P"t<P"t.Tt t/x(t P"P"t t@t@@t0Lt $t1pt Ht@H@ tptppt2tppt ltpt3t At4t et1@1t5=t t)P"UP" tUP"Ut6at! t75t" t&t%-t8Yt*%et# 1t$==t' t(P"tv{=A=A?A?A@A@ABACAEAFAHAIAaAbAB@5@=A=A?A?A@A@ABACAEAFAHAIAaAbAAAAAAAB#B%B/B1B8B:BNBPB`BbBzB|BBBBBBBBBBBBB&V < ^`^`^`^`^`^`^`^`^`^`^`^`^`^`^`^`^`^`hh^h`o(.&V < =A?A@||P ||yyOOO!"&'#+#./045!6BX@X X@X"X$XL@X.X`@X4Xl@X:X@XBX@XHX@X^UnknownG* Times New Roman5Symbol3. * Arial=Charter BTO.  k9?Lucida Sans UnicodeACambria Math"1h ʦS憩"F! 7!v 7!v#0dAA2HX $P 2!xx/A VBASIC SPREADSHEET TO CALCULATE DUCT DIAMETERFred DoughertyFred Dougherty