Mercurial > public > ostc4
comparison Discovery/Src/buehlmann.c @ 1049:d91345e9c009 GasConsumption
Added GF for surface:
The GF for the surface will now be shown in the lowerleft corner as well as in the customer summary view.
| author | Ideenmodellierer |
|---|---|
| date | Tue, 18 Nov 2025 18:53:21 +0100 |
| parents | 7891160acde3 |
| children | 88b6ab90c55a |
comparison
equal
deleted
inserted
replaced
| 1048:493a5903ec20 | 1049:d91345e9c009 |
|---|---|
| 318 { | 318 { |
| 319 float tissue_inertgas_saturation; | 319 float tissue_inertgas_saturation; |
| 320 float inertgas_a; | 320 float inertgas_a; |
| 321 float inertgas_b; | 321 float inertgas_b; |
| 322 float ceiling; | 322 float ceiling; |
| 323 float M_surf,gf_surf; | |
| 323 float super_saturation; | 324 float super_saturation; |
| 324 float pres_respiration = pLifeData->pressure_ambient_bar; | 325 float pres_respiration = pLifeData->pressure_ambient_bar; |
| 326 float pres_surface = pLifeData->pressure_surface_bar; | |
| 325 int ci; | 327 int ci; |
| 326 | 328 |
| 327 pDecoInfo->super_saturation = 0; | 329 pDecoInfo->super_saturation = 0; |
| 330 pDecoInfo->gf_surf = 0; | |
| 328 | 331 |
| 329 for (ci = 0; ci < 16; ci++) | 332 for (ci = 0; ci < 16; ci++) |
| 330 { | 333 { |
| 331 if(gTissue_helium_bar[ci] == 0) | 334 if(gTissue_helium_bar[ci] == 0) |
| 332 { | 335 { |
| 337 else | 340 else |
| 338 { | 341 { |
| 339 tissue_inertgas_saturation = gTissue_nitrogen_bar[ci] + gTissue_helium_bar[ci]; | 342 tissue_inertgas_saturation = gTissue_nitrogen_bar[ci] + gTissue_helium_bar[ci]; |
| 340 inertgas_a = ( ( buehlmann_N2_a[ci] * gTissue_nitrogen_bar[ci]) + ( buehlmann_He_a[ci] * gTissue_helium_bar[ci]) ) / tissue_inertgas_saturation; | 343 inertgas_a = ( ( buehlmann_N2_a[ci] * gTissue_nitrogen_bar[ci]) + ( buehlmann_He_a[ci] * gTissue_helium_bar[ci]) ) / tissue_inertgas_saturation; |
| 341 inertgas_b = ( ( buehlmann_N2_b[ci] * gTissue_nitrogen_bar[ci]) + ( buehlmann_He_b[ci] * gTissue_helium_bar[ci]) ) / tissue_inertgas_saturation; | 344 inertgas_b = ( ( buehlmann_N2_b[ci] * gTissue_nitrogen_bar[ci]) + ( buehlmann_He_b[ci] * gTissue_helium_bar[ci]) ) / tissue_inertgas_saturation; |
| 345 } | |
| 346 | |
| 347 M_surf = inertgas_a + inertgas_b * pres_surface; | |
| 348 if (M_surf > pres_surface) | |
| 349 { | |
| 350 gf_surf = (tissue_inertgas_saturation - pres_surface) / (M_surf - pres_surface); | |
| 351 if(gf_surf > pDecoInfo->gf_surf) | |
| 352 { | |
| 353 pDecoInfo->gf_surf = gf_surf; | |
| 354 } | |
| 342 } | 355 } |
| 343 | 356 |
| 344 ceiling = pres_respiration / inertgas_b + inertgas_a; | 357 ceiling = pres_respiration / inertgas_b + inertgas_a; |
| 345 if(tissue_inertgas_saturation > pres_respiration) | 358 if(tissue_inertgas_saturation > pres_respiration) |
| 346 { | 359 { |
