# flow bench program

Discussion

Original Poster 13 posts

113 months

I am thinking about designing a flow bench software program. A few of the formulas i was thinking about putting in the program are as follows
1)reynolds number formula
2)expansibility factor formula
3)dynamic viscocity formula
4)dynamic viscocity formula
5)kinematic viscosity formula
6)square root of pressure drop formula.
Does any one have any thought on this?
Thank you in advance

9,439 posts

220 months

Does the flow bench come with any formulas? In the 80's my dad bought a superflow 110 and he paid me pocket money to convert the FORMULAE in the book into a BASIC program for him - saved hours instead of pounding on a calculator!

edited for pedantry

Edited by eliot on Monday 14th April 08:18

540 posts

150 months

BTW The plural of formula is FORMULAE

775 posts

112 months

I posted a copy of my html flow programme on ph some time back. Stan Weiss has made it 'pretty' and it is on his website for all to use. It is based on pressure drop across test piece and across an orifice and the assumption of isentropic process.

http://www.magneticlynx.com/carfor/flowmath.htm

Peter

2,089 posts

173 months

You might want to have another look at the discharge coefficient it calculates. The flow numbers look ok though.

9,439 posts

220 months

Auntieroll said:
BTW The plural of formula is FORMULAE
I spent my childhood programming not spelling.

775 posts

112 months

Hi Dave

The figure can be altered in the box provided. Flow coefficient through orifices is always a bone of contention. My friend Dave Gollan used my bench to produce his thesis for his Bsc Hons Engineering degree, one member of the panel argued the Cd should have been nearer 63 as opposed to our proposed 59.6. Dave pointed out the figures were all repeatable and the research was to establish flow differences not absolute numbers, this was accepted and Dave was awarded his degree, with the panel accepting the research was fully valid in all aspects. An honorary degree for the 'Ghetto Bench' The cd of the valv,e maybe Stan has slightly changed the maths, not time to look at the mo. Will run same numbers through my html page.....same 0.63 on my prog Here is a link to the ph thread which includes my raw, very messy script.

http://www.pistonheads.com/gassing/topic.asp?h=2&a...

Peter

Edited by PeterBurgess on Monday 14th April 08:25

Edited by PeterBurgess on Monday 14th April 08:29

2,089 posts

173 months

I'm not talking about the flow bench variable of 0.596 which I assume is the 1st term in the Stolz equation. I'm talking about the Discharge Coefficient, the last box on the page, which appears to vary only with the valve size and is not the correct discharge coefficient for that valve size.

775 posts

112 months

Hi Dave

I did mention valve CD in my post. You are most welcome to plough through my scruffy script and find where you consider the discrepancy to be, The CD is an afterthought for us as we just go on flow improvement in terms of cfm. We are, same as you, trying to get best bulk flow everywhere.

Peter

2,089 posts

173 months

Jeez this ain't rocket surgery. The defaults in your program with a 33mm valve show 54.07 cfm at 25" and a discharge coefficient for the valve of 0.63.

That valve size actually has an area of 1.326 sq in. Perfect flow at 25" = 137.86 CFM per sq in. Actual discharge coefficient at 54.07 CFM = 54.07/(137.86 x 1.326) = 0.296

I've checked multiple other valve sizes and flow regimes and it's still wrong. I'm sure you or Stan can find out where.

775 posts

112 months

Hi Dave

Sussed it. I used our orifice area as a constant, not the inputed orifice area. So on our bench cd is correct. Using altered flowmaths cd is 0.32 with figures from Stan.

Thanks for spotting that Dave, no one else has and as we are running the orifice used in the constant we got the cd correct. I have altered the script so the 'constant' becomes variable to the orifice, well spotted, respect dude.

Peter

Stan, can I email you with corrected script somehow?

Peter

775 posts

112 months

Hi Stan...

Following corrections for flowmaths

var E = eval((0.000789 / A) * 0.62); You need to change 0.000789 to letter O

My original becomes var E = (O / A); instead of var E = (0.000789 / A);

