Hello and welcome to our community! Is this your first visit?
Register
Page 1 of 2 12 LastLast
Results 1 to 10 of 16
  1. #1
    Tamaso Maa Jyotir-Gamaya MadUKDiver's Avatar
    Join Date
    Aug 2014
    Location
    Dorset
    Posts
    355
    Likes (Given)
    381
    Likes (Received)
    190

    Yet Another Gas Mix Calculator (YAGaMiC)

    I highly recommend Nigel Hewitt's "Blender or Marcin "Hlp" Kaluza's HLP Blender for gas blending. Both excellent free pieces of software and they're spot on to achieve the desired outcome if you are blending (pure) helium and oxygen on top of a mix.

    However, in my case I don't have access to J's of helium so I often end up boosting an existing trimix on top of another mix, especially now I've acquired an electric gas booster. Looking through all of the gas mix calculator spreadsheets I've collected over the years (nearly a dozen of them) none of them will give me the recipe for blending two known trimix plus oxygen plus air to reach a defined target. Yes, you can do it piecewise with the above software but not in a single click.

    So this weekend I set out to write Yet Another Gas Mix Calculator. Initially I thought I would just follow the Ideal gas laws but having used the above programs I know this is a poor second to the better approximation of van der Waals (vdW) equation of state (EoS). So mad as I am I decided to tackle vdW's EoS in Excel!!

    Thank god for Nigel's treatise on vdW as without that I would have been stumped. I'm actually quite pleased with the end result so I thought I would share with everyone here. Here's an example turning 100 bar of 18/40 into 232 bar of 20/30 using 14/55 and EAN80 - calculated in less than a second!


    Download the file here YAGaMiC 2015 v1 (1.7)
    Download the file here YAGaMiC 2016 v2 (2.1) with GERG

    You will need to have the Excel "Solver" Add-In installed on your computer and to enable macros when the spreadsheet loads. YAGaMiC will load the Solver if it is present so you don't have to faff around in Excel Options.

    Most of the tabs are standard stuff that you will find in most blending software (with the twist of having both Ideal and vdW calculations on the same page). The first tab "Blend Calc" is where it fills the need that I have - put in your initial mix and desired target mix, tell it what gases you have available and it will attempt to compute the blending solution - nice, even if I do say so myself.

    Some solutions are possible but not useful (e.g. adding a negative quantity of gas) and sometimes Solver cannot converge (in which case you will get an error message) but surprisingly often there's a viable and useful solution. And because it's so quick you can play with the numbers to achieve close to your desired outcome.

    Whilst the tabs are 'protected' to stop accidental editing I did not password protect so if you fancy looking at the coding or making further improvements then fill your boots. With Excel VBA being so esoteric it will be a miracle if this runs for anyone else, let alone other platforms like Mac but who knows.

    [Polite] feedback welcome and if anyone actually finds this useful I wouldn't mind the odd PM to let me know.

    Have fun!
    Last edited by MadUKDiver; 26-06-2019 at 10:40 PM. Reason: Change of hosting for files, added v2 GERG

  2. #2
    Tamaso Maa Jyotir-Gamaya MadUKDiver's Avatar
    Join Date
    Aug 2014
    Location
    Dorset
    Posts
    355
    Likes (Given)
    381
    Likes (Received)
    190
    Based upon feedback I made a few minor changes...
    - Added additional information and a gas label to the plan sheet
    - Corrected minor bug on Top-Up sheet vdW gas volume (calculation order)
    - Added conditional formatting to highlight invalid gas mixtures

    The download link above points to the new file.

  3. #3
    Tamaso Maa Jyotir-Gamaya MadUKDiver's Avatar
    Join Date
    Aug 2014
    Location
    Dorset
    Posts
    355
    Likes (Given)
    381
    Likes (Received)
    190
    By request I added...
    - new tab for continuous blending
    - new tab for cylinder equalisation

    The download link above points to the new file.

  4. #4
    Established TDF Member DiverMike's Avatar
    Join Date
    Dec 2012
    Location
    Cheltenham, Glos.
    Posts
    986
    Likes (Given)
    263
    Likes (Received)
    249
    Which gas booster do you have? I wanted elec but could not find one for under £2.5k.

  5. #5
    Tamaso Maa Jyotir-Gamaya MadUKDiver's Avatar
    Join Date
    Aug 2014
    Location
    Dorset
    Posts
    355
    Likes (Given)
    381
    Likes (Received)
    190
    My booster was home made by a friend. He used it for a number of years but recently decided to stop diving so I bought it off him.
    We cannot banish dangers, but we can banish fears. We must not demean life by standing in awe of death” -- David Sarnoff

  6. #6
    Tamaso Maa Jyotir-Gamaya MadUKDiver's Avatar
    Join Date
    Aug 2014
    Location
    Dorset
    Posts
    355
    Likes (Given)
    381
    Likes (Received)
    190
    I've added another tab that does calculations for boosting gas between cylinders (you can also use it for decanting too).

    The link above goes to the latest copy.

    Whilst I'm no expert on Thermodynamics so the calculations could be a load of tosh I have included a few items such as adiabatic compression temperature, drive gas required etc. Adiabatic compression temperature might not seem immediately useful (because it represents the temperature achieved in a system without any heat loss and our boosters are designed to at least try and stay cool) but empirically you can see the additional stress of helium and dramatic rises as the supply pressure drops off which clearly illustrates why you shouldn't use a baby booster as a scavenger pump (in case you failed to notice that part of the manual!).

    Differences between Ideal gas Laws and van der Waal's approximation also somehow seem to stand out more on this sheet too.

    Perhaps less intuitive (you can shuttle gas left to right or right to left depending upon the sign in the pressure box and the flow direction determines which side is dominant for the final mix) but I can't be bothered to write any instructions and I'm sure everyone will work it out for themselves.

    If you think any of the results are wrong then please PM me with details of the settings (and ideally a reference to the method you used to calculate the 'right' answer).
    We cannot banish dangers, but we can banish fears. We must not demean life by standing in awe of death” -- David Sarnoff

  7. #7
    Tamaso Maa Jyotir-Gamaya MadUKDiver's Avatar
    Join Date
    Aug 2014
    Location
    Dorset
    Posts
    355
    Likes (Given)
    381
    Likes (Received)
    190
    Added a new tab to calculate cylinder buoyancy (following the recent thread on this topic).

    You can select some typical values for cylinders, valves and salinity/density from drop down lists or type your own figures.

    As always the latest file is available from the link in the first post.

  8. #8
    Tamaso Maa Jyotir-Gamaya MadUKDiver's Avatar
    Join Date
    Aug 2014
    Location
    Dorset
    Posts
    355
    Likes (Given)
    381
    Likes (Received)
    190
    YAGaMiC - Now with added GERG

    With the addition of GERG method for calculating the z - function of a mixture of pure gases YAGaMiC becomes state-of-the-art and the only software that shows the results of 3 methods of calculating gas mixtures on the same screen giving you greater choice and control when blending diving gases.

    "GERG-2004 is (currently) the holy grail of equations of state. GERG stands for “Groupe Européen de Recherche Gazière” (European Gas Research Group), a joint effort by the main gas companies of Europe." - David de Marneffe, December 2007

  9. #9
    Established TDF Member matt's Avatar
    Join Date
    Dec 2012
    Location
    London
    Posts
    4,150
    Likes (Given)
    976
    Likes (Received)
    1236
    Nice. Just grabbed the latest version and spotted "Diving Sums" :-)

  10. #10
    TDF Member
    Join Date
    Apr 2013
    Location
    Torphins, Aberdeenshire
    Posts
    97
    Likes (Given)
    48
    Likes (Received)
    24
    Great stuff. Just love it.


 
Page 1 of 2 12 LastLast

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •