Decant (cascade from cylinders)

Decanting one gas (oxygen, or helium) from source cylinders into a small cylinder without a compressor, as the app's Decant: a cascade, each cylinder equalised in turn (ideal gas). g.

post/api/v1/decant

Request

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

Request body

plan'refills' | 'diving_days'

refills: the tank goes from start_pressure to target_pressure at every refill. diving_days: the app's Decant planner (use per day, dives a day).

tank_volume_lnumber

Water volume of the cylinder being refilled, litres (e.g. a rebreather's 2 or 3 L).

start_pressurenumber

refills: the tank's pressure before each refill (what is left after a dive), 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. diving_days: its pressure now.

target_pressurenumber

refills: the pressure wanted after each refill, in pressure_unit (needed). diving_days: the pressure it is filled to at most.

gas_o2_percentnumber

O2 percent of the gas decanted (100 for oxygen, 0 for helium); only names it in the answer.

gas_he_percentnumber

He percent of that gas.

refillsinteger

refills: how many refills in a row are wanted (e.g. dives − 1). Left out: as many as the cylinders give.

dives_per_dayinteger

diving_days: dives a day.

min_pressure_before_divenumber

diving_days: the cylinder needs at least this before a dive, in pressure_unit.

use_per_day_minnumber

diving_days: lowest O2 use a day, in pressure_unit of the cylinder.

use_per_day_maxnumber

diving_days: highest O2 use a day. Give one use: both are taken as it.

fill_before_every_diveboolean

diving_days: refill before every dive (true) or once a day (false).

min_pressure_to_start_daynumber

diving_days, daily fill: the cylinder must start the day with at least this. Default: min_pressure_before_dive + use_per_day_max × (dives_per_day − 1) / dives_per_day.

pressure_unit'bar' | 'psi'

Unit of every pressure in the question and the answer.

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.