This package uses the van der Waals equation to calculate the needed pressures for blending Nitrox and Trimix for (technical) scuba diving.

You set the starting pressure and mix (leftover gases from previous dive) and specify the desired mix and pressure.
The program will then calculate how much of each gas you have to add.
With the ideal gas law you are usually not too much off when blending Nitrox to 200 bar.
But with Helium and higher pressures,
van der Waals is much preciser.

Set the mix to start with (that is the stuff left in your tank from a previous dive),
pressure should be given in bar.
Valid gases are O2 (oxygen),
He (helium) ,
N2 (nitrogen).
You can omit the N2 and He.
When N2 is missing ,
it will be calculated based upon the other percentages.
Missing Helium will result in a Nitrox blend instead of a trimix one.

This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself, either Perl version 5.8.7 or, at your option, any later version of Perl 5 you may have available.