# Calculate volume of compressed air tank given several variables

For context, I've started drafting an idea for a submarine simulator game, and I want to make as realistic as possible; but this obviously requires doing a lot of math that I'm unfamiliar with. I've decided this submarine will have 2 ballast tanks, each with a volume of 2000 liters, and now I'm trying to figure out the compressed air tanks; how big should they be, and at what pressure should they be at? For instance, let's say my submarine will have a compressed air tank holding x cubic feet of air at 3000 psi releases 50% its air supply into one of the 2000 liter ballast tank completely full of seawater. If the ballast tank is only half full of seawater after the process, what is x? I'll assume the temperature is constant throughout the process to not complicate things too much. I've just started precalculus so I'm not sure how I'd even begin to calculate something like this; I've consulted a few different generative AI programs like chatgpt and google gemini, but they give different wildly different answers each time I ask the same question. Could anyone walk me through solving a problem like this?

• Ballast tanks are at sea pressure. This is a simple p1v1 = p1v2. This is a Chemistry 1 question, not a calculus question. And you should stick to imperial or SI, not both. As an extra, military submarines run with ballast tanks either full or empty of seawater, not in between. Trim tanks are for depth control Commented Feb 15 at 5:30
• Choose a pressure for x, why not consider storing the gas as a liquid? that would be the smallest volume... Commented Feb 15 at 6:30

If you consider the needs of the submarine there is a straightforward way to get the desired volume.

In a submarine you will want to be able to empty a full ballast tanks by some minimum amount $$V_{min}$$ at full depth to begin the ascent in an emergency. This $$V_{min}$$ depends on the natural buoyancy of the submarine fully loaded and might be the entire ballast tank.

The static pressure at depth is $$P_{depth} = density_{seawater} * gravity * depth + P_{atmosphere}$$

You have a pressure $$P_{max}$$ that the air tanks is filled before diving that deep based on the tanks the pumps used to fill them and operating procedures. For example you might require that the air tanks must be at least at half pressure before you allow the ballast tanks to be filled with water completely.

Then with the ideal gas laws you need $$P_{max} * V_{gastank} > P_{depth} * (V_{gastank} + V_{min})$$

Solve for $$V_{gastank}$$ given your design requirements.

$$P_{max} * V_{gastank} > P_{depth} * V_{gastank} + P_{depth} *V_{min}$$

$$P_{max} * V_{gastank} - P_{depth} * V_{gastank} > P_{depth} *V_{min}$$

$$(P_{max} - P_{depth}) * V_{gastank} > P_{depth} *V_{min}$$

$$V_{gastank} > \frac{P_{depth} *V_{min} }{P_{max} - P_{depth}}$$

• with the imporant note that this is for an isothermal (ie slow) process Commented Feb 15 at 14:07
• Thanks so much, this is exactly what I needed! Now I'm curious though, how this would change with a variable temperature? I did some research on the effect of temperature on a liquid's pressure but there doesn't seem to be a concrete answer. Commented Feb 15 at 16:41
• @MassimoAsteriti the of liquids density will change at different temperatures. but at depth the temperature of the outside water is fixed at 4°C (at which point it is the most dense). The temperature change of the gas will be from a bit above room temperature to 4°C which is about a 10% difference i absolute terms. If you want to to be exact you will need to add a denominator T in the initial ideal gas law equation. Commented Feb 15 at 16:59