Modified Bernoulli equation

Threads about how water guns work and other miscellaneous water gun technology threads.
User avatar
SSCBen
Posts: 6449
Joined: Sat Mar 22, 2003 1:00 pm

Modified Bernoulli equation

Post by SSCBen » Fri Feb 15, 2008 5:06 am

Edit: This is completely wrong. Disregard it.

After doing a similar physics problem with the Bernoulli equation for physics homework I think I have a pretty good grasp on the Bernoulli equation. This problem was notably more difficult than anything else we had done in the class, so I wondered if I was doing the right problem. Turns out that the book I was using was the second edition when they wanted the first edition. The first edition's problem was completely different (it was about an iceberg). Luckily homework isn't a big part of my grade.

Anyway, I've hashed out the differential equation for flow from a water gun in ideal conditions. This won't take into account turbulence among other things, but it's a good start. I'm going to take a shower and solve the differential equation tomorrow.

I'd post the differential equation, but you'd need a picture to go with it and an explanation, so it's really not worth posting.

With this equation you could get a rough (high) estimate for the water flow and velocity from an air pressure water gun with just a few variables. CPS will need a different, simpler equation that I could do too. The CPS equation would be less ideal than the air pressure one though because I don't exactly know how pressure in rubber CPS systems fluctuates. I know it decreases slightly, but I don't know the extent of the decrease.
Last edited by SSCBen on Mon Aug 03, 2009 12:49 am, edited 1 time in total.

User avatar
Silence
Posts: 3825
Joined: Sun Apr 09, 2006 9:01 pm

Re: Modified Bernoulli equation

Post by Silence » Fri Feb 15, 2008 10:56 pm

Good...it's about time we started using moderate-difficulty physics model. The only other ones are basic pressure equations and the Navier-Stokes equations, which are really up there in terms of demands. :)

User avatar
SSCBen
Posts: 6449
Joined: Sat Mar 22, 2003 1:00 pm

Re: Modified Bernoulli equation

Post by SSCBen » Sat Feb 16, 2008 2:51 am

I integrated the equation, but apparently no explicit solution exists (at least according to MATLAB). So we might have to go with some approximation of this. MATLAB gave me an implicit solution though, and it's below. I didn't solve it for C, but the initial condition is V(t=0)=A*d, so if you want to solve it, go ahead.

t-1/pi/A/P/r^4/(-d+x)*f*(-2*A*P*r^4*(-d+x)*(A*d-v)/f)^(1/2)+C = 0

t is time in seconds
pi is pi
A is the cross sectional area of the pressure chamber
r is the radius of the nozzle
x is the initial distance from the bottom of the PC of the water (this can be found with the initial volume and A)
f is the density of water
P is the initial pressure
V is the volume of water
d is the total length of the pressure chamber

I realize that the equation MATLAB gave me has a bunch of continued division in it, but it wanted to get everything on one side.

This equation does not give the flow, but the derivative of it with respect to time does. The derivative is the equation below (which I solved to get the equation above)

dv/dt = sqrt((2*A*P*pi^2*r^4*(d-x))/f*(A*d-v))

I'm disappointed by the lack of an explicit solution, but for all I know MATLAB might not know every trick in the book and one exists. Either way, I'm going to make an equation for constant pressure (or at least "average" pressure) that should be explicit. I'll also see what I can do to make a shorter explicit solution.

Edit: I'm going to ask Drenchenator to take a look at what I did to make sure it's not screwed up in some way. I'm fairly prone to making mistakes in basic math.

Edit again: Something I forgot to say is that one of my points in making this equation was to put it in the APH design tool. Knowing what sort of water output you could get is valuable. All of this information can be found by the APH design tool.
Last edited by SSCBen on Sat Feb 16, 2008 3:30 am, edited 1 time in total.

User avatar
Silence
Posts: 3825
Joined: Sun Apr 09, 2006 9:01 pm

Re: Modified Bernoulli equation

Post by Silence » Sat Feb 16, 2008 3:41 am

