Skip to content

dive-math / blending / partialPressureBlend

Function: partialPressureBlend() ​

partialPressureBlend(input): BlendResult

Defined in: blending/partial-pressure.ts:187

Partial-pressure blend: pure He, pure O₂, then a top-up gas, with an analytic bleed-down when the start gas is in the way.

With useRealGas, the system is solved in moles (ideal-equivalent absolute bar, see idealEquivalentPressure) and replayed in order; steps[].toBar is the gauge reading after each addition and pHe/pO2/pTop are the gauge increments. All pressures are gauge bar in every case; an infeasible result reports the ideal-gas solution from the unbled start, so its (possibly negative) partials show the shortfall.

Parameters ​

input ​

BlendInput

Returns ​

BlendResult

Example ​

ts
partialPressureBlend({ startBar: 0, startGas: AIR, finalBar: 200, targetGas: gas(0.18, 0.45) }).pHe // 90

Reference only — verify every fill and dive plan independently.