comparison code_part1/OSTC_code_c_part2/p2_deco.c @ 821:162058703100

FIX NDL prediction error with Buhlmann model: might be desaturating too fast.
author heinrichsweikamp
date Wed, 17 Jun 2015 13:33:15 +0200
parents 2a0e5d884fc3
children
comparison
equal deleted inserted replaced
820:4fd718965e8f 821:162058703100
90 // 2013/05/08: [jDG] A. Salm remark: NOAA tables for CNS are in ATA, not bar. 90 // 2013/05/08: [jDG] A. Salm remark: NOAA tables for CNS are in ATA, not bar.
91 // 2013/10/22: [mH] Remove CF55 stuff 91 // 2013/10/22: [mH] Remove CF55 stuff
92 // 2013/12/21: [jDG] Fix CNS calculation in decoplan w/o marked gas switch 92 // 2013/12/21: [jDG] Fix CNS calculation in decoplan w/o marked gas switch
93 // 2014/06/16: [jDG] Fix Helium diluant. Fix volumes with many travel mix. 93 // 2014/06/16: [jDG] Fix Helium diluant. Fix volumes with many travel mix.
94 // 2014/06/29: [mH] Compute int_O_ceiling 94 // 2014/06/29: [mH] Compute int_O_ceiling
95 // 2015/06/12: [jDG] Fix NDL prediction while desaturating with the Buhlmann model.
95 // 96 //
96 // TODO: 97 // TODO:
97 // + Allow to abort MD2 calculation (have to restart next time). 98 // + Allow to abort MD2 calculation (have to restart next time).
98 // 99 //
99 // Literature: 100 // Literature:
1513 overlay float dTHe = (ppHe - tHe) * var_He_e; 1514 overlay float dTHe = (ppHe - tHe) * var_He_e;
1514 1515
1515 //---- Apply security margin when using the non-GF model 1516 //---- Apply security margin when using the non-GF model
1516 if( char_I_deco_model == 0 ) 1517 if( char_I_deco_model == 0 )
1517 { 1518 {
1518 dTN2 *= float_saturation_multiplier; 1519 // NDL can be computed while ascending... SO we have
1519 dTHe *= float_saturation_multiplier; 1520 // to check wether we are saturating or desaturating.
1521 if( dTN2 > 0.0 ) dTN2 *= float_saturation_multiplier;
1522 else dTN2 *= float_desaturation_multiplier;
1523
1524 if( dTHe > 0.0 ) dTHe *= float_saturation_multiplier;
1525 else dTHe *= float_saturation_multiplier;
1520 } 1526 }
1521 else // Or GF-based model 1527 else // Or GF-based model
1522 M0 = GF_high * (M0 - pres_surface) + pres_surface; 1528 M0 = GF_high * (M0 - pres_surface) + pres_surface;
1523 1529
1524 //---- Simulate off-gasing while going to surface 1530 //---- Simulate off-gasing while going to surface