Gas algorithms

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!

Lonefox

Contributor
Messages
93
Reaction score
0
Location
Brighton, UK
# of dives
25 - 49
Hi,

I'm working on my degree project for software development, and was wondering whether anyone could offer me some advice on formulas I can use.

What I am developing is a graphical scuba simulation, to model nitrogen load, safety stops and ascent rates.

I anticipate that I would need to model events such as buoyancy, ascent and gas expansion within a BCD for a diver who is overweighted/underweighted and perfectly weighted, the capacity of the BCD would be treated as a constant, and it's content would increase or decrease within the constraints of it's capacity, depending on pressure and the actions of the diver dumping or inflating.

Having experienced runaway ascents due to overweighting, as a result of requiring larger gas volumes to acheive neutrality, which subsequently expand as the ambient pressure decreases, I would also like to take this into account within my simulation.

Also I would need a method to model nitrogen load based on multilevel profiles using various nitrox mixes, and surface intervals.

While scientific accuracy is not a requirement, I do need to produce a believable simulation, the aim of which would be to serve as a training model for new scuba students.

I have already concluded that standard tables are not sufficient to represent the multilevel aspects of my simulation, and I would also like my model to reflect the effects of sawtooth profiles.

If anyone is able to point me in the direction of some basic algorithms to reflect what I am trying to achieve, I would be most grateful.

Please note again, that this is to implement within a simple training game, and only need be representative of the factors involved, to demonstrate to a student the effect that some choices may have, it doesn't need to be a perfect scientific model.

Thankyou in advance.

Glenn
 
For deco theory, try "Deco For Divers" by Mark Powell

Richard
 
Hi,

I'm working on my degree project for software development, and was wondering whether anyone could offer me some advice on formulas I can use.

What I am developing is a graphical scuba simulation, to model nitrogen load, safety stops and ascent rates.

I anticipate that I would need to model events such as buoyancy, ascent and gas expansion within a BCD for a diver who is overweighted/underweighted and perfectly weighted, the capacity of the BCD would be treated as a constant, and it's content would increase or decrease within the constraints of it's capacity, depending on pressure and the actions of the diver dumping or inflating.

Having experienced runaway ascents due to overweighting, as a result of requiring larger gas volumes to acheive neutrality, which subsequently expand as the ambient pressure decreases, I would also like to take this into account within my simulation.

Also I would need a method to model nitrogen load based on multilevel profiles using various nitrox mixes, and surface intervals.

While scientific accuracy is not a requirement, I do need to produce a believable simulation, the aim of which would be to serve as a training model for new scuba students.

You've selected what could easily be a lifetime of work. Is it too late to change or narrow your project?

I would certainly recommend avoiding the last part. "Accuracy is not a requirement" combined with "training model for new students" is a recipe for disaster.

Terry
 
For the nitrogen loading try this: http://www.lizardland.co.uk/DIYDeco.html This covers nitrogen loading as per Buhlmann’s model (i.e. a dissolved gas model). You will need to get half time coefficients as well but you can Google those.

Buoyancy is rather simpler. Consider Boyle's law, and Archimedes Principal in the BC and exposure protection and you should be covered.
 
You've selected what could easily be a lifetime of work. Is it too late to change or narrow your project?

I would certainly recommend avoiding the last part. "Accuracy is not a requirement" combined with "training model for new students" is a recipe for disaster.

Terry

Hi Terry,

My statement about accuracy was related to avoiding falling too deep into the finite detail. I am creating computer generated graphics to represent a diver for instance, and to model the effects of buoyancy there may be a lot of formulas, some of which take into account far more detail than is necessary to produce the same feedback as something which doesn't. I'm not intending to get into BMI's, wetsuit thickness etc etc, I just want to show that an overweighted diver is harder to control on ascent than one with optimum weight, whether the underlying formula is a precise scientific equation, or just one that gives the appearance of producing the same visual result is not important.
Remember, that when we start open water, we are trained from tables which provide figures on profiles that none of us would generally consider diving, tables treat the factors involved as absolutes, which they rarely are.

The formulas provided by the other members should provide me with adequate scope to create a simple newbie friendly bit of software.
 
For the nitrogen loading try this: DIY DECOMPRESSION This covers nitrogen loading as per BuhlmannÃÔ model (i.e. a dissolved gas model). You will need to get half time coefficients as well but you can Google those.

Buoyancy is rather simpler. Consider Boyle's law, and Archimedes Principal in the BC and exposure protection and you should be covered.

Those should be ideal, thanks for that.

Glenn
 
I do not have a link, but I would think that the overweighed overinflated BC thing would be similar to the formulas for a spring, since the weights/displacement balance each other then what you get is an oscillation about the equilibrium. any basic physics book should have that formula.
 
Hi again,

I'd very much like to thank those of you who offered me pointers on the algorithms for this project.
The project is now about 4 months down the line, and today I just finished writing the nitrogen absorption module.
I thought I'd post my project logbook, so you could see the progress that's been made thanks to the contributions made here.

Glenn's space - Windows Live

Given the limited time I have available to complete this project for my degree, I've had to omit the prospect of adding beautifully rendered animated fish, and corals.
Perhaps I will continue to adapt the application into a viable classroom model after my degree.

Although I've not carried out the testing phase of the project at the moment, the model as it stands should be able to model Nitrogen Absorption for a range of Nitrox mixes, PPO's for maximum safe depths etc. And with the addition of another array of constants, I anticipate the capacity to model Helium mixes also.

Thank-you all again for your help.

Regards

Glenn
 

Back
Top Bottom