cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
Showing results for 
Search instead for 
Did you mean: 

Community Tip - You can subscribe to a forum, label or individual post and receive email notifications when someone posts a new topic or reply. Learn more! X

Duct Pressure Loss Calc

ELSID
8-Gravel

Duct Pressure Loss Calc

I am attempting to set up a worksheet to calculate the pressure loss through duct work for HVAC. I could not find any examples in the collab and I was hoping someone can point me in the right direction. I have a feeling (still looking into it) that I may have to solve using user-defined functions. I'm still confussed by user-defined functions, so a good place for a primer would also be appreciated.

Thank you for for any assistance
47 REPLIES 47

On 7/17/2009 12:18:12 PM, ElSid wrote:
>I am attempting to set up a worksheet to calculate the pressure loss through duct work for HVAC. I could not find any examples in the collab and I was hoping someone can point me in the right direction. I have a feeling (still looking into it) that I may have to solve using user-defined functions. I'm still confused by user-defined functions, so a good place for a primer would also be appreciated.

Thank you for for any assistance <<br> __________________________________

Though I spent over 30 years in that stuff: pressure, flow ++++, I won't spare a minute on that HVAC for 3 reasons:

1. Physical formulation of pressure drop, flow are just theoretical. When it comes to applied Engineering, all that is governed by more exact formulation and varies with the range of applications, fluid properties ...etc. The theoretical school stuff is then useless, totally.

2. When it comes to duct networks, things complicate beyond recognition because of the negative pressure effect at the branching points and the form of the branches ... etc. Solution is via a matrix representation and is very complex and there are software for that... example water distribution.

3. HVAC goes by codes (regional ?, national ?). ASHREA was a good reference years ago. It might still be or other codes. What that means here is that no matter how smart your result will be, it must be traceable by part and in all.

In conclusion, you are asking to re-invent the wheel. That's the way I see your request. Bits and pieces go nowhere if they can't be collected and certified. Consulting HVAC experienced specialist is probably the first approach. Further the formulas that you might pass in this collab would have to sourced and certified acceptable. There are HVAC Engineering Firms.

I wish you good luck within this collab and outside.

jmG

jmG,
As I re-learn Mathcad and hopefully get better with it's programming features (never had to go in depth before) I am looking for guidance. All calculations need to be transparent and double checked, this includes packaged software solutions. A Mathcad sheet is considered an alternative method for verification and much more transparent than excel sheets and faster than hand hand calculations.

One Mathcad 14 WebSheet (Evaluation of the resistance coefficient of friction � as function of Re and relative roughness �):
http://twt.mpei.ac.ru/MCS/Worksheets/Hydro/La-De-Re.xmcd
And I have WebTasks from the text book "Fundamentals of hydraulics, heattransfer and aerodynamics" - sorry - in Russian. But I am going to translate intu English:
http://twt.mpei.ac.ru/GDHB/OGTA.html
Val

I am attaching a version of my current main branch sheet. It is a work in progress and all constructive input is welcome. I have a few questions in red text that I would like some assistance with. I would like to eventually "condense" it by making a program. Still learning and taking baby steps.
Thanks to the collab for all your assistance
ELSID
8-Gravel
(To:ELSID)

I know I am working too hard on this. I need to figure out how to program. Can someone take a look and answer some questions in the work sheet. For some reason, I can not add up or display an array I created using functions.

I am NOT posting in version 11 due to some formatting that I know breaks when save as version 11.
StuartBruff
23-Emerald III
(To:ELSID)

On 8/4/2009 3:42:26 PM, ElSid wrote:
== I know I am working too hard on this. I need to figure out how to program. Can someone take a look and answer some questions in the work sheet. For some reason, I can not add up or display an array I created using functions.

I've just had a quick glance at your worksheet.

The first question (why ... inWg); I this may be a bug in the in-line display - I think there was a recent report of a bug in this feature but I can't remember what or when.