(0.000789) area specific to my Ghetto Bensh You need to also change .......

var E = eval((O / A) * 0.596); from 0.62

var E = (E * 0.596); from 0.62

.......working me overtime here Dave, did the extra CD stuff back in 1999, memory worse with age and Old Speckled Hen Peter

Edited by PeterBurgess on Tuesday 15th April 09:49

251 posts

114 months

Peter,
I do not know what was going on but when I applied your change I was not getting the correct results. I coded up my own method. If you and or David could double check it that would be great. It is still the same link. http://www.magneticlynx.com/carfor/flowmath.htm

Thanks,
stan

775 posts

112 months

Hi Stan

Here is your page rewritten, it works ok for me.

Peter

<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<title>Flowbench JavaScript</title>

<SCRIPT Language="JavaScript" Type="text/javascript">
<!-- Hide script from old browers.
var AInput = 33;
var XInput = 533;
var YInput = 433;
var TInput = 15;
var PInput = 1013;
var VInput = 3;
var HInput = 0.31;
var OInput = 22.5;
var CInput = 0.596; // may need to adjust for different benchs

function peter( f ) {

var V = eval(VInput);
var H = eval(HInput);
var C = eval(CInput);

var O = eval((Math.pow(OInput / 2000, 2)) * 3.1415927);
var X = eval(XInput * 9.81);
var Y = eval(YInput * 9.81);
var Pr = eval(PInput * 100);
var dP = eval(Pr - Y - X);
var ndP = eval(X / (dP * 1.404));
var S = eval(1-(0.410072 * ndP));
var Q = eval(Pr - Y);
var T = eval(TInput + 273);
var K = eval(.378 * V * H);
var Zz = eval(Q - K);
var R = eval(Zz / T);
var d = eval(R * 0.003482);
var A = eval(Math.pow(((AInput / 2) / 1000),2) * 3.1415927);
var B = eval(Math.pow((2 * d * X), 0.5));
var M = eval(O * C * S * B);
V = eval(M / 1.225);
var Z = eval(Math.pow((6229.35 / Y), 0.5));
var F = eval(Math.round((V * Z * 2118.8802) * 100) / 100);
var E = eval((O / A) * 0.596);
var J = eval(Math.pow(( X / Y), 0.5));

document.stanForm.result25.value = eval(Math.round(F * 100)/100);
document.stanForm.result10.value = eval(Math.round(F * 0.632 * 100)/100);
document.stanForm.result15.value = eval(Math.round(F * 0.775 * 100)/100);
document.stanForm.result28.value = eval(Math.round(F * 1.058 * 100)/100);
document.stanForm.CD.value = eval(Math.round(J * E * 100)/100);

}

function save( field, vary, text ) {
if( isNaN( field ) )
{
alert( text + " is not numeric" );
}
else
{
if (vary == 1){
AInput = eval(field);
}
if (vary == 2){
XInput = eval(field);
}
if (vary == 3){
YInput = eval(field);
}
if (vary == 4){
TInput = eval(field);
}
if (vary == 5){
PInput = eval(field);
}
if (vary == 6){
VInput = eval(field);
}
if (vary == 7){
HInput = eval(field);
}
if (vary == 8){
OInput = eval(field);
}
if (vary == 9){
CInput = eval(field);
}
}
}
//-->
</script>

</head>

<body bgcolor="#000066" text="#CCCCCC" link="#99FFFF">
<NOSCRIPT>
This document only works with JavaScript enabled browsers.
</NOSCRIPT>
<CENTER>
<FONT FACE="Arial, Helvetica, san-serif">
<h2>Flowbench Math</h2>
<h3>Based on Work by Peter Burgess</h3>
</FONT>
<FORM NAME="stanForm">
<TABLE BORDER="2" CELLPADDING="6">

<TR><TD ALIGN="RIGHT">
<b>Valve Diameter in Millimetres </b>
</TD><TD>
<INPUT TYPE="text" NAME="VD" SIZE=7 onChange="save(stanForm.VD.value, 1, 'Valve Diameter')">
</TD></TR>