Could you briefly summarize the difference between implicit and explicit solutions? Either I haven't gotten to it yet in math classes or it's something that you wouldn't do much of outside of MATLAB. I'm not familiar with the program.

You should try Mathematica sometime (I haven't used it). MATLAB is a numerical platform - it just does computations. Mathematica is symbolic, meaning you can really play with equations and the math as you would by hand.

And finally, you should think about learning TeX - you've probably heard of it. It's a typesetting system that uses simple markup in plaintext files to create formatted documents. LaTeX (and perhaps BibTeX) has an extension that makes it really suitable for presenting equations. And since you run Linux, everything should be ready to go anyway.

I just wanted to point that out since the equation's confusing when written in a single line of text. I think I'll rewrite it by hand tomorrow and take a closer look at it. :)

User avatar
SSCBen
Posts: 6449
Joined: Sat Mar 22, 2003 1:00 pm

Re: Modified Bernoulli equation

Post by SSCBen » Sat Feb 16, 2008 4:28 am

Explicit solutions give you an answer directly. An example is y = f(x). It just tells you the answer.

Implicit solutions are ones where you can't solve for one variable or the other. It might be like ln(y) + y^2 = 1/x + ln(x). You can work with it and get answers, but it's not "explicit."

Drenchenator's taking a look at the equation. He said that he might be able to solve it for a certain interval, which is better than an implicit solution.

I'll have to check out Mathematica too. We have it on campus, but MATLAB is used by engineering and math classes so often it's all I have experience with.

As for TeX, there's a guy on my floor who writes all his papers in it. I intended to take a look at it, but never did. Thanks for reminding me.

User avatar
Drenchenator
Posts: 807
Joined: Fri Jun 18, 2004 12:00 pm

Re: Modified Bernoulli equation

Post by Drenchenator » Sat Feb 16, 2008 5:08 am

Okay, I think I was able to start solving for the flow rate equation. This is what I got:

Image

C is of course the arbitrary constant based on the initial conditions (Ben said V(0) = A*d or something like that). I didn't input them yet, so the flow rate is given in terms of it. Right now it looks okay; the rate will drop with time because x-d is negative. I haven't checked the units yet but it appears to be safe for a weak approximation.

Surprisingly enough, the equation was given implicitly but could have been easily solved using the solve command in MATLAB for the variable v. From there I just took the derivative with respect to time for the flow rate.

Edit: Oops, it has both a 2 on top and bottom. I guess those will cancel out, right?
The Drenchenator, also known as Lt. Col. Drench.

User avatar
SSCBen
Posts: 6449
Joined: Sat Mar 22, 2003 1:00 pm

Re: Modified Bernoulli equation

Post by SSCBen » Sat Feb 16, 2008 2:14 pm

Did you rename some of the variable names? I had d0 and d1, not x and d.

Edit: I realized what I posted used those variables. Never mind.

User avatar
Drenchenator
Posts: 807
Joined: Fri Jun 18, 2004 12:00 pm

Re: Modified Bernoulli equation

Post by Drenchenator » Sat Feb 16, 2008 4:09 pm

I just looked at this again and found out something--C is going to have to negative. If it's not them the flow will always be negative; the gun would actually fill itself! I'll have to back and solve by hand to properly get a value for C.

Once I get that done, I could also solve it for a basic approximation of shot time too.
The Drenchenator, also known as Lt. Col. Drench.

User avatar
Silence
Posts: 3825
Joined: Sun Apr 09, 2006 9:01 pm

Re: Modified Bernoulli equation

Post by Silence » Sat Feb 16, 2008 4:45 pm

Just change it to (t - C). And yeah, the duplicate 2s were the first to catch my eye. :p

Why do you say the flow drops with time? Does the equation assume a pneumatic system? It looks like it, judging from the first part of it. Ideally you could derive a bunch of formulas for various types of pressure chambers and plug them into this one.

User avatar
Drenchenator
Posts: 807
Joined: Fri Jun 18, 2004 12:00 pm

Re: Modified Bernoulli equation

Post by Drenchenator » Sat Feb 16, 2008 5:29 pm

