I m tasked with a tricky situation. I need to calculate the exact amount a tank can take in gas. But I dont know the volume of the tank. I just need to make sure that the tank reaches the right pressure and thus the right density. This is how the system operates: A hose is connected to a tank. pressure and temperature is recorded. Then the tank is filled with 1 kg of gas (by mass flow meter). Then a second point is recorded. From there i would need to calculate how much more gas I need to fill, to reach the target pressure. Is this even possible? I am also able to calculate the compressibility factor z. The gas composition is known and i also know the pressure and temperature. I also know the molar mass of the gas.
Is there a way to accurately calculate the mass needed to fill the tank?
Edit: I forgot to mention, that the tank may not be empty at the beginning. Some data to test with:
$P_0$ - Initial pressure - 44,77 bar
$P_1$ - Pressure after $m_1$ was added - 48,87 bar
$P_2$ - Target pressure - 205,09 bar
$m_1$ - mass added - 1315.8 g
$z_1$ @ P1 - 0,8992
$z_2$ @ P2 - 0,7268
$T$ - 276,2 K
I converted the pressure to Pa and ran some calculations but didnt get anywhere. If someone could find the time to help me out. Thanks!
Edit2: I could also get a density reading from the mass flow meter, if that would help.