<TR><TD ALIGN="RIGHT">
<b>Reading on Manometer X in Millimetres<BR>Orifice Plate Pressure Drop in mm of Water </b>
</TD><TD>
<INPUT TYPE="text" NAME="ManX" SIZE=7 onChange="save(stanForm.ManX.value, 2, 'Manometer X')">
</TD></TR>

<TR><TD ALIGN="RIGHT">
<b>Reading on Manometer Y in Millimetres<BR>Test Piece Pressure Drop in mm Water </b>
</TD><TD>
<INPUT TYPE="text" NAME="ManY" SIZE=7 onChange="save(stanForm.ManY.value, 3, 'Manometer Y')">
</TD></TR>

<TR><TD ALIGN="RIGHT">
<b>Temperature Reading in Degrees Centigrade<BR>STP 15 Dgrees Centigrade </b>
</TD><TD>
<INPUT TYPE="text" NAME="Temp" SIZE=7 onChange="save(stanForm.Temp.value, 4, 'Temperature')">
</TD></TR>

<TR><TD ALIGN="RIGHT">
<b>Atmospheric Pressure Reading in Millibars<BR>STP 1013.25 mb Pressure </b>
</TD><TD>
<INPUT TYPE="text" NAME="AP" SIZE=7 onChange="save(stanForm.AP.value, 5, 'Atmospheric Pressure')">
</TD></TR>

<TR><TD ALIGN="RIGHT">
<b>Vapour Pressure of Water at Test Temperature in N/m2 </b>
</TD><TD>
<INPUT TYPE="text" NAME="VP" SIZE=7 onChange="save(stanForm.VP.value, 6, 'Vapour Pressure')">
</TD></TR>

<TR><TD ALIGN="RIGHT">
<b>Relative Humidity as a Decimal Pointage </b>
</TD><TD>
<INPUT TYPE="text" NAME="PH" SIZE=7 onChange="save(stanForm.PH.value, 7, 'Relative Humidity')">
</TD></TR>

<TR><TD ALIGN="RIGHT">
<b>Orifice Diameter in Millimetres </b>
</TD><TD>
<INPUT TYPE="text" NAME="OD" SIZE=7 onChange="save(stanForm.OD.value, 8, 'Orifice Diameter')">
</TD></TR>

<TR><TD ALIGN="RIGHT">
<b>Flow Bench Variable </b>
</TD><TD>
<INPUT TYPE="text" NAME="FB" SIZE=7 onChange="save(stanForm.FB.value, 9, 'Flow Bench Variable')">
</TD></TR>

<TR><TD ALIGN="CENTER" COLSPAN="2" BGCOLOR="WHITE">
<INPUT TYPE="button" VALUE="Calculate" onClick="peter(this.form)">
</TD></TR>

<TR><TD ALIGN="RIGHT">
<b>The airflow is </b>
</TD><TD BGCOLOR="BLACK">
<INPUT TYPE="text" NAME="result25" SIZE=17>
<b> c.f.m. at 25 inches H2O.</b>
</TD></TR>

<TR><TD ALIGN="RIGHT">
<b>The airflow is </b>
</TD><TD BGCOLOR="BLACK">
<INPUT TYPE="text" NAME="result10" SIZE=17>
<b> c.f.m. at 10 inches H2O.</b>
</TD></TR>

<TR><TD ALIGN="RIGHT">
<b>The airflow is </b>
</TD><TD BGCOLOR="BLACK">
<INPUT TYPE="text" NAME="result15" SIZE=17>
<b> c.f.m. at 15 inches H2O.</b>
</TD></TR>

<TR><TD ALIGN="RIGHT">
<b>The airflow is </b>
</TD><TD BGCOLOR="BLACK">
<INPUT TYPE="text" NAME="result28" SIZE=17>
<b> c.f.m. at 28 inches H2O.</b>
</TD></TR>

