Dissimilar Tank Matching

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!

Imbodie

Contributor
Scuba Instructor
Divemaster
Messages
473
Reaction score
95
Location
Sunbright, TN
# of dives
I'm a Fish!
Ok I had a LARGE issue with this during Cave1, I just couldn't wrap my head around the issue.... I'm not a math whiz to begin with and it took sit down time with my instructor to get it all clear... In my free time I started working on an app in javascript to make it MUCH simpler. Was hung up for months on data collection based on a selected number of divers and finally Chris said "DUH, just do it for 2 divers" in a couple of hours I had it all roughed in. It still doesn't round like I want it to but check it out and let me know what you think. I plan on putting a pull down in for tank selection so you don't have to enter the basic info on tanks and the Team Factors is just stating the smallest amounts for the team.

Feel free to use it, share it, copy the code... After it gets all the tweaks I plan on porting over to Android and Apple platforms and putting all the tek calculations in one application.

It's at the bottom of the page.

springswildernessscuba.com - Gas Calculations
 
FYI you have a syntax error in your javascript

Lines 388-392
<script type="text/javascript" language="JavaScript">// <![CDATA[
// tankvol() is a function to calculate the tank volume for a stated cylinder
// written-modified by Tim Waldo aka SpringsWilderness on 5-6-2014
// springswildernessscuba.com - Home contact:
<script type='text/javascript'>

Looks like you've opened the script tag twice.
 
oops :)

---------- Post added May 6th, 2015 at 08:06 PM ----------

FYI you have a syntax error in your javascript

Lines 388-392
<script type="text/javascript" language="JavaScript">// <=!=[=C=D=A=T=A=[
// tankvol() is a function to calculate the tank volume for a stated cylinder
// written-modified by Tim Waldo aka SpringsWilderness on 5-6-2014
// springswildernessscuba.com - Home contact:
<script type='text/javascript'>

Looks like you've opened the script tag twice.


Still works though??

I was in a hurry to get it up on the site to get some feedback... still lots more to do so I guess I'll clean that up to.

---------- Post added May 6th, 2015 at 08:11 PM ----------

Sorry... had issues pasting the code into the page... its fixed
 
Still works though??

I was in a hurry to get it up on the site to get some feedback... still lots more to do so I guess I'll clean that up to.
No clue.

I just subtract 100psi from turn pressure if I have 1 size larger tanks, or have my buddy do it if I have 1 size smaller tanks. I almost never dive different size tanks anyways, in Mexico all there is are AL80s, in Florida it's almost always 104/108/130's excluding LP85s and if my buddy isn't carrying heavy tanks I'm sure going to dive the smaller ones too!
 
it appears that you are asking for the cylinder volume of 1 tank, and then converting it to doubles automatically. Nothing wrong with doing it that way, but you might want to be more clear in your descriptions of the various fields

For my double 130s, I entered a rated volume of 260, 3442 rated pressure, 3600 actual pressure and got a calculated volume of 544 cubic feet.
 
Guess I should document more.... That is why I posted it.. feedback is ALWAYS GOOD :) The intent was for sidemount divers.... but will clarify instructions. And you are over filling HP tanks did not think that was a norm.
 
Guess I should document more.... That is why I posted it.. feedback is ALWAYS GOOD :) The intent was for sidemount divers.... but will clarify instructions. And you are over filling HP tanks did not think that was a norm.

It's a pretty normal fill for me :)

I think if you're intent is to use this for non-manifolded doubles (SM or BM), it gets a little more complicated....probably need to allow for different actual pressures in each tank and calculate swap pressures as well as turn pressure (in the tank they would be breathing from when they turn).
 
Tim, everything made of steel with a working pressure of over 2400 goes up to 3600. 2400+/3180+/3442/3500, they all go up to 3600. Anything less than that makes thirds calculations a pita, the extra few hundred psi at fill isn't going to bother them.

Nimoh, not sure why this would be relevant to those diving singles except for the rare occurrence of people taking cavern/intro in singles with H-valves, but it doesn't matter whether you are diving doubles or sidemount, you still have the same total gas. For independent doubles and sidemount I actually use a single tank at the total pressure. so 122.5 and preferably 7200 for total pressure, or I will average them, I.e. 3700/3500 becomes 3600 and I just start on the higher tank

