The Perl Toolchain Summit needs more sponsors. If your company depends on Perl, please support this very important event.

NAME

Tissue - Models a Tissue for decompression calculations

SYNOPSIS

  use Deco::Tissue;
my $tissue = new Deco::Tissue( halftime => 5, m0 => 1.52);

DESCRIPTION

This module can be used to mimick the behaviour of a theoretical body tissue when Scuba Diving with air or nitrox. It will model a hypothetical body tissue in a Haldanian fashion. The 2 parameters that determine the tissue behaviour are the halftime T (in minutes) and the surfacing maximum Tissue tension M0 ( in bar ).

METHODS

new( halftime => 10, m0 => 1.234, .... )

Constructor of the class. You can create a tissue with specific parameters Allowed parameters are: halftime m0 deltam o2fraction waterfactor topsidepressure offgasfactor RQ nr

$tissue->info()

Returns a string with information about initial settings and current state of the tissue

$tissue->rq();
$tissue->nodeco_time( gas => 'n2' );

Calculates the time left in minutes before a tissue has reached the critical surface tension. In that case you can no longer return directly to the surface but will need to stop at a certain depth first.

$tissue->safe_depth( gas => 'n2' );

Returns the safe depth in meters to which you can ascend without exceeding one of the critical tissue tensions. These values are positive or 0. A value of 0 means you can surface without having any deco stops.

$tissue->M( depth => $depth );

Get the M-value for the specified depth. The M-value for sea-level is the famous M0. At depth you are allowed to have a greater tissue tension, which scales linearly with the depth.

$tissue->k( );

Returns the k-parameter (kind of the reverse of the tissue halftime)

$tissue->nr();

Returns the tissue number as found in the config file for this model.

$tissue->halftime();

Returns the halftime (in minutes) of the tissue.

$tissue->otu;

Returns the Oxygen Toxicity Units acquired during the dive sofar.

$tissue->calculate_otu;

Update the OTU value. You have to call this function after every time / depth change. It will add the found value to the internal otu counter and return the total value.

$tissue->gas( 'n2' => 34, '02' => 0.66 );

Set the fractions or percentages of the gases used. Supported gases are 'n2', 'o2' and 'he'. You can either enter percentages or fractions. Note that you are responsible for adding up the gases correctly to 100%.

$tissue->ambientpressure( $depth );

Returns the ambientpressure (in Bar) for the given depth (in meters). In case a depth is not supplied, the last internal depth stored into the tissue object will be used.

$tissue->internalpressure( gas => 'n2' );

Returns the internal pressure (in Bar) of the given gas. Of the gas is omitted, nitrogen (N2) will be used.

$tissue->percentage( gas => 'n2' );

Returns the percentage of tissue saturation for the given gas (N2 is default when gas parameter is omitted). This percentage is the pressure of the gas compared to the allowed M0 surfacing tension.

$tissue->point( $time, $depth);

Set a time (in seconds) , depth (in meters) combination for the tissue. Used when entering a dive profile. This routine will call the time() and depth() functions. You can call those individually as well, but the point() function makes sure that these functions are called in the right order, so that the most conservative calculation will be performed internally.

$tissue->time( $seconds )

Set the time of the the tissue. That is, the dive starts at 0 seconds, and you want to know how much nitrogen the tissue contains after 10 minutes at 20 meters, then you would call $tissue->depth(20) and $tissue->time( 600 );

$tissue->time_until_pressure( gas => 'N2', pressure => 1.34);

Calculates the time in minutes until the provided pressure in bar is reached for the provided gas. This function is very similar to the nodeco_time function (in fact it uses that one), but instead of the maximum allowed pressure used to calculate the no-deco time, you can provide your own pressure.

EXPORT

None by default.

SEE ALSO

Deco, Deco::Dive, Deco::Dive::Plot. SCUBA::Table::NoDeco might be of interest to you as well.

In the docs directory you will find an extensive treatment of decompression theory in the file Deco.pdf. A lot of it has been copied from the www.deepocean.net website.

AUTHOR

Jaap Voets, <narked@xperience-automatisering.nl>

COPYRIGHT AND LICENSE

Copyright (C) 2006 by Jaap Voets

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.