The second question (why won't array display) is because there is no array to display. ΔP is a function name, hence the display you do see telling you what kind of parameter it takes and the type of result. You have used ΔP.i (giving a literal subscript) as the variable rather than ΔP[i (indexed subscript). Even if you had used the latter, your function definition would have over-riden any previous results. I suggest a change to δP for the function and convert literal subscripts to indexed ones.

Unfortunately, I don't have time to look at the programming bit right now ...

Stuart

inWg is a unit definition I added to my sheet (inches water gage/column). I imagined it had something to do with the function ... still learning how to use them properly. I'll look into the δP change as recommended.

I would also like to carry over the diameters. See revised sheet. Will look into a program loop next. Any ideas are welcome.
StuartBruff
23-Emerald III
(To:ELSID)

On 8/4/2009 5:20:46 PM, ElSid wrote:
== inWg is a unit definition I added to my sheet (inches water gage/column). I imagined it had something to do with the function ... still learning how to use them properly. I'll look into the �P change as recommended.

I've just had a quick look at your previous sheet again and indicated how a program could be created. Probably don't have time to look at your revised worksheet before tomorrow (it's gone midnight over on the right side of the Pond!)

Stuart

Stewart,
thank you for the assistance. This pet project has caused me to loose whatever remaining hair I had :). I had to drop for a few weeks and I'm back on this. Just to verify, all of your comments are on the right or highlighted yellow, correct?
StuartBruff
23-Emerald III
(To:ELSID)

On 8/21/2009 12:23:50 PM, ElSid wrote:
== thank you for the assistance. This pet project has caused me to loose whatever remaining hair I had :). I had to drop for a few weeks and I'm back on this. Just to verify, all of your comments are on the right or highlighted yellow, correct?

Yes.

Stuart 🙂

Stuart
Making changes, not at the program YET!
Can you check as to why the function can not use the vector for Rey? It's in the FricFac function.
StuartBruff
23-Emerald III
(To:ELSID)

On 8/21/2009 1:27:31 PM, ElSid wrote:
== Making changes, not at the program YET!
Can you check as to why the function can not use the vector for Rey? It's in the FricFac function.

Unfortunately, no. I don't have access to M14 for a while.

Stuart


Saved as Version 11. Thought you had 14 per previous response

>How to get fric factor to solve for Rey being a vector ?<<br> ______________________________

As directed before: 4. Google this collab for C O L E B R O O K
Open the work sheet and scroll down in one shot, wait last calculation is finished.


jmG
StuartBruff
23-Emerald III
(To:ELSID)

On 8/21/2009 2:00:06 PM, ElSid wrote:
>Saved as Version 11. Thought you had 14 per
previous response

I do, but not at the PC I was using.

However, I now have access again, so ...

The problem is that you were defining a function
FricFac with a function call in the formal argument
list. The simplest way round the problem is to
write FricFac to take scalar arguments and
vectorize the function call.

Stuart

I shouldn't reply in there.
...........................

There are lot of problems with this work sheet that renders it not collaborative:
1. I reject Arial in work sheets but can't change the style.
2. User 3 ... but can't find User 1, 2 ? Why a user style.
3. Some collab do like heading things that belong to a "family .... once in text box = Zap !
4. You write 104�F but 15*�F = inconsistent ... and more like that.
5. The 14 and 11 unit systems are incompatible and whereas none are defined, the 14 converted 11 is = zap !
6. Conceptually, what is to be calculated ? It looks like a CFM
"This calculation estimates the Ventilation requirements for a substation located in San Francisco, CA.".
Why do you have to calculate if already given by the Electrical Engineer ?
This was already corrected very long time ago in a 14 sheet corrected for 11.

7. seg:=variable ... next call seg as "Constant" !
Then no more can be checked. You define vel[ft/min] but vel=[m/s]
So, the first solver "units don't match"
You can probably get inspired how to manipulate you 14 version in order that versions as low as 8 could read and help. I'm saying that in order to clear things at the point of Darcy & Colebrook. At this point, you must explicit implicitly Q as function of Q ... Q:=f(Q), where Q is CFM and where the RHS f(Q) will contain all components in their very basic formulation, i.e: in "Engineering formula style", because it is at this point that a "checker" can "check" vs tabulated data (Standards, Codes ...). Given a plenum size or a tied one, the supply pressure, +++ .... just check the max Q is possible. If not, increase the size of the plenum, the supply pressure (if possible) and other things like reducing the friction factor. That little project would go in few steps of a 20 years old Sharp EL-5050, but does not run in a Mathcad work sheet.

