Sign in to follow this  
Followers 0
mhowasso

Horizontal Tank Volume

15 posts in this topic

Hi All, I have a round horizontal tank (large pipe that is flat on both ends) that is 144 inches in diameter and 720 inches long. Like a big beer can on its side. I am measuring the depth with a level transducer in inches. I am using a MicroLogix 1500 and I need to calculate the gallons in the tank. How do I do this in a ML1500..??? What is the formula for calculating this..??? Thanks,

Share this post


Link to post
Share on other sites
The beer can on it's side version is a little more difficult (not impossible) than the beer can standing up. I have a structured text file that I turned into an AOI that I use to calculate the volume of a cylinder, laying on it's side, with 2:1 elliptical heads. You can get rid of the 2:1 head calc part and use the math that is in the STX in ladder. Probably with a CPT. If PV <= 0.0 THEN PV := 0.00001; END_IF; If PV > 100.0 THEN PV := 100.00; END_IF; PI := (22.0/7.0); H := (PV / 100.0) * D; a :=2 * ATAN(H/((2*H*D/2)-H**2)**0.5); Fc := (a-SIN(a)*COS(a))/ PI; Vc := 0.25*PI*D**2*L*Fc*7.48; Vh := (3*D*12-2*H*12)*(H*12)**2*0.0000539681*42; G := Vc + Vh; B := G / 42.0; Where: a REAL Standard Factor B REAL Standard Tank Barrels on Hand D REAL Standard Tank Diameter in Feet Fc REAL Standard Factor G REAL Standard Tank Gallons on Hand H REAL Standard Fluid Height in Feet L REAL Standard Tank Seam to Seam Length in Feet PI REAL Standard Value for Pi PV REAL Standard Tank Level in % Vc REAL Standard Cylinder Volume on Gallons Vh REAL Standard Head Volume in Gallons You're looking for Vc Edited by Michael Lloyd

Share this post


Link to post
Share on other sites
are you kidding? it's not even close!! try this i used to do these sort of calculations long ago, even on horizontal tanks with dished ends that were "tilted", to empty properly. Calculations rarely produced excellent results, and in most cases we resorted to filling the tanks through calibrated flowmeters, and producing linearisation tables. May be due to the fact that tanks are rarely the dimensions and shapes that the drawing says they are.....

Share this post


Link to post
Share on other sites
See link. http://www.calculato...uction/tank.php Edited by Mickey
1 person likes this

Share this post


Link to post
Share on other sites
Mickey, The first link did not work.

Share this post


Link to post
Share on other sites
No, I'm not kidding but maybe I made a copy/paste error. I've used my AOI on 120000, 60000, and 30000 gallon bullet tank and it always compared favorably with the certified tank strapping. Very favorably

Share this post


Link to post
Share on other sites
Precision Digital panel meters have a linearization look-up table with either 10 or 8 break points. You can see their accuracy claim. Pdf is the same as the image below: Horizontal_round_tank_volume_by_10_point_look-up.pdf

Share this post


Link to post
Share on other sites
I'm curious about why you focused on 22/7 and completely ignored the rest if the equations. This article http://en.wikipedia.org/wiki/Pi mentions that "Fractions such as 22/7 and other rational numbers are commonly used to approximate pi. While 3.14285714286 might not be "exact" the difference error between pi and 22/7 for a 10' diameter tank is only 5/32". The OP asked for a formula. I gave him one. If he chooses to take the value for pi out to infinity that's fine with me. pi is an irrational number so the skies the limit on how many decimal places you use. Transmitter error, IO card point error, fluid temperature error, fluid specific gravity error, material temperature of the tank error, etc will also be a problem. He asked about a calculation for use in an ML1500... I don't think the difference in 22/7 and pi is going to be a deal killer in that PLC.
1 person likes this

Share this post


Link to post
Share on other sites
I think he was joking, my belief is that it was some good old fashioned British humour/humor!! Steve

Share this post


Link to post
Share on other sites
Oh dang... I think you are right. My bad Sometimes I forget that websites are multi-national... sorry about that

Share this post


Link to post
Share on other sites
Yes, Pelly09 sussed me out, 22/7 is probably good enough in the circumstances, especially when you take into consideration the rest of my post. Tanks are rarely the exact dimensions and uniformity called out by the design drawings, and they often contain "inclusions" such as heat exchanger coils, mixer paddles, etc., so using liquid head pressure can often be the worst way to measure volume. Tanks can also change their dimensions with temperature. Using load cells, and converting to volume is also a tried a trusted method, but it requires knowledge of the average density of the contents. Some installations use a "gauging probe" in the vessel, positioned at a known volume, which automatically adjusts the weight-based volume calculations, but this is only valid for homogenous (constant density) products. Many installations just rely on counting flowmeter pulses, Here in the UK, historically, breweries and distilleries had to pay duty on the volumes they actually produced, so vessels had to be accurately "dipped" from the top with a gauging stick. This meant that each and every excise vessel had to have an accurate "dip-table", produced by certified companies. They would fill the vessel through certified flowmeters and produce the dip-tables incrementally. Customs and Excise would not allow the volume to be "measured" any other way. Nowadays, duty is paid "at the gate", so tankers are weighed in and out. I'm not sure how duty is calculated for packaged products (eg. bottled, canned, etc.), but the process of tank dipping has been eliminated, which is a good thing for sterility and eliminates contamination. The method used to determine tank contents is always going to be "horses for courses". That's a very English expression, which Wikipedia points to episode 442 of the Australian medical soap "All Saints" !! Loosely translated (in this context) it means that the best method is dependent upon the application. However, I have to ask why you put PI:=(22.0/7.0) in your code, when you could just have easily put PI:=3.141592654........

Share this post


Link to post
Share on other sites
Short answer- An unimaginably large number of people don't understand what pi is... a more truthful answer... 22/7 is shorter (less typing) than 3.141592654........ and close enough for what I was dealing with. Long answer- I wrote the original version of the AOI in a Special Function in an old TI555 PLC. I used indirect addressing and called it with a loop to grab tank level and compute the gallons on hand for 15 120,000 gallon propane tanks at 7AM every morning. The customer wanted to capture the 7am inventory every day without intervention from an operator. We then calculated the change in 7AM inventory of the tanks and used the inflow and outflow accumulator from two Coriolis meters and an Omni Flow Computer to balance the system. Inbound and outbound flow also had a chromatograph so composition was reasonably known and the system balanced pretty well. The tanks had been "water drawn" and we had strapping tables that I used to verify the calculation. Most of my AOI's were either Special Functions in a TI555 or AddOns (I think that's what they called them, but it's been awhile) in Siemens S7300 or S7400. If you want some real fun, write a few Siemens S5 programs or even better a program for the good old Direct Logic PLC. Edited by Michael Lloyd

Share this post


Link to post
Share on other sites
Very nice work for the "close enough" method most of us use! Kinda showed our age when you mentioned the beloved (NOT) TI555 btw. Off the topic: Anyone using the OmniFlow 7000??

Share this post


Link to post
Share on other sites
The old 555 was a hoss in its time. We looked at the 7000 when they introduces it but it wasn't available. I think they announced a tad early... Like 2 years?

Share this post


Link to post
Share on other sites
Yes, keep thinking someone will be beta testing one. (Anyone??) Been using some Prosoft ones, ROC 107's or 800's, TotalFlows talking to AB via a ProSoft or Red Lion. Would like to see one in action...

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!


Register a new account

Sign in

Already have an account? Sign in here.


Sign In Now
Sign in to follow this  
Followers 0