I don't really know much about the equation; all I did was solve the diffy-q that Ben gave me--he derived it. I can talk about the result though.

The flow drops with time because it is a linear equation (t is to the power of 1) with a negative slope. The slope is negative because it has one negative value in the numerator, (x-d). X the height of the water in the chamber at time t=0; d is the overall height of the chamber. Obviously, unless spacetime is busted or something, the height of water won't exceed the height of the chamber. The value is negative then.

You can't change the equation to (t-C). It just won't work out in the present form. But once I actually solve for C and re-differentiate V(t), it will end up being t minus something, so it sorta does work out in the end like that.
The Drenchenator, also known as Lt. Col. Drench.

User avatar
SSCBen
Posts: 6449
Joined: Sat Mar 22, 2003 1:00 pm

Re: Modified Bernoulli equation

Post by SSCBen » Fri Feb 22, 2008 4:01 am

I'm going to finish the equation and make a spreadsheet much like the APH design tool to quickly figure out what things we could do with this equation. Right now I'm thinking we could use it to find nozzle diameters to get a certain shot time or output from a water gun. That'd be easy. It also would be easy to find shot time and shot time over 70% output (or whatever percent is acceptable to you).

The equation for constant pressure is relatively simple. Using the variables I used above because they are easiest to type, you can see that it is in the exact same form as the basic Q = Cv*sqrt(P):

Q = pi*r^2*sqrt(2P/f)

I'm thinking a page about derivations from Bernoulli's equation would be helpful to some people. I'll work out the derivations on the page so you can see where they're coming from.

Something I hadn't said before was that Q (the flow rate) is the negative of the derivative of the volume function. Flow rate is always given in a positive value--since the volume equation loses volume, the water is flowing from it rather than into it. This will be made clear in the article.

Edit: I just did some substitutions for this basic equation. I expect all of you to memorize this because it is enormously useful. :p

Q = pi*(10^6)*((0.0127*d)^2)*SQRT(13.79*P)

All you need is the nozzle diameter in inches and the pressure in PSI to get an approximate flow rate in mL/s. With that being said, testing shows that this equation returns perfectly reasonable, but definitely high, flow rates. Remember that the real flow due to turbulence and other factors Bernoulli does not account for is likely to be as low as 25% of what this reports. For example, this equation reports 19.6X flow for a water gun with 25 PSI and a 1/4 inch nozzle. In reality that's more like 10 to 12X. But, it's not completely off, so I think it's useful. You might find it useful to add an extra 0.5 to the front of the equation to make it more reasonable.

For those who don't want to decipher my text equation, I'll make a better looking one tomorrow... I'm going to bed.
Last edited by SSCBen on Fri Feb 22, 2008 5:06 am, edited 1 time in total.

User avatar
SSCBen
Posts: 6449
Joined: Sat Mar 22, 2003 1:00 pm

Re: Modified Bernoulli equation

Post by SSCBen » Fri Feb 22, 2008 2:36 pm

I've modified the equation even further to include a multiplier at the beginning. The multiplier accounts partially for the turbulent and viscous forces that mess Bernoulli up. This multiplier was based on empirical data measured from Supercannon II. In the future, more testing would be necessary, but this is relatively accurate. This is within 5% for the data I took from Supercannon II. And it gives perfectly reasonable numbers for other things as I test it out.

Q = ((2.99*10^(-5))*(P^2)-(4.9*10^(-4))*P+0.57)*3.14159265*(10^6)*((0.0127*d)^2)*SQRT(13.79*P)

How this multiplier would be added to the equation for air pressure systems still needs to be figured out. I could put in the current pressure, but that would need to be calculated. It would turn the flow equation into another differential equation where the flow varies based upon the current volume (actually pressure, but the easiest way to solve the equation is to put the current pressure in terms of the current volume).

This is going to turn into a loonnnggggg article, but it should be appreciated.

Edit: I think I'm going to take this to the physics tutoring people on campus. They handed out a sheet in my physics class about that, and I haven't needed help yet, but since we went over Bernoulli's equation in class, I don't think this would be too much of a stretch...

