The tank can be split into three portions:

(1) The middle bit, which is a cylinder, the volume of which can be calculated by

V(cyl)= pi * R^2 * h

where 'R' is the radius (half of the diameter), and 'h' is the height (or length) of the cylinder

(2 and 3) The two end portions, each of which is a segment , or zone, of a sphere (more or less). The Volume of each zone is

V(zone) = 1/6 * pi * b * (3a^2 + b^2),

where 'b' is the distance from the end of the cylinder out to the end of the zone, and 'a' is the distance to where the sphere meets the cylinder portion, perpendicular to 'b'. [So 'b' is the same distance as 'R' of the cylinder of the first portion].

Therefore the volume is

V(total) = V(cyl) + 2 * V(zone) from above

(1) The middle bit, which is a cylinder, the volume of which can be calculated by

V(cyl)= pi * R^2 * h

where 'R' is the radius (half of the diameter), and 'h' is the height (or length) of the cylinder

(2 and 3) The two end portions, each of which is a segment , or zone, of a sphere (more or less). The Volume of each zone is

V(zone) = 1/6 * pi * b * (3a^2 + b^2),

where 'b' is the distance from the end of the cylinder out to the end of the zone, and 'a' is the distance to where the sphere meets the cylinder portion, perpendicular to 'b'. [So 'b' is the same distance as 'R' of the cylinder of the first portion].

Therefore the volume is

V(total) = V(cyl) + 2 * V(zone) from above