Skip to content

Commit

Permalink
Added gas blender and redundancies to doc
Browse files Browse the repository at this point in the history
  • Loading branch information
jirkapok committed Mar 7, 2024
1 parent f6fb907 commit b4f9ad1
Show file tree
Hide file tree
Showing 3 changed files with 51 additions and 25 deletions.
31 changes: 29 additions & 2 deletions doc/calculators.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
* [Altitude](./calculators.md#altitude)
* [Weight](./calculators.md#weight)
* [Redundancies](./calculators.md#redundancies)
* [Gas blender](./calculators.md#gas-blender)

## No decompression limits

Expand Down Expand Up @@ -50,5 +51,31 @@ The weight calculator helps to estimate required additional lead the diver needs

This calculator allows you to combine gas from two tanks marked as `First tank` and `Second tank` using ideal gas law. Content of th gas does`nt matter, because here we focus on the gas volume only, not its content.
The result of combining the gas volume is shown in Final pressure. Both tanks will have the same pressure even not the same cylinder volume.
Since we are using ideal gas law for the calculation, keep in mind to combine the gas using slow flow to prevent pressure loses due to temperature increase.

Since we are using ideal gas law for the calculation, keep in mind to combine the gas using slow flow to prevent pressure loses due to temperature increase.

```text
Example:
First tank is 12 L (124.1 cuft) and contains 50 b (725 psi) only.
Second tank is 24 L (85 cuft) and contains 200 b (2900 psi).
Final pressure in both tanks will be the same:
(12 * 50 + 24 * 200) / (12 + 24) = 150 b (2175 psi)
```

## Gas blender

This calculator helps to create gas mixes using partial pressures method for source tank (even with remaining gas in it) using top mix, oxygen and helium.
Results are show in separate table. This calculator uses ideal gas law.
The expected procedure is to empty, release or start with remaining gas.
Then add helium and oxygen and finally top with top mix up to the required pressure.

```text
Simplified Example:
Use air and oxygen only to mix 200 b of Ean32 to tank with 50 b of air.
Nitrogen in Ean32 = 1 - 0.32 = 0.68
Required nitrogen content = 200 * 0.68 = 136 b nitrogen
Nitrogen in Air = 1 - 0.21 = 0.79
Current nitrogen content = 50 * 0.79 = 39.5 b nitrogen
We need to add = 136 - 39.5 = 96.5 b nitrogen
i.e. We need to add = 96.5 / 0.79 = 122 b air
But first we add = 200 - 50 - 122 = 28 b oxygen
```
36 changes: 21 additions & 15 deletions doc/links.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,25 @@

Following list of external sources was used to develop this application and can be used as reference and study material.

Inspired by:
# Inspired by:

* <https://github.com/Subsurface-divelog>

Based on following references:
## At time of development also other implementations are available:

* <https://github.com/igaponov/deco-model>
* <https://github.com/oliverjohnstone/npm-buhlmann-ZH-L16>
* Gas mixture calculator: <https://github.com/eianlei/pydplan>
* Mobile first DiveProMe+ <https://vlasovalexey.github.io/DiveProMe/>

## Alternatives

* <https://diveplanner.online/planner>
* <https://play.google.com/store/apps/details?id=com.techdeco.mcp>
* <https://play.google.com/store/apps/details?id=com.hhssoftware.multideco>
* <https://play.google.com/store/apps/details?id=com.diveprome.avlasov.diveprome>

## Based on following references:

* <https://github.com/archisgore/online-deco-console>
* <https://github.com/nyxtom/dive>
Expand All @@ -25,19 +39,7 @@ Based on following references:
* <https://onedrive.live.com/?authkey=%21ACenWvokBcikpo0&id=24444EC0EEA41A1B%2112595&cid=24444EC0EEA41A1B&parId=root&parQt=sharedby&parCid=8D71FF700D902B86&o=OneUp>
* <https://www.hhssoftware.com/v-planner/decomyths.html>

At time of development also other implementations are available:

* <https://github.com/igaponov/deco-model>
* <https://github.com/oliverjohnstone/npm-buhlmann-ZH-L16>
* Gas mixture calculator: <https://github.com/eianlei/pydplan>
* Mobile first DiveProMe+ <https://vlasovalexey.github.io/DiveProMe/>

Alternatives

* <https://diveplanner.online/planner>
* <https://play.google.com/store/apps/details?id=com.techdeco.mcp>
* <https://play.google.com/store/apps/details?id=com.hhssoftware.multideco>
* <https://play.google.com/store/apps/details?id=com.diveprome.avlasov.diveprome>
## Related links

* Add air breaks
* <https://dan.org/alert-diver/article/understanding-oxygen-toxicity/>
Expand All @@ -46,3 +48,7 @@ Alternatives
* <https://www.diverite.com/uncategorized/oxygen-toxicity-and-ccr-rebreather-diving/>
* <https://www.diverite.com/articles/oxygen-toxicity-signs-and-symptoms/>
* Diverite and decodopler: 20min./5 min.
* Gas blender
* https://github.com/atdotde/realblender
* https://github.com/subsurface/subsurface/blob/master/core/gas-model.c
* https://thetheoreticaldiver.org/wordpress/index.php/2021/11/16/blending-real-gases/
9 changes: 1 addition & 8 deletions doc/roadmap.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@ Following list of features and improvements ordered by priority is under develop
* Fix wrong time format message in console created by plotly - requires more customization and additional reference to d3, wan't fix
* TTS is calculated from last user defined point, not from the deepest point
* Main menu overlaps the tabs, when text is wrapped on two rows (and some other responsiveness glitches)
* Redundancies calculator does not show values after switch to imperial units

## Improvements / Features

Expand All @@ -18,12 +17,6 @@ Following list of features and improvements ordered by priority is under develop
* https://progressier.com/
* https://developer.mozilla.org/en-US/docs/Web/Progressive_web_apps/Tutorials/js13kGames/Offline_Service_workers
* https://developers.google.com/codelabs/pwa-training/pwa03--going-offline#1)
* Gas blender calculator
* Add use case, if we need release some pressure from the tanks, because otherwise we are unable mix
* Check the real gas blending as replacement of ideal law
* https://github.com/atdotde/realblender
* https://github.com/subsurface/subsurface/blob/master/core/gas-model.c
* https://thetheoreticaldiver.org/wordpress/index.php/2021/11/16/blending-real-gases/
* Allow user to compare multiple plans side by side
* I want compare consequences of emergency ascent
* I want to plan a dive and choose from two following plans or two independent plans
Expand Down Expand Up @@ -62,7 +55,7 @@ Following list of features and improvements ordered by priority is under develop
* Extend application settings:
* Define custom maximum gas density
* Custom diver stress sac rate ratio
* Add option to ignore some warnings
* Add minimum gas reserve for first tank and for stage
* Add option to ignore some warnings
* Add more variables to weight calculator (suits, BMI, tank material, water type)

0 comments on commit b4f9ad1

Please sign in to comment.