Example: Using fuel tanks.

Each fuel tank has its own formula for volume vs height. Please see this useful resource for finding out such a formula.

Tank Volume Calculator

In this can, You need to use non-linear formula.