Top up with a supply gas

Top a tank up with a ready-made supply gas (air, EAN32, a trimix premix…): the pressure added, the mix you end up with, its MOD, and the gas density at a depth. For a ready-made supply gas; to add pure oxygen or helium use what_if or blend.

post/api/v1/top_up

Request

  • Base URL: https://indamix.divingtechnics.com
  • URL: https://indamix.divingtechnics.com/api/v1/top_up
  • 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.

target_pressurenumber required

Fill pressure wanted, in pressure_unit (e.g. 200 or 232 bar, 3000 psi).

supply_o2_percentnumber required

O2 percent of the ready-made supply gas (20.9 for air, 32 for EAN32).

supply_he_percentnumber

He percent of the supply gas.

target_depthnumber

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

use_boosterboolean

A gas booster is available: banks that can't decant high enough are boosted. With DIVESOFT_REAL_GAS it changes the plan; with other methods it only plans the gas.

tank_volume_lnumber

Water volume of the tank being filled, litres (a twin 12 = 24). Used for gas litres and bank use.

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.

heat_correctionboolean

Correct for the heating of the gas while filling.

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.