Ideal gas law for open system The ideal gas law $pV=m\mathcal RT$ can obviously be used to solve for mass.
Can we substitute the volume $V$ for volumetric flow rate $A\cdot\textrm{velocity}$ ($A$ is cross sectional area) through a control volume and solve the for $\textrm{mass flow rate}$?
$$\textrm{ mass flow rate} = (p\cdot \textrm{area}\cdot\textrm{velocity})/(\mathcal RT)$$
Is this valid or do other effects have to be considered?
 A: First you need the assumption that laws of equilibrium thermodynamics apply to a manifestly non-equilibrium case such as a flow. In Modern Thermodynamics by Kondepudi and Prigogine, the authors assert that molecular dynamics simulations show that a fluid element quickly relaxes to thermodynamic equilibrium (locally), and so for most flows we encounter, application of relations from equilibrium thermodynamics is good enough. Once this assumption is made the procedure to find mass flow rate is straight forward:
$$\dot{m}''_\textrm{flow}=\rho u=\frac{p}{\mathcal RT}u$$ gives flow per unit area.
To get mass flow rate over the entire cross-section you integrate above expression over the cross-section:
$$\dot{m}_\textrm{flow}=\int_A ~\mathrm dA ~\frac{p}{\mathcal RT}u$$
in which $p,T,u,$ will depend on position in general. If $p,T,$ are constant over the cross-section, then since flow rate $Q=\int_A ~\mathrm dA ~u$, you get
$$\dot{m}_\textrm{flow}=\frac{p}{\mathcal RT}Q$$
So indeed $Q$ replaces $V$, but only under assumptions made so far.
A: though the formula is correct, I'm not comfortable with the interpretation. I would derive the mass flow rate as below.
$$\dot m = \rho  Q =\rho A \cdot v$$
The density can be written as, $$\rho = \frac{m}{V}=\frac{P}{RT}$$
Then mass flow rate is, $$\dot m=\frac{P}{RT}A\cdot v$$
Here we need to be clear that pressure, temperature, and velocity should be the values at the location where the cross section area is A. To point this out is important because pressure and temperature of some flows changes dramatically along the path. 
