Hi guys,

I know this is not the usual tech-related question but it does involve some formula making in Excel. I have a series of tanks (aproximately 500 barrels each) with a somewhat strange shape and I need to be able to calculate the amount that is contained in each one based on the level of the liquid contained in each one. Today I'm using a simple volume formula that I use on normal tanks but these ones have a ladder so it's kinda complex.

I'm attaching a simple image of the side and top views of the tanks so you have an idea of what I'm talking about. What I would like to do is divide/split the tanks in 3 areas so I can re-measure each tank (they'r not exactly the same size) and use the same formula for every tank. If I do it like this, all I have to do is calculate the volume of 2 rectangles and 1 3D triangle.

The problem is that I don't know how to measure or how to make a formula that progressively calculates the volume in that triangle part (below the stairs).

Hope someone can help me with this.

Thanks in advance!

sshot-2013-12-07--1-.png
D = fluid depth

Lx = total internal length of tank

Wx = total internal width of tank

Lt = length of triangular area below stairs (to fluid depth)

Ws = width of stairs

On that basis,

total tank volume is obviously:

Lx * Wx * D

and volume of area lost due to the stairs is:

1/2 x (Lx * D) * Ws

The only tricky bit is to calculate Lx

and you could do that with either trig:

Tan (a) = Opp/Adj [where a is the stair angle]

Opp would equal the fluid depth D, and Adj would = Lx

rearranged would give Lx = D/Tan(a)

Or you could use pythagoras

- all depending how easy it is to measure your tank.