## temperature change in pipe of flowing gas

I have a pipe with a constant mass flow rate dm/dt of air being blown gently through which opens out into the atmosphere at both ends. At the middle point of this pipe it is heated at a constant rate dQ/dt. Assuming that the air is heated rapidly and all the heat is transferred to the gas is it possible to work out dQ/dt by measuring the temperature at the inlet and outlet and knowing dm/dt.

With an incompressible fluid this wouldn't be too hard but how would you do it for the gas since this is compressible? The enthalpy change = heat in. But how do you work out the enthalpy since this is neither constant pressure or volume? Any help appreciated
 You could probably calculate the compressibility factor Z and use PV=ZRT for an approximation.
 I think you can do this using just conservation of mass and conservation of energy. The conservation of mass says: $$\dot{m}=\rho_i A v_i = \rho_o A v_o$$ where $$\dot{m}$$ is the mass flow rate, A is cross sectional area of the pipe, $$\rho_i$$ and $$\rho_o$$ are the input and output mass densities of the gas, and $$v_i$$ and $$v_o$$ are the input and output velocities. If we assume an ideal gas where the internal energy is $$U=C_v N k T$$ where U is internal energy, N is the number of particles, k is Boltzmann's constant, and T is temperature, $$C_v$$ is the specific heat, then the conservation of energy says: $$\frac{1}{2}\dot{m}v_i^2+C_v \dot{N}_i kT_i + \dot{Q} = \frac{1}{2}\dot{m}v_o^2+C_v\dot{N}_o kT_i$$ where $$\dot{Q}$$ is the rate of heat input, but $$N\mu=m$$ where $$\mu$$ is the average mass per molecule, so substitute $$\dot{m}/\mu$$ for the $$\dot{N}$$ and solve for $$\dot{Q}$$ and we get: $$\dot{Q}=\frac{\dot{m}}{2}(v_0^2-v_i^2)+\frac{C_v k \dot{m}}{\mu}(T_o-T_i)$$ So you really need to know the input and output velocities as well as the temperatures. I am not sure, but since you said "gently flowing", you might be able to assume that the term involving the velocities is negligible, then you only need temperatures. If you cannot neglect velocities, then it gets more complicated, and you have to know the length of the pipe in order to solve the problem. Also, that probably means you have to account for viscous effects, and bring Poiseuilles law into the mix. Edit: Thinking about this, if you ignore the velocity term, you just have the case for incompressible flow. In other words, you either need to measure the input and output velocities, assume incompressible flow, or we need a better analysis. The conservation of mass and energy equations are correct, I think, but we are missing the conservation of momentum, so "better analysis" means we need to include the conservation of momentum. This situation might qualify for incompressible flow, I will check that out.

 Tags enthalpy, gas, heat, pipe flow, temperature change