Gas blender Toolkit, wrong calculation?

Please register or login

Welcome to ScubaBoard, the world's largest scuba diving community. Registration is not required to read the forums, but we encourage you to join. Joining has its benefits and enables you to participate in the discussions.

Benefits of registering include

  • Ability to post and comment on topics and discussions.
  • A Free photo gallery to share your dive photos with the world.
  • You can make this box go away

Joining is quick and easy. Log in or Register now!

My it cunsultant tried to make the excel work on his PC, it did not. He is asking: on which excel version does it work? He saw something like 2016.

Does it only work on 2016 or older?

Sorry for my question, I am not the expert at all.....
I've used various version of Excel and not had any problems. Currently I'm using Excel as part of Microsoft 365 MSO.

2021-11-14_122321.jpg


If it is not the Add-in then I suspect it is a language localisation issue. I'm running Excel in MS Windows 10 with a UK English localisation. If you are running under a non English localisation then perhaps a different number format or other localisation is causing an exception in the code. I'm sorry I'm not able to repeat and therefore fix this problem for you.

To answer your other question, I know that Baltic blender uses GERG , I'm not sure which other tools do.
 
Great thank you. I give this information to my it expert.

@all: does this Excel work anywhere in German language?

Baltic Blender does not work on my iPhone but I just found it working on my iPad. Strange. Again my it expert has to work on that....
 
After a DM discussion, I think I have to update my calculation. The problem is that the statement "you have to top up with x bars of EAN34" is ambiguous exactly because EAN34 is not an ideal gas and the same amount of gas at say 20bar is not the same as the difference between 250bar and 270bar.

I think the practically relevant question should be: Starting with 150 bar of EAN29, up to which pressure do I have to top up EAN34 such that when I finally add air up to a pressure of 270 bar, I end up with EAN29 again?

Let's do this calculation first in terms of volumes. Everything here is per 1 litre of cylinder. The 150bar of EAN29 at 1 bar expand to 149.3 litres. Similarly the 270 bar would expand to 251 litres. Thus, at 1 bar ambient pressure I would have to add 101.7 litres of EAN29. By looking and the total volume and the amount of O2 contained, I find that I can mix those 39.1 litres of air plus 62.6 litres of EAN34.

Since I decided to first add the EAN34, I next need to figure out what kind of mix is 149.3 litres of EAN29 plus 62.6 litres of EAN34. Turns out this is about EAN30.5. So the question is: At which pressure is 149.3 litres + 62.6 litres of EAN30.5 compressed to 1 litre? Turns out, this is 220.1 bar. This is the information actually relevant to the blender.

If you really insist on "how many bars do I have to top up?", that should probably be answered by 220.1 bar - 150 bar = 70.1 bar.

Here is the relevant part of my mathematica notebook where i do this calculation.
Screenshot 2021-11-15 at 23.24.20.png
 
The toolkit doesn't handle the addition of two gasses, but you could always go back to first principles. You have two unknowns: x=amount of EAN 34 to add and y=amount of air. You have two equations: 1) the amount of O2 and 2) the total pressure. Either do the math on a calculator or the easiest approach is to type this expression into Wolfram Alpha:
  • 150*0.29 + x*0.34 + y*0.209 = 270*0.29, 150+x+y=270
As @Agro said, "74 bar of EAN 34, top off by air." 👍

View attachment 689596
Let us not forget compressibility if we use gas pressure instead of gas weight.
300 ATA of pressure actually only means 270 times gas. And 270 means 250. And 250 means 240. Just a rule of thumb!
 
@MadUKDiver have you developed any other ss goodies?

One ss Id really like to have is to be able to plug in what mixes i have available lets say in 2-3 bottles (which I inevitably end up with ) with pressures and then enter an end mix i want and get the ss to work out how to achieve it ( so if you feel inclined :wink:)
 
Hey Atdotde, thank you very much, looks great indeed.

Does it work on Gerg?

Looks like a reimplementation of gas-model.c from Subsurface, which is a best fit to the tables in Perry’s Chemical Engineers’ Handbook. Those are tables 2-165, 2-179, 2-180 for nitrox components. They intern reference Vasserman's Properties of Air and Air Components. @atdotde correct me if I misinterpreted what your script does.

It's probably worth noting that these compressibility assume you are moving along a 300 K isotherm.

Great, thank you very much.

Now let's talk about
- ideal gas calculation: does not work on high pressure
- Van der Waals
- GERG

Until now I only knew ideal gas and Van der Waals. I thougt that Van der Waals is equal to real gas calcualtion. Now we were told, GERG is better than Van der Waals, so far so good. And very good to know.

As far as I know there is no other gas blender tool that uses GERG. They all say "real gas" and work with Van der Waals. Or am I wrong?

For nitrox, the mix calculated using Subsurface's real gas model and GERG-2004 are compatible well beyond the other uncertainties in the gas mixing. For trimix it's unclear to me which one is better. I don't know of a source that has empirical measurements of compressibility for Oxygen, Helium, Nitrogen mixtures. You have to make some assumptions on how the intermolecular forces behave when you start mixing multiple components in different ratios.

It seems like Subsurface treats the compressibilities as independent. I'm not sure about GERG-2004, but it looks like it might be some sort of geometric mean of the Helmholtz surface. You could make a similar assumption about the Van der Waals coefficients, though again I'm not aware of a standard set of observations to compare to.

Some compressibility outputs of various models for some sample mixes are plotted below.
 

Attachments

  • Compressibility.png
    Compressibility.png
    160.9 KB · Views: 169
Great, great, great, thank you very much. For me it's the perfect gasblender tool, best I've ever seen.

Atdote can you say something about goldfishtornado's post?
 

Back
Top Bottom