---
title: "Mass and energy equations for CV; gas filling process"
subject: "Fundamental of Thermodynamics & Heat Transfer"
chapter: 4
key: "semester_2/fundamental_of_thermodynamics_and_heat_transfer:mass-energy-cv-gas-filling-station"
source: https://www.bctengineer.com/q/semester_2/fundamental_of_thermodynamics_and_heat_transfer/mass-energy-cv-gas-filling-station
site: BCT Engineering
---

# Mass and energy equations for CV; gas filling process

Fundamental of Thermodynamics & Heat Transfer · Chapter 4: First Law of Thermodynamics

- Asked in: 2068 Bhadra, 6 marks
- Video: [Unsteady Flow Processes | Thermodynamics | (Solved Examples)](https://www.youtube.com/watch?v=28xBwF5J-wY) — Question Solutions
- Answer checked by Claude Opus 5.5 (high effort) on 2026-10-14
- Page: https://www.bctengineer.com/q/semester_2/fundamental_of_thermodynamics_and_heat_transfer/mass-energy-cv-gas-filling-station
- Whole chapter: https://www.bctengineer.com/md/semester_2/fundamental_of_thermodynamics_and_heat_transfer/chapter-4

## Question

Write down general mass conservation and energy conservation equations for a control volume. Also derive mass and energy conservation equations for a gas filling process in a gas station.

## Short answer

General mass: dm_cv/dt = Σṁ_i − Σṁ_e. General energy: dE_cv/dt = Q̇−Ẇ + Σṁ_i(h_i+V²/2+gz)_i − Σṁ_e(...). For gas filling (rigid tank, no outlet): integrate mass → m₂−m₁=m_i, energy (neglect KE/PE, W=0) → m₂u₂−m₁u₁=Q+m_i h_i. Adiabatic evacuated tank: u₂=h_i, ideal gas T₂=k T_i.

## Answer

A control volume (CV) is a fixed region of space across whose boundary mass, heat and work may cross. Mass and energy are conserved for it.

#### General mass conservation (continuity)
Rate of change of mass inside CV = total mass inflow rate − total mass outflow rate

dm_cv/dt = Σ ṁ_i − Σ ṁ_e

#### General energy conservation (first law for CV)
dE_cv/dt = Q̇ − Ẇ + Σ ṁ_i (h_i + V_i²/2 + g z_i) − Σ ṁ_e (h_e + V_e²/2 + g z_e)

Here Q̇ is heat added to the CV, Ẇ is work done by the CV (shaft work, excluding flow work, which is already inside enthalpy h = u + Pv), and E_cv = m(u + V²/2 + gz).

#### Gas filling process (unsteady, uniform-state uniform-flow)
A rigid cylinder (tank) of volume V is filled from a large supply line at constant state (P_i, T_i, h_i). The valve is open from t = 0 to t. No gas leaves (ṁ_e = 0).

Assumptions: the state inside the tank is uniform at any instant; the line state h_i is constant; changes in kinetic and potential energy are negligible; the tank is rigid, so W = 0.

**Mass equation.** Integrate dm_cv/dt = ṁ_i over the filling time:

m₂ − m₁ = m_i

where m₁, m₂ are the initial and final masses in the cylinder and m_i is the mass entering.

**Energy equation.** Integrate dE_cv/dt = Q̇ + ṁ_i h_i:

m₂u₂ − m₁u₁ = Q + m_i h_i

Substituting m_i = m₂ − m₁:

Q = m₂u₂ − m₁u₁ − (m₂ − m₁) h_i

**Special cases**
- Adiabatic filling (Q = 0): m₂u₂ − m₁u₁ = (m₂ − m₁) h_i.
- Initially evacuated cylinder (m₁ = 0): u₂ = h_i. For an ideal gas, cv T₂ = cp T_i, so T₂ = k T_i. The final gas is hotter than the line gas, because the flow work of the incoming gas is converted to internal energy.
- Final mass from the gas law: m₂ = P₂V/(RT₂).

## Check yourself

The answer's key points as multiple-choice questions, with the correct option and why.

1. For a tank filled with gas (no exit), integrating dm_cv/dt = ṁ_i over the filling time gives:
   A. m2 − m1 = m_i
   B. m2 = m_i − m1
   C. m2 + m1 = m_i
   D. m2 − m1 = 0
   Answer: A. The mass accumulated in the tank equals the mass that entered. (Key point: Mass equation for filling)

2. For the rigid tank filled from a constant-state line with heat Q, the energy equation is:
   A. m2u2 − m1u1 = Q − m_i h_i
   B. m2h2 − m1h1 = Q + m_i h_i
   C. m2u2 − m1u1 = Q + m_i u_i
   D. m2u2 − m1u1 = Q + m_i h_i
   Answer: D. Inflowing mass carries enthalpy h_i (internal energy plus flow work); W = 0 as the tank is rigid. (Key point: Energy equation for filling)

3. For an initially evacuated, adiabatically filled tank, the energy equation gives:
   A. u2 = h_i, so T2 = k T_i
   B. u2 = u_i, so T2 = T_i
   C. h2 = u_i, so T2 < T_i
   D. u2 = 0
   Answer: A. With m1 = 0 and Q = 0, m2u2 = m2h_i, so u2 = h_i and for an ideal gas cv T2 = cp T_i, giving T2 = k T_i. (Key point: Adiabatic filling of an empty tank)

4. Why is the final gas in the tank hotter than the supply-line gas?
   A. Because heat is added by the valve
   B. Because the flow work of the entering gas is converted into internal energy
   C. Because the tank does work on the gas
   D. Because the supply gas is compressed isentropically
   Answer: B. The entering gas carries enthalpy h = u + Pv; the Pv flow work becomes internal energy inside the tank. (Key point: Why the gas gets hotter)

## Related in Fundamental of Thermodynamics & Heat Transfer

- [Mass and energy equations for CV; gas cylinder in kitchen](https://www.bctengineer.com/question.md?key=semester_2%2Ffundamental_of_thermodynamics_and_heat_transfer%3Amass-energy-cv-gas-cylinder-kitchen) — Fundamental of Thermodynamics & Heat Transfer, chapter 4
- [General mass and energy conservation for CV; unsteady](https://www.bctengineer.com/question.md?key=semester_2%2Ffundamental_of_thermodynamics_and_heat_transfer%3Amass-energy-conservation-cv-unsteady) — Fundamental of Thermodynamics & Heat Transfer, chapter 4
- [First law for cyclic process; CV mass and energy equations](https://www.bctengineer.com/question.md?key=semester_2%2Ffundamental_of_thermodynamics_and_heat_transfer%3Afirst-law-cyclic-mass-energy-cv) — Fundamental of Thermodynamics & Heat Transfer, chapter 4
- [Mass and energy equations for CV; nozzle, condenser](https://www.bctengineer.com/question.md?key=semester_2%2Ffundamental_of_thermodynamics_and_heat_transfer%3Amass-energy-cv-nozzle-condenser) — Fundamental of Thermodynamics & Heat Transfer, chapter 4
- [Steady/unsteady system; mass conservation for CV](https://www.bctengineer.com/question.md?key=semester_2%2Ffundamental_of_thermodynamics_and_heat_transfer%3Asteady-unsteady-mass-conservation-cv) — Fundamental of Thermodynamics & Heat Transfer, chapter 4, asked 2×
- [Mass and energy equations for non-flow; cyclic process](https://www.bctengineer.com/question.md?key=semester_2%2Ffundamental_of_thermodynamics_and_heat_transfer%3Amass-energy-nonflow-cyclic-closed) — Fundamental of Thermodynamics & Heat Transfer, chapter 4