Tim, a bit more work to do as the math is rather off for actual turn pressures due to the rounding that has to occur.
i.e. I just ran what numbers would be for me and my normal dive buddy. I have PST HP120's, 122.5cf at 3500psi. Buddy has PST LP104's, 106.2cf at 2640psi. Your math has him turning at 2555.9, but he would actually have to turn at 2600. Should always be rounding up to the nearest 100psi. Now, combine that with if his tanks were only at 3500psi due to cooling, the initial gas would have to be rounded down to 3300 for calculating thirds, so he would only have 1000psi of usable thirds gas. It's a pita, but if you're going to have a full calculator for it, all of the rounding should be in there.
 
Not sure where I implied that this would be useful for single tanks, but I agree that thirds is not all that useful for diving in singles. Perhaps a half usable or all useable gas planning calculator might be useful.

Imbodie, as far as the rounding goes, you might try running your calculated values through the following js:

Math.ceil(value / 100.0) * 100;
 
Last edited:
Tim, everything made of steel with a working pressure of over 2400 goes up to 3600. 2400+/3180+/3442/3500, they all go up to 3600. Anything less than that makes thirds calculations a pita, the extra few hundred psi at fill isn't going to bother them.

Nimoh, not sure why this would be relevant to those diving singles except for the rare occurrence of people taking cavern/intro in singles with H-valves, but it doesn't matter whether you are diving doubles or sidemount, you still have the same total gas. For independent doubles and sidemount I actually use a single tank at the total pressure. so 122.5 and preferably 7200 for total pressure, or I will average them, I.e. 3700/3500 becomes 3600 and I just start on the higher tank

Tim, a bit more work to do as the math is rather off for actual turn pressures due to the rounding that has to occur.
i.e. I just ran what numbers would be for me and my normal dive buddy. I have PST HP120's, 122.5cf at 3500psi. Buddy has PST LP104's, 106.2cf at 2640psi. Your math has him turning at 2555.9, but he would actually have to turn at 2600. Should always be rounding up to the nearest 100psi. Now, combine that with if his tanks were only at 3500psi due to cooling, the initial gas would have to be rounded down to 3300 for calculating thirds, so he would only have 1000psi of usable thirds gas. It's a pita, but if you're going to have a full calculator for it, all of the rounding should be in there.

Yeah, the rounding was giving me fits... I am going to work on it, in the mean time anyone using the script SHOULD know to round up or down accordingly. Nimoh I think was concerned because I asked for info on 1 tank and then doubled it. My concept was side mount or doubles back mounted neither scenario is going to have dissimilar tanks for one diver (example I'm not going to have a 105 on my left and an 85 on my right. I just needed to know the type of cylinder each diver was using. The other issue was different pressures in a side mount configuration, the way I was taught was to average the two cylinders for a pressure that represented both tanks. Left tank 2500psi right tank 2700psi means 2600psi for both tanks. I've gotten a couple of good examples of java script rounding and will be playing around with them this weekend.


FYI, Thanks Walter, will be trying yours and other suggestions to see which has best results.

Tim

---------- Post added May 7th, 2015 at 05:03 PM ----------

It's a pretty normal fill for me :)

I think if you're intent is to use this for non-manifolded doubles (SM or BM), it gets a little more complicated....probably need to allow for different actual pressures in each tank and calculate swap pressures as well as turn pressure (in the tank they would be breathing from when they turn).

swap pressures are set by the person diving side mount... I swap at 500 psi increments, some people swap at 1000 psi.... If turn pressure is stated to be 2600 psi, that is when BOTH tanks reach 2600 psi (in side mount) which is the same as diving manifolded tanks and turning at 2600 psi.
The variable pressure in left and right tanks should be the average of the two pressures and that is what is used in the script.

The only real issue right now is rounding of the numbers... turn pressure should be rounded up, actual volume should be rounded down and I will be working on those this weekend.

:)
LOVING the FEEDBACK

Thank you guys

Tim
 
http://cavediveflorida.com/Rum_House.htm

Back
Top Bottom