

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ğactor B REAL Standard Tank Barrels on Hand D REAL Standard Tank Diameter in Feet Fc REAL Standardğactor G REAL Standard Tank Gallons on Hand H REAL Standardğluid 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Ĝylinder Volume on Gallons Vh REAL Standard Head Volume in Gallons You're looking for Vc You can get rid of the 2:1 head calc part and use the math that is in the STX in ladder.

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. The beer can on it's side version is a little more difficult (not impossible) than the beer can standing up.