Edit again: This equation still is off for very large diameter nozzles. For a standard 3/4 inch APH at 60 PSI, it reports 177X output, which is over 3 times as much as reality. It gives 315X output for something like SuperCAP, when in reality it was only 120X. Perhaps something else added to the beginning of the equation is necessary to compensate for this.

With that being said, the equation seems accurate for any nozzle diameter up to 3/8 inch in normal water guns, and up to 1/2 inch in water guns like Supercannon II.
Last edited by SSCBen on Fri Feb 22, 2008 3:22 pm, edited 1 time in total.

User avatar
Silence
Posts: 3825
Joined: Sun Apr 09, 2006 9:01 pm

Re: Modified Bernoulli equation

Post by Silence » Fri Feb 22, 2008 9:58 pm

Ben wrote:Edit: I just did some substitutions for this basic equation. I expect all of you to memorize this because it is enormously useful. :p

Q = pi*(10^6)*((0.0127*d)^2)*SQRT(13.79*P)
Surely you're joking, Mr. Trettel...anyway, that simplifies to:
Q = 1882 K d^2 sqrt(P)
where K is the multiplier you added in.

Regardless, I think we need more empirical data at some point. Different sizes of water guns, different nozzles, and different pressures. Adding a multiplier in already seems like jumping the gun when, as you've said, the model doesn't scale quite yet.

User avatar
SSCBen
Posts: 6449
Joined: Sat Mar 22, 2003 1:00 pm

Re: Modified Bernoulli equation

Post by SSCBen » Fri Feb 22, 2008 10:20 pm

I did simplify it later. That's just what I did in the morning. ;)

What I've found so far indicates that "efficiency" increases as does pressure, but it is relatively flat up to ~60 PSI and increases more dramatically after that. Q = 1073*d^2*sqrt(P) seems to be reasonable for most pressures. Still, it will be inaccurate for pressures higher than 60 and nozzles larger than 1/2 inch. But it's a start. I agree that we need more empirical data. If anyone could take some empirical data with nozzle diameters, pressures, and output at that pressure (ideally with some sort of regulated pressure system), it would help immensely.

A more accurate approximation would be Q = d^2*(1073*sqrt(P)+0.0433P^(3/2)), which is the same thing as above with another part added.

I'm looking to finish up the one posted earlier for air pressure systems.

User avatar
SSCBen
Posts: 6449
Joined: Sat Mar 22, 2003 1:00 pm

Re: Modified Bernoulli equation

Post by SSCBen » Thu Mar 06, 2008 3:06 am

I finished an equation for flow in air pressure systems. I don't know if it's completely correct because I haven't checked it, but it makes sense.

Q = (rho*A1*sqrt(2*P0*V1))/sqrt((3/2)*rho*A1*t*sqrt(2*P0*V1)+(rho*V1)^(3/2))

where A1 = pi*r^2 or (pi/4)*d^2 and V1 = A*(d1-d0)

This returns results that make sense. Flow seems to drop rapidly however, but that does follow reality. This equation is unrealistic because it will never stop shooting. Flow keeps reducing as pressure drops, but it never hits zero.

A1 is the area of the nozzle. V1 is the volume of the space where air is (not the total volume of air which is P0*V1) in the pressure chamber. Both occurred multiple times in my equation, likely due to how important they are to flow.

I'll have to make a spreadsheet to test how reasonable this equation is. Equations like that are bad for people, but good for computers...

One problem with this is that the integral from zero to infinity will equal infinity (which should equal the PC volume, but that only works when Q=0 at some point), but I'm not sure if that is a problem. It wouldn't make sense, but theoretically, the volume equation would keep decreasing even after V=0, so it does make sense mathematically. The only way to calculate PC volume would be with the volume equation because V(0) would equal your PC volume.

Edit: Note that the multipliers I mentioned about to compensate for turbulent and viscous forces would not work as is in this equation with the version that changes with pressure. You'd have another differential equation to solve. The single number multiplier of 0.55 should be reasonably accurate.
Last edited by SSCBen on Thu Mar 06, 2008 3:17 am, edited 1 time in total.

Locked