SCUBA::Blender

SCUBA::Blender is a Perl module for calculating gas pressures for blending Nitrox or Trimix.
Download

SCUBA::Blender Ranking & Summary

Advertisement

  • Rating:
  • License:
  • Perl Artistic License
  • Price:
  • FREE
  • Publisher Name:
  • Jaap Voets
  • Publisher web site:
  • http://search.cpan.org/~narked/SCUBA-Blender-0.1/lib/SCUBA/Blender.pm

SCUBA::Blender Tags


SCUBA::Blender Description

SCUBA::Blender is a Perl module for calculating gas pressures for blending Nitrox or Trimix. SCUBA::Blender is a Perl module for calculating gas pressures for blending Nitrox or Trimix.SYNOPSISuse SCUBA::Blender;my $blender = new SCUBA::Blender()# start with 20 bar of air$blender->start_mix( 20, 'O2' => 21);# calculate for 230 bar of Nitrox 32%$blender->end_mix( 230, 'O2' => 32);$blender->calc();print $blender->report();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.At the moment the SCUBA::Blender package is metric only.METHODSnew()Constructor, creates a new blender object.E.g. my $blender = new SCUBA::Blender;volume( $volume )Set the volume of the tank used to blend in. Defaults to 10 liters.E.g. $blender->volume(24);temperature( $temperature )Set the temperature of the gas mix. Defaults to 20 degrees celsius (293 Kelvin)E.g $blender->temperature( 10 );start_mix( $pressure, $gas1 => $percentage1, $gas2 => $percentage2 , ...)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.Examples:25 bar of air left: $blender->start_mix( 25, 'O2' => 21 );40 bar of nitrox 33%: $blender->start_mix( 40, 'O2' => 33 );70 bar of trimix 16/50: $blender->start_mix( 70, 'O2' => 16, 'He' => 50);end_mix( $pressure, $gas1 => $percentage1, ...)Same as with start_mix().E.g. I want 235 bar of trimix 13/60 $blender->start_mix( 235, 'O2' => 13, 'He' => 60);calc()Perform the actual calculationE.g. $blender->calc();report()Return the results of the calculation.E.g. print $blender->report(); Requirements: · Perl


SCUBA::Blender Related Software