<TR><TD ALIGN="RIGHT">
<b>The coefficient of discharge is </b>
</TD><TD BGCOLOR="BLACK">
<INPUT TYPE="text" NAME="CD" SIZE=17>
</TD></TR>

</TABLE>
</FORM>
</CENTER>

<SCRIPT Language="JavaScript" Type="text/javascript">
<!-- Hide script from old browers.
document.stanForm.VD.value = AInput;
document.stanForm.ManX.value = XInput;
document.stanForm.ManY.value = YInput;
document.stanForm.Temp.value = TInput;
document.stanForm.AP.value = PInput;
document.stanForm.VP.value = VInput;
document.stanForm.PH.value = HInput;
document.stanForm.OD.value = OInput;
document.stanForm.FB.value = CInput;
//-->
</script>

</body>
</html>

251 posts

114 months

Peter,
If you change your version to show 4 decimal places with the default values it calculates 0.3074 CD. If you click on the link to my version it calculate 0.2958 Cd. Which I believe is correct.

Stan

775 posts

112 months

Thanks Stan, amazing what rounding up/down/number of decimal places can do to a number.

I hope you are well?

Peter

2,089 posts

173 months

PeterBurgess said:
Thanks Stan, amazing what rounding up/down/number of decimal places can do to a number.

I hope you are well?

Peter
No, that's not what Stan is saying. The rounding or the number of decimal places isn't the problem. The equations in the script were wrong. Stan has changed them to get it right.

2,089 posts

173 months

Stan Weiss said:
Peter,
I do not know what was going on but when I applied your change I was not getting the correct results. I coded up my own method. If you and or David could double check it that would be great. It is still the same link. http://www.magneticlynx.com/carfor/flowmath.htm

Thanks,
stan
Yep you got it right Stan. The script was wrong. I assume you just did flow at 25" / (valve area in sq in x 137.86) which strikes me as the sensible way to approach this.

775 posts

112 months

Hi Dave

I hope the massive electricity outage in Scotland hasn't caused you troubles?

Once again I say thanks for pointing out the CD component of the maths was wrong. My work has and always will be empirically based not inferred or deduced from theory so I just go by the flow numbers and as long as they are repeatable/consistent I am happy. I can still put stuff on the ghetto bensh that you and I played with all those years ago and get the same figures. I added the CD output as an afterthought and I got it wrong. As I said we use the flow numbers for our work based comparisons. Mind you, we rarely seem to get the time to flow test these days, how about yourself? We test MGB head flow thoughts now and again and have been playing with quite a few different OE and aftermarket Harley heads for a mate who rides and tunes them....Dave Gollan and myself ended up buying Sportsters to pootle around on.....don't mention Harley bhp/litre though, we got around 120 engine bhp from a 1950cc Veetwin Peter

Stan

I suppose it is one of the penalties for putting stuff in the public domain and making it open source. I am happy I did that as it is there for people to use ....especially when you have done the hard work of sorting out my crap scripting, so a big thanks to you Stan too. When we get some time we will plod through and see what has been done with your code. I think my script is too scruffy and I made the cardinal sin of not keeping my notes from 1999ish! I think I was just gobsmacked the prompts came up on screen and the flow figures were about right from the input It is interesting that it has taken 2 years for the wrong cd maths to show up, does the page get many hits Stan? I was wondering if folk use the stuff or maybe copy the page, or if it is only of interest to a few of us folk?

Peter

251 posts

114 months

Pumaracing said:
Stan Weiss said:
Peter,
I do not know what was going on but when I applied your change I was not getting the correct results. I coded up my own method. If you and or David could double check it that would be great. It is still the same link. http://www.magneticlynx.com/carfor/flowmath.htm

Thanks,
stan
Yep you got it right Stan. The script was wrong. I assume you just did flow at 25" / (valve area in sq in x 137.86) which strikes me as the sensible way to approach this.
Dave,
I am using what was there and came up with a constant that works.

(F / A) / 213683.427367

F = flow @ 25"

A = area as calculated elsewhere in script by Peter (metric units)

Stan