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!

I’m not a technical diver for sure, but do some blending. Appears Baltic Blender will do what you want.

10004EA5-DCD7-4075-B07A-4B5D58A5E2A5.jpeg
 
The assumption of having ideal gases at 270bar as well as the assumption that the temperature does not change are probably both quite bad in reality, so this is mostly of academic value. I would do this in a spreadsheet, here is my example attached. Have a look at the formulas, I arrived at it with "Goal seek" for the cell "difference" with variable cell "nitrox top up". To accommodate real gases, I recommend using an approach as in Subsurface subsurface/gas-model.c at master · subsurface/subsurface (this turns out to be much more accurate than van der Vaals) but right now I am too lazy to port that to excel.

PS: If anybody from the admins reads this: Why can I attach an xlsx file from Excel but not a LIbreOffice .ods file?
 

Attachments

  • mixing.xlsx
    5 KB · Views: 117
OK, I did the real gas calculation in mathematica. My notebook (containing other calculations dealing with gas density, that's for another day) is here: Wolfram Cloud
Turns out (I had to make an assumption about the the pressure of your EAN34 cylinder) that it's closer to 67bar of EAN34 and 42bar or of air.
 
I think @atdotde is right the differences are mostly academic for this application.

If you want to stick with blender-toolkit for temperature correction and van der Waals gas model, you can calculate your quantities using an iterative approach.

For example:
Start with the 74 bar fill of EAN34 everyone gets from the ideal gas approximation. Put that into the "Topoff tool" in blender-toolkit as 224 bar in the "Desired pressure" field, with your EAN29 at 150 bar in the receiver tank and EAN34 in the Storage tank. This gives an resulting mix of 30.5 O2%, which you can use blender-toolkit's temperature correction on. Then fill to 270 bar with air using the intermediate B2 result for your new B1. This gives a final mix of 29.3 O2% at 270 bar (again you can use the built in temperature correction tool). So the ideal gas approximation is close, but having the temperature correction might be useful.

If you are unhappy with that result you can iterate again. Using Newton's method (I did an iteration with an intermediate fill to 200 bar to find the slope) the result converges in a single round to an intermediate fill of 217 bar and 30.41 O2%, and a final fill to 270 bar at 29.0 O2%. This is the same 67 bar intermediate fill atdotde get's with wolfram alpha.
 
Unfortunately it's only available on iphone
Sorry to hear that. I use on iPad as well. Anyone who needs an analysis done just send your parameters to me and I’ll give you the recipe. :cool:
 
Oh now I see the problem, top off with air and EAN34 is not possible in this software. Such a pity.

DiveClibRide's calculation is good but again it does not work at high pressure because of Van der Waals.

I will start a new thread: which software can calculate this.
 
I will start a new thread: which software can calculate this.
Why? How often are you doing this?

You can break down your 34% and 29% into their O2 and N2 fractions. then calculate that way in a spreadsheet and even include van de waals
 
Sorry, I did not see the last postings befor my reply.

Temperature is not a problem, I always let the cylinder cool down and top off again. So I do have constant temperature.

Calculation on ideal gases ist not working well at 270 bar. Try a calculaton on Van der Waals, then calcualtate again on ideal gases. Differences sometimes are big, sometimes small. Definitely not an academic thing.

I want a software which calculates on Van der Waals. I do not want an iterative approach. This might be OK for others, not for me.

I bought baltic blender, unfortunately it does not work on my iPhone. I can put in premix, pressure and so on but when I put in the last number (desired pressure) it stopps working instead of calculating.
 
I think you want a real gas model, not necessarily van der Waals. As it turns out (tried it for you: When real gas corrections matter – The Theoretical Diver), the two parameter van der Waals model is not good in computing the compressibility (1-Z) for gases used in diving in the range of pressures and temperatures you are interested in. Quoting from Van der Waals equation - Wikipedia

However, the values of physical quantities as predicted with the Van der Waals equation of state "are in very poor agreement with experiment", so the model's utility is limited to qualitative rather than quantitative purposes.
 
https://www.shearwater.com/products/swift/
http://cavediveflorida.com/Rum_House.htm

Back
Top Bottom