mirror of
https://github.com/subsurface/subsurface.git
synced 2025-02-19 22:16:15 +00:00
VPM-B: add vpm-b based deco checking.
Check during the trial_ascent() if existing pressure gradient is smaller than previously calculated max gradient. If not, ascent is impossible from the vpm-b's point of view. Signed-off-by: Jan Darowski <jan.darowski@gmail.com>
This commit is contained in:
parent
fad592e43a
commit
e7aa686f16
3 changed files with 21 additions and 1 deletions
15
deco.c
15
deco.c
|
|
@ -210,6 +210,21 @@ double he_factor(int period_in_seconds, int ci)
|
|||
return cache[ci].last_factor;
|
||||
}
|
||||
|
||||
bool is_vpmb_ok(double pressure)
|
||||
{
|
||||
int ci;
|
||||
double gradient;
|
||||
double gas_tension;
|
||||
|
||||
for (ci = 0; ci < 16; ++ci) {
|
||||
gas_tension = tissue_n2_sat[ci] + tissue_he_sat[ci] + vpmb_config.other_gases_pressure;
|
||||
gradient = gas_tension - pressure;
|
||||
if (gradient > total_gradient[ci])
|
||||
return false;
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
void vpmb_start_gradient()
|
||||
{
|
||||
int ci;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue