How to calculate the mass of gas in a tank

  • #1
Leopold89
18
2
Dear community,

I have a question comparable to https://www.physicsforums.com/threads/calculating-the-mass-of-air-in-a-pressurised-air-tank.1053707/, but with some additional peculiarities.

My setup is:
1) I got a time series of gas pressure and temperature, with a time step of 2 minutes
2) I cannot measure the gas temperature, only the surrounding/room temperature
3) My gas can be either monoatomic or not and it has negligible contamination
4) The pressure is so large, that the gas turns into liquid
5) At arbitrary times during day time someone releases some gas from the tank, but not at night

Question: What is the remaining gas mass or particle number respectively?

My ansatz: First I can see that change in temperature will affect the pressure after some time delay, so I assume that should the tank contain a gas not at room temperature, the gas gets to room temperature after some time as well. This lag I can get from analysing the two time series.

I would have assumed that I am moving along the p-T-curve when releasing gas, since some of the liquid evaporates until a new equilibrium between gas/vapour and liquid is reached, but the data shows I am well above this curve.
From this point onward I believe I am confusing myself. Now I know cannot use the ideal gas equation, because by releasing gas I am also converting liquid to gas/vapour, which should cool down the gas temperature below room temperature, followed by a heating phase, where the gas gets back to room temperature. As far as I understand I now need to somehow get the vapour volume, liquid volume, Gibbs energy and entropy to arrive at the remaining gas mass (or number of particles), right? I don't know how to get these.
 
Science news on Phys.org
  • #2
Are you taking into account the thermal inertia of the tank? Are you including the heat transfer rate between the tank contents and the air outside? What is the measured pressure and temperature vs time?
 
  • #3
Are you taking into account the thermal inertia of the tank? Are you including the heat transfer rate between the tank contents and the air outside?
Other then by the time delay, no. The tank's heat transfer rate should be around 45 W/mK.

I have also included the time series. The pressure (blue, left axis) is in Pa and the temperature (red, right axis) in Kelvin. On x is the time series index, so multiplied by two minutes is the time.
 

Attachments

  • gas_plot.png
    gas_plot.png
    7.9 KB · Views: 1
Last edited:
  • #4
I think you need to get your feet wet with a simpler versions of the model first, before going to the full model. Would you be able to formulate a model where the tank is adiabatic, and where the thermal inertia of the tank itself is negligible?
 
  • #5
Under these conditions I would use ##p^{1-\gamma}T^{\gamma}=\mathrm{const}##, such that I would get ##\tau_2:=\left( \frac{p_1}{p_2}\right)^{\frac{1}{\gamma} - 1} T_1##. Now that I got the temperature, I can get the particle number with ##N=\frac{p_2V}{k_B\tau_2}##. Now that I got the temperature difference ##T_2-\tau_2## between the measured temperature ##T_2## and the gas temperature ##\tau_2##, I can get the new pressure, after thermodynamic equilibrium is established with ##p_\mathrm{eq}=\frac{Nk_BT_2}{V}##.
I used the fixed volume ##V## of the gas tank and I know the ##\gamma## from the type of gas in the container.
 
  • #6
Leopold89 said:
Under these conditions I would use ##p^{1-\gamma}T^{\gamma}=\mathrm{const}##, such that I would get ##\tau_2:=\left( \frac{p_1}{p_2}\right)^{\frac{1}{\gamma} - 1} T_1##. Now that I got the temperature, I can get the particle number with ##N=\frac{p_2V}{k_B\tau_2}##. Now that I got the temperature difference ##T_2-\tau_2## between the measured temperature ##T_2## and the gas temperature ##\tau_2##, I can get the new pressure, after thermodynamic equilibrium is established with ##p_\mathrm{eq}=\frac{Nk_BT_2}{V}##.
I used the fixed volume ##V## of the gas tank and I know the ##\gamma## from the type of gas in the container.
I thought you said you have two phases. What do you do in that case?
 
  • #7
Chestermiller said:
I thought you said you have two phases. What do you do in that case?
Ask the forum, because all I get is the Gibbs energy ##G=U + pV - TS##, which I can rewrite as ##\Delta U + p\Delta V - T\Delta S =0##, where ##U## is the inner energy and ##S## the entropy. Theoretically I can rewrite the liquid volume as ##V-V_\mathrm{vapour}## with ##V_\mathrm{vapour}## as the real root of ##pV_\mathrm{vapour}^3-V_\mathrm{vapour}^2n_\mathrm{vapour}(bp+RT)+an^2V_\mathrm{vapour}-n_\mathrm{vapour}b=0##, where I used that pressure and temperature of vapour and liquid are equal. Then ##\Delta V=2V_\mathrm{vapour}-V## and I just replace one variable I don't know, ##V_\mathrm{liquid}##, with another that I don't know, ##n_\mathrm{vapour}##. I am not sure how to use the heat energy for condensation ##Q=\frac{\mathrm{d}p}{\mathrm{d}T}(V_\mathrm{vapour}-V_\mathrm{liquid})T##, because I am not moving along the p-T-curve, right?
 
  • #8
For the adiabatic, reversible, 2 phase case, the open system version of the 1st law of thermodynamics tells us that $$dU=h_Vdm\tag{1}$$ where U is the internal energy of the tank contents, m is the mass of the tank contents ( dm is negative), and ##h_V## is the enthalpy per unit mass of the vapor. Eqn. 1 assumes that mass leaves the tank as a vapor through a valve at the top of the tank.

U is given by: $$U=m[(1-x)u_L+xu_V]\tag{2}$$where x is the mass fraction vapor in the tank, ##u_L## is the internal energy per unit mass of the liquid in the tank and ##u_V## is the internal energy per unit mass of the vapor in the tank.

The constant volume of the tank V is related to the specific volumes of liquid and vapor in the tank by: $$m[(1-x)v_L+xv_V]=V\tag{3}$$Solving Eqn. 3 for x gives:$$x=\frac{\frac{V}{m}-v_L}{v_V-v_L}\tag{4}$$OK so far?
 

Similar threads

  • Thermodynamics
Replies
20
Views
2K
  • Thermodynamics
Replies
7
Views
1K
Replies
22
Views
2K
Replies
3
Views
2K
Replies
3
Views
1K
  • Thermodynamics
Replies
14
Views
1K
  • Engineering and Comp Sci Homework Help
Replies
14
Views
1K
  • Thermodynamics
Replies
7
Views
2K
Replies
92
Views
8K
Back
Top