What If: add gas and see the mix

What mix you get when you add given pressures of oxygen, helium and/or air to what is in the tank (the app's What If): the pressure after each addition, the resulting mix, its MOD, EAD, END and gas density.

post/api/v1/what_if

Request

  • Base URL: https://indamix.divingtechnics.com
  • URL: https://indamix.divingtechnics.com/api/v1/what_if
  • Auth: none required

Request body

start_pressurenumber

Pressure already in the tank, in pressure_unit. 0 = empty. This changes the result a lot: if the user did not give it, ask before calling. If you call without it, the tool assumes an empty tank and lists that in assumed.

start_o2_percentnumber

O2 percent of the gas already in the tank (21 for air).

start_he_percentnumber

He percent of the gas already in the tank.

add_oxygennumber

Pressure of pure oxygen added, in pressure_unit.

add_heliumnumber

Pressure of pure helium added, in pressure_unit.

add_airnumber

Pressure of air added, in pressure_unit.

helium_firstboolean

Partial pressure: add helium before oxygen (trimix, heliox).

method'IDEAL_GAS_DALTON' | 'IDEAL_GAS_Z_FACTOR' | 'VAN_DER_WAALS' | 'REDLICH_KWONG' | 'PENG_ROBINSON' | 'MULTIDECO_Z_FACTOR' | 'GASGURU_REAL_GAS' | 'GASGURU_IDEAL_GAS' | 'DIVESOFT_IDEAL_GAS' | 'DIVESOFT_REAL_GAS'

Calculation method (equation of state), as in the app. Default from the In Da Mix settings (see list_methods for the current default); listed in assumed. IDEAL_GAS_DALTON is the simple ideal-gas method; DIVESOFT_REAL_GAS also plans the decant from the banks.

temperaturenumber

Fill-site (ambient) temperature, in temperature_unit. Default from the In Da Mix settings; listed in assumed.

target_depthnumber

Depth for the gas density, in depth_unit. Default 30 m.

dive_mode'OC' | 'CCR'

Open circuit (OC) or closed-circuit rebreather (CCR). Sets which defaults apply (from the In Da Mix settings: ppO2, END, density, O2 narcotic). The values used are listed in assumed.

pressure_unit'bar' | 'psi'

Unit of every pressure in the question and the answer.

depth_unit'm' | 'ft'

Unit of every depth in the question and the answer.

temperature_unit'C' | 'F'

Unit of the fill temperature.

language'en' | 'hr'

Language of the texts in the answer: en (English) or hr (Croatian). Use the user's language.

include_stepsboolean

Also return the app's ƒx steps ("How this was calculated"): every formula with its numbers. Long: only when the user asks how it was calculated.

Response

The calculation: summary (the steps or result in the user's language), the numbers, and the analyser disclaimer to pass on. If error is set, the calculation was refused; explain message to the user.

summarystring required

The answer as text lines, in the requested language.

disclaimerstring

Always pass this on to the user.

versionstring

The In Da Mix version that calculated this, v<version>.<build>.

excel_urlstring

Link to the Excel workbook of this calculation (the app's View in Excel). Give it to the user when they want a spreadsheet or the full working.

fx_stepsobject[]

With include_steps: the app's ƒx steps (title, formula, values, result, detail) in the user's language.

termsstring

The terms of use notice with its link: show it to the user once, with the first In Da Mix answer of a conversation.

errorstring

Set when the calculation was refused (an engine error code or INVALID_INPUT).

messagestring

Why it was refused, in the user's language.

Changes

No recorded changes to this operation across all 1 revision of this API.