jmG

jMG,
I have the Colebrook sheet and still do not see how it assists me in my endeavors. Sometimes I wish I either spoke french or your english was not so cryptic
1) The font is what it is as assigned
2) USER3 is a carry over from Stuart's work
3) ??? Can you give example?
4) Will clean up sheet. May be a M14 to M11 conversion as I did not see this before.
5) Why would unit systems be incompatible? Don't understand.
6) Heat loads given by electrical. I need to calculate required CFM
7) Will look into inconsistent units. May be a carry over where I was displaying results in US and SI units for equipment selection in catalog. Don't understand the rest of your statement.

Ruben

On 8/22/2009 8:01:11 PM, jmG wrote:
>I shouldn't reply in there.
>...........................
>
>There are lot of problems with
>this work sheet that renders
>it not collaborative:
>1. I reject Arial in work
>sheets but can't change the
>style.
>2. User 3 ... but can't find
>User 1, 2 ? Why a user style.
>3. Some collab do like heading
>things that belong to a
>"family .... once in text box
>= Zap !
>4. You write 104�F but 15*�F =
>inconsistent ... and more like
>that.
>5. The 14 and 11 unit systems
>are incompatible and whereas
>none are defined, the 14
>converted 11 is = zap !
>6. Conceptually, what is to be
>calculated ? It looks like a
>CFM
>"This calculation estimates
>the Ventilation requirements
>for a substation located in
>San Francisco, CA.".
>Why do you have to calculate
>if already given by the
>Electrical Engineer ?
>This was already corrected
>very long time ago in a 14
>sheet corrected for 11.
>
>7. seg:=variable ... next call
>seg as "Constant" !
>Then no more can be checked.
>You define vel[ft/min] but
>vel=[m/s]
>So, the first solver "units
>don't match"
>You can probably get inspired
>how to manipulate you 14
>version in order that versions
>as low as 8 could read and
>help. I'm saying that in order
>to clear things at the point
>of Darcy & Colebrook. At this
>point, you must explicit
>implicitly Q as function of Q
>... Q:=f(Q), where Q is CFM
>and where the RHS f(Q) will
>contain all components in
>their very basic formulation,
>i.e: in "Engineering formula
>style", because it is at this
>point that a "checker" can
>"check" vs tabulated data
>(Standards, Codes ...). Given
>a plenum size or a tied one,
>the supply pressure, +++ ....
>just check the max Q is
>possible. If not, increase
>the size of the plenum, the
>supply pressure (if possible)
>and other things like reducing
>the friction factor. That
>little project would go in few
>steps of a 20 years old Sharp
>EL-5050, but does not run in a
>Mathcad work sheet.
>
>jmG



No knowledge can be certain if it is not based upon mathematics or upon some other
knowledge which is itself based upon the mathematical sciences. -- Leonardo da Vinci

Stuart,
Your work, in between the "purple" dashed lines, points me in the direction I was looking for [Multiple simultaneous solutions]. I am looking to understand the fundamentals between a "function call" and a "function definition argument list".

No knowledge can be certain if it is not based upon mathematics or upon some other
knowledge which is itself based upon the mathematical sciences. -- Leonardo da Vinci
StuartBruff
23-Emerald III
(To:ELSID)

On 8/27/2009 2:59:21 PM, ElSid wrote:
== Your work, in between the "purple" dashed
lines, points me in the direction I was looking
for [Multiple simultaneous solutions]. I am
looking to understand the fundamentals between a
"function call" and a "function definition
argument list".


A function definition has form

f(x,y,z):= ...
where f is the function name and x,y,z is the
argument list

A function call is simply where you evaluate the
function with some values taking the place of the
argument list, eg, f(1,2,4) or f(u,v,w)

You have a function definition of the form

f(x,g(y),z):= ....

You cannot define a function with a function call,
that is g(y), as one of the arguments. You could
do something like,

f(x,g,y,z):= t<-g(y) ....

hence passing both y and the function name g for f
to evaluate internally.

Stuart

Thank you

No knowledge can be certain if it is not based upon mathematics or upon some other
knowledge which is itself based upon the mathematical sciences. -- Leonardo da Vinci
ELSID
8-Gravel
(To:ELSID)

Revisiting this calculation, I am trying to compress (in size) the work sheet. The calculation works for the first branch, but errors out for the second. I believe I am doing something wrong to initialize the second branch. Collabs assistance is greatly appreciated.

PS I think I need to change the d solve array and convert it back to a scalar matrix. But how??

On 10/15/2009 12:21:08 PM, ElSid wrote:
...
>Collabs assistance is greatly appreciated.<<br> ________________________

Can't help on two counts:

1. Don't put the data/constants in text box.
This to ease debugs/organise presentation.

2. Unit systems 14 <==> 11 are not compatible,
therefore: define all units in the original 14. Otherwise there is no point for 11 users redoing every times, as you didn't care reposting what you had already from jmG (for instance).

From inspection, the project must be organised around an iterative process, and included in program to take all the conditions into consideration ... thus an export. Too much work from where nothing works and no scope/source. As it looks, it seems the project can be done in about one page or less. BTW, your US imperial units, make them + universal SI ! Collabs will surely get + interested, rather than doing for a unique user.

jmG

On 10/15/2009 1:16:29 PM, jmG wrote:
>... As it looks, it seems the project can be done
>in about one page or less.

That would be GREAT! I found a work around (looks to be valid from calculator check) and now the problem is in summing up an array. See attached

No knowledge can be certain if it is not based upon mathematics or upon some other
knowledge which is itself based upon the mathematical sciences. -- Leonardo da Vinci
RichardJ
19-Tanzanite
(To:ELSID)

d is a nested matrix (a two element vector in a one element vector). That's not valid for the guess value. Turn it into a two element vector with

d:d[0

Then it works.

Richard
ELSID
8-Gravel
(To:RichardJ)

How would you break up a nested matrix in order to do a sum? See attached.

No knowledge can be certain if it is not based upon mathematics or upon some other
knowledge which is itself based upon the mathematical sciences. -- Leonardo da Vinci
RichardJ
19-Tanzanite
(To:ELSID)

I'm Not sure quite what you want, but one of these two options must be right.

Richard
ELSID
8-Gravel
(To:RichardJ)

The two sums of the nested array. If possible, as a Vector. Will work with your suggestion and see if I can do it.

I had found http://collab.mathsoft.com/read?104604,11e#104604 and was trying to implement. Yours was much simpler 🙂


No knowledge can be certain if it is not based upon mathematics or upon some other
knowledge which is itself based upon the mathematical sciences. -- Leonardo da Vinci

>If possible, as a Vector<<br> __________________________

You are all confused: the solver issues the results in a pile of nest, each nest is the solved variables. You want a data table, not a vector !
Too many things and suggestions you persist to ignore. You have the same name as variable and as constant, that does not work. cfm, lbm, D�F, �F, cfm CFM ... etc must be defined for the 11 conversion to work. The text box, get rid of that, you have some tab as normal some � page width. No diagram, no scope. You will just have band-aid and what you need is a project done from blank, but you must start from blank, no solver nothing yet ... just the data, the unit definitions, the diagram the scope, the main formula ...

jmG

jmG,
I understand the issue with the math in the text box. I will get away from doing that (yes, there is a glitch with it and I need to shut down the sheet and re-open to fix).
I don't see what is wrong with CFM:=xxxcfm. Lower case cfm is a built in unit and CFM (uppercase) is a user defined variable.
I did a hand calculation and the file posted above (DUCT PRESSURE SHRINK (5).MCD) checks out.

I am trying hard to understand how to "fix" my worksheets and what is the best way to use/construct them. This may be why I am struggling to learn to program in Mathcad.
Announcements

